Sign a Smart Contract Call with Axiome Connect
Axiome Connect allows you to securely sign smart contract calls from external applications using either an authorization code or a QR code.
This is useful for integrating web apps, bots, or scripts with your wallet in a secure and interactive way.
Step 1: Prepare the JSON Payload
Create a JSON object describing the smart contract call you want to sign. Here's an example for a token swap:
{
"type": "cosmwasm_execute",
"network": "axiome-devnet",
"contract_addr": "axm14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9sletw5k",
"funds": [
{
"denom": "uaxm",
"amount": "1000000"
}
],
"msg": {
"swap": {
"input_token": "Token1",
"input_amount": "1000000",
"min_output": "800000"
}
},
"memo": "test memo"
}
Step 2: Encode to Base64 and Prefix
Encode the JSON as a Base64 string (without line breaks or padding), then prefix it with axiomesign://
.
Example in JavaScript:
const payload = { /* your JSON here */ };
const base64 = Buffer.from(JSON.stringify(payload)).toString('base64');
const finalString = `axiomesign://${base64}`;
console.log(finalString);
Step 3: Use Axiome Connect
You have two options to sign the transaction:
Option 1: Paste the string
Paste the axiomesign://...
string into the input field of Axiome Connect in your Axiome Wallet app (starting from version 2.1.12 in iOS and 2.0.56 in Android)
Press Connect — your app will decode the payload and ask you to sign the transaction.
Option 2: Scan a QR Code
You can also encode the axiomesign://...
string into a QR code and scan it directly from the Axiome Connect mobile app.
You can use any QR generator — just make sure the encoded string starts with
axiomesign://
and contains the full base64-encoded payload.
Notes
contract_addr
must be a valid CosmWasm contract address on the selected network.funds
is optional if the contract call doesn’t require tokens.memo
is optional and can be used for tagging or tracking.The app will preview the decoded message before signing.
Last updated