Skip to content

Commit

Permalink
Merge branch '2.0' into refactor/wallet-account
Browse files Browse the repository at this point in the history
  • Loading branch information
thibault-martinez committed Nov 1, 2023
2 parents ae20ba2 + e6a11f3 commit 9446b12
Show file tree
Hide file tree
Showing 30 changed files with 741 additions and 739 deletions.
12 changes: 6 additions & 6 deletions bindings/nodejs/examples/client/05-get-address-balance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ async function run() {
});

// Get output ids of basic outputs that can be controlled by this address without further unlock constraints
const outputIdsResponse = await client.basicOutputIds([
{ address: addresses[0] },
{ hasExpiration: false },
{ hasTimelock: false },
{ hasStorageDepositReturn: false },
]);
const outputIdsResponse = await client.basicOutputIds({
address: addresses[0],
hasExpiration: false,
hasTimelock: false,
hasStorageDepositReturn: false,
});

// Get outputs by their IDs
const addressOutputs = await client.getOutputs(outputIdsResponse.items);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,9 @@ async function run() {
);

// Find first output unlockable by the account address
const queryParameters = [
{
address: accountAddress,
},
];
const queryParameters = {
address: accountAddress,
};
const input = (
await (await wallet.getClient()).basicOutputIds(queryParameters)
).items[0];
Expand Down
16 changes: 7 additions & 9 deletions bindings/nodejs/examples/how_tos/client/get-outputs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,13 @@ async function run() {

try {
// Get output ids of basic outputs that can be controlled by this address without further unlock constraints
const outputIdsResponse = await client.basicOutputIds([
{
address:
'rms1qpllaj0pyveqfkwxmnngz2c488hfdtmfrj3wfkgxtk4gtyrax0jaxzt70zy',
},
{ hasExpiration: false },
{ hasTimelock: false },
{ hasStorageDepositReturn: false },
]);
const outputIdsResponse = await client.basicOutputIds({
address:
'rms1qpllaj0pyveqfkwxmnngz2c488hfdtmfrj3wfkgxtk4gtyrax0jaxzt70zy',
hasExpiration: false,
hasTimelock: false,
hasStorageDepositReturn: false,
});
console.log('First output of query:');
console.log('ID: ', outputIdsResponse.items[0]);

Expand Down
Loading

0 comments on commit 9446b12

Please sign in to comment.