From ea309907879e0295fd6cb0b4ce8d3e1457d762b8 Mon Sep 17 00:00:00 2001 From: Erin Rivas Date: Mon, 22 Apr 2024 21:34:10 -0500 Subject: [PATCH] first release --- docs/classes/IbcQueryClient.html | 12 +- docs/classes/IbcSigningClient.html | 12 +- docs/classes/WebsocketCore.html | 6 +- docs/functions/makeListener.html | 2 +- ...IExtendedSigningStargateClientOptions.html | 8 +- .../IExtendedStargateClientOptions.html | 4 +- docs/interfaces/IIbcDeafenBundle.html | 4 +- docs/interfaces/IIbcDisengageBundle.html | 4 +- docs/interfaces/IIbcEngageBundle.html | 4 +- docs/interfaces/IIbcMakeListenerBundle.html | 4 +- docs/interfaces/IIbcQueryClient.html | 10 +- docs/interfaces/IIbcSigningClient.html | 10 +- docs/interfaces/IIndexedTx.html | 22 +-- docs/interfaces/IListener.html | 4 +- docs/interfaces/IMsgData.html | 6 +- docs/interfaces/ISignAndBroadcastOptions.html | 4 +- docs/interfaces/ITxLibraryChapter.html | 2 +- docs/interfaces/IWebsocketCore.html | 4 +- docs/types/DCoin.html | 2 +- docs/types/DDeliverTxResponse.html | 2 +- docs/types/DEncodeObject.html | 2 +- docs/types/DHttpEndpoint.html | 2 +- docs/types/DStdFee.html | 2 +- docs/types/DTxMsgData.html | 2 +- docs/types/TCreateExtension.html | 2 +- docs/types/TCurrentTxEvent.html | 2 +- docs/types/TCustomModule.html | 2 +- docs/types/TCustomModuleMap.html | 2 +- docs/types/TMergedSigner.html | 2 +- docs/types/TPossibleTxEvents.html | 2 +- docs/types/TQueryLibrary.html | 2 +- docs/types/TTxLibrary.html | 2 +- package-lock.json | 4 +- package.json | 2 +- src/classes/ibcQueryClient.ts | 8 +- src/classes/ibcSigningClient.ts | 157 +++++++++--------- src/classes/websocketCore.ts | 26 ++- src/global.d.ts | 4 +- src/interfaces/classes/IIbcQueryClient.ts | 12 +- src/interfaces/classes/IIbcSigningClient.ts | 34 ++-- src/interfaces/classes/IWebsocketCore.ts | 38 ++--- 41 files changed, 231 insertions(+), 204 deletions(-) diff --git a/docs/classes/IbcQueryClient.html b/docs/classes/IbcQueryClient.html index ef947e4..4c07e09 100644 --- a/docs/classes/IbcQueryClient.html +++ b/docs/classes/IbcQueryClient.html @@ -1,4 +1,4 @@ -IbcQueryClient | @jackallabs/banshee

Class IbcQueryClient<TQ>

Type Parameters

Hierarchy

  • StargateClient
    • IbcQueryClient

Implements

Constructors

constructor +IbcQueryClient | @jackallabs/banshee

Class IbcQueryClient<TQ>

Type Parameters

Hierarchy

  • StargateClient
    • IbcQueryClient

Implements

Constructors

Properties

Methods

broadcastTx @@ -24,7 +24,7 @@ searchTx connect create -

Constructors

Properties

queries: TQ

Methods

  • Broadcasts a signed transaction to the network and monitors its inclusion in a block.

    +

Constructors

Properties

queries: TQ

Methods

  • Broadcasts a signed transaction to the network and monitors its inclusion in a block.

    If broadcasting is rejected by the node for some reason (e.g. because of a CheckTx failure), an error is thrown.

    If the transaction is not included in a block before the provided timeout, this errors with a TimeoutError.

    @@ -37,13 +37,13 @@ usually needs to check if the transaction was included in a block and was successful.

    Parameters

    • tx: Uint8Array

    Returns Promise<string>

    Returns the hash of the transaction

  • Returns void

  • Returns CometClient

  • Returns QueryClient & AuthExtension & BankExtension & StakingExtension & TxExtension

  • Parameters

    • searchAddress: string

    Returns Promise<null | Account>

  • Returns void

  • Returns CometClient

  • Returns QueryClient & AuthExtension & BankExtension & StakingExtension & TxExtension

  • Parameters

    • searchAddress: string

    Returns Promise<null | Account>

  • Queries all balances for all denoms that belong to this address.

    Uses the grpc queries (which iterates over the store internally), and we cannot get proofs from such a method.

    Parameters

    • address: string

    Returns Promise<readonly Coin[]>

  • Parameters

    • address: string
    • searchDenom: string

    Returns Promise<Coin>

  • Parameters

    • address: string

    Returns Promise<null | Coin>

  • Parameters

    • Optional height: number

    Returns Promise<Block>

  • Returns Promise<string>

  • Returns undefined | CometClient

  • Parameters

    • delegatorAddress: string
    • validatorAddress: string

    Returns Promise<null | Coin>

  • Returns Promise<number>

  • Returns undefined | QueryClient & AuthExtension & BankExtension & StakingExtension & TxExtension

  • Parameters

    • address: string

    Returns Promise<SequenceResponse>

  • Parameters

    • id: string

    Returns Promise<null | IndexedTx>

  • Parameters

    • query: SearchTxQuery

    Returns Promise<IndexedTx[]>

  • Parameters

    • query: SearchTxQuery

    Returns Promise<IndexedTx[]>

  • Creates an instance from a manually created Comet client. +

    Async

    Static

  • Creates an instance from a manually created Comet client. Use this to use Comet38Client or Tendermint37Client instead of Tendermint34Client.

    Parameters

    • cometClient: CometClient
    • Optional options: StargateClientOptions

    Returns Promise<StargateClient>

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/classes/IbcSigningClient.html b/docs/classes/IbcSigningClient.html index 80bf0f5..a03131e 100644 --- a/docs/classes/IbcSigningClient.html +++ b/docs/classes/IbcSigningClient.html @@ -1,4 +1,4 @@ -IbcSigningClient | @jackallabs/banshee

Class IbcSigningClient<TQ, TT>

Type Parameters

Hierarchy

  • SigningStargateClient
    • IbcSigningClient

Implements

Constructors

