Skip to content
This repository has been archived by the owner on Nov 23, 2023. It is now read-only.

Latest commit

 

History

History
73 lines (67 loc) · 1.77 KB

eosSignTransaction.md

File metadata and controls

73 lines (67 loc) · 1.77 KB

Eos: sign transaction

Asks device to sign given transaction using the private key derived by given BIP44 path. User is asked to confirm all transaction details on Trezor.

ES6

const result = await TrezorConnect.eosSignTransaction(params);

CommonJS

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

});

Params

Optional common params

  • pathrequired string | Array<number> minimum length is 3. read more
  • transaction - required Object type of Transaction

Transfer example

TrezorConnect.eosSignTransaction({
    path: "m/44'/194'/0'/0/0",
    transaction: {
        chainId: 'cf057bbfb72640471fd910bcb67639c22df9f92470936cddc1ade0e2f2e7dc4f',
        header: {
            expiration: '2019-12-01T12:00:00',
            refBlockNum: 6439,
            refBlockPrefix: 2995713264,
            maxNetUsageWords: 0,
            maxCpuUsageMs: 0,
            delaySec: 0,
        },
        actions: [{
            account: 'eosio.token',
            authorization: [{
                actor: 'abcdefg12345',
                permission: 'active',
            }],
            name: 'transfer',
            data: {
                from: 'abcdefg12345',
                to: '12345abcdefg',
                quantity: '1.0000 EOS',
                memo: 'memo',
            },
        }]
    }
});

Result

{
    success: true,
    payload: {
        signature: string, // hexadecimal string
    }
}

Error

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