btcGetAddress
Last updated
Was this helpful?
Last updated
Was this helpful?
Display requested address derived by given BIP32 path on device and returns it to caller. User is asked to confirm the export on OneKey.
path
— required string | Array<number>
minimum length is 3.
showOnOneKey
— optional boolean
determines if address will be displayed on device. Default is set to true
coin
- optional string
determines network definition specified in file. Coin shortcut
, name
or label
can be used. If coin
is not set API will try to get network definition from path
.
multisig
- optional MultisigRedeemScriptType, redeem script information (multisig addresses only)
scriptType
- optional InputScriptType, address script type
bundle
- Array
of Objects with path
, showOnOneKey
, coin
fields
获取不同类型的 BTC 地址需要不同的 Path 参数。
Legacy BIP44
m/44'/0'/x'/x/x
It starts with a "1" and consists of 26 to 35 characters
Nested SegWit BIP49
m/49'/0'/x'/x/x
It starts with a "3" and consists of 26 to 35 characters
Native SegWit BIP84
m/84'/0'/x'/x/x
Start with "bc1" or "tb1" and consist of 41 to 62 characters
Taproot BIP86
m/86'/0'/x'/x/x
It starts with "bc1" and consists of 41 to 62 characters
Display third address of first bitcoin account:
Return a bundle of addresses from first bitcoin account without displaying them on device:
Result with only one address
Result with bundle of addresses
Error