shaSignData that was passed in your sign callback is what you expect by re-creating the shaSignData using your original input values.replacePublicKeyInDefaultSchedule, sendBitcoin and sendEthereum methods. If the sign callback is not given, the created request will not be signed and will stay in AWAITING_SIGNATURES status, the request can then be signed on the iOS device. See request statuses below.type SignCallback = (signDataBuffer: SignDataBuffer) => Promise<PublicKeySignaturePairBuffer>;
interface SignDataBuffer {
// The DER encoded transaction digest and the wallet path
signData: Buffer;
// The SHA256 digest of the signData
shaSignData: Buffer;
}
interface PublicKeySignaturePairBuffer {
publicKey: Buffer; // 65 bytes - (`04` prefixed publicKey)
signature: Buffer; // 64 bytes - (r + s ~ 32 bytes + 32 bytes)
}AwsKmsKeyStore, shows how you can ensure that the correct key from the correct curve is used for signing. It has a method sign which is an implementation of the signCallback.AwsKmsKeyStore implementation can be found heretrustVaultProvenanceSignature) of the signed PublicKey from the TrustVault API which will be checked against the TrustVault Master Public Key to ensure validity and will then generate the address on the client to ensure the address given (verifiedAddress) is correct.{
"subWalletId": "c7e828ed-77a3-4907-b129-651c2377a929/ETH/1",
"receiveAddressDetails": {
"path": [
"0x8000002c",
"0x8000003c",
"0x80000001",
"0x0",
"0x0"
],
"publicKey": "0474567eac06c8b185483f8692ff6093793479449a886556febe9883ef350c4715051b0a6984b0bad4b8a2d9c538fe424db66b76e2f198a405d39007ed97313c6e",
"trustVaultProvenanceSignature": "00f61212deadc84f10f68bc1454a3bc297df09309fa0fcedaaceb2685e2bbfa2131db56585c739e94df30144854291cc44d77db64963c6a2f1f81a5835364227",
"verifiedAddress": "0x07EC8dead12323EF3DF095Ff1a10D88E0d17cA35"
}
}subWalletId.{
"address": "0x829bd824b016326a401d083b33d092293333a830",
"name": "Test",
"subWalletId": "3623d274-337e-4cf6-b496-37a4b638f3c1/ETH/0",
"createdAt": "2020-04-01T15:43:45.000Z",
"updatedAt": "2020-04-01T15:43:45.000Z",
"chain": "ETHEREUM",
"publicKey": "04b2536695a94f0ce089471e8b98da134ed6eac1c10b07d5b57d90b26936aafe33ef137225a935f953ef99ab3a4cd0c7b4e881bef9deb4bb187b7da4c37b715e58",
"trustVaultPublicKeySignature": "df7fe7e1b3e2a40abf2dd0116714eeb0386cc6be4fad3df2e58464105f8af2f18e998cefe6894bea617ddf7cdc370a218ddeaf3b3c3308af22baf9e655391358",
"__typename": "BlockchainSubWallet",
"walletId": "3623d274-337e-4cf6-b496-37a4b638f3c1"
}options object to request balances of the sub-wallet. This will be slightly slower as it will retrieve balances of all assetssign callback function as the last parameter to sendRipple(...) above will verify and sign the transaction as well.Schedules. Each Schedule is "OR"'d by TrustVault. Inside each Schedule is an array of Clauses. Each Clause is "AND"'d. Each Clause defines a quorum which is the minimum number of keys that must sign for the Clause to be satisfied.Schedule which has 2 Clauses. Since Clauses are "AND"'d, BOTH must be satisfied.1 of 2 AND 1 of 1.
Clause has signed AND the 1 key of the second Clause has signed, this policy is satisfied.Sign callback to this method to immediately sign the request. Alternatively, you can wait for the webhook (POLICY_CHANGE_REQUEST_CREATED) to be received by your API and then sign the item from there. See below for signing the webhook request.{
"requestId": "12b40615-ab28-5917-d576-5e05ab5d2944",
"type": "BTC_TRANSACTION",
"status": "SUBMITTED",
"transactionHash": "cc7fca4c8e6061427fbccc7c64670fd239ee3f943725d9896059e56b6d7d10db"
}true| Request Status | Description |
|---|---|
| AWAITING_SIGNATURES | the request is still awaiting signatures enough signature before it can be processed |
| SIGNED | the request has received enough signatures to be processed |
| SUBMITTED | the transaction request has been processed and submitted to the network |
| CONFIRMED | the transaction request has been confirmed by the network (1+ confirmation) |
| PROCESSED | the request has been successfully processed |
| USER_CANCELLED | the request has been cancelled by the user |
| ERROR | an error occurred when processing the request |