Index
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form
A
- address() - Method in class com.tnsai.payment.x402.InMemoryWallet
- address() - Method in interface com.tnsai.payment.x402.Wallet
-
Lowercase
0x...hex address. - address() - Method in class com.tnsai.payment.x402.Web3jWallet
- asset() - Method in record class com.tnsai.payment.x402.PaymentRequirement
-
Returns the value of the
assetrecord component. - attr(String) - Method in record class com.tnsai.payment.x402.WalletSpec
-
Convenience accessor — returns the attribute value or
null. - attributes() - Method in record class com.tnsai.payment.x402.WalletSpec
-
Returns the value of the
attributesrecord component. - authorityScope() - Method in record class com.tnsai.payment.x402.X402Config
-
Returns the value of the
authorityScoperecord component. - authorityScope(AuthorityScope) - Method in class com.tnsai.payment.x402.X402Config.Builder
-
Attach an
AuthorityScope.
B
- backend() - Method in interface com.tnsai.payment.x402.Wallet.Factory
-
Backend identifier this factory handles, matching the
WalletSpec.backend()field. - backend() - Method in record class com.tnsai.payment.x402.WalletSpec
-
Returns the value of the
backendrecord component. - BACKEND_ID - Static variable in class com.tnsai.payment.x402.InMemoryWallet
-
Backend id used by
Wallet.Factorydiscovery to address this wallet shape. - BASE_MAINNET - Enum constant in enum class com.tnsai.payment.x402.Network
-
Base mainnet (EVM, chain id 8453).
- BASE_SEPOLIA - Enum constant in enum class com.tnsai.payment.x402.Network
-
Base Sepolia testnet (EVM, chain id 84532).
- build() - Method in class com.tnsai.payment.x402.TransferAuthorization.Builder
- build() - Method in class com.tnsai.payment.x402.X402Config.Builder
- builder() - Static method in class com.tnsai.payment.x402.TransferAuthorization
- builder() - Static method in record class com.tnsai.payment.x402.X402Config
-
Convenience entry point for the builder.
C
- canonicalId() - Method in enum class com.tnsai.payment.x402.Network
-
Stable lowercase identifier used in config files and on the wire.
- chainId() - Method in enum class com.tnsai.payment.x402.Network
-
EVM chain id (EIP-155).
- chainId(int) - Method in class com.tnsai.payment.x402.TransferAuthorization.Builder
- com.tnsai.payment.x402 - package com.tnsai.payment.x402
-
x402 adapter for the
PaymentBrokerSPI shipped bytnsai-corein v0.9.4 (TNS-298). - create(WalletSpec) - Method in interface com.tnsai.payment.x402.Wallet.Factory
-
Build a wallet for
spec. - create(X402Config) - Static method in class com.tnsai.payment.x402.X402PaymentBroker
-
Build a broker from
config; uses a freshSecureRandomfor nonces. - create(X402Config, SecureRandom) - Static method in class com.tnsai.payment.x402.X402PaymentBroker
-
Build a broker with a caller-supplied
SecureRandom— tests use this for determinism.
D
- DEFAULT_MAX_SLIPPAGE_BPS - Static variable in record class com.tnsai.payment.x402.X402Config
-
Default slippage tolerance — 50 basis points (0.5%).
- DEFAULT_QUOTE_TTL - Static variable in record class com.tnsai.payment.x402.X402Config
-
Default quote validity — matches the x402 facilitator's published window.
- description() - Method in record class com.tnsai.payment.x402.PaymentRequirement
-
Returns the value of the
descriptionrecord component. - discover() - Static method in interface com.tnsai.payment.x402.Wallet.Factory
-
First
Wallet.Factoryregistered viaServiceLoader. - discover(String) - Static method in interface com.tnsai.payment.x402.Wallet.Factory
-
Like
Wallet.Factory.discover()but selects the factory whoseWallet.Factory.backend()matchesbackendId. - Discovery - Search tag in interface com.tnsai.payment.x402.Wallet
- Section
- domainSeparator() - Method in record class com.tnsai.payment.x402.EIP712TypedData
-
Defensive copy on accessor — same reason as the constructor.
E
- EIP-712 signature shape - Search tag in class com.tnsai.payment.x402.Web3jWallet
- Section
- EIP712TypedData - Record Class in com.tnsai.payment.x402
-
The two 32-byte values an EVM wallet needs in order to produce an EIP-712 signature.
- EIP712TypedData(byte[], byte[]) - Constructor for record class com.tnsai.payment.x402.EIP712TypedData
-
Creates an instance of a
EIP712TypedDatarecord class. - EnvKeystoreWallet - Class in com.tnsai.payment.x402
-
Builds a
Web3jWalletfrom an EVM private key resolved from environment variables. - EnvKeystoreWallet.MissingEnvVarException - Exception Class in com.tnsai.payment.x402
-
Thrown when a required env var is missing or blank.
- equals(Object) - Method in record class com.tnsai.payment.x402.EIP712TypedData
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class com.tnsai.payment.x402.PaymentRequirement
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class com.tnsai.payment.x402.WalletSpec
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class com.tnsai.payment.x402.X402Config
-
Indicates whether some other object is "equal to" this one.
- EVM - Enum constant in enum class com.tnsai.payment.x402.Network.Family
- extra() - Method in record class com.tnsai.payment.x402.PaymentRequirement
-
Returns the value of the
extrarecord component.
F
- facilitator() - Method in record class com.tnsai.payment.x402.X402Config
-
Returns the value of the
facilitatorrecord component. - facilitator(URI) - Method in class com.tnsai.payment.x402.X402Config.Builder
- family() - Method in enum class com.tnsai.payment.x402.Network
-
Signing-scheme family.
- forTesting(String, Network) - Static method in class com.tnsai.payment.x402.InMemoryWallet
-
Factory method — naming makes the test-only intent explicit at the call site.
- from() - Method in class com.tnsai.payment.x402.TransferAuthorization
- from(String) - Method in class com.tnsai.payment.x402.TransferAuthorization.Builder
- fromEnv(String, Network) - Static method in class com.tnsai.payment.x402.EnvKeystoreWallet
-
Resolve and load a wallet from env vars derived from
envVarPrefix. - fromEnv(String, Network, Function<String, String>) - Static method in class com.tnsai.payment.x402.EnvKeystoreWallet
-
Like
EnvKeystoreWallet.fromEnv(String, Network)but with a caller-supplied env lookup function — tests use this to drive the resolver deterministically without touching real environment variables. - fromPrivateKey(String, Network) - Static method in class com.tnsai.payment.x402.Web3jWallet
-
Build a wallet from a raw hex-encoded private key.
H
- HASH_LENGTH_BYTES - Static variable in record class com.tnsai.payment.x402.EIP712TypedData
-
Expected length, in bytes, of each component.
- hashCode() - Method in record class com.tnsai.payment.x402.EIP712TypedData
-
Returns a hash code value for this object.
- hashCode() - Method in record class com.tnsai.payment.x402.PaymentRequirement
-
Returns a hash code value for this object.
- hashCode() - Method in record class com.tnsai.payment.x402.WalletSpec
-
Returns a hash code value for this object.
- hashCode() - Method in record class com.tnsai.payment.x402.X402Config
-
Returns a hash code value for this object.
- httpClient() - Method in record class com.tnsai.payment.x402.X402Config
-
Returns the value of the
httpClientrecord component. - httpClient(HttpClient) - Method in class com.tnsai.payment.x402.X402Config.Builder
I
- InMemoryWallet - Class in com.tnsai.payment.x402
-
Test-only
Walletthat never touches real cryptography. - isHandled(Network) - Method in record class com.tnsai.payment.x402.PaymentRequirement
-
truewhen this entry is something the P3 broker knows how to settle.
L
- liabilitySink() - Method in record class com.tnsai.payment.x402.X402Config
-
Returns the value of the
liabilitySinkrecord component. - liabilitySink(LiabilitySink) - Method in class com.tnsai.payment.x402.X402Config.Builder
-
Attach a
LiabilitySinkthe broker writes oneAgentLiabilityRecordinto per settlement.
M
- maxAmountAsBigInteger() - Method in record class com.tnsai.payment.x402.PaymentRequirement
-
Parse
PaymentRequirement.maxAmountRequiredinto aBigInteger. - maxAmountRequired() - Method in record class com.tnsai.payment.x402.PaymentRequirement
-
Returns the value of the
maxAmountRequiredrecord component. - maxSlippageBps() - Method in record class com.tnsai.payment.x402.X402Config
-
Returns the value of the
maxSlippageBpsrecord component. - maxSlippageBps(BigDecimal) - Method in class com.tnsai.payment.x402.X402Config.Builder
- maxTimeoutSeconds() - Method in record class com.tnsai.payment.x402.PaymentRequirement
-
Returns the value of the
maxTimeoutSecondsrecord component. - METADATA_HTTP_METHOD - Static variable in class com.tnsai.payment.x402.X402PaymentBroker
-
Service.metadata key for the HTTP method to probe with (defaults to GET).
- METADATA_NONCE_HEX - Static variable in class com.tnsai.payment.x402.X402PaymentBroker
-
Service.metadata key the caller can supply to fix the nonce (test/idempotency replay).
- METADATA_RESOURCE_URL - Static variable in class com.tnsai.payment.x402.X402PaymentBroker
-
Service.metadata key for the resource URL to probe.
- mimeType() - Method in record class com.tnsai.payment.x402.PaymentRequirement
-
Returns the value of the
mimeTyperecord component. - MissingEnvVarException(String) - Constructor for exception class com.tnsai.payment.x402.EnvKeystoreWallet.MissingEnvVarException
N
- network() - Method in class com.tnsai.payment.x402.InMemoryWallet
- network() - Method in record class com.tnsai.payment.x402.PaymentRequirement
-
Returns the value of the
networkrecord component. - network() - Method in interface com.tnsai.payment.x402.Wallet
-
Network the wallet is bound to.
- network() - Method in record class com.tnsai.payment.x402.WalletSpec
-
Returns the value of the
networkrecord component. - network() - Method in class com.tnsai.payment.x402.Web3jWallet
- network() - Method in record class com.tnsai.payment.x402.X402Config
-
Returns the value of the
networkrecord component. - network(Network) - Method in class com.tnsai.payment.x402.X402Config.Builder
- Network - Enum Class in com.tnsai.payment.x402
-
Settlement networks the x402 adapter can target.
- Network.Family - Enum Class in com.tnsai.payment.x402
-
Signing-scheme family.
- nonce() - Method in class com.tnsai.payment.x402.TransferAuthorization
- nonce(byte[]) - Method in class com.tnsai.payment.x402.TransferAuthorization.Builder
O
- ofCanonicalId(String) - Static method in enum class com.tnsai.payment.x402.Network
-
Resolve a canonical id back to its enum value.
P
- PaymentRequirement - Record Class in com.tnsai.payment.x402
-
One entry in the
acceptsarray of an x402 HTTP 402 response. - PaymentRequirement(String, String, String, String, String, String, String, String, int, Map<String, String>) - Constructor for record class com.tnsai.payment.x402.PaymentRequirement
-
Creates an instance of a
PaymentRequirementrecord class. - payTo() - Method in record class com.tnsai.payment.x402.PaymentRequirement
-
Returns the value of the
payTorecord component. - PRIVATE_KEY_SUFFIX - Static variable in class com.tnsai.payment.x402.EnvKeystoreWallet
-
Env var suffix appended to the prefix for the raw private key.
- Production guidance - Search tag in class com.tnsai.payment.x402.EnvKeystoreWallet
- Section
Q
- quote(AgentPrincipal, AgentPrincipal, Service) - Method in class com.tnsai.payment.x402.X402PaymentBroker
- quoteTtl() - Method in record class com.tnsai.payment.x402.X402Config
-
Returns the value of the
quoteTtlrecord component. - quoteTtl(Duration) - Method in class com.tnsai.payment.x402.X402Config.Builder
R
- recoverAddress(byte[], EIP712TypedData) - Static method in class com.tnsai.payment.x402.Web3jWallet
-
Re-derive the signer address from a signature + the same typed data that produced it.
- resource() - Method in record class com.tnsai.payment.x402.PaymentRequirement
-
Returns the value of the
resourcerecord component.
S
- scheme() - Method in record class com.tnsai.payment.x402.PaymentRequirement
-
Returns the value of the
schemerecord component. - SCHEME_EXACT - Static variable in record class com.tnsai.payment.x402.PaymentRequirement
-
The only scheme P3 handles end-to-end.
- Scope of P3 - Search tag in class com.tnsai.payment.x402.X402PaymentBroker
- Section
- settle(Quote) - Method in class com.tnsai.payment.x402.X402PaymentBroker
- signTypedData(EIP712TypedData) - Method in class com.tnsai.payment.x402.InMemoryWallet
- signTypedData(EIP712TypedData) - Method in interface com.tnsai.payment.x402.Wallet
-
Produce a signature over the EIP-712 digest implied by
td. - signTypedData(EIP712TypedData) - Method in class com.tnsai.payment.x402.Web3jWallet
- SOLANA_MAINNET - Enum constant in enum class com.tnsai.payment.x402.Network
-
Solana mainnet.
- structHash() - Method in record class com.tnsai.payment.x402.EIP712TypedData
-
Defensive copy on accessor — same reason as the constructor.
- SVM - Enum constant in enum class com.tnsai.payment.x402.Network.Family
T
- Thread safety - Search tag in interface com.tnsai.payment.x402.Wallet
- Section
- to() - Method in class com.tnsai.payment.x402.TransferAuthorization
- to(String) - Method in class com.tnsai.payment.x402.TransferAuthorization.Builder
- tokenName() - Method in record class com.tnsai.payment.x402.PaymentRequirement
-
Token name from
extra.name; falls back to"USD Coin". - tokenName(String) - Method in class com.tnsai.payment.x402.TransferAuthorization.Builder
- tokenVersion() - Method in record class com.tnsai.payment.x402.PaymentRequirement
-
Token EIP-712 domain version from
extra.version; falls back to"2". - tokenVersion(String) - Method in class com.tnsai.payment.x402.TransferAuthorization.Builder
- toString() - Method in record class com.tnsai.payment.x402.EIP712TypedData
-
Hex render of both hashes, useful for logging and debugging.
- toString() - Method in record class com.tnsai.payment.x402.PaymentRequirement
-
Returns a string representation of this record class.
- toString() - Method in record class com.tnsai.payment.x402.WalletSpec
-
Returns a string representation of this record class.
- toString() - Method in record class com.tnsai.payment.x402.X402Config
-
Returns a string representation of this record class.
- toTypedData() - Method in class com.tnsai.payment.x402.TransferAuthorization
-
EIP-712 typed data: the two 32-byte hashes the wallet will sign over.
- TransferAuthorization - Class in com.tnsai.payment.x402
-
Builds the EIP-712 typed-data hash pair for an EIP-3009
transferWithAuthorizationcall — the payload an x402 client signs to authorise a one-time USDC transfer without an on-chain approval round-trip. - TransferAuthorization.Builder - Class in com.tnsai.payment.x402
-
Builder for
TransferAuthorization.
V
- validAfter() - Method in class com.tnsai.payment.x402.TransferAuthorization
- validAfter(BigInteger) - Method in class com.tnsai.payment.x402.TransferAuthorization.Builder
- validBefore() - Method in class com.tnsai.payment.x402.TransferAuthorization
- validBefore(BigInteger) - Method in class com.tnsai.payment.x402.TransferAuthorization.Builder
- value() - Method in class com.tnsai.payment.x402.TransferAuthorization
- value(BigInteger) - Method in class com.tnsai.payment.x402.TransferAuthorization.Builder
- valueOf(String) - Static method in enum class com.tnsai.payment.x402.Network.Family
-
Returns the enum constant of this class with the specified name.
- valueOf(String) - Static method in enum class com.tnsai.payment.x402.Network
-
Returns the enum constant of this class with the specified name.
- values() - Static method in enum class com.tnsai.payment.x402.Network.Family
-
Returns an array containing the constants of this enum class, in the order they are declared.
- values() - Static method in enum class com.tnsai.payment.x402.Network
-
Returns an array containing the constants of this enum class, in the order they are declared.
- verifyingContract(String) - Method in class com.tnsai.payment.x402.TransferAuthorization.Builder
W
- wallet() - Method in record class com.tnsai.payment.x402.X402Config
-
Returns the value of the
walletrecord component. - wallet(Wallet) - Method in class com.tnsai.payment.x402.X402Config.Builder
- Wallet - Interface in com.tnsai.payment.x402
-
Signing surface the x402 payment broker needs.
- Wallet.Factory - Interface in com.tnsai.payment.x402
-
Factory that turns a
WalletSpecinto a liveWallet. - WalletSpec - Record Class in com.tnsai.payment.x402
-
Backend-agnostic configuration a
Wallet.Factoryconsumes to instantiate aWallet. - WalletSpec(String, Network, Map<String, String>) - Constructor for record class com.tnsai.payment.x402.WalletSpec
-
Creates an instance of a
WalletSpecrecord class. - Web3jWallet - Class in com.tnsai.payment.x402
-
Real secp256k1 EVM wallet backed by web3j-crypto's
ECKeyPair. - What's deferred to later phases - Search tag in package com.tnsai.payment.x402
- Section
- What's shipped in P2 (this version) - Search tag in package com.tnsai.payment.x402
- Section
- What an implementation must do - Search tag in interface com.tnsai.payment.x402.Wallet
- Section
- What it does - Search tag in class com.tnsai.payment.x402.InMemoryWallet
- Section
- What it is NOT - Search tag in class com.tnsai.payment.x402.InMemoryWallet
- Section
- Why env-var-only in P4 - Search tag in class com.tnsai.payment.x402.EnvKeystoreWallet
- Section
- Why it exists - Search tag in class com.tnsai.payment.x402.InMemoryWallet
- Section
- Why we don't use web3j's StructuredDataEncoder - Search tag in class com.tnsai.payment.x402.TransferAuthorization
- Section
X
- X402Config - Record Class in com.tnsai.payment.x402
-
Configuration record for the upcoming x402 broker.
- X402Config(Wallet, Network, URI, Duration, BigDecimal, HttpClient, Optional<LiabilitySink>, Optional<AuthorityScope>) - Constructor for record class com.tnsai.payment.x402.X402Config
-
Creates an instance of a
X402Configrecord class. - X402Config.Builder - Class in com.tnsai.payment.x402
-
Builder for
X402Config. - X402PaymentBroker - Class in com.tnsai.payment.x402
-
x402 implementation of
PaymentBroker.
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form