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

[FEAT] adds call and route to index token account balance #3

Merged
merged 8 commits into from
Oct 26, 2023

Conversation

aristidesstaffieri
Copy link
Contributor

@aristidesstaffieri aristidesstaffieri commented Oct 24, 2023

Adds new Mercury service calls to build a token balance key, and to subscribe to token balances.

New Route:
GET /account-balances/:pub-key
POST /subscription/token-balance

Adds customer validator to check that arguments can resolve to contract addresses, isContractId.

Todo:
Mercury is currently working on adding classic asset balances to full account subscriptions, once that feature is live then we can add the query to fetch balances to MercuryService.getAccountBalances

@aristidesstaffieri aristidesstaffieri added the wip please don't merge yet label Oct 24, 2023
@aristidesstaffieri aristidesstaffieri self-assigned this Oct 24, 2023
@aristidesstaffieri aristidesstaffieri removed the wip please don't merge yet label Oct 26, 2023
url: "/account-balances/:pub-key",
schema: {
params: {
["pub-key"]: { type: "string" },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need to make this optimization now, but might be useful to think about if we want to store things like params and query string values in an enum as we introduce more routes/complexity

@aristidesstaffieri aristidesstaffieri merged commit b142c0e into main Oct 26, 2023
1 check passed
@aristidesstaffieri aristidesstaffieri deleted the feat/account-balance branch October 26, 2023 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants