Skip to main content

Common

Common data types represented as Protocol Buffer objects.

Bip32Path

Representation of the BIP32 path as an array of uint32 values and the type of elliptic curve.

common.proto
message Bip32Path {
repeated uint32 value = 1;
uint32 curve = 2;
}

Curve

CurveCurve ID
secp256k11
secp256k1-decred2
secp256k1-groestl3
secp256k1-smart4
nist256p15
ed255196
ed25519-sha37
ed25519-keccak8
curve255199

TokenMetadata

The general format of token metadata used in signing transactions involving token transfers, such as ERC20, TRC10, or TRC20, typically includes information specific to the token. This includes the token contract address, and other relevant details according to the particular token standard.

common.proto
message TokenMetadata {
uint32 type = 1;
string contract = 2;
uint32 chainId = 3;
string name = 4;
string symbol = 5;
optional uint32 decimals = 6;
optional bytes icon = 7;
bytes sign = 8;
}
  • type: FT = 1, NFT = 2
  • sign: ECDSA signature of message SHA256(type+contract+chainId+name+symbol+(decimals | 0)+icon?), utf8, uint32be