constructor +IbcSigningClient | @jackallabs/banshee

Class IbcSigningClient<TQ, TT>

Type Parameters

Hierarchy

  • SigningStargateClient
    • IbcSigningClient

Implements

Constructors

Properties

address: string
broadcastPollIntervalMs: undefined | number
broadcastTimeoutMs: undefined | number
queries: TQ
registry: Registry
txLibrary: TT

Methods

  • Broadcasts a signed transaction to the network and monitors its inclusion in a block.

    +

Constructors

Properties

address: string
broadcastPollIntervalMs: undefined | number
broadcastTimeoutMs: undefined | number
queries: TQ
registry: Registry
txLibrary: TT

Methods

  • Broadcasts a signed transaction to the network and monitors its inclusion in a block.

    If broadcasting is rejected by the node for some reason (e.g. because of a CheckTx failure), an error is thrown.

    If the transaction is not included in a block before the provided timeout, this errors with a TimeoutError.

    @@ -55,12 +55,12 @@ usually needs to check if the transaction was included in a block and was successful.

    Parameters

    • tx: Uint8Array

    Returns Promise<string>

    Returns the hash of the transaction

  • Parameters

    • delegatorAddress: string
    • validatorAddress: string
    • amount: Coin
    • fee: number | StdFee | "auto"
    • Optional memo: string

    Returns Promise<DeliverTxResponse>

  • Returns void

  • Returns CometClient

  • Returns QueryClient & AuthExtension & BankExtension & StakingExtension & TxExtension

  • Parameters

    • searchAddress: string

    Returns Promise<null | Account>

  • Parameters

    • delegatorAddress: string
    • validatorAddress: string
    • amount: Coin
    • fee: number | StdFee | "auto"
    • Optional memo: string

    Returns Promise<DeliverTxResponse>

  • Returns void

  • Returns CometClient

  • Returns QueryClient & AuthExtension & BankExtension & StakingExtension & TxExtension

  • Parameters

    • searchAddress: string

    Returns Promise<null | Account>

  • Queries all balances for all denoms that belong to this address.

    Uses the grpc queries (which iterates over the store internally), and we cannot get proofs from such a method.

    Parameters

    • address: string

    Returns Promise<readonly Coin[]>

  • Parameters

    • address: string
    • searchDenom: string

    Returns Promise<Coin>

  • Parameters

    • address: string

    Returns Promise<null | Coin>

  • Parameters

    • Optional height: number

    Returns Promise<Block>

  • Returns Promise<string>

  • Returns undefined | CometClient

  • Parameters

    • delegatorAddress: string
    • validatorAddress: string

    Returns Promise<null | Coin>

  • Returns Promise<number>

  • Returns undefined | QueryClient & AuthExtension & BankExtension & StakingExtension & TxExtension

  • Parameters

    • address: string

    Returns Promise<SequenceResponse>

  • Parameters

    • id: string

    Returns Promise<null | IndexedTx>

  • Parameters

    • query: SearchTxQuery

    Returns Promise<IndexedTx[]>

  • Parameters

  • Parameters

    • query: SearchTxQuery

    Returns Promise<IndexedTx[]>

  • Parameters

    • senderAddress: string
    • recipientAddress: string
    • transferAmount: Coin
    • sourcePort: string
    • sourceChannel: string
    • timeoutHeight: undefined | Height
    • timeoutTimestamp: undefined | number

      timeout in seconds

    • fee: number | StdFee | "auto"
    • Optional memo: string

    Returns Promise<DeliverTxResponse>

    Deprecated

    This API does not support setting the memo field of MsgTransfer (only the transaction memo). We'll remove this method at some point because trying to wrap the various message types is a losing strategy. Please migrate to signAndBroadcast with an MsgTransferEncodeObject created in the caller code instead.

    @@ -80,7 +80,7 @@

    See

    https://gi To set the Comet client explicitly, use create.

    Parameters

    Returns Promise<StargateClient>

  • Creates an instance from a manually created Comet client. +

    Async

    Static

  • Creates an instance from a manually created Comet client. Use this to use Comet38Client or Tendermint37Client instead of Tendermint34Client.

    Parameters

    • cometClient: CometClient
    • Optional options: StargateClientOptions

    Returns Promise<StargateClient>

Constructors

Properties

activeStreams: Record<string, Stream<TPossibleTxEvents>>
wsConnections: Record<string, CometClient>

Methods

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/functions/makeListener.html b/docs/functions/makeListener.html index 60c9bfa..d679551 100644 --- a/docs/functions/makeListener.html +++ b/docs/functions/makeListener.html @@ -1,2 +1,2 @@ makeListener | @jackallabs/banshee

Function makeListener

Generated using TypeDoc

\ No newline at end of file +

Type Parameters

Parameters

Returns IListener<TPossibleTxEvents>

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/IExtendedSigningStargateClientOptions.html b/docs/interfaces/IExtendedSigningStargateClientOptions.html index be01530..f1137ee 100644 --- a/docs/interfaces/IExtendedSigningStargateClientOptions.html +++ b/docs/interfaces/IExtendedSigningStargateClientOptions.html @@ -1,6 +1,6 @@ IExtendedSigningStargateClientOptions | @jackallabs/banshee

Interface IExtendedSigningStargateClientOptions

ExtendedSigningStargateClientOptions declaration IExtendedSigningStargateClientOptions

-

Hierarchy

  • SigningStargateClientOptions
    • IExtendedSigningStargateClientOptions

Properties

Hierarchy

  • SigningStargateClientOptions
    • IExtendedSigningStargateClientOptions

Properties

accountParser?: AccountParser
aminoTypes?: AminoTypes
broadcastPollIntervalMs?: number
broadcastTimeoutMs?: number
customModules?: TCustomModuleMap[]

Array of Custom Module Maps.

-
gasPrice?: GasPrice
queryExtensions?: TCreateExtension[]

Array of functions to generate query extensions.

-
registry?: Registry
txLibrary?: TTxLibrary

Library of tx msg encoders.

-

Generated using TypeDoc

\ No newline at end of file +
gasPrice?: GasPrice
queryExtensions?: TCreateExtension[]

Array of functions to generate query extensions.

+
registry?: Registry
txLibrary?: TTxLibrary

Library of tx msg encoders.

