UsdcBaseTxParams
PQSafe AgentPay API Reference v0.1.0
PQSafe AgentPay API Reference / UsdcBaseTxParams
Interface: UsdcBaseTxParams
Defined in: pqsafe/agent-pay/src/rails/usdc-base.ts:79
Caller-injected wallet function. PQSafe calls this with: to — USDC contract address data — ABI-encoded transfer(address,uint256) calldata network — “mainnet” | “sepolia”
Should return the 0x-prefixed transaction hash.
Example with viem: const signAndSend: UsdcBaseSignAndSend = async ({ to, data, network }) => walletClient.sendTransaction({ to, data, chain: network === ‘mainnet’ ? base : baseSepolia })
Example with CDP AgentKit:
const signAndSend: UsdcBaseSignAndSend = async ({ to, data, network }) => {
const tx = await agentkit.sendTransaction({ to, data, network: base-${network} })
return tx.transactionHash
}
Properties
amount
amount:
number
Defined in: pqsafe/agent-pay/src/rails/usdc-base.ts:91
Human-readable amount
atomicAmount
atomicAmount:
bigint
Defined in: pqsafe/agent-pay/src/rails/usdc-base.ts:89
Amount in USDC atomic units (6 decimals)
chainId
chainId:
number
Defined in: pqsafe/agent-pay/src/rails/usdc-base.ts:87
Chain ID for EIP-155 replay protection
data
data:
string
Defined in: pqsafe/agent-pay/src/rails/usdc-base.ts:83
ABI-encoded transfer(address,uint256) calldata (0x-prefixed hex)
network
network:
BaseNetwork
Defined in: pqsafe/agent-pay/src/rails/usdc-base.ts:85
“mainnet” or “sepolia”
to
to:
string
Defined in: pqsafe/agent-pay/src/rails/usdc-base.ts:81
USDC contract address on the target network