cardanoGetAddress

Use requirement

  • Firmware version required

    • Touch: 4.1.0

    • Classic/Mini: 3.0.0

Cardano: get address

Display requested address derived by given BIP32-Ed25519 path on device and returns it to caller. User is presented with a description of the requested key and asked to confirm the export on OneKey.

const response = await HardwareSDK.cardanoGetAddress(connectId, deviceId, params)

Params

Optional common params

Exporting single address

  • addressParameters - required see description below

  • protocolMagic - required Integer 764824073 for Mainnet, 1 for Preprod Testnet, 2 for Preview Testnet

  • networkId - required Integer 1 for Mainnet, 0 for Testnet

  • address - optional string address for validation (read Handle button request section below)

  • showOnOneKey - optional boolean determines if address will be displayed on device. Default is set to true

  • derivationType - optional CardanoDerivationType enum. determines used derivation type. Default is set to ICARUS=1

  • isCheck - optional boolean checks only the base address

Exporting bundle of addresses

  • bundle - Array of Objects with single address fields

Address Parameters

  • addressType - required CardanoAddressType/number - you can use the flow CARDANO.ADDRESS_TYPE object or typescript CardanoAddressType enum. Supports all address types.

  • path - required string | Array<number> minimum length is 5.

  • stakingPath - optional string | Array<number> minimum length is 5. Used for base and reward address derivation

  • stakingKeyHash - optional string hex string of staking key hash. Used for base address derivation (as an alternative to stakingPath)

  • certificatePointer - optional CardanoCertificatePointer object. Must contain numbers blockIndex, txIndex and certificateIndex. Used for pointer address derivation.

  • paymentScriptHash - optional string hex string of payment script hash.

  • stakingScriptHash - optional string hex string of staking script hash.

Example

Display byron address of first cardano account:

Display base address of first cardano account:

Display base address with script payment part:

Display base address with script staking part:

Display base address with both payment and staking part being a script:

Display pointer address of first cardano account:

Display pointer script address:

Display enterprise address of first cardano account:

Display enterprise script address:

Display reward address of first cardano account:

Display reward script address:

Return a bundle of cardano addresses without displaying them on device:

Result

Result with only one address

Result with bundle of addresses

Error

Last updated

Was this helpful?