Skip to main content
Make payments using Viem wallets.

Installation

armoryPay

With Custom Amount

createArmoryClient

Configuration Options

Nonce Format: The nonceGenerator must return a bytes32 hex string (64 hex characters after 0x). This is required for EIP-712 signature compatibility with the x402 specification.

Extension Hooks

The client supports an extension hook system for handling protocol extensions like Sign-In-With-X and Payment Identifier.

Using Hooks

Hook Order

Hooks execute in array order.

Custom Hooks

Create custom hooks for your own extensions:

Hook Execution Points

Hooks can execute at:
  1. onPaymentRequired
  2. selectRequirement
  3. beforeSignPayment
  4. afterPaymentResponse
  5. onError

Exports