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
  • Get Address
  • Parameters
  • Returns
  • Get XPUB
  • Parameters
  • Returns

Was this helpful?

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

Address & XPUB

Get Address

Get the address of CoinType and BIP44 Key Path using getAddress() function.

Parameters

  • coinType: coin type

  • addressPath: key path to get address

Returns

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

  • address: address

  • pubkey: public key value(pubkey exists only when the coinType is .TEZOS , .XTZ_FA, .TEZOS_TESTNET and .XTZ_FA_TESTNET)

Example(bitcoin)

// key path of the account
let keyPath = "m/44'/0'/0'/0/0/"
DcentMgr.getAddress(coinType: .BITCOIN, addressPath: keyPath) { (result, address, pubkey) in
    if result {
        ///
        print("success")
        print("address >> " + address)
    }
    else {
        print("fail")
    }
}

Get XPUB

Get a xpub key of BIP44 Key Path or BIP32 master key using requestExtractPublicKey() function.

Parameters

  • KeyPath: key path to extract public key

Returns

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

  • publickey: extract public key

Example

// Hardened key path
let keyPath = "m/44'/0'"
DcentMgr.requestExtractPublicKey( KeyPath: keyPath) { (result, publickey) in
    if result {
        ///
        print("success")
        print("public key  >> " + publickey)
    }
    else {
        print("fail")
    }
}
PreviousDevice & Accrouts InfoNextBitcoin

Last updated 1 year ago

Was this helpful?