Skip to content

Commit

Permalink
Update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
soerenbf committed Jan 16, 2025
1 parent 7ad3203 commit abd0a43
Show file tree
Hide file tree
Showing 5 changed files with 288 additions and 6 deletions.
4 changes: 4 additions & 0 deletions examples/nodejs/client/getAccountInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,9 @@ const client = new ConcordiumGRPCNodeClient(address, Number(port), credentials.c
if (accountInfo.type === AccountInfoType.Delegator) {
console.log('Delegated stake amount:', accountInfo.accountDelegation.stakedAmount);
}

if (accountInfo.type === AccountInfoType.Baker) {
console.log('Validator pool info:', accountInfo.accountBaker);
}
// #endregion documentation-snippet
})();
2 changes: 2 additions & 0 deletions examples/nodejs/client/getPoolInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,7 @@ const client = new ConcordiumGRPCNodeClient(address, Number(port), credentials.c
);
console.log('Total capital in CCD of ALL pools:', CcdAmount.toCcd(bakerPool.allPoolTotalCapital));
console.log('Pool commision rates:', bakerPool.poolInfo?.commissionRates);
console.log('Is suspended:', bakerPool.isSuspended);
console.log('Current payday status:', bakerPool.currentPaydayStatus);
// #endregion documentation-snippet
})();
4 changes: 2 additions & 2 deletions examples/nodejs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"devDependencies": {
"@types/node": "^20.12.13",
"eslint": "8",
"ts-node": "10.9",
"tsx": "^4.19.2",
"typescript": "^5.2.2"
},
"scripts": {
Expand All @@ -30,6 +30,6 @@
"fmt": "yarn prettier --write",
"fmt-check": "yarn prettier --check",
"build": "tsc --noEmit",
"run-example": "ts-node"
"run-example": "tsx"
}
}
2 changes: 1 addition & 1 deletion examples/reactnative/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -716,4 +716,4 @@ SPEC CHECKSUMS:

PODFILE CHECKSUM: c70448f9d8b13c40c47391af88ee9f69ffe85d63

COCOAPODS: 1.15.2
COCOAPODS: 1.16.2
Loading

0 comments on commit abd0a43

Please sign in to comment.