Options
All
  • Public
  • Public/Protected
  • All
Menu

Module lib/proto/cosmos/tx/v1beta1/tx

Index

Type aliases

DeepPartial

DeepPartial<T>: T extends Builtin ? T : T extends infer U[] ? DeepPartial<U>[] : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {[ K in keyof T]: DeepPartial<T[K]> } : Partial<T>

Type parameters

  • T

Variables

AuthInfo

AuthInfo: { decode: any; encode: any; fromJSON: any; fromPartial: any; toJSON: any }

Type declaration

  • decode: function
    • decode(input: Uint8Array | Reader, length?: number): AuthInfo
  • encode: function
    • encode(message: AuthInfo, writer?: Writer): Writer
  • fromJSON: function
  • fromPartial: function
    • fromPartial(object: { fee?: { amount?: { denom?: string | undefined; amount?: string | undefined; }[] | undefined; gasLimit?: number | undefined; payer?: string | undefined; granter?: string | undefined; }; signerInfos?: { publicKey?: { typeUrl?: string | undefined; value?: Uint8Array | undefined; } | undefined; modeInfo?: { single?: { mode?: SignMode | undefined; } | undefined; multi?: { ...; } | undefined; } | undefined; sequence?: number | undefined; }[] }): AuthInfo
    • Parameters

      • object: { fee?: { amount?: { denom?: string | undefined; amount?: string | undefined; }[] | undefined; gasLimit?: number | undefined; payer?: string | undefined; granter?: string | undefined; }; signerInfos?: { publicKey?: { typeUrl?: string | undefined; value?: Uint8Array | undefined; } | undefined; modeInfo?: { single?: { mode?: SignMode | undefined; } | undefined; multi?: { ...; } | undefined; } | undefined; sequence?: number | undefined; }[] }
        • Optional fee?: { amount?: { denom?: string | undefined; amount?: string | undefined; }[] | undefined; gasLimit?: number | undefined; payer?: string | undefined; granter?: string | undefined; }

          Fee is the fee and gas limit for the transaction. The first signer is the primary signer and the one which pays the fee. The fee can be calculated based on the cost of evaluating the body and doing signature verification of the signers. This can be estimated via simulation.

        • Optional signerInfos?: { publicKey?: { typeUrl?: string | undefined; value?: Uint8Array | undefined; } | undefined; modeInfo?: { single?: { mode?: SignMode | undefined; } | undefined; multi?: { ...; } | undefined; } | undefined; sequence?: number | undefined; }[]

          signer_infos defines the signing modes for the required signers. The number and order of elements must match the required signers from TxBody's messages. The first element is the primary signer and the one which pays the fee.

      Returns AuthInfo

  • toJSON: function

Fee

Fee: { decode: any; encode: any; fromJSON: any; fromPartial: any; toJSON: any }

Type declaration

  • decode: function
    • decode(input: Uint8Array | Reader, length?: number): Fee
  • encode: function
    • encode(message: Fee, writer?: Writer): Writer
  • fromJSON: function
    • fromJSON(object: any): Fee
  • fromPartial: function
    • fromPartial(object: { amount?: { denom?: string | undefined; amount?: string | undefined; }[]; gasLimit?: number; granter?: string; payer?: string }): Fee
    • Parameters

      • object: { amount?: { denom?: string | undefined; amount?: string | undefined; }[]; gasLimit?: number; granter?: string; payer?: string }
        • Optional amount?: { denom?: string | undefined; amount?: string | undefined; }[]

          amount is the amount of coins to be paid as a fee

        • Optional gasLimit?: number

          gas_limit is the maximum gas that can be used in transaction processing before an out of gas error occurs

        • Optional granter?: string

          if set, the fee payer (either the first signer or the value of the payer field) requests that a fee grant be used to pay fees instead of the fee payer's own balance. If an appropriate fee grant does not exist or the chain does not support fee grants, this will fail

        • Optional payer?: string

          if unset, the first signer is responsible for paying the fees. If set, the specified account must pay the fees. the payer must be a tx signer (and thus have signed this field in AuthInfo). setting this field does not change the ordering of required signers for the transaction.

      Returns Fee

  • toJSON: function
    • toJSON(message: Fee): unknown

ModeInfo

ModeInfo: { decode: any; encode: any; fromJSON: any; fromPartial: any; toJSON: any }

