async function main() {
let now = new Date();
let tenDaysAgo = new Date();
tenDaysAgo.setDate(now.getDate() - 10);
const coinbase = Coinbase.configureFromJson({ filePath: "", basePath: "" });
let stakingBalances = await StakingBalance.list(
"ethereum-mainnet", "eth",
"0x80000001677f23a227dfed6f61b132d114be83b8ad0aa5f3c5d1d77e6ee0bf5f73b0af750cc34e8f2dae73c21dc36f4a",
tenDaysAgo.toISOString(), now.toISOString(),
);
// Loop through the historical staking balances and print each balance
stakingBalances.forEach(stakingBalance => console.log(stakingBalance));
}
main();
What changed? Why?
fix the parameters sequence to align with what
api.ts
hasnetworkId, assetId, addressId
modify
toString()
ofStakingBalance
to be more readableTests
Result
Static Method
External Address Class
Qualified Impact