Messages are the highest form of abstraction within the Apophis SDK.
@apophis-sdk/cosmos
package, but listed here for completeness.
Coin
schema:
registerDefaultProtobufSchema
function:
StoreCode
message of the CosmWasm
module:
funds
on a Contracts.Execute
message.
Unfortunately, for legacy Amino support, you must pay attention to required and optional fields
yourself. Otherwise, the full node may reconstruct the signature payload differently from the data
you have provided to the signer, causing the transaction to be rejected immediately.
The Contracts.Execute
schema may look like this:
@apophis-sdk/cosmos/encoding/protobuf/core.js
:
string
to a bigint
and vice versa.Amino.normalize
to an arbitrary value, including sorting the object’s
keys. In general, whenever you use hpb.json
, you should also apply this transform.["core", "init"]
hook to register existing
messages (if applicable, e.g. Bank.Send
) for your new encoding so SDK consumers may seamlessly
integrate your blockchain.