+

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/IExtendedStargateClientOptions.html b/docs/interfaces/IExtendedStargateClientOptions.html index bffe8b0..f5d151c 100644 --- a/docs/interfaces/IExtendedStargateClientOptions.html +++ b/docs/interfaces/IExtendedStargateClientOptions.html @@ -1,6 +1,6 @@ IExtendedStargateClientOptions | @jackallabs/banshee

Interface IExtendedStargateClientOptions

IExtendedStargateClientOptions declaration IExtendedStargateClientOptions

-

Hierarchy

  • StargateClientOptions
    • IExtendedStargateClientOptions

Properties

Hierarchy

  • StargateClientOptions
    • IExtendedStargateClientOptions

Properties

accountParser?: AccountParser
queryExtensions?: TCreateExtension[]

Array of functions to generate query extensions.

-

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/IIbcDeafenBundle.html b/docs/interfaces/IIbcDeafenBundle.html index 0369d0e..345eaea 100644 --- a/docs/interfaces/IIbcDeafenBundle.html +++ b/docs/interfaces/IIbcDeafenBundle.html @@ -1,5 +1,5 @@ IIbcDeafenBundle | @jackallabs/banshee

Generated using TypeDoc

\ No newline at end of file +

Properties

chainId: string
query?: string

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/IIbcDisengageBundle.html b/docs/interfaces/IIbcDisengageBundle.html index 530cb85..053de82 100644 --- a/docs/interfaces/IIbcDisengageBundle.html +++ b/docs/interfaces/IIbcDisengageBundle.html @@ -1,4 +1,4 @@ IIbcDisengageBundle | @jackallabs/banshee

Generated using TypeDoc

\ No newline at end of file +

Properties

chainId: string
query?: string

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/IIbcEngageBundle.html b/docs/interfaces/IIbcEngageBundle.html index 4fda177..97e3c3b 100644 --- a/docs/interfaces/IIbcEngageBundle.html +++ b/docs/interfaces/IIbcEngageBundle.html @@ -1,7 +1,7 @@ IIbcEngageBundle | @jackallabs/banshee

Generated using TypeDoc

\ No newline at end of file +

Properties

chainId: string
endpoint: string
feed: T[]
query?: string

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/IIbcMakeListenerBundle.html b/docs/interfaces/IIbcMakeListenerBundle.html index 8913fb7..ac5fced 100644 --- a/docs/interfaces/IIbcMakeListenerBundle.html +++ b/docs/interfaces/IIbcMakeListenerBundle.html @@ -1,4 +1,4 @@ IIbcMakeListenerBundle | @jackallabs/banshee

Interface IIbcMakeListenerBundle<T>

IIbcMakeListenerBundle

-

Type Parameters

Hierarchy

  • IIbcMakeListenerBundle

Properties

Type Parameters

Hierarchy

  • IIbcMakeListenerBundle

Properties

Properties

chainId: string
feed: T[]

Generated using TypeDoc

\ No newline at end of file +

Properties

chainId: string
feed: T[]

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/IIbcQueryClient.html b/docs/interfaces/IIbcQueryClient.html index 7a4deca..7ec03ec 100644 --- a/docs/interfaces/IIbcQueryClient.html +++ b/docs/interfaces/IIbcQueryClient.html @@ -1,5 +1,5 @@ IIbcQueryClient | @jackallabs/banshee

Interface IIbcQueryClient<TQ>

IIbcQueryClient

-

Type Parameters

Hierarchy

Implemented by

Properties

Type Parameters

Hierarchy

Implemented by

Properties

Methods

Properties

queries: TQ

Methods

  • Broadcasts a signed transaction to the network and monitors its inclusion in a block.

    +

Properties

queries: TQ

Methods

  • Broadcasts a signed transaction to the network and monitors its inclusion in a block.

    If broadcasting is rejected by the node for some reason (e.g. because of a CheckTx failure), an error is thrown.

    If the transaction is not included in a block before the provided timeout, this errors with a TimeoutError.

    @@ -34,9 +34,9 @@ usually needs to check if the transaction was included in a block and was successful.

    Parameters

    • tx: Uint8Array

    Returns Promise<string>

    Returns the hash of the transaction

  • Returns void

  • Returns CometClient

  • Returns QueryClient & AuthExtension & BankExtension & StakingExtension & TxExtension

  • Parameters

    • searchAddress: string

    Returns Promise<null | Account>

  • Returns void

  • Returns CometClient

  • Returns QueryClient & AuthExtension & BankExtension & StakingExtension & TxExtension

  • Parameters

    • searchAddress: string

    Returns Promise<null | Account>

  • Queries all balances for all denoms that belong to this address.

    Uses the grpc queries (which iterates over the store internally), and we cannot get proofs from such a method.

    Parameters

    • address: string

    Returns Promise<readonly Coin[]>

  • Parameters

    • address: string
    • searchDenom: string

    Returns Promise<Coin>

  • Parameters

    • address: string

    Returns Promise<null | Coin>

  • Parameters

    • Optional height: number

    Returns Promise<Block>

  • Returns Promise<string>

  • Returns undefined | CometClient

  • Parameters

    • delegatorAddress: string
    • validatorAddress: string

    Returns Promise<null | Coin>

  • Returns Promise<number>

  • Returns undefined | QueryClient & AuthExtension & BankExtension & StakingExtension & TxExtension

  • Parameters

    • address: string

    Returns Promise<SequenceResponse>

  • Parameters

    • id: string

    Returns Promise<null | IndexedTx>

  • Parameters

    • query: SearchTxQuery

    Returns Promise<IndexedTx[]>

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/IIbcSigningClient.html b/docs/interfaces/IIbcSigningClient.html index 4be2650..3bc3711 100644 --- a/docs/interfaces/IIbcSigningClient.html +++ b/docs/interfaces/IIbcSigningClient.html @@ -1,5 +1,5 @@ IIbcSigningClient | @jackallabs/banshee

Interface IIbcSigningClient<TQ, TT>

IIbcSigningClient

-

Type Parameters

Hierarchy

Implemented by

Properties

Type Parameters

Hierarchy

Implemented by

Properties

broadcastPollIntervalMs: undefined | number
broadcastTimeoutMs: undefined | number
queries: TQ
registry: Registry
txLibrary: TT

Methods

  • Broadcasts a signed transaction to the network and monitors its inclusion in a block.

    +

Properties

broadcastPollIntervalMs: undefined | number
broadcastTimeoutMs: undefined | number
queries: TQ
registry: Registry
txLibrary: TT

Methods

  • Broadcasts a signed transaction to the network and monitors its inclusion in a block.

    If broadcasting is rejected by the node for some reason (e.g. because of a CheckTx failure), an error is thrown.

    If the transaction is not included in a block before the provided timeout, this errors with a TimeoutError.

    @@ -48,12 +48,12 @@ usually needs to check if the transaction was included in a block and was successful.

    Parameters

    • tx: Uint8Array

    Returns Promise<string>

    Returns the hash of the transaction

  • Parameters

    • delegatorAddress: string
    • validatorAddress: string
    • amount: Coin
    • fee: number | StdFee | "auto"
    • Optional memo: string

    Returns Promise<DeliverTxResponse>

  • Returns void

  • Returns CometClient

  • Returns QueryClient & AuthExtension & BankExtension & StakingExtension & TxExtension

  • Parameters

    • searchAddress: string

    Returns Promise<null | Account>

  • Parameters

    • delegatorAddress: string
    • validatorAddress: string
    • amount: Coin
    • fee: number | StdFee | "auto"
    • Optional memo: string

    Returns Promise<DeliverTxResponse>

  • Returns void

  • Returns CometClient

  • Returns QueryClient & AuthExtension & BankExtension & StakingExtension & TxExtension

  • Parameters

    • searchAddress: string

    Returns Promise<null | Account>

  • Queries all balances for all denoms that belong to this address.

    Uses the grpc queries (which iterates over the store internally), and we cannot get proofs from such a method.

    Parameters

    • address: string

    Returns Promise<readonly Coin[]>

  • Parameters

    • address: string
    • searchDenom: string

    Returns Promise<Coin>

  • Parameters

    • address: string

    Returns Promise<null | Coin>

  • Parameters

    • Optional height: number

    Returns Promise<Block>

  • Returns Promise<string>

  • Returns undefined | CometClient

  • Parameters

    • delegatorAddress: string
    • validatorAddress: string

    Returns Promise<null | Coin>

  • Returns Promise<number>

  • Returns undefined | QueryClient & AuthExtension & BankExtension & StakingExtension & TxExtension

  • Parameters

    • address: string

    Returns Promise<SequenceResponse>

  • Parameters

    • id: string

    Returns Promise<null | IndexedTx>

  • Parameters

    • query: SearchTxQuery

    Returns Promise<IndexedTx[]>

  • Parameters

  • Parameters

    • query: SearchTxQuery

    Returns Promise<IndexedTx[]>

data?: Uint8Array

Message responses of included Msgs.

+
events: readonly Event[]

Tendermint34 events in response.

+
gasUsed: number

Total gas used as calculated by chain.

+
gasWanted: number

Maximum gas allowed as submitted in transaction.

+
hash: string

Hash of transaction.

+
height: number

Block height of the transaction.

+
msgResponses: DTxMsgData[]

Always empty list for SDK 0.45 chains, typed for compatibility.

+
rawLog: string

A string-based log document.

+
tx: Uint8Array
txIndex: number

0-based index of the transaction within the block.

+

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/IListener.html b/docs/interfaces/IListener.html index 6093318..91412be 100644 --- a/docs/interfaces/IListener.html +++ b/docs/interfaces/IListener.html @@ -1,5 +1,5 @@ IListener | @jackallabs/banshee

Interface IListener<T>

IListener

-

Type Parameters

Hierarchy

  • IListener

Methods

Type Parameters

Hierarchy

  • IListener

Methods

Generated using TypeDoc

\ No newline at end of file +

Methods

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/IMsgData.html b/docs/interfaces/IMsgData.html index 8f521ab..b11c00b 100644 --- a/docs/interfaces/IMsgData.html +++ b/docs/interfaces/IMsgData.html @@ -1,7 +1,7 @@ IMsgData | @jackallabs/banshee

Interface IMsgData

MsgData declaration IMsgData

-

Hierarchy

  • IMsgData

Properties

Hierarchy

  • IMsgData

Properties

Properties

data: Uint8Array

Uint8Array encoded msg data.

-
msgType: string

Dot separated path of msg.

-

Generated using TypeDoc

\ No newline at end of file +
msgType: string

Dot separated path of msg.

+

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/ISignAndBroadcastOptions.html b/docs/interfaces/ISignAndBroadcastOptions.html index d645bce..75dd13b 100644 --- a/docs/interfaces/ISignAndBroadcastOptions.html +++ b/docs/interfaces/ISignAndBroadcastOptions.html @@ -1,5 +1,5 @@ ISignAndBroadcastOptions | @jackallabs/banshee

Generated using TypeDoc

\ No newline at end of file +

Properties

fee?: StdFee
memo?: string
timeoutHeight?: bigint

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/ITxLibraryChapter.html b/docs/interfaces/ITxLibraryChapter.html index 44ed977..370385a 100644 --- a/docs/interfaces/ITxLibraryChapter.html +++ b/docs/interfaces/ITxLibraryChapter.html @@ -1,3 +1,3 @@ ITxLibraryChapter | @jackallabs/banshee

Interface ITxLibraryChapter

MsgData declaration IMsgData

-

Hierarchy

  • ITxLibraryChapter

Indexable

[key: string]: ((msg) => DEncodeObject)

Generated using TypeDoc

\ No newline at end of file +

Hierarchy

Indexable

[key: string]: ((msg) => DEncodeObject)

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/IWebsocketCore.html b/docs/interfaces/IWebsocketCore.html index 31fb3cc..93019e2 100644 --- a/docs/interfaces/IWebsocketCore.html +++ b/docs/interfaces/IWebsocketCore.html @@ -1,6 +1,6 @@ IWebsocketCore | @jackallabs/banshee

Interface IWebsocketCore

IWebsocketCore

-

Hierarchy

Implemented by

Methods

Hierarchy

Implemented by

Methods

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/types/DCoin.html b/docs/types/DCoin.html index f7711d6..416ab95 100644 --- a/docs/types/DCoin.html +++ b/docs/types/DCoin.html @@ -1,3 +1,3 @@ DCoin | @jackallabs/banshee

Type alias DCoin

DCoin: Documentation<{
    amount: string;
    denom: string;
}, Coin>

Coin Documentation

Coin defines a token with a denomination and an amount.

-

Type declaration

  • amount: string
  • denom: string

Generated using TypeDoc

