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
Curve | Curve ID |
---|---|
secp256k1 | 1 |
secp256k1-decred | 2 |
secp256k1-groestl | 3 |
secp256k1-smart | 4 |
nist256p1 | 5 |
ed25519 | 6 |
ed25519-sha3 | 7 |
ed25519-keccak | 8 |
curve25519 | 9 |
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