Class: ShareledgerSigningClient
@shareledgerjs/client.ShareledgerSigningClient
Hierarchy
↳
ShareledgerSigningClient
Constructors
constructor
• new ShareledgerSigningClient(tmClient, signer?, options?)
Parameters
| Name | Type |
|---|---|
tmClient | undefined | Tendermint34Client |
signer? | OfflineSigner |
options | SigningOptions |
Inherited from
Properties
accountParser
• Protected Readonly accountParser: AccountParser
Inherited from
asset
• asset: { asset: (id: string, height?: number) => Promise<undefined | Asset> } & { create: (uuid: string, hash: Uint8Array, status: boolean, rate: Long, creator: string) => MsgCreateAssetEncodeObject ; delete: (uuid: string, owner: string) => MsgDeleteAssetEncodeObject ; update: (uuid: string, hash: Uint8Array, status: boolean, rate: Long, creator: string) => MsgUpdateAssetEncodeObject }
Inherited from
AssetExtension.asset
auth
• Readonly auth: AuthQueryExtensionMethods
Inherited from
bank
• Readonly bank: BankQueryExtensionMethods & BankTxExtensionMethods
Inherited from
BankExtension.bank
broadcastPollIntervalMs
• Optional Readonly broadcastPollIntervalMs: number
Inherited from
SigningClient.broadcastPollIntervalMs
broadcastTimeoutMs
• Optional Readonly broadcastTimeoutMs: number
Inherited from
SigningClient.broadcastTimeoutMs
distribution
• Readonly distribution: DistributionQueryExtensionMethods & DistributionTxExtensionMethods
Inherited from
DistributionExtension.distribution
document
• Readonly document: DocumentQueryExtensionMethods & DocumentTxExtensionMethods
Inherited from
DocumentExtension.document
electoral
• Readonly electoral: ElectoralQueryExtensionMethods & ElectoralTxExtensionMethods
Inherited from
ElectoralExtension.electoral
feegrant
• Readonly feegrant: FeegrantQueryExtensionMethods & FeegrantTxExtensionMethods
Inherited from
FeegrantExtension.feegrant
gasPrice
• Protected Optional Readonly gasPrice: GasPrice
Inherited from
gentlemint
• Readonly gentlemint: GentlemintQueryExtensionMethods & GentlemintTxExtensionMethods
Inherited from
GentlemintExtension.gentlemint
gov
• Readonly gov: GovQueryExtensionMethods & GovTxExtensionMethods
Inherited from
GovExtension.gov
id
• Readonly id: IdQueryExtensionMethods & IdTxExtensionMethods
Inherited from
IdExtension.id
nft
• Readonly nft: NftQueryExtensionMethods & NftTxExtensionMethods
Inherited from
NftExtension.nft
queryClient
• Protected Readonly queryClient: undefined | QueryClient
Inherited from
registry
• Readonly registry: Registry
Inherited from
slashing
• Readonly slashing: SlashingQueryExtensionMethods & SlashingTxExtensionMethods
Inherited from
SlashingExtension.slashing
staking
• Readonly staking: StakingQueryExtensionMethods & StakingTxExtensionMethods
Inherited from
StakingExtension.staking
swap
• Readonly swap: SwapQueryExtensionMethods & SwapTxExtensionMethods
Inherited from
SwapExtension.swap
tmClient
• Protected Readonly tmClient: undefined | Tendermint34Client
Inherited from
token
• Readonly token: TokenQueryExtensionMethods & TokenTxExtensionMethods
Inherited from
TokenExtension.token
tx
• Readonly tx: TxQueryExtensionMethods
Inherited from
wasm
• Readonly wasm: WasmQueryExtensionMethods & WasmTxExtensionMethods
Inherited from
WasmExtension.wasm
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
estimate
▸ estimate(signerAddress, messages, memo?, fee?): Promise<{ amount: Coin[] ; gas: string }>
Parameters
| Name | Type |
|---|---|
signerAddress | string |
messages | readonly EncodeObject[] |
memo? | string |
fee? | number | StdFee |
Returns
Promise<{ amount: Coin[] ; gas: string }>
forceGetQueryClient
▸ Protected forceGetQueryClient(): QueryClient
Returns
Inherited from
SigningClient.forceGetQueryClient
forceGetSigner
▸ Protected forceGetSigner(): OfflineSigner
Returns
OfflineSigner
Inherited from
forceGetTmClient
▸ Protected forceGetTmClient(): Tendermint34Client
Returns
Tendermint34Client
Inherited from
SigningClient.forceGetTmClient
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
getSignerAccount
▸ getSignerAccount(): Promise<AccountData>
Returns
Promise<AccountData>
Inherited from
SigningClient.getSignerAccount
getSignerAccounts
▸ getSignerAccounts(): Promise<readonly AccountData[]>
Returns
Promise<readonly AccountData[]>
Inherited from
SigningClient.getSignerAccounts
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
sign
▸ sign(signerAddress, messages, fee?, memo?, explicitSignerData?): Promise<Uint8Array>
Gets account number and sequence from the API, creates a sign doc, creates a single signature and assembles the signed transaction.
The sign mode (SIGN_MODE_DIRECT or SIGN_MODE_LEGACY_AMINO_JSON) is determined by this client's signer.
You can pass signer data (account number, sequence and chain ID) explicitly instead of querying them from the chain. This is needed when signing for a multisig account, but it also allows for offline signing (See the SigningStargateClient.offline constructor).
Parameters
| Name | Type |
|---|---|
signerAddress | string |
messages | readonly EncodeObject[] |
fee? | number | StdFee |
memo? | string |
explicitSignerData? | SignerData |
Returns
Promise<Uint8Array>
Inherited from
signAndBroadcast
▸ signAndBroadcast(signerAddress, messages, fee?, memo?, explicitSignerData?): Promise<DeliverTxResponse>
Parameters
| Name | Type |
|---|---|
signerAddress | string |
messages | readonly EncodeObject[] |
fee? | number | StdFee |
memo? | string |
explicitSignerData? | SignerData |
Returns
Promise<DeliverTxResponse>
Inherited from
SigningClient.signAndBroadcast
simulate
▸ simulate(signerAddress, messages, memo?, fee?): Promise<number>
Parameters
| Name | Type |
|---|---|
signerAddress | string |
messages | readonly EncodeObject[] |
memo? | string |
fee? | StdFee |
Returns
Promise<number>
Inherited from
withSigner
▸ withSigner(signer): Promise<ShareledgerSigningClient>
Parameters
| Name | Type |
|---|---|
signer | string | Uint8Array | OfflineSigner |
Returns
Promise<ShareledgerSigningClient>
Inherited from
withoutSigner
▸ withoutSigner(): ShareledgerSigningClient
Returns
Inherited from
connect
▸ Static connect(endpoint, options?): Promise<ShareledgerSigningClient>
Parameters
| Name | Type |
|---|---|
endpoint | string | HttpEndpoint |
options? | SigningOptions |
Returns
Promise<ShareledgerSigningClient>
connectWithSigner
▸ Static connectWithSigner(endpoint, mnemonic, options?): Promise<ShareledgerSigningClient>
Connect with blockchain RPC using mnemonic
Parameters
| Name | Type | Description |
|---|---|---|
endpoint | string | HttpEndpoint | RPC endpoint |
mnemonic | string | Mnemonic |
options? | SigningOptions | Signing options |
Returns
Promise<ShareledgerSigningClient>
▸ Static connectWithSigner(endpoint, privKey, options?): Promise<ShareledgerSigningClient>
Connect with blockchain RPC using private key
Parameters
| Name | Type | Description |
|---|---|---|
endpoint | string | HttpEndpoint | RPC endpoint |
privKey | string | Uint8Array | Private key |
options? | SigningOptions | Signing options |
Returns
Promise<ShareledgerSigningClient>
▸ Static connectWithSigner(endpoint, signer, options?): Promise<ShareledgerSigningClient>
Connect with blockchain RPC using offline signer
Parameters
| Name | Type | Description |
|---|---|---|
endpoint | string | HttpEndpoint | RPC endpoint |
signer | OfflineSigner | Signer |
options? | SigningOptions | Signing options |
Returns
Promise<ShareledgerSigningClient>
createSigner
▸ Static Protected createSigner(input): Promise<OfflineDirectSigner>
Parameters
| Name | Type |
|---|---|
input | string | Uint8Array |
Returns
Promise<OfflineDirectSigner>
offline
▸ Static offline(mnemonic, options?): Promise<ShareledgerSigningClient>
Parameters
| Name | Type |
|---|---|
mnemonic | string |
options? | SigningOptions |
Returns
Promise<ShareledgerSigningClient>
▸ Static offline(privKey, options?): Promise<ShareledgerSigningClient>
Parameters
| Name | Type |
|---|---|
privKey | string | Uint8Array |
options? | SigningOptions |
Returns
Promise<ShareledgerSigningClient>
▸ Static offline(signer, options?): Promise<ShareledgerSigningClient>
Parameters
| Name | Type |
|---|---|
signer | OfflineSigner |
options? | SigningOptions |
Returns
Promise<ShareledgerSigningClient>