I am wondering how can I get the current delegation and rewards of a particular user by passing its user_id programatically in flow (mostly in typescript or python) !? I have tried it js SDK. but their isnt any support in it for staking and reward balance i guess I need help regarding this
Retrieve user's current delegation and rewards in Flow programmatically using user_id
19 views Asked by Naman Thaker At
1
This code is dervied from several scripts over here https://github.com/onflow/flow-core-contracts/tree/master/transactions
You have to call that script in any flow SDK and it should give you out the DelegatorInfo struct defined here https://github.com/onflow/flow-core-contracts/blob/3198bb0d01351daaf207e82c930da5fc0cc60fa8/contracts/FlowIDTableStaking.cdc#L379