-
Notifications
You must be signed in to change notification settings - Fork 61
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 SequenceIndexerOpts #528
base: master
Are you sure you want to change the base?
Conversation
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.
LGTM
Minor suggestions/questions
const [projectAccessKey, jwtAuth] = args | ||
this.projectAccessKey = projectAccessKey || undefined | ||
this.jwtAuth = jwtAuth || undefined |
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.
this is for backward-compatibility?
can we console.error()
with a warning to update to the new Opts object?
was this implemented a long time ago? do you expect customers using it?
constructor( | ||
hostname: string, | ||
projectAccessKey?: string, | ||
jwtAuth?: string |
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.
I think this is fine
I'm just thinking - should we call it SecretKey as in the Builder UI? cc @moskalyk
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.
https://github.com/0xsequence/issue-tracker/issues/4425
Let's revisit. Do we have this pattern in any other sequence client?
export class SequenceIndexer extends IndexerRpc { | ||
public jwtAuth?: string |
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.
I guess we should call it apiSecretKey
, as this is called "Builder Admin API Secret Keys" in the Builder UI.
This PR adds support for
SequenceIndexerOpts
, this type can be used to configure different authentication keys without relying on positional arguments. This is backwards compatible with the current positional-arguments based configuration.Reference: https://github.com/0xsequence/issue-tracker/issues/2358