Stacks

getStacksSignedTransaction

This function for :

  • STACKS (STX)

  • SIP010 - stacks token

  • STACKS_TESTNET (STXt)

  • SIP010_TESTNET

Parameters

Parameter
Type
Description

coinType

CoinType

stacks coin type.

transaction

stacks transaction parameters.

class StacksTransaction

Name
Type
Description

hdKeyPath

Bip44KeyPath

sign key path for stacks transaction

sigHash

String

transaction that has not been signed of stacks transaction

authType

int

fee

String

transaction fee of stacks transaction * Fee value is configured in stacks(STX) unit.

nonce

String

transaction nonce of stacks transaction

decimals

int

transaction decimals of stacks transaction

symbol

String

transaction symbol of stacks transaction

optionParam

String

(optional)hexadecimal value of the token method type - '01' : assert transfer - '02' : token stake - '03' + amount(8bytes) : token revoke (amount value is configured in micro-STX unit) - '04': dapp contract

Returns

String - signed transaction.

Requirements

  • D'CENT Biometric Wallet version 2.14.1 or higher is required.

    • (for SIP010): 2.16.7 or higher is required.

Example

String keyPath = "m/44'/5757'/0'/0/0";
StacksTransaction stacksTransaction;

stacksTransaction = new StacksTransaction.Builder()
                    .keyPath(Bip44KeyPath.valueOf(keyPath))
                    .sigHash("0000000001040027b586cbbbd0902773c2faafb2c511b130c3610800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030200000000021608633eac058f2e6ab41613a0a537c7ea1a79cdd20f6d69616d69636f696e2d746f6b656e087472616e736665720000000401000000000000000000000000000f4240051627b586cbbbd0902773c2faafb2c511b130c361080516e3d94a92b80d0aabe8ef1b50de84449cd61ad6370a0200000006313130343239")
                    .fee("0.12")
                    .nonce("0000000000000029")
                    .decimals(6)
                    .authType(4)
                    .symbol("MIAMI")
                    .optionParam("01") // assert transfer
                    .build();

String response = mDcentmanager.getStacksSignedTransaction(CoinType.SRC20, stacksTransaction);

Last updated