Skip to content

Latest commit

 

History

History
76 lines (69 loc) · 1.8 KB

File metadata and controls

76 lines (69 loc) · 1.8 KB

Stellar: Sign transaction

Asks device to sign given transaction. User is asked to confirm all transaction details on Trezor.

ES6

const result = await TrezorConnect.stellarSignTransaction(params);

CommonJS

TrezorConnect.stellarSignTransaction(params).then(function(result) {

});

Params

Optional common params

  • pathobligatory string | Array<number> minimum length is 3. read more
  • networkPassphrase - obligatory string network passphrase
  • transaction - obligatory Object type of StellarTransaction

Example

TrezorConnect.stellarSignTransaction(
    path: "m/44'/1'/0'/0'/0'",
    networkPassphrase: "Test SDF Network ; September 2015",
    transaction: {
        source: "GAXSFOOGF4ELO5HT5PTN23T5XE6D5QWL3YBHSVQ2HWOFEJNYYMRJENBV",
        fee: 100,
        sequence: 4294967296,
        timebounds: {
            minTime: null,
            maxTime: null
        },
        memo: {
            id: null,
            type: 0,
            text: null,
            hash: null
        },
        operations: [
            {
                type: "payment",
                source: "GAXSFOOGF4ELO5HT5PTN23T5XE6D5QWL3YBHSVQ2HWOFEJNYYMRJENBV",
                destination: "GAXSFOOGF4ELO5HT5PTN23T5XE6D5QWL3YBHSVQ2HWOFEJNYYMRJENBV",
                asset: null,
                amount: "10000"
            }
        ]
    }
});

Result

{
    success: true,
    payload: {
        publicKey: string,
        signature: string,
    }
}

Error

{
    success: false,
    payload: {
        error: string // error message
    }
}