Type declaration

  • decode: function
    • decode(input: Uint8Array | Reader, length?: number): ModeInfo
  • encode: function
    • encode(message: ModeInfo, writer?: Writer): Writer
  • fromJSON: function
  • fromPartial: function
    • fromPartial(object: { multi?: { bitarray?: { extraBitsStored?: number | undefined; elems?: Uint8Array | undefined; } | undefined; modeInfos?: { single?: { mode?: SignMode | undefined; } | undefined; multi?: ... | undefined; }[] | undefined; }; single?: { mode?: SignMode | undefined; } }): ModeInfo
    • Parameters

      • object: { multi?: { bitarray?: { extraBitsStored?: number | undefined; elems?: Uint8Array | undefined; } | undefined; modeInfos?: { single?: { mode?: SignMode | undefined; } | undefined; multi?: ... | undefined; }[] | undefined; }; single?: { mode?: SignMode | undefined; } }
        • Optional multi?: { bitarray?: { extraBitsStored?: number | undefined; elems?: Uint8Array | undefined; } | undefined; modeInfos?: { single?: { mode?: SignMode | undefined; } | undefined; multi?: ... | undefined; }[] | undefined; }

          multi represents a nested multisig signer

        • Optional single?: { mode?: SignMode | undefined; }

          single represents a single signer

      Returns ModeInfo

  • toJSON: function

ModeInfo_Multi

ModeInfo_Multi: { decode: any; encode: any; fromJSON: any; fromPartial: any; toJSON: any }

Type declaration

  • decode: function
  • encode: function
  • fromJSON: function
  • fromPartial: function
    • fromPartial(object: { bitarray?: { extraBitsStored?: number | undefined; elems?: Uint8Array | undefined; }; modeInfos?: { single?: { mode?: SignMode | undefined; } | undefined; multi?: { bitarray?: { extraBitsStored?: number | undefined; elems?: Uint8Array | undefined; } | undefined; modeInfos?: ...[] | undefined; } | undefined; }[] }): ModeInfo_Multi
    • Parameters

      • object: { bitarray?: { extraBitsStored?: number | undefined; elems?: Uint8Array | undefined; }; modeInfos?: { single?: { mode?: SignMode | undefined; } | undefined; multi?: { bitarray?: { extraBitsStored?: number | undefined; elems?: Uint8Array | undefined; } | undefined; modeInfos?: ...[] | undefined; } | undefined; }[] }
        • Optional bitarray?: { extraBitsStored?: number | undefined; elems?: Uint8Array | undefined; }

          bitarray specifies which keys within the multisig are signing

        • Optional modeInfos?: { single?: { mode?: SignMode | undefined; } | undefined; multi?: { bitarray?: { extraBitsStored?: number | undefined; elems?: Uint8Array | undefined; } | undefined; modeInfos?: ...[] | undefined; } | undefined; }[]

          mode_infos is the corresponding modes of the signers of the multisig which could include nested multisig public keys

      Returns ModeInfo_Multi

  • toJSON: function

ModeInfo_Single

ModeInfo_Single: { decode: any; encode: any; fromJSON: any; fromPartial: any; toJSON: any }

Type declaration

SignDoc

SignDoc: { decode: any; encode: any; fromJSON: any; fromPartial: any; toJSON: any }

Type declaration

  • decode: function
    • decode(input: Uint8Array | Reader, length?: number): SignDoc
  • encode: function
    • encode(message: SignDoc, writer?: Writer): Writer
  • fromJSON: function
  • fromPartial: function
    • fromPartial(object: { accountNumber?: number; authInfoBytes?: Uint8Array; bodyBytes?: Uint8Array; chainId?: string }): SignDoc
    • Parameters

      • object: { accountNumber?: number; authInfoBytes?: Uint8Array; bodyBytes?: Uint8Array; chainId?: string }
        • Optional accountNumber?: number

          account_number is the account number of the account in state

        • Optional authInfoBytes?: Uint8Array

          auth_info_bytes is a protobuf serialization of an AuthInfo that matches the representation in TxRaw.

        • Optional bodyBytes?: Uint8Array

          body_bytes is protobuf serialization of a TxBody that matches the representation in TxRaw.

        • Optional chainId?: string

          chain_id is the unique identifier of the chain this transaction targets. It prevents signed transactions from being used on another chain by an attacker

      Returns SignDoc

  • toJSON: function
    • toJSON(message: SignDoc): unknown

