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
Exporting single address
addressParameters- required see description belowprotocolMagic- requiredInteger764824073 for Mainnet, 1 for Preprod Testnet, 2 for Preview TestnetnetworkId- requiredInteger1 for Mainnet, 0 for Testnetaddress- optionalstringaddress for validation (readHandle button requestsection below)showOnOneKey- optionalbooleandetermines if address will be displayed on device. Default is set totruederivationType- optionalCardanoDerivationTypeenum. determines used derivation type. Default is set to ICARUS=1isCheck- optionalbooleanchecks only the base address
Exporting bundle of addresses
bundle-Arrayof Objects with single address fields
Address Parameters
addressType- requiredCardanoAddressType/number- you can use the flowCARDANO.ADDRESS_TYPEobject or typescriptCardanoAddressTypeenum. Supports all address types.path- requiredstring | Array<number>minimum length is5.stakingPath- optionalstring | Array<number>minimum length is5. Used for base and reward address derivationstakingKeyHash- optionalstringhex string of staking key hash. Used for base address derivation (as an alternative tostakingPath)certificatePointer- optional CardanoCertificatePointer object. Must containnumbersblockIndex,txIndexandcertificateIndex. Used for pointer address derivation.paymentScriptHash- optionalstringhex string of payment script hash.stakingScriptHash- optionalstringhex 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?