Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support more consensus.* methods in @oasisprotocol/client-rt #2045

Open
lukaw3d opened this issue Oct 24, 2024 · 0 comments
Open

Support more consensus.* methods in @oasisprotocol/client-rt #2045

lukaw3d opened this issue Oct 24, 2024 · 0 comments
Labels
c:client-sdk/typescript Category: TypeScript client SDK

Comments

@lukaw3d
Copy link
Member

lukaw3d commented Oct 24, 2024

go:

methodDeposit = types.NewMethodName("consensus.Deposit", Deposit{})
methodWithdraw = types.NewMethodName("consensus.Withdraw", Withdraw{})
methodDelegate = types.NewMethodName("consensus.Delegate", Delegate{})
methodUndelegate = types.NewMethodName("consensus.Undelegate", Undelegate{})
// Queries.
methodParameters = types.NewMethodName("consensus_accounts.Parameters", nil)
methodBalance = types.NewMethodName("consensus.Balance", BalanceQuery{})
methodAccount = types.NewMethodName("consensus.Account", AccountQuery{})
methodDelegation = types.NewMethodName("consensus.Delegation", DelegationQuery{})
methodDelegations = types.NewMethodName("consensus.Delegations", DelegationsQuery{})
methodUndelegations = types.NewMethodName("consensus.Undelegations", UndelegationsQuery{})

ts:

// Callable methods.
export const METHOD_DEPOSIT = 'consensus.Deposit';
export const METHOD_WITHDRAW = 'consensus.Withdraw';
// Queries.
export const METHOD_BALANCE = 'consensus.Balance';
export const METHOD_ACCOUNT = 'consensus.Account';

current workaround to get staked balance on sapphire:
https://github.com/lukaw3d/sapphire-stake-subcall/blob/f80ba24edb08ce69eff78b620549062d2eeb4d4e/README.md?plain=1#L291

@lukaw3d lukaw3d added the c:client-sdk/typescript Category: TypeScript client SDK label Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c:client-sdk/typescript Category: TypeScript client SDK
Projects
None yet
Development

No branches or pull requests

1 participant