Developers

VaultRedeemV3 (signed message)

EIP-712 type VaultRedeemV3: fields, type hash and how each field is built from the request JSON.

On this page

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 fieldTypeFrom requestTransform
vaultIDuint64vault_idcopy
accountIDaddressnone: result.main_account_id of funding_account_summarymainAccount: your main account address, fetched once per session
numLpTokensuint64num_tokensscaled: decimal × 10^6
fromCurrencyuint16from_currencycurrencyId: id of the currency (get_currency)
toCurrencyuint16to_currencycurrencyId: id of the currency (get_currency)
exchangeRateuint64exchange_ratescaled: decimal × 10^9
nonceuint32signature.noncesig.nonce
expirationint64signature.expirationsig.expiration
domain chainIduint256signature.chain_idsig.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. Digest 0xa4b83096a74185b2cce4262757961859610ca0e54b18548e577014288144c9c2.
Sign the example in your browser
esc

↑ ↓ move↵ open⇧↵ open .mdTry an error code like 2002

Keyboard shortcuts

⌘ K
Search the docs
/
Search
l
Next code language (Python → TypeScript → Go → Rust → curl → WebSocket)
j / k
Next / previous page
t
Light / dark theme
?
This help
Esc
Close dialogs and drawers