Solana

getSolanaSignedTransaction

This function for :

  • SOLANA (SOL)

  • SPL_TOKEN - solana token

Parameters

ParameterTypeDescription

coinType

CoinType

solana coin type.

transaction

solana transaction parameters.

class SolanaTransaction

NameTypeDescription

hdKeyPath

Bip44KeyPath

sign key path for solana transaction

sigHash

String

transaction that has not been signed of solana transaction

fee

String

transaction fee of solana transaction * Fee value is configured in solana(SOL) unit.

decimals

int

transaction decimals of solana transaction

symbol

String

transaction symbol of solana transaction

optionParam

String

(optional)hexadecimal value of the token method type is used only in spl token. - '01': spl-token transaction - '02': create assosiate - '03' + amount(8bytes) : for dapp (amount value is configured in lamport unit)

Returns

String - signed transaction.

Requirements

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

    • (for spl-token): 2.17.1. or higher is required.

Example

String keyPath = "m/44'/501'/0'";
SolanaTransaction solanaTransaction;

solanaTransaction = new SolanaTransaction.Builder()
                    .keyPath(Bip44KeyPath.valueOf(keyPath))
                    .sigHash("010500137842adebf146d55498bf1e9c59cb1252338d79b9f9598eebd7fb2f76940b411814a9cc38c2da6f91700622eb3b8ddff7707a7e6bfcbb4301b9c442990b92dc8cc40a4939977b82afe23c3c6bf859cc74c8757a688e46c9633bb8051138b81b76eebcaf41d63734864c18aa510ca43c89f38eb80d40c1ad95d8f34a93b8364c8894b15d072786475a09b4944c100d830a7bd843bbab2955290bfbba9bb4650ae71314562a9db4410932a5510cbccf45294213ea9c9b237775d189801be4edde0504d42854e9bad4cef8bc8d53ec576586258bdf1f37ba15e7e253487bb4ee952659e944ad9682b34349abe72246ef5b999b273ae987903504e02e6f82c635eb5a2aa9d58c2c76ade93cb3a212a0a5ba5d75a03ce1dedb219ba48fc9d7d972eb44b3ae006f4a26f61d3ed71088b47d4a01a21b78f52344ab7276d784968f3b73b3174ef9f7ecee2165c5b31505e0d1755e5725829a4a760a6b61628bb098da935f73eb0c866fb2830342292ab39aed6bd16844507bcfcc34dc3e80be29f3066bc28f140d143f584f237abf346a017098929cb8dc686ef1905a9ab9469bfe4e3bf4272e2356580b6175fda5e189259dad62bb45308cf466e8cabd1083fa25b4d51706ddf6e1d765a193d9cbe146ceeb79ac1cb485ed5f5b37913a8cf5857eff00a94157b0580f31c5fce44a62582dbcf9d78ee75943a084a393b350368d22899308850f2d6e02a47af824d09ab69dc42d70cb28cbfa249fb7ee57b9d256c12762ef444718f31bf2796cbdb84c8d1e5e2b23913531c84d40fcacc7c349ee58b214c14bd949c43602c33f207790ed16a3524ca1b9975cf121a2a90cffec7df8b68acdd4e1e0977eeb6eea0dddf7d99524fd7748c2b13dcb08146e4bda783811815e000112120e010f0203040510060708090a0b110c0d000930a1b10400000000f125b10d00000000")
                    .fee("0.0021")
                    .decimals(10)
                    .symbol("SOL")
                    .optionParam("030000000000000500") // dapp(03) + amount(0000000000000500)
                    .build();

String response = mDcentmanager.getSolanaSignedTransaction(CoinType.SPL_TOKEN, solanaTransaction);

Last updated