/api/v2/{coin}/signtx
This route is for users who would like to maintain their own keys, or otherwise would not like BitGo to decrypt their key, and instead provide it in the clear themselves
coin
stringRequiredbtc
prv
string xprv9s21ZrQH143K3xQwj4yx3fHjDieEdqFDweBvFxn28qGvfQGvweUWuUuDRpepDu6opq3jiWHU9h3yYTKk5vvu4ykRuGA4i4Kz1vmFMPLTsoC
txPrebuild
object wallet
string 59cd72485007a239fb00282ed480da1f
^[0-9a-f]{32}$
txHex
string txBase64
string txInfo
One offeeInfo
object isLastSignature
boolean pubs
array[string] ["string","string","string"]
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
// Before signing we need to get a half-built transaction const buildParams = { recipients: [{ amount: 0.01 * 1e8, address: '2NFfxvXpAWjKng7enFougtvtxxCJ2hQEMo4' }] }; bitgo .coin('tbtc4') .wallets() .get({ id: '5a9d9f8e1223833c4df673a07cf8bc5f' }) .then(function (wallet) { wallet.prebuildTransaction(buildParams, function (err, result) { bitgo .coin('tbtc4') .signTransaction({ txPrebuild: result, prv: '<your xrpv>', pubs: ['<user xpub>', '<backup xpub>', '<bitgo xpub>'] }) .then(function (transaction) { // print half-signed transaction hex console.dir(transaction); }); }); });
txInfo
One oftxHex
string 01000000000101d58f82d996dd872012675adadf4606734906b25a413f6e2ee535c0c10aef96020000000000ffffffff028de888000000000017a914c91aa24f65827eecec775037d886f2952b73cbe48740420f000000000017a9149304d18497b9bfe9532778a0f06d9fff3b3befaf870500473044022023d7210ba6d8bbd7a28b8af226f40f7235caab79156f93f9c9969fc459ea7f73022050fbdca788fba3de686b66b3501853695ff9d6f375867470207d233b099576e001000069522103d4788cda52f91c1f6c82eb91491ca76108c9c5f0839bc4f02eccc55fedb3311c210391bcef9dcc89570a79ba3c7514e65cd48e766a8868eca2769fa9242fdcc796662102ef3c5ebac4b54df70dea1bb2655126368be10ca0462382fcb730e55cddd2dd6a53aec8b11400