Skip to content
This repository was archived by the owner on Dec 27, 2022. It is now read-only.
This repository was archived by the owner on Dec 27, 2022. It is now read-only.

[types] INodeService type improvement, IBrowserNode type #653

Description

@LayneHaber

Describe the bug
When using the new packages, you have to use async imports for everything at a higher level than the utils module, i.e. everything except for the types package.

In order to keep the sdk as strongly typed as possible this means:

  • making an IBrowserNode interface which should extend the INodeService interface:
export interface IBrowserNode extends INodeService {
  channelProvider: IRpcChannelProvider | undefined;
  connect(config: BrowserNodeSignerConfig): Promise<IBrowserNode>;
  init(params: { signature?: string; signer?: string }): Promise<void>;
}
  • making sure the INodeService interface is up to date. should add:
getConfig(): Promise<NodeResponses.GetConfig>;
withdrawRetry(
    params: OptionalPublicIdentifier<NodeParams.WithdrawRetry>,
): Promise<Result<NodeResponses.WithdrawRetry, VectorError>>;
addTransactionToCommitment(
    params: OptionalPublicIdentifier<NodeParams.AddTransactionToCommitment>,
): Promise<Result<void, VectorError>>;
  • Adding IRpcChannelProvider and BrowserNodeSignerConfig to the types module

After doing this, make sure to update the sdk package

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions