Skip to main content

Class: ShareledgerClient

@shareledgerjs/client.ShareledgerClient

Hierarchy

Constructors

constructor

new ShareledgerClient(tmClient, options)

Parameters

NameType
tmClientundefined | Tendermint34Client
optionsClientOptions

Inherited from

Client.constructor

Properties

accountParser

Protected Readonly accountParser: AccountParser

Inherited from

Client.accountParser


auth

Readonly auth: AuthQueryExtensionMethods

Inherited from

Client.auth


bank

Readonly bank: BankQueryExtensionMethods

Inherited from

BankQueryExtension.bank


distribution

Readonly distribution: DistributionQueryExtensionMethods

Inherited from

DistributionQueryExtension.distribution


document

Readonly document: DocumentQueryExtensionMethods

Inherited from

DocumentQueryExtension.document


electoral

Readonly electoral: ElectoralQueryExtensionMethods

Inherited from

ElectoralQueryExtension.electoral


feegrant

Readonly feegrant: FeegrantQueryExtensionMethods

Inherited from

FeegrantQueryExtension.feegrant


gentlemint

Readonly gentlemint: GentlemintQueryExtensionMethods

Inherited from

GentlemintQueryExtension.gentlemint


gov

Readonly gov: GovQueryExtensionMethods

Inherited from

GovQueryExtension.gov


id

Readonly id: IdQueryExtensionMethods

Inherited from

IdQueryExtension.id


nft

Readonly nft: NftQueryExtensionMethods

Inherited from

NftQueryExtension.nft


queryClient

Protected Readonly queryClient: undefined | QueryClient

Inherited from

Client.queryClient


slashing

Readonly slashing: SlashingQueryExtensionMethods

Inherited from

SlashingQueryExtension.slashing


staking

Readonly staking: StakingQueryExtensionMethods

Inherited from

StakingQueryExtension.staking


swap

Readonly swap: SwapQueryExtensionMethods

Inherited from

SwapQueryExtension.swap


tmClient

Protected Readonly tmClient: undefined | Tendermint34Client

Inherited from

Client.tmClient


token

Readonly token: TokenQueryExtensionMethods

Inherited from

TokenQueryExtension.token


tx

Readonly tx: TxQueryExtensionMethods

Inherited from

Client.tx


wasm

Readonly wasm: WasmQueryExtensionMethods

Inherited from

WasmQueryExtension.wasm

Accessors

asset

get asset(): Object

Returns

Object

NameType
asset(id: string, height?: number) => Promise<undefined | Asset>

Inherited from

AssetQueryExtension.asset

Methods

broadcastTx

broadcastTx(tx, timeoutMs?, pollIntervalMs?): Promise<DeliverTxResponse>

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.

If the transaction is included in a block, a DeliverTxResponse is returned. The caller then usually needs to check for execution success or failure.

Parameters

NameTypeDefault value
txUint8Arrayundefined
timeoutMsnumber60_000
pollIntervalMsnumber3_000

Returns

Promise<DeliverTxResponse>

Inherited from

Client.broadcastTx


disconnect

disconnect(): void

Returns

void

Inherited from

Client.disconnect


forceGetQueryClient

Protected forceGetQueryClient(): QueryClient

Returns

QueryClient

Inherited from

Client.forceGetQueryClient


forceGetTmClient

Protected forceGetTmClient(): Tendermint34Client

Returns

Tendermint34Client

Inherited from

Client.forceGetTmClient


getAccount

getAccount(searchAddress): Promise<null | Account>

Parameters

NameType
searchAddressstring

Returns

Promise<null | Account>

Inherited from

Client.getAccount


getBlock

getBlock(height?): Promise<Block>

Parameters

NameType
height?number

Returns

Promise<Block>

Inherited from

Client.getBlock


getChainId

getChainId(): Promise<string>

Returns

Promise<string>

Inherited from

Client.getChainId


getHeight

getHeight(): Promise<number>

Returns

Promise<number>

Inherited from

Client.getHeight


getSequence

getSequence(address): Promise<SequenceResponse>

Parameters

NameType
addressstring

Returns

Promise<SequenceResponse>

Inherited from

Client.getSequence


getTx

getTx(id): Promise<null | IndexedTx>

Parameters

NameType
idstring

Returns

Promise<null | IndexedTx>

Inherited from

Client.getTx


getTxHash

getTxHash(tx): string

Parameters

NameType
txstring | Uint8Array

Returns

string

Inherited from

Client.getTxHash


searchTx

searchTx(query, filter?): Promise<readonly IndexedTx[]>

Parameters

NameType
querySearchTxQuery
filterSearchTxFilter

Returns

Promise<readonly IndexedTx[]>

Inherited from

Client.searchTx


connect

Static connect(endpoint, options?): Promise<ShareledgerClient>

Parameters

NameType
endpointstring | HttpEndpoint
optionsClientOptions

Returns

Promise<ShareledgerClient>