D'CENT developer guide
Official siteUser GuideBlogTwitter
  • Introduction
  • How to Connect Your DApp to D’CENT Mobile App
  • In-app browser (dapp browser)
    • Getting Started
    • EVM compatible networks
    • Klaytn network
    • Tron network
  • Dynamic Link
    • Dynamic Link to In-app Browser
    • EIP-681 : Transaction/Payment Request
  • D'CENT WalletConnect (DWC)
    • Introduction
    • Packages
    • D'CENT WalletConnect
    • Test Environment
    • WalletConnect monorepo
  • Collectibles
    • NFT list on Collectibles tab
  • D'CENT biometric wallet for PC
    • D'CENT SDK for PC Environment
    • dcent-web-connector
      • Configurations
      • Device & Accounts Info.
      • Address & XPUB
      • Ethereum & EVM compatible
      • Klaytn
      • Bitcoin
      • XRPL (XRP Ledger)
      • Hedera (HBAR & HTS)
      • Tron (TRX & TRC20)
      • Stellar
      • Tezos (XTZ & XTZ_FA)
      • Vechain
      • Near (NEAR & Near Token)
      • Havah
      • Polkadot
      • Polkadot Parachain
      • Cosmos & Cosmos compatible network
      • Algorand
    • dcent-cli-connector
      • Configurations
      • Device & Accounts Info.
      • Address & XPUB
      • Ethereum & EVM compatible
      • Hedera (HBAR & HTS)
    • dcent-provider
  • D'CENT BIOMETRIC WALLET FOR Mobile
    • D'CENT SDK for Mobile Environment
    • dcent-biometric-sdk-android
      • Setup
      • Initialize
      • Device & Accrouts Info
      • Address & XPUB
      • Bitcoin
      • Ethereum & EVM compatible
      • Klaytn
      • XRPL
      • Binance
      • Stellar
      • Tron
      • Cardano
      • Hedera
      • Stacks
      • Solana
      • Conflux
      • Polkadot
      • Cosmos
      • Tezos
      • Vechain
      • Near
      • Havah
      • Algorand
    • dcent-biometric-sdk-ios
      • Setup
      • Initialize
      • Device & Accrouts Info
      • Address & XPUB
      • Bitcoin
      • Ethereum & EVM compatible
      • Klaytn
      • XRPL
      • Binance
      • Stellar
      • Tron
      • Cardano
      • Hedera
      • Stacks
      • Solana
      • Conflux
      • Polkadot
      • Cosmos
      • Tezos
      • Vechain
      • Near
      • Havah
      • Algorand
  • D'CENT Integrated Packages
    • Web3Modal
    • web3-onboard
  • Misc.
    • Logo & Brand Guideline
Powered by GitBook
On this page
  • getStacksSignedTransaction
  • Parameters
  • Returns
  • Requirements

Was this helpful?

  1. D'CENT BIOMETRIC WALLET FOR Mobile
  2. dcent-biometric-sdk-ios

Stacks

PreviousHederaNextSolana

Last updated 1 year ago

Was this helpful?

getStacksSignedTransaction

This function for :

  • .STACKS - stacks (STX)

  • .SIP010 - stacks token

  • .STACKS_TESTNET - stacks testnet (STXt)

  • .SIP010_TESTNET - stacks testnet token

Parameters

  • coinType: stacks networks coin type

  • stacksTransaction: ()stacks transaction parameter

class StacksTransaction

Name
Type
Description

key

String

sign key path for stacks transaction

signHash

String

transaction that has not been signed of stacks transaction

authType

UInt32

fee

String

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

nonce

String

transaction nonce of stacks transaction

symbol

String

transaction symbol of stacks transaction

decimals

UInt32

transaction decimals 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

  • result: (Bool) true if successful, false if error occurred

  • txData: 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

let stacksTransaction : StacksTransaction = StacksTransaction(key: "m/44'/5757'/0'/0/0", sigHash: "00000000010400b8d4c2dbab9a59837ca0892080d9395199b3fa9d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000302000000000005166c717c6701374d0db48dac262d1a85f906ae2d1e000000001ad2748031303638343134333900000000000000000000000000000000000000000000000000", authType: 4, fee: "0.12", nonce: "000000000000006c", symbol: "STX", decimals: 6, optionParam: "")
  
DcentMgr.getStacksSignedTransaction(coinType: .STACKS, stacksTransaction: stacksTransaction) { (result, txData) in
    print("Stacks Transaction closure")
    if result == false {
        print("FAIL !!!")
    }else{
        print(txData)
    }
}

transaction authorization type of stacks transaction (refer to) - standard authorization: 0x04 - sponsored authorization: 0x05

StacksTransation
Stacks Doc