@atumlabs/payment-gateway-client 1.0.2 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -65,7 +65,6 @@ type OpenAPIConfig = {
65
65
  response: Interceptors<AxiosResponse>;
66
66
  };
67
67
  };
68
- declare const OpenAPI: OpenAPIConfig;
69
68
 
70
69
  declare abstract class BaseHttpRequest {
71
70
  readonly config: OpenAPIConfig;
@@ -102,10 +101,9 @@ type AuthorizationResult = {
102
101
  };
103
102
  /**
104
103
  * Machine-readable error code (present when status is error or timeout).
105
- * The counterparty and webhook codes (COUNTERPARTY_NOT_FOUND, COUNTERPARTY_TIMEOUT,
106
- * WEBHOOK_ERROR, WEBHOOK_CONNECTION_ERROR, INTERNAL_ERROR) mirror the AuthorizationErrorCode
107
- * protobuf enum. GATEWAY_TIMEOUT, PROOF_INVALID, and PROOF_STALE are produced by payment-gw
108
- * itself and have no protobuf equivalent.
104
+ * Counterparty-sourced codes are derived from the error code the
105
+ * Counterparty Gateway publishes. GATEWAY_TIMEOUT, PROOF_INVALID, and
106
+ * PROOF_STALE are payment-gw-specific (no counterparty envelope corresponds).
109
107
  *
110
108
  */
111
109
  error_code?: 'COUNTERPARTY_NOT_FOUND' | 'COUNTERPARTY_TIMEOUT' | 'WEBHOOK_ERROR' | 'WEBHOOK_CONNECTION_ERROR' | 'INTERNAL_ERROR' | 'GATEWAY_TIMEOUT' | 'PROOF_INVALID' | 'PROOF_STALE';
@@ -126,10 +124,9 @@ type AuthorizationResult = {
126
124
  type status = 'authorized' | 'declined' | 'error' | 'timeout';
127
125
  /**
128
126
  * Machine-readable error code (present when status is error or timeout).
129
- * The counterparty and webhook codes (COUNTERPARTY_NOT_FOUND, COUNTERPARTY_TIMEOUT,
130
- * WEBHOOK_ERROR, WEBHOOK_CONNECTION_ERROR, INTERNAL_ERROR) mirror the AuthorizationErrorCode
131
- * protobuf enum. GATEWAY_TIMEOUT, PROOF_INVALID, and PROOF_STALE are produced by payment-gw
132
- * itself and have no protobuf equivalent.
127
+ * Counterparty-sourced codes are derived from the error code the
128
+ * Counterparty Gateway publishes. GATEWAY_TIMEOUT, PROOF_INVALID, and
129
+ * PROOF_STALE are payment-gw-specific (no counterparty envelope corresponds).
133
130
  *
134
131
  */
135
132
  type error_code = 'COUNTERPARTY_NOT_FOUND' | 'COUNTERPARTY_TIMEOUT' | 'WEBHOOK_ERROR' | 'WEBHOOK_CONNECTION_ERROR' | 'INTERNAL_ERROR' | 'GATEWAY_TIMEOUT' | 'PROOF_INVALID' | 'PROOF_STALE';
@@ -205,7 +202,10 @@ type PaymentRequest = {
205
202
  */
206
203
  account: string;
207
204
  /**
208
- * The API endpoint URL where the verification service can be reached
205
+ * Origin of the fulfillment verifier service, with no path — the caller
206
+ * appends the verifier's own API paths. The gateway's `/defaults` response
207
+ * supplies the default fulfillment verifier for each chain.
208
+ *
209
209
  */
210
210
  endpoint: string;
211
211
  };
@@ -498,12 +498,11 @@ type status2 = 'pending' | 'completed' | 'failed' | 'cancelled';
498
498
  */
499
499
  type PaymentError = {
500
500
  /**
501
- * Machine-readable error code in SCREAMING_SNAKE_CASE.
501
+ * Public error category in SCREAMING_SNAKE_CASE.
502
502
  * Common codes:
503
- * - `QUOTE_DEADLINE_EXPIRED`: No settlement quotes received in time
504
- * - `QUOTE_SELECTION_FAILED`: Quotes received but none met requirements
505
- * - `INSUFFICIENT_FUNDS`: Sender wallet has insufficient balance
506
- * - `FULFILLMENT_TIMEOUT`: Settlement agent didn't complete in time
503
+ * - `SETTLEMENT_FAILED`: The settlement could not be completed
504
+ * - `NO_ROUTE_AVAILABLE`: No settlement route was available
505
+ * - `INTERNAL_ERROR`: An unexpected error occurred
507
506
  *
508
507
  */
509
508
  code: string;
@@ -749,7 +748,7 @@ type TimelineError = {
749
748
  };
750
749
  type TimelineStep = {
751
750
  /**
752
- * Name of the step
751
+ * Internal name of the step (matches settlement event type)
753
752
  */
754
753
  name: string;
755
754
  /**
@@ -799,11 +798,30 @@ type TimelineStep = {
799
798
  *
800
799
  */
801
800
  type status4 = 'completed' | 'in_progress' | 'pending' | 'failed' | 'skipped';
801
+ /**
802
+ * Safe, outward-facing error. Derived from an internal error through the shared error catalog. The public code identifies the category and the message is a curated, safe description.
803
+ */
802
804
  type ErrorResponse = {
803
805
  /**
804
- * Error message
806
+ * Public, machine-readable error category in SCREAMING_SNAKE_CASE.
807
+ */
808
+ code: string;
809
+ /**
810
+ * Curated, safe, human-readable message.
811
+ */
812
+ message: string;
813
+ /**
814
+ * Correlation id to quote to support to locate the internal error record.
805
815
  */
806
- error?: string;
816
+ request_id?: string;
817
+ /**
818
+ * Link to the documentation page for this public code.
819
+ */
820
+ docs_url?: string;
821
+ /**
822
+ * Originating service domain.
823
+ */
824
+ domain?: string;
807
825
  };
808
826
  /**
809
827
  * Request body for opening a quote-request batch. Structurally the existing PaymentRequest
@@ -877,7 +895,10 @@ type CreateQuoteRequest = {
877
895
  */
878
896
  account: string;
879
897
  /**
880
- * The API endpoint URL where the verification service can be reached
898
+ * Origin of the fulfillment verifier service, with no path — the caller
899
+ * appends the verifier's own API paths. The gateway's `/defaults` response
900
+ * supplies the default fulfillment verifier for each chain.
901
+ *
881
902
  */
882
903
  endpoint: string;
883
904
  };
@@ -959,7 +980,7 @@ type Quote = {
959
980
  quote_id: string;
960
981
  /**
961
982
  * The settler-signed FulfillmentQuote (structurally the canonical FulfillmentQuote/v1
962
- * declaration at https://schemas.atum.network/declarations/FulfillmentQuote/v1), returned
983
+ * declaration at https://schemas.atum.xyz/declarations/FulfillmentQuote/v1), returned
963
984
  * verbatim as an opaque signed document. A client recomputes quote_hash over the returned
964
985
  * bytes and verifies the settler signature, then re-embeds them into
965
986
  * bid_award.fulfillment_quote_json at award. quote_hash is canonicalization-based
@@ -981,7 +1002,7 @@ type AwardedQuote = {
981
1002
  quote_id: string;
982
1003
  /**
983
1004
  * The settler-signed FulfillmentQuote (structurally the canonical FulfillmentQuote/v1
984
- * declaration at https://schemas.atum.network/declarations/FulfillmentQuote/v1), returned
1005
+ * declaration at https://schemas.atum.xyz/declarations/FulfillmentQuote/v1), returned
985
1006
  * verbatim as an opaque signed document. A client recomputes quote_hash over the returned
986
1007
  * bytes and verifies the settler signature, then re-embeds them into
987
1008
  * bid_award.fulfillment_quote_json at award. quote_hash is canonicalization-based
@@ -1083,7 +1104,9 @@ type QuoteRequestStatusResponse = {
1083
1104
  /**
1084
1105
  * Derived batch lifecycle, computed at read time (not a stored state machine). Disjoint
1085
1106
  * from the payment-status enum returned by the award and payment-status endpoints.
1086
- * - `collecting` — collection window in progress; `quotes` absent.
1107
+ * - `collecting` — collection window still open; `quotes` lists those collected so far
1108
+ * (a quote is awardable from arrival, by its own `award_deadline`; more may arrive until
1109
+ * `collection_close`).
1087
1110
  * - `ready` — collection complete; none awarded yet; either at least one quote is still
1088
1111
  * within its `award_deadline`, or no settler bid (empty `quotes` array — the successful
1089
1112
  * "no quotes available" result).
@@ -1095,7 +1118,7 @@ type QuoteRequestStatusResponse = {
1095
1118
  */
1096
1119
  status: 'collecting' | 'ready' | 'awarded' | 'expired';
1097
1120
  /**
1098
- * Collected quotes with award linkage. Absent while status is `collecting`.
1121
+ * Collected quotes with award linkage — those collected so far while `collecting`, the full set once the window closes.
1099
1122
  */
1100
1123
  quotes?: Array<AwardedQuote>;
1101
1124
  /**
@@ -1106,7 +1129,9 @@ type QuoteRequestStatusResponse = {
1106
1129
  /**
1107
1130
  * Derived batch lifecycle, computed at read time (not a stored state machine). Disjoint
1108
1131
  * from the payment-status enum returned by the award and payment-status endpoints.
1109
- * - `collecting` — collection window in progress; `quotes` absent.
1132
+ * - `collecting` — collection window still open; `quotes` lists those collected so far
1133
+ * (a quote is awardable from arrival, by its own `award_deadline`; more may arrive until
1134
+ * `collection_close`).
1110
1135
  * - `ready` — collection complete; none awarded yet; either at least one quote is still
1111
1136
  * within its `award_deadline`, or no settler bid (empty `quotes` array — the successful
1112
1137
  * "no quotes available" result).
@@ -1294,10 +1319,26 @@ type $OpenApiTs = {
1294
1319
  * Invalid request
1295
1320
  */
1296
1321
  400: ErrorResponse;
1322
+ /**
1323
+ * Signature or sender authorization could not be verified
1324
+ */
1325
+ 401: ErrorResponse;
1326
+ /**
1327
+ * Payment declined during counterparty authorization
1328
+ */
1329
+ 403: ErrorResponse;
1330
+ /**
1331
+ * Payment request too large to process
1332
+ */
1333
+ 413: ErrorResponse;
1297
1334
  /**
1298
1335
  * Internal server error
1299
1336
  */
1300
1337
  500: ErrorResponse;
1338
+ /**
1339
+ * A dependency is temporarily unavailable
1340
+ */
1341
+ 503: ErrorResponse;
1301
1342
  };
1302
1343
  };
1303
1344
  };
@@ -1397,6 +1438,10 @@ type $OpenApiTs = {
1397
1438
  * Counterparty not found (no registration for the resolved DID)
1398
1439
  */
1399
1440
  404: ErrorResponse;
1441
+ /**
1442
+ * Internal server error
1443
+ */
1444
+ 500: ErrorResponse;
1400
1445
  /**
1401
1446
  * Counterparty webhook error (HTTP error or connection failure)
1402
1447
  */
@@ -1695,6 +1740,25 @@ declare class PaymentGatewayClient$1 {
1695
1740
  constructor(config?: Partial<OpenAPIConfig>, HttpRequest?: HttpRequestConstructor$1);
1696
1741
  }
1697
1742
 
1743
+ /**
1744
+ * Chain defaults returned by the payment gateway /defaults endpoint.
1745
+ */
1746
+ interface ChainDefaults {
1747
+ escrowContract: string;
1748
+ quoteSelector: string;
1749
+ fulfillmentVerifierAccount: string;
1750
+ fulfillmentVerifierEndpoint: string;
1751
+ fulfillmentProxy: string;
1752
+ permit2Contract?: string;
1753
+ /**
1754
+ * V3 Solana escrow domain-separation fields, surfaced by payment-gw
1755
+ * `/defaults` for Solana source chains. Used to build the EscrowDomain that the
1756
+ * V3 deposit hash binds to. Absent for EVM/Tron.
1757
+ */
1758
+ svmSignatureClusterId?: string;
1759
+ svmSignatureDomainVersion?: number;
1760
+ }
1761
+
1698
1762
  interface Logger {
1699
1763
  debug(obj: unknown, msg?: string): void;
1700
1764
  info(obj: unknown, msg?: string): void;
@@ -1737,124 +1801,6 @@ interface Meter {
1737
1801
  /** Reads the cluster's on-chain unix timestamp (seconds) from an RPC endpoint. */
1738
1802
  type SolanaClusterUnixTimeReader = (rpcUrl: string, timeoutMs: number) => Promise<bigint>;
1739
1803
 
1740
- /**
1741
- * Chain defaults returned by the payment gateway /defaults endpoint.
1742
- */
1743
- interface ChainDefaults {
1744
- escrowContract: string;
1745
- quoteSelector: string;
1746
- fulfillmentVerifierAccount: string;
1747
- fulfillmentVerifierEndpoint: string;
1748
- fulfillmentProxy: string;
1749
- permit2Contract?: string;
1750
- /**
1751
- * V3 Solana escrow domain-separation fields, surfaced by payment-gw
1752
- * `/defaults` for Solana source chains. Used to build the EscrowDomain that the
1753
- * V3 deposit hash binds to. Absent for EVM/Tron.
1754
- */
1755
- svmSignatureClusterId?: string;
1756
- svmSignatureDomainVersion?: number;
1757
- }
1758
- /**
1759
- * Result of building a sender auth message for a specific chain.
1760
- */
1761
- interface AuthMessageResult {
1762
- messageScheme: SenderAuthMessageScheme;
1763
- messageHash: string;
1764
- messagePrehash: string;
1765
- }
1766
- /**
1767
- * Chain-specific overrides for the request-body contract fields
1768
- * (`quote_selector`, `fulfillment_verifier`). Some chains must rewrite the raw
1769
- * /defaults values before they go on the wire — e.g. Tron normalizes base58
1770
- * (`T…`) addresses to the canonical 20-byte hex the on-chain verifier and the
1771
- * signed permit witness use. A chain that needs no rewrite returns undefined
1772
- * and the caller falls back to the raw defaults. Applied identically on the
1773
- * payment and quote paths, so their contract fields never diverge.
1774
- */
1775
- interface ContractFieldOverrides {
1776
- quote_selector?: string;
1777
- fulfillment_verifier?: {
1778
- account: string;
1779
- endpoint: string;
1780
- };
1781
- }
1782
- /**
1783
- * Chain adapter that handles all chain-specific logic:
1784
- * message building (SDK), key formatting, and signing (CLI).
1785
- */
1786
- interface ChainAdapter {
1787
- /**
1788
- * Turnkey account address format (e.g. `ADDRESS_FORMAT_ETHEREUM`), used to map a
1789
- * wallet account back to this chain's namespace.
1790
- */
1791
- turnkeyAddressFormat: string;
1792
- /**
1793
- * Build the sender_auth message (hash + prehash). May be async: the Solana
1794
- * adapter reads the on-chain cluster clock to ground `issued_at`.
1795
- */
1796
- buildAuthMessage(params: {
1797
- sourceAsset: string;
1798
- depositor: string;
1799
- fulfillmentAmount: string;
1800
- requestId: string;
1801
- sourceDefaults: ChainDefaults;
1802
- deadlineSeconds?: number;
1803
- /** Solana-only: override the RPC used to read the cluster clock for issued_at. */
1804
- solanaRpcUrl?: string;
1805
- /** Solana-only: injectable clock reader, primarily a test seam. */
1806
- solanaClockReader?: SolanaClusterUnixTimeReader;
1807
- /** Solana-only: optional logger; warns if the cluster clock read fails and issued_at falls back to the wall clock. */
1808
- solanaLogger?: Logger;
1809
- }): Promise<AuthMessageResult>;
1810
- /**
1811
- * Resolve chain-specific overrides for the request-body contract fields
1812
- * (`quote_selector`, `fulfillment_verifier`). Both preparePaymentRequest and
1813
- * prepareQuoteRequest resolve these fields through this one method, so the
1814
- * payment and quote paths always carry byte-identical contract fields.
1815
- * Returns undefined when the chain needs no rewrite (EVM); Tron normalizes
1816
- * base58 → canonical hex.
1817
- */
1818
- resolveContractOverrides?(sourceDefaults: ChainDefaults): ContractFieldOverrides | undefined;
1819
- /** Normalize private key format for this chain. */
1820
- formatPrivateKey(key: string): string;
1821
- /**
1822
- * Reject a malformed raw key value-free (throwing `Invalid private key`)
1823
- * before it reaches the chain's signing library. Chains whose key decoding
1824
- * already fails without echoing the key (e.g. Solana's bs58/length checks)
1825
- * omit this; EVM/Tron implement it because `ethers.Wallet` embeds the key
1826
- * value verbatim in its error for malformed input.
1827
- */
1828
- validatePrivateKey?(key: string): void;
1829
- /**
1830
- * Sign a sender-auth signed_messages[i] entry, returning a 0x-prefixed
1831
- * hex signature. The adapter chooses the appropriate signing scheme
1832
- * based on its chain:
1833
- * - EVM: EIP-712 typed-data signing over signedMessage.message_prehash
1834
- * (which is shaped to be a direct ethers.signTypedData arg set).
1835
- * - Tron: TIP-712 typed-data signing (chain-specific quirks).
1836
- * - Solana: ed25519 over a chain-specific canonicalized digest.
1837
- */
1838
- sign(signedMessage: SignedMessage, privateKey: string): Promise<string>;
1839
- /**
1840
- * Derive the base58 public key of the signing key, for chains whose signatures
1841
- * are NOT public-key-recoverable and must therefore ship the signer's pubkey
1842
- * alongside the signature. Solana (Ed25519) implements this; EVM/Tron do not
1843
- * (secp256k1 signatures are recoverable via ecrecover, so the verifier derives
1844
- * the signer from the signature itself). The result is attached to
1845
- * sender_auth.signed_messages[0].payload.delegate_signer so the settler can feed
1846
- * it to the on-chain Ed25519 verify instruction.
1847
- */
1848
- deriveDelegateSigner?(privateKey: string): string;
1849
- /**
1850
- * Assert the private key derives `address`, so a wrong key/sender pair fails
1851
- * fast (mirrors the Turnkey pinnedAddress check) instead of signing as the
1852
- * wrong depositor and only failing downstream. Throws on mismatch. The error
1853
- * names the addresses (public) but never the key.
1854
- */
1855
- verifyAddressMatchesKey?(privateKey: string, address: string): void;
1856
- }
1857
-
1858
1804
  /** Result of signing a sender_auth message. */
1859
1805
  interface SenderSignature {
1860
1806
  /** 0x-prefixed signature hex (65-byte secp256k1 for EVM/Tron, 64-byte ed25519 for Solana). */
@@ -1898,18 +1844,6 @@ type SenderSignerOptions = {
1898
1844
  provider: 'turnkey';
1899
1845
  } & TurnkeyConfig);
1900
1846
 
1901
- /**
1902
- * Private-key sender signer. Delegates to the chain adapter so the local-key
1903
- * signing path is unchanged. The adapter validates the key in the constructor,
1904
- * so a malformed EVM/Tron key can't leak via ethers even on direct construction.
1905
- */
1906
- declare class RawSenderSigner implements SenderSigner {
1907
- private readonly adapter;
1908
- private readonly privateKey;
1909
- constructor(adapter: ChainAdapter, privateKey: string);
1910
- sign(signedMessage: SignedMessage): Promise<SenderSignature>;
1911
- }
1912
-
1913
1847
  /** Typed contract for the lazily-loaded ./turnkey-impl module; also the test's conformance target. */
1914
1848
  interface TurnkeyImplModule {
1915
1849
  turnkeySign: (chainPrefix: string, cfg: {
@@ -1973,9 +1907,9 @@ declare const $AuthorizationResult: {
1973
1907
  };
1974
1908
  readonly error_code: {
1975
1909
  readonly type: "string";
1976
- readonly description: "Machine-readable error code (present when status is error or timeout).\nThe counterparty and webhook codes (COUNTERPARTY_NOT_FOUND, COUNTERPARTY_TIMEOUT,\nWEBHOOK_ERROR, WEBHOOK_CONNECTION_ERROR, INTERNAL_ERROR) mirror the AuthorizationErrorCode\nprotobuf enum. GATEWAY_TIMEOUT, PROOF_INVALID, and PROOF_STALE are produced by payment-gw\nitself and have no protobuf equivalent.\n";
1910
+ readonly description: "Machine-readable error code (present when status is error or timeout).\nCounterparty-sourced codes are derived from the error code the\nCounterparty Gateway publishes. GATEWAY_TIMEOUT, PROOF_INVALID, and\nPROOF_STALE are payment-gw-specific (no counterparty envelope corresponds).\n";
1977
1911
  readonly enum: readonly ["COUNTERPARTY_NOT_FOUND", "COUNTERPARTY_TIMEOUT", "WEBHOOK_ERROR", "WEBHOOK_CONNECTION_ERROR", "INTERNAL_ERROR", "GATEWAY_TIMEOUT", "PROOF_INVALID", "PROOF_STALE"];
1978
- readonly 'x-enum-description': "The counterparty and webhook codes mirror the AuthorizationErrorCode protobuf enum\n(without the AUTHORIZATION_ERROR_CODE_ prefix for readability in HTTP responses).\nGATEWAY_TIMEOUT, PROOF_INVALID, and PROOF_STALE are payment-gw-local codes with no protobuf equivalent.\n";
1912
+ readonly 'x-enum-description': "COUNTERPARTY_NOT_FOUND, COUNTERPARTY_TIMEOUT, WEBHOOK_ERROR,\nWEBHOOK_CONNECTION_ERROR, and INTERNAL_ERROR are derived from the\nerror code the Counterparty Gateway publishes.\nGATEWAY_TIMEOUT is emitted by payment-gw when no authorization\nresponse is received within the system-wide timeout — source unknown\n(counterparty delay, transport failure, or gateway unavailability).\nOriginator should retry; counterparty-side idempotency prevents PSP re-charge\nif the original was already processed.\n\nPROOF_INVALID is emitted when the W3C Data Integrity proof on the\nbeneficiary PSP's AuthorizationResponse fails verification: signature\nrecovery failed, recovered DID does not match the destination DID,\nresponse shape is malformed (missing @context / payment_id /\ncounterparty_did / proof), or the suite type is unsupported. The\nunderlying reason cardinality is collapsed so originators see one\nactionable category.\n\nPROOF_STALE is emitted when proof.created falls outside the\nconfigured freshness window. Originators should retry with a fresh\nrequest — the freshness window closes a replay attack vector where a\ncaptured-but-cryptographically-valid proof could otherwise be replayed\nindefinitely.\n";
1979
1913
  };
1980
1914
  readonly error_message: {
1981
1915
  readonly type: "string";
@@ -2067,8 +2001,8 @@ declare const $PaymentRequest: {
2067
2001
  readonly endpoint: {
2068
2002
  readonly type: "string";
2069
2003
  readonly format: "uri";
2070
- readonly description: "The API endpoint URL where the verification service can be reached";
2071
- readonly example: "https://verifier.atum.network/api/v1/verify";
2004
+ readonly description: "Origin of the fulfillment verifier service, with no path — the caller\nappends the verifier's own API paths. The gateway's `/defaults` response\nsupplies the default fulfillment verifier for each chain.\n";
2005
+ readonly example: "https://veri-fill.production-testnet.atum.xyz";
2072
2006
  };
2073
2007
  };
2074
2008
  };
@@ -2362,8 +2296,8 @@ declare const $PaymentError: {
2362
2296
  readonly properties: {
2363
2297
  readonly code: {
2364
2298
  readonly type: "string";
2365
- readonly description: "Machine-readable error code in SCREAMING_SNAKE_CASE.\nCommon codes:\n- `QUOTE_DEADLINE_EXPIRED`: No settlement quotes received in time\n- `QUOTE_SELECTION_FAILED`: Quotes received but none met requirements\n- `INSUFFICIENT_FUNDS`: Sender wallet has insufficient balance\n- `FULFILLMENT_TIMEOUT`: Settlement agent didn't complete in time\n";
2366
- readonly example: "QUOTE_DEADLINE_EXPIRED";
2299
+ readonly description: "Public error category in SCREAMING_SNAKE_CASE.\nCommon codes:\n- `SETTLEMENT_FAILED`: The settlement could not be completed\n- `NO_ROUTE_AVAILABLE`: No settlement route was available\n- `INTERNAL_ERROR`: An unexpected error occurred\n";
2300
+ readonly example: "SETTLEMENT_FAILED";
2367
2301
  };
2368
2302
  readonly message: {
2369
2303
  readonly type: "string";
@@ -2626,7 +2560,7 @@ declare const $TimelineStep: {
2626
2560
  readonly properties: {
2627
2561
  readonly name: {
2628
2562
  readonly type: "string";
2629
- readonly description: "Name of the step";
2563
+ readonly description: "Internal name of the step (matches settlement event type)";
2630
2564
  readonly example: "BID_AWARDED";
2631
2565
  };
2632
2566
  readonly label: {
@@ -2667,11 +2601,35 @@ declare const $TimelineStep: {
2667
2601
  };
2668
2602
  declare const $ErrorResponse: {
2669
2603
  readonly type: "object";
2604
+ readonly description: "Safe, outward-facing error. Derived from an internal error through the shared error catalog. The public code identifies the category and the message is a curated, safe description.";
2605
+ readonly required: readonly ["code", "message"];
2670
2606
  readonly properties: {
2671
- readonly error: {
2607
+ readonly code: {
2608
+ readonly type: "string";
2609
+ readonly description: "Public, machine-readable error category in SCREAMING_SNAKE_CASE.";
2610
+ readonly pattern: "^[A-Z][A-Z0-9_]*$";
2611
+ readonly example: "INVALID_SOURCE_ASSET";
2612
+ };
2613
+ readonly message: {
2614
+ readonly type: "string";
2615
+ readonly description: "Curated, safe, human-readable message.";
2616
+ readonly maxLength: 500;
2617
+ readonly example: "The source asset identifier is not a valid CAIP-19 asset.";
2618
+ };
2619
+ readonly request_id: {
2620
+ readonly type: "string";
2621
+ readonly description: "Correlation id to quote to support to locate the internal error record.";
2622
+ readonly example: "req_123456789";
2623
+ };
2624
+ readonly docs_url: {
2672
2625
  readonly type: "string";
2673
- readonly description: "Error message";
2674
- readonly example: "Invalid request: missing required field";
2626
+ readonly format: "uri";
2627
+ readonly description: "Link to the documentation page for this public code.";
2628
+ };
2629
+ readonly domain: {
2630
+ readonly type: "string";
2631
+ readonly description: "Originating service domain.";
2632
+ readonly example: "PAYMENT_GATEWAY";
2675
2633
  };
2676
2634
  };
2677
2635
  };
@@ -2752,8 +2710,8 @@ declare const $CreateQuoteRequest: {
2752
2710
  readonly endpoint: {
2753
2711
  readonly type: "string";
2754
2712
  readonly format: "uri";
2755
- readonly description: "The API endpoint URL where the verification service can be reached";
2756
- readonly example: "https://verifier.atum.network/api/v1/verify";
2713
+ readonly description: "Origin of the fulfillment verifier service, with no path — the caller\nappends the verifier's own API paths. The gateway's `/defaults` response\nsupplies the default fulfillment verifier for each chain.\n";
2714
+ readonly example: "https://veri-fill.production-testnet.atum.xyz";
2757
2715
  };
2758
2716
  };
2759
2717
  };
@@ -2864,7 +2822,7 @@ declare const $Quote: {
2864
2822
  };
2865
2823
  readonly fulfillment_quote: {
2866
2824
  readonly type: "object";
2867
- readonly description: "The settler-signed FulfillmentQuote (structurally the canonical FulfillmentQuote/v1\ndeclaration at https://schemas.atum.network/declarations/FulfillmentQuote/v1), returned\nverbatim as an opaque signed document. A client recomputes quote_hash over the returned\nbytes and verifies the settler signature, then re-embeds them into\nbid_award.fulfillment_quote_json at award. quote_hash is canonicalization-based\n(URDNA2015), so it is stable across JSON key-order/whitespace normalization. The\nreturned bytes are hash-equivalent to, but not necessarily byte-identical with, what the\nsettler emitted (quotes are stored as JSONB, which normalizes on write). The gateway\nstill never re-serializes the quote through a typed struct (that renormalizes timestamp\nvalues and WOULD change quote_hash), so the Go binding exposes it as a raw JSON passthrough.\n";
2825
+ readonly description: "The settler-signed FulfillmentQuote (structurally the canonical FulfillmentQuote/v1\ndeclaration at https://schemas.atum.xyz/declarations/FulfillmentQuote/v1), returned\nverbatim as an opaque signed document. A client recomputes quote_hash over the returned\nbytes and verifies the settler signature, then re-embeds them into\nbid_award.fulfillment_quote_json at award. quote_hash is canonicalization-based\n(URDNA2015), so it is stable across JSON key-order/whitespace normalization. The\nreturned bytes are hash-equivalent to, but not necessarily byte-identical with, what the\nsettler emitted (quotes are stored as JSONB, which normalizes on write). The gateway\nstill never re-serializes the quote through a typed struct (that renormalizes timestamp\nvalues and WOULD change quote_hash), so the Go binding exposes it as a raw JSON passthrough.\n";
2868
2826
  readonly 'x-go-type': "json.RawMessage";
2869
2827
  };
2870
2828
  };
@@ -2880,7 +2838,7 @@ declare const $AwardedQuote: {
2880
2838
  };
2881
2839
  readonly fulfillment_quote: {
2882
2840
  readonly type: "object";
2883
- readonly description: "The settler-signed FulfillmentQuote (structurally the canonical FulfillmentQuote/v1\ndeclaration at https://schemas.atum.network/declarations/FulfillmentQuote/v1), returned\nverbatim as an opaque signed document. A client recomputes quote_hash over the returned\nbytes and verifies the settler signature, then re-embeds them into\nbid_award.fulfillment_quote_json at award. quote_hash is canonicalization-based\n(URDNA2015), so it is stable across JSON key-order/whitespace normalization. The\nreturned bytes are hash-equivalent to, but not necessarily byte-identical with, what the\nsettler emitted (quotes are stored as JSONB, which normalizes on write). The gateway\nstill never re-serializes the quote through a typed struct (that renormalizes timestamp\nvalues and WOULD change quote_hash), so the Go binding exposes it as a raw JSON passthrough.\n";
2841
+ readonly description: "The settler-signed FulfillmentQuote (structurally the canonical FulfillmentQuote/v1\ndeclaration at https://schemas.atum.xyz/declarations/FulfillmentQuote/v1), returned\nverbatim as an opaque signed document. A client recomputes quote_hash over the returned\nbytes and verifies the settler signature, then re-embeds them into\nbid_award.fulfillment_quote_json at award. quote_hash is canonicalization-based\n(URDNA2015), so it is stable across JSON key-order/whitespace normalization. The\nreturned bytes are hash-equivalent to, but not necessarily byte-identical with, what the\nsettler emitted (quotes are stored as JSONB, which normalizes on write). The gateway\nstill never re-serializes the quote through a typed struct (that renormalizes timestamp\nvalues and WOULD change quote_hash), so the Go binding exposes it as a raw JSON passthrough.\n";
2884
2842
  readonly 'x-go-type': "json.RawMessage";
2885
2843
  };
2886
2844
  readonly awarded_payment_id: {
@@ -3014,12 +2972,12 @@ declare const $QuoteRequestStatusResponse: {
3014
2972
  readonly status: {
3015
2973
  readonly type: "string";
3016
2974
  readonly enum: readonly ["collecting", "ready", "awarded", "expired"];
3017
- readonly description: "Derived batch lifecycle, computed at read time (not a stored state machine). Disjoint\nfrom the payment-status enum returned by the award and payment-status endpoints.\n- `collecting` — collection window in progress; `quotes` absent.\n- `ready` — collection complete; none awarded yet; either at least one quote is still\n within its `award_deadline`, or no settler bid (empty `quotes` array — the successful\n \"no quotes available\" result).\n- `awarded` — a quote produced a payment row; no further awards accepted (MVP).\n- `expired` — collection closed, nothing awarded, and every collected quote is now past\n its `award_deadline` (\"quotes lapsed\"). An empty batch is `ready`, not `expired` — the\n two are deliberately distinct (\"no quotes available\" vs \"quotes lapsed\").\n";
2975
+ readonly description: "Derived batch lifecycle, computed at read time (not a stored state machine). Disjoint\nfrom the payment-status enum returned by the award and payment-status endpoints.\n- `collecting` — collection window still open; `quotes` lists those collected so far\n (a quote is awardable from arrival, by its own `award_deadline`; more may arrive until\n `collection_close`).\n- `ready` — collection complete; none awarded yet; either at least one quote is still\n within its `award_deadline`, or no settler bid (empty `quotes` array — the successful\n \"no quotes available\" result).\n- `awarded` — a quote produced a payment row; no further awards accepted (MVP).\n- `expired` — collection closed, nothing awarded, and every collected quote is now past\n its `award_deadline` (\"quotes lapsed\"). An empty batch is `ready`, not `expired` — the\n two are deliberately distinct (\"no quotes available\" vs \"quotes lapsed\").\n";
3018
2976
  readonly example: "awarded";
3019
2977
  };
3020
2978
  readonly quotes: {
3021
2979
  readonly type: "array";
3022
- readonly description: "Collected quotes with award linkage. Absent while status is `collecting`.";
2980
+ readonly description: "Collected quotes with award linkage — those collected so far while `collecting`, the full set once the window closes.";
3023
2981
  readonly items: {
3024
2982
  readonly $ref: "#/components/schemas/AwardedQuote";
3025
2983
  };
@@ -3143,6 +3101,38 @@ declare class ApiError extends Error {
3143
3101
  constructor(request: ApiRequestOptions, response: ApiResult, message: string);
3144
3102
  }
3145
3103
 
3104
+ /**
3105
+ * Type guard for the SDK's transport-level error.
3106
+ *
3107
+ * Every non-2xx gateway response is thrown by the generated client as an
3108
+ * {@link ApiError}, which also carries the transport detail (`status`, `url`).
3109
+ */
3110
+ declare function isApiError(err: unknown): err is ApiError;
3111
+ /**
3112
+ * Return the typed, public-facing gateway error carried by a caught
3113
+ * {@link ApiError}, or `undefined` when the value is not an `ApiError` or its
3114
+ * body is not the public {@link ErrorResponse} shape.
3115
+ *
3116
+ * The gateway serializes errors as an {@link ErrorResponse}
3117
+ * (`{ code, message, request_id?, docs_url?, domain? }`), but the generated
3118
+ * client widens the parsed body to `unknown`. This helper narrows it back so
3119
+ * consumers can branch on `code` and quote `request_id` to support. It only
3120
+ * ever exposes this outward-facing shape — never any internal error taxonomy.
3121
+ *
3122
+ * @example
3123
+ * try {
3124
+ * await client.payments.submitPayment({ requestBody });
3125
+ * } catch (err) {
3126
+ * const gwError = getErrorResponse(err);
3127
+ * if (gwError) {
3128
+ * console.error(gwError.code, gwError.message, gwError.request_id);
3129
+ * } else {
3130
+ * throw err;
3131
+ * }
3132
+ * }
3133
+ */
3134
+ declare function getErrorResponse(err: unknown): ErrorResponse | undefined;
3135
+
3146
3136
  /**
3147
3137
  * EVM Permit2 PermitWitnessTransferFrom deposit prehash + EIP-712 digest.
3148
3138
  *
@@ -3533,6 +3523,21 @@ declare const PAYMENT_REQUEST_VERSION = "1.0";
3533
3523
  declare function signPaymentRequest(request: PaymentRequest, signer: SenderSigner): Promise<PaymentRequest>;
3534
3524
  type HttpRequestConstructor = new (config: OpenAPIConfig) => BaseHttpRequest;
3535
3525
  declare const defaultGateway: string;
3526
+ /**
3527
+ * Default request-layer configuration, with `BASE` set to this package's default
3528
+ * gateway ({@link defaultGateway}, production-testnet).
3529
+ *
3530
+ * The generated value mirrors the first `servers` entry of the OpenAPI contract,
3531
+ * which is mainnet. This package defaults to testnet instead, so a client created
3532
+ * without an explicit URL never targets a live-funds environment. The override
3533
+ * lives here rather than in `src/generated/`, which is reproduced from the
3534
+ * contract and stays in sync with it.
3535
+ *
3536
+ * Exported for callers that want the default configuration shape.
3537
+ * {@link PaymentGatewayClient} does not read it: the client resolves its own
3538
+ * `BASE` and passes it explicitly.
3539
+ */
3540
+ declare const OpenAPI: OpenAPIConfig;
3536
3541
  /**
3537
3542
  * Default quote-collection window for {@link PaymentGatewayClient.prepareQuoteRequest}
3538
3543
  * (`quote_deadline = now + this`, in seconds). Chosen as the largest value that still
@@ -3568,6 +3573,32 @@ declare class PaymentGatewayClient extends PaymentGatewayClient$1 {
3568
3573
  /**
3569
3574
  * Prepares a payment request with defaults, ready for signing.
3570
3575
  *
3576
+ * By default this resolves the corridor addresses from the gateway `/defaults`
3577
+ * endpoint. It reaches the gateway only for what the caller has NOT already
3578
+ * supplied via `resolvedDefaults`: supply `resolvedDefaults.source` to skip the
3579
+ * source-chain fetch and `resolvedDefaults.destination` to skip the destination
3580
+ * fetch. Supplying both builds the request **entirely offline** (no network) —
3581
+ * how a caller that already holds the corridor addresses (e.g. from a signed
3582
+ * challenge) constructs and signs a request without gateway access. Such a
3583
+ * caller typically also injects `now` so the deadlines are deterministic.
3584
+ *
3585
+ * @example Minimal — fetch corridor addresses from the gateway, then sign
3586
+ * ```ts
3587
+ * const client = new PaymentGatewayClient({ BASE: "https://gateway.example.com" });
3588
+ *
3589
+ * const request = await client.preparePaymentRequest({
3590
+ * depositor: "0xPayerAddress",
3591
+ * sourceAsset: "eip155:8453/erc20:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", // USDC on Base
3592
+ * destinationAccount: "0xMerchantAddress",
3593
+ * destinationAsset: "eip155:42161/erc20:0xaf88d065e77c8cC2239327C5EDb3A432268e5831", // USDC on Arbitrum
3594
+ * fulfillmentAmount: "10000000", // 10 USDC (6 decimals)
3595
+ * });
3596
+ * // max_source_amount, deadlines, request id, and nonce are all defaulted.
3597
+ *
3598
+ * const signer = createSenderSigner("eip155:8453", { provider: "raw", privateKey });
3599
+ * await signPaymentRequest(request, signer); // fills sender_auth, ready to submit
3600
+ * ```
3601
+ *
3571
3602
  * @param params Payment parameters
3572
3603
  * @returns A complete PaymentRequest object without the signature
3573
3604
  */
@@ -3578,17 +3609,54 @@ declare class PaymentGatewayClient extends PaymentGatewayClient$1 {
3578
3609
  destinationAccount: string;
3579
3610
  destinationAsset: string;
3580
3611
  maxSourceAmount?: string;
3581
- requestId?: string;
3582
- requestIdPrefix?: string;
3612
+ /**
3613
+ * REQUIRED idempotency key. It seeds the deterministic deposit nonce, so a retry that
3614
+ * reuses the same `requestId` reproduces the same single-use permit (no double-charge),
3615
+ * and the gateway dedups on it. The caller owns it and must reuse it on retry — there is
3616
+ * no auto-generated fallback (a random one would silently break idempotency).
3617
+ */
3618
+ requestId: string;
3583
3619
  settlerRequirements?: {
3584
3620
  whitelist?: string[];
3585
3621
  blacklist?: string[];
3586
3622
  };
3587
- deadlineSeconds?: number;
3623
+ /** How long the auction stays open (seconds from now). */
3588
3624
  quoteDeadlineSeconds?: number;
3625
+ /** How long settlement may take (seconds from now). */
3589
3626
  fulfillmentDeadlineSeconds?: number;
3627
+ /** EVM/Tron-only: the Permit2 signature's own on-chain expiry (seconds from now). */
3628
+ deadlineSeconds?: number;
3629
+ /** Clock source used to stamp the deadlines. Defaults to `Date.now`; inject for offline/deterministic builds. */
3630
+ now?: () => number;
3631
+ /**
3632
+ * Explicit deposit-nonce override. OMIT this in normal use: the deposit's single-use nonce is
3633
+ * then derived deterministically from `requestId` + depositor, so rebuilding the same payment
3634
+ * reproduces the same nonce. What that guarantees differs by chain:
3635
+ * - EVM/Tron: the Permit2 nonce is a PERMANENT on-chain bitmap, so across any number of
3636
+ * rebuilds only one deposit can EVER settle — retry-safe without a time bound.
3637
+ * - Solana: the escrow replay nonce only protects within a ~128s window — the nonce pins the
3638
+ * replay slot/bucket, but `issued_at` is re-read on each build, so a rebuild in a later
3639
+ * window is not blocked on-chain by the nonce alone. The payment gateway's `request_id`
3640
+ * dedup (and the init-only deposit PDA, which blocks a byte-identical re-POST forever) are
3641
+ * the durable backstop; pin `issued_at` via `solanaClockReader` to keep a rebuild inside
3642
+ * the same window.
3643
+ * Pass a value only to override the derived nonce.
3644
+ */
3645
+ nonce?: bigint | string;
3590
3646
  /** Solana-only: override the RPC used to read the cluster clock for issued_at. */
3591
3647
  solanaRpcUrl?: string;
3648
+ /** Solana-only: injectable clock reader for `issued_at` (offline / test seam). */
3649
+ solanaClockReader?: SolanaClusterUnixTimeReader;
3650
+ /**
3651
+ * Pre-resolved corridor addresses. Omit to fetch them from the gateway
3652
+ * `/defaults`; supply to build offline. Each side is resolved independently —
3653
+ * a field left out is still fetched. The destination contributes only its
3654
+ * `fulfillmentProxy` (its escrow/roles are source-side concepts, unused here).
3655
+ */
3656
+ resolvedDefaults?: {
3657
+ source?: ChainDefaults;
3658
+ destination?: Pick<ChainDefaults, 'fulfillmentProxy'>;
3659
+ };
3592
3660
  }): Promise<PaymentRequest>;
3593
3661
  /**
3594
3662
  * Prepares a quote-request body (`CreateQuoteRequest`), ready to POST to
@@ -3642,4 +3710,4 @@ declare class PaymentGatewayClient extends PaymentGatewayClient$1 {
3642
3710
  }): Promise<CreateQuoteRequest>;
3643
3711
  }
3644
3712
 
3645
- export { $AuthorizationResult, $AwardAccepted, $AwardRequest, $AwardResponse, $AwardedPayment, $AwardedQuote, $BidAward, $CreateQuoteRequest, $DataIntegrityProof, $ErrorResponse, $FulfillmentConfirmation, $GetPaymentStatusResponse, type $OpenApiTs, $OwnedAsset, $PaymentBlockchainContext, $PaymentError, $PaymentRequest, $PaymentResponse, $PaymentSummary, $PaymentTimelineResponse, $PreparePaymentRequest, $PreparePaymentResponse, $Quote, $QuoteRequestAccepted, $QuoteRequestResponse, $QuoteRequestStatusResponse, $ResolvePaymentResponse, $SenderAuth, $SenderAuthMessageScheme, $SignedMessage, $TimelineError, $TimelineStep, $VerifiableCredential, $VerifiableCredentialAuth, ApiError, type ApiRequestOptions, type ApiResult, type AuthorizationResult, AuthorizationsService, type AuthorizePaymentData, type AuthorizePaymentResponse, type AwardAccepted, type AwardQuoteData, type AwardQuoteResponse, type AwardRequest, type AwardResponse, type AwardedPayment, type AwardedQuote, type BidAward, CancelError, CancelablePromise, type CreateQuoteRequest, type CreateQuoteRequestData, type CreateQuoteRequestResponse, DEFAULT_FULFILLMENT_DEADLINE_SECONDS, DEFAULT_PAYMENT_QUOTE_DEADLINE_SECONDS, DEFAULT_QUOTE_DEADLINE_SECONDS, DEPOSIT_MESSAGE_SIZE, type DataIntegrityProof, type ErrorResponse, type FulfillmentConfirmation, type GetPaymentStatusData, type GetPaymentStatusResponse, type GetPaymentStatusResponse2, type GetPaymentTimelineData, type GetPaymentTimelineResponse, type GetQuoteRequestStatusData, type GetQuoteRequestStatusResponse, type HealthCheckResponse, HealthService, Interceptors, MAX_VALID_SLOT, type OnCancel, OpenAPI, type OpenAPIConfig, type OwnedAsset, PAYMENT_REQUEST_VERSION, PERMIT2_CONTRACT_ADDRESS, type PaymentBlockchainContext, type PaymentError, PaymentGatewayClient, type PaymentRequest, type PaymentResponse, type PaymentSummary, type PaymentTimelineResponse, PaymentsService, type PermitWitnessTransferFromParams, type PreparePaymentData, type PreparePaymentRequest, type PreparePaymentResponse, type PreparePaymentResponse2, type Quote, type QuoteRequestAccepted, type QuoteRequestResponse, type QuoteRequestStatusResponse, QuoteRequestsService, REPLAY_HORIZON_SECS, RawSenderSigner, type ResolvePaymentData, type ResolvePaymentResponse, type ResolvePaymentResponse2, type SenderAuth, type SenderAuthMessageScheme, type SenderSignature, type SenderSigner, type SenderSignerOptions, type SignedMessage, type SolanaDepositParams, type SolanaDepositPrehash, type SubmitPaymentData, type SubmitPaymentResponse, TOTAL_BUCKETS, type TimelineError, type TimelineStep, type TurnkeyConfig, TurnkeySenderSigner, type TvmPermitWitnessTransferFromParams, type VerifiableCredential, type VerifiableCredentialAuth, base58ToBytes, base58ToHex, bytesToHex, createPermitWitnessTransferFromPrehash, createSenderSigner, createSolanaDepositPrehash, createTvmPermitWitnessTransferFromPrehash, defaultGateway, type domain, encodeU64LE, type error_code, generateSolanaNonce, generateSolanaPaymentId, hashPermitWitnessTransferFrom, hashRequestId, hashSolanaDeposit, hashTvmPermitWitnessTransferFrom, hexToBytes, maskChainId, normalizeAddress, resolveTurnkeyAddresses, signPaymentRequest, type status, type status2, type status3, type status4, type status5, type status6, type status7, type status8, type status9 };
3713
+ export { $AuthorizationResult, $AwardAccepted, $AwardRequest, $AwardResponse, $AwardedPayment, $AwardedQuote, $BidAward, $CreateQuoteRequest, $DataIntegrityProof, $ErrorResponse, $FulfillmentConfirmation, $GetPaymentStatusResponse, type $OpenApiTs, $OwnedAsset, $PaymentBlockchainContext, $PaymentError, $PaymentRequest, $PaymentResponse, $PaymentSummary, $PaymentTimelineResponse, $PreparePaymentRequest, $PreparePaymentResponse, $Quote, $QuoteRequestAccepted, $QuoteRequestResponse, $QuoteRequestStatusResponse, $ResolvePaymentResponse, $SenderAuth, $SenderAuthMessageScheme, $SignedMessage, $TimelineError, $TimelineStep, $VerifiableCredential, $VerifiableCredentialAuth, ApiError, type ApiRequestOptions, type ApiResult, type AuthorizationResult, AuthorizationsService, type AuthorizePaymentData, type AuthorizePaymentResponse, type AwardAccepted, type AwardQuoteData, type AwardQuoteResponse, type AwardRequest, type AwardResponse, type AwardedPayment, type AwardedQuote, type BidAward, CancelError, CancelablePromise, type ChainDefaults, type CreateQuoteRequest, type CreateQuoteRequestData, type CreateQuoteRequestResponse, DEFAULT_FULFILLMENT_DEADLINE_SECONDS, DEFAULT_PAYMENT_QUOTE_DEADLINE_SECONDS, DEFAULT_QUOTE_DEADLINE_SECONDS, DEPOSIT_MESSAGE_SIZE, type DataIntegrityProof, type ErrorResponse, type FulfillmentConfirmation, type GetPaymentStatusData, type GetPaymentStatusResponse, type GetPaymentStatusResponse2, type GetPaymentTimelineData, type GetPaymentTimelineResponse, type GetQuoteRequestStatusData, type GetQuoteRequestStatusResponse, type HealthCheckResponse, HealthService, Interceptors, MAX_VALID_SLOT, type OnCancel, OpenAPI, type OpenAPIConfig, type OwnedAsset, PAYMENT_REQUEST_VERSION, PERMIT2_CONTRACT_ADDRESS, type PaymentBlockchainContext, type PaymentError, PaymentGatewayClient, type PaymentRequest, type PaymentResponse, type PaymentSummary, type PaymentTimelineResponse, PaymentsService, type PermitWitnessTransferFromParams, type PreparePaymentData, type PreparePaymentRequest, type PreparePaymentResponse, type PreparePaymentResponse2, type Quote, type QuoteRequestAccepted, type QuoteRequestResponse, type QuoteRequestStatusResponse, QuoteRequestsService, REPLAY_HORIZON_SECS, type ResolvePaymentData, type ResolvePaymentResponse, type ResolvePaymentResponse2, type SenderAuth, type SenderAuthMessageScheme, type SenderSignature, type SenderSigner, type SenderSignerOptions, type SignedMessage, type SolanaClusterUnixTimeReader, type SolanaDepositParams, type SolanaDepositPrehash, type SubmitPaymentData, type SubmitPaymentResponse, TOTAL_BUCKETS, type TimelineError, type TimelineStep, type TurnkeyConfig, TurnkeySenderSigner, type TvmPermitWitnessTransferFromParams, type VerifiableCredential, type VerifiableCredentialAuth, base58ToBytes, base58ToHex, bytesToHex, createPermitWitnessTransferFromPrehash, createSenderSigner, createSolanaDepositPrehash, createTvmPermitWitnessTransferFromPrehash, defaultGateway, type domain, encodeU64LE, type error_code, generateSolanaNonce, generateSolanaPaymentId, getErrorResponse, hashPermitWitnessTransferFrom, hashRequestId, hashSolanaDeposit, hashTvmPermitWitnessTransferFrom, hexToBytes, isApiError, maskChainId, normalizeAddress, resolveTurnkeyAddresses, signPaymentRequest, type status, type status2, type status3, type status4, type status5, type status6, type status7, type status8, type status9 };