Changeset View
Changeset View
Standalone View
Standalone View
cashtab/src/transactions/fixtures/mocks.js
// Copyright (c) 2023-2024 The Bitcoin developers | // Copyright (c) 2024 The Bitcoin developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
import { cashtabWalletToJSON, cashtabWalletFromJSON } from 'helpers'; | |||||
const wallet = { | const wallet = { | ||||
mnemonic: | mnemonic: | ||||
'beauty shoe decline spend still weird slot snack coach flee between paper', | 'beauty shoe decline spend still weird slot snack coach flee between paper', | ||||
name: 'Transaction Fixtures', | name: 'Transaction Fixtures', | ||||
paths: [ | paths: new Map([ | ||||
[ | |||||
1899, | |||||
{ | { | ||||
path: 1899, | |||||
hash: '3a5fb236934ec078b4507c303d3afd82067f8fc1', | hash: '3a5fb236934ec078b4507c303d3afd82067f8fc1', | ||||
address: 'ecash:qqa9lv3kjd8vq7952p7rq0f6lkpqvlu0cydvxtd70g', | address: 'ecash:qqa9lv3kjd8vq7952p7rq0f6lkpqvlu0cydvxtd70g', | ||||
wif: 'KywWPgaLDwvW1tWUtUvs13jgqaaWMoNANLVYoKcK9Ddbpnch7Cmw', | wif: 'KywWPgaLDwvW1tWUtUvs13jgqaaWMoNANLVYoKcK9Ddbpnch7Cmw', | ||||
}, | }, | ||||
], | |||||
[ | |||||
145, | |||||
{ | { | ||||
path: 145, | |||||
hash: 'a28f8852f868f88e71ec666c632d6f86e978f046', | hash: 'a28f8852f868f88e71ec666c632d6f86e978f046', | ||||
address: 'ecash:qz3glzzjlp503rn3a3nxccedd7rwj78sgczljhvzv3', | address: 'ecash:qz3glzzjlp503rn3a3nxccedd7rwj78sgczljhvzv3', | ||||
wif: 'L2HnC8ZT5JuwVFjrAjJUBs2tmmBoxdVa1MVCJccqV8S9YPoR1NuZ', | wif: 'L2HnC8ZT5JuwVFjrAjJUBs2tmmBoxdVa1MVCJccqV8S9YPoR1NuZ', | ||||
}, | }, | ||||
], | |||||
[ | |||||
245, | |||||
{ | { | ||||
path: 245, | |||||
hash: '600efb12a6f813eccf13171a8bc62055212d8d6c', | hash: '600efb12a6f813eccf13171a8bc62055212d8d6c', | ||||
address: 'ecash:qpsqa7cj5mup8mx0zvt34z7xyp2jztvdds67wajntk', | address: 'ecash:qpsqa7cj5mup8mx0zvt34z7xyp2jztvdds67wajntk', | ||||
wif: 'L3ndnMkn4574McqhPujguusu48NrmeLUgWYMkRpYQGLXDGAwGmPq', | wif: 'L3ndnMkn4574McqhPujguusu48NrmeLUgWYMkRpYQGLXDGAwGmPq', | ||||
}, | }, | ||||
], | ], | ||||
]), | |||||
state: { | state: { | ||||
balanceSats: 135000, | balanceSats: 135000, | ||||
slpUtxos: [], | slpUtxos: [], | ||||
nonSlpUtxos: [ | nonSlpUtxos: [ | ||||
{ | { | ||||
outpoint: { | outpoint: { | ||||
txid: '6854f1eeed12293926e0223e0b59f9b3db3650fe486680ca7d705a0c990b1dc3', | txid: '6854f1eeed12293926e0223e0b59f9b3db3650fe486680ca7d705a0c990b1dc3', | ||||
outIdx: 0, | outIdx: 0, | ||||
}, | }, | ||||
blockHeight: -1, | blockHeight: -1, | ||||
isCoinbase: false, | isCoinbase: false, | ||||
value: '25000', | value: '25000', | ||||
network: 'XEC', | network: 'XEC', | ||||
address: 'ecash:qqa9lv3kjd8vq7952p7rq0f6lkpqvlu0cydvxtd70g', | path: 1899, | ||||
}, | }, | ||||
{ | { | ||||
outpoint: { | outpoint: { | ||||
txid: '901406ff35293a6a75388ae48cf672010e3d06e56f2d030aff29ad359425fb09', | txid: '901406ff35293a6a75388ae48cf672010e3d06e56f2d030aff29ad359425fb09', | ||||
outIdx: 0, | outIdx: 0, | ||||
}, | }, | ||||
blockHeight: -1, | blockHeight: -1, | ||||
isCoinbase: false, | isCoinbase: false, | ||||
value: '100000', | value: '100000', | ||||
network: 'XEC', | network: 'XEC', | ||||
address: 'ecash:qqa9lv3kjd8vq7952p7rq0f6lkpqvlu0cydvxtd70g', | path: 1899, | ||||
}, | }, | ||||
{ | { | ||||
outpoint: { | outpoint: { | ||||
txid: 'bc202cce79a686c8c846fad372677a07fa7821980aab95a1fb6bcf86f53f3450', | txid: 'bc202cce79a686c8c846fad372677a07fa7821980aab95a1fb6bcf86f53f3450', | ||||
outIdx: 0, | outIdx: 0, | ||||
}, | }, | ||||
blockHeight: -1, | blockHeight: -1, | ||||
isCoinbase: false, | isCoinbase: false, | ||||
value: '10000', | value: '10000', | ||||
network: 'XEC', | network: 'XEC', | ||||
address: 'ecash:qqa9lv3kjd8vq7952p7rq0f6lkpqvlu0cydvxtd70g', | path: 1899, | ||||
}, | }, | ||||
], | ], | ||||
tokens: [], | tokens: new Map(), | ||||
parsedTxHistory: [ | parsedTxHistory: [ | ||||
{ | { | ||||
txid: '6854f1eeed12293926e0223e0b59f9b3db3650fe486680ca7d705a0c990b1dc3', | txid: '6854f1eeed12293926e0223e0b59f9b3db3650fe486680ca7d705a0c990b1dc3', | ||||
version: 2, | version: 2, | ||||
inputs: [ | inputs: [ | ||||
{ | { | ||||
prevOut: { | prevOut: { | ||||
txid: 'fcf45f6f12a4442bf206f85c87dfb7cfccdf438927fabbfe314a2c780545dcf9', | txid: 'fcf45f6f12a4442bf206f85c87dfb7cfccdf438927fabbfe314a2c780545dcf9', | ||||
▲ Show 20 Lines • Show All 224 Lines • ▼ Show 20 Lines | state: { | ||||
], | ], | ||||
}, | }, | ||||
}; | }; | ||||
const walletWithCoinbaseUtxos = { | const walletWithCoinbaseUtxos = { | ||||
mnemonic: | mnemonic: | ||||
'beauty shoe decline spend still weird slot snack coach flee between paper', | 'beauty shoe decline spend still weird slot snack coach flee between paper', | ||||
name: 'Transaction Fixtures', | name: 'Transaction Fixtures', | ||||
paths: [ | paths: new Map([ | ||||
[ | |||||
1899, | |||||
{ | { | ||||
path: 1899, | |||||
hash: '3a5fb236934ec078b4507c303d3afd82067f8fc1', | hash: '3a5fb236934ec078b4507c303d3afd82067f8fc1', | ||||
address: 'ecash:qqa9lv3kjd8vq7952p7rq0f6lkpqvlu0cydvxtd70g', | address: 'ecash:qqa9lv3kjd8vq7952p7rq0f6lkpqvlu0cydvxtd70g', | ||||
wif: 'KywWPgaLDwvW1tWUtUvs13jgqaaWMoNANLVYoKcK9Ddbpnch7Cmw', | wif: 'KywWPgaLDwvW1tWUtUvs13jgqaaWMoNANLVYoKcK9Ddbpnch7Cmw', | ||||
}, | }, | ||||
], | |||||
[ | |||||
145, | |||||
{ | { | ||||
path: 145, | |||||
hash: 'a28f8852f868f88e71ec666c632d6f86e978f046', | hash: 'a28f8852f868f88e71ec666c632d6f86e978f046', | ||||
address: 'ecash:qz3glzzjlp503rn3a3nxccedd7rwj78sgczljhvzv3', | address: 'ecash:qz3glzzjlp503rn3a3nxccedd7rwj78sgczljhvzv3', | ||||
wif: 'L2HnC8ZT5JuwVFjrAjJUBs2tmmBoxdVa1MVCJccqV8S9YPoR1NuZ', | wif: 'L2HnC8ZT5JuwVFjrAjJUBs2tmmBoxdVa1MVCJccqV8S9YPoR1NuZ', | ||||
}, | }, | ||||
], | |||||
[ | |||||
245, | |||||
{ | { | ||||
path: 245, | |||||
hash: '600efb12a6f813eccf13171a8bc62055212d8d6c', | hash: '600efb12a6f813eccf13171a8bc62055212d8d6c', | ||||
address: 'ecash:qpsqa7cj5mup8mx0zvt34z7xyp2jztvdds67wajntk', | address: 'ecash:qpsqa7cj5mup8mx0zvt34z7xyp2jztvdds67wajntk', | ||||
wif: 'L3ndnMkn4574McqhPujguusu48NrmeLUgWYMkRpYQGLXDGAwGmPq', | wif: 'L3ndnMkn4574McqhPujguusu48NrmeLUgWYMkRpYQGLXDGAwGmPq', | ||||
}, | }, | ||||
], | ], | ||||
]), | |||||
state: { | state: { | ||||
balanceSats: 135000, | balanceSats: 135000, | ||||
slpUtxos: [], | slpUtxos: [], | ||||
nonSlpUtxos: [ | nonSlpUtxos: [ | ||||
{ | { | ||||
outpoint: { | outpoint: { | ||||
txid: '6854f1eeed12293926e0223e0b59f9b3db3650fe486680ca7d705a0c990b1dc3', | txid: '6854f1eeed12293926e0223e0b59f9b3db3650fe486680ca7d705a0c990b1dc3', | ||||
outIdx: 0, | outIdx: 0, | ||||
}, | }, | ||||
blockHeight: 800000, | blockHeight: 800000, | ||||
isCoinbase: true, | isCoinbase: true, | ||||
value: '25000', | value: '25000', | ||||
network: 'XEC', | network: 'XEC', | ||||
address: 'ecash:qqa9lv3kjd8vq7952p7rq0f6lkpqvlu0cydvxtd70g', | path: 1899, | ||||
}, | }, | ||||
{ | { | ||||
outpoint: { | outpoint: { | ||||
txid: '901406ff35293a6a75388ae48cf672010e3d06e56f2d030aff29ad359425fb09', | txid: '901406ff35293a6a75388ae48cf672010e3d06e56f2d030aff29ad359425fb09', | ||||
outIdx: 0, | outIdx: 0, | ||||
}, | }, | ||||
blockHeight: 800000, | blockHeight: 800000, | ||||
isCoinbase: true, | isCoinbase: true, | ||||
value: '100000', | value: '100000', | ||||
network: 'XEC', | network: 'XEC', | ||||
address: 'ecash:qqa9lv3kjd8vq7952p7rq0f6lkpqvlu0cydvxtd70g', | path: 1899, | ||||
}, | }, | ||||
{ | { | ||||
outpoint: { | outpoint: { | ||||
txid: 'bc202cce79a686c8c846fad372677a07fa7821980aab95a1fb6bcf86f53f3450', | txid: 'bc202cce79a686c8c846fad372677a07fa7821980aab95a1fb6bcf86f53f3450', | ||||
outIdx: 0, | outIdx: 0, | ||||
}, | }, | ||||
blockHeight: 800000, | blockHeight: 800000, | ||||
isCoinbase: true, | isCoinbase: true, | ||||
value: '10000', | value: '10000', | ||||
network: 'XEC', | network: 'XEC', | ||||
address: 'ecash:qqa9lv3kjd8vq7952p7rq0f6lkpqvlu0cydvxtd70g', | path: 1899, | ||||
}, | }, | ||||
], | ], | ||||
tokens: [], | tokens: new Map([]), | ||||
parsedTxHistory: [ | parsedTxHistory: [ | ||||
{ | { | ||||
txid: '6854f1eeed12293926e0223e0b59f9b3db3650fe486680ca7d705a0c990b1dc3', | txid: '6854f1eeed12293926e0223e0b59f9b3db3650fe486680ca7d705a0c990b1dc3', | ||||
version: 2, | version: 2, | ||||
inputs: [ | inputs: [ | ||||
{ | { | ||||
prevOut: { | prevOut: { | ||||
txid: 'fcf45f6f12a4442bf206f85c87dfb7cfccdf438927fabbfe314a2c780545dcf9', | txid: 'fcf45f6f12a4442bf206f85c87dfb7cfccdf438927fabbfe314a2c780545dcf9', | ||||
▲ Show 20 Lines • Show All 221 Lines • ▼ Show 20 Lines | state: { | ||||
aliasFlag: false, | aliasFlag: false, | ||||
}, | }, | ||||
}, | }, | ||||
], | ], | ||||
}, | }, | ||||
}; | }; | ||||
// Create a wallet with utxos at multiple addresses | // Create a wallet with utxos at multiple addresses | ||||
const utxosAtManyAddressesWallet = JSON.parse(JSON.stringify(wallet)); | const utxosAtManyAddressesWallet = cashtabWalletFromJSON( | ||||
JSON.parse(JSON.stringify(cashtabWalletToJSON(wallet))), | |||||
); | |||||
const multiAddressUtxos = [ | const multiAddressUtxos = [ | ||||
{ | { | ||||
outpoint: { | outpoint: { | ||||
txid: '6854f1eeed12293926e0223e0b59f9b3db3650fe486680ca7d705a0c990b1dc3', | txid: '6854f1eeed12293926e0223e0b59f9b3db3650fe486680ca7d705a0c990b1dc3', | ||||
outIdx: 0, | outIdx: 0, | ||||
}, | }, | ||||
blockHeight: -1, | blockHeight: -1, | ||||
isCoinbase: false, | isCoinbase: false, | ||||
value: '25000', | value: '25000', | ||||
network: 'XEC', | network: 'XEC', | ||||
address: wallet.paths.find(pathInfo => pathInfo.path === 145).address, | path: 145, | ||||
}, | }, | ||||
{ | { | ||||
outpoint: { | outpoint: { | ||||
txid: '901406ff35293a6a75388ae48cf672010e3d06e56f2d030aff29ad359425fb09', | txid: '901406ff35293a6a75388ae48cf672010e3d06e56f2d030aff29ad359425fb09', | ||||
outIdx: 0, | outIdx: 0, | ||||
}, | }, | ||||
blockHeight: -1, | blockHeight: -1, | ||||
isCoinbase: false, | isCoinbase: false, | ||||
value: '100000', | value: '100000', | ||||
network: 'XEC', | network: 'XEC', | ||||
address: wallet.paths.find(pathInfo => pathInfo.path === 245).address, | path: 245, | ||||
}, | }, | ||||
{ | { | ||||
outpoint: { | outpoint: { | ||||
txid: 'bc202cce79a686c8c846fad372677a07fa7821980aab95a1fb6bcf86f53f3450', | txid: 'bc202cce79a686c8c846fad372677a07fa7821980aab95a1fb6bcf86f53f3450', | ||||
outIdx: 0, | outIdx: 0, | ||||
}, | }, | ||||
blockHeight: -1, | blockHeight: -1, | ||||
isCoinbase: false, | isCoinbase: false, | ||||
value: '10000', | value: '10000', | ||||
network: 'XEC', | network: 'XEC', | ||||
address: wallet.paths.find(pathInfo => pathInfo.path === 1899).address, | path: 1899, | ||||
}, | }, | ||||
]; | ]; | ||||
utxosAtManyAddressesWallet.state.nonSlpUtxos = multiAddressUtxos; | utxosAtManyAddressesWallet.state.nonSlpUtxos = multiAddressUtxos; | ||||
// Create a wallet that has a corrupted private key | // Create a wallet that has a corrupted private key | ||||
// Not expected to ever happen in Cashtab | // Not expected to ever happen in Cashtab | ||||
const walletWithInvalidPrivateKey = JSON.parse(JSON.stringify(wallet)); | // cashtabWalletToJSON | ||||
// Take a portion of a valid wif to keep base58 chars | const walletWithInvalidPrivateKey = cashtabWalletFromJSON( | ||||
const badWifPath1899Info = walletWithInvalidPrivateKey.paths.find( | JSON.parse(JSON.stringify(cashtabWalletToJSON(wallet))), | ||||
pathInfo => pathInfo.path === 1899, | |||||
); | ); | ||||
// Take a portion of a valid wif to keep base58 chars | |||||
const badWifPath1899Info = walletWithInvalidPrivateKey.paths.get(1899); | |||||
badWifPath1899Info.wif = badWifPath1899Info.wif.slice(0, 20); | badWifPath1899Info.wif = badWifPath1899Info.wif.slice(0, 20); | ||||
// Create a wallet with very large utxos | // Create a wallet with very large utxos | ||||
const TOTAL_ECASH_SUPPLY_SATS = 2100000000000000; | const TOTAL_ECASH_SUPPLY_SATS = 2100000000000000; | ||||
const allTheXecWallet = JSON.parse(JSON.stringify(wallet)); | const allTheXecWallet = cashtabWalletFromJSON( | ||||
JSON.parse(JSON.stringify(cashtabWalletToJSON(wallet))), | |||||
); | |||||
const largeUtxo = { | const largeUtxo = { | ||||
outpoint: { | outpoint: { | ||||
txid: '6854f1eeed12293926e0223e0b59f9b3db3650fe486680ca7d705a0c990b1dc3', | txid: '6854f1eeed12293926e0223e0b59f9b3db3650fe486680ca7d705a0c990b1dc3', | ||||
outIdx: 0, | outIdx: 0, | ||||
}, | }, | ||||
blockHeight: -1, | blockHeight: -1, | ||||
isCoinbase: false, | isCoinbase: false, | ||||
value: TOTAL_ECASH_SUPPLY_SATS, | value: TOTAL_ECASH_SUPPLY_SATS, | ||||
network: 'XEC', | network: 'XEC', | ||||
address: 'ecash:qqa9lv3kjd8vq7952p7rq0f6lkpqvlu0cydvxtd70g', | path: 1899, | ||||
}; | }; | ||||
allTheXecWallet.state.nonSlpUtxos = [largeUtxo]; | allTheXecWallet.state.nonSlpUtxos = [largeUtxo]; | ||||
allTheXecWallet.state.balanceSats = largeUtxo.value; | allTheXecWallet.state.balanceSats = largeUtxo.value; | ||||
const walletWithTokensInNode = { | const walletWithTokensInNode = { | ||||
mnemonic: | mnemonic: | ||||
'industry limit sense cruel neglect loud chase usual advance method talk come', | 'industry limit sense cruel neglect loud chase usual advance method talk come', | ||||
name: 'SLP V1 Send', | name: 'SLP V1 Send', | ||||
paths: [ | paths: new Map([ | ||||
[ | |||||
1899, | |||||
{ | { | ||||
path: 1899, | |||||
hash: 'c38232a045a85c84e5733d60e867dcee9ad4b18d', | hash: 'c38232a045a85c84e5733d60e867dcee9ad4b18d', | ||||
address: 'ecash:qrpcyv4qgk59ep89wv7kp6r8mnhf449335wt7lud8u', | address: 'ecash:qrpcyv4qgk59ep89wv7kp6r8mnhf449335wt7lud8u', | ||||
wif: 'KyEQdr8GzqtwzHHB8kiaWLiUCWYGgz76t7gF2z9aSjWnsVikJZUX', | wif: 'KyEQdr8GzqtwzHHB8kiaWLiUCWYGgz76t7gF2z9aSjWnsVikJZUX', | ||||
}, | }, | ||||
], | |||||
[ | |||||
245, | |||||
{ | { | ||||
path: 245, | |||||
hash: '3d97ee01c3d021c3efcf529c3136f7b8b86c1ed0', | hash: '3d97ee01c3d021c3efcf529c3136f7b8b86c1ed0', | ||||
address: 'ecash:qq7e0mspc0gzrsl0eaffcvfk77utsmq76qnat0vlkj', | address: 'ecash:qq7e0mspc0gzrsl0eaffcvfk77utsmq76qnat0vlkj', | ||||
wif: 'L4GFvCRSz8fbS64W7teTjnGbV5A8iPdz1GyPqHvAj8vxzqZjwZbw', | wif: 'L4GFvCRSz8fbS64W7teTjnGbV5A8iPdz1GyPqHvAj8vxzqZjwZbw', | ||||
}, | }, | ||||
], | |||||
[ | |||||
145, | |||||
{ | { | ||||
path: 145, | |||||
hash: '33a070d3931a4993207771ae1aa92aa05491e8b2', | hash: '33a070d3931a4993207771ae1aa92aa05491e8b2', | ||||
address: 'ecash:qqe6quxnjvdynyeqwac6ux4f92s9fy0gkg6ek2jtfh', | address: 'ecash:qqe6quxnjvdynyeqwac6ux4f92s9fy0gkg6ek2jtfh', | ||||
wif: 'L5GHzdq3qfTmUKLxZ3fuvfu9yvgsQH3wWcXU2BfD3qp88RTXF88M', | wif: 'L5GHzdq3qfTmUKLxZ3fuvfu9yvgsQH3wWcXU2BfD3qp88RTXF88M', | ||||
}, | }, | ||||
], | ], | ||||
]), | |||||
state: { | state: { | ||||
balanceSats: 1000000, | balanceSats: 1000000, | ||||
slpUtxos: [ | slpUtxos: [ | ||||
{ | { | ||||
outpoint: { | outpoint: { | ||||
txid: '4fa08436ac4611ee2523eede281c4c8d7c1d1a9367661e1754775d8b7ae2b199', | txid: '4fa08436ac4611ee2523eede281c4c8d7c1d1a9367661e1754775d8b7ae2b199', | ||||
outIdx: 1, | outIdx: 1, | ||||
}, | }, | ||||
value: '546', | value: 546, | ||||
token: { | token: { | ||||
tokenId: | tokenId: | ||||
'b19b4c83056f6e3dace0e786446a8ccd73f22cfc42c3013808c532ab43490a14', | 'b19b4c83056f6e3dace0e786446a8ccd73f22cfc42c3013808c532ab43490a14', | ||||
amount: '1000000000', | amount: '1000000000', | ||||
isMintBaton: false, | isMintBaton: false, | ||||
}, | }, | ||||
// Note: the address is not provided by NNG or in-node, and is added by Cashtab | path: 1899, | ||||
address: 'ecash:qrpcyv4qgk59ep89wv7kp6r8mnhf449335wt7lud8u', | |||||
}, | }, | ||||
{ | { | ||||
outpoint: { | outpoint: { | ||||
txid: '51bc5da566c85b486b37f1c4d3c0220b7bc11ad992c1b92f99233cf35a8794c1', | txid: '51bc5da566c85b486b37f1c4d3c0220b7bc11ad992c1b92f99233cf35a8794c1', | ||||
outIdx: 1, | outIdx: 1, | ||||
}, | }, | ||||
value: '546', | value: 546, | ||||
token: { | token: { | ||||
tokenId: | tokenId: | ||||
'b19b4c83056f6e3dace0e786446a8ccd73f22cfc42c3013808c532ab43490a14', | 'b19b4c83056f6e3dace0e786446a8ccd73f22cfc42c3013808c532ab43490a14', | ||||
amount: '9999996998999999999', | amount: '9999996998999999999', | ||||
isMintBaton: false, | isMintBaton: false, | ||||
}, | }, | ||||
address: 'ecash:qrpcyv4qgk59ep89wv7kp6r8mnhf449335wt7lud8u', | path: 1899, | ||||
}, | }, | ||||
{ | { | ||||
outpoint: { | outpoint: { | ||||
txid: '56cc72b07a374990d767a569120308812d0da4ef0c0d669a1966a648e759669a', | txid: '56cc72b07a374990d767a569120308812d0da4ef0c0d669a1966a648e759669a', | ||||
outIdx: 1, | outIdx: 1, | ||||
}, | }, | ||||
value: '546', | value: 546, | ||||
token: { | token: { | ||||
tokenId: | tokenId: | ||||
'b19b4c83056f6e3dace0e786446a8ccd73f22cfc42c3013808c532ab43490a14', | 'b19b4c83056f6e3dace0e786446a8ccd73f22cfc42c3013808c532ab43490a14', | ||||
amount: '1000000000000', | amount: '1000000000000', | ||||
isMintBaton: false, | isMintBaton: false, | ||||
}, | }, | ||||
address: 'ecash:qrpcyv4qgk59ep89wv7kp6r8mnhf449335wt7lud8u', | path: 1899, | ||||
}, | }, | ||||
{ | { | ||||
outpoint: { | outpoint: { | ||||
txid: 'c294d534331256c1f00016fb487f0079b926ab69bd8339350e4c356a1e17dc0d', | txid: 'c294d534331256c1f00016fb487f0079b926ab69bd8339350e4c356a1e17dc0d', | ||||
outIdx: 1, | outIdx: 1, | ||||
}, | }, | ||||
value: '546', | value: 546, | ||||
token: { | token: { | ||||
tokenId: | tokenId: | ||||
'b19b4c83056f6e3dace0e786446a8ccd73f22cfc42c3013808c532ab43490a14', | 'b19b4c83056f6e3dace0e786446a8ccd73f22cfc42c3013808c532ab43490a14', | ||||
amount: '1', | amount: '1', | ||||
isMintBaton: false, | isMintBaton: false, | ||||
}, | }, | ||||
address: 'ecash:qrpcyv4qgk59ep89wv7kp6r8mnhf449335wt7lud8u', | path: 1899, | ||||
}, | }, | ||||
{ | { | ||||
outpoint: { | outpoint: { | ||||
txid: 'd8c694714c2d39a22b8d867530f37e796937ac4b9bc7c9528926649788d15f43', | txid: 'd8c694714c2d39a22b8d867530f37e796937ac4b9bc7c9528926649788d15f43', | ||||
outIdx: 1, | outIdx: 1, | ||||
}, | }, | ||||
value: '546', | value: 546, | ||||
token: { | token: { | ||||
tokenId: | tokenId: | ||||
'b19b4c83056f6e3dace0e786446a8ccd73f22cfc42c3013808c532ab43490a14', | 'b19b4c83056f6e3dace0e786446a8ccd73f22cfc42c3013808c532ab43490a14', | ||||
amount: '2000000000000', | amount: '2000000000000', | ||||
isMintBaton: false, | isMintBaton: false, | ||||
}, | }, | ||||
address: 'ecash:qrpcyv4qgk59ep89wv7kp6r8mnhf449335wt7lud8u', | path: 1899, | ||||
}, | }, | ||||
], | ], | ||||
nonSlpUtxos: [ | nonSlpUtxos: [ | ||||
{ | { | ||||
outpoint: { | outpoint: { | ||||
txid: 'a8652388d3a5d1fcaec435a89f1af19afa32b479815b0e4292eec0db9c1a454b', | txid: 'a8652388d3a5d1fcaec435a89f1af19afa32b479815b0e4292eec0db9c1a454b', | ||||
outIdx: 0, | outIdx: 0, | ||||
}, | }, | ||||
blockHeight: -1, | blockHeight: -1, | ||||
isCoinbase: false, | isCoinbase: false, | ||||
value: '1000000', | value: '1000000', | ||||
network: 'XEC', | network: 'XEC', | ||||
address: 'ecash:qrpcyv4qgk59ep89wv7kp6r8mnhf449335wt7lud8u', | path: 1899, | ||||
}, | }, | ||||
], | ], | ||||
tokens: [ | tokens: new Map([ | ||||
{ | [ | ||||
tokenId: | |||||
'b19b4c83056f6e3dace0e786446a8ccd73f22cfc42c3013808c532ab43490a14', | |||||
balance: '10000000000', | |||||
info: { | |||||
tokenTicker: 'GYP', | |||||
tokenName: 'Gypsum', | |||||
tokenDocumentUrl: 'https://cashtab.com/', | |||||
tokenDocumentHash: '', | |||||
decimals: 9, | |||||
tokenId: | |||||
'b19b4c83056f6e3dace0e786446a8ccd73f22cfc42c3013808c532ab43490a14', | 'b19b4c83056f6e3dace0e786446a8ccd73f22cfc42c3013808c532ab43490a14', | ||||
success: true, | '10000000000', | ||||
}, | |||||
}, | |||||
], | ], | ||||
]), | |||||
parsedTxHistory: [], | parsedTxHistory: [], | ||||
}, | }, | ||||
}; | }; | ||||
module.exports = { | module.exports = { | ||||
wallet, | wallet, | ||||
walletWithCoinbaseUtxos, | walletWithCoinbaseUtxos, | ||||
utxosAtManyAddressesWallet, | utxosAtManyAddressesWallet, | ||||
walletWithInvalidPrivateKey, | walletWithInvalidPrivateKey, | ||||
allTheXecWallet, | allTheXecWallet, | ||||
walletWithTokensInNode, | walletWithTokensInNode, | ||||
}; | }; |