构建交易时,sign transaction返回json中 "derivation_path":表示什么意思?

leekailklk 2月前 176

在构建交易对交易签名后返回json格式结果: { "status": "success", "data": { "transaction": { "raw_transaction": "070100030161015fb82aa08d58e17e39a7cb0e53bcc7ad7c110f243d18cd5ffc58545c1486dfea99ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8099c4d599010001160014df8f9ac0dec37892811a3bdb000c77e8910814de63024039462bf16ee1e64476f02c261283c0304aaf67d6e4de660dda57ff969bd8b623eb84e50b9147d47ef728ee53d86e47c7cf22918866711067c145b8b63e100408201a6c24731c892954e6a4a8c5caf72b0cb9ce2052b7384451798410cbc9d5ebfe0161015f8115189bc31502abadf5e6ed243cf8d8622251ef41a64f08e27c7b55a5de0f55ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8099c4d599010001160014df8f9ac0dec37892811a3bdb000c77e8910814de630240bff44e9692a9ae6e87ae608ae81b90847791147deed2d4bea6e22fdbd04436a923f402f8aafac99f67144c89b3b07260d7b0b72a8cd01333f1f88256586a6c0c201a6c24731c892954e6a4a8c5caf72b0cb9ce2052b7384451798410cbc9d5ebfe0161015f2137a9daa6ca324f017400962ccbe1898e2f1edc3901d7d70532d8a448b69b79ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8099c4d599010001160014df8f9ac0dec37892811a3bdb000c77e8910814de6302403f56ae822b351e28cf736031c9d12598190609c7d0768f4b2e776328ae541de1fa31bcb7ba46e4feb9bbd7d37a2118e156ec63942652ba914f7a3b1140992309201a6c24731c892954e6a4a8c5caf72b0cb9ce2052b7384451798410cbc9d5ebfe01013effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80cbcc80cd0301160014df8f9ac0dec37892811a3bdb000c77e8910814de00", "signing_instructions": [ { "position": 0, "witness_components": [ { "type": "raw_tx_signature", "quorum": 1, "keys": [ { "xpub": "fe9fbe31d82143894788aa78c878f314654234981737b674a5e34d4988445fdec167b0881697d9ed14c7a6c6c496e2a45292f6145ac3d1350d0215a5ef7fb92f", "derivation_path": [ "010100000000000000", "0100000000000000" ] } ], "signatures": [ "39462bf16ee1e64476f02c261283c0304aaf67d6e4de660dda57ff969bd8b623eb84e50b9147d47ef728ee53d86e47c7cf22918866711067c145b8b63e100408" ] }, { "type": "data", "value": "1a6c24731c892954e6a4a8c5caf72b0cb9ce2052b7384451798410cbc9d5ebfe" } ] }, { "position": 1, "witness_components": [ { "type": "raw_tx_signature", "quorum": 1, "keys": [ { "xpub": "fe9fbe31d82143894788aa78c878f314654234981737b674a5e34d4988445fdec167b0881697d9ed14c7a6c6c496e2a45292f6145ac3d1350d0215a5ef7fb92f", "derivation_path": [ "010100000000000000", "0100000000000000" ] } ], "signatures": [ "bff44e9692a9ae6e87ae608ae81b90847791147deed2d4bea6e22fdbd04436a923f402f8aafac99f67144c89b3b07260d7b0b72a8cd01333f1f88256586a6c0c" ] }, { "type": "data", "value": "1a6c24731c892954e6a4a8c5caf72b0cb9ce2052b7384451798410cbc9d5ebfe" } ] }, { "position": 2, "witness_components": [ { "type": "raw_tx_signature", "quorum": 1, "keys": [ { "xpub": "fe9fbe31d82143894788aa78c878f314654234981737b674a5e34d4988445fdec167b0881697d9ed14c7a6c6c496e2a45292f6145ac3d1350d0215a5ef7fb92f", "derivation_path": [ "010100000000000000", "0100000000000000" ] } ], "signatures": [ "3f56ae822b351e28cf736031c9d12598190609c7d0768f4b2e776328ae541de1fa31bcb7ba46e4feb9bbd7d37a2118e156ec63942652ba914f7a3b1140992309" ] }, { "type": "data", "value": "1a6c24731c892954e6a4a8c5caf72b0cb9ce2052b7384451798410cbc9d5ebfe" } ] } ], "allow_additional_actions": false }, "sign_complete": true } } 其中"derivation_path": [ "010100000000000000", "0100000000000000" ]表示什么意思?

最新回复 (3)
全部楼主
  • 子铭 2月前
    0 引用 2

    derivation_path本质上就是创建子主私钥和子主公钥的,比原使用的hd钱包,地址是通过子主公钥生成的

    两个部分的索引号决定了derivation_path,而这个path又决定了hd钱包子主公钥和子主私钥

    子主公钥 决定了hd钱包地址

  • 子铭 2月前
    0 引用 3
    子私钥的产生大致是这样的
    子私钥 = func(私钥, derivation_path)
    子公钥 = func(公钥, derivation_path)
    子公钥 = hash(子私钥)  
  • leekailklk 2月前
    0 引用 4
    你的回答解决了我的疑惑。
    • 比原链BlockChain用户组
      5
        立即登录 立即注册 
返回
发新帖