Skip to main content
In CosmJS, the JavaScript representation of a type-URL-tagged message is an EncodeObject:
You construct one by pairing a type URL with a partial Protobuf message:

Typed Encode Objects

CosmJS also provides typed encode objects for common messages. These narrow the typeUrl to a string literal and constrain value to the correct Protobuf type, giving you compile-time safety:

Available in @cosmjs/stargate

Available in @cosmjs/cosmwasm