Skip to main content

@desmoslabs/desmjs

Namespaces

Enumerations

Classes

Interfaces

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
NameType
newStatusT
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

NameType
/cosmos.gov.v1.MsgDeposit{ aminoType: string ; fromAmino: (object: MsgDepositAmino) => MsgDeposit ; toAmino: (message: MsgDeposit) => MsgDepositAmino }
/cosmos.gov.v1.MsgDeposit.aminoTypestring
/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.aminoTypestring
/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.aminoTypestring
/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.aminoTypestring
/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.aminoTypestring
/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.aminoTypestring
/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.aminoTypestring
/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.aminoTypestring
/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.aminoTypestring
/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.aminoTypestring
/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.aminoTypestring
/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

NameType
bech32PrefixAccAddrstring
bech32PrefixAccPubstring
bech32PrefixConsAddrstring
bech32PrefixConsPubstring
bech32PrefixValAddrstring
bech32PrefixValPubstring

Defined in

packages/core/src/types/chains.ts:69


DesmosBip44

Const DesmosBip44: Object

Type declaration

NameType
coinTypenumber

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

NameType
averagenumber
highnumber
lownumber

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

NameType
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

NameType
resultDeliverTxResponse

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

NameType
resultDeliverTxResponse

Returns

void

Defined in

node_modules/@cosmjs/stargate/build/stargateclient.d.ts:118


buildDesmosQueryClient

buildDesmosQueryClient(tendermintClient): DesmosQueryClient | undefined

Parameters

NameType
tendermintClientundefined | 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

NameTypeDescription
coinCoinThe source coin.
toExponentnumberThe target exponent.
currenciesCurrency[]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

NameType
chainChainInfo

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

NameType
resultSignatureResult

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

NameType
resultSignatureResult

Returns

Uint8Array

Defined in

packages/core/src/signatureresult.ts:52


getSignatureBytes

getSignatureBytes(result): Uint8Array

Returns the signature bytes associated with the given result.

Parameters

NameType
resultSignatureResult

Returns

Uint8Array

Defined in

packages/core/src/signatureresult.ts:75


getSignedBytes

getSignedBytes(result): Uint8Array

Returns the signed bytes associated with the given result.

Parameters

NameType
resultSignatureResult

Returns

Uint8Array

Defined in

packages/core/src/signatureresult.ts:66


isAminoConverter

isAminoConverter(converter): converter is [string, AminoConverter]

Parameters

NameType
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

NameType
valueSignDoc | 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

NameType
valueSignDoc | 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

NameTypeDefault value
signersreadonly { pubkey: Any ; sequence: number }[]undefined
feeAmountreadonly Coin[]undefined
gasLimitnumberundefined
signModeSignModeSignMode.SIGN_MODE_DIRECT
granter?stringundefined

Returns

Uint8Array

Defined in

packages/core/src/desmosclient.ts:107


makeDesmosPath

makeDesmosPath(config?): HdPath

Generates the Desmos BIP44 derivation path.

Parameters

NameTypeDefault valueDescription
configundefined | Partial<PathConfig>undefinedConfig to generate the BIP44 derivation path.

Returns

HdPath

Defined in

packages/core/src/signers/path.ts:30


pathToString

pathToString(path): string

Parameters

NameType
pathHdPath

Returns

string

Defined in

node_modules/@cosmjs/crypto/build/slip10.d.ts:66


stringToPath

stringToPath(input): HdPath

Parameters

NameType
inputstring

Returns

HdPath

Defined in

node_modules/@cosmjs/crypto/build/slip10.d.ts:67


timestampFromDate

timestampFromDate(date): Timestamp

Parameters

NameType
dateDate

Returns

Timestamp

Defined in

packages/core/src/utils/timestamp.ts:4


timestampToDate

timestampToDate(timestamp): Date

Parameters

NameType
timestampTimestamp

Returns

Date

Defined in

packages/core/src/utils/timestamp.ts:11