/api/v2/{coin}/wallet/{walletId}/signtx
Sign transactions for multisignature wallets using external-signing mode. You must maintain your keys, in the clear, on a separate Express server. BitGo doesn't decrypt your private keys.
coin
stringRequiredbtc
walletId
stringRequired59cd72485007a239fb00282ed480da1f
^[0-9a-f]{32}$
keychain
object encryptedPrv
string prv
string xprv9s21ZrQH143K3xQwj4yx3fHjDieEdqFDweBvFxn28qGvfQGvweUWuUuDRpepDu6opq3jiWHU9h3yYTKk5vvu4ykRuGA4i4Kz1vmFMPLTsoC
txPrebuild
object wallet
string 59cd72485007a239fb00282ed480da1f
^[0-9a-f]{32}$
txHex
string txBase64
string txInfo
One offeeInfo
One ofcoldDerivationSeed
string walletPassphrase
string recipients
array[object] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
let params = { txPrebuild: { txHex: '010000000179b0b5ad6641de8fed13270395e52515236c922d1dd5bee3a9dae68c3cbbf57d0100000000ffffffff0240420f000000000017a914f600974688ccdf5e72ce3f2b187afabbf4f1d3ec878e7835000000000017a9140c0a513cb9d8e46113c57aa46ae42d1bad29063d8700000000', txInfo: { nP2SHInputs: 1, nSegwitInputs: 0, nOutputs: 2, unspents: [ { chain: 1, index: 10, redeemScript: '52210208906f13de98b88bc9f83886c39a1555ada816b12de6f029626af2ef9413708b2102bca01320026604530fc47068ce015b39b91bd72d8964b0c5023697645b1441ab210336d8e968990c8a5b2bad83a237c37957ce70586ed507b155941ea28ec953860153ae', id: '7df5bb3c8ce6daa9e3bed51d2d926c231525e595032713ed8fde4166adb5b079:1', address: '2MvevrYxML8NkRng4avXz7oMCgs5qxR7Mef', value: 4508000, }, ], changeAddresses: ['2MtLtTSsC98dF4zriFGvCfmce3A17Zz1McK'], }, feeInfo: { size: 373, fee: 3730, feeRate: 10000, payGoFee: 0, payGoFeeString: '0', }, }, prv: 'xprvmysecretprivatekey', }; wallet.signTransaction(params).then(function (transaction) { // print half-signed transaction hex console.dir(transaction); });
txInfo
One oftxHex
string 01000000000101d58f82d996dd872012675adadf4606734906b25a413f6e2ee535c0c10aef96020000000000ffffffff028de888000000000017a914c91aa24f65827eecec775037d886f2952b73cbe48740420f000000000017a9149304d18497b9bfe9532778a0f06d9fff3b3befaf870500473044022023d7210ba6d8bbd7a28b8af226f40f7235caab79156f93f9c9969fc459ea7f73022050fbdca788fba3de686b66b3501853695ff9d6f375867470207d233b099576e001000069522103d4788cda52f91c1f6c82eb91491ca76108c9c5f0839bc4f02eccc55fedb3311c210391bcef9dcc89570a79ba3c7514e65cd48e766a8868eca2769fa9242fdcc796662102ef3c5ebac4b54df70dea1bb2655126368be10ca0462382fcb730e55cddd2dd6a53aec8b11400
error
string required requestId
string required context
object name
string required