Generates an encrypted serialization of this wallet.
Parameters
password: string
The user provided password used to generate an encryption key via a KDF.
This is not normalized internally (see "Unicode normalization" to learn more).
Generates an encrypted serialization of this wallet.
This is an advanced alternative to calling serialize(password) directly, which allows you to
offload the KDF execution to a non-UI thread (e.g. in a WebWorker).
The caller is responsible for ensuring the key was derived with the given KDF options. If this
is not the case, the wallet cannot be restored with the original password.
Restores a wallet from an encrypted serialization.
Parameters
serialization: string
password: string
The user provided password used to generate an encryption key via a KDF.
This is not normalized internally (see "Unicode normalization" to learn more).
Restores a wallet from an encrypted serialization.
This is an advanced alternative to calling deserialize(serialization, password) directly, which allows
you to offload the KDF execution to a non-UI thread (e.g. in a WebWorker).
The caller is responsible for ensuring the key was derived with the given KDF configuration. This can be
done using extractKdfConfiguration(serialization) and executeKdf(password, kdfConfiguration) from this package.
\ No newline at end of file
diff --git a/latest/amino/modules.html b/latest/amino/modules.html
index dc33cdf11f..03e5350b46 100644
--- a/latest/amino/modules.html
+++ b/latest/amino/modules.html
@@ -1,49 +1,49 @@
-@cosmjs/amino Documentation
If your values do not exceed the safe integer range of JS numbers (53 bit),
you can use the number type here. This is the case for all typical Cosmos SDK
chains that use the default 6 decimals.
In case you need to supportr larger values, use unsigned integer strings instead.
getCodes() returns all codes and is just looping through all pagination pages.
This is potentially inefficient and advanced apps should consider creating
their own query client to handle pagination together with the app's screens.
getContracts() returns all contract instances for one code and is just looping through all pagination pages.
This is potentially inefficient and advanced apps should consider creating
their own query client to handle pagination together with the app's screens.
getCodes() returns all codes and is just looping through all pagination pages.
This is potentially inefficient and advanced apps should consider creating
their own query client to handle pagination together with the app's screens.
getContracts() returns all contract instances for one code and is just looping through all pagination pages.
This is potentially inefficient and advanced apps should consider creating
their own query client to handle pagination together with the app's screens.
A bech32 encoded address of an admin account.
Caution: an admin has the privilege to upgrade a contract. If this is not desired, do not set this value.
-
OptionalReadonly funds
funds?:readonly Coin[]
+
OptionalReadonly funds
funds?:readonly Coin[]
The funds that are transferred from the sender to the newly created contract.
The funds are transferred as part of the message execution after the contract address is
created and before the instantiation message is executed by the contract.
Makes a smart query on the contract and parses the response as JSON.
Throws error if no such contract exists, the query format is invalid or the response is invalid.
\ No newline at end of file
diff --git a/latest/cosmwasm-stargate/modules.html b/latest/cosmwasm-stargate/modules.html
index 4426dcc9f9..15a730d3b2 100644
--- a/latest/cosmwasm-stargate/modules.html
+++ b/latest/cosmwasm-stargate/modules.html
@@ -1,12 +1,12 @@
-@cosmjs/cosmwasm-stargate Documentation
An object containing a parsed JSON document. The result of JSON.parse().
This doesn't provide any type safety over any but expresses intent in the code.
This type is returned by queryContractSmart.
-
Variables
Const cosmWasmTypes
cosmWasmTypes:AminoConverters = ...
deprecated
use createWasmAminoConverters()
-
Functions
createWasmAminoConverters
createWasmAminoConverters(): AminoConverters
Returns AminoConverters
fromBinary
fromBinary(base64: string): any
+
Variables
Const cosmWasmTypes
cosmWasmTypes:AminoConverters = ...
deprecated
use createWasmAminoConverters()
+
Functions
createWasmAminoConverters
createWasmAminoConverters(): AminoConverters
Returns AminoConverters
fromBinary
fromBinary(base64: string): any
Takes a base64 string, decodes it and parses the content from JSON to an object.
This can be used for parsing the values of a CosmWasm Binary field.
A simple custom encoding that encodes the extended signature as
r (32 bytes) | s (32 bytes) | recovery param (1 byte)
where | denotes concatenation of bonary data.
The type itself does not give you any guarantee if this is
compressed or uncompressed. If you are unsure where the data
is coming from, use Secp256k1.compressPubkey or
Secp256k1.uncompressPubkey (both idempotent) before processing it.
\ No newline at end of file
diff --git a/latest/crypto/modules.html b/latest/crypto/modules.html
index f32a079271..089f80f95f 100644
--- a/latest/crypto/modules.html
+++ b/latest/crypto/modules.html
@@ -1,4 +1,4 @@
-@cosmjs/crypto Documentation
This class is deprecated and will be removed soon. Please use fromBech32() and toBech32() instead. For more details please refer to https://github.com/cosmos/cosmjs/issues/1053.
This class is deprecated and will be removed soon. Please use fromBech32() and toBech32() instead. For more details please refer to https://github.com/cosmos/cosmjs/issues/1053.
This class is deprecated and will be removed soon. Please use fromBech32() and toBech32() instead. For more details please refer to https://github.com/cosmos/cosmjs/issues/1053.
This class is deprecated and will be removed soon. Please use fromBech32() and toBech32() instead. For more details please refer to https://github.com/cosmos/cosmjs/issues/1053.
This class is deprecated and will be removed soon. Please use fromBech32() and toBech32() instead. For more details please refer to https://github.com/cosmos/cosmjs/issues/1053.
\ No newline at end of file
diff --git a/latest/encoding/modules.html b/latest/encoding/modules.html
index 946cb0e796..74abaef577 100644
--- a/latest/encoding/modules.html
+++ b/latest/encoding/modules.html
@@ -1,9 +1,9 @@
-@cosmjs/encoding Documentation
In lossy mode, the replacement character � is used to substitude invalid
encodings. By default lossy mode is off and invalid data will lead to exceptions.
-
Parameters
data: Uint8Array
lossy: boolean = false
Returns string
normalizeBech32
normalizeBech32(address: string): string
+
Parameters
data: Uint8Array
lossy: boolean = false
Returns string
normalizeBech32
normalizeBech32(address: string): string
Takes a bech32 address and returns a normalized (i.e. lower case) representation of it.
The input is validated along the way, which makes this significantly safer than
using address.toLowerCase().
\ No newline at end of file
diff --git a/latest/json-rpc/classes/JsonRpcClient.html b/latest/json-rpc/classes/JsonRpcClient.html
index b615950c97..cf80d191b2 100644
--- a/latest/json-rpc/classes/JsonRpcClient.html
+++ b/latest/json-rpc/classes/JsonRpcClient.html
@@ -2,4 +2,4 @@
A thin wrapper that is used to bring together requests and responses by ID.
Using this class is only advised for continous communication channels like
WebSockets or WebWorker messaging.
\ No newline at end of file
diff --git a/latest/json-rpc/modules.html b/latest/json-rpc/modules.html
index b29ede4f4b..f67e0d284f 100644
--- a/latest/json-rpc/modules.html
+++ b/latest/json-rpc/modules.html
@@ -1,18 +1,18 @@
-@cosmjs/json-rpc Documentation
Returns a JsonRpcErrorResponse if input can be parsed as a JSON-RPC error. Otherwise parses
input as JsonRpcSuccessResponse. Throws if input is neither a valid error nor success response.
Shows the user's address in the device and returns an address/pubkey pair.
The address will be shown with the native prefix of the app (e.g. cosmos, persistence, desmos)
and does not support the usage of other address prefixes.
Shows the user's address in the device and returns an address/pubkey pair.
The address will be shown with the native prefix of the app (e.g. cosmos, persistence, desmos)
and does not support the usage of other address prefixes.
Parameters
Optional path: HdPath
The HD path to show the address for. If unset, this is the first account.
Generates an encrypted serialization of this wallet.
Parameters
password: string
The user provided password used to generate an encryption key via a KDF.
This is not normalized internally (see "Unicode normalization" to learn more).
Generates an encrypted serialization of this wallet.
This is an advanced alternative to calling serialize(password) directly, which allows you to
offload the KDF execution to a non-UI thread (e.g. in a WebWorker).
The caller is responsible for ensuring the key was derived with the given KDF options. If this
is not the case, the wallet cannot be restored with the original password.
Restores a wallet from an encrypted serialization.
Parameters
serialization: string
password: string
The user provided password used to generate an encryption key via a KDF.
This is not normalized internally (see "Unicode normalization" to learn more).
Restores a wallet from an encrypted serialization.
This is an advanced alternative to calling deserialize(serialization, password) directly, which allows
you to offload the KDF execution to a non-UI thread (e.g. in a WebWorker).
The caller is responsible for ensuring the key was derived with the given KDF configuration. This can be
done using extractKdfConfiguration(serialization) and executeKdf(password, kdfConfiguration) from this package.
Creates a new Registry for mapping protobuf type identifiers/type URLs to
actual implementations. Those implementations are typically generated with ts-proto
but we also support protobuf.js as a type generator.
@@ -9,18 +9,18 @@ for historic reasons. Those can be overriden by customTypes.
Looks up a type that was previously added to the registry.
The generator information (ts-proto or pbjs) gets lost along the way.
If you need to work with the result type in TypeScript, you can use:
import { assert } from"@cosmjs/utils";
constCoin = registry.lookupType("/cosmos.base.v1beta1.Coin"); assert(Coin); // Ensures not unset assert(isTsProtoGeneratedType(Coin)); // Ensures this is the type we expect
- Preparing search index...
- The search index is not available
@cosmjs/amino DocumentationClass Secp256k1HdWallet
Hierarchy
Implements
Index
Constructors
Accessors
Methods
Constructors
Protected constructor
Parameters
mnemonic: EnglishMnemonic
options: Secp256k1HdWalletConstructorOptions
Returns Secp256k1HdWallet
Accessors
mnemonic
Returns string
Methods
get Accounts
Get AccountData array from wallet. Rejects if not enabled.
-Returns Promise<readonly AccountData[]>
serialize
Returns Promise<readonly AccountData[]>
serialize
Generates an encrypted serialization of this wallet.
Parameters
password: string
The user provided password used to generate an encryption key via a KDF. This is not normalized internally (see "Unicode normalization" to learn more).
-Returns Promise<string>
serialize With Encryption Key
Returns Promise<string>
serialize With Encryption Key
Generates an encrypted serialization of this wallet.
This is an advanced alternative to calling
serialize(password)
directly, which allows you to offload the KDF execution to a non-UI thread (e.g. in a WebWorker).The caller is responsible for ensuring the key was derived with the given KDF options. If this is not the case, the wallet cannot be restored with the original password.
-Parameters
encryptionKey: Uint8Array
kdfConfiguration: KdfConfiguration
Returns Promise<string>
sign Amino
Parameters
encryptionKey: Uint8Array
kdfConfiguration: KdfConfiguration
Returns Promise<string>
sign Amino
Request signature from whichever key corresponds to provided bech32-encoded address. Rejects if not enabled.
The signer implementation may offer the user the ability to override parts of the signDoc. It must return the doc that was signed in the response.
-Parameters
signerAddress: string
signDoc: StdSignDoc
Returns Promise<AminoSignResponse>
Static deserialize
Parameters
signerAddress: string
signDoc: StdSignDoc
Returns Promise<AminoSignResponse>
Static deserialize
Restores a wallet from an encrypted serialization.
Parameters
serialization: string
password: string
The user provided password used to generate an encryption key via a KDF. This is not normalized internally (see "Unicode normalization" to learn more).
-Returns Promise<Secp256k1HdWallet>
Static deserialize With Encryption Key
Returns Promise<Secp256k1HdWallet>
Static deserialize With Encryption Key
Restores a wallet from an encrypted serialization.
This is an advanced alternative to calling
deserialize(serialization, password)
directly, which allows you to offload the KDF execution to a non-UI thread (e.g. in a WebWorker).The caller is responsible for ensuring the key was derived with the given KDF configuration. This can be done using
-extractKdfConfiguration(serialization)
andexecuteKdf(password, kdfConfiguration)
from this package.Parameters
serialization: string
encryptionKey: Uint8Array
Returns Promise<Secp256k1HdWallet>
Static from Mnemonic
Parameters
serialization: string
encryptionKey: Uint8Array
Returns Promise<Secp256k1HdWallet>
Static from Mnemonic
Restores a wallet from the given BIP39 mnemonic.
Parameters
mnemonic: string
Any valid English mnemonic.
options: Partial<Secp256k1HdWalletOptions> = {}
An optional
-Secp256k1HdWalletOptions
object optionally containing a bip39Password, hdPaths, and prefix.Returns Promise<Secp256k1HdWallet>
Static generate
Returns Promise<Secp256k1HdWallet>
Static generate
Generates a new wallet with a BIP39 mnemonic of the given length.
Parameters
length: 12 | 15 | 18 | 21 | 24 = 12
The number of words in the mnemonic (12, 15, 18, 21 or 24).
diff --git a/latest/amino/classes/Secp256k1Wallet.html b/latest/amino/classes/Secp256k1Wallet.html index 1722ba7115..aa9689bcd8 100644 --- a/latest/amino/classes/Secp256k1Wallet.html +++ b/latest/amino/classes/Secp256k1Wallet.html @@ -1,13 +1,13 @@- Preparing search index...
- The search index is not available
@cosmjs/amino DocumentationClass Secp256k1Wallet
A wallet that holds a single secp256k1 keypair.
If you want to work with BIP39 mnemonics and multiple accounts, use Secp256k1HdWallet.
-Hierarchy
Implements
Index
Methods
Methods
get Accounts
Hierarchy
Implements
Index
Methods
Methods
get Accounts
Get AccountData array from wallet. Rejects if not enabled.
-Returns Promise<readonly AccountData[]>
sign Amino
Returns Promise<readonly AccountData[]>
sign Amino
Request signature from whichever key corresponds to provided bech32-encoded address. Rejects if not enabled.
The signer implementation may offer the user the ability to override parts of the signDoc. It must return the doc that was signed in the response.
-Parameters
signerAddress: string
signDoc: StdSignDoc
Returns Promise<AminoSignResponse>
Static from Key
Parameters
signerAddress: string
signDoc: StdSignDoc
Returns Promise<AminoSignResponse>
Static from Key
Creates a Secp256k1Wallet from the given private key
Parameters
privkey: Uint8Array
The private key.
diff --git a/latest/amino/interfaces/AccountData.html b/latest/amino/interfaces/AccountData.html index 0f252986d7..55e4ee05d0 100644 --- a/latest/amino/interfaces/AccountData.html +++ b/latest/amino/interfaces/AccountData.html @@ -1,3 +1,3 @@ -- Preparing search index...
- The search index is not available
@cosmjs/amino DocumentationInterface AccountData
Hierarchy
Index
Properties
Properties
Readonly address
- Preparing search index...
- The search index is not available
@cosmjs/amino DocumentationInterface AccountData
Hierarchy
Index
Properties
Properties
Readonly address
A printable address (typically bech32 encoded)
-Readonly algo
Readonly pubkey
Generated using TypeDoc
Readonly algo
Readonly pubkey
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/amino DocumentationInterface AminoMsg
Hierarchy
Index
Properties
Properties
Readonly type
Readonly value
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/amino DocumentationInterface AminoMsg
Hierarchy
Index
Properties
Properties
Readonly type
Readonly value
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/amino DocumentationInterface AminoSignResponse
Hierarchy
Index
Properties
Properties
Readonly signature
Readonly signed
- Preparing search index...
- The search index is not available
@cosmjs/amino DocumentationInterface AminoSignResponse
Hierarchy
Index
Properties
Properties
Readonly signature
Readonly signed
The sign doc that was signed. This may be different from the input signDoc when the signer modifies it as part of the signing process.
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/amino DocumentationInterface Coin
Hierarchy
Index
Properties
Properties
Readonly amount
Readonly denom
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/amino DocumentationInterface Coin
Hierarchy
Index
Properties
Properties
Readonly amount
Readonly denom
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/amino DocumentationInterface Ed25519Pubkey
Hierarchy
Index
Properties
Properties
Readonly type
Readonly value
- Preparing search index...
- The search index is not available
@cosmjs/amino DocumentationInterface Ed25519Pubkey
Hierarchy
Index
Properties
Properties
Readonly type
Readonly value
The base64 encoding of the Amino binary encoded pubkey.
Note: if type is Secp256k1, this must contain a 33 bytes compressed pubkey.
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/amino DocumentationInterface KdfConfiguration
Hierarchy
Index
Properties
Properties
Readonly algorithm
- Preparing search index...
- The search index is not available
@cosmjs/amino DocumentationInterface KdfConfiguration
Hierarchy
Index
Properties
Properties
Readonly algorithm
An algorithm identifier, such as "argon2id" or "scrypt".
-Readonly params
Readonly params
A map of algorithm-specific parameters
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/amino DocumentationInterface MultisigThresholdPubkey
Hierarchy
Index
Properties
Properties
Readonly type
Readonly value
Type declaration
Readonly pubkeys: readonly SinglePubkey[]
Readonly threshold: string
- Preparing search index...
- The search index is not available
@cosmjs/amino DocumentationInterface MultisigThresholdPubkey
Hierarchy
Index
Properties
Properties
Readonly type
Readonly value
Type declaration
Readonly pubkeys: readonly SinglePubkey[]
Readonly threshold: string
A string-encoded integer
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/amino DocumentationInterface OfflineAminoSigner
Hierarchy
Implemented by
Index
Methods
Methods
Readonly get Accounts
- Preparing search index...
- The search index is not available
@cosmjs/amino DocumentationInterface OfflineAminoSigner
Hierarchy
Implemented by
Index
Methods
Methods
Readonly get Accounts
Get AccountData array from wallet. Rejects if not enabled.
-Returns Promise<readonly AccountData[]>
Readonly sign Amino
Returns Promise<readonly AccountData[]>
Readonly sign Amino
Request signature from whichever key corresponds to provided bech32-encoded address. Rejects if not enabled.
The signer implementation may offer the user the ability to override parts of the signDoc. It must return the doc that was signed in the response.
diff --git a/latest/amino/interfaces/Pubkey.html b/latest/amino/interfaces/Pubkey.html index e23df5545d..e1bc8d5c0c 100644 --- a/latest/amino/interfaces/Pubkey.html +++ b/latest/amino/interfaces/Pubkey.html @@ -1 +1 @@ -- Preparing search index...
- The search index is not available
@cosmjs/amino DocumentationInterface Pubkey
Hierarchy
Index
Properties
Properties
Readonly type
Readonly value
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/amino DocumentationInterface Pubkey
Hierarchy
Index
Properties
Properties
Readonly type
Readonly value
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/amino DocumentationInterface Secp256k1HdWalletOptions
Hierarchy
Index
Properties
Properties
Readonly bip39 Password
- Preparing search index...
- The search index is not available
@cosmjs/amino DocumentationInterface Secp256k1HdWalletOptions
Hierarchy
Index
Properties
Properties
Readonly bip39 Password
The password to use when deriving a BIP39 seed from a mnemonic.
-Readonly hd Paths
Readonly hd Paths
The BIP-32/SLIP-10 derivation paths. Defaults to the Cosmos Hub/ATOM path
-m/44'/118'/0'/0/0
.Readonly prefix
Readonly prefix
The bech32 address prefix (human readable part). Defaults to "cosmos".
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/amino DocumentationInterface Secp256k1Pubkey
Hierarchy
Index
Properties
Properties
Readonly type
Readonly value
- Preparing search index...
- The search index is not available
@cosmjs/amino DocumentationInterface Secp256k1Pubkey
Hierarchy
Index
Properties
Properties
Readonly type
Readonly value
The base64 encoding of the Amino binary encoded pubkey.
Note: if type is Secp256k1, this must contain a 33 bytes compressed pubkey.
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/amino DocumentationInterface SinglePubkey
A pubkey which contains the data directly without further nesting.
You can think of this as a non-multisig pubkey.
-Hierarchy
Index
Properties
Properties
Readonly type
Readonly value
Hierarchy
Index
Properties
Properties
Readonly type
Readonly value
The base64 encoding of the Amino binary encoded pubkey.
Note: if type is Secp256k1, this must contain a 33 bytes compressed pubkey.
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/amino DocumentationInterface StdFee
Hierarchy
Index
Properties
Properties
Readonly amount
Readonly gas
Optional Readonly granter
- Preparing search index...
- The search index is not available
@cosmjs/amino DocumentationInterface StdFee
Hierarchy
Index
Properties
Properties
Readonly amount
Readonly gas
Optional Readonly granter
The granter address that is used for paying with feegrants
-Optional Readonly payer
Optional Readonly payer
The fee payer address. The payer must have signed the transaction.
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/amino DocumentationInterface StdSignDoc
The document to be signed
https://docs.cosmos.network/master/modules/auth/03_types.html#stdsigndoc
-Hierarchy
Index
Properties
Properties
Readonly account_ number
Readonly chain_ id
Readonly fee
Readonly memo
Readonly msgs
Readonly sequence
Generated using TypeDoc
Hierarchy
Index
Properties
Properties
Readonly account_ number
Readonly chain_ id
Readonly fee
Readonly memo
Readonly msgs
Readonly sequence
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/amino DocumentationInterface StdSignature
Hierarchy
Index
Properties
Properties
Readonly pub_ key
Readonly signature
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/amino DocumentationInterface StdSignature
Hierarchy
Index
Properties
Properties
Readonly pub_ key
Readonly signature
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/amino DocumentationInterface StdTx
A Cosmos SDK StdTx
https://docs.cosmos.network/master/modules/auth/03_types.html#stdtx
-Hierarchy
Index
Properties
Properties
Readonly fee
Readonly memo
Readonly msg
Readonly signatures
Generated using TypeDoc
Hierarchy
Index
Properties
Properties
Readonly fee
Readonly memo
Readonly msg
Readonly signatures
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/amino Documentation@cosmjs/amino Documentation
Index
Classes
Interfaces
Type Aliases
Variables
Functions
Type Aliases
Algo
Variables
Const pubkey Type
Type declaration
ed25519: "tendermint/PubKeyEd25519"
https://github.com/tendermint/tendermint/blob/v0.33.0/crypto/secp256k1/secp256k1.go#L23
+- Preparing search index...
- The search index is not available
@cosmjs/amino Documentation@cosmjs/amino Documentation
Index
Classes
Interfaces
Type Aliases
Variables
Functions
Type Aliases
Algo
Variables
Const pubkey Type
Type declaration
ed25519: "tendermint/PubKeyEd25519"
https://github.com/tendermint/tendermint/blob/v0.33.0/crypto/secp256k1/secp256k1.go#L23
multisig Threshold: "tendermint/PubKeyMultisigThreshold"
secp256k1: "tendermint/PubKeySecp256k1"
https://github.com/tendermint/tendermint/blob/v0.33.0/crypto/ed25519/ed25519.go#L22
sr25519: "tendermint/PubKeySr25519"
https://github.com/tendermint/tendermint/blob/v0.33.0/crypto/sr25519/codec.go#L12
-Functions
add Coins
Functions
add Coins
Function to sum up coins with type Coin
-Parameters
lhs: Coin
rhs: Coin
Returns Coin
coin
Parameters
lhs: Coin
rhs: Coin
Returns Coin
coin
Creates a coin.
If your values do not exceed the safe integer range of JS numbers (53 bit), you can use the number type here. This is the case for all typical Cosmos SDK chains that use the default 6 decimals.
In case you need to supportr larger values, use unsigned integer strings instead.
-Parameters
amount: string | number
denom: string
Returns Coin
coins
Parameters
amount: string | number
denom: string
Returns Coin
coins
Creates a list of coins with one element.
-Parameters
amount: string | number
denom: string
Returns Coin[]
create Multisig Threshold Pubkey
Parameters
pubkeys: readonly SinglePubkey[]
threshold: number
nosort: boolean = false
Returns MultisigThresholdPubkey
decode Amino Pubkey
Parameters
amount: string | number
denom: string
Returns Coin[]
create Multisig Threshold Pubkey
Parameters
pubkeys: readonly SinglePubkey[]
threshold: number
nosort: boolean = false
Returns MultisigThresholdPubkey
decode Amino Pubkey
Decodes a pubkey in the Amino binary format to a type/value object.
-Parameters
data: Uint8Array
Returns Pubkey
decode Bech32 Pubkey
Parameters
data: Uint8Array
Returns Pubkey
decode Bech32 Pubkey
Decodes a bech32 pubkey to Amino binary, which is then decoded to a type/value object. The bech32 prefix is ignored and discareded.
Parameters
bechEncoded: string
the bech32 encoded pubkey
-Returns Pubkey
decode Signature
Parameters
signature: StdSignature
Returns { pubkey: Uint8Array; signature: Uint8Array }
Readonly pubkey: Uint8Array
Readonly signature: Uint8Array
encode Amino Pubkey
Returns Pubkey
decode Signature
Parameters
signature: StdSignature
Returns { pubkey: Uint8Array; signature: Uint8Array }
Readonly pubkey: Uint8Array
Readonly signature: Uint8Array
encode Amino Pubkey
Encodes a public key to binary Amino.
-Parameters
pubkey: Pubkey
Returns Uint8Array
encode Bech32 Pubkey
Parameters
pubkey: Pubkey
Returns Uint8Array
encode Bech32 Pubkey
Encodes a public key to binary Amino and then to bech32.
Parameters
pubkey: Pubkey
the public key to encode
prefix: string
the bech32 prefix (human readable part)
-Returns string
encode Ed25519 Pubkey
Returns string
encode Ed25519 Pubkey
Takes an Edd25519 public key as raw bytes and returns the Amino JSON representation of it (the type/value wrapper object).
-Parameters
pubkey: Uint8Array
Returns Ed25519Pubkey
encode Secp256k1 Pubkey
Parameters
pubkey: Uint8Array
Returns Ed25519Pubkey
encode Secp256k1 Pubkey
Takes a Secp256k1 public key as raw bytes and returns the Amino JSON representation of it (the type/value wrapper object).
-Parameters
pubkey: Uint8Array
Returns Secp256k1Pubkey
encode Secp256k1 Signature
Parameters
pubkey: Uint8Array
Returns Secp256k1Pubkey
encode Secp256k1 Signature
Takes a binary pubkey and signature to create a signature object
Parameters
pubkey: Uint8Array
a compressed secp256k1 public key
signature: Uint8Array
a 64 byte fixed length representation of secp256k1 signature components r and s
-Returns StdSignature
execute Kdf
Parameters
password: string
configuration: KdfConfiguration
Returns Promise<Uint8Array>
extract Kdf Configuration
Parameters
serialization: string
Returns KdfConfiguration
is Ed25519 Pubkey
Parameters
pubkey: Pubkey
Returns pubkey is Ed25519Pubkey
is Multisig Threshold Pubkey
Parameters
pubkey: Pubkey
Returns pubkey is MultisigThresholdPubkey
is Secp256k1 Pubkey
Parameters
pubkey: Pubkey
Returns pubkey is Secp256k1Pubkey
is Single Pubkey
Parameters
pubkey: Pubkey
Returns pubkey is SinglePubkey
is Std Tx
Parameters
txValue: unknown
Returns txValue is StdTx
make Cosmoshub Path
Returns StdSignature
execute Kdf
Parameters
password: string
configuration: KdfConfiguration
Returns Promise<Uint8Array>
extract Kdf Configuration
Parameters
serialization: string
Returns KdfConfiguration
is Ed25519 Pubkey
Parameters
pubkey: Pubkey
Returns pubkey is Ed25519Pubkey
is Multisig Threshold Pubkey
Parameters
pubkey: Pubkey
Returns pubkey is MultisigThresholdPubkey
is Secp256k1 Pubkey
Parameters
pubkey: Pubkey
Returns pubkey is Secp256k1Pubkey
is Single Pubkey
Parameters
pubkey: Pubkey
Returns pubkey is SinglePubkey
is Std Tx
Parameters
txValue: unknown
Returns txValue is StdTx
make Cosmoshub Path
The Cosmos Hub derivation path in the form
-m/44'/118'/0'/0/a
with 0-based account indexa
.Parameters
a: number
Returns HdPath
make Sign Doc
Parameters
msgs: readonly AminoMsg[]
fee: StdFee
chainId: string
memo: undefined | string
accountNumber: string | number
sequence: string | number
Returns StdSignDoc
make Std Tx
Parameters
content: Pick<StdSignDoc, "msgs" | "fee" | "memo">
signatures: StdSignature | readonly StdSignature[]
Returns StdTx
parse Coins
Parameters
a: number
Returns HdPath
make Sign Doc
Parameters
msgs: readonly AminoMsg[]
fee: StdFee
chainId: string
memo: undefined | string
accountNumber: string | number
sequence: string | number
Returns StdSignDoc
make Std Tx
Parameters
content: Pick<StdSignDoc, "msgs" | "fee" | "memo">
signatures: StdSignature | readonly StdSignature[]
Returns StdTx
parse Coins
Takes a coins list like "819966000ucosm,700000000ustake" and parses it.
A Stargate-ready variant of this function is available via:
-Parameters
input: string
Returns Coin[]
pubkey To Address
Parameters
pubkey: Pubkey
prefix: string
Returns string
pubkey To Raw Address
Parameters
pubkey: Pubkey
Returns Uint8Array
raw Ed25519 Pubkey To Raw Address
Parameters
pubkeyData: Uint8Array
Returns Uint8Array
raw Secp256k1 Pubkey To Raw Address
Parameters
pubkeyData: Uint8Array
Returns Uint8Array
serialize Sign Doc
Parameters
signDoc: StdSignDoc
Returns Uint8Array
Generated using TypeDoc
Parameters
input: string
Returns Coin[]
pubkey To Address
Parameters
pubkey: Pubkey
prefix: string
Returns string
pubkey To Raw Address
Parameters
pubkey: Pubkey
Returns Uint8Array
raw Ed25519 Pubkey To Raw Address
Parameters
pubkeyData: Uint8Array
Returns Uint8Array
raw Secp256k1 Pubkey To Raw Address
Parameters
pubkeyData: Uint8Array
Returns Uint8Array
serialize Sign Doc
Parameters
signDoc: StdSignDoc
Returns Uint8Array
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/cosmwasm-stargate DocumentationClass CosmWasmClient
Hierarchy
Index
Constructors
Methods
Constructors
Protected constructor
Parameters
tmClient: undefined | Tendermint34Client
Returns CosmWasmClient
Methods
broadcast Tx
- Preparing search index...
- The search index is not available
@cosmjs/cosmwasm-stargate DocumentationClass CosmWasmClient
Hierarchy
Index
Constructors
Methods
Constructors
Protected constructor
Parameters
tmClient: undefined | Tendermint34Client
Returns CosmWasmClient
Methods
broadcast Tx
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
tx: Uint8Array
timeoutMs: number = 60_000
pollIntervalMs: number = 3_000
Returns Promise<DeliverTxResponse>
disconnect
Returns void
Protected force Get Query Client
Returns QueryClient & AuthExtension & BankExtension & TxExtension & WasmExtension
Protected force Get Tm Client
Returns Tendermint34Client
get Account
Parameters
searchAddress: string
Returns Promise<null | Account>
get Balance
Parameters
address: string
searchDenom: string
Returns Promise<Coin>
get Block
Parameters
Optional height: number
Returns Promise<Block>
get Chain Id
Returns Promise<string>
get Code Details
Parameters
codeId: number
Returns Promise<CodeDetails>
get Codes
Parameters
tx: Uint8Array
timeoutMs: number = 60_000
pollIntervalMs: number = 3_000
Returns Promise<DeliverTxResponse>
disconnect
Returns void
Protected force Get Query Client
Returns QueryClient & AuthExtension & BankExtension & TxExtension & WasmExtension
Protected force Get Tm Client
Returns Tendermint34Client
get Account
Parameters
searchAddress: string
Returns Promise<null | Account>
get Balance
Parameters
address: string
searchDenom: string
Returns Promise<Coin>
get Block
Parameters
Optional height: number
Returns Promise<Block>
get Chain Id
Returns Promise<string>
get Code Details
Parameters
codeId: number
Returns Promise<CodeDetails>
get Codes
getCodes() returns all codes and is just looping through all pagination pages.
This is potentially inefficient and advanced apps should consider creating their own query client to handle pagination together with the app's screens.
-Returns Promise<readonly Code[]>
get Contract
Returns Promise<readonly Code[]>
get Contract
Throws an error if no contract was found at the address
-Parameters
address: string
Returns Promise<Contract>
get Contract Code History
Parameters
address: string
Returns Promise<Contract>
get Contract Code History
Throws an error if no contract was found at the address
-Parameters
address: string
Returns Promise<readonly ContractCodeHistoryEntry[]>
get Contracts
Parameters
address: string
Returns Promise<readonly ContractCodeHistoryEntry[]>
get Contracts
getContracts() returns all contract instances for one code and is just looping through all pagination pages.
This is potentially inefficient and advanced apps should consider creating their own query client to handle pagination together with the app's screens.
-Parameters
codeId: number
Returns Promise<readonly string[]>
get Height
Returns Promise<number>
Protected get Query Client
Returns undefined | QueryClient & AuthExtension & BankExtension & TxExtension & WasmExtension
get Sequence
Parameters
address: string
Returns Promise<SequenceResponse>
Protected get Tm Client
Returns undefined | Tendermint34Client
get Tx
Parameters
id: string
Returns Promise<null | IndexedTx>
query Contract Raw
Parameters
codeId: number
Returns Promise<readonly string[]>
get Height
Returns Promise<number>
Protected get Query Client
Returns undefined | QueryClient & AuthExtension & BankExtension & TxExtension & WasmExtension
get Sequence
Parameters
address: string
Returns Promise<SequenceResponse>
Protected get Tm Client
Returns undefined | Tendermint34Client
get Tx
Parameters
id: string
Returns Promise<null | IndexedTx>
query Contract Raw
Returns the data at the key if present (raw contract dependent storage data) or null if no data at this key.
Promise is rejected when contract does not exist.
-Parameters
address: string
key: Uint8Array
Returns Promise<null | Uint8Array>
query Contract Smart
Parameters
address: string
key: Uint8Array
Returns Promise<null | Uint8Array>
query Contract Smart
Makes a smart query on the contract, returns the parsed JSON document.
Promise is rejected when contract does not exist. Promise is rejected for invalid query format. Promise is rejected for invalid response format.
-Parameters
address: string
queryMsg: any
Returns Promise<any>
search Tx
Parameters
query: SearchTxQuery
filter: SearchTxFilter = {}
Returns Promise<readonly IndexedTx[]>
Static connect
Parameters
endpoint: string | HttpEndpoint
Returns Promise<CosmWasmClient>
Generated using TypeDoc
Parameters
address: string
queryMsg: any
Returns Promise<any>
search Tx
Parameters
query: SearchTxQuery
filter: SearchTxFilter = {}
Returns Promise<readonly IndexedTx[]>
Static connect
Parameters
endpoint: string | HttpEndpoint
Returns Promise<CosmWasmClient>
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/cosmwasm-stargate DocumentationClass SigningCosmWasmClient
Hierarchy
Index
Constructors
Properties
Methods
Constructors
Protected constructor
Parameters
tmClient: undefined | Tendermint34Client
signer: OfflineSigner
options: SigningCosmWasmClientOptions
Returns SigningCosmWasmClient
Properties
Readonly broadcast Poll Interval Ms
Readonly broadcast Timeout Ms
Readonly registry
Methods
broadcast Tx
- Preparing search index...
- The search index is not available
@cosmjs/cosmwasm-stargate DocumentationClass SigningCosmWasmClient
Hierarchy
Index
Constructors
Properties
Methods
Constructors
Protected constructor
Parameters
tmClient: undefined | Tendermint34Client
signer: OfflineSigner
options: SigningCosmWasmClientOptions
Returns SigningCosmWasmClient
Properties
Readonly broadcast Poll Interval Ms
Readonly broadcast Timeout Ms
Readonly registry
Methods
broadcast Tx
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
tx: Uint8Array
timeoutMs: number = 60_000
pollIntervalMs: number = 3_000
Returns Promise<DeliverTxResponse>
clear Admin
Parameters
senderAddress: string
contractAddress: string
fee: number | StdFee | "auto"
memo: string = ""
Returns Promise<ChangeAdminResult>
delegate Tokens
Parameters
delegatorAddress: string
validatorAddress: string
amount: Coin
fee: number | StdFee | "auto"
memo: string = ""
Returns Promise<DeliverTxResponse>
disconnect
Returns void
execute
Parameters
senderAddress: string
contractAddress: string
msg: any
fee: number | StdFee | "auto"
memo: string = ""
Optional funds: readonly Coin[]
Returns Promise<ExecuteResult>
execute Multiple
Parameters
tx: Uint8Array
timeoutMs: number = 60_000
pollIntervalMs: number = 3_000
Returns Promise<DeliverTxResponse>
clear Admin
Parameters
senderAddress: string
contractAddress: string
fee: number | StdFee | "auto"
memo: string = ""
Returns Promise<ChangeAdminResult>
delegate Tokens
Parameters
delegatorAddress: string
validatorAddress: string
amount: Coin
fee: number | StdFee | "auto"
memo: string = ""
Returns Promise<DeliverTxResponse>
disconnect
Returns void
execute
Parameters
senderAddress: string
contractAddress: string
msg: any
fee: number | StdFee | "auto"
memo: string = ""
Optional funds: readonly Coin[]
Returns Promise<ExecuteResult>
execute Multiple
Like
-execute
but allows executing multiple messages in one transaction.Parameters
senderAddress: string
instructions: readonly ExecuteInstruction[]
fee: number | StdFee | "auto"
memo: string = ""
Returns Promise<ExecuteResult>
Protected force Get Query Client
Returns QueryClient & AuthExtension & BankExtension & TxExtension & WasmExtension
Protected force Get Tm Client
Returns Tendermint34Client
get Account
Parameters
searchAddress: string
Returns Promise<null | Account>
get Balance
Parameters
address: string
searchDenom: string
Returns Promise<Coin>
get Block
Parameters
Optional height: number
Returns Promise<Block>
get Chain Id
Returns Promise<string>
get Code Details
Parameters
codeId: number
Returns Promise<CodeDetails>
get Codes
Parameters
senderAddress: string
instructions: readonly ExecuteInstruction[]
fee: number | StdFee | "auto"
memo: string = ""
Returns Promise<ExecuteResult>
Protected force Get Query Client
Returns QueryClient & AuthExtension & BankExtension & TxExtension & WasmExtension
Protected force Get Tm Client
Returns Tendermint34Client
get Account
Parameters
searchAddress: string
Returns Promise<null | Account>
get Balance
Parameters
address: string
searchDenom: string
Returns Promise<Coin>
get Block
Parameters
Optional height: number
Returns Promise<Block>
get Chain Id
Returns Promise<string>
get Code Details
Parameters
codeId: number
Returns Promise<CodeDetails>
get Codes
getCodes() returns all codes and is just looping through all pagination pages.
This is potentially inefficient and advanced apps should consider creating their own query client to handle pagination together with the app's screens.
-Returns Promise<readonly Code[]>
get Contract
Returns Promise<readonly Code[]>
get Contract
Throws an error if no contract was found at the address
-Parameters
address: string
Returns Promise<Contract>
get Contract Code History
Parameters
address: string
Returns Promise<Contract>
get Contract Code History
Throws an error if no contract was found at the address
-Parameters
address: string
Returns Promise<readonly ContractCodeHistoryEntry[]>
get Contracts
Parameters
address: string
Returns Promise<readonly ContractCodeHistoryEntry[]>
get Contracts
getContracts() returns all contract instances for one code and is just looping through all pagination pages.
This is potentially inefficient and advanced apps should consider creating their own query client to handle pagination together with the app's screens.
-Parameters
codeId: number
Returns Promise<readonly string[]>
get Height
Returns Promise<number>
Protected get Query Client
Returns undefined | QueryClient & AuthExtension & BankExtension & TxExtension & WasmExtension
get Sequence
Parameters
address: string
Returns Promise<SequenceResponse>
Protected get Tm Client
Returns undefined | Tendermint34Client
get Tx
Parameters
id: string
Returns Promise<null | IndexedTx>
instantiate
Parameters
senderAddress: string
codeId: number
msg: any
label: string
fee: number | StdFee | "auto"
options: InstantiateOptions = {}
Returns Promise<InstantiateResult>
migrate
Parameters
senderAddress: string
contractAddress: string
codeId: number
migrateMsg: any
fee: number | StdFee | "auto"
memo: string = ""
Returns Promise<MigrateResult>
query Contract Raw
Parameters
codeId: number
Returns Promise<readonly string[]>
get Height
Returns Promise<number>
Protected get Query Client
Returns undefined | QueryClient & AuthExtension & BankExtension & TxExtension & WasmExtension
get Sequence
Parameters
address: string
Returns Promise<SequenceResponse>
Protected get Tm Client
Returns undefined | Tendermint34Client
get Tx
Parameters
id: string
Returns Promise<null | IndexedTx>
instantiate
Parameters
senderAddress: string
codeId: number
msg: any
label: string
fee: number | StdFee | "auto"
options: InstantiateOptions = {}
Returns Promise<InstantiateResult>
migrate
Parameters
senderAddress: string
contractAddress: string
codeId: number
migrateMsg: any
fee: number | StdFee | "auto"
memo: string = ""
Returns Promise<MigrateResult>
query Contract Raw
Returns the data at the key if present (raw contract dependent storage data) or null if no data at this key.
Promise is rejected when contract does not exist.
-Parameters
address: string
key: Uint8Array
Returns Promise<null | Uint8Array>
query Contract Smart
Parameters
address: string
key: Uint8Array
Returns Promise<null | Uint8Array>
query Contract Smart
Makes a smart query on the contract, returns the parsed JSON document.
Promise is rejected when contract does not exist. Promise is rejected for invalid query format. Promise is rejected for invalid response format.
-Parameters
address: string
queryMsg: any
Returns Promise<any>
search Tx
Parameters
query: SearchTxQuery
filter: SearchTxFilter = {}
Returns Promise<readonly IndexedTx[]>
send Tokens
Parameters
senderAddress: string
recipientAddress: string
amount: readonly Coin[]
fee: number | StdFee | "auto"
memo: string = ""
Returns Promise<DeliverTxResponse>
sign
Parameters
signerAddress: string
messages: readonly EncodeObject[]
fee: StdFee
memo: string
Optional explicitSignerData: SignerData
Returns Promise<TxRaw>
sign And Broadcast
Parameters
address: string
queryMsg: any
Returns Promise<any>
search Tx
Parameters
query: SearchTxQuery
filter: SearchTxFilter = {}
Returns Promise<readonly IndexedTx[]>
send Tokens
Parameters
senderAddress: string
recipientAddress: string
amount: readonly Coin[]
fee: number | StdFee | "auto"
memo: string = ""
Returns Promise<DeliverTxResponse>
sign
Parameters
signerAddress: string
messages: readonly EncodeObject[]
fee: StdFee
memo: string
Optional explicitSignerData: SignerData
Returns Promise<TxRaw>
sign And Broadcast
Creates a transaction with the given messages, fee and memo. Then signs and broadcasts the transaction.
Parameters
signerAddress: string
The address that will sign transactions using this instance. The signer must be able to sign with this address.
messages: readonly EncodeObject[]
fee: number | StdFee | "auto"
memo: string = ""
Returns Promise<DeliverTxResponse>
simulate
Parameters
signerAddress: string
messages: readonly EncodeObject[]
memo: undefined | string
Returns Promise<number>
undelegate Tokens
Parameters
delegatorAddress: string
validatorAddress: string
amount: Coin
fee: number | StdFee | "auto"
memo: string = ""
Returns Promise<DeliverTxResponse>
update Admin
Parameters
senderAddress: string
contractAddress: string
newAdmin: string
fee: number | StdFee | "auto"
memo: string = ""
Returns Promise<ChangeAdminResult>
upload
Returns Promise<DeliverTxResponse>
simulate
Parameters
signerAddress: string
messages: readonly EncodeObject[]
memo: undefined | string
Returns Promise<number>
undelegate Tokens
Parameters
delegatorAddress: string
validatorAddress: string
amount: Coin
fee: number | StdFee | "auto"
memo: string = ""
Returns Promise<DeliverTxResponse>
update Admin
Parameters
senderAddress: string
contractAddress: string
newAdmin: string
fee: number | StdFee | "auto"
memo: string = ""
Returns Promise<ChangeAdminResult>
upload
Uploads code and returns a receipt, including the code ID
-Parameters
senderAddress: string
wasmCode: Uint8Array
fee: number | StdFee | "auto"
memo: string = ""
Returns Promise<UploadResult>
withdraw Rewards
Parameters
delegatorAddress: string
validatorAddress: string
fee: number | StdFee | "auto"
memo: string = ""
Returns Promise<DeliverTxResponse>
Static connect
Parameters
endpoint: string | HttpEndpoint
Returns Promise<CosmWasmClient>
Static connect With Signer
Parameters
endpoint: string | HttpEndpoint
signer: OfflineSigner
options: SigningCosmWasmClientOptions = {}
Returns Promise<SigningCosmWasmClient>
Static offline
Parameters
senderAddress: string
wasmCode: Uint8Array
fee: number | StdFee | "auto"
memo: string = ""
Returns Promise<UploadResult>
withdraw Rewards
Parameters
delegatorAddress: string
validatorAddress: string
fee: number | StdFee | "auto"
memo: string = ""
Returns Promise<DeliverTxResponse>
Static connect
Parameters
endpoint: string | HttpEndpoint
Returns Promise<CosmWasmClient>
Static connect With Signer
Parameters
endpoint: string | HttpEndpoint
signer: OfflineSigner
options: SigningCosmWasmClientOptions = {}
Returns Promise<SigningCosmWasmClient>
Static offline
Creates a client in offline mode.
This should only be used in niche cases where you know exactly what you're doing, e.g. when building an offline signing application.
diff --git a/latest/cosmwasm-stargate/interfaces/ChangeAdminResult.html b/latest/cosmwasm-stargate/interfaces/ChangeAdminResult.html index 25040cab39..ded8ec6b7b 100644 --- a/latest/cosmwasm-stargate/interfaces/ChangeAdminResult.html +++ b/latest/cosmwasm-stargate/interfaces/ChangeAdminResult.html @@ -1,7 +1,7 @@- Preparing search index...
- The search index is not available
@cosmjs/cosmwasm-stargate DocumentationInterface ChangeAdminResult
Result type of updateAdmin and clearAdmin
-Hierarchy
Index
Properties
Properties
Readonly events
Readonly gas Used
Readonly gas Wanted
Readonly height
Hierarchy
Index
Properties
Properties
Readonly events
Readonly gas Used
Readonly gas Wanted
Readonly height
Block height in which the transaction is included
-Readonly logs
Readonly transaction Hash
Readonly logs
Readonly transaction Hash
Transaction hash (might be used as transaction ID). Guaranteed to be non-empty upper-case hex
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/cosmwasm-stargate DocumentationInterface Code
Hierarchy
Index
Properties
Properties
Readonly checksum
- Preparing search index...
- The search index is not available
@cosmjs/cosmwasm-stargate DocumentationInterface Code
Hierarchy
Index
Properties
Properties
Readonly checksum
Hex-encoded sha256 hash of the code stored here
-Readonly creator
Readonly creator
Bech32 account address
-Readonly id
Generated using TypeDoc
Readonly id
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/cosmwasm-stargate DocumentationInterface CodeDetails
Hierarchy
Index
Properties
Properties
Readonly checksum
- Preparing search index...
- The search index is not available
@cosmjs/cosmwasm-stargate DocumentationInterface CodeDetails
Hierarchy
Index
Properties
Properties
Readonly checksum
Hex-encoded sha256 hash of the code stored here
-Readonly creator
Readonly creator
Bech32 account address
-Readonly data
Readonly data
The original Wasm bytes
-Readonly id
Generated using TypeDoc
Readonly id
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/cosmwasm-stargate DocumentationInterface Contract
Hierarchy
Index
Properties
Properties
Readonly address
Readonly admin
- Preparing search index...
- The search index is not available
@cosmjs/cosmwasm-stargate DocumentationInterface Contract
Hierarchy
Index
Properties
Properties
Readonly address
Readonly admin
Bech32-encoded admin address
-Readonly code Id
Readonly creator
Readonly code Id
Readonly creator
Bech32 account address
-Readonly ibc Port Id
Readonly ibc Port Id
The IBC port ID assigned to this contract by wasmd.
This is set for all IBC contracts (https://github.com/CosmWasm/wasmd/blob/v0.16.0/x/wasm/keeper/keeper.go#L299-L306).
-Readonly label
Generated using TypeDoc
Readonly label
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/cosmwasm-stargate DocumentationInterface ContractCodeHistoryEntry
Hierarchy
Index
Properties
Properties
Readonly code Id
Readonly msg
Readonly operation
- Preparing search index...
- The search index is not available
@cosmjs/cosmwasm-stargate DocumentationInterface ContractCodeHistoryEntry
Hierarchy
Index
Properties
Properties
Readonly code Id
Readonly msg
Readonly operation
The source of this history entry
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/cosmwasm-stargate DocumentationInterface ExecuteInstruction
Hierarchy
Index
Properties
Properties
contract Address
Optional funds
msg
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/cosmwasm-stargate DocumentationInterface ExecuteInstruction
Hierarchy
Index
Properties
Properties
contract Address
Optional funds
msg
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/cosmwasm-stargate DocumentationInterface ExecuteResult
Hierarchy
Index
Properties
Properties
Readonly events
Readonly gas Used
Readonly gas Wanted
Readonly height
- Preparing search index...
- The search index is not available
@cosmjs/cosmwasm-stargate DocumentationInterface ExecuteResult
Hierarchy
Index
Properties
Properties
Readonly events
Readonly gas Used
Readonly gas Wanted
Readonly height
Block height in which the transaction is included
-Readonly logs
Readonly transaction Hash
Readonly logs
Readonly transaction Hash
Transaction hash (might be used as transaction ID). Guaranteed to be non-empty upper-case hex
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/cosmwasm-stargate DocumentationInterface InstantiateOptions
The options of an .instantiate() call. All properties are optional.
-Hierarchy
Index
Properties
Properties
Optional Readonly admin
Hierarchy
Index
Properties
Properties
Optional Readonly admin
A bech32 encoded address of an admin account. Caution: an admin has the privilege to upgrade a contract. If this is not desired, do not set this value.
-Optional Readonly funds
Optional Readonly funds
The funds that are transferred from the sender to the newly created contract. The funds are transferred as part of the message execution after the contract address is created and before the instantiation message is executed by the contract.
Only native tokens are supported.
-Optional Readonly memo
Generated using TypeDoc
Optional Readonly memo
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/cosmwasm-stargate DocumentationInterface InstantiateResult
Hierarchy
Index
Properties
Properties
Readonly contract Address
- Preparing search index...
- The search index is not available
@cosmjs/cosmwasm-stargate DocumentationInterface InstantiateResult
Hierarchy
Index
Properties
Properties
Readonly contract Address
The address of the newly instantiated contract
-Readonly events
Readonly gas Used
Readonly gas Wanted
Readonly height
Readonly events
Readonly gas Used
Readonly gas Wanted
Readonly height
Block height in which the transaction is included
-Readonly logs
Readonly transaction Hash
Readonly logs
Readonly transaction Hash
Transaction hash (might be used as transaction ID). Guaranteed to be non-empty upper-case hex
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/cosmwasm-stargate DocumentationInterface MigrateResult
Hierarchy
Index
Properties
Properties
Readonly events
Readonly gas Used
Readonly gas Wanted
Readonly height
- Preparing search index...
- The search index is not available
@cosmjs/cosmwasm-stargate DocumentationInterface MigrateResult
Hierarchy
Index
Properties
Properties
Readonly events
Readonly gas Used
Readonly gas Wanted
Readonly height
Block height in which the transaction is included
-Readonly logs
Readonly transaction Hash
Readonly logs
Readonly transaction Hash
Transaction hash (might be used as transaction ID). Guaranteed to be non-empty upper-case hex
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/cosmwasm-stargate DocumentationInterface MsgClearAdminEncodeObject
Hierarchy
Index
Properties
Properties
Readonly type Url
Readonly value
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/cosmwasm-stargate DocumentationInterface MsgClearAdminEncodeObject
Hierarchy
Index
Properties
Properties
Readonly type Url
Readonly value
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/cosmwasm-stargate DocumentationInterface MsgExecuteContractEncodeObject
Hierarchy
Index
Properties
Properties
Readonly type Url
Readonly value
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/cosmwasm-stargate DocumentationInterface MsgExecuteContractEncodeObject
Hierarchy
Index
Properties
Properties
Readonly type Url
Readonly value
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/cosmwasm-stargate DocumentationInterface MsgInstantiateContractEncodeObject
Hierarchy
Index
Properties
Properties
Readonly type Url
Readonly value
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/cosmwasm-stargate DocumentationInterface MsgInstantiateContractEncodeObject
Hierarchy
Index
Properties
Properties
Readonly type Url
Readonly value
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/cosmwasm-stargate DocumentationInterface MsgMigrateContractEncodeObject
Hierarchy
Index
Properties
Properties
Readonly type Url
Readonly value
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/cosmwasm-stargate DocumentationInterface MsgMigrateContractEncodeObject
Hierarchy
Index
Properties
Properties
Readonly type Url
Readonly value
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/cosmwasm-stargate DocumentationInterface MsgStoreCodeEncodeObject
Hierarchy
Index
Properties
Properties
Readonly type Url
Readonly value
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/cosmwasm-stargate DocumentationInterface MsgStoreCodeEncodeObject
Hierarchy
Index
Properties
Properties
Readonly type Url
Readonly value
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/cosmwasm-stargate DocumentationInterface MsgUpdateAdminEncodeObject
Hierarchy
Index
Properties
Properties
Readonly type Url
Readonly value
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/cosmwasm-stargate DocumentationInterface MsgUpdateAdminEncodeObject
Hierarchy
Index
Properties
Properties
Readonly type Url
Readonly value
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/cosmwasm-stargate DocumentationInterface SigningCosmWasmClientOptions
Hierarchy
Index
Properties
Properties
Optional Readonly amino Types
Optional Readonly broadcast Poll Interval Ms
Optional Readonly broadcast Timeout Ms
Optional Readonly gas Price
Optional Readonly registry
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/cosmwasm-stargate DocumentationInterface SigningCosmWasmClientOptions
Hierarchy
Index
Properties
Properties
Optional Readonly amino Types
Optional Readonly broadcast Poll Interval Ms
Optional Readonly broadcast Timeout Ms
Optional Readonly gas Price
Optional Readonly registry
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/cosmwasm-stargate DocumentationInterface UploadResult
Hierarchy
Index
Properties
Properties
Readonly code Id
- Preparing search index...
- The search index is not available
@cosmjs/cosmwasm-stargate DocumentationInterface UploadResult
Hierarchy
Index
Properties
Properties
Readonly code Id
The ID of the code asigned by the chain
-Readonly compressed Checksum
Readonly compressed Checksum
A hex encoded sha256 checksum of the compressed wasm code (that stored in the transaction)
-Readonly compressed Size
Readonly compressed Size
Size of the compressed wasm code in bytes
-Readonly events
Readonly gas Used
Readonly gas Wanted
Readonly height
Readonly events
Readonly gas Used
Readonly gas Wanted
Readonly height
Block height in which the transaction is included
-Readonly logs
Readonly original Checksum
Readonly logs
Readonly original Checksum
A hex encoded sha256 checksum of the original wasm code (that is stored on chain)
-Readonly original Size
Readonly original Size
Size of the original wasm code in bytes
-Readonly transaction Hash
Readonly transaction Hash
Transaction hash (might be used as transaction ID). Guaranteed to be non-empty upper-case hex
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/cosmwasm-stargate DocumentationInterface WasmExtension
Hierarchy
Index
Properties
Properties
Readonly wasm
Type declaration
get All Contract State:function
- Preparing search index...
- The search index is not available
@cosmjs/cosmwasm-stargate DocumentationInterface WasmExtension
Hierarchy
Index
Properties
Properties
Readonly wasm
Type declaration
get All Contract State:function
Returns all contract state. This is an empty array if no such contract, or contract has no data.
-Parameters
address: string
Optional paginationKey: Uint8Array
Returns Promise<QueryAllContractStateResponse>
get Code:function
Parameters
address: string
Optional paginationKey: Uint8Array
Returns Promise<QueryAllContractStateResponse>
get Code:function
Downloads the original wasm bytecode by code ID.
Throws an error if no code with this id
-Parameters
id: number
Returns Promise<QueryCodeResponse>
get Contract Code History:function
Parameters
id: number
Returns Promise<QueryCodeResponse>
get Contract Code History:function
Returns null when contract history was not found for this address.
-Parameters
address: string
Optional paginationKey: Uint8Array
Returns Promise<QueryContractHistoryResponse>
get Contract Info:function
Parameters
address: string
Optional paginationKey: Uint8Array
Returns Promise<QueryContractHistoryResponse>
get Contract Info:function
Returns null when contract was not found at this address.
-Parameters
address: string
Returns Promise<QueryContractInfoResponse>
list Code Info:function
Parameters
Optional paginationKey: Uint8Array
Returns Promise<QueryCodesResponse>
list Contracts By Code Id:function
Parameters
id: number
Optional paginationKey: Uint8Array
Returns Promise<QueryContractsByCodeResponse>
query Contract Raw:function
Parameters
address: string
Returns Promise<QueryContractInfoResponse>
list Code Info:function
Parameters
Optional paginationKey: Uint8Array
Returns Promise<QueryCodesResponse>
list Contracts By Code Id:function
Parameters
id: number
Optional paginationKey: Uint8Array
Returns Promise<QueryContractsByCodeResponse>
query Contract Raw:function
Returns the data at the key if present (unknown decoded json), or null if no data at this (contract address, key) pair
-Parameters
address: string
key: Uint8Array
Returns Promise<QueryRawContractStateResponse>
query Contract Smart:function
Parameters
address: string
key: Uint8Array
Returns Promise<QueryRawContractStateResponse>
query Contract Smart:function
Makes a smart query on the contract and parses the response as JSON. Throws error if no such contract exists, the query format is invalid or the response is invalid.
Parameters
address: string
query: any
Returns Promise<any>
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/cosmwasm-stargate Documentation@cosmjs/cosmwasm-stargate Documentation
Index
Classes
Interfaces
Type Aliases
Variables
Functions
Type Aliases
Json Object
- Preparing search index...
- The search index is not available
@cosmjs/cosmwasm-stargate Documentation@cosmjs/cosmwasm-stargate Documentation
Index
Classes
Interfaces
Type Aliases
Variables
Functions
Type Aliases
Json Object
An object containing a parsed JSON document. The result of JSON.parse(). This doesn't provide any type safety over
any
but expresses intent in the code.This type is returned by
-queryContractSmart
.Variables
Const cosm Wasm Types
use
-createWasmAminoConverters()
Functions
create Wasm Amino Converters
Returns AminoConverters
from Binary
Variables
Const cosm Wasm Types
use
+createWasmAminoConverters()
Functions
create Wasm Amino Converters
Returns AminoConverters
from Binary
Takes a base64 string, decodes it and parses the content from JSON to an object.
This can be used for parsing the values of a CosmWasm Binary field.
-Parameters
base64: string
Returns any
is Msg Clear Admin Encode Object
Parameters
object: EncodeObject
Returns object is MsgClearAdminEncodeObject
is Msg Execute Encode Object
Parameters
object: EncodeObject
Returns object is MsgExecuteContractEncodeObject
is Msg Instantiate Contract Encode Object
Parameters
object: EncodeObject
Returns object is MsgInstantiateContractEncodeObject
is Msg Migrate Encode Object
Parameters
object: EncodeObject
Returns object is MsgMigrateContractEncodeObject
is Msg Store Code Encode Object
Parameters
object: EncodeObject
Returns object is MsgStoreCodeEncodeObject
is Msg Update Admin Encode Object
Parameters
object: EncodeObject
Returns object is MsgUpdateAdminEncodeObject
setup Wasm Extension
Parameters
base: QueryClient
Returns WasmExtension
to Binary
Parameters
base64: string
Returns any
is Msg Clear Admin Encode Object
Parameters
object: EncodeObject
Returns object is MsgClearAdminEncodeObject
is Msg Execute Encode Object
Parameters
object: EncodeObject
Returns object is MsgExecuteContractEncodeObject
is Msg Instantiate Contract Encode Object
Parameters
object: EncodeObject
Returns object is MsgInstantiateContractEncodeObject
is Msg Migrate Encode Object
Parameters
object: EncodeObject
Returns object is MsgMigrateContractEncodeObject
is Msg Store Code Encode Object
Parameters
object: EncodeObject
Returns object is MsgStoreCodeEncodeObject
is Msg Update Admin Encode Object
Parameters
object: EncodeObject
Returns object is MsgUpdateAdminEncodeObject
setup Wasm Extension
Parameters
base: QueryClient
Returns WasmExtension
to Binary
Takes a value, serializes it to JSON and encodes it as base64.
This can be used for creating values of fields that have the CosmWasm Binary type.
Parameters
obj: any
Returns string
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/crypto DocumentationClass Argon2id
Hierarchy
Index
Constructors
Methods
Constructors
constructor
Returns Argon2id
Methods
Static execute
Parameters
password: string
salt: Uint8Array
options: Argon2idOptions
Returns Promise<Uint8Array>
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/crypto DocumentationClass Argon2id
Hierarchy
Index
Constructors
Methods
Constructors
constructor
Returns Argon2id
Methods
Static execute
Parameters
password: string
salt: Uint8Array
options: Argon2idOptions
Returns Promise<Uint8Array>
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/crypto DocumentationClass Bip39
Hierarchy
Index
Constructors
Methods
Constructors
constructor
Returns Bip39
Methods
Static decode
Parameters
mnemonic: EnglishMnemonic
Returns Uint8Array
Static encode
- Preparing search index...
- The search index is not available
@cosmjs/crypto DocumentationClass Bip39
Hierarchy
Index
Constructors
Methods
Constructors
constructor
Returns Bip39
Methods
Static decode
Parameters
mnemonic: EnglishMnemonic
Returns Uint8Array
Static encode
Encodes raw entropy of length 16, 20, 24, 28 or 32 bytes as an English mnemonic between 12 and 24 words.
https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki#generating-the-mnemonic
Parameters
entropy: Uint8Array
The entropy to be encoded. This must be cryptographically secure.
-Returns EnglishMnemonic
Static mnemonic To Seed
Parameters
mnemonic: EnglishMnemonic
Optional password: string
Returns Promise<Uint8Array>
Generated using TypeDoc
Returns EnglishMnemonic
Static mnemonic To Seed
Parameters
mnemonic: EnglishMnemonic
Optional password: string
Returns Promise<Uint8Array>
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/crypto DocumentationClass Ed25519
Hierarchy
Index
Constructors
Methods
Constructors
constructor
Returns Ed25519
Methods
Static create Signature
Parameters
message: Uint8Array
keyPair: Ed25519Keypair
Returns Promise<Uint8Array>
Static make Keypair
- Preparing search index...
- The search index is not available
@cosmjs/crypto DocumentationClass Ed25519
Hierarchy
Index
Constructors
Methods
Constructors
constructor
Returns Ed25519
Methods
Static create Signature
Parameters
message: Uint8Array
keyPair: Ed25519Keypair
Returns Promise<Uint8Array>
Static make Keypair
Generates a keypair deterministically from a given 32 bytes seed.
This seed equals the Ed25519 private key. For implementation details see crypto_sign_seed_keypair in https://download.libsodium.org/doc/public-key_cryptography/public-key_signatures.html and diagram on https://blog.mozilla.org/warner/2011/11/29/ed25519-keys/
-Parameters
seed: Uint8Array
Returns Promise<Ed25519Keypair>
Static verify Signature
Parameters
signature: Uint8Array
message: Uint8Array
pubkey: Uint8Array
Returns Promise<boolean>
Generated using TypeDoc
Parameters
seed: Uint8Array
Returns Promise<Ed25519Keypair>
Static verify Signature
Parameters
signature: Uint8Array
message: Uint8Array
pubkey: Uint8Array
Returns Promise<boolean>
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/crypto DocumentationClass Ed25519Keypair
Hierarchy
Index
Constructors
Properties
Methods
Constructors
constructor
Parameters
privkey: Uint8Array
pubkey: Uint8Array
Returns Ed25519Keypair
Properties
Readonly privkey
Readonly pubkey
Methods
to Libsodium Privkey
Returns Uint8Array
Static from Libsodium Privkey
Parameters
libsodiumPrivkey: Uint8Array
Returns Ed25519Keypair
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/crypto DocumentationClass Ed25519Keypair
Hierarchy
Index
Constructors
Properties
Methods
Constructors
constructor
Parameters
privkey: Uint8Array
pubkey: Uint8Array
Returns Ed25519Keypair
Properties
Readonly privkey
Readonly pubkey
Methods
to Libsodium Privkey
Returns Uint8Array
Static from Libsodium Privkey
Parameters
libsodiumPrivkey: Uint8Array
Returns Ed25519Keypair
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/crypto DocumentationClass EnglishMnemonic
Hierarchy
Index
Constructors
Properties
Methods
Constructors
constructor
Parameters
mnemonic: string
Returns EnglishMnemonic
Properties
Static Readonly wordlist
Methods
to String
Returns string
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/crypto DocumentationClass EnglishMnemonic
Hierarchy
Index
Constructors
Properties
Methods
Constructors
constructor
Parameters
mnemonic: string
Returns EnglishMnemonic
Properties
Static Readonly wordlist
Methods
to String
Returns string
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/crypto DocumentationClass ExtendedSecp256k1Signature
A Secp256k1Signature plus the recovery parameter
-Hierarchy
Index
Constructors
Properties
Methods
Constructors
constructor
Parameters
r: Uint8Array
s: Uint8Array
recovery: number
Returns ExtendedSecp256k1Signature
Properties
Readonly recovery
Methods
r
Parameters
Optional length: number
Returns Uint8Array
s
Parameters
Optional length: number
Returns Uint8Array
to Der
Returns Uint8Array
to Fixed Length
Hierarchy
Index
Constructors
Properties
Methods
Constructors
constructor
Parameters
r: Uint8Array
s: Uint8Array
recovery: number
Returns ExtendedSecp256k1Signature
Properties
Readonly recovery
Methods
r
Parameters
Optional length: number
Returns Uint8Array
s
Parameters
Optional length: number
Returns Uint8Array
to Der
Returns Uint8Array
to Fixed Length
A simple custom encoding that encodes the extended signature as r (32 bytes) | s (32 bytes) | recovery param (1 byte) where | denotes concatenation of bonary data.
-Returns Uint8Array
Static from Der
Parameters
data: Uint8Array
Returns Secp256k1Signature
Static from Fixed Length
Returns Uint8Array
Static from Der
Parameters
data: Uint8Array
Returns Secp256k1Signature
Static from Fixed Length
Decode extended signature from the simple fixed length encoding described in toFixedLength().
Parameters
data: Uint8Array
Returns ExtendedSecp256k1Signature
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/crypto DocumentationClass Hmac<H>
Type Parameters
H extends HashFunction
Hierarchy
Implements
Index
Constructors
Properties
Methods
Constructors
constructor
Type Parameters
H extends HashFunction
Parameters
hashFunctionConstructor: (new () => H)
Returns H
originalKey: Uint8Array
Returns Hmac<H>
Properties
Readonly block Size
Methods
digest
Returns Uint8Array
update
Parameters
data: Uint8Array
Returns Hmac<H>
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/crypto DocumentationClass Hmac<H>
Type Parameters
H extends HashFunction
Hierarchy
Implements
Index
Constructors
Properties
Methods
Constructors
constructor
Type Parameters
H extends HashFunction
Parameters
hashFunctionConstructor: (new () => H)
Returns H
originalKey: Uint8Array
Returns Hmac<H>
Properties
Readonly block Size
Methods
digest
Returns Uint8Array
update
Parameters
data: Uint8Array
Returns Hmac<H>
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/crypto DocumentationClass Keccak256
Hierarchy
Implements
Index
Constructors
Properties
Methods
Constructors
constructor
Parameters
Optional firstData: Uint8Array
Returns Keccak256
Properties
Readonly block Size
Methods
digest
Returns Uint8Array
update
Parameters
data: Uint8Array
Returns Keccak256
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/crypto DocumentationClass Keccak256
Hierarchy
Implements
Index
Constructors
Properties
Methods
Constructors
constructor
Parameters
Optional firstData: Uint8Array
Returns Keccak256
Properties
Readonly block Size
Methods
digest
Returns Uint8Array
update
Parameters
data: Uint8Array
Returns Keccak256
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/crypto DocumentationClass Random
Hierarchy
Index
Constructors
Methods
Constructors
constructor
Returns Random
Methods
Static get Bytes
- Preparing search index...
- The search index is not available
@cosmjs/crypto DocumentationClass Random
Hierarchy
Index
Constructors
Methods
Constructors
constructor
Returns Random
Methods
Static get Bytes
Returns
count
cryptographically secure random bytesParameters
count: number
Returns Uint8Array
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/crypto DocumentationClass Ripemd160
Hierarchy
Implements
Index
Constructors
Properties
Methods
Constructors
constructor
Parameters
Optional firstData: Uint8Array
Returns Ripemd160
Properties
Readonly block Size
Methods
digest
Returns Uint8Array
update
Parameters
data: Uint8Array
Returns Ripemd160
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/crypto DocumentationClass Ripemd160
Hierarchy
Implements
Index
Constructors
Properties
Methods
Constructors
constructor
Parameters
Optional firstData: Uint8Array
Returns Ripemd160
Properties
Readonly block Size
Methods
digest
Returns Uint8Array
update
Parameters
data: Uint8Array
Returns Ripemd160
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/crypto DocumentationClass Secp256k1
Hierarchy
Index
Constructors
Methods
Constructors
constructor
Returns Secp256k1
Methods
Static compress Pubkey
- Preparing search index...
- The search index is not available
@cosmjs/crypto DocumentationClass Secp256k1
Hierarchy
Index
Constructors
Methods
Constructors
constructor
Returns Secp256k1
Methods
Static compress Pubkey
Takes a compressed or uncompressed pubkey and return a compressed one.
This function is idempotent.
-Parameters
pubkey: Uint8Array
Returns Uint8Array
Static create Signature
Parameters
pubkey: Uint8Array
Returns Uint8Array
Static create Signature
Creates a signature that is
Parameters
messageHash: Uint8Array
privkey: Uint8Array
Returns Promise<ExtendedSecp256k1Signature>
Static make Keypair
Parameters
messageHash: Uint8Array
privkey: Uint8Array
Returns Promise<ExtendedSecp256k1Signature>
Static make Keypair
Takes a 32 byte private key and returns a privkey/pubkey pair.
The resulting pubkey is uncompressed. For the use in Cosmos it should be compressed first using
-Secp256k1.compressPubkey
.Parameters
privkey: Uint8Array
Returns Promise<Secp256k1Keypair>
Static recover Pubkey
Parameters
signature: ExtendedSecp256k1Signature
messageHash: Uint8Array
Returns Uint8Array
Static trim Recovery Byte
Parameters
signature: Uint8Array
Returns Uint8Array
Static uncompress Pubkey
Parameters
privkey: Uint8Array
Returns Promise<Secp256k1Keypair>
Static recover Pubkey
Parameters
signature: ExtendedSecp256k1Signature
messageHash: Uint8Array
Returns Uint8Array
Static trim Recovery Byte
Parameters
signature: Uint8Array
Returns Uint8Array
Static uncompress Pubkey
Takes a compressed or uncompressed pubkey and returns an uncompressed one.
This function is idempotent.
-Parameters
pubkey: Uint8Array
Returns Uint8Array
Static verify Signature
Parameters
signature: Secp256k1Signature
messageHash: Uint8Array
pubkey: Uint8Array
Returns Promise<boolean>
Generated using TypeDoc
Parameters
pubkey: Uint8Array
Returns Uint8Array
Static verify Signature
Parameters
signature: Secp256k1Signature
messageHash: Uint8Array
pubkey: Uint8Array
Returns Promise<boolean>
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/crypto DocumentationClass Secp256k1Signature
Hierarchy
Index
Constructors
Methods
Constructors
constructor
Parameters
r: Uint8Array
s: Uint8Array
Returns Secp256k1Signature
Methods
r
Parameters
Optional length: number
Returns Uint8Array
s
Parameters
Optional length: number
Returns Uint8Array
to Der
Returns Uint8Array
to Fixed Length
Returns Uint8Array
Static from Der
Parameters
data: Uint8Array
Returns Secp256k1Signature
Static from Fixed Length
- Preparing search index...
- The search index is not available
@cosmjs/crypto DocumentationClass Secp256k1Signature
Hierarchy
Index
Constructors
Methods
Constructors
constructor
Parameters
r: Uint8Array
s: Uint8Array
Returns Secp256k1Signature
Methods
r
Parameters
Optional length: number
Returns Uint8Array
s
Parameters
Optional length: number
Returns Uint8Array
to Der
Returns Uint8Array
to Fixed Length
Returns Uint8Array
Static from Der
Parameters
data: Uint8Array
Returns Secp256k1Signature
Static from Fixed Length
Takes the pair of integers (r, s) as 2x32 byte of binary data.
Note: This is the format Cosmos SDK uses natively.
Parameters
data: Uint8Array
- Preparing search index...
- The search index is not available
@cosmjs/crypto DocumentationClass Sha256
Hierarchy
Implements
Index
Constructors
Properties
Methods
Constructors
constructor
Parameters
Optional firstData: Uint8Array
Returns Sha256
Properties
Readonly block Size
Methods
digest
Returns Uint8Array
update
Parameters
data: Uint8Array
Returns Sha256
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/crypto DocumentationClass Sha256
Hierarchy
Implements
Index
Constructors
Properties
Methods
Constructors
constructor
Parameters
Optional firstData: Uint8Array
Returns Sha256
Properties
Readonly block Size
Methods
digest
Returns Uint8Array
update
Parameters
data: Uint8Array
Returns Sha256
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/crypto DocumentationClass Sha512
Hierarchy
Implements
Index
Constructors
Properties
Methods
Constructors
constructor
Parameters
Optional firstData: Uint8Array
Returns Sha512
Properties
Readonly block Size
Methods
digest
Returns Uint8Array
update
Parameters
data: Uint8Array
Returns Sha512
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/crypto DocumentationClass Sha512
Hierarchy
Implements
Index
Constructors
Properties
Methods
Constructors
constructor
Parameters
Optional firstData: Uint8Array
Returns Sha512
Properties
Readonly block Size
Methods
digest
Returns Uint8Array
update
Parameters
data: Uint8Array
Returns Sha512
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/crypto DocumentationClass Slip10
Hierarchy
Index
Constructors
Methods
Constructors
constructor
Returns Slip10
Methods
Static derive Path
Parameters
curve: Slip10Curve
seed: Uint8Array
path: HdPath
Returns Slip10Result
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/crypto DocumentationClass Slip10
Hierarchy
Index
Constructors
Methods
Constructors
constructor
Returns Slip10
Methods
Static derive Path
Parameters
curve: Slip10Curve
seed: Uint8Array
path: HdPath
Returns Slip10Result
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/crypto DocumentationClass Slip10RawIndex
Hierarchy
Index
Constructors
Properties
Methods
Constructors
constructor
Parameters
input: number
Returns Slip10RawIndex
Properties
Protected Readonly data
Methods
is Hardened
Returns boolean
to Big Int
Returns bigint
to Bytes Big Endian
Returns Uint8Array
to Bytes Little Endian
Returns Uint8Array
to Number
Returns number
to String
Returns string
Static from Big Endian Bytes
use Uint32.fromBytes
+- Preparing search index...
- The search index is not available
@cosmjs/crypto DocumentationClass Slip10RawIndex
Hierarchy
Index
Constructors
Properties
Methods
Constructors
constructor
Parameters
input: number
Returns Slip10RawIndex
Properties
Protected Readonly data
Methods
is Hardened
Returns boolean
to Big Int
Returns bigint
to Bytes Big Endian
Returns Uint8Array
to Bytes Little Endian
Returns Uint8Array
to Number
Returns number
to String
Returns string
Static from Big Endian Bytes
use Uint32.fromBytes
Parameters
bytes: ArrayLike<number>
Returns Uint32
Static from Bytes
Creates a Uint32 from a fixed length byte array.
Parameters
bytes: ArrayLike<number>
a list of exactly 4 bytes
Optional endianess: "be" | "le"
defaults to big endian
-Returns Uint32
Static from String
Parameters
str: string
Returns Uint32
Static hardened
Parameters
hardenedIndex: number
Returns Slip10RawIndex
Static normal
Parameters
normalIndex: number
Returns Slip10RawIndex
Generated using TypeDoc
Returns Uint32
Static from String
Parameters
str: string
Returns Uint32
Static hardened
Parameters
hardenedIndex: number
Returns Slip10RawIndex
Static normal
Parameters
normalIndex: number
Returns Slip10RawIndex
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/crypto DocumentationClass Xchacha20poly1305Ietf
Hierarchy
Index
Constructors
Methods
Constructors
constructor
Returns Xchacha20poly1305Ietf
Methods
Static decrypt
Parameters
ciphertext: Uint8Array
key: Uint8Array
nonce: Uint8Array
Returns Promise<Uint8Array>
Static encrypt
Parameters
message: Uint8Array
key: Uint8Array
nonce: Uint8Array
Returns Promise<Uint8Array>
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/crypto DocumentationClass Xchacha20poly1305Ietf
Hierarchy
Index
Constructors
Methods
Constructors
constructor
Returns Xchacha20poly1305Ietf
Methods
Static decrypt
Parameters
ciphertext: Uint8Array
key: Uint8Array
nonce: Uint8Array
Returns Promise<Uint8Array>
Static encrypt
Parameters
message: Uint8Array
key: Uint8Array
nonce: Uint8Array
Returns Promise<Uint8Array>
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/crypto DocumentationEnumeration Slip10Curve
Raw values must match the curve string in SLIP-0010 master key generation
https://github.com/satoshilabs/slips/blob/master/slip-0010.md#master-key-generation
-Index
Enumeration Members
Enumeration Members
Ed25519
Secp256k1
Generated using TypeDoc
Index
Enumeration Members
Enumeration Members
Ed25519
Secp256k1
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/crypto DocumentationInterface Argon2idOptions
Hierarchy
Index
Properties
Properties
Readonly mem Limit Kib
- Preparing search index...
- The search index is not available
@cosmjs/crypto DocumentationInterface Argon2idOptions
Hierarchy
Index
Properties
Properties
Readonly mem Limit Kib
Memory limit measured in KiB (like argon2 command line tool)
Note: only approximately 16 MiB of memory are available using the non-sumo version of libsodium.js
https://libsodium.gitbook.io/doc/password_hashing/default_phf#key-derivation
-Readonly ops Limit
Readonly ops Limit
An integer between 1 and 4294967295 representing the computational difficulty.
https://libsodium.gitbook.io/doc/password_hashing/default_phf#key-derivation
-Readonly output Length
Readonly output Length
Output length in bytes
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/crypto DocumentationInterface HashFunction
Hierarchy
Implemented by
Index
Properties
Methods
Properties
Readonly block Size
Methods
Readonly digest
Returns Uint8Array
Readonly update
Parameters
_: Uint8Array
Returns HashFunction
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/crypto DocumentationInterface HashFunction
Hierarchy
Implemented by
Index
Properties
Methods
Properties
Readonly block Size
Methods
Readonly digest
Returns Uint8Array
Readonly update
Parameters
_: Uint8Array
Returns HashFunction
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/crypto DocumentationInterface Secp256k1Keypair
Hierarchy
Index
Properties
Properties
Readonly privkey
- Preparing search index...
- The search index is not available
@cosmjs/crypto DocumentationInterface Secp256k1Keypair
Hierarchy
Index
Properties
Properties
Readonly privkey
A raw secp256k1 public key.
The type itself does not give you any guarantee if this is compressed or uncompressed. If you are unsure where the data is coming from, use
-Secp256k1.compressPubkey
orSecp256k1.uncompressPubkey
(both idempotent) before processing it.Readonly pubkey
Readonly pubkey
A 32 byte private key
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/crypto DocumentationInterface Slip10Result
Hierarchy
Index
Properties
Properties
Readonly chain Code
Readonly privkey
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/crypto DocumentationInterface Slip10Result
Hierarchy
Index
Properties
Properties
Readonly chain Code
Readonly privkey
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/crypto Documentation@cosmjs/crypto Documentation
Index
Enumerations
Classes
Interfaces
Type Aliases
Variables
Functions
Type Aliases
Hd Path
- Preparing search index...
- The search index is not available
@cosmjs/crypto Documentation@cosmjs/crypto Documentation
Index
Enumerations
Classes
Interfaces
Type Aliases
Variables
Functions
Type Aliases
Hd Path
An array of raw SLIP10 indices.
This can be constructed via string parsing:
Variables
Const xchacha20 Nonce Length
Variables
Const xchacha20 Nonce Length
Nonce length in bytes for all flavours of XChaCha20.
https://libsodium.gitbook.io/doc/advanced/stream_ciphers/xchacha20#notes
-Functions
is Argon2id Options
Parameters
thing: unknown
Returns thing is Argon2idOptions
keccak256
Functions
is Argon2id Options
Parameters
thing: unknown
Returns thing is Argon2idOptions
keccak256
Convenience function equivalent to
-new Keccak256(data).digest()
Parameters
data: Uint8Array
Returns Uint8Array
path To String
Parameters
path: HdPath
Returns string
ripemd160
Parameters
data: Uint8Array
Returns Uint8Array
path To String
Parameters
path: HdPath
Returns string
ripemd160
Convenience function equivalent to
-new Ripemd160(data).digest()
Parameters
data: Uint8Array
Returns Uint8Array
sha256
Parameters
data: Uint8Array
Returns Uint8Array
sha256
Convenience function equivalent to
-new Sha256(data).digest()
Parameters
data: Uint8Array
Returns Uint8Array
sha512
Parameters
data: Uint8Array
Returns Uint8Array
sha512
Convenience function equivalent to
-new Sha512(data).digest()
Parameters
data: Uint8Array
Returns Uint8Array
slip10 Curve From String
Parameters
data: Uint8Array
Returns Uint8Array
slip10 Curve From String
Reverse mapping of Slip10Curve
-Parameters
curveString: string
Returns Slip10Curve
string To Path
Parameters
input: string
Returns HdPath
Generated using TypeDoc
Parameters
curveString: string
Returns Slip10Curve
string To Path
Parameters
input: string
Returns HdPath
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/encoding DocumentationClass Bech32
This class is deprecated and will be removed soon. Please use fromBech32() and toBech32() instead. For more details please refer to https://github.com/cosmos/cosmjs/issues/1053.
-Hierarchy
Index
Constructors
Methods
Constructors
constructor
Returns Bech32
Methods
Static decode
This class is deprecated and will be removed soon. Please use fromBech32() and toBech32() instead. For more details please refer to https://github.com/cosmos/cosmjs/issues/1053.
-Parameters
address: string
limit: number = Infinity
Returns { data: Uint8Array; prefix: string }
Readonly data: Uint8Array
Readonly prefix: string
Static encode
This class is deprecated and will be removed soon. Please use fromBech32() and toBech32() instead. For more details please refer to https://github.com/cosmos/cosmjs/issues/1053.
+Hierarchy
Index
Constructors
Methods
Constructors
constructor
Returns Bech32
Methods
Static decode
This class is deprecated and will be removed soon. Please use fromBech32() and toBech32() instead. For more details please refer to https://github.com/cosmos/cosmjs/issues/1053.
+Parameters
address: string
limit: number = Infinity
Returns { data: Uint8Array; prefix: string }
Readonly data: Uint8Array
Readonly prefix: string
Static encode
This class is deprecated and will be removed soon. Please use fromBech32() and toBech32() instead. For more details please refer to https://github.com/cosmos/cosmjs/issues/1053.
Parameters
prefix: string
data: Uint8Array
Optional limit: number
Returns string
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/encoding Documentation@cosmjs/encoding Documentation
Index
Classes
Functions
Functions
from Ascii
Parameters
data: Uint8Array
Returns string
from Base64
Parameters
base64String: string
Returns Uint8Array
from Bech32
Parameters
address: string
limit: number = Infinity
Returns { data: Uint8Array; prefix: string }
Readonly data: Uint8Array
Readonly prefix: string
from Hex
Parameters
hexstring: string
Returns Uint8Array
from Rfc3339
Parameters
str: string
Returns Date
from Utf8
- Preparing search index...
- The search index is not available
@cosmjs/encoding Documentation@cosmjs/encoding Documentation
Index
Classes
Functions
Functions
from Ascii
Parameters
data: Uint8Array
Returns string
from Base64
Parameters
base64String: string
Returns Uint8Array
from Bech32
Parameters
address: string
limit: number = Infinity
Returns { data: Uint8Array; prefix: string }
Readonly data: Uint8Array
Readonly prefix: string
from Hex
Parameters
hexstring: string
Returns Uint8Array
from Rfc3339
Parameters
str: string
Returns Date
from Utf8
Takes UTF-8 data and decodes it to a string.
In lossy mode, the replacement character � is used to substitude invalid encodings. By default lossy mode is off and invalid data will lead to exceptions.
-Parameters
data: Uint8Array
lossy: boolean = false
Returns string
normalize Bech32
Parameters
data: Uint8Array
lossy: boolean = false
Returns string
normalize Bech32
Takes a bech32 address and returns a normalized (i.e. lower case) representation of it.
The input is validated along the way, which makes this significantly safer than using
-address.toLowerCase()
.Parameters
address: string
Returns string
to Ascii
Parameters
input: string
Returns Uint8Array
to Base64
Parameters
data: Uint8Array
Returns string
to Bech32
Parameters
prefix: string
data: Uint8Array
Optional limit: number
Returns string
to Hex
Parameters
data: Uint8Array
Returns string
to Rfc3339
Parameters
date: Date | ReadonlyDate
Returns string
to Utf8
Parameters
str: string
Returns Uint8Array
Generated using TypeDoc
Parameters
address: string
Returns string
to Ascii
Parameters
input: string
Returns Uint8Array
to Base64
Parameters
data: Uint8Array
Returns string
to Bech32
Parameters
prefix: string
data: Uint8Array
Optional limit: number
Returns string
to Hex
Parameters
data: Uint8Array
Returns string
to Rfc3339
Parameters
date: Date | ReadonlyDate
Returns string
to Utf8
Parameters
str: string
Returns Uint8Array
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/faucet-client DocumentationClass FaucetClient
Hierarchy
Index
Constructors
Methods
Constructors
constructor
Parameters
baseUrl: string
Returns FaucetClient
Methods
credit
Parameters
address: string
denom: string
Returns Promise<void>
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/faucet-client DocumentationClass FaucetClient
Hierarchy
Index
Constructors
Methods
Constructors
constructor
Parameters
baseUrl: string
Returns FaucetClient
Methods
credit
Parameters
address: string
denom: string
Returns Promise<void>
Generated using TypeDoc
A thin wrapper that is used to bring together requests and responses by ID.
Using this class is only advised for continous communication channels like WebSockets or WebWorker messaging.
-Hierarchy
Index
Constructors
Methods
Constructors
constructor
Parameters
connection: SimpleMessagingConnection<JsonRpcRequest, JsonRpcResponse>
Returns JsonRpcClient
Methods
run
Parameters
request: JsonRpcRequest
Returns Promise<JsonRpcSuccessResponse>
Generated using TypeDoc
Hierarchy
Index
Constructors
Methods
Constructors
constructor
Parameters
connection: SimpleMessagingConnection<JsonRpcRequest, JsonRpcResponse>
Returns JsonRpcClient
Methods
run
Parameters
request: JsonRpcRequest
Returns Promise<JsonRpcSuccessResponse>
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/json-rpc DocumentationInterface JsonRpcError
Hierarchy
Index
Properties
Properties
Readonly code
Optional Readonly data
Readonly message
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/json-rpc DocumentationInterface JsonRpcError
Hierarchy
Index
Properties
Properties
Readonly code
Optional Readonly data
Readonly message
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/json-rpc DocumentationInterface JsonRpcErrorResponse
And error object as described in https://www.jsonrpc.org/specification#error_object
-Hierarchy
Index
Properties
Properties
Readonly error
Readonly id
Readonly jsonrpc
Generated using TypeDoc
Hierarchy
Index
Properties
Properties
Readonly error
Readonly id
Readonly jsonrpc
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/json-rpc DocumentationInterface JsonRpcRequest
Hierarchy
Index
Properties
Properties
Readonly id
Readonly jsonrpc
Readonly method
Readonly params
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/json-rpc DocumentationInterface JsonRpcRequest
Hierarchy
Index
Properties
Properties
Readonly id
Readonly jsonrpc
Readonly method
Readonly params
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/json-rpc DocumentationInterface JsonRpcSuccessResponse
Hierarchy
Index
Properties
Properties
Readonly id
Readonly jsonrpc
Readonly result
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/json-rpc DocumentationInterface JsonRpcSuccessResponse
Hierarchy
Index
Properties
Properties
Readonly id
Readonly jsonrpc
Readonly result
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/json-rpc DocumentationInterface SimpleMessagingConnection<Request, Response>
Type Parameters
Request
Response
Hierarchy
Index
Properties
Methods
Properties
Readonly response Stream
Methods
Readonly send Request
Parameters
request: Request
Returns void
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/json-rpc DocumentationInterface SimpleMessagingConnection<Request, Response>
Type Parameters
Request
Response
Hierarchy
Index
Properties
Methods
Properties
Readonly response Stream
Methods
Readonly send Request
Parameters
request: Request
Returns void
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/json-rpc Documentation@cosmjs/json-rpc Documentation
Index
Classes
Interfaces
Type Aliases
Variables
Functions
Type Aliases
Json Rpc Id
Json Rpc Response
Variables
Const json Rpc Code
- Preparing search index...
- The search index is not available
@cosmjs/json-rpc Documentation@cosmjs/json-rpc Documentation
Index
Classes
Interfaces
Type Aliases
Variables
Functions
Type Aliases
Json Rpc Id
Json Rpc Response
Variables
Const json Rpc Code
Error codes as specified in JSON-RPC 2.0
https://www.jsonrpc.org/specification#error_object
-Type declaration
internal Error: number
invalid Params: number
invalid Request: number
method Not Found: number
parse Error: number
server Error: { default: number }
default: number
Functions
is Json Rpc Error Response
Parameters
response: JsonRpcResponse
Returns response is JsonRpcErrorResponse
is Json Rpc Success Response
Parameters
response: JsonRpcResponse
Returns response is JsonRpcSuccessResponse
make Json Rpc Id
Type declaration
internal Error: number
invalid Params: number
invalid Request: number
method Not Found: number
parse Error: number
server Error: { default: number }
default: number
Functions
is Json Rpc Error Response
Parameters
response: JsonRpcResponse
Returns response is JsonRpcErrorResponse
is Json Rpc Success Response
Parameters
response: JsonRpcResponse
Returns response is JsonRpcSuccessResponse
make Json Rpc Id
Creates a new ID to be used for creating a JSON-RPC request.
Multiple calls of this produce unique values.
The output may be any value compatible to JSON-RPC request IDs with an undefined output format and generation logic.
-Returns number
parse Json Rpc Error Response
Returns number
parse Json Rpc Error Response
Throws if data is not a JsonRpcErrorResponse
-Parameters
data: unknown
Returns JsonRpcErrorResponse
parse Json Rpc Id
Parameters
data: unknown
Returns JsonRpcErrorResponse
parse Json Rpc Id
Extracts ID field from request or response object.
Returns
-null
when no valid ID was found.Parameters
data: unknown
Returns JsonRpcId | null
parse Json Rpc Request
Parameters
data: unknown
Returns JsonRpcRequest
parse Json Rpc Response
Parameters
data: unknown
Returns JsonRpcId | null
parse Json Rpc Request
Parameters
data: unknown
Returns JsonRpcRequest
parse Json Rpc Response
Returns a JsonRpcErrorResponse if input can be parsed as a JSON-RPC error. Otherwise parses input as JsonRpcSuccessResponse. Throws if input is neither a valid error nor success response.
-Parameters
data: unknown
Returns JsonRpcResponse
parse Json Rpc Success Response
Parameters
data: unknown
Returns JsonRpcResponse
parse Json Rpc Success Response
Throws if data is not a JsonRpcSuccessResponse
Parameters
data: unknown
Returns JsonRpcSuccessResponse
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/ledger-amino DocumentationClass LedgerConnector
Hierarchy
Index
Constructors
Methods
Constructors
constructor
Parameters
transport: Transport<string>
options: LedgerConnectorOptions = {}
Returns LedgerConnector
Methods
get Cosmos Address
Parameters
Optional pubkey: Uint8Array
Returns Promise<string>
get Cosmos App Version
Returns Promise<string>
get Pubkey
Parameters
Optional hdPath: HdPath
Returns Promise<Uint8Array>
get Pubkeys
Returns Promise<readonly Uint8Array[]>
show Address
- Preparing search index...
- The search index is not available
@cosmjs/ledger-amino DocumentationClass LedgerConnector
Hierarchy
Index
Constructors
Methods
Constructors
constructor
Parameters
transport: Transport<string>
options: LedgerConnectorOptions = {}
Returns LedgerConnector
Methods
get Cosmos Address
Parameters
Optional pubkey: Uint8Array
Returns Promise<string>
get Cosmos App Version
Returns Promise<string>
get Pubkey
Parameters
Optional hdPath: HdPath
Returns Promise<Uint8Array>
get Pubkeys
Returns Promise<readonly Uint8Array[]>
show Address
Shows the user's address in the device and returns an address/pubkey pair.
The address will be shown with the native prefix of the app (e.g. cosmos, persistence, desmos) and does not support the usage of other address prefixes.
-Parameters
Optional hdPath: HdPath
Returns Promise<AddressAndPubkey>
sign
Parameters
message: Uint8Array
Optional hdPath: HdPath
Returns Promise<Uint8Array>
Generated using TypeDoc
Parameters
Optional hdPath: HdPath
Returns Promise<AddressAndPubkey>
sign
Parameters
message: Uint8Array
Optional hdPath: HdPath
Returns Promise<Uint8Array>
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/ledger-amino DocumentationClass LedgerSigner
Hierarchy
Implements
Index
Constructors
Methods
Constructors
constructor
Parameters
transport: Transport<string>
options: LedgerConnectorOptions = {}
Returns LedgerSigner
Methods
get Accounts
Returns Promise<readonly AccountData[]>
show Address
- Preparing search index...
- The search index is not available
@cosmjs/ledger-amino DocumentationClass LedgerSigner
Hierarchy
Implements
Index
Constructors
Methods
Constructors
constructor
Parameters
transport: Transport<string>
options: LedgerConnectorOptions = {}
Returns LedgerSigner
Methods
get Accounts
Returns Promise<readonly AccountData[]>
show Address
Shows the user's address in the device and returns an address/pubkey pair.
The address will be shown with the native prefix of the app (e.g. cosmos, persistence, desmos) and does not support the usage of other address prefixes.
Parameters
Optional path: HdPath
The HD path to show the address for. If unset, this is the first account.
-Returns Promise<AddressAndPubkey>
sign Amino
Parameters
signerAddress: string
signDoc: StdSignDoc
Returns Promise<AminoSignResponse>
Generated using TypeDoc
Returns Promise<AddressAndPubkey>
sign Amino
Parameters
signerAddress: string
signDoc: StdSignDoc
Returns Promise<AminoSignResponse>
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/ledger-amino DocumentationInterface AddressAndPubkey
Hierarchy
Index
Properties
Properties
Readonly address
Readonly pubkey
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/ledger-amino DocumentationInterface AddressAndPubkey
Hierarchy
Index
Properties
Properties
Readonly address
Readonly pubkey
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/math DocumentationClass Decimal
A type for arbitrary precision, non-negative decimals.
Instances of this class are immutable.
-Hierarchy
Index
Accessors
Methods
Accessors
atomics
Returns string
fractional Digits
Returns number
Methods
ceil
Hierarchy
Index
Accessors
Methods
Accessors
atomics
Returns string
fractional Digits
Returns number
Methods
ceil
Returns the smallest decimal >= this which has no fractional part (rounding up)
-Returns Decimal
equals
Parameters
b: Decimal
Returns boolean
floor
Returns Decimal
equals
Parameters
b: Decimal
Returns boolean
floor
Returns the greatest decimal <= this which has no fractional part (rounding down)
-Returns Decimal
is Greater Than
Parameters
b: Decimal
Returns boolean
is Greater Than Or Equal
Parameters
b: Decimal
Returns boolean
is Less Than
Parameters
b: Decimal
Returns boolean
is Less Than Or Equal
Parameters
b: Decimal
Returns boolean
minus
Returns Decimal
is Greater Than
Parameters
b: Decimal
Returns boolean
is Greater Than Or Equal
Parameters
b: Decimal
Returns boolean
is Less Than
Parameters
b: Decimal
Returns boolean
is Less Than Or Equal
Parameters
b: Decimal
Returns boolean
minus
a.minus(b) returns a-b.
Both values need to have the same fractional digits. The resulting difference needs to be non-negative.
-Parameters
b: Decimal
Returns Decimal
multiply
Parameters
b: Decimal
Returns Decimal
multiply
a.multiply(b) returns a*b.
We only allow multiplication by unsigned integers to avoid rounding errors.
-Parameters
b: Uint32 | Uint53 | Uint64
Returns Decimal
plus
Parameters
b: Uint32 | Uint53 | Uint64
Returns Decimal
plus
a.plus(b) returns a+b.
Both values need to have the same fractional digits.
-Parameters
b: Decimal
Returns Decimal
to Float Approximation
Parameters
b: Decimal
Returns Decimal
to Float Approximation
Returns an approximation as a float type. Only use this if no exact calculation is required.
-Returns number
to String
Returns string
Static compare
Parameters
a: Decimal
b: Decimal
Returns number
Static from Atomics
Parameters
atomics: string
fractionalDigits: number
Returns Decimal
Static from User Input
Parameters
input: string
fractionalDigits: number
Returns Decimal
Static one
Returns number
to String
Returns string
Static compare
Parameters
a: Decimal
b: Decimal
Returns number
Static from Atomics
Parameters
atomics: string
fractionalDigits: number
Returns Decimal
Static from User Input
Parameters
input: string
fractionalDigits: number
Returns Decimal
Static one
Creates a Decimal with value 1.0 and the given number of fractial digits.
Fractional digits are not relevant for the value but needed to be able to perform arithmetic operations with other decimals.
-Parameters
fractionalDigits: number
Returns Decimal
Static zero
Parameters
fractionalDigits: number
Returns Decimal
Static zero
Creates a Decimal with value 0.0 and the given number of fractial digits.
Fractional digits are not relevant for the value but needed to be able to perform arithmetic operations with other decimals.
diff --git a/latest/math/classes/Int53.html b/latest/math/classes/Int53.html index 7d1a69c89c..a431ec80fc 100644 --- a/latest/math/classes/Int53.html +++ b/latest/math/classes/Int53.html @@ -1 +1 @@ -- Preparing search index...
- The search index is not available
@cosmjs/math DocumentationClass Int53
Hierarchy
Implements
Index
Constructors
Properties
Methods
Constructors
constructor
Parameters
input: number
Returns Int53
Properties
Protected Readonly data
Methods
to Big Int
Returns bigint
to Number
Returns number
to String
Returns string
Static from String
Parameters
str: string
Returns Int53
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/math DocumentationClass Int53
Hierarchy
Implements
Index
Constructors
Properties
Methods
Constructors
constructor
Parameters
input: number
Returns Int53
Properties
Protected Readonly data
Methods
to Big Int
Returns bigint
to Number
Returns number
to String
Returns string
Static from String
Parameters
str: string
Returns Int53
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/math DocumentationClass Uint32
Hierarchy
Implements
Index
Constructors
Properties
Methods
Constructors
constructor
Parameters
input: number
Returns Uint32
Properties
Protected Readonly data
Methods
to Big Int
Returns bigint
to Bytes Big Endian
Returns Uint8Array
to Bytes Little Endian
Returns Uint8Array
to Number
Returns number
to String
Returns string
Static from Big Endian Bytes
use Uint32.fromBytes
-Parameters
bytes: ArrayLike<number>
Returns Uint32
Static from Bytes
- Preparing search index...
- The search index is not available
@cosmjs/math DocumentationClass Uint32
Hierarchy
Implements
Index
Constructors
Properties
Methods
Constructors
constructor
Parameters
input: number
Returns Uint32
Properties
Protected Readonly data
Methods
to Big Int
Returns bigint
to Bytes Big Endian
Returns Uint8Array
to Bytes Little Endian
Returns Uint8Array
to Number
Returns number
to String
Returns string
Static from Big Endian Bytes
use Uint32.fromBytes
+Parameters
bytes: ArrayLike<number>
Returns Uint32
Static from Bytes
Creates a Uint32 from a fixed length byte array.
Parameters
bytes: ArrayLike<number>
a list of exactly 4 bytes
endianess: "be" | "le" = "be"
defaults to big endian
-Returns Uint32
Static from String
Parameters
str: string
Returns Uint32
Generated using TypeDoc
Returns Uint32
Static from String
Parameters
str: string
Returns Uint32
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/math DocumentationClass Uint53
Hierarchy
Implements
Index
Constructors
Properties
Methods
Constructors
constructor
Parameters
input: number
Returns Uint53
Properties
Protected Readonly data
Methods
to Big Int
Returns bigint
to Number
Returns number
to String
Returns string
Static from String
Parameters
str: string
Returns Uint53
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/math DocumentationClass Uint53
Hierarchy
Implements
Index
Constructors
Properties
Methods
Constructors
constructor
Parameters
input: number
Returns Uint53
Properties
Protected Readonly data
Methods
to Big Int
Returns bigint
to Number
Returns number
to String
Returns string
Static from String
Parameters
str: string
Returns Uint53
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/math DocumentationClass Uint64
Hierarchy
Implements
Index
Methods
Methods
to Big Int
Returns bigint
to Bytes Big Endian
Returns Uint8Array
to Bytes Little Endian
Returns Uint8Array
to Number
Returns number
to String
Returns string
Static from Bytes
- Preparing search index...
- The search index is not available
@cosmjs/math DocumentationClass Uint64
Hierarchy
Implements
Index
Methods
Methods
to Big Int
Returns bigint
to Bytes Big Endian
Returns Uint8Array
to Bytes Little Endian
Returns Uint8Array
to Number
Returns number
to String
Returns string
Static from Bytes
Creates a Uint64 from a fixed length byte array.
Parameters
bytes: ArrayLike<number>
a list of exactly 8 bytes
endianess: "be" | "le" = "be"
defaults to big endian
-Returns Uint64
Static from Bytes Big Endian
use Uint64.fromBytes
-Parameters
bytes: ArrayLike<number>
Returns Uint64
Static from Number
Parameters
input: number
Returns Uint64
Static from String
Parameters
str: string
Returns Uint64
Generated using TypeDoc
Returns Uint64
Static from Bytes Big Endian
use Uint64.fromBytes
+Parameters
bytes: ArrayLike<number>
Returns Uint64
Static from Number
Parameters
input: number
Returns Uint64
Static from String
Parameters
str: string
Returns Uint64
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/proto-signing DocumentationClass DirectSecp256k1HdWallet
A wallet for protobuf based signing using SIGN_MODE_DIRECT
-Hierarchy
Implements
Index
Constructors
Accessors
Methods
Constructors
Protected constructor
Parameters
mnemonic: EnglishMnemonic
options: DirectSecp256k1HdWalletConstructorOptions
Returns DirectSecp256k1HdWallet
Accessors
mnemonic
Returns string
Methods
get Accounts
Returns Promise<readonly AccountData[]>
serialize
Hierarchy
Implements
Index
Constructors
Accessors
Methods
Constructors
Protected constructor
Parameters
mnemonic: EnglishMnemonic
options: DirectSecp256k1HdWalletConstructorOptions
Returns DirectSecp256k1HdWallet
Accessors
mnemonic
Returns string
Methods
get Accounts
Returns Promise<readonly AccountData[]>
serialize
Generates an encrypted serialization of this wallet.
Parameters
password: string
The user provided password used to generate an encryption key via a KDF. This is not normalized internally (see "Unicode normalization" to learn more).
-Returns Promise<string>
serialize With Encryption Key
Returns Promise<string>
serialize With Encryption Key
Generates an encrypted serialization of this wallet.
This is an advanced alternative to calling
serialize(password)
directly, which allows you to offload the KDF execution to a non-UI thread (e.g. in a WebWorker).The caller is responsible for ensuring the key was derived with the given KDF options. If this is not the case, the wallet cannot be restored with the original password.
-Parameters
encryptionKey: Uint8Array
kdfConfiguration: KdfConfiguration
Returns Promise<string>
sign Direct
Parameters
signerAddress: string
signDoc: SignDoc
Returns Promise<DirectSignResponse>
Static deserialize
Parameters
encryptionKey: Uint8Array
kdfConfiguration: KdfConfiguration
Returns Promise<string>
sign Direct
Parameters
signerAddress: string
signDoc: SignDoc
Returns Promise<DirectSignResponse>
Static deserialize
Restores a wallet from an encrypted serialization.
Parameters
serialization: string
password: string
The user provided password used to generate an encryption key via a KDF. This is not normalized internally (see "Unicode normalization" to learn more).
-Returns Promise<DirectSecp256k1HdWallet>
Static deserialize With Encryption Key
Returns Promise<DirectSecp256k1HdWallet>
Static deserialize With Encryption Key
Restores a wallet from an encrypted serialization.
This is an advanced alternative to calling
deserialize(serialization, password)
directly, which allows you to offload the KDF execution to a non-UI thread (e.g. in a WebWorker).The caller is responsible for ensuring the key was derived with the given KDF configuration. This can be done using
-extractKdfConfiguration(serialization)
andexecuteKdf(password, kdfConfiguration)
from this package.Parameters
serialization: string
encryptionKey: Uint8Array
Returns Promise<DirectSecp256k1HdWallet>
Static from Mnemonic
Parameters
serialization: string
encryptionKey: Uint8Array
Returns Promise<DirectSecp256k1HdWallet>
Static from Mnemonic
Restores a wallet from the given BIP39 mnemonic.
Parameters
mnemonic: string
Any valid English mnemonic.
options: Partial<DirectSecp256k1HdWalletOptions> = {}
An optional
-DirectSecp256k1HdWalletOptions
object optionally containing a bip39Password, hdPaths, and prefix.Returns Promise<DirectSecp256k1HdWallet>
Static generate
Returns Promise<DirectSecp256k1HdWallet>
Static generate
Generates a new wallet with a BIP39 mnemonic of the given length.
Parameters
length: 12 | 15 | 18 | 21 | 24 = 12
The number of words in the mnemonic (12, 15, 18, 21 or 24).
diff --git a/latest/proto-signing/classes/DirectSecp256k1Wallet.html b/latest/proto-signing/classes/DirectSecp256k1Wallet.html index 71e73f2fcd..a7653d153d 100644 --- a/latest/proto-signing/classes/DirectSecp256k1Wallet.html +++ b/latest/proto-signing/classes/DirectSecp256k1Wallet.html @@ -1,7 +1,7 @@- Preparing search index...
- The search index is not available
@cosmjs/proto-signing DocumentationClass DirectSecp256k1Wallet
A wallet that holds a single secp256k1 keypair.
If you want to work with BIP39 mnemonics and multiple accounts, use DirectSecp256k1HdWallet.
-Hierarchy
Implements
Index
Methods
Methods
get Accounts
Returns Promise<readonly AccountData[]>
sign Direct
Parameters
address: string
signDoc: SignDoc
Returns Promise<DirectSignResponse>
Static from Key
Hierarchy
Implements
Index
Methods
Methods
get Accounts
Returns Promise<readonly AccountData[]>
sign Direct
Parameters
address: string
signDoc: SignDoc
Returns Promise<DirectSignResponse>
Static from Key
Creates a DirectSecp256k1Wallet from the given private key
Parameters
privkey: Uint8Array
The private key.
diff --git a/latest/proto-signing/classes/Registry.html b/latest/proto-signing/classes/Registry.html index c671c95f6d..2b62528d92 100644 --- a/latest/proto-signing/classes/Registry.html +++ b/latest/proto-signing/classes/Registry.html @@ -1,4 +1,4 @@ -- Preparing search index...
- The search index is not available
@cosmjs/proto-signing DocumentationClass Registry
Hierarchy
Index
Constructors
Methods
Constructors
constructor
- Preparing search index...
- The search index is not available
@cosmjs/proto-signing DocumentationClass Registry
Hierarchy
Index
Constructors
Methods
Constructors
constructor
Creates a new Registry for mapping protobuf type identifiers/type URLs to actual implementations. Those implementations are typically generated with ts-proto but we also support protobuf.js as a type generator.
@@ -9,18 +9,18 @@ for historic reasons. Those can be overriden by customTypes.register()
methodParameters
Optional customTypes: Iterable<[string, GeneratedType]>
Returns Registry
Methods
decode
Parameters
__namedParameters: DecodeObject
Returns any
decode Tx Body
Parameters
txBody: Uint8Array
Returns TxBody
encode
Parameters
Optional customTypes: Iterable<[string, GeneratedType]>
Returns Registry
Methods
decode
Parameters
__namedParameters: DecodeObject
Returns any
decode Tx Body
Parameters
txBody: Uint8Array
Returns TxBody
encode
Takes a typeUrl/value pair and encodes the value to protobuf if the given type was previously registered.
If the value has to be wrapped in an Any, this needs to be done manually after this call. Or use
-encodeAsAny
instead.Parameters
encodeObject: EncodeObject
Returns Uint8Array
encode As Any
Parameters
encodeObject: EncodeObject
Returns Uint8Array
encode As Any
Takes a typeUrl/value pair and encodes the value to an Any if the given type was previously registered.
-Parameters
encodeObject: EncodeObject
Returns Any
encode Tx Body
Parameters
txBodyFields: TxBodyValue
Returns Uint8Array
lookup Type
Parameters
encodeObject: EncodeObject
Returns Any
encode Tx Body
Parameters
txBodyFields: TxBodyValue
Returns Uint8Array
lookup Type
Looks up a type that was previously added to the registry.
The generator information (ts-proto or pbjs) gets lost along the way. If you need to work with the result type in TypeScript, you can use:
-Parameters
typeUrl: string
Returns undefined | GeneratedType
register
Parameters
typeUrl: string
type: GeneratedType
Returns void
Generated using TypeDoc
Parameters
typeUrl: string
Returns undefined | GeneratedType
register
Parameters
typeUrl: string
type: GeneratedType
Returns void
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/proto-signing DocumentationInterface AccountData
Hierarchy
Index
Properties
Properties
Readonly address
- Preparing search index...
- The search index is not available
@cosmjs/proto-signing DocumentationInterface AccountData
Hierarchy
Index
Properties
Properties
Readonly address
A printable address (typically bech32 encoded)
-Readonly algo
Readonly pubkey
Generated using TypeDoc
Readonly algo
Readonly pubkey
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/proto-signing DocumentationInterface DecodeObject
Hierarchy
Index
Properties
Properties
Readonly type Url
Readonly value
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/proto-signing DocumentationInterface DecodeObject
Hierarchy
Index
Properties
Properties
Readonly type Url
Readonly value
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/proto-signing DocumentationInterface DecodedTxRaw
Hierarchy
Index
Properties
Properties
Readonly auth Info
Readonly body
Readonly signatures
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/proto-signing DocumentationInterface DecodedTxRaw
Hierarchy
Index
Properties
Properties
Readonly auth Info
Readonly body
Readonly signatures
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/proto-signing DocumentationInterface DirectSecp256k1HdWalletOptions
Hierarchy
Index
Properties
Properties
Readonly bip39 Password
- Preparing search index...
- The search index is not available
@cosmjs/proto-signing DocumentationInterface DirectSecp256k1HdWalletOptions
Hierarchy
Index
Properties
Properties
Readonly bip39 Password
The password to use when deriving a BIP39 seed from a mnemonic.
-Readonly hd Paths
Readonly hd Paths
The BIP-32/SLIP-10 derivation paths. Defaults to the Cosmos Hub/ATOM path
-m/44'/118'/0'/0/0
.Readonly prefix
Readonly prefix
The bech32 address prefix (human readable part). Defaults to "cosmos".
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@cosmjs/proto-signing DocumentationInterface DirectSignResponse
Hierarchy
Index
Properties
Properties
Readonly signature
Readonly signed
- Preparing search index...
- The search index is not available
@cosmjs/proto-signing Documentation