VaultRedeemV3 (signed message)
EIP-712 type VaultRedeemV3: fields, type hash and how each field is built from the request JSON.
On this page
Agent prompt
Write a function that signs a Grvt `VaultRedeemV3` message {using} and checks it against the signing test cases.
Target environment: Testnet (chain ID 326). Recorded signing cases keep their original environment.
Validate new flows on testnet with test funds before using production.
Read this first: {origin}/bundle/reference/signing/VaultRedeemV3.md (~29 KB, plain Markdown: this page plus the AGENTS.md rules, Signing, Environments).
Fetch other pages from the index at {origin}/llms.txt only as you need them. {origin}/downloads/contract.json is a machine-readable contract for tools, not for reading.
Rules: follow AGENTS.md; do not send requests without the user asking you to; read credentials from environment variables; never retry writes automatically; show me the code and how to run it. Signed by vault_redeem. Step-by-step walkthrough: Signing.
VaultRedeemV3(uint64 vaultID,address accountID,uint64 numLpTokens,uint16 fromCurrency,uint16 toCurrency,uint64 exchangeRate,uint32 nonce,int64 expiration)
Type hash 0x0041a915dd4c05c7c4a826912cfd10269e6dd51bd2d89f24a5b4b575bb118f44. Domain {name: "GRVT Exchange", version: "0", chainId}.
Fields and where they come from
| EIP-712 field | Type | From request | Transform |
|---|---|---|---|
vaultID | uint64 | vault_id | copy |
accountID | address | none: result. of funding_account_summary | mainAccount: your main account address, fetched once per session |
numLpTokens | uint64 | num_tokens | scaled: decimal × 10^6 |
fromCurrency | uint16 | from_currency | currencyId: id of the currency (get_currency) |
toCurrency | uint16 | to_currency | currencyId: id of the currency (get_currency) |
exchangeRate | uint64 | exchange_rate | scaled: decimal × 10^9 |
nonce | uint32 | signature.nonce | sig.nonce |
expiration | int64 | signature. | sig.expiration |
domain chainId | uint256 | signature.chain_id | sig.chainId |
Signing test cases
In signing.json, signed by the public test key:
vault_redeem— Redeem 12.345678 shares (6 decimals) paid in USDT at 1.0001 USDT per USDC. accountID is the session's main account. Digest0xa4b83096a74185b2cce4262757961859610ca0e54b18548e577014288144c9c2.