-
Notifications
You must be signed in to change notification settings - Fork 60
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
add indexer gateway client #619
Conversation
This example: import {
SequenceIndexerGateway
} from '0xsequence/indexergw'
const ACCOUNT_ADDRESS = '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48'
const indexerGateway = new SequenceIndexerGateway(
API_URL,
)
indexerGateway.getNativeTokenBalance({
accountAddress: ACCOUNT_ADDRESS,
}).then((res:any) => {
res.balances.forEach((balance:any) => {
console.log({balance})
})
}).catch((error:any) => {
console.log({error})
}) Prints:
|
9983206
to
b4592f1
Compare
Could we include the indexer gateway within the existing indexer package instead of creating a new one |
Also looking at the output seems like there is redundant wrapping of balances:
this could just be:
|
please lets not introduce another "indexergw" package. I know we are doing this on the Go side, but I don't want to do this on the Typescript side. Please instead keep everything in @0xsequence/indexer and just have packages/indexer/src/indexer.gen.ts and packages/indexer/src/gateway.gen.ts and then for index.ts we can export separately or even we can use the "exports" so developers can |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see comment
82e85fa
to
4ec68bc
Compare
@corbanbrook This is how output from the latest version looks:
|
161c709
to
d6f6245
Compare
@corbanbrook I fixed the spelling for the newly introduced |
d6f6245
to
20c9ba3
Compare
20c9ba3
to
5e9bdac
Compare
This PRs adds the TypeScript client for Indexer Gateway.