Home

Encode a protobuf transaction

POST
https://sei.nownodes.io/cosmos/tx/v1beta1/encode

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Encodes a JSON transaction into its protobuf byte representation. A live response example is intentionally omitted because this request accepts transaction data.

Body

application/json

TxEncodeRequest is the request type for the Cosmos.TxEncode RPC method.

txobject

tx is the transaction to encode.

Show child attributes
bodyobject

TxBody is the body of a transaction that all signers sign over.

Show child attributes
messagesArray<object>

Messages to execute. Their required signers determine the order of signer_infos and signatures; the first unique signer is the primary fee payer.

Show child attributes
@typestring

Fully qualified protobuf message type, prefixed by a slash.

memostring

memo is any arbitrary note/comment to be added to the transaction. WARNING: in clients, any publicly exposed text should not be called memo, but should be called note instead (see

timeout_heightstring

Last block height at which the transaction can be accepted; zero disables the height timeout.

extension_optionsArray<object>

List of extension options entries returned or accepted by the operation.

Show child attributes
@typestring

Fully qualified protobuf message type, prefixed by a slash.

non_critical_extension_optionsArray<object>

List of non critical extension options entries returned or accepted by the operation.

Show child attributes
@typestring

Fully qualified protobuf message type, prefixed by a slash.

unorderedboolean

Whether unordered.

timeout_timestampstring | null

RFC 3339 timestamp representing timeout timestamp.

auth_infoobject

AuthInfo describes the fee and signer modes that are used to sign a transaction.

Show child attributes
signer_infosArray<object>

Object containing signer infos data.

Show child attributes
public_keyobject

Arbitrary serialized protobuf message. @type identifies the embedded message type; its decoded fields appear beside @type in JSON, while well-known types use value.

Show child attributes
@typestring

Fully qualified protobuf message type, prefixed by a slash.

mode_infoobject

ModeInfo describes the signing mode of a single or nested multisig signer.

Show child attributes
singleobject

Structured single data used by the operation.

Show child attributes
modestringSIGN_MODE_UNSPECIFIED

Schema for mode.

multiobject

Structured multi data used by the operation.

Show child attributes
bitarrayobject

Object containing bitarray data.

Show child attributes
extra_bits_storedinteger<int64>

Number of meaningful bits in the last byte of a compact bit array.

elemsstring<byte>

Base64-encoded bytes of a compact bit array.

mode_infosArray<object>

List of mode infos entries returned or accepted by the operation.

sequencestring

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.

feeobject

Object containing fee data.

Show child attributes
amountArray<object>

Token amount expressed in the denomination's smallest units.

Show child attributes
denomstring

Schema for denom.

amountstring

Token amount expressed in the denomination's smallest units.

gas_limitstring

Maximum gas units authorized for the transaction.

payerstring

Object containing payer data.

granterstring

Bech32-encoded address of the account granting authorization.

tipobject | null

Tip is the optional tip used for transactions fees paid in another denom. This field is ignored if the chain didn't enable tips, i.e. didn't add the TipDecorator in its posthandler.

Show child attributes
amountArray<object>

Token amount expressed in the denomination's smallest units.

Show child attributes
denomstring

Schema for denom.

amountstring

Token amount expressed in the denomination's smallest units.

tipperstring

Bech32 address of the account paying the transaction tip.

signaturesArray<string>

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.

Response

200OK

A successful response.

400Bad Request

Invalid request.

default

An unexpected error response.