const POOL = 'CBVQTSTSIJ4UZMN5FQBFHPUIYSW3ATGSP57BZDJNKTOBNQODQTRGE4K5';
const SENDER = 'GDSENDER7EXAMPLEPUBLICKEYAAAAAAAAAAAAAAAAAAAA';
const SENDER_PRIVATE = 'stpl1sender7exampleprivateaddress0000000000';
const RECIPIENT = 'GCRECIPIENT7EXAMPLEPUBLICKEYAAAAAAAAAAAAAAA';
const RECIPIENT_PRIVATE = 'stpl1recipient7exampleprivateaddress000000';
await client.upsertAssets([
{
id: 1,
assetId: 'usdc',
name: 'USDC',
logoUrl: null,
issuerAddress: null,
clientContract: 'CTOKENCONTRACTEXAMPLEAAAAAAAAAAAAAAAAAAAAAA',
poolContracts: [POOL],
poolContract: POOL,
mintable: false,
mintAmount: null,
},
]);
await client.saveRegistryLookup({
owner: RECIPIENT,
status: 'registered',
privateAddressStpl1: RECIPIENT_PRIVATE,
});
await client.setPoolMerkleState({
poolContract: POOL,
commitments: ['0xmerklecommitmenthexexample00000000000000000000000000000000'],
commitmentCount: 1,
merkleRootHex: '0xmerkleroothexexample000000000000000000000000000000000000',
updatedAt: Date.now(),
});
await client.saveWalletPrivateAddressRecord({
owner: SENDER,
nonce: '1',
privateAddress: SENDER_PRIVATE,
createdAt: Date.now(),
});
await client.saveWalletPrivateAddressScalar({
owner: SENDER,
nonce: '1',
scalarHex: '0xabc123scalarhexexample000000000000000000000000000000000000',
});
await client.setWalletDefaultPrivateAddressNonce({ owner: SENDER, nonce: '1' });
await client.upsertPrivateRecords([
{
id: '0xnotecommitmenthexexample000000000000000000000000000000000000',
owner: SENDER,
privateAddress: SENDER_PRIVATE,
asset: 'usdc',
amount: 100_0000000n,
consumed: false,
poolContract: POOL,
coinNote: {
value: '1000000000',
nullifier: '0xnullifierhexexample000000000000000000000000000000000000',
secret: '0xsecrethexexample0000000000000000000000000000000000000000',
commitment: '0xnotecommitmenthexexample000000000000000000000000000000000000',
asset_hi: '0xassethihexexample00000000000000000000000000000000000000',
asset_lo: '0xassetlohexexample00000000000000000000000000000000000000',
},
},
]);