Class: ShareledgerClient
@shareledgerjs/client.ShareledgerClient
Hierarchy
↳
ShareledgerClient
Constructors
constructor
• new ShareledgerClient(tmClient
, options
)
Parameters
Name | Type |
---|---|
tmClient | undefined | Tendermint34Client |
options | ClientOptions |
Inherited from
Properties
accountParser
• Protected
Readonly
accountParser: AccountParser
Inherited from
auth
• Readonly
auth: AuthQueryExtensionMethods
Inherited from
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
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
token
• Readonly
token: TokenQueryExtensionMethods
Inherited from
TokenQueryExtension.token
tx
• Readonly
tx: TxQueryExtensionMethods
Inherited from
wasm
• Readonly
wasm: WasmQueryExtensionMethods
Inherited from
WasmQueryExtension.wasm
Accessors
asset
• get
asset(): Object
Returns
Object
Name | Type |
---|---|
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
Name | Type | Default value |
---|---|---|
tx | Uint8Array | undefined |
timeoutMs | number | 60_000 |
pollIntervalMs | number | 3_000 |
Returns
Promise
<DeliverTxResponse
>
Inherited from
disconnect
▸ disconnect(): void
Returns
void
Inherited from
forceGetQueryClient
▸ Protected
forceGetQueryClient(): QueryClient
Returns
Inherited from
forceGetTmClient
▸ Protected
forceGetTmClient(): Tendermint34Client
Returns
Tendermint34Client
Inherited from
getAccount
▸ getAccount(searchAddress
): Promise
<null
| Account
>
Parameters
Name | Type |
---|---|
searchAddress | string |
Returns
Promise
<null
| Account
>
Inherited from
getBlock
▸ getBlock(height?
): Promise
<Block
>
Parameters
Name | Type |
---|---|
height? | number |
Returns
Promise
<Block
>
Inherited from
getChainId
▸ getChainId(): Promise
<string
>
Returns
Promise
<string
>
Inherited from
getHeight
▸ getHeight(): Promise
<number
>
Returns
Promise
<number
>
Inherited from
getSequence
▸ getSequence(address
): Promise
<SequenceResponse
>
Parameters
Name | Type |
---|---|
address | string |
Returns
Promise
<SequenceResponse
>
Inherited from
getTx
▸ getTx(id
): Promise
<null
| IndexedTx
>
Parameters
Name | Type |
---|---|
id | string |
Returns
Promise
<null
| IndexedTx
>
Inherited from
getTxHash
▸ getTxHash(tx
): string
Parameters
Name | Type |
---|---|
tx | string | Uint8Array |
Returns
string
Inherited from
searchTx
▸ searchTx(query
, filter?
): Promise
<readonly IndexedTx
[]>
Parameters
Name | Type |
---|---|
query | SearchTxQuery |
filter | SearchTxFilter |
Returns
Promise
<readonly IndexedTx
[]>
Inherited from
connect
▸ Static
connect(endpoint
, options?
): Promise
<ShareledgerClient
>
Parameters
Name | Type |
---|---|
endpoint | string | HttpEndpoint |
options | ClientOptions |
Returns
Promise
<ShareledgerClient
>