@0to1pay/fulfillment-sdk 2.3.1 → 3.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/README.md
CHANGED
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
Node.js 22.20.0 or newer and a merchant PostgreSQL database. Install the SDKs from npm or use the verified tarballs in your merchant backend.
|
|
4
4
|
|
|
5
5
|
```sh
|
|
6
|
-
npm install @0to1pay/server-sdk@
|
|
6
|
+
npm install @0to1pay/server-sdk@3.1.0 @0to1pay/fulfillment-sdk@3.1.0
|
|
7
7
|
```
|
|
8
8
|
|
|
9
9
|
```sh
|
|
10
|
-
npm install ./0to1pay-server-sdk-
|
|
10
|
+
npm install ./0to1pay-server-sdk-3.1.0.tgz ./0to1pay-fulfillment-sdk-3.1.0.tgz
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
1. Register an HTTPS webhook endpoint for `fulfillment.requested`. Save the returned signing key ID and base64url secret in your backend's secret store. Configure `FulfillmentInbox` with the merchant ID, project ID and environment of the same project, and decode the signing secret with `Buffer.from(secret, 'base64url')`.
|
|
@@ -16,6 +16,6 @@ npm install ./0to1pay-server-sdk-2.3.1.tgz ./0to1pay-fulfillment-sdk-2.3.1.tgz
|
|
|
16
16
|
|
|
17
17
|
Apply each command at most once and keep entitlements for distinct orders independent. Return `unknown` when an external product update has an uncertain outcome, then reconcile that update before repeating it.
|
|
18
18
|
|
|
19
|
-
For direct USDC and USDT orders, the platform emits fulfillment commands after it verifies the buyer-approved transfer or records an authorized review. Integrate the [buyer approval steps in the public server SDK guide](https://www.npmjs.com/package/@0to1pay/server-sdk#buyer-approval-for-on-chain-checkout) before offering checkout.
|
|
19
|
+
For direct USDC and USDT orders, the platform emits fulfillment commands after it verifies the buyer-approved transfer or records an authorized review. Integrate the [buyer approval steps in the public server SDK guide](https://www.npmjs.com/package/@0to1pay/server-sdk#buyer-approval-for-on-chain-checkout) before offering checkout.
|
|
20
20
|
|
|
21
21
|
The SDK is available under the MIT license. See the `LICENSE` file included in the package.
|
|
@@ -5,7 +5,7 @@ info:
|
|
|
5
5
|
version: 1.0.0-design
|
|
6
6
|
description: 'Seller API for USDC and USDT payments on supported networks and verified order fulfillment.
|
|
7
7
|
Resource IDs are UUID strings. Merchant API keys are scoped to a merchant, project and environment.
|
|
8
|
-
|
|
8
|
+
Payments settle in USDC or USDT on supported networks.'
|
|
9
9
|
servers:
|
|
10
10
|
- url: /v1
|
|
11
11
|
description: Use the origin that serves the OpenAPI document.
|
|
@@ -30,8 +30,8 @@ paths:
|
|
|
30
30
|
tags: [Billing]
|
|
31
31
|
x-required-scope: billing:read
|
|
32
32
|
description: >
|
|
33
|
-
Plan prices, included API requests, and
|
|
34
|
-
|
|
33
|
+
Plan prices, included API requests, and available subscription collection options for USDC on Ethereum or Base and USDT on TRON.
|
|
34
|
+
Paid periods last 30 days.
|
|
35
35
|
responses:
|
|
36
36
|
'200':
|
|
37
37
|
description: Successful scoped billing response.
|
|
@@ -87,10 +87,10 @@ paths:
|
|
|
87
87
|
$ref: '#/components/responses/Unavailable'
|
|
88
88
|
post:
|
|
89
89
|
operationId: createBillingInvoice
|
|
90
|
-
summary: Create a
|
|
90
|
+
summary: Create a stablecoin subscription invoice and payer challenge
|
|
91
91
|
tags: [Billing]
|
|
92
92
|
x-required-scope: billing:write
|
|
93
|
-
description: Select an offered
|
|
93
|
+
description: Select an offered collection network with network_id, or omit it for the configured default. The selected network determines the six-decimal settlement asset. The invoice records the asset, amount and plan terms.
|
|
94
94
|
parameters:
|
|
95
95
|
- $ref: '#/components/parameters/IdempotencyKey'
|
|
96
96
|
requestBody:
|
|
@@ -293,7 +293,7 @@ paths:
|
|
|
293
293
|
description: >
|
|
294
294
|
Live checkout supports Ethereum native USDC and USDT, TRON USDT, and Base native USDC.
|
|
295
295
|
Only configured networks in the caller's environment are returned.
|
|
296
|
-
|
|
296
|
+
Sandbox keys can discover test USDC on Ethereum Sepolia and Base Sepolia and test USDT on TRON Nile when enabled.
|
|
297
297
|
tags: [Connections]
|
|
298
298
|
x-required-scope: payments:read
|
|
299
299
|
responses:
|
|
@@ -499,7 +499,7 @@ paths:
|
|
|
499
499
|
summary: Read the confirmed funds received for a payment
|
|
500
500
|
tags: [Payments]
|
|
501
501
|
x-required-scope: payments:read
|
|
502
|
-
description: Returns current finalized on-chain funds linked to this payment's bound quote recipients, grouped by exact token and network. Confirmed reversals, refunds, and dispute adjustments are deducted. These are deposits to the order's recipients and do not establish payer identity or eligibility for fulfillment.
|
|
502
|
+
description: Returns current finalized on-chain funds linked to this payment's bound quote recipients, grouped by exact token and network. Confirmed reversals, refunds, and dispute adjustments are deducted. These are deposits to the order's recipients and do not establish payer identity or eligibility for fulfillment. Payments without canonical receipt data are reported as unavailable.
|
|
503
503
|
responses:
|
|
504
504
|
'200':
|
|
505
505
|
description: Successful scoped receipt response.
|
|
@@ -1024,7 +1024,7 @@ paths:
|
|
|
1024
1024
|
/connections:
|
|
1025
1025
|
get:
|
|
1026
1026
|
operationId: listConnections
|
|
1027
|
-
summary: List chain connections
|
|
1027
|
+
summary: List chain connections
|
|
1028
1028
|
tags:
|
|
1029
1029
|
- Connections
|
|
1030
1030
|
x-required-scope: connections:read
|
|
@@ -1708,32 +1708,31 @@ components:
|
|
|
1708
1708
|
pattern: '^0x[0-9a-fA-F]{64}$'
|
|
1709
1709
|
ChainSelectorId:
|
|
1710
1710
|
type: integer
|
|
1711
|
-
enum: [1,
|
|
1712
|
-
description: EVM or TRON chain
|
|
1711
|
+
enum: [1, 8453, 84532, 11155111, 31337, 31339, 728126428, 3448148188, 900003]
|
|
1712
|
+
description: Supported EVM or TRON chain selector. Use network_id for the network reference.
|
|
1713
1713
|
ChainNetworkId:
|
|
1714
1714
|
type: string
|
|
1715
|
-
pattern: '^(eip155:
|
|
1715
|
+
pattern: '^(eip155:(1|8453|84532|11155111|31337|31339)|tron:(728126428|3448148188|900003|0x2b6653dc))$'
|
|
1716
1716
|
description: Decimal TRON identifiers are emitted. The hexadecimal TRON mainnet alias is accepted on connection creation.
|
|
1717
1717
|
ChainFamily:
|
|
1718
1718
|
type: string
|
|
1719
|
-
enum: [evm,
|
|
1719
|
+
enum: [evm, tron]
|
|
1720
1720
|
StableDenomination:
|
|
1721
1721
|
type: string
|
|
1722
1722
|
enum: ['stable:USDC', 'stable:USDT']
|
|
1723
1723
|
description: Order denomination, expressed in six decimal places.
|
|
1724
1724
|
ChainTokenSymbol:
|
|
1725
1725
|
type: string
|
|
1726
|
-
enum: [USDC, USDT
|
|
1727
|
-
description: Display ticker. USDT0 is the ASCII display spelling of USD₮0.
|
|
1726
|
+
enum: [USDC, USDT]
|
|
1728
1727
|
ChainAssetRepresentation:
|
|
1729
1728
|
type: string
|
|
1730
|
-
enum: [native,
|
|
1731
|
-
description:
|
|
1729
|
+
enum: [native, fixture]
|
|
1730
|
+
description: Native tokens are used for live checkout.
|
|
1732
1731
|
ChainAddress:
|
|
1733
1732
|
oneOf:
|
|
1734
1733
|
- $ref: '#/components/schemas/EvmAddress'
|
|
1735
1734
|
- type: string
|
|
1736
|
-
pattern: '^[1-9A-HJ-NP-Za-km-z]{
|
|
1735
|
+
pattern: '^T[1-9A-HJ-NP-Za-km-z]{33}$'
|
|
1737
1736
|
ChainQuoteTerms:
|
|
1738
1737
|
type: object
|
|
1739
1738
|
additionalProperties: false
|
|
@@ -1753,12 +1752,10 @@ components:
|
|
|
1753
1752
|
$ref: '#/components/schemas/ChainAssetRepresentation'
|
|
1754
1753
|
token_address:
|
|
1755
1754
|
$ref: '#/components/schemas/ChainAddress'
|
|
1756
|
-
recipient_owner:
|
|
1757
|
-
$ref: '#/components/schemas/ChainAddress'
|
|
1758
1755
|
start_block:
|
|
1759
1756
|
type: string
|
|
1760
1757
|
pattern: '^[1-9][0-9]{0,18}$'
|
|
1761
|
-
description: First block
|
|
1758
|
+
description: First block eligible for observation.
|
|
1762
1759
|
anchor_hash:
|
|
1763
1760
|
$ref: '#/components/schemas/EvmHash'
|
|
1764
1761
|
starts_at_epoch:
|
|
@@ -1827,7 +1824,7 @@ components:
|
|
|
1827
1824
|
properties:
|
|
1828
1825
|
denomination:
|
|
1829
1826
|
$ref: '#/components/schemas/StableDenomination'
|
|
1830
|
-
description: Determines the denomination for recipient registration. Omission selects USDC on EVM
|
|
1827
|
+
description: Determines the denomination for recipient registration. Omission selects USDC on EVM or USDT on TRON. EVM recipients are shared before a quote is assigned.
|
|
1831
1828
|
recipients:
|
|
1832
1829
|
type: array
|
|
1833
1830
|
minItems: 1
|
|
@@ -1839,12 +1836,12 @@ components:
|
|
|
1839
1836
|
properties:
|
|
1840
1837
|
address:
|
|
1841
1838
|
$ref: '#/components/schemas/ChainAddress'
|
|
1842
|
-
description: Seller wallet address.
|
|
1839
|
+
description: Seller wallet address.
|
|
1843
1840
|
signature:
|
|
1844
1841
|
type: string
|
|
1845
1842
|
writeOnly: true
|
|
1846
|
-
pattern: '^0x[0-9a-fA-F]{
|
|
1847
|
-
description: Scoped EIP-191 proof on EVM
|
|
1843
|
+
pattern: '^0x[0-9a-fA-F]{130}$'
|
|
1844
|
+
description: Scoped EIP-191 proof on EVM or TIP-191 personal proof on TRON, encoded as hex.
|
|
1848
1845
|
ChainRecipients:
|
|
1849
1846
|
type: object
|
|
1850
1847
|
additionalProperties: false
|
|
@@ -1859,10 +1856,9 @@ components:
|
|
|
1859
1856
|
$ref: '#/components/schemas/ChainNetworkId'
|
|
1860
1857
|
denomination:
|
|
1861
1858
|
$ref: '#/components/schemas/StableDenomination'
|
|
1862
|
-
description: Solana denomination for these mint-specific addresses.
|
|
1863
1859
|
addresses:
|
|
1864
1860
|
type: array
|
|
1865
|
-
description:
|
|
1861
|
+
description: Registered wallet addresses.
|
|
1866
1862
|
items:
|
|
1867
1863
|
$ref: '#/components/schemas/ChainAddress'
|
|
1868
1864
|
Money:
|
|
@@ -1870,7 +1866,7 @@ components:
|
|
|
1870
1866
|
properties:
|
|
1871
1867
|
asset:
|
|
1872
1868
|
type: string
|
|
1873
|
-
description: A stablecoin denomination or exact registered chain asset.
|
|
1869
|
+
description: A stablecoin denomination or exact registered chain asset.
|
|
1874
1870
|
minLength: 1
|
|
1875
1871
|
maxLength: 160
|
|
1876
1872
|
amount_atomic:
|
|
@@ -2420,10 +2416,6 @@ components:
|
|
|
2420
2416
|
type:
|
|
2421
2417
|
type: string
|
|
2422
2418
|
enum:
|
|
2423
|
-
- checkout_session
|
|
2424
|
-
- payment_intent
|
|
2425
|
-
- paypal_order
|
|
2426
|
-
- paypal_capture
|
|
2427
2419
|
- chain_transaction
|
|
2428
2420
|
id:
|
|
2429
2421
|
type: string
|
|
@@ -2468,8 +2460,6 @@ components:
|
|
|
2468
2460
|
$ref: '#/components/schemas/ChainTokenSymbol'
|
|
2469
2461
|
representation:
|
|
2470
2462
|
$ref: '#/components/schemas/ChainAssetRepresentation'
|
|
2471
|
-
recipient_owner:
|
|
2472
|
-
$ref: '#/components/schemas/ChainAddress'
|
|
2473
2463
|
starts_at_epoch:
|
|
2474
2464
|
type: integer
|
|
2475
2465
|
minimum: 1
|
|
@@ -2630,7 +2620,7 @@ components:
|
|
|
2630
2620
|
- resource_version
|
|
2631
2621
|
additionalProperties: false
|
|
2632
2622
|
description: A transfer instruction identifies the registered asset and assigned recipient for an unfinished quote.
|
|
2633
|
-
The Worker verifies funds from finalized chain evidence.
|
|
2623
|
+
The Worker verifies funds from finalized chain evidence. The transfer instruction is available while the quote can accept payment.
|
|
2634
2624
|
allOf:
|
|
2635
2625
|
- if:
|
|
2636
2626
|
properties:
|
|
@@ -2743,7 +2733,7 @@ components:
|
|
|
2743
2733
|
type: object
|
|
2744
2734
|
properties:
|
|
2745
2735
|
asset:
|
|
2746
|
-
|
|
2736
|
+
$ref: '#/components/schemas/StableDenomination'
|
|
2747
2737
|
amount_atomic:
|
|
2748
2738
|
type: string
|
|
2749
2739
|
pattern: '^(0|[1-9][0-9]{0,19})$'
|
|
@@ -2760,6 +2750,12 @@ components:
|
|
|
2760
2750
|
$ref: '#/components/schemas/Environment'
|
|
2761
2751
|
price:
|
|
2762
2752
|
$ref: '#/components/schemas/BillingPrice'
|
|
2753
|
+
description: The plan's reference price in USDC.
|
|
2754
|
+
prices:
|
|
2755
|
+
type: array
|
|
2756
|
+
description: Fixed nominal prices in each supported subscription asset. Availability depends on collection_options.
|
|
2757
|
+
items:
|
|
2758
|
+
$ref: '#/components/schemas/BillingPrice'
|
|
2763
2759
|
request_limit:
|
|
2764
2760
|
type: integer
|
|
2765
2761
|
minimum: 1
|
|
@@ -2767,7 +2763,7 @@ components:
|
|
|
2767
2763
|
type: [integer, 'null']
|
|
2768
2764
|
enum: [30, null]
|
|
2769
2765
|
description: The free test plan uses UTC calendar months.
|
|
2770
|
-
required: [plan_id, environment, price, request_limit, period_days]
|
|
2766
|
+
required: [plan_id, environment, price, prices, request_limit, period_days]
|
|
2771
2767
|
additionalProperties: false
|
|
2772
2768
|
BillingPlans:
|
|
2773
2769
|
type: object
|
|
@@ -2778,7 +2774,7 @@ components:
|
|
|
2778
2774
|
$ref: '#/components/schemas/BillingPlan'
|
|
2779
2775
|
collection_options:
|
|
2780
2776
|
type: array
|
|
2781
|
-
description: Currently offered
|
|
2777
|
+
description: Currently offered collection networks and settlement assets with available recipients.
|
|
2782
2778
|
items:
|
|
2783
2779
|
$ref: '#/components/schemas/BillingCollectionOption'
|
|
2784
2780
|
required: [plans]
|
|
@@ -2791,11 +2787,14 @@ components:
|
|
|
2791
2787
|
network_name:
|
|
2792
2788
|
type: string
|
|
2793
2789
|
family:
|
|
2794
|
-
|
|
2795
|
-
|
|
2790
|
+
$ref: '#/components/schemas/ChainFamily'
|
|
2791
|
+
asset:
|
|
2792
|
+
$ref: '#/components/schemas/StableDenomination'
|
|
2793
|
+
scale:
|
|
2794
|
+
const: 6
|
|
2796
2795
|
is_default:
|
|
2797
2796
|
type: boolean
|
|
2798
|
-
required: [network_id, network_name, family, is_default]
|
|
2797
|
+
required: [network_id, network_name, family, asset, scale, is_default]
|
|
2799
2798
|
additionalProperties: false
|
|
2800
2799
|
BillingSubscription:
|
|
2801
2800
|
type: object
|
|
@@ -2834,7 +2833,7 @@ components:
|
|
|
2834
2833
|
$ref: '#/components/schemas/ChainCheckoutSessionRef'
|
|
2835
2834
|
network_id:
|
|
2836
2835
|
$ref: '#/components/schemas/ChainNetworkId'
|
|
2837
|
-
description:
|
|
2836
|
+
description: Collection network offered in BillingPlans. Ethereum and Base settle in USDC, TRON settles in USDT. The default connection is used when omitted.
|
|
2838
2837
|
required: [plan_id, payer_address, checkout_session_ref]
|
|
2839
2838
|
additionalProperties: false
|
|
2840
2839
|
BillingInvoice:
|
|
@@ -2851,6 +2850,8 @@ components:
|
|
|
2851
2850
|
type: string
|
|
2852
2851
|
enum: [pending, reconciling, active, scheduled, expired, revoked]
|
|
2853
2852
|
description: Reconciling means a wallet-authorized invoice still awaits final reconciliation after transaction submission or quote expiry. Resume that invoice and wait before paying another one.
|
|
2853
|
+
price:
|
|
2854
|
+
$ref: '#/components/schemas/BillingPrice'
|
|
2854
2855
|
quote:
|
|
2855
2856
|
$ref: '#/components/schemas/Quote'
|
|
2856
2857
|
intent:
|
|
@@ -2861,7 +2862,7 @@ components:
|
|
|
2861
2862
|
period_end:
|
|
2862
2863
|
type: [string, 'null']
|
|
2863
2864
|
format: date-time
|
|
2864
|
-
required: [invoice_id, plan_id, environment, status, quote, intent, period_start, period_end]
|
|
2865
|
+
required: [invoice_id, plan_id, environment, status, price, quote, intent, period_start, period_end]
|
|
2865
2866
|
additionalProperties: false
|
|
2866
2867
|
BillingInvoiceList:
|
|
2867
2868
|
type: object
|
|
@@ -2905,12 +2906,12 @@ components:
|
|
|
2905
2906
|
description: Stable opaque reference assigned by the merchant server to the authenticated buyer checkout.
|
|
2906
2907
|
ChainIntentSignature:
|
|
2907
2908
|
type: string
|
|
2908
|
-
pattern: '^0x
|
|
2909
|
-
description:
|
|
2909
|
+
pattern: '^0x[0-9A-Fa-f]{130}$'
|
|
2910
|
+
description: A 0x-prefixed 65-byte wallet signature.
|
|
2910
2911
|
ChainIntentTransactionId:
|
|
2911
2912
|
type: string
|
|
2912
|
-
pattern: '^(0x[0-9A-Fa-f]{64}
|
|
2913
|
-
description: EVM and TRON IDs are canonicalized to lowercase 0x-prefixed hex. TRON accepts bare hex.
|
|
2913
|
+
pattern: '^(0x)?[0-9A-Fa-f]{64}$'
|
|
2914
|
+
description: EVM and TRON IDs are canonicalized to lowercase 0x-prefixed hex. TRON accepts bare hex.
|
|
2914
2915
|
CreateChainIntent:
|
|
2915
2916
|
type: object
|
|
2916
2917
|
properties:
|
|
@@ -3144,10 +3145,7 @@ components:
|
|
|
3144
3145
|
provider:
|
|
3145
3146
|
type: string
|
|
3146
3147
|
enum:
|
|
3147
|
-
- stripe
|
|
3148
|
-
- paypal
|
|
3149
3148
|
- evm
|
|
3150
|
-
- solana
|
|
3151
3149
|
- tron
|
|
3152
3150
|
chain_id:
|
|
3153
3151
|
$ref: '#/components/schemas/ChainSelectorId'
|
|
@@ -3186,9 +3184,6 @@ components:
|
|
|
3186
3184
|
format: uri
|
|
3187
3185
|
minItems: 0
|
|
3188
3186
|
maxItems: 1000
|
|
3189
|
-
webhook_url:
|
|
3190
|
-
description: Retained for historical reads.
|
|
3191
|
-
type: 'null'
|
|
3192
3187
|
validated_at:
|
|
3193
3188
|
anyOf:
|
|
3194
3189
|
- type: string
|
|
@@ -3218,13 +3213,12 @@ components:
|
|
|
3218
3213
|
- status
|
|
3219
3214
|
- capabilities
|
|
3220
3215
|
- return_origins
|
|
3221
|
-
- webhook_url
|
|
3222
3216
|
- validated_at
|
|
3223
3217
|
- created_at
|
|
3224
3218
|
- updated_at
|
|
3225
3219
|
- resource_version
|
|
3226
3220
|
additionalProperties: false
|
|
3227
|
-
description: Ready chain connections can be used for new payments.
|
|
3221
|
+
description: Ready chain connections can be used for new payments.
|
|
3228
3222
|
allOf:
|
|
3229
3223
|
- if:
|
|
3230
3224
|
properties:
|
|
@@ -198,6 +198,5 @@ export declare class ZeroToOnePayClient {
|
|
|
198
198
|
})>;
|
|
199
199
|
}
|
|
200
200
|
export { recipientProofMessage, type RecipientProof } from './recipient-proof.js';
|
|
201
|
-
export { solanaRecipientProofMessage } from './solana-recipient-proof.js';
|
|
202
201
|
export { tronRecipientProofMessage } from './tron-recipient-proof.js';
|
|
203
202
|
export { ZeroToOnePayClient as PaymentToFulfillmentClient, ZeroToOnePayContractError as PaymentToFulfillmentContractError, ZeroToOnePayError as PaymentToFulfillmentError, type ZeroToOnePayClientOptions as PaymentToFulfillmentClientOptions, };
|
|
@@ -12,7 +12,7 @@ export interface paths {
|
|
|
12
12
|
};
|
|
13
13
|
/**
|
|
14
14
|
* List request plans and subscription prices
|
|
15
|
-
* @description Plan prices, included API requests, and
|
|
15
|
+
* @description Plan prices, included API requests, and available subscription collection options for USDC on Ethereum or Base and USDT on TRON. Paid periods last 30 days.
|
|
16
16
|
*/
|
|
17
17
|
get: operations["listBillingPlans"];
|
|
18
18
|
put?: never;
|
|
@@ -57,8 +57,8 @@ export interface paths {
|
|
|
57
57
|
get: operations["listBillingInvoices"];
|
|
58
58
|
put?: never;
|
|
59
59
|
/**
|
|
60
|
-
* Create a
|
|
61
|
-
* @description Select an offered
|
|
60
|
+
* Create a stablecoin subscription invoice and payer challenge
|
|
61
|
+
* @description Select an offered collection network with network_id, or omit it for the configured default. The selected network determines the six-decimal settlement asset. The invoice records the asset, amount and plan terms.
|
|
62
62
|
*/
|
|
63
63
|
post: operations["createBillingInvoice"];
|
|
64
64
|
delete?: never;
|
|
@@ -182,7 +182,7 @@ export interface paths {
|
|
|
182
182
|
};
|
|
183
183
|
/**
|
|
184
184
|
* List supported USDC and USDT deployments on configured networks
|
|
185
|
-
* @description Live checkout supports Ethereum native USDC and USDT, TRON USDT, and Base native USDC. Only configured networks in the caller's environment are returned.
|
|
185
|
+
* @description Live checkout supports Ethereum native USDC and USDT, TRON USDT, and Base native USDC. Only configured networks in the caller's environment are returned. Sandbox keys can discover test USDC on Ethereum Sepolia and Base Sepolia and test USDT on TRON Nile when enabled.
|
|
186
186
|
*/
|
|
187
187
|
get: operations["listChainAssets"];
|
|
188
188
|
put?: never;
|
|
@@ -283,7 +283,7 @@ export interface paths {
|
|
|
283
283
|
};
|
|
284
284
|
/**
|
|
285
285
|
* Read the confirmed funds received for a payment
|
|
286
|
-
* @description Returns current finalized on-chain funds linked to this payment's bound quote recipients, grouped by exact token and network. Confirmed reversals, refunds, and dispute adjustments are deducted. These are deposits to the order's recipients and do not establish payer identity or eligibility for fulfillment.
|
|
286
|
+
* @description Returns current finalized on-chain funds linked to this payment's bound quote recipients, grouped by exact token and network. Confirmed reversals, refunds, and dispute adjustments are deducted. These are deposits to the order's recipients and do not establish payer identity or eligibility for fulfillment. Payments without canonical receipt data are reported as unavailable.
|
|
287
287
|
*/
|
|
288
288
|
get: operations["getPaymentReceipt"];
|
|
289
289
|
put?: never;
|
|
@@ -537,7 +537,7 @@ export interface paths {
|
|
|
537
537
|
path?: never;
|
|
538
538
|
cookie?: never;
|
|
539
539
|
};
|
|
540
|
-
/** List chain connections
|
|
540
|
+
/** List chain connections */
|
|
541
541
|
get: operations["listConnections"];
|
|
542
542
|
put?: never;
|
|
543
543
|
post?: never;
|
|
@@ -784,29 +784,26 @@ export interface components {
|
|
|
784
784
|
EvmAddress: string;
|
|
785
785
|
EvmHash: string;
|
|
786
786
|
/**
|
|
787
|
-
* @description EVM or TRON chain
|
|
787
|
+
* @description Supported EVM or TRON chain selector. Use network_id for the network reference.
|
|
788
788
|
* @enum {integer}
|
|
789
789
|
*/
|
|
790
|
-
ChainSelectorId: 1 |
|
|
790
|
+
ChainSelectorId: 1 | 8453 | 84532 | 11155111 | 31337 | 31339 | 728126428 | 3448148188 | 900003;
|
|
791
791
|
/** @description Decimal TRON identifiers are emitted. The hexadecimal TRON mainnet alias is accepted on connection creation. */
|
|
792
792
|
ChainNetworkId: string;
|
|
793
793
|
/** @enum {string} */
|
|
794
|
-
ChainFamily: "evm" | "
|
|
794
|
+
ChainFamily: "evm" | "tron";
|
|
795
795
|
/**
|
|
796
796
|
* @description Order denomination, expressed in six decimal places.
|
|
797
797
|
* @enum {string}
|
|
798
798
|
*/
|
|
799
799
|
StableDenomination: "stable:USDC" | "stable:USDT";
|
|
800
|
+
/** @enum {string} */
|
|
801
|
+
ChainTokenSymbol: "USDC" | "USDT";
|
|
800
802
|
/**
|
|
801
|
-
* @description
|
|
802
|
-
* @enum {string}
|
|
803
|
-
*/
|
|
804
|
-
ChainTokenSymbol: "USDC" | "USDT" | "USDT0";
|
|
805
|
-
/**
|
|
806
|
-
* @description Token deployment type. Historical quotes can include USDT0 or a Standard Bridge token. New live quotes use native tokens.
|
|
803
|
+
* @description Native tokens are used for live checkout.
|
|
807
804
|
* @enum {string}
|
|
808
805
|
*/
|
|
809
|
-
ChainAssetRepresentation: "native" | "
|
|
806
|
+
ChainAssetRepresentation: "native" | "fixture";
|
|
810
807
|
ChainAddress: components["schemas"]["EvmAddress"] | string;
|
|
811
808
|
ChainQuoteTerms: {
|
|
812
809
|
chain_id: components["schemas"]["ChainSelectorId"];
|
|
@@ -816,8 +813,7 @@ export interface components {
|
|
|
816
813
|
symbol?: components["schemas"]["ChainTokenSymbol"];
|
|
817
814
|
representation?: components["schemas"]["ChainAssetRepresentation"];
|
|
818
815
|
token_address: components["schemas"]["ChainAddress"];
|
|
819
|
-
|
|
820
|
-
/** @description First block or slot eligible for observation. */
|
|
816
|
+
/** @description First block eligible for observation. */
|
|
821
817
|
start_block: string;
|
|
822
818
|
anchor_hash: components["schemas"]["EvmHash"];
|
|
823
819
|
/** @description Earliest eligible transfer time, as a UTC Unix timestamp in seconds. */
|
|
@@ -847,12 +843,12 @@ export interface components {
|
|
|
847
843
|
network_id?: components["schemas"]["ChainNetworkId"];
|
|
848
844
|
} & (unknown | unknown);
|
|
849
845
|
RegisterChainRecipients: {
|
|
850
|
-
/** @description Determines the denomination for recipient registration. Omission selects USDC on EVM
|
|
846
|
+
/** @description Determines the denomination for recipient registration. Omission selects USDC on EVM or USDT on TRON. EVM recipients are shared before a quote is assigned. */
|
|
851
847
|
denomination?: components["schemas"]["StableDenomination"];
|
|
852
848
|
recipients: {
|
|
853
|
-
/** @description Seller wallet address.
|
|
849
|
+
/** @description Seller wallet address. */
|
|
854
850
|
address: components["schemas"]["ChainAddress"];
|
|
855
|
-
/** @description Scoped EIP-191 proof on EVM
|
|
851
|
+
/** @description Scoped EIP-191 proof on EVM or TIP-191 personal proof on TRON, encoded as hex. */
|
|
856
852
|
signature: string;
|
|
857
853
|
}[];
|
|
858
854
|
};
|
|
@@ -861,14 +857,13 @@ export interface components {
|
|
|
861
857
|
connection_id: string;
|
|
862
858
|
chain_id: components["schemas"]["ChainSelectorId"];
|
|
863
859
|
network_id?: components["schemas"]["ChainNetworkId"];
|
|
864
|
-
/** @description Solana denomination for these mint-specific addresses. */
|
|
865
860
|
denomination?: components["schemas"]["StableDenomination"];
|
|
866
|
-
/** @description
|
|
861
|
+
/** @description Registered wallet addresses. */
|
|
867
862
|
addresses: components["schemas"]["ChainAddress"][];
|
|
868
863
|
};
|
|
869
864
|
/** @description The asset registry confirms scale. USDC 10.00 is amount_atomic="10000000", scale=6. */
|
|
870
865
|
Money: {
|
|
871
|
-
/** @description A stablecoin denomination or exact registered chain asset.
|
|
866
|
+
/** @description A stablecoin denomination or exact registered chain asset. */
|
|
872
867
|
asset: string;
|
|
873
868
|
/** @description Positive integer in the asset minor unit; never a float. */
|
|
874
869
|
amount_atomic: string;
|
|
@@ -1061,7 +1056,7 @@ export interface components {
|
|
|
1061
1056
|
};
|
|
1062
1057
|
ExternalResource: {
|
|
1063
1058
|
/** @enum {string} */
|
|
1064
|
-
type: "
|
|
1059
|
+
type: "chain_transaction";
|
|
1065
1060
|
id: string;
|
|
1066
1061
|
};
|
|
1067
1062
|
CreateAttempt: {
|
|
@@ -1086,7 +1081,6 @@ export interface components {
|
|
|
1086
1081
|
denomination?: components["schemas"]["StableDenomination"];
|
|
1087
1082
|
symbol?: components["schemas"]["ChainTokenSymbol"];
|
|
1088
1083
|
representation?: components["schemas"]["ChainAssetRepresentation"];
|
|
1089
|
-
recipient_owner?: components["schemas"]["ChainAddress"];
|
|
1090
1084
|
/** @description Earliest eligible transfer time, as a UTC Unix timestamp in seconds. */
|
|
1091
1085
|
starts_at_epoch: number;
|
|
1092
1086
|
/** Format: date-time */
|
|
@@ -1113,7 +1107,7 @@ export interface components {
|
|
|
1113
1107
|
registered_at: string;
|
|
1114
1108
|
verified_at: string | null;
|
|
1115
1109
|
};
|
|
1116
|
-
/** @description A transfer instruction identifies the registered asset and assigned recipient for an unfinished quote. The Worker verifies funds from finalized chain evidence.
|
|
1110
|
+
/** @description A transfer instruction identifies the registered asset and assigned recipient for an unfinished quote. The Worker verifies funds from finalized chain evidence. The transfer instruction is available while the quote can accept payment. */
|
|
1117
1111
|
Attempt: {
|
|
1118
1112
|
/** Format: uuid */
|
|
1119
1113
|
merchant_id: string;
|
|
@@ -1175,8 +1169,7 @@ export interface components {
|
|
|
1175
1169
|
/** @enum {string} */
|
|
1176
1170
|
PaidBillingPlanId: "starter" | "growth" | "scale";
|
|
1177
1171
|
BillingPrice: {
|
|
1178
|
-
|
|
1179
|
-
asset: "stable:USDC";
|
|
1172
|
+
asset: components["schemas"]["StableDenomination"];
|
|
1180
1173
|
amount_atomic: string;
|
|
1181
1174
|
/** @constant */
|
|
1182
1175
|
scale: 6;
|
|
@@ -1184,7 +1177,10 @@ export interface components {
|
|
|
1184
1177
|
BillingPlan: {
|
|
1185
1178
|
plan_id: components["schemas"]["BillingPlanId"];
|
|
1186
1179
|
environment: components["schemas"]["Environment"];
|
|
1180
|
+
/** @description The plan's reference price in USDC. */
|
|
1187
1181
|
price: components["schemas"]["BillingPrice"];
|
|
1182
|
+
/** @description Fixed nominal prices in each supported subscription asset. Availability depends on collection_options. */
|
|
1183
|
+
prices: components["schemas"]["BillingPrice"][];
|
|
1188
1184
|
request_limit: number;
|
|
1189
1185
|
/**
|
|
1190
1186
|
* @description The free test plan uses UTC calendar months.
|
|
@@ -1194,14 +1190,16 @@ export interface components {
|
|
|
1194
1190
|
};
|
|
1195
1191
|
BillingPlans: {
|
|
1196
1192
|
plans: components["schemas"]["BillingPlan"][];
|
|
1197
|
-
/** @description Currently offered
|
|
1193
|
+
/** @description Currently offered collection networks and settlement assets with available recipients. */
|
|
1198
1194
|
collection_options?: components["schemas"]["BillingCollectionOption"][];
|
|
1199
1195
|
};
|
|
1200
1196
|
BillingCollectionOption: {
|
|
1201
1197
|
network_id: components["schemas"]["ChainNetworkId"];
|
|
1202
1198
|
network_name: string;
|
|
1203
|
-
|
|
1204
|
-
|
|
1199
|
+
family: components["schemas"]["ChainFamily"];
|
|
1200
|
+
asset: components["schemas"]["StableDenomination"];
|
|
1201
|
+
/** @constant */
|
|
1202
|
+
scale: 6;
|
|
1205
1203
|
is_default: boolean;
|
|
1206
1204
|
};
|
|
1207
1205
|
BillingSubscription: {
|
|
@@ -1220,7 +1218,7 @@ export interface components {
|
|
|
1220
1218
|
plan_id: components["schemas"]["PaidBillingPlanId"];
|
|
1221
1219
|
payer_address: components["schemas"]["ChainAddress"];
|
|
1222
1220
|
checkout_session_ref: components["schemas"]["ChainCheckoutSessionRef"];
|
|
1223
|
-
/** @description
|
|
1221
|
+
/** @description Collection network offered in BillingPlans. Ethereum and Base settle in USDC, TRON settles in USDT. The default connection is used when omitted. */
|
|
1224
1222
|
network_id?: components["schemas"]["ChainNetworkId"];
|
|
1225
1223
|
};
|
|
1226
1224
|
BillingInvoice: {
|
|
@@ -1233,6 +1231,7 @@ export interface components {
|
|
|
1233
1231
|
* @enum {string}
|
|
1234
1232
|
*/
|
|
1235
1233
|
status: "pending" | "reconciling" | "active" | "scheduled" | "expired" | "revoked";
|
|
1234
|
+
price: components["schemas"]["BillingPrice"];
|
|
1236
1235
|
quote: components["schemas"]["Quote"];
|
|
1237
1236
|
intent: components["schemas"]["ChainIntent"];
|
|
1238
1237
|
/** Format: date-time */
|
|
@@ -1257,9 +1256,9 @@ export interface components {
|
|
|
1257
1256
|
};
|
|
1258
1257
|
/** @description Stable opaque reference assigned by the merchant server to the authenticated buyer checkout. */
|
|
1259
1258
|
ChainCheckoutSessionRef: string;
|
|
1260
|
-
/** @description
|
|
1259
|
+
/** @description A 0x-prefixed 65-byte wallet signature. */
|
|
1261
1260
|
ChainIntentSignature: string;
|
|
1262
|
-
/** @description EVM and TRON IDs are canonicalized to lowercase 0x-prefixed hex. TRON accepts bare hex.
|
|
1261
|
+
/** @description EVM and TRON IDs are canonicalized to lowercase 0x-prefixed hex. TRON accepts bare hex. */
|
|
1263
1262
|
ChainIntentTransactionId: string;
|
|
1264
1263
|
CreateChainIntent: {
|
|
1265
1264
|
checkout_session_ref: components["schemas"]["ChainCheckoutSessionRef"];
|
|
@@ -1343,7 +1342,7 @@ export interface components {
|
|
|
1343
1342
|
enforce_expiry: boolean;
|
|
1344
1343
|
binding_methods: string[];
|
|
1345
1344
|
};
|
|
1346
|
-
/** @description Ready chain connections can be used for new payments.
|
|
1345
|
+
/** @description Ready chain connections can be used for new payments. */
|
|
1347
1346
|
Connection: {
|
|
1348
1347
|
/** Format: uuid */
|
|
1349
1348
|
merchant_id: string;
|
|
@@ -1353,7 +1352,7 @@ export interface components {
|
|
|
1353
1352
|
/** Format: uuid */
|
|
1354
1353
|
connection_id: string;
|
|
1355
1354
|
/** @enum {string} */
|
|
1356
|
-
provider: "
|
|
1355
|
+
provider: "evm" | "tron";
|
|
1357
1356
|
chain_id?: components["schemas"]["ChainSelectorId"];
|
|
1358
1357
|
network_id?: components["schemas"]["ChainNetworkId"];
|
|
1359
1358
|
network_name?: string;
|
|
@@ -1367,8 +1366,6 @@ export interface components {
|
|
|
1367
1366
|
status: "unvalidated" | "ready" | "disabled" | "error";
|
|
1368
1367
|
capabilities: components["schemas"]["Capabilities"];
|
|
1369
1368
|
return_origins: string[];
|
|
1370
|
-
/** @description Retained for historical reads. */
|
|
1371
|
-
webhook_url: null;
|
|
1372
1369
|
validated_at: string | null;
|
|
1373
1370
|
/** Format: date-time */
|
|
1374
1371
|
created_at: string;
|
package/package.json
CHANGED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { RecipientProof } from './recipient-proof.js';
|
|
2
|
-
/** Return the exact UTF-8 message a recipient's Solana wallet signs via signMessage. */
|
|
3
|
-
export declare function solanaRecipientProofMessage(input: RecipientProof, denomination?: 'stable:USDC' | 'stable:USDT'): string;
|