\ No newline at end of file +

Type declaration

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/types/DDeliverTxResponse.html b/docs/types/DDeliverTxResponse.html index 532f682..9271dec 100644 --- a/docs/types/DDeliverTxResponse.html +++ b/docs/types/DDeliverTxResponse.html @@ -1,3 +1,3 @@ DDeliverTxResponse | @jackallabs/banshee

Type alias DDeliverTxResponse

DDeliverTxResponse: Documentation<{
    code: number;
    data?: readonly IMsgData[];
    events: readonly Event[];
    gasUsed: number;
    gasWanted: number;
    height: number;
    msgResponses: readonly DTxMsgData[];
    rawLog?: string;
    transactionHash: string;
    txIndex: number;
}, DeliverTxResponse>

DeliverTxResponse Documentation

DeliverTxResponse define the response after successfully broadcasting a transaction.

-

Type declaration

  • Readonly code: number
  • Optional Readonly data?: readonly IMsgData[]
  • Readonly events: readonly Event[]
  • Readonly gasUsed: number
  • Readonly gasWanted: number
  • Readonly height: number
  • Readonly msgResponses: readonly DTxMsgData[]
  • Optional Readonly rawLog?: string
  • Readonly transactionHash: string
  • Readonly txIndex: number

Generated using TypeDoc

\ No newline at end of file +

Type declaration

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/types/DEncodeObject.html b/docs/types/DEncodeObject.html index 9a8634f..9c8ebe2 100644 --- a/docs/types/DEncodeObject.html +++ b/docs/types/DEncodeObject.html @@ -1,3 +1,3 @@ DEncodeObject | @jackallabs/banshee

Type alias DEncodeObject

DEncodeObject: Documentation<{
    typeUrl: string;
    value: any;
}, EncodeObject>

EncodeObject Documentation

EncodeObject defines a msg object ready to be sent to chain.

-

Type declaration

  • Readonly typeUrl: string
  • Readonly value: any

Generated using TypeDoc

\ No newline at end of file +

Type declaration

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/types/DHttpEndpoint.html b/docs/types/DHttpEndpoint.html index c7075cc..3f5c27c 100644 --- a/docs/types/DHttpEndpoint.html +++ b/docs/types/DHttpEndpoint.html @@ -1,3 +1,3 @@ DHttpEndpoint | @jackallabs/banshee

Type alias DHttpEndpoint

DHttpEndpoint: Documentation<{
    headers: Record<string, string>;
    url: string;
}, HttpEndpoint>

HttpEndpoint Documentation

HttpEndpoint defines a http endpoint and associated headers in a reusable format.

-

Type declaration

  • Readonly headers: Record<string, string>
  • Readonly url: string

Generated using TypeDoc

\ No newline at end of file +

Type declaration

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/types/DStdFee.html b/docs/types/DStdFee.html index 9c03c94..23edc51 100644 --- a/docs/types/DStdFee.html +++ b/docs/types/DStdFee.html @@ -1,3 +1,3 @@ DStdFee | @jackallabs/banshee

Type alias DStdFee

DStdFee: Documentation<{
    amount: readonly DCoin[];
    gas: string;
    granter?: string;
    payer?: string;
}, StdFee>

StdFee Documentation

StdFee defines

-

Type declaration

  • Readonly amount: readonly DCoin[]
  • Readonly gas: string
  • Optional Readonly granter?: string
  • Optional Readonly payer?: string

Generated using TypeDoc

\ No newline at end of file +

Type declaration

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/types/DTxMsgData.html b/docs/types/DTxMsgData.html index 05231e1..9cb9a4c 100644 --- a/docs/types/DTxMsgData.html +++ b/docs/types/DTxMsgData.html @@ -1,3 +1,3 @@ DTxMsgData | @jackallabs/banshee

Type alias DTxMsgData

DTxMsgData: {
    typeUrl: string;
    value: Uint8Array;
}

TxMsgData Documentation

TxMsgData defines a msg object returned from the chain.

-

Type declaration

  • typeUrl: string
  • value: Uint8Array

Generated using TypeDoc

\ No newline at end of file +

Type declaration

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/types/TCreateExtension.html b/docs/types/TCreateExtension.html index e86f109..51eff05 100644 --- a/docs/types/TCreateExtension.html +++ b/docs/types/TCreateExtension.html @@ -1 +1 @@ -TCreateExtension | @jackallabs/banshee

Type alias TCreateExtension

TCreateExtension: ((base) => Record<string, Record<string, ((request?) => Promise<any>)>>)

Type declaration

    • (base): Record<string, Record<string, ((request?) => Promise<any>)>>
    • Parameters

      • base: QueryClient

      Returns Record<string, Record<string, ((request?) => Promise<any>)>>

Generated using TypeDoc

\ No newline at end of file +TCreateExtension | @jackallabs/banshee

Type alias TCreateExtension

TCreateExtension: ((base) => Record<string, Record<string, ((request?) => Promise<any>)>>)

Type declaration

    • (base): Record<string, Record<string, ((request?) => Promise<any>)>>
    • Parameters

      • base: QueryClient

      Returns Record<string, Record<string, ((request?) => Promise<any>)>>

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/types/TCurrentTxEvent.html b/docs/types/TCurrentTxEvent.html index 01989b4..bdc1dbd 100644 --- a/docs/types/TCurrentTxEvent.html +++ b/docs/types/TCurrentTxEvent.html @@ -1 +1 @@ -TCurrentTxEvent | @jackallabs/banshee

Type alias TCurrentTxEvent<T>

TCurrentTxEvent<T>: T

Type Parameters

Generated using TypeDoc

\ No newline at end of file +TCurrentTxEvent | @jackallabs/banshee

Type alias TCurrentTxEvent<T>

TCurrentTxEvent<T>: T

Type Parameters

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/types/TCustomModule.html b/docs/types/TCustomModule.html index ba84250..c5bc642 100644 --- a/docs/types/TCustomModule.html +++ b/docs/types/TCustomModule.html @@ -1 +1 @@ -TCustomModule | @jackallabs/banshee

Type alias TCustomModule

TCustomModule: [string, GeneratedType]

Generated using TypeDoc

\ No newline at end of file +TCustomModule | @jackallabs/banshee

Type alias TCustomModule

