Skip to main content

Module wallet

Module wallet 

Source
Expand description

EIP-712 wallet for signing Hypercall operations.

Every write operation on Hypercall requires an EIP-712 signature. This module provides HypercallWallet which wraps a private key and exposes typed signing methods for each action type.

§Two Wallet Types

  • Manager wallet: owns the account. Signs public Hypercall write requests such as set_margin_mode, place_order, and cancel_order.

§Example

use hypercall_client::{HypercallWallet, PlaceOrderSignature};

let wallet = HypercallWallet::from_private_key(
    "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80",
    998,
)?;
println!("Address: {}", wallet.address);

// Sign an options order
let sig = wallet.sign_place_order_payload(PlaceOrderSignature {
    wallet: wallet.address,
    symbol: "BTC-20260501-76000-C",
    side: "Buy",
    size: "5",
    price: "2000",
    tif: "ioc",
    route: hypercall_sdk_types::OrderRoute::BestExecution,
    client_id: "order_1",
    reduce_only: false,
    nonce: wallet.next_nonce(),
}).await?;

§Nonce Management

Nonces are seeded from epoch-ms at construction time and increment atomically. Each next_nonce() call returns a unique value. Signed on-chain actions require each (signer, nonce) pair to be used at most once.

Structs§

AcceptRFQQuote
AccountAddress
Hypercall account address used by the public client API.
AtomicNonceProvider
AuthorizeRfqReadV2
Must match the RFQ service’s AuthorizeRfqReadV2 EIP-712 type exactly.
CancelOrder
CancelOrderByCloid
CancelOrderByOid
CancelOrderSignature
CancelPoolRedemptions
Cancel queued PM lending pool share redemptions (POST /v1/pm-pool/redemptions/cancel). requestIds is the id list, in request order, joined with ,.
ConnectQuoteProvider
HCUpdateApiWallet
HLCancel
HLCancelByCloid
HLOrder
HLSendAsset
HLSetAbstraction
HypercallWallet
Wallet for signing Hypercall operations with EIP-712.
LimitOrder
PerpCancelByCloidSignature
PerpCancelByOidSignature
PerpLimitOrderSignature
PlaceOrder
PlaceOrderReduceOnly
PlaceOrderSignature
PortfolioUsdcWithdrawalSignature
Exact Portfolio Margin HLSendAsset EIP-712 payload.
RedeemPoolShares
Queue a withdrawal of PM lending pool shares, paid to wallet (POST /v1/pm-pool/redemptions).
ReplaceOrder
ReplaceOrderReduceOnly
ReplaceOrderSignature
SendAsset
SetAbstraction
SetAccountAbstractionSignature
SetMarginMode
StandardMarginLiquidationOrder
StandardMarginLiquidationSignature
StandardUsdcWithdrawalSignature
Exact Standard Margin WithdrawUsdc EIP-712 payload.
SubmitAutoExecuteRfq
SubmitRFQ
SubmitRFQResponse
UpdateApiWallet
UpdateApiWalletSignature
WithdrawUsdc

Traits§

ApiWalletDirectiveSigner
HypercallSigner
ManagerDirectiveSigner
NonceProvider
PerpDirectiveSigner
UsdcWithdrawalSigner
Signs the two USDC withdrawal schemas without expanding existing signer traits.