SignerInfo

SignerInfo: { decode: any; encode: any; fromJSON: any; fromPartial: any; toJSON: any }

Type declaration

  • decode: function
    • decode(input: Uint8Array | Reader, length?: number): SignerInfo
  • encode: function
    • encode(message: SignerInfo, writer?: Writer): Writer
  • fromJSON: function
  • fromPartial: function
    • fromPartial(object: { modeInfo?: { single?: { mode?: SignMode | undefined; } | undefined; multi?: { bitarray?: { extraBitsStored?: number | undefined; elems?: Uint8Array | undefined; } | undefined; modeInfos?: ...[] | undefined; } | undefined; }; publicKey?: { typeUrl?: string | undefined; value?: Uint8Array | undefined; }; sequence?: number }): SignerInfo
    • Parameters

      • object: { modeInfo?: { single?: { mode?: SignMode | undefined; } | undefined; multi?: { bitarray?: { extraBitsStored?: number | undefined; elems?: Uint8Array | undefined; } | undefined; modeInfos?: ...[] | undefined; } | undefined; }; publicKey?: { typeUrl?: string | undefined; value?: Uint8Array | undefined; }; sequence?: number }
        • Optional modeInfo?: { single?: { mode?: SignMode | undefined; } | undefined; multi?: { bitarray?: { extraBitsStored?: number | undefined; elems?: Uint8Array | undefined; } | undefined; modeInfos?: ...[] | undefined; } | undefined; }

          mode_info describes the signing mode of the signer and is a nested structure to support nested multisig pubkey's

        • Optional publicKey?: { typeUrl?: string | undefined; value?: Uint8Array | undefined; }

          public_key is the public key of the signer. It is optional for accounts that already exist in state. If unset, the verifier can use the required
          signer address for this position and lookup the public key.

        • Optional sequence?: number

          sequence is the sequence of the account, which describes the number of committed transactions signed by a given address. It is used to prevent replay attacks.

      Returns SignerInfo

  • toJSON: function

Tx

Tx: { decode: any; encode: any; fromJSON: any; fromPartial: any; toJSON: any }

Type declaration

  • decode: function
    • decode(input: Uint8Array | Reader, length?: number): Tx
  • encode: function
    • encode(message: Tx, writer?: Writer): Writer
  • fromJSON: function
    • fromJSON(object: any): Tx
  • fromPartial: function
    • fromPartial(object: { authInfo?: { signerInfos?: { publicKey?: { typeUrl?: string | undefined; value?: Uint8Array | undefined; } | undefined; modeInfo?: { single?: { mode?: SignMode | undefined; } | undefined; multi?: { ...; } | undefined; } | undefined; sequence?: number | undefined; }[] | undefined; fee?: { ...; } | undefined; }; body?: { messages?: { typeUrl?: string | undefined; value?: Uint8Array | undefined; }[] | undefined; memo?: string | undefined; timeoutHeight?: number | undefined; extensionOptions?: { ...; }[] | undefined; nonCriticalExtensionOptions?: { ...; }[] | undefined; }; signatures?: Uint8Array[] }): Tx
    • Parameters

      • object: { authInfo?: { signerInfos?: { publicKey?: { typeUrl?: string | undefined; value?: Uint8Array | undefined; } | undefined; modeInfo?: { single?: { mode?: SignMode | undefined; } | undefined; multi?: { ...; } | undefined; } | undefined; sequence?: number | undefined; }[] | undefined; fee?: { ...; } | undefined; }; body?: { messages?: { typeUrl?: string | undefined; value?: Uint8Array | undefined; }[] | undefined; memo?: string | undefined; timeoutHeight?: number | undefined; extensionOptions?: { ...; }[] | undefined; nonCriticalExtensionOptions?: { ...; }[] | undefined; }; signatures?: Uint8Array[] }
        • Optional authInfo?: { signerInfos?: { publicKey?: { typeUrl?: string | undefined; value?: Uint8Array | undefined; } | undefined; modeInfo?: { single?: { mode?: SignMode | undefined; } | undefined; multi?: { ...; } | undefined; } | undefined; sequence?: number | undefined; }[] | undefined; fee?: { ...; } | undefined; }

          auth_info is the authorization related content of the transaction, specifically signers, signer modes and fee

        • Optional body?: { messages?: { typeUrl?: string | undefined; value?: Uint8Array | undefined; }[] | undefined; memo?: string | undefined; timeoutHeight?: number | undefined; extensionOptions?: { ...; }[] | undefined; nonCriticalExtensionOptions?: { ...; }[] | undefined; }

          body is the processable content of the transaction

        • Optional signatures?: Uint8Array[]

          signatures is a list of signatures that matches the length and order of AuthInfo's signer_infos to allow connecting signature meta information like public key and signing mode by position.

      Returns Tx

  • toJSON: function
    • toJSON(message: Tx): unknown