TCustomModule: [string, GeneratedType]

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/types/TCustomModuleMap.html b/docs/types/TCustomModuleMap.html index fe573ce..dd3b60f 100644 --- a/docs/types/TCustomModuleMap.html +++ b/docs/types/TCustomModuleMap.html @@ -1 +1 @@ -TCustomModuleMap | @jackallabs/banshee

Type alias TCustomModuleMap

TCustomModuleMap: Record<string, TCustomModule>

Generated using TypeDoc

\ No newline at end of file +TCustomModuleMap | @jackallabs/banshee

Type alias TCustomModuleMap

TCustomModuleMap: Record<string, TCustomModule>

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/types/TMergedSigner.html b/docs/types/TMergedSigner.html index bdd7677..59833d9 100644 --- a/docs/types/TMergedSigner.html +++ b/docs/types/TMergedSigner.html @@ -1 +1 @@ -TMergedSigner | @jackallabs/banshee

Type alias TMergedSigner

TMergedSigner: OfflineAminoSigner & OfflineDirectSigner

Generated using TypeDoc

\ No newline at end of file +TMergedSigner | @jackallabs/banshee

Type alias TMergedSigner

TMergedSigner: OfflineAminoSigner & OfflineDirectSigner

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/types/TPossibleTxEvents.html b/docs/types/TPossibleTxEvents.html index b338296..cfe26c0 100644 --- a/docs/types/TPossibleTxEvents.html +++ b/docs/types/TPossibleTxEvents.html @@ -1 +1 @@ -TPossibleTxEvents | @jackallabs/banshee

Type alias TPossibleTxEvents

TPossibleTxEvents: TxEvent | tendermint37.TxEvent

Generated using TypeDoc

\ No newline at end of file +TPossibleTxEvents | @jackallabs/banshee

Type alias TPossibleTxEvents

TPossibleTxEvents: TxEvent | tendermint37.TxEvent

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/types/TQueryLibrary.html b/docs/types/TQueryLibrary.html index 046e0ae..56634b2 100644 --- a/docs/types/TQueryLibrary.html +++ b/docs/types/TQueryLibrary.html @@ -1 +1 @@ -TQueryLibrary | @jackallabs/banshee

Type alias TQueryLibrary

TQueryLibrary: QueryClient & Record<string, Record<string, ((request?) => Promise<any>)>>

Generated using TypeDoc

\ No newline at end of file +TQueryLibrary | @jackallabs/banshee

Type alias TQueryLibrary

TQueryLibrary: QueryClient & Record<string, Record<string, ((request?) => Promise<any>)>>

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/types/TTxLibrary.html b/docs/types/TTxLibrary.html index 5b594c9..e691bb2 100644 --- a/docs/types/TTxLibrary.html +++ b/docs/types/TTxLibrary.html @@ -1 +1 @@ -TTxLibrary | @jackallabs/banshee

Type alias TTxLibrary

TTxLibrary: Record<string, ITxLibraryChapter>

Generated using TypeDoc

\ No newline at end of file +TTxLibrary | @jackallabs/banshee

Type alias TTxLibrary

TTxLibrary: Record<string, ITxLibraryChapter>

Generated using TypeDoc

