Sign Contract Order¶
Endpoint¶
Parameters¶
Path Parameters¶
| Field | Type | Description |
|---|---|---|
| b_id Required | String | Business line ID |
| wallet_code Required | String | Defi Wallet ID |
Administrator is required to enable "Message Signing" under DeFi Account - EVM Whitelist Protection in order to perform this API call.
Body Parameters¶
| Field | Type | Description |
|---|---|---|
| order_no Required | String | Order number |
| address Required | String | Address |
| signature_version Required | String | Signature type, Refer to METAMASK's official documents to learn more details Allowed values: V4, personalSign |
| payload Required | JsonNode | Signature information. View the formats for EVM compatible chain |
| chain Required | String | Cactus chain name Allowed Value: Refer to Network Symbol column in Supported Token |
| description Optional | String | Description (max 50 characters) |
Request Body Example¶
{
"address": "0x115eb8585ad0cfA18e1b7Fd39Dfc5c655adF8fB8",
"signature_version": "personalSign",
"payload": {"message": "0x2ca3vaa3....."},
"chain": "ETH",
"order_no": "D00000000001",
"description": ""
}
To obtain the signed result, use the Get Smart Contract Transaction Details API and provide the orderNo. The result will be returned in the signed_data field.
Body Parameters¶
| Field | Type | Description |
|---|---|---|
| order_no Required | String | Order number |
| address Required | String | Address |
| signature_version Required | String | Signature type Allowed values: signMessage, signPsbt, signPsbts |
| payload Required | JsonNode | Signature information. View the formats for BTC chain |
| chain Required | String | Cactus chain name Allowed Value: BTC |
| description Optional | String | Description (max 50 characters) |
BTC Chain Signature Types
| signature_version | Description |
|---|---|
| signMessage | Message signing only |
| signPsbt | Transaction signing |
| signPsbts | Multiple transaction signing |
Request Body Example¶
{
"address": "tb1pkhduwswuk7qhx77djyt730dp77tjrc8ullftfyr2deaa635d55ns04zext",
"signature_version": "signMessage",
"payload": {"text": "hello world~"},
"chain": "BTC",
"order_no": "TX00000000002",
"description": ""
}
To obtain the signed result, use the Get Smart Contract Transaction Details API and provide the orderNo. The result will be returned in the signed_data field.
Administrator is required to enable "Message Signing" under DeFi Account - Cosmos Ecosystem Whitelist Protection in order to perform this API call.
Body Parameters¶
| Field | Type | Description |
|---|---|---|
| order_no Required | String | Order number |
| address Required | String | Address |
| signature_version Required | String | Signature type Allowed values: signAmino, signDirect, signArbitrary |
| payload Required | JsonNode | Signature information. View the formats for Cosmos-based chain |
| chain Required | String | Cactus chain name Allowed Value: Refer to Network Symbol column in Supported Token |
| description Optional | String | Description (max 50 characters) |
Cosmos Signature Types
| signature_version | Description |
|---|---|
| signAmino | Legacy JSON transaction signing |
| signDirect | Protobuf (modern) transaction signing |
| signArbitrary | Arbitrary data/message signing |
Request Body Example¶
{
"address": "cosmos1qqp3t4zhpwxp8sjq9j7p42flf4z5r0u9ex7n3k",
"signature_version": "signAmino",
"payload": {
"account_number": "123",
"chain_id": "cosmoshub-4",
"fee": {
"amount": [
{ "denom": "uatom", "amount": "1000" }
],
"gas": "200000"
},
"memo": "Test transaction",
"msgs": [
{
"type": "cosmos-sdk/MsgSend",
"value": {
"from_address": "cosmos1...",
"to_address": "cosmos1...",
"amount": [
{ "denom": "uatom", "amount": "1000000" }
]
}
}
]
},
"chain": "COSMOS",
"order_no": "D00000000001",
"description": ""
}
To obtain the signed result, use the Get Smart Contract Transaction Details API and provide the orderNo. The result will be returned in the signed_data field.
Response¶
Response Body¶
| Field | Type | Description |
|---|---|---|
| code | Integer | Response code (0 = success) |
| message | String | Response message |
| successful | Boolean | Whether the request was successful |
| data | Object | Response data (see data object details below) |
data (object)
| Field | Type | Description |
|---|---|---|
| OrderNo | String | Order number |