TxBody

TxBody: { decode: any; encode: any; fromJSON: any; fromPartial: any; toJSON: any }

Type declaration

  • decode: function
    • decode(input: Uint8Array | Reader, length?: number): TxBody
  • encode: function
    • encode(message: TxBody, writer?: Writer): Writer
  • fromJSON: function
    • fromJSON(object: any): TxBody
  • fromPartial: function
    • fromPartial(object: { extensionOptions?: { typeUrl?: string | undefined; value?: Uint8Array | undefined; }[]; memo?: string; messages?: { typeUrl?: string | undefined; value?: Uint8Array | undefined; }[]; nonCriticalExtensionOptions?: { typeUrl?: string | undefined; value?: Uint8Array | undefined; }[]; timeoutHeight?: number }): TxBody
    • Parameters

      • object: { extensionOptions?: { typeUrl?: string | undefined; value?: Uint8Array | undefined; }[]; memo?: string; messages?: { typeUrl?: string | undefined; value?: Uint8Array | undefined; }[]; nonCriticalExtensionOptions?: { typeUrl?: string | undefined; value?: Uint8Array | undefined; }[]; timeoutHeight?: number }
        • Optional extensionOptions?: { typeUrl?: string | undefined; value?: Uint8Array | undefined; }[]

          extension_options are arbitrary options that can be added by chains when the default options are not sufficient. If any of these are present and can't be handled, the transaction will be rejected

        • Optional memo?: string

          memo is any arbitrary memo to be added to the transaction

        • Optional messages?: { typeUrl?: string | undefined; value?: Uint8Array | undefined; }[]

          messages is a list of messages to be executed. The required signers of those messages define the number and order of elements in AuthInfo's signer_infos and Tx's signatures. Each required signer address is added to the list only the first time it occurs. By convention, the first required signer (usually from the first message) is referred to as the primary signer and pays the fee for the whole transaction.

        • Optional nonCriticalExtensionOptions?: { typeUrl?: string | undefined; value?: Uint8Array | undefined; }[]

          extension_options are arbitrary options that can be added by chains when the default options are not sufficient. If any of these are present and can't be handled, they will be ignored

        • Optional timeoutHeight?: number

          timeout is the block height after which this transaction will not be processed by the chain

      Returns TxBody

  • toJSON: function
    • toJSON(message: TxBody): unknown

TxRaw

TxRaw: { decode: any; encode: any; fromJSON: any; fromPartial: any; toJSON: any }

Type declaration

  • decode: function
    • decode(input: Uint8Array | Reader, length?: number): TxRaw
  • encode: function
    • encode(message: TxRaw, writer?: Writer): Writer
  • fromJSON: function
    • fromJSON(object: any): TxRaw
  • fromPartial: function
    • fromPartial(object: { authInfoBytes?: Uint8Array; bodyBytes?: Uint8Array; signatures?: Uint8Array[] }): TxRaw
    • Parameters

      • object: { authInfoBytes?: Uint8Array; bodyBytes?: Uint8Array; signatures?: Uint8Array[] }
        • Optional authInfoBytes?: Uint8Array

          auth_info_bytes is a protobuf serialization of an AuthInfo that matches the representation in SignDoc.

        • Optional bodyBytes?: Uint8Array

          body_bytes is a protobuf serialization of a TxBody that matches the representation in SignDoc.

        • Optional signatures?: Uint8Array[]

          signatures is a list of signatures that matches the length and order of AuthInfo's signer_infos to allow connecting signature meta information like public key and signing mode by position.

      Returns TxRaw

  • toJSON: function
    • toJSON(message: TxRaw): unknown

Const protobufPackage

protobufPackage: "cosmos.tx.v1beta1" = 'cosmos.tx.v1beta1'

Generated using TypeDoc