\ No newline at end of file diff --git a/package-lock.json b/package-lock.json index d9be0b8..a0dcd39 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@jackallabs/banshee", - "version": "0.0.0-rc.6", + "version": "0.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@jackallabs/banshee", - "version": "0.0.0-rc.6", + "version": "0.1.0", "license": "MIT", "dependencies": { "@cosmjs/amino": "^0.32.3", diff --git a/package.json b/package.json index a91fb64..43cef1d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@jackallabs/banshee", - "version": "0.0.0-rc.6", + "version": "0.1.0", "description": "Modern problems require modern solutions", "keywords": [], "exports": { diff --git a/src/classes/ibcQueryClient.ts b/src/classes/ibcQueryClient.ts index 9117144..5a14364 100644 --- a/src/classes/ibcQueryClient.ts +++ b/src/classes/ibcQueryClient.ts @@ -4,7 +4,8 @@ import { connectComet } from '@cosmjs/tendermint-rpc' import { processExtensions } from '@/utils/extensions' import { WebsocketCore } from '@/classes' import { - IExtendedStargateClientOptions, IIbcDeafenBundle, + IExtendedStargateClientOptions, + IIbcDeafenBundle, IIbcDisengageBundle, IIbcEngageBundle, IIbcQueryClient, @@ -15,7 +16,10 @@ import type { TPossibleTxEvents, TQueryLibrary } from '@/types' /** * @class {IIbcQueryClient} IbcQueryClient */ -export class IbcQueryClient extends StargateClient implements IIbcQueryClient { +export class IbcQueryClient + extends StargateClient + implements IIbcQueryClient +{ public readonly queries: TQ protected readonly wsCore: IWebsocketCore diff --git a/src/classes/ibcSigningClient.ts b/src/classes/ibcSigningClient.ts index 58fb1b0..6cd4d3e 100644 --- a/src/classes/ibcSigningClient.ts +++ b/src/classes/ibcSigningClient.ts @@ -1,10 +1,10 @@ -import {SigningStargateClient} from '@cosmjs/stargate' -import {CometClient, connectComet} from '@cosmjs/tendermint-rpc' -import {createDefaultRegistry} from '@/utils/registry' -import {processExtensions} from '@/utils/extensions' -import {WebsocketCore} from '@/classes' -import type {OfflineSigner} from '@cosmjs/launchpad' -import type {ISignAndBroadcastOptions} from '@/interfaces/ISignAndBroadcastOptions' +import { SigningStargateClient } from '@cosmjs/stargate' +import { CometClient, connectComet } from '@cosmjs/tendermint-rpc' +import { createDefaultRegistry } from '@/utils/registry' +import { processExtensions } from '@/utils/extensions' +import { WebsocketCore } from '@/classes' +import type { OfflineSigner } from '@cosmjs/launchpad' +import type { ISignAndBroadcastOptions } from '@/interfaces/ISignAndBroadcastOptions' import type { DDeliverTxResponse, DEncodeObject, @@ -14,87 +14,92 @@ import type { TTxLibrary } from '@/types' import { - IExtendedSigningStargateClientOptions, IIbcDeafenBundle, - IIbcDisengageBundle, - IIbcEngageBundle, - IIbcSigningClient, - IWebsocketCore + IExtendedSigningStargateClientOptions, + IIbcDeafenBundle, + IIbcDisengageBundle, + IIbcEngageBundle, + IIbcSigningClient, + IWebsocketCore } from '@/interfaces' /** * @class {IIbcSigningClient} IbcSigningClient */ export class IbcSigningClient - extends SigningStargateClient - implements IIbcSigningClient { - public readonly queries: TQ - public readonly txLibrary: TT - protected readonly address: string - protected readonly wsCore: IWebsocketCore + extends SigningStargateClient + implements IIbcSigningClient +{ + public readonly queries: TQ + public readonly txLibrary: TT + protected readonly address: string + protected readonly wsCore: IWebsocketCore - protected constructor( - tmClient: CometClient, - signer: OfflineSigner, - address: string, - options: IExtendedSigningStargateClientOptions, - ) { - super(tmClient, signer, options) - const {queryExtensions = [], txLibrary = {}} = options - this.address = address - this.queries = processExtensions(tmClient, queryExtensions) as TQ - this.txLibrary = txLibrary as TT - this.wsCore = new WebsocketCore() - } + protected constructor( + tmClient: CometClient, + signer: OfflineSigner, + address: string, + options: IExtendedSigningStargateClientOptions, + ) { + super(tmClient, signer, options) + const { queryExtensions = [], txLibrary = {} } = options + this.address = address + this.queries = processExtensions(tmClient, queryExtensions) as TQ + this.txLibrary = txLibrary as TT + this.wsCore = new WebsocketCore() + } - /** - * @function connectWithSigner - * @memberof IbcSigningClient - * @async - * @static - */ - public static async connectWithSigner ( - endpoint: string | DHttpEndpoint, - signer: OfflineSigner, - options: IExtendedSigningStargateClientOptions = {}, - ): Promise> { - try { - const client = await connectComet(endpoint) - const {address} = (await signer.getAccounts())[0] - const {customModules = []} = options - return new IbcSigningClient(client, signer, address, { - registry: createDefaultRegistry(customModules), - ...options, - }) - } catch (err) { - throw err - } + /** + * @function connectWithSigner + * @memberof IbcSigningClient + * @async + * @static + */ + public static async connectWithSigner< + TQ extends TQueryLibrary, + TT extends TTxLibrary, + >( + endpoint: string | DHttpEndpoint, + signer: OfflineSigner, + options: IExtendedSigningStargateClientOptions = {}, + ): Promise> { + try { + const client = await connectComet(endpoint) + const { address } = (await signer.getAccounts())[0] + const { customModules = [] } = options + return new IbcSigningClient(client, signer, address, { + registry: createDefaultRegistry(customModules), + ...options, + }) + } catch (err) { + throw err } + } - async monitor( - connections: IIbcEngageBundle | IIbcEngageBundle[], - ): Promise { - await this.wsCore.monitor(connections) - } + async monitor( + connections: IIbcEngageBundle | IIbcEngageBundle[], + ): Promise { + await this.wsCore.monitor(connections) + } - disengage(connections: IIbcDisengageBundle | IIbcDisengageBundle[]): void { - this.wsCore.disengage(connections) - } + disengage(connections: IIbcDisengageBundle | IIbcDisengageBundle[]): void { + this.wsCore.disengage(connections) + } - deafen(connection: IIbcDeafenBundle): void { - this.wsCore.deafen(connection) - } + deafen(connection: IIbcDeafenBundle): void { + this.wsCore.deafen(connection) + } - async selfSignAndBroadcast( - msgs: DEncodeObject[], - options: ISignAndBroadcastOptions = {}, - ): Promise { - const {fee, memo, timeoutHeight} = { - fee: { - amount: [], - gas: (msgs.length * 100000).toString(), - }, - ...options, - } - return this.signAndBroadcast(this.address, msgs, fee, memo, timeoutHeight) + async selfSignAndBroadcast( + msgs: DEncodeObject[], + options: ISignAndBroadcastOptions = {}, + ): Promise { + const { fee, memo, timeoutHeight } = { + fee: { + amount: [], + gas: (msgs.length * 100000).toString(), + }, + ...options, } + return this.signAndBroadcast(this.address, msgs, fee, memo, timeoutHeight) + } } diff --git a/src/classes/websocketCore.ts b/src/classes/websocketCore.ts index fb42684..4c60ca0 100644 --- a/src/classes/websocketCore.ts +++ b/src/classes/websocketCore.ts @@ -2,7 +2,12 @@ import type { CometClient } from '@cosmjs/tendermint-rpc' import { connectComet } from '@cosmjs/tendermint-rpc' import type { Stream } from 'xstream' import type { TPossibleTxEvents } from '@/types' -import { IIbcDeafenBundle, IIbcDisengageBundle, IIbcEngageBundle, IWebsocketCore } from '@/interfaces' +import { + IIbcDeafenBundle, + IIbcDisengageBundle, + IIbcEngageBundle, + IWebsocketCore, +} from '@/interfaces' export class WebsocketCore implements IWebsocketCore { protected readonly wsConnections: Record @@ -35,15 +40,21 @@ export class WebsocketCore implements IWebsocketCore { delete this.activeStreams[`${conn.chainId}|${conn.query || 'all'}`] } } else { - delete this.activeStreams[`${connections.chainId}|${connections.query || 'all'}`] + delete this.activeStreams[ + `${connections.chainId}|${connections.query || 'all'}` + ] } } deafen(connection: IIbcDeafenBundle): void { - this.activeStreams[`${connection.chainId}|${connection.query || 'all'}`].removeListener(connection.listener) + this.activeStreams[ + `${connection.chainId}|${connection.query || 'all'}` + ].removeListener(connection.listener) } - protected async setupMonitoring(conn: IIbcEngageBundle) { + protected async setupMonitoring( + conn: IIbcEngageBundle, + ) { if (!this.wsConnections[conn.chainId]) { this.wsConnections[conn.chainId] = await connectComet(conn.endpoint) } @@ -51,9 +62,12 @@ export class WebsocketCore implements IWebsocketCore { const streamId = `${conn.chainId}|${conn.query || 'all'}` if (!this.activeStreams[streamId]) { if (conn.query) { - this.activeStreams[streamId] = client.subscribeTx(conn.query) as Stream + this.activeStreams[streamId] = client.subscribeTx( + conn.query, + ) as Stream } else { - this.activeStreams[streamId] = client.subscribeTx() as Stream + this.activeStreams[streamId] = + client.subscribeTx() as Stream } } this.activeStreams[streamId].addListener(conn.listener) diff --git a/src/global.d.ts b/src/global.d.ts index 9440a76..f068fc5 100644 --- a/src/global.d.ts +++ b/src/global.d.ts @@ -172,7 +172,7 @@ type Modify> = Omit & R type ModifyDeep> = { // https://stackoverflow.com/a/74216680/985454 - [K in keyof A | keyof B]: /**/ K extends keyof A // For all keys in A and B: ... // ───┐ + [K in keyof A | keyof B /**/]: K extends keyof A // For all keys in A and B: ... // ───┐ ? /**/ K extends keyof B // ───n ─ y ? key K exists in both A and B ... ? /* */ A[K] extends AnyObject // │ ─┴──┐ ? /* */ B[K] extends AnyObject // │ ─── n ─ y ? both A and B are objects ... @@ -187,7 +187,7 @@ type ModifyDeep> = { type ModifyDeep1> = { // https://stackoverflow.com/a/74216680/985454 - [K in keyof A | keyof B]: /**/ K extends keyof A // For all keys in A and B: ... // ───┐ + [K in keyof A | keyof B /**/]: K extends keyof A // For all keys in A and B: ... // ───┐ ? /* */ K extends keyof B // ── n ─ y ? key K exists in both A and B ... ? /* */ A[K] extends AnyObject // │ ─┴──┐ ? /* */ B[K] extends AnyObject // │ ─── n ─ y ? both A and B are objects ... diff --git a/src/interfaces/classes/IIbcQueryClient.ts b/src/interfaces/classes/IIbcQueryClient.ts index 267d40d..8195efe 100644 --- a/src/interfaces/classes/IIbcQueryClient.ts +++ b/src/interfaces/classes/IIbcQueryClient.ts @@ -1,11 +1,13 @@ -import type {IWebsocketCore} from '@/interfaces' -import type {StargateClient} from '@cosmjs/stargate' -import type {TQueryLibrary} from "@/types"; +import type { IWebsocketCore } from '@/interfaces' +import type { StargateClient } from '@cosmjs/stargate' +import type { TQueryLibrary } from '@/types' /** * @interface IIbcQueryClient * @extends StargateClient - [More here](https://cosmos.github.io/cosmjs/latest/stargate/classes/StargateClient.html) */ -export interface IIbcQueryClient extends StargateClient, IWebsocketCore { - readonly queries: TQ +export interface IIbcQueryClient + extends StargateClient, + IWebsocketCore { + readonly queries: TQ } diff --git a/src/interfaces/classes/IIbcSigningClient.ts b/src/interfaces/classes/IIbcSigningClient.ts index c154db8..e3e117f 100644 --- a/src/interfaces/classes/IIbcSigningClient.ts +++ b/src/interfaces/classes/IIbcSigningClient.ts @@ -1,6 +1,6 @@ -import type {SigningStargateClient} from '@cosmjs/stargate' +import type { SigningStargateClient } from '@cosmjs/stargate' import type { DDeliverTxResponse, DEncodeObject, TQueryLibrary, TTxLibrary } from '@/types' -import type {ISignAndBroadcastOptions, IWebsocketCore} from '@/interfaces' +import type { ISignAndBroadcastOptions, IWebsocketCore } from '@/interfaces' /** * @interface IIbcSigningClient @@ -9,20 +9,22 @@ import type {ISignAndBroadcastOptions, IWebsocketCore} from '@/interfaces' * @property {TTxLibrary} txLibrary * @property {selfSignAndBroadcast} selfSignAndBroadcast */ -export interface IIbcSigningClient - extends SigningStargateClient, +export interface IIbcSigningClient< + TQ extends TQueryLibrary, + TT extends TTxLibrary, +> extends SigningStargateClient, IWebsocketCore { - readonly queries: TQ - readonly txLibrary: TT + readonly queries: TQ + readonly txLibrary: TT - /** - * @function selfSignAndBroadcast - * @param {DEncodeObject[]} msgs - * @param {ISignAndBroadcastOptions} [options] - * @returns Promise - */ - selfSignAndBroadcast( - msgs: DEncodeObject[], - options?: ISignAndBroadcastOptions, - ): Promise + /** + * @function selfSignAndBroadcast + * @param {DEncodeObject[]} msgs + * @param {ISignAndBroadcastOptions} [options] + * @returns Promise + */ + selfSignAndBroadcast( + msgs: DEncodeObject[], + options?: ISignAndBroadcastOptions, + ): Promise } diff --git a/src/interfaces/classes/IWebsocketCore.ts b/src/interfaces/classes/IWebsocketCore.ts index 00901a4..f5be6f2 100644 --- a/src/interfaces/classes/IWebsocketCore.ts +++ b/src/interfaces/classes/IWebsocketCore.ts @@ -1,5 +1,5 @@ import { IIbcDeafenBundle, IIbcDisengageBundle, IIbcEngageBundle } from '@/interfaces' -import type {TPossibleTxEvents} from '@/types' +import type { TPossibleTxEvents } from '@/types' /** * @interface IWebsocketCore @@ -7,24 +7,24 @@ import type {TPossibleTxEvents} from '@/types' * @property {disengage} disengage */ export interface IWebsocketCore { - /** - * @function monitor - * @param {IIbcEngageBundle | IIbcEngageBundle[]} connections - * @returns {Promise} - */ - monitor( - connections: IIbcEngageBundle | IIbcEngageBundle[], - ): Promise + /** + * @function monitor + * @param {IIbcEngageBundle | IIbcEngageBundle[]} connections + * @returns {Promise} + */ + monitor( + connections: IIbcEngageBundle | IIbcEngageBundle[], + ): Promise - /** - * @function disengage - * @param {IIbcDisengageBundle | IIbcDisengageBundle[]} connections - */ - disengage(connections: IIbcDisengageBundle | IIbcDisengageBundle[]): void + /** + * @function disengage + * @param {IIbcDisengageBundle | IIbcDisengageBundle[]} connections + */ + disengage(connections: IIbcDisengageBundle | IIbcDisengageBundle[]): void - /** - * @function deafen - * @param {IIbcDeafenBundle} connection - */ - deafen(connection: IIbcDeafenBundle): void + /** + * @function deafen + * @param {IIbcDeafenBundle} connection + */ + deafen(connection: IIbcDeafenBundle): void }