@desmoslabs/desmjs
Namespaces
- Authz
- Bank
- Desmjs
- Distribution
- Feegrant
- Gov
- Posts
- Profiles
- Reactions
- Relationships
- Reports
- Staking
- Subspaces
- Supply
- TokenFactory
Enumerations
Classes
- AminoTypes
- DesmosClient
- GasPrice
- NoOpSigner
- ObserverManager
- OfflineSignerAdapter
- PrivateKeyProvider
- PrivateKeySigner
- Secp256k1KeyProvider
- Signer
- SignerNotConnected
Interfaces
- AminoConverterI
- BIP44
- Block
- ChainInfo
- ChangeAdminResult
- Code
- CodeDetails
- Coin
- Contract
- ContractCodeHistoryEntry
- Currency
- DeliverTxResponse
- EncodeObject
- ExecuteResult
- IndexedTx
- InstantiateOptions
- InstantiateResult
- MigrateResult
- OfflineSignerConfig
- PathConfig
- PrivateKey
- PrivateKeySignerOptions
- SearchByHeightQuery
- SearchBySentFromOrToQuery
- SequenceResponse
- SignTxOptions
- SignatureResult
- SimulateOptions
- StdFee
- TxRaw
- UploadResult
Type Aliases
AminoConverters
Ƭ AminoConverters: Record
<string
, AminoConverterI
>
Defined in
packages/core/src/aminotypes.ts:37
DesmosQueryClient
Ƭ DesmosQueryClient: QueryClient
& AuthzV1Beta1Extension
& AuthExtension
& BankExtension
& StakingExtension
& TxExtension
& GovExtension
& ProfilesV3Extension
& RelationshipsV1Extension
& SubspacesV3Extension
& PostsExtension
& ReactionsExtension
& ReportsV1Extension
& SupplyV1Extension
& TokenFactoryV1Extension
& WasmExtension
& IbcExtension
Defined in
packages/core/src/modules/queries.ts:42
JsonObject
Ƭ JsonObject: any
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
.
Defined in
node_modules/@cosmjs/cosmwasm-stargate/build/modules/wasm/queries.d.ts:9
Observer
Ƭ Observer<T
>: (newStatus
: T
) => any
Type parameters
Name |
---|
T |
Type declaration
▸ (newStatus
): any
Parameters
Name | Type |
---|---|
newStatus | T |
Returns
any
Defined in
packages/core/src/utils/observermanager.ts:1
SearchTxQuery
Ƭ SearchTxQuery: string
| ReadonlyArray
<{ key
: string
; value
: string
}>
This query type allows you to pass arbitrary key/value pairs to the backend.
Defined in
node_modules/@cosmjs/stargate/build/search.d.ts:10
SignerObserver
Ƭ SignerObserver: Observer
<SignerStatus
>
Represents a generic method that receives updates for new Signer status values.
Defined in
packages/core/src/signers/signer.ts:36
Variables
DesmosAminoConverter
• Const
DesmosAminoConverter: Object
Type declaration
Name | Type |
---|---|
/cosmos.gov.v1.MsgDeposit | { aminoType : string ; fromAmino : (object : MsgDepositAmino ) => MsgDeposit ; toAmino : (message : MsgDeposit ) => MsgDepositAmino } |
/cosmos.gov.v1.MsgDeposit.aminoType | string |
/cosmos.gov.v1.MsgDeposit.fromAmino | (object : MsgDepositAmino ) => MsgDeposit |
/cosmos.gov.v1.MsgDeposit.toAmino | (message : MsgDeposit ) => MsgDepositAmino |
/cosmos.gov.v1.MsgExecLegacyContent | { aminoType : string ; fromAmino : (object : MsgExecLegacyContentAmino , aminoConverter? : AminoConverter ) => MsgExecLegacyContent ; toAmino : (message : MsgExecLegacyContent , converter? : AminoConverter ) => MsgExecLegacyContentAmino } |
/cosmos.gov.v1.MsgExecLegacyContent.aminoType | string |
/cosmos.gov.v1.MsgExecLegacyContent.fromAmino | (object : MsgExecLegacyContentAmino , aminoConverter? : AminoConverter ) => MsgExecLegacyContent |
/cosmos.gov.v1.MsgExecLegacyContent.toAmino | (message : MsgExecLegacyContent , converter? : AminoConverter ) => MsgExecLegacyContentAmino |
/cosmos.gov.v1.MsgSubmitProposal | { aminoType : string ; fromAmino : (object : MsgSubmitProposalAmino , converter? : AminoConverter ) => MsgSubmitProposal ; toAmino : (message : MsgSubmitProposal , converter? : AminoConverter ) => MsgSubmitProposalAmino } |
/cosmos.gov.v1.MsgSubmitProposal.aminoType | string |
/cosmos.gov.v1.MsgSubmitProposal.fromAmino | (object : MsgSubmitProposalAmino , converter? : AminoConverter ) => MsgSubmitProposal |
/cosmos.gov.v1.MsgSubmitProposal.toAmino | (message : MsgSubmitProposal , converter? : AminoConverter ) => MsgSubmitProposalAmino |
/cosmos.gov.v1.MsgUpdateParams | { aminoType : string ; fromAmino : (object : MsgUpdateParamsAmino ) => MsgUpdateParams ; toAmino : (message : MsgUpdateParams ) => MsgUpdateParamsAmino } |
/cosmos.gov.v1.MsgUpdateParams.aminoType | string |
/cosmos.gov.v1.MsgUpdateParams.fromAmino | (object : MsgUpdateParamsAmino ) => MsgUpdateParams |
/cosmos.gov.v1.MsgUpdateParams.toAmino | (message : MsgUpdateParams ) => MsgUpdateParamsAmino |
/cosmos.gov.v1.MsgVote | { aminoType : string ; fromAmino : (object : MsgVoteAmino ) => MsgVote ; toAmino : (message : MsgVote ) => MsgVoteAmino } |
/cosmos.gov.v1.MsgVote.aminoType | string |
/cosmos.gov.v1.MsgVote.fromAmino | (object : MsgVoteAmino ) => MsgVote |
/cosmos.gov.v1.MsgVote.toAmino | (message : MsgVote ) => MsgVoteAmino |
/cosmos.gov.v1.MsgVoteWeighted | { aminoType : string ; fromAmino : (object : MsgVoteWeightedAmino ) => MsgVoteWeighted ; toAmino : (message : MsgVoteWeighted ) => MsgVoteWeightedAmino } |
/cosmos.gov.v1.MsgVoteWeighted.aminoType | string |
/cosmos.gov.v1.MsgVoteWeighted.fromAmino | (object : MsgVoteWeightedAmino ) => MsgVoteWeighted |
/cosmos.gov.v1.MsgVoteWeighted.toAmino | (message : MsgVoteWeighted ) => MsgVoteWeightedAmino |
/cosmos.gov.v1beta1.MsgDeposit | { aminoType : string ; fromAmino : (object : MsgDepositAmino ) => MsgDeposit ; toAmino : (message : MsgDeposit ) => MsgDepositAmino } |
/cosmos.gov.v1beta1.MsgDeposit.aminoType | string |
/cosmos.gov.v1beta1.MsgDeposit.fromAmino | (object : MsgDepositAmino ) => MsgDeposit |
/cosmos.gov.v1beta1.MsgDeposit.toAmino | (message : MsgDeposit ) => MsgDepositAmino |
/cosmos.gov.v1beta1.MsgSubmitProposal | { aminoType : string ; fromAmino : (object : MsgSubmitProposalAmino ) => MsgSubmitProposal ; toAmino : (message : MsgSubmitProposal ) => MsgSubmitProposalAmino } |
/cosmos.gov.v1beta1.MsgSubmitProposal.aminoType | string |
/cosmos.gov.v1beta1.MsgSubmitProposal.fromAmino | (object : MsgSubmitProposalAmino ) => MsgSubmitProposal |
/cosmos.gov.v1beta1.MsgSubmitProposal.toAmino | (message : MsgSubmitProposal ) => MsgSubmitProposalAmino |
/cosmos.gov.v1beta1.MsgVote | { aminoType : string ; fromAmino : (object : MsgVoteAmino ) => MsgVote ; toAmino : (message : MsgVote ) => MsgVoteAmino } |
/cosmos.gov.v1beta1.MsgVote.aminoType | string |
/cosmos.gov.v1beta1.MsgVote.fromAmino | (object : MsgVoteAmino ) => MsgVote |
/cosmos.gov.v1beta1.MsgVote.toAmino | (message : MsgVote ) => MsgVoteAmino |
/cosmos.gov.v1beta1.MsgVoteWeighted | { aminoType : string ; fromAmino : (object : MsgVoteWeightedAmino ) => MsgVoteWeighted ; toAmino : (message : MsgVoteWeighted ) => MsgVoteWeightedAmino } |
/cosmos.gov.v1beta1.MsgVoteWeighted.aminoType | string |
/cosmos.gov.v1beta1.MsgVoteWeighted.fromAmino | (object : MsgVoteWeightedAmino ) => MsgVoteWeighted |
/cosmos.gov.v1beta1.MsgVoteWeighted.toAmino | (message : MsgVoteWeighted ) => MsgVoteWeightedAmino |
/cosmos.gov.v1beta1.TextProposal | { aminoType : string = TextProposalAminoType; fromAmino : (object : TextProposalAmino ) => TextProposal = TextProposal.fromAmino; toAmino : (message : TextProposal ) => TextProposalAmino = TextProposal.toAmino } |
/cosmos.gov.v1beta1.TextProposal.aminoType | string |
/cosmos.gov.v1beta1.TextProposal.fromAmino | (object : TextProposalAmino ) => TextProposal |
/cosmos.gov.v1beta1.TextProposal.toAmino | (message : TextProposal ) => TextProposalAmino |
Defined in
packages/core/src/modules/aminoconverters.ts:24
DesmosBech32Config
• Const
DesmosBech32Config: Object
Type declaration
Name | Type |
---|---|
bech32PrefixAccAddr | string |
bech32PrefixAccPub | string |
bech32PrefixConsAddr | string |
bech32PrefixConsPub | string |
bech32PrefixValAddr | string |
bech32PrefixValPub | string |
Defined in
packages/core/src/types/chains.ts:69
DesmosBip44
• Const
DesmosBip44: Object
Type declaration
Name | Type |
---|---|
coinType | number |
Defined in
packages/core/src/types/chains.ts:65
DesmosChains
• Const
DesmosChains: Record
<string
, ChainInfo
>
Defined in
packages/core/src/types/chains.ts:139
DesmosCoinType
• Const
DesmosCoinType: 852
Desmos BIP44 coin type.
Defined in
packages/core/src/signers/path.ts:7
DesmosGasPriceStep
• Const
DesmosGasPriceStep: Object
Type declaration
Name | Type |
---|---|
average | number |
high | number |
low | number |
Defined in
packages/core/src/types/chains.ts:78
DesmosMainnet
• Const
DesmosMainnet: ChainInfo
Defined in
packages/core/src/types/chains.ts:84
DesmosRegistry
• Const
DesmosRegistry: ReadonlyArray
<[string
, GeneratedType
]>
Defined in
packages/core/src/modules/registry.ts:19
DesmosTestnet
• Const
DesmosTestnet: ChainInfo
Defined in
packages/core/src/types/chains.ts:113
DoNotModify
• Const
DoNotModify: "[do-not-modify]"
Defined in
packages/core/src/modules/consts.ts:2
TxRaw
• TxRaw: Object
Type declaration
Name | Type |
---|---|
decode | (input : Uint8Array | Reader , length? : number ) => TxRaw |
encode | (message : TxRaw , writer? : Writer ) => Writer |
fromJSON | (object : any ) => TxRaw |
fromPartial | <I>(object : I ) => TxRaw |
toJSON | (message : TxRaw ) => unknown |
Defined in
node_modules/cosmjs-types/cosmos/tx/v1beta1/tx.d.ts:32
node_modules/cosmjs-types/cosmos/tx/v1beta1/tx.d.ts:866
Functions
assertIsDeliverTxFailure
▸ assertIsDeliverTxFailure(result
): void
Ensures the given result is a failure. Throws a detailed error message otherwise.
Parameters
Name | Type |
---|---|
result | DeliverTxResponse |
Returns
void
Defined in
node_modules/@cosmjs/stargate/build/stargateclient.d.ts:122
assertIsDeliverTxSuccess
▸ assertIsDeliverTxSuccess(result
): void
Ensures the given result is a success. Throws a detailed error message otherwise.
Parameters
Name | Type |
---|---|
result | DeliverTxResponse |
Returns
void
Defined in
node_modules/@cosmjs/stargate/build/stargateclient.d.ts:118
buildDesmosQueryClient
▸ buildDesmosQueryClient(tendermintClient
): DesmosQueryClient
| undefined
Parameters
Name | Type |
---|---|
tendermintClient | undefined | TendermintClient |
Returns
DesmosQueryClient
| undefined
Defined in
packages/core/src/modules/queries.ts:60
convertCoin
▸ convertCoin(coin
, toExponent
, currencies
): Coin
| null
Converts a coin to its equivalent which has the provided exponent.
Parameters
Name | Type | Description |
---|---|---|
coin | Coin | The source coin. |
toExponent | number | The target exponent. |
currencies | Currency [] | Array that contains all the possible denoms. |
Returns
Coin
| null
Returns the converted coin or null on error.
Defined in
packages/core/src/utils/coins.ts:12
getChainId
▸ getChainId(chain
): Promise
<string
>
Parameters
Name | Type |
---|---|
chain | ChainInfo |
Returns
Promise
<string
>
Defined in
packages/core/src/types/chains.ts:144
getPubKeyBytes
▸ getPubKeyBytes(result
): Uint8Array
Returns the public key bytes associated with the given result.
Parameters
Name | Type |
---|---|
result | SignatureResult |
Returns
Uint8Array
Defined in
packages/core/src/signatureresult.ts:59
getPubKeyRawBytes
▸ getPubKeyRawBytes(result
): Uint8Array
Returns the public key raw bytes, trimming the 2 bytes prefix that is usually present inside the key value.
Parameters
Name | Type |
---|---|
result | SignatureResult |
Returns
Uint8Array
Defined in
packages/core/src/signatureresult.ts:52
getSignatureBytes
▸ getSignatureBytes(result
): Uint8Array
Returns the signature bytes associated with the given result.
Parameters
Name | Type |
---|---|
result | SignatureResult |
Returns
Uint8Array
Defined in
packages/core/src/signatureresult.ts:75
getSignedBytes
▸ getSignedBytes(result
): Uint8Array
Returns the signed bytes associated with the given result.
Parameters
Name | Type |
---|---|
result | SignatureResult |
Returns
Uint8Array
Defined in
packages/core/src/signatureresult.ts:66
isAminoConverter
▸ isAminoConverter(converter
): converter is [string, AminoConverter]
Parameters
Name | Type |
---|---|
converter | [string , AminoConverter | "not_supported_by_chain" ] |
Returns
converter is [string, AminoConverter]
Defined in
packages/core/src/types/utils.ts:3
isSignDoc
▸ isSignDoc(value
): value is SignDoc
Checks whether the given value is a SignDoc instance or not.
Parameters
Name | Type |
---|---|
value | SignDoc | StdSignDoc |
Returns
value is SignDoc
Defined in
packages/core/src/signatureresult.ts:26
isStdSignDoc
▸ isStdSignDoc(value
): value is StdSignDoc
Checks whether the given value is a StdSignDoc instance or not.
Parameters
Name | Type |
---|---|
value | SignDoc | StdSignDoc |
Returns
value is StdSignDoc
Defined in
packages/core/src/signatureresult.ts:38
makeAuthInfoBytes
▸ makeAuthInfoBytes(signers
, feeAmount
, gasLimit
, signMode?
, granter?
): Uint8Array
Creates and serializes an AuthInfo document. This implementation does not support different signing modes for the different signers.
Parameters
Name | Type | Default value |
---|---|---|
signers | readonly { pubkey : Any ; sequence : number }[] | undefined |
feeAmount | readonly Coin [] | undefined |
gasLimit | number | undefined |
signMode | SignMode | SignMode.SIGN_MODE_DIRECT |
granter? | string | undefined |
Returns
Uint8Array
Defined in
packages/core/src/desmosclient.ts:107
makeDesmosPath
▸ makeDesmosPath(config?
): HdPath
Generates the Desmos BIP44 derivation path.
Parameters
Name | Type | Default value | Description |
---|---|---|---|
config | undefined | Partial <PathConfig > | undefined | Config to generate the BIP44 derivation path. |
Returns
HdPath
Defined in
packages/core/src/signers/path.ts:30
pathToString
▸ pathToString(path
): string
Parameters
Name | Type |
---|---|
path | HdPath |
Returns
string
Defined in
node_modules/@cosmjs/crypto/build/slip10.d.ts:66
stringToPath
▸ stringToPath(input
): HdPath
Parameters
Name | Type |
---|---|
input | string |
Returns
HdPath
Defined in
node_modules/@cosmjs/crypto/build/slip10.d.ts:67
timestampFromDate
▸ timestampFromDate(date
): Timestamp
Parameters
Name | Type |
---|---|
date | Date |
Returns
Timestamp
Defined in
packages/core/src/utils/timestamp.ts:4
timestampToDate
▸ timestampToDate(timestamp
): Date
Parameters
Name | Type |
---|---|
timestamp | Timestamp |
Returns
Date