@peable.to/contracts 5.4.0 → 5.6.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/cjs/resources/checkout/checkoutSessions.js +4 -0
- package/dist/cjs/resources/core/customers.js +14 -0
- package/dist/cjs/resources/payments/social.js +1 -1
- package/dist/cjs/vocabulary/errors.js +1 -0
- package/dist/cjs/vocabulary/index.js +1 -0
- package/dist/cjs/vocabulary/payments.js +7 -3
- package/dist/cjs/vocabulary/receiveTree.js +44 -0
- package/dist/esm/resources/checkout/checkoutSessions.js +4 -0
- package/dist/esm/resources/core/customers.js +14 -0
- package/dist/esm/resources/payments/social.js +1 -1
- package/dist/esm/vocabulary/errors.js +1 -0
- package/dist/esm/vocabulary/index.js +1 -0
- package/dist/esm/vocabulary/payments.js +7 -3
- package/dist/esm/vocabulary/receiveTree.js +41 -0
- package/dist/types/resources/checkout/checkoutSessions.d.ts +34 -0
- package/dist/types/resources/checkout/index.d.ts +17 -0
- package/dist/types/resources/core/customers.d.ts +170 -0
- package/dist/types/resources/core/index.d.ts +119 -0
- package/dist/types/resources/payments/index.d.ts +11 -1
- package/dist/types/resources/payments/paymentIntents.d.ts +10 -0
- package/dist/types/resources/payments/social.d.ts +1 -1
- package/dist/types/resources/payments/testHelpers.d.ts +1 -0
- package/dist/types/vocabulary/errors.d.ts +1 -0
- package/dist/types/vocabulary/index.d.ts +1 -0
- package/dist/types/vocabulary/payments.d.ts +7 -4
- package/dist/types/vocabulary/receiveTree.d.ts +41 -0
- package/package.json +1 -1
|
@@ -474,6 +474,10 @@ exports.confirmCheckoutSessionPublicParams = zod_1.z
|
|
|
474
474
|
.enum(['card', 'faircoin'])
|
|
475
475
|
.optional()
|
|
476
476
|
.describe("How the payer pays: one of the session's `payment_method_types`. Default: the rail of the order's currency (`card` on a fiat order). `faircoin` on a fiat order quotes its total in FAIR for 10 minutes; confirming again with the other method replaces a payment that has not started moving money."),
|
|
477
|
+
locale: zod_1.z
|
|
478
|
+
.enum(checkout_1.CHECKOUT_LOCALES)
|
|
479
|
+
.optional()
|
|
480
|
+
.describe("The language the payer is completing checkout in. Recorded on the session (never on its `locale`) and given to a customer checkout creates as its `preferred_locales`; the session's emails are written in it when the customer has no preferred language."),
|
|
477
481
|
})
|
|
478
482
|
.strict();
|
|
479
483
|
/** `POST /v1/test_helpers/checkout_sessions/{id}/expire` takes nothing. */
|
|
@@ -8,6 +8,7 @@ const objects_1 = require("../../common/objects");
|
|
|
8
8
|
const params_1 = require("../../common/params");
|
|
9
9
|
const primitives_1 = require("../../common/primitives");
|
|
10
10
|
const route_1 = require("../../route");
|
|
11
|
+
const checkout_1 = require("../../vocabulary/checkout");
|
|
11
12
|
/**
|
|
12
13
|
* Customers (`cus_…`) — Orbit's own object (ADR 0016). A provider customer is an
|
|
13
14
|
* internal binding created lazily, per mode, when a card payment method is
|
|
@@ -24,6 +25,9 @@ exports.customerSchema = (0, objects_1.defineObject)('customer', 'Customer', zod
|
|
|
24
25
|
description: zod_1.z.string().nullable(),
|
|
25
26
|
address: address_1.addressSchema.nullable(),
|
|
26
27
|
shipping: address_1.shippingSchema.nullable(),
|
|
28
|
+
preferred_locales: zod_1.z
|
|
29
|
+
.array(zod_1.z.enum(checkout_1.CHECKOUT_LOCALES))
|
|
30
|
+
.describe("The customer's preferred languages, most preferred first (Stripe's `preferred_locales`), from the payer locale set. Receipts, invoices and dunning emails are written in the first; empty when none is known. A customer Checkout creates gets the language the payer completed it in."),
|
|
27
31
|
invoice_settings: zod_1.z
|
|
28
32
|
.object({
|
|
29
33
|
default_payment_method: (0, objects_1.expandable)('payment_method', '`pm_…`, or the PaymentMethod with `expand[]=invoice_settings.default_payment_method`.').nullable(),
|
|
@@ -52,6 +56,7 @@ exports.customerSchema = (0, objects_1.defineObject)('customer', 'Customer', zod
|
|
|
52
56
|
description: null,
|
|
53
57
|
address: null,
|
|
54
58
|
shipping: null,
|
|
59
|
+
preferred_locales: ['fr', 'en'],
|
|
55
60
|
invoice_settings: { default_payment_method: null },
|
|
56
61
|
metadata: { order_id: '6735' },
|
|
57
62
|
balance: '0',
|
|
@@ -66,6 +71,11 @@ exports.deletedCustomerSchema = (0, objects_1.defineComponent)('DeletedCustomer'
|
|
|
66
71
|
const name = zod_1.z.string().max(500);
|
|
67
72
|
const phone = zod_1.z.string().max(40);
|
|
68
73
|
const description = zod_1.z.string().max(1000);
|
|
74
|
+
const preferredLocales = zod_1.z
|
|
75
|
+
.array(zod_1.z.enum(checkout_1.CHECKOUT_LOCALES))
|
|
76
|
+
.max(checkout_1.CHECKOUT_LOCALES.length)
|
|
77
|
+
.refine((locales) => new Set(locales).size === locales.length, 'a language is listed once')
|
|
78
|
+
.describe('Most preferred first, each once, from the payer locale set (`ar`, `bn`, `ca`, `de`, `en`, `es`, `fr`, `hi`, `id`, `it`, `ja`, `pt`, `ru`, `tr`, `zh`).');
|
|
69
79
|
exports.createCustomerParams = zod_1.z
|
|
70
80
|
.object({
|
|
71
81
|
email: address_1.emailParam.optional(),
|
|
@@ -74,6 +84,7 @@ exports.createCustomerParams = zod_1.z
|
|
|
74
84
|
description: description.optional(),
|
|
75
85
|
address: address_1.addressParams.optional(),
|
|
76
86
|
shipping: address_1.shippingParams.optional(),
|
|
87
|
+
preferred_locales: preferredLocales.optional(),
|
|
77
88
|
invoice_settings: zod_1.z.object({ default_payment_method: params_1.idParam.optional() }).strict().optional(),
|
|
78
89
|
metadata: params_1.metadataCreateParam.optional(),
|
|
79
90
|
test_clock: params_1.idParam
|
|
@@ -91,6 +102,9 @@ exports.updateCustomerParams = zod_1.z
|
|
|
91
102
|
description: (0, params_1.clearable)(description).optional(),
|
|
92
103
|
address: (0, params_1.clearable)(address_1.addressParams).optional(),
|
|
93
104
|
shipping: (0, params_1.clearable)(address_1.shippingParams).optional(),
|
|
105
|
+
preferred_locales: (0, params_1.clearable)(preferredLocales)
|
|
106
|
+
.optional()
|
|
107
|
+
.describe('Replaces the list; `[]` or `""` clears it.'),
|
|
94
108
|
invoice_settings: zod_1.z
|
|
95
109
|
.object({ default_payment_method: (0, params_1.clearable)(params_1.idParam).optional() })
|
|
96
110
|
.strict()
|
|
@@ -148,7 +148,7 @@ exports.socialRoutes = [
|
|
|
148
148
|
path: '/v1/social/{username}/next_address',
|
|
149
149
|
tag: 'Social payments',
|
|
150
150
|
summary: 'Reserve an address to pay a person',
|
|
151
|
-
description: "A fresh address of the recipient's, derived from their Oxy identity key. Limited per (sender, recipient) pair; a recipient without an identity answers 409 `keyless_recipient`; paying yourself is refused.",
|
|
151
|
+
description: "A fresh address of the recipient's, derived from their Oxy identity key. Limited per (sender, recipient) pair; a recipient without an identity answers 409 `keyless_recipient`, and one whose wallet watches no further address (every index below its watched bound is taken) 503 `faircoin_receive_tree_full`; paying yourself is refused.",
|
|
152
152
|
auth: 'user',
|
|
153
153
|
params: { username: 'The recipient’s Oxy username.' },
|
|
154
154
|
body: exports.socialNextAddressParams,
|
|
@@ -135,6 +135,7 @@ exports.ERROR_CODE_DESCRIPTIONS = {
|
|
|
135
135
|
faircoin_wallet_missing: "The Peable wallet that receives this payment (the merchant owner's, or the seller's) isn't set up yet, so it cannot be paid in FairCoin. The other payment methods still work.",
|
|
136
136
|
faircoin_network_closed: 'FairCoin payments on this network are not open on this deployment yet. The other payment methods still work.',
|
|
137
137
|
faircoin_capacity_reached: 'Too many FairCoin payments to this recipient are waiting to be paid right now, so no new FairCoin address can be handed out. The other payment methods still work; try FairCoin again shortly.',
|
|
138
|
+
faircoin_receive_tree_full: "Every FairCoin address the recipient's Peable wallet watches has been handed out, so no new one can be derived for them. Nothing was reserved.",
|
|
138
139
|
faircoin_amount_too_small: "One seller's share of this order is below the smallest amount the FairCoin network relays, so it cannot be paid in FairCoin. The other payment methods still work.",
|
|
139
140
|
credit_note_exceeds_invoice: "The credit note's amount exceeds what the invoice can still credit.",
|
|
140
141
|
test_clock_unexpected_state: 'The test clock is advancing; wait until it is ready.',
|
|
@@ -33,17 +33,21 @@ exports.PAYMENT_INTENT_STATUSES = [
|
|
|
33
33
|
'canceled',
|
|
34
34
|
];
|
|
35
35
|
/**
|
|
36
|
-
* Why an intent was cancelled — Stripe's reasons, plus
|
|
37
|
-
* `underpaid` (a transaction paid less than the amount)
|
|
36
|
+
* Why an intent was cancelled — Stripe's reasons, plus three FairCoin-only ones:
|
|
37
|
+
* `underpaid` (a transaction paid less than the amount),
|
|
38
38
|
* `recipient_key_changed` (the recipient's identity key was replaced after the
|
|
39
39
|
* address was reserved, so the address is no longer in the wallet it pays —
|
|
40
40
|
* ADR 0002, amended 2026-11-06; nothing had been broadcast, and the order stays
|
|
41
|
-
* open for a fresh address)
|
|
41
|
+
* open for a fresh address) and `faircoin_network_closed` (the deployment
|
|
42
|
+
* closed the payment's FairCoin network — ADR 0002's gate — before anything was
|
|
43
|
+
* broadcast; the order stays open, and FairCoin on it says the network is
|
|
44
|
+
* closed).
|
|
42
45
|
*/
|
|
43
46
|
exports.PAYMENT_INTENT_CANCELLATION_REASONS = [
|
|
44
47
|
'abandoned',
|
|
45
48
|
'automatic',
|
|
46
49
|
'duplicate',
|
|
50
|
+
'faircoin_network_closed',
|
|
47
51
|
'fraudulent',
|
|
48
52
|
'recipient_key_changed',
|
|
49
53
|
'requested_by_customer',
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* The size of a recipient's FairCoin receive tree (ADR 0021 D9, amended
|
|
4
|
+
* 2026-11-06) — ONE answer, read by the gateway that hands out indices and by
|
|
5
|
+
* the Peable wallet that watches them.
|
|
6
|
+
*
|
|
7
|
+
* Every FairCoin address the gateway reserves for an account — a merchant
|
|
8
|
+
* payment, a marketplace seller's, an invoice's, `@username` — is index `i` of
|
|
9
|
+
* that account's identity tree (ADR 0002, ADR 0021 D5). The wallet watches a
|
|
10
|
+
* contiguous window, indices `0 .. SOCIAL_RECEIVE_MAX_WATCHED - 1`, reaching
|
|
11
|
+
* {@link SOCIAL_RECEIVE_GAP_LIMIT} past the highest index reserved
|
|
12
|
+
* (`planSocialReceiveWindow` in `packages/frontend/src/wallet/social-receive.ts`),
|
|
13
|
+
* and stops offering `@username` once that reach would pass its bound. So an
|
|
14
|
+
* index is reserved only when the wallet, after reserving it, still reaches
|
|
15
|
+
* the gap above it inside its bound:
|
|
16
|
+
*
|
|
17
|
+
* index + SOCIAL_RECEIVE_GAP_LIMIT <= SOCIAL_RECEIVE_MAX_WATCHED - 1
|
|
18
|
+
* index < SOCIAL_RECEIVE_INDEX_LIMIT
|
|
19
|
+
*
|
|
20
|
+
* The gateway refuses to mint `index >= SOCIAL_RECEIVE_INDEX_LIMIT` (in the
|
|
21
|
+
* reservation's own statement), so every address it hands out is inside the
|
|
22
|
+
* window the wallet watches. Zod-free and dependency-free: the wallet bundles
|
|
23
|
+
* this module alone (`@peable.to/contracts/vocabulary/receiveTree`).
|
|
24
|
+
*/
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.SOCIAL_RECEIVE_NEARLY_FULL_REMAINING = exports.SOCIAL_RECEIVE_INDEX_LIMIT = exports.SOCIAL_RECEIVE_GAP_LIMIT = exports.SOCIAL_RECEIVE_MAX_WATCHED = void 0;
|
|
27
|
+
/** The most indices the wallet watches: `0 .. SOCIAL_RECEIVE_MAX_WATCHED - 1`. */
|
|
28
|
+
exports.SOCIAL_RECEIVE_MAX_WATCHED = 2000;
|
|
29
|
+
/**
|
|
30
|
+
* How many unused addresses the wallet watches beyond the highest index used
|
|
31
|
+
* or reserved — the FairCoin BIP44 external-chain gap limit.
|
|
32
|
+
*/
|
|
33
|
+
exports.SOCIAL_RECEIVE_GAP_LIMIT = 20;
|
|
34
|
+
/**
|
|
35
|
+
* The first index the gateway never mints (exclusive bound): `1 980`. Every
|
|
36
|
+
* minted index `i` satisfies `i < SOCIAL_RECEIVE_INDEX_LIMIT`, i.e.
|
|
37
|
+
* `i + SOCIAL_RECEIVE_GAP_LIMIT <= SOCIAL_RECEIVE_MAX_WATCHED - 1`.
|
|
38
|
+
*/
|
|
39
|
+
exports.SOCIAL_RECEIVE_INDEX_LIMIT = exports.SOCIAL_RECEIVE_MAX_WATCHED - exports.SOCIAL_RECEIVE_GAP_LIMIT;
|
|
40
|
+
/**
|
|
41
|
+
* How close to {@link SOCIAL_RECEIVE_INDEX_LIMIT} a tree is "nearly full":
|
|
42
|
+
* Orbit warns the owners once fewer fresh indices than this are left.
|
|
43
|
+
*/
|
|
44
|
+
exports.SOCIAL_RECEIVE_NEARLY_FULL_REMAINING = 200;
|
|
@@ -471,6 +471,10 @@ export const confirmCheckoutSessionPublicParams = z
|
|
|
471
471
|
.enum(['card', 'faircoin'])
|
|
472
472
|
.optional()
|
|
473
473
|
.describe("How the payer pays: one of the session's `payment_method_types`. Default: the rail of the order's currency (`card` on a fiat order). `faircoin` on a fiat order quotes its total in FAIR for 10 minutes; confirming again with the other method replaces a payment that has not started moving money."),
|
|
474
|
+
locale: z
|
|
475
|
+
.enum(CHECKOUT_LOCALES)
|
|
476
|
+
.optional()
|
|
477
|
+
.describe("The language the payer is completing checkout in. Recorded on the session (never on its `locale`) and given to a customer checkout creates as its `preferred_locales`; the session's emails are written in it when the customer has no preferred language."),
|
|
474
478
|
})
|
|
475
479
|
.strict();
|
|
476
480
|
/** `POST /v1/test_helpers/checkout_sessions/{id}/expire` takes nothing. */
|
|
@@ -5,6 +5,7 @@ import { defineComponent, defineObject, expandable } from '../../common/objects.
|
|
|
5
5
|
import { clearable, expandOnlyQuery, expandParam, idParam, listQuery, metadataCreateParam, metadataUpdateParam, searchQuery, } from '../../common/params.js';
|
|
6
6
|
import { currency, livemode, metadata, signedAmount, unixSeconds } from '../../common/primitives.js';
|
|
7
7
|
import { defineRoute } from '../../route.js';
|
|
8
|
+
import { CHECKOUT_LOCALES } from '../../vocabulary/checkout.js';
|
|
8
9
|
/**
|
|
9
10
|
* Customers (`cus_…`) — Orbit's own object (ADR 0016). A provider customer is an
|
|
10
11
|
* internal binding created lazily, per mode, when a card payment method is
|
|
@@ -21,6 +22,9 @@ export const customerSchema = defineObject('customer', 'Customer', z
|
|
|
21
22
|
description: z.string().nullable(),
|
|
22
23
|
address: addressSchema.nullable(),
|
|
23
24
|
shipping: shippingSchema.nullable(),
|
|
25
|
+
preferred_locales: z
|
|
26
|
+
.array(z.enum(CHECKOUT_LOCALES))
|
|
27
|
+
.describe("The customer's preferred languages, most preferred first (Stripe's `preferred_locales`), from the payer locale set. Receipts, invoices and dunning emails are written in the first; empty when none is known. A customer Checkout creates gets the language the payer completed it in."),
|
|
24
28
|
invoice_settings: z
|
|
25
29
|
.object({
|
|
26
30
|
default_payment_method: expandable('payment_method', '`pm_…`, or the PaymentMethod with `expand[]=invoice_settings.default_payment_method`.').nullable(),
|
|
@@ -49,6 +53,7 @@ export const customerSchema = defineObject('customer', 'Customer', z
|
|
|
49
53
|
description: null,
|
|
50
54
|
address: null,
|
|
51
55
|
shipping: null,
|
|
56
|
+
preferred_locales: ['fr', 'en'],
|
|
52
57
|
invoice_settings: { default_payment_method: null },
|
|
53
58
|
metadata: { order_id: '6735' },
|
|
54
59
|
balance: '0',
|
|
@@ -63,6 +68,11 @@ export const deletedCustomerSchema = defineComponent('DeletedCustomer', deletedO
|
|
|
63
68
|
const name = z.string().max(500);
|
|
64
69
|
const phone = z.string().max(40);
|
|
65
70
|
const description = z.string().max(1000);
|
|
71
|
+
const preferredLocales = z
|
|
72
|
+
.array(z.enum(CHECKOUT_LOCALES))
|
|
73
|
+
.max(CHECKOUT_LOCALES.length)
|
|
74
|
+
.refine((locales) => new Set(locales).size === locales.length, 'a language is listed once')
|
|
75
|
+
.describe('Most preferred first, each once, from the payer locale set (`ar`, `bn`, `ca`, `de`, `en`, `es`, `fr`, `hi`, `id`, `it`, `ja`, `pt`, `ru`, `tr`, `zh`).');
|
|
66
76
|
export const createCustomerParams = z
|
|
67
77
|
.object({
|
|
68
78
|
email: emailParam.optional(),
|
|
@@ -71,6 +81,7 @@ export const createCustomerParams = z
|
|
|
71
81
|
description: description.optional(),
|
|
72
82
|
address: addressParams.optional(),
|
|
73
83
|
shipping: shippingParams.optional(),
|
|
84
|
+
preferred_locales: preferredLocales.optional(),
|
|
74
85
|
invoice_settings: z.object({ default_payment_method: idParam.optional() }).strict().optional(),
|
|
75
86
|
metadata: metadataCreateParam.optional(),
|
|
76
87
|
test_clock: idParam
|
|
@@ -88,6 +99,9 @@ export const updateCustomerParams = z
|
|
|
88
99
|
description: clearable(description).optional(),
|
|
89
100
|
address: clearable(addressParams).optional(),
|
|
90
101
|
shipping: clearable(shippingParams).optional(),
|
|
102
|
+
preferred_locales: clearable(preferredLocales)
|
|
103
|
+
.optional()
|
|
104
|
+
.describe('Replaces the list; `[]` or `""` clears it.'),
|
|
91
105
|
invoice_settings: z
|
|
92
106
|
.object({ default_payment_method: clearable(idParam).optional() })
|
|
93
107
|
.strict()
|
|
@@ -145,7 +145,7 @@ export const socialRoutes = [
|
|
|
145
145
|
path: '/v1/social/{username}/next_address',
|
|
146
146
|
tag: 'Social payments',
|
|
147
147
|
summary: 'Reserve an address to pay a person',
|
|
148
|
-
description: "A fresh address of the recipient's, derived from their Oxy identity key. Limited per (sender, recipient) pair; a recipient without an identity answers 409 `keyless_recipient`; paying yourself is refused.",
|
|
148
|
+
description: "A fresh address of the recipient's, derived from their Oxy identity key. Limited per (sender, recipient) pair; a recipient without an identity answers 409 `keyless_recipient`, and one whose wallet watches no further address (every index below its watched bound is taken) 503 `faircoin_receive_tree_full`; paying yourself is refused.",
|
|
149
149
|
auth: 'user',
|
|
150
150
|
params: { username: 'The recipient’s Oxy username.' },
|
|
151
151
|
body: socialNextAddressParams,
|
|
@@ -130,6 +130,7 @@ export const ERROR_CODE_DESCRIPTIONS = {
|
|
|
130
130
|
faircoin_wallet_missing: "The Peable wallet that receives this payment (the merchant owner's, or the seller's) isn't set up yet, so it cannot be paid in FairCoin. The other payment methods still work.",
|
|
131
131
|
faircoin_network_closed: 'FairCoin payments on this network are not open on this deployment yet. The other payment methods still work.',
|
|
132
132
|
faircoin_capacity_reached: 'Too many FairCoin payments to this recipient are waiting to be paid right now, so no new FairCoin address can be handed out. The other payment methods still work; try FairCoin again shortly.',
|
|
133
|
+
faircoin_receive_tree_full: "Every FairCoin address the recipient's Peable wallet watches has been handed out, so no new one can be derived for them. Nothing was reserved.",
|
|
133
134
|
faircoin_amount_too_small: "One seller's share of this order is below the smallest amount the FairCoin network relays, so it cannot be paid in FairCoin. The other payment methods still work.",
|
|
134
135
|
credit_note_exceeds_invoice: "The credit note's amount exceeds what the invoice can still credit.",
|
|
135
136
|
test_clock_unexpected_state: 'The test clock is advancing; wait until it is ready.',
|
|
@@ -30,17 +30,21 @@ export const PAYMENT_INTENT_STATUSES = [
|
|
|
30
30
|
'canceled',
|
|
31
31
|
];
|
|
32
32
|
/**
|
|
33
|
-
* Why an intent was cancelled — Stripe's reasons, plus
|
|
34
|
-
* `underpaid` (a transaction paid less than the amount)
|
|
33
|
+
* Why an intent was cancelled — Stripe's reasons, plus three FairCoin-only ones:
|
|
34
|
+
* `underpaid` (a transaction paid less than the amount),
|
|
35
35
|
* `recipient_key_changed` (the recipient's identity key was replaced after the
|
|
36
36
|
* address was reserved, so the address is no longer in the wallet it pays —
|
|
37
37
|
* ADR 0002, amended 2026-11-06; nothing had been broadcast, and the order stays
|
|
38
|
-
* open for a fresh address)
|
|
38
|
+
* open for a fresh address) and `faircoin_network_closed` (the deployment
|
|
39
|
+
* closed the payment's FairCoin network — ADR 0002's gate — before anything was
|
|
40
|
+
* broadcast; the order stays open, and FairCoin on it says the network is
|
|
41
|
+
* closed).
|
|
39
42
|
*/
|
|
40
43
|
export const PAYMENT_INTENT_CANCELLATION_REASONS = [
|
|
41
44
|
'abandoned',
|
|
42
45
|
'automatic',
|
|
43
46
|
'duplicate',
|
|
47
|
+
'faircoin_network_closed',
|
|
44
48
|
'fraudulent',
|
|
45
49
|
'recipient_key_changed',
|
|
46
50
|
'requested_by_customer',
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The size of a recipient's FairCoin receive tree (ADR 0021 D9, amended
|
|
3
|
+
* 2026-11-06) — ONE answer, read by the gateway that hands out indices and by
|
|
4
|
+
* the Peable wallet that watches them.
|
|
5
|
+
*
|
|
6
|
+
* Every FairCoin address the gateway reserves for an account — a merchant
|
|
7
|
+
* payment, a marketplace seller's, an invoice's, `@username` — is index `i` of
|
|
8
|
+
* that account's identity tree (ADR 0002, ADR 0021 D5). The wallet watches a
|
|
9
|
+
* contiguous window, indices `0 .. SOCIAL_RECEIVE_MAX_WATCHED - 1`, reaching
|
|
10
|
+
* {@link SOCIAL_RECEIVE_GAP_LIMIT} past the highest index reserved
|
|
11
|
+
* (`planSocialReceiveWindow` in `packages/frontend/src/wallet/social-receive.ts`),
|
|
12
|
+
* and stops offering `@username` once that reach would pass its bound. So an
|
|
13
|
+
* index is reserved only when the wallet, after reserving it, still reaches
|
|
14
|
+
* the gap above it inside its bound:
|
|
15
|
+
*
|
|
16
|
+
* index + SOCIAL_RECEIVE_GAP_LIMIT <= SOCIAL_RECEIVE_MAX_WATCHED - 1
|
|
17
|
+
* index < SOCIAL_RECEIVE_INDEX_LIMIT
|
|
18
|
+
*
|
|
19
|
+
* The gateway refuses to mint `index >= SOCIAL_RECEIVE_INDEX_LIMIT` (in the
|
|
20
|
+
* reservation's own statement), so every address it hands out is inside the
|
|
21
|
+
* window the wallet watches. Zod-free and dependency-free: the wallet bundles
|
|
22
|
+
* this module alone (`@peable.to/contracts/vocabulary/receiveTree`).
|
|
23
|
+
*/
|
|
24
|
+
/** The most indices the wallet watches: `0 .. SOCIAL_RECEIVE_MAX_WATCHED - 1`. */
|
|
25
|
+
export const SOCIAL_RECEIVE_MAX_WATCHED = 2000;
|
|
26
|
+
/**
|
|
27
|
+
* How many unused addresses the wallet watches beyond the highest index used
|
|
28
|
+
* or reserved — the FairCoin BIP44 external-chain gap limit.
|
|
29
|
+
*/
|
|
30
|
+
export const SOCIAL_RECEIVE_GAP_LIMIT = 20;
|
|
31
|
+
/**
|
|
32
|
+
* The first index the gateway never mints (exclusive bound): `1 980`. Every
|
|
33
|
+
* minted index `i` satisfies `i < SOCIAL_RECEIVE_INDEX_LIMIT`, i.e.
|
|
34
|
+
* `i + SOCIAL_RECEIVE_GAP_LIMIT <= SOCIAL_RECEIVE_MAX_WATCHED - 1`.
|
|
35
|
+
*/
|
|
36
|
+
export const SOCIAL_RECEIVE_INDEX_LIMIT = SOCIAL_RECEIVE_MAX_WATCHED - SOCIAL_RECEIVE_GAP_LIMIT;
|
|
37
|
+
/**
|
|
38
|
+
* How close to {@link SOCIAL_RECEIVE_INDEX_LIMIT} a tree is "nearly full":
|
|
39
|
+
* Orbit warns the owners once fewer fresh indices than this are left.
|
|
40
|
+
*/
|
|
41
|
+
export const SOCIAL_RECEIVE_NEARLY_FULL_REMAINING = 200;
|
|
@@ -873,6 +873,23 @@ export declare const confirmCheckoutSessionPublicParams: z.ZodObject<{
|
|
|
873
873
|
card: "card";
|
|
874
874
|
faircoin: "faircoin";
|
|
875
875
|
}>>;
|
|
876
|
+
locale: z.ZodOptional<z.ZodEnum<{
|
|
877
|
+
id: "id";
|
|
878
|
+
ar: "ar";
|
|
879
|
+
bn: "bn";
|
|
880
|
+
ca: "ca";
|
|
881
|
+
de: "de";
|
|
882
|
+
en: "en";
|
|
883
|
+
es: "es";
|
|
884
|
+
fr: "fr";
|
|
885
|
+
hi: "hi";
|
|
886
|
+
it: "it";
|
|
887
|
+
ja: "ja";
|
|
888
|
+
pt: "pt";
|
|
889
|
+
ru: "ru";
|
|
890
|
+
tr: "tr";
|
|
891
|
+
zh: "zh";
|
|
892
|
+
}>>;
|
|
876
893
|
}, z.core.$strict>;
|
|
877
894
|
export type ConfirmCheckoutSessionPublicParams = z.input<typeof confirmCheckoutSessionPublicParams>;
|
|
878
895
|
/** `POST /v1/test_helpers/checkout_sessions/{id}/expire` takes nothing. */
|
|
@@ -2856,6 +2873,23 @@ export declare const checkoutSessionRoutes: readonly [{
|
|
|
2856
2873
|
card: "card";
|
|
2857
2874
|
faircoin: "faircoin";
|
|
2858
2875
|
}>>;
|
|
2876
|
+
locale: z.ZodOptional<z.ZodEnum<{
|
|
2877
|
+
id: "id";
|
|
2878
|
+
ar: "ar";
|
|
2879
|
+
bn: "bn";
|
|
2880
|
+
ca: "ca";
|
|
2881
|
+
de: "de";
|
|
2882
|
+
en: "en";
|
|
2883
|
+
es: "es";
|
|
2884
|
+
fr: "fr";
|
|
2885
|
+
hi: "hi";
|
|
2886
|
+
it: "it";
|
|
2887
|
+
ja: "ja";
|
|
2888
|
+
pt: "pt";
|
|
2889
|
+
ru: "ru";
|
|
2890
|
+
tr: "tr";
|
|
2891
|
+
zh: "zh";
|
|
2892
|
+
}>>;
|
|
2859
2893
|
}, z.core.$strict>;
|
|
2860
2894
|
readonly response: z.ZodObject<{
|
|
2861
2895
|
line_items: z.ZodArray<z.ZodObject<{
|
|
@@ -1985,6 +1985,23 @@ export declare const checkoutRoutes: readonly [{
|
|
|
1985
1985
|
card: "card";
|
|
1986
1986
|
faircoin: "faircoin";
|
|
1987
1987
|
}>>;
|
|
1988
|
+
locale: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
1989
|
+
id: "id";
|
|
1990
|
+
ar: "ar";
|
|
1991
|
+
bn: "bn";
|
|
1992
|
+
ca: "ca";
|
|
1993
|
+
de: "de";
|
|
1994
|
+
en: "en";
|
|
1995
|
+
es: "es";
|
|
1996
|
+
fr: "fr";
|
|
1997
|
+
hi: "hi";
|
|
1998
|
+
it: "it";
|
|
1999
|
+
ja: "ja";
|
|
2000
|
+
pt: "pt";
|
|
2001
|
+
ru: "ru";
|
|
2002
|
+
tr: "tr";
|
|
2003
|
+
zh: "zh";
|
|
2004
|
+
}>>;
|
|
1988
2005
|
}, import("zod/v4/core").$strict>;
|
|
1989
2006
|
readonly response: import("zod").ZodObject<{
|
|
1990
2007
|
line_items: import("zod").ZodArray<import("zod").ZodObject<{
|
|
@@ -35,6 +35,23 @@ export declare const customerSchema: z.ZodObject<{
|
|
|
35
35
|
carrier: z.ZodNullable<z.ZodString>;
|
|
36
36
|
tracking_number: z.ZodNullable<z.ZodString>;
|
|
37
37
|
}, z.core.$strict>>;
|
|
38
|
+
preferred_locales: z.ZodArray<z.ZodEnum<{
|
|
39
|
+
id: "id";
|
|
40
|
+
ar: "ar";
|
|
41
|
+
bn: "bn";
|
|
42
|
+
ca: "ca";
|
|
43
|
+
de: "de";
|
|
44
|
+
en: "en";
|
|
45
|
+
es: "es";
|
|
46
|
+
fr: "fr";
|
|
47
|
+
hi: "hi";
|
|
48
|
+
it: "it";
|
|
49
|
+
ja: "ja";
|
|
50
|
+
pt: "pt";
|
|
51
|
+
ru: "ru";
|
|
52
|
+
tr: "tr";
|
|
53
|
+
zh: "zh";
|
|
54
|
+
}>>;
|
|
38
55
|
invoice_settings: z.ZodObject<{
|
|
39
56
|
default_payment_method: z.ZodNullable<z.ZodType<string | import("../..").Ref<"payment_method">, string | import("../..").Ref<"payment_method">, z.core.$ZodTypeInternals<string | import("../..").Ref<"payment_method">, string | import("../..").Ref<"payment_method">>>>;
|
|
40
57
|
}, z.core.$strict>;
|
|
@@ -98,6 +115,23 @@ export declare const createCustomerParams: z.ZodObject<{
|
|
|
98
115
|
carrier: z.ZodOptional<z.ZodString>;
|
|
99
116
|
tracking_number: z.ZodOptional<z.ZodString>;
|
|
100
117
|
}, z.core.$strict>>;
|
|
118
|
+
preferred_locales: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
119
|
+
id: "id";
|
|
120
|
+
ar: "ar";
|
|
121
|
+
bn: "bn";
|
|
122
|
+
ca: "ca";
|
|
123
|
+
de: "de";
|
|
124
|
+
en: "en";
|
|
125
|
+
es: "es";
|
|
126
|
+
fr: "fr";
|
|
127
|
+
hi: "hi";
|
|
128
|
+
it: "it";
|
|
129
|
+
ja: "ja";
|
|
130
|
+
pt: "pt";
|
|
131
|
+
ru: "ru";
|
|
132
|
+
tr: "tr";
|
|
133
|
+
zh: "zh";
|
|
134
|
+
}>>>;
|
|
101
135
|
invoice_settings: z.ZodOptional<z.ZodObject<{
|
|
102
136
|
default_payment_method: z.ZodOptional<z.ZodString>;
|
|
103
137
|
}, z.core.$strict>>;
|
|
@@ -134,6 +168,23 @@ export declare const updateCustomerParams: z.ZodObject<{
|
|
|
134
168
|
carrier: z.ZodOptional<z.ZodString>;
|
|
135
169
|
tracking_number: z.ZodOptional<z.ZodString>;
|
|
136
170
|
}, z.core.$strict>, z.ZodLiteral<"">]>>;
|
|
171
|
+
preferred_locales: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodEnum<{
|
|
172
|
+
id: "id";
|
|
173
|
+
ar: "ar";
|
|
174
|
+
bn: "bn";
|
|
175
|
+
ca: "ca";
|
|
176
|
+
de: "de";
|
|
177
|
+
en: "en";
|
|
178
|
+
es: "es";
|
|
179
|
+
fr: "fr";
|
|
180
|
+
hi: "hi";
|
|
181
|
+
it: "it";
|
|
182
|
+
ja: "ja";
|
|
183
|
+
pt: "pt";
|
|
184
|
+
ru: "ru";
|
|
185
|
+
tr: "tr";
|
|
186
|
+
zh: "zh";
|
|
187
|
+
}>>, z.ZodLiteral<"">]>>;
|
|
137
188
|
invoice_settings: z.ZodOptional<z.ZodObject<{
|
|
138
189
|
default_payment_method: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"">]>>;
|
|
139
190
|
}, z.core.$strict>>;
|
|
@@ -196,6 +247,23 @@ export declare const customerRoutes: readonly [{
|
|
|
196
247
|
carrier: z.ZodOptional<z.ZodString>;
|
|
197
248
|
tracking_number: z.ZodOptional<z.ZodString>;
|
|
198
249
|
}, z.core.$strict>>;
|
|
250
|
+
preferred_locales: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
251
|
+
id: "id";
|
|
252
|
+
ar: "ar";
|
|
253
|
+
bn: "bn";
|
|
254
|
+
ca: "ca";
|
|
255
|
+
de: "de";
|
|
256
|
+
en: "en";
|
|
257
|
+
es: "es";
|
|
258
|
+
fr: "fr";
|
|
259
|
+
hi: "hi";
|
|
260
|
+
it: "it";
|
|
261
|
+
ja: "ja";
|
|
262
|
+
pt: "pt";
|
|
263
|
+
ru: "ru";
|
|
264
|
+
tr: "tr";
|
|
265
|
+
zh: "zh";
|
|
266
|
+
}>>>;
|
|
199
267
|
invoice_settings: z.ZodOptional<z.ZodObject<{
|
|
200
268
|
default_payment_method: z.ZodOptional<z.ZodString>;
|
|
201
269
|
}, z.core.$strict>>;
|
|
@@ -233,6 +301,23 @@ export declare const customerRoutes: readonly [{
|
|
|
233
301
|
carrier: z.ZodNullable<z.ZodString>;
|
|
234
302
|
tracking_number: z.ZodNullable<z.ZodString>;
|
|
235
303
|
}, z.core.$strict>>;
|
|
304
|
+
preferred_locales: z.ZodArray<z.ZodEnum<{
|
|
305
|
+
id: "id";
|
|
306
|
+
ar: "ar";
|
|
307
|
+
bn: "bn";
|
|
308
|
+
ca: "ca";
|
|
309
|
+
de: "de";
|
|
310
|
+
en: "en";
|
|
311
|
+
es: "es";
|
|
312
|
+
fr: "fr";
|
|
313
|
+
hi: "hi";
|
|
314
|
+
it: "it";
|
|
315
|
+
ja: "ja";
|
|
316
|
+
pt: "pt";
|
|
317
|
+
ru: "ru";
|
|
318
|
+
tr: "tr";
|
|
319
|
+
zh: "zh";
|
|
320
|
+
}>>;
|
|
236
321
|
invoice_settings: z.ZodObject<{
|
|
237
322
|
default_payment_method: z.ZodNullable<z.ZodType<string | import("../..").Ref<"payment_method">, string | import("../..").Ref<"payment_method">, z.core.$ZodTypeInternals<string | import("../..").Ref<"payment_method">, string | import("../..").Ref<"payment_method">>>>;
|
|
238
323
|
}, z.core.$strict>;
|
|
@@ -318,6 +403,23 @@ export declare const customerRoutes: readonly [{
|
|
|
318
403
|
carrier: z.ZodNullable<z.ZodString>;
|
|
319
404
|
tracking_number: z.ZodNullable<z.ZodString>;
|
|
320
405
|
}, z.core.$strict>>;
|
|
406
|
+
preferred_locales: z.ZodArray<z.ZodEnum<{
|
|
407
|
+
id: "id";
|
|
408
|
+
ar: "ar";
|
|
409
|
+
bn: "bn";
|
|
410
|
+
ca: "ca";
|
|
411
|
+
de: "de";
|
|
412
|
+
en: "en";
|
|
413
|
+
es: "es";
|
|
414
|
+
fr: "fr";
|
|
415
|
+
hi: "hi";
|
|
416
|
+
it: "it";
|
|
417
|
+
ja: "ja";
|
|
418
|
+
pt: "pt";
|
|
419
|
+
ru: "ru";
|
|
420
|
+
tr: "tr";
|
|
421
|
+
zh: "zh";
|
|
422
|
+
}>>;
|
|
321
423
|
invoice_settings: z.ZodObject<{
|
|
322
424
|
default_payment_method: z.ZodNullable<z.ZodType<string | import("../..").Ref<"payment_method">, string | import("../..").Ref<"payment_method">, z.core.$ZodTypeInternals<string | import("../..").Ref<"payment_method">, string | import("../..").Ref<"payment_method">>>>;
|
|
323
425
|
}, z.core.$strict>;
|
|
@@ -391,6 +493,23 @@ export declare const customerRoutes: readonly [{
|
|
|
391
493
|
carrier: z.ZodNullable<z.ZodString>;
|
|
392
494
|
tracking_number: z.ZodNullable<z.ZodString>;
|
|
393
495
|
}, z.core.$strict>>;
|
|
496
|
+
preferred_locales: z.ZodArray<z.ZodEnum<{
|
|
497
|
+
id: "id";
|
|
498
|
+
ar: "ar";
|
|
499
|
+
bn: "bn";
|
|
500
|
+
ca: "ca";
|
|
501
|
+
de: "de";
|
|
502
|
+
en: "en";
|
|
503
|
+
es: "es";
|
|
504
|
+
fr: "fr";
|
|
505
|
+
hi: "hi";
|
|
506
|
+
it: "it";
|
|
507
|
+
ja: "ja";
|
|
508
|
+
pt: "pt";
|
|
509
|
+
ru: "ru";
|
|
510
|
+
tr: "tr";
|
|
511
|
+
zh: "zh";
|
|
512
|
+
}>>;
|
|
394
513
|
invoice_settings: z.ZodObject<{
|
|
395
514
|
default_payment_method: z.ZodNullable<z.ZodType<string | import("../..").Ref<"payment_method">, string | import("../..").Ref<"payment_method">, z.core.$ZodTypeInternals<string | import("../..").Ref<"payment_method">, string | import("../..").Ref<"payment_method">>>>;
|
|
396
515
|
}, z.core.$strict>;
|
|
@@ -460,6 +579,23 @@ export declare const customerRoutes: readonly [{
|
|
|
460
579
|
carrier: z.ZodOptional<z.ZodString>;
|
|
461
580
|
tracking_number: z.ZodOptional<z.ZodString>;
|
|
462
581
|
}, z.core.$strict>, z.ZodLiteral<"">]>>;
|
|
582
|
+
preferred_locales: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodEnum<{
|
|
583
|
+
id: "id";
|
|
584
|
+
ar: "ar";
|
|
585
|
+
bn: "bn";
|
|
586
|
+
ca: "ca";
|
|
587
|
+
de: "de";
|
|
588
|
+
en: "en";
|
|
589
|
+
es: "es";
|
|
590
|
+
fr: "fr";
|
|
591
|
+
hi: "hi";
|
|
592
|
+
it: "it";
|
|
593
|
+
ja: "ja";
|
|
594
|
+
pt: "pt";
|
|
595
|
+
ru: "ru";
|
|
596
|
+
tr: "tr";
|
|
597
|
+
zh: "zh";
|
|
598
|
+
}>>, z.ZodLiteral<"">]>>;
|
|
463
599
|
invoice_settings: z.ZodOptional<z.ZodObject<{
|
|
464
600
|
default_payment_method: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"">]>>;
|
|
465
601
|
}, z.core.$strict>>;
|
|
@@ -496,6 +632,23 @@ export declare const customerRoutes: readonly [{
|
|
|
496
632
|
carrier: z.ZodNullable<z.ZodString>;
|
|
497
633
|
tracking_number: z.ZodNullable<z.ZodString>;
|
|
498
634
|
}, z.core.$strict>>;
|
|
635
|
+
preferred_locales: z.ZodArray<z.ZodEnum<{
|
|
636
|
+
id: "id";
|
|
637
|
+
ar: "ar";
|
|
638
|
+
bn: "bn";
|
|
639
|
+
ca: "ca";
|
|
640
|
+
de: "de";
|
|
641
|
+
en: "en";
|
|
642
|
+
es: "es";
|
|
643
|
+
fr: "fr";
|
|
644
|
+
hi: "hi";
|
|
645
|
+
it: "it";
|
|
646
|
+
ja: "ja";
|
|
647
|
+
pt: "pt";
|
|
648
|
+
ru: "ru";
|
|
649
|
+
tr: "tr";
|
|
650
|
+
zh: "zh";
|
|
651
|
+
}>>;
|
|
499
652
|
invoice_settings: z.ZodObject<{
|
|
500
653
|
default_payment_method: z.ZodNullable<z.ZodType<string | import("../..").Ref<"payment_method">, string | import("../..").Ref<"payment_method">, z.core.$ZodTypeInternals<string | import("../..").Ref<"payment_method">, string | import("../..").Ref<"payment_method">>>>;
|
|
501
654
|
}, z.core.$strict>;
|
|
@@ -586,6 +739,23 @@ export declare const customerRoutes: readonly [{
|
|
|
586
739
|
carrier: z.ZodNullable<z.ZodString>;
|
|
587
740
|
tracking_number: z.ZodNullable<z.ZodString>;
|
|
588
741
|
}, z.core.$strict>>;
|
|
742
|
+
preferred_locales: z.ZodArray<z.ZodEnum<{
|
|
743
|
+
id: "id";
|
|
744
|
+
ar: "ar";
|
|
745
|
+
bn: "bn";
|
|
746
|
+
ca: "ca";
|
|
747
|
+
de: "de";
|
|
748
|
+
en: "en";
|
|
749
|
+
es: "es";
|
|
750
|
+
fr: "fr";
|
|
751
|
+
hi: "hi";
|
|
752
|
+
it: "it";
|
|
753
|
+
ja: "ja";
|
|
754
|
+
pt: "pt";
|
|
755
|
+
ru: "ru";
|
|
756
|
+
tr: "tr";
|
|
757
|
+
zh: "zh";
|
|
758
|
+
}>>;
|
|
589
759
|
invoice_settings: z.ZodObject<{
|
|
590
760
|
default_payment_method: z.ZodNullable<z.ZodType<string | import("../..").Ref<"payment_method">, string | import("../..").Ref<"payment_method">, z.core.$ZodTypeInternals<string | import("../..").Ref<"payment_method">, string | import("../..").Ref<"payment_method">>>>;
|
|
591
761
|
}, z.core.$strict>;
|
|
@@ -37,6 +37,23 @@ export declare const coreRoutes: readonly [{
|
|
|
37
37
|
carrier: import("zod").ZodOptional<import("zod").ZodString>;
|
|
38
38
|
tracking_number: import("zod").ZodOptional<import("zod").ZodString>;
|
|
39
39
|
}, import("zod/v4/core").$strict>>;
|
|
40
|
+
preferred_locales: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodEnum<{
|
|
41
|
+
id: "id";
|
|
42
|
+
ar: "ar";
|
|
43
|
+
bn: "bn";
|
|
44
|
+
ca: "ca";
|
|
45
|
+
de: "de";
|
|
46
|
+
en: "en";
|
|
47
|
+
es: "es";
|
|
48
|
+
fr: "fr";
|
|
49
|
+
hi: "hi";
|
|
50
|
+
it: "it";
|
|
51
|
+
ja: "ja";
|
|
52
|
+
pt: "pt";
|
|
53
|
+
ru: "ru";
|
|
54
|
+
tr: "tr";
|
|
55
|
+
zh: "zh";
|
|
56
|
+
}>>>;
|
|
40
57
|
invoice_settings: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
41
58
|
default_payment_method: import("zod").ZodOptional<import("zod").ZodString>;
|
|
42
59
|
}, import("zod/v4/core").$strict>>;
|
|
@@ -74,6 +91,23 @@ export declare const coreRoutes: readonly [{
|
|
|
74
91
|
carrier: import("zod").ZodNullable<import("zod").ZodString>;
|
|
75
92
|
tracking_number: import("zod").ZodNullable<import("zod").ZodString>;
|
|
76
93
|
}, import("zod/v4/core").$strict>>;
|
|
94
|
+
preferred_locales: import("zod").ZodArray<import("zod").ZodEnum<{
|
|
95
|
+
id: "id";
|
|
96
|
+
ar: "ar";
|
|
97
|
+
bn: "bn";
|
|
98
|
+
ca: "ca";
|
|
99
|
+
de: "de";
|
|
100
|
+
en: "en";
|
|
101
|
+
es: "es";
|
|
102
|
+
fr: "fr";
|
|
103
|
+
hi: "hi";
|
|
104
|
+
it: "it";
|
|
105
|
+
ja: "ja";
|
|
106
|
+
pt: "pt";
|
|
107
|
+
ru: "ru";
|
|
108
|
+
tr: "tr";
|
|
109
|
+
zh: "zh";
|
|
110
|
+
}>>;
|
|
77
111
|
invoice_settings: import("zod").ZodObject<{
|
|
78
112
|
default_payment_method: import("zod").ZodNullable<import("zod").ZodType<string | import("../..").Ref<"payment_method">, string | import("../..").Ref<"payment_method">, import("zod/v4/core").$ZodTypeInternals<string | import("../..").Ref<"payment_method">, string | import("../..").Ref<"payment_method">>>>;
|
|
79
113
|
}, import("zod/v4/core").$strict>;
|
|
@@ -159,6 +193,23 @@ export declare const coreRoutes: readonly [{
|
|
|
159
193
|
carrier: import("zod").ZodNullable<import("zod").ZodString>;
|
|
160
194
|
tracking_number: import("zod").ZodNullable<import("zod").ZodString>;
|
|
161
195
|
}, import("zod/v4/core").$strict>>;
|
|
196
|
+
preferred_locales: import("zod").ZodArray<import("zod").ZodEnum<{
|
|
197
|
+
id: "id";
|
|
198
|
+
ar: "ar";
|
|
199
|
+
bn: "bn";
|
|
200
|
+
ca: "ca";
|
|
201
|
+
de: "de";
|
|
202
|
+
en: "en";
|
|
203
|
+
es: "es";
|
|
204
|
+
fr: "fr";
|
|
205
|
+
hi: "hi";
|
|
206
|
+
it: "it";
|
|
207
|
+
ja: "ja";
|
|
208
|
+
pt: "pt";
|
|
209
|
+
ru: "ru";
|
|
210
|
+
tr: "tr";
|
|
211
|
+
zh: "zh";
|
|
212
|
+
}>>;
|
|
162
213
|
invoice_settings: import("zod").ZodObject<{
|
|
163
214
|
default_payment_method: import("zod").ZodNullable<import("zod").ZodType<string | import("../..").Ref<"payment_method">, string | import("../..").Ref<"payment_method">, import("zod/v4/core").$ZodTypeInternals<string | import("../..").Ref<"payment_method">, string | import("../..").Ref<"payment_method">>>>;
|
|
164
215
|
}, import("zod/v4/core").$strict>;
|
|
@@ -232,6 +283,23 @@ export declare const coreRoutes: readonly [{
|
|
|
232
283
|
carrier: import("zod").ZodNullable<import("zod").ZodString>;
|
|
233
284
|
tracking_number: import("zod").ZodNullable<import("zod").ZodString>;
|
|
234
285
|
}, import("zod/v4/core").$strict>>;
|
|
286
|
+
preferred_locales: import("zod").ZodArray<import("zod").ZodEnum<{
|
|
287
|
+
id: "id";
|
|
288
|
+
ar: "ar";
|
|
289
|
+
bn: "bn";
|
|
290
|
+
ca: "ca";
|
|
291
|
+
de: "de";
|
|
292
|
+
en: "en";
|
|
293
|
+
es: "es";
|
|
294
|
+
fr: "fr";
|
|
295
|
+
hi: "hi";
|
|
296
|
+
it: "it";
|
|
297
|
+
ja: "ja";
|
|
298
|
+
pt: "pt";
|
|
299
|
+
ru: "ru";
|
|
300
|
+
tr: "tr";
|
|
301
|
+
zh: "zh";
|
|
302
|
+
}>>;
|
|
235
303
|
invoice_settings: import("zod").ZodObject<{
|
|
236
304
|
default_payment_method: import("zod").ZodNullable<import("zod").ZodType<string | import("../..").Ref<"payment_method">, string | import("../..").Ref<"payment_method">, import("zod/v4/core").$ZodTypeInternals<string | import("../..").Ref<"payment_method">, string | import("../..").Ref<"payment_method">>>>;
|
|
237
305
|
}, import("zod/v4/core").$strict>;
|
|
@@ -301,6 +369,23 @@ export declare const coreRoutes: readonly [{
|
|
|
301
369
|
carrier: import("zod").ZodOptional<import("zod").ZodString>;
|
|
302
370
|
tracking_number: import("zod").ZodOptional<import("zod").ZodString>;
|
|
303
371
|
}, import("zod/v4/core").$strict>, import("zod").ZodLiteral<"">]>>;
|
|
372
|
+
preferred_locales: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodArray<import("zod").ZodEnum<{
|
|
373
|
+
id: "id";
|
|
374
|
+
ar: "ar";
|
|
375
|
+
bn: "bn";
|
|
376
|
+
ca: "ca";
|
|
377
|
+
de: "de";
|
|
378
|
+
en: "en";
|
|
379
|
+
es: "es";
|
|
380
|
+
fr: "fr";
|
|
381
|
+
hi: "hi";
|
|
382
|
+
it: "it";
|
|
383
|
+
ja: "ja";
|
|
384
|
+
pt: "pt";
|
|
385
|
+
ru: "ru";
|
|
386
|
+
tr: "tr";
|
|
387
|
+
zh: "zh";
|
|
388
|
+
}>>, import("zod").ZodLiteral<"">]>>;
|
|
304
389
|
invoice_settings: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
305
390
|
default_payment_method: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodLiteral<"">]>>;
|
|
306
391
|
}, import("zod/v4/core").$strict>>;
|
|
@@ -337,6 +422,23 @@ export declare const coreRoutes: readonly [{
|
|
|
337
422
|
carrier: import("zod").ZodNullable<import("zod").ZodString>;
|
|
338
423
|
tracking_number: import("zod").ZodNullable<import("zod").ZodString>;
|
|
339
424
|
}, import("zod/v4/core").$strict>>;
|
|
425
|
+
preferred_locales: import("zod").ZodArray<import("zod").ZodEnum<{
|
|
426
|
+
id: "id";
|
|
427
|
+
ar: "ar";
|
|
428
|
+
bn: "bn";
|
|
429
|
+
ca: "ca";
|
|
430
|
+
de: "de";
|
|
431
|
+
en: "en";
|
|
432
|
+
es: "es";
|
|
433
|
+
fr: "fr";
|
|
434
|
+
hi: "hi";
|
|
435
|
+
it: "it";
|
|
436
|
+
ja: "ja";
|
|
437
|
+
pt: "pt";
|
|
438
|
+
ru: "ru";
|
|
439
|
+
tr: "tr";
|
|
440
|
+
zh: "zh";
|
|
441
|
+
}>>;
|
|
340
442
|
invoice_settings: import("zod").ZodObject<{
|
|
341
443
|
default_payment_method: import("zod").ZodNullable<import("zod").ZodType<string | import("../..").Ref<"payment_method">, string | import("../..").Ref<"payment_method">, import("zod/v4/core").$ZodTypeInternals<string | import("../..").Ref<"payment_method">, string | import("../..").Ref<"payment_method">>>>;
|
|
342
444
|
}, import("zod/v4/core").$strict>;
|
|
@@ -427,6 +529,23 @@ export declare const coreRoutes: readonly [{
|
|
|
427
529
|
carrier: import("zod").ZodNullable<import("zod").ZodString>;
|
|
428
530
|
tracking_number: import("zod").ZodNullable<import("zod").ZodString>;
|
|
429
531
|
}, import("zod/v4/core").$strict>>;
|
|
532
|
+
preferred_locales: import("zod").ZodArray<import("zod").ZodEnum<{
|
|
533
|
+
id: "id";
|
|
534
|
+
ar: "ar";
|
|
535
|
+
bn: "bn";
|
|
536
|
+
ca: "ca";
|
|
537
|
+
de: "de";
|
|
538
|
+
en: "en";
|
|
539
|
+
es: "es";
|
|
540
|
+
fr: "fr";
|
|
541
|
+
hi: "hi";
|
|
542
|
+
it: "it";
|
|
543
|
+
ja: "ja";
|
|
544
|
+
pt: "pt";
|
|
545
|
+
ru: "ru";
|
|
546
|
+
tr: "tr";
|
|
547
|
+
zh: "zh";
|
|
548
|
+
}>>;
|
|
430
549
|
invoice_settings: import("zod").ZodObject<{
|
|
431
550
|
default_payment_method: import("zod").ZodNullable<import("zod").ZodType<string | import("../..").Ref<"payment_method">, string | import("../..").Ref<"payment_method">, import("zod/v4/core").$ZodTypeInternals<string | import("../..").Ref<"payment_method">, string | import("../..").Ref<"payment_method">>>>;
|
|
432
551
|
}, import("zod/v4/core").$strict>;
|
|
@@ -178,6 +178,7 @@ export declare const paymentsRoutes: readonly [{
|
|
|
178
178
|
message: import("zod").ZodString;
|
|
179
179
|
}, import("zod/v4/core").$strict>>;
|
|
180
180
|
cancellation_reason: import("zod").ZodNullable<import("zod").ZodEnum<{
|
|
181
|
+
faircoin_network_closed: "faircoin_network_closed";
|
|
181
182
|
duplicate: "duplicate";
|
|
182
183
|
fraudulent: "fraudulent";
|
|
183
184
|
abandoned: "abandoned";
|
|
@@ -402,6 +403,7 @@ export declare const paymentsRoutes: readonly [{
|
|
|
402
403
|
message: import("zod").ZodString;
|
|
403
404
|
}, import("zod/v4/core").$strict>>;
|
|
404
405
|
cancellation_reason: import("zod").ZodNullable<import("zod").ZodEnum<{
|
|
406
|
+
faircoin_network_closed: "faircoin_network_closed";
|
|
405
407
|
duplicate: "duplicate";
|
|
406
408
|
fraudulent: "fraudulent";
|
|
407
409
|
abandoned: "abandoned";
|
|
@@ -607,6 +609,7 @@ export declare const paymentsRoutes: readonly [{
|
|
|
607
609
|
message: import("zod").ZodString;
|
|
608
610
|
}, import("zod/v4/core").$strict>>;
|
|
609
611
|
cancellation_reason: import("zod").ZodNullable<import("zod").ZodEnum<{
|
|
612
|
+
faircoin_network_closed: "faircoin_network_closed";
|
|
610
613
|
duplicate: "duplicate";
|
|
611
614
|
fraudulent: "fraudulent";
|
|
612
615
|
abandoned: "abandoned";
|
|
@@ -826,6 +829,7 @@ export declare const paymentsRoutes: readonly [{
|
|
|
826
829
|
message: import("zod").ZodString;
|
|
827
830
|
}, import("zod/v4/core").$strict>>;
|
|
828
831
|
cancellation_reason: import("zod").ZodNullable<import("zod").ZodEnum<{
|
|
832
|
+
faircoin_network_closed: "faircoin_network_closed";
|
|
829
833
|
duplicate: "duplicate";
|
|
830
834
|
fraudulent: "fraudulent";
|
|
831
835
|
abandoned: "abandoned";
|
|
@@ -1075,6 +1079,7 @@ export declare const paymentsRoutes: readonly [{
|
|
|
1075
1079
|
message: import("zod").ZodString;
|
|
1076
1080
|
}, import("zod/v4/core").$strict>>;
|
|
1077
1081
|
cancellation_reason: import("zod").ZodNullable<import("zod").ZodEnum<{
|
|
1082
|
+
faircoin_network_closed: "faircoin_network_closed";
|
|
1078
1083
|
duplicate: "duplicate";
|
|
1079
1084
|
fraudulent: "fraudulent";
|
|
1080
1085
|
abandoned: "abandoned";
|
|
@@ -1278,6 +1283,7 @@ export declare const paymentsRoutes: readonly [{
|
|
|
1278
1283
|
message: import("zod").ZodString;
|
|
1279
1284
|
}, import("zod/v4/core").$strict>>;
|
|
1280
1285
|
cancellation_reason: import("zod").ZodNullable<import("zod").ZodEnum<{
|
|
1286
|
+
faircoin_network_closed: "faircoin_network_closed";
|
|
1281
1287
|
duplicate: "duplicate";
|
|
1282
1288
|
fraudulent: "fraudulent";
|
|
1283
1289
|
abandoned: "abandoned";
|
|
@@ -1486,6 +1492,7 @@ export declare const paymentsRoutes: readonly [{
|
|
|
1486
1492
|
message: import("zod").ZodString;
|
|
1487
1493
|
}, import("zod/v4/core").$strict>>;
|
|
1488
1494
|
cancellation_reason: import("zod").ZodNullable<import("zod").ZodEnum<{
|
|
1495
|
+
faircoin_network_closed: "faircoin_network_closed";
|
|
1489
1496
|
duplicate: "duplicate";
|
|
1490
1497
|
fraudulent: "fraudulent";
|
|
1491
1498
|
abandoned: "abandoned";
|
|
@@ -1687,6 +1694,7 @@ export declare const paymentsRoutes: readonly [{
|
|
|
1687
1694
|
message: import("zod").ZodString;
|
|
1688
1695
|
}, import("zod/v4/core").$strict>>;
|
|
1689
1696
|
cancellation_reason: import("zod").ZodNullable<import("zod").ZodEnum<{
|
|
1697
|
+
faircoin_network_closed: "faircoin_network_closed";
|
|
1690
1698
|
duplicate: "duplicate";
|
|
1691
1699
|
fraudulent: "fraudulent";
|
|
1692
1700
|
abandoned: "abandoned";
|
|
@@ -1888,6 +1896,7 @@ export declare const paymentsRoutes: readonly [{
|
|
|
1888
1896
|
message: import("zod").ZodString;
|
|
1889
1897
|
}, import("zod/v4/core").$strict>>;
|
|
1890
1898
|
cancellation_reason: import("zod").ZodNullable<import("zod").ZodEnum<{
|
|
1899
|
+
faircoin_network_closed: "faircoin_network_closed";
|
|
1891
1900
|
duplicate: "duplicate";
|
|
1892
1901
|
fraudulent: "fraudulent";
|
|
1893
1902
|
abandoned: "abandoned";
|
|
@@ -3703,7 +3712,7 @@ export declare const paymentsRoutes: readonly [{
|
|
|
3703
3712
|
readonly path: "/v1/social/{username}/next_address";
|
|
3704
3713
|
readonly tag: "Social payments";
|
|
3705
3714
|
readonly summary: "Reserve an address to pay a person";
|
|
3706
|
-
readonly description: "A fresh address of the recipient's, derived from their Oxy identity key. Limited per (sender, recipient) pair; a recipient without an identity answers 409 `keyless_recipient`; paying yourself is refused.";
|
|
3715
|
+
readonly description: "A fresh address of the recipient's, derived from their Oxy identity key. Limited per (sender, recipient) pair; a recipient without an identity answers 409 `keyless_recipient`, and one whose wallet watches no further address (every index below its watched bound is taken) 503 `faircoin_receive_tree_full`; paying yourself is refused.";
|
|
3707
3716
|
readonly auth: "user";
|
|
3708
3717
|
readonly params: {
|
|
3709
3718
|
readonly username: "The recipient’s Oxy username.";
|
|
@@ -3911,6 +3920,7 @@ export declare const paymentsRoutes: readonly [{
|
|
|
3911
3920
|
message: import("zod").ZodString;
|
|
3912
3921
|
}, import("zod/v4/core").$strict>>;
|
|
3913
3922
|
cancellation_reason: import("zod").ZodNullable<import("zod").ZodEnum<{
|
|
3923
|
+
faircoin_network_closed: "faircoin_network_closed";
|
|
3914
3924
|
duplicate: "duplicate";
|
|
3915
3925
|
fraudulent: "fraudulent";
|
|
3916
3926
|
abandoned: "abandoned";
|
|
@@ -262,6 +262,7 @@ export declare const paymentIntentSchema: z.ZodObject<{
|
|
|
262
262
|
message: z.ZodString;
|
|
263
263
|
}, z.core.$strict>>;
|
|
264
264
|
cancellation_reason: z.ZodNullable<z.ZodEnum<{
|
|
265
|
+
faircoin_network_closed: "faircoin_network_closed";
|
|
265
266
|
duplicate: "duplicate";
|
|
266
267
|
fraudulent: "fraudulent";
|
|
267
268
|
abandoned: "abandoned";
|
|
@@ -770,6 +771,7 @@ export declare const paymentIntentRoutes: readonly [{
|
|
|
770
771
|
message: z.ZodString;
|
|
771
772
|
}, z.core.$strict>>;
|
|
772
773
|
cancellation_reason: z.ZodNullable<z.ZodEnum<{
|
|
774
|
+
faircoin_network_closed: "faircoin_network_closed";
|
|
773
775
|
duplicate: "duplicate";
|
|
774
776
|
fraudulent: "fraudulent";
|
|
775
777
|
abandoned: "abandoned";
|
|
@@ -994,6 +996,7 @@ export declare const paymentIntentRoutes: readonly [{
|
|
|
994
996
|
message: z.ZodString;
|
|
995
997
|
}, z.core.$strict>>;
|
|
996
998
|
cancellation_reason: z.ZodNullable<z.ZodEnum<{
|
|
999
|
+
faircoin_network_closed: "faircoin_network_closed";
|
|
997
1000
|
duplicate: "duplicate";
|
|
998
1001
|
fraudulent: "fraudulent";
|
|
999
1002
|
abandoned: "abandoned";
|
|
@@ -1199,6 +1202,7 @@ export declare const paymentIntentRoutes: readonly [{
|
|
|
1199
1202
|
message: z.ZodString;
|
|
1200
1203
|
}, z.core.$strict>>;
|
|
1201
1204
|
cancellation_reason: z.ZodNullable<z.ZodEnum<{
|
|
1205
|
+
faircoin_network_closed: "faircoin_network_closed";
|
|
1202
1206
|
duplicate: "duplicate";
|
|
1203
1207
|
fraudulent: "fraudulent";
|
|
1204
1208
|
abandoned: "abandoned";
|
|
@@ -1418,6 +1422,7 @@ export declare const paymentIntentRoutes: readonly [{
|
|
|
1418
1422
|
message: z.ZodString;
|
|
1419
1423
|
}, z.core.$strict>>;
|
|
1420
1424
|
cancellation_reason: z.ZodNullable<z.ZodEnum<{
|
|
1425
|
+
faircoin_network_closed: "faircoin_network_closed";
|
|
1421
1426
|
duplicate: "duplicate";
|
|
1422
1427
|
fraudulent: "fraudulent";
|
|
1423
1428
|
abandoned: "abandoned";
|
|
@@ -1667,6 +1672,7 @@ export declare const paymentIntentRoutes: readonly [{
|
|
|
1667
1672
|
message: z.ZodString;
|
|
1668
1673
|
}, z.core.$strict>>;
|
|
1669
1674
|
cancellation_reason: z.ZodNullable<z.ZodEnum<{
|
|
1675
|
+
faircoin_network_closed: "faircoin_network_closed";
|
|
1670
1676
|
duplicate: "duplicate";
|
|
1671
1677
|
fraudulent: "fraudulent";
|
|
1672
1678
|
abandoned: "abandoned";
|
|
@@ -1870,6 +1876,7 @@ export declare const paymentIntentRoutes: readonly [{
|
|
|
1870
1876
|
message: z.ZodString;
|
|
1871
1877
|
}, z.core.$strict>>;
|
|
1872
1878
|
cancellation_reason: z.ZodNullable<z.ZodEnum<{
|
|
1879
|
+
faircoin_network_closed: "faircoin_network_closed";
|
|
1873
1880
|
duplicate: "duplicate";
|
|
1874
1881
|
fraudulent: "fraudulent";
|
|
1875
1882
|
abandoned: "abandoned";
|
|
@@ -2078,6 +2085,7 @@ export declare const paymentIntentRoutes: readonly [{
|
|
|
2078
2085
|
message: z.ZodString;
|
|
2079
2086
|
}, z.core.$strict>>;
|
|
2080
2087
|
cancellation_reason: z.ZodNullable<z.ZodEnum<{
|
|
2088
|
+
faircoin_network_closed: "faircoin_network_closed";
|
|
2081
2089
|
duplicate: "duplicate";
|
|
2082
2090
|
fraudulent: "fraudulent";
|
|
2083
2091
|
abandoned: "abandoned";
|
|
@@ -2279,6 +2287,7 @@ export declare const paymentIntentRoutes: readonly [{
|
|
|
2279
2287
|
message: z.ZodString;
|
|
2280
2288
|
}, z.core.$strict>>;
|
|
2281
2289
|
cancellation_reason: z.ZodNullable<z.ZodEnum<{
|
|
2290
|
+
faircoin_network_closed: "faircoin_network_closed";
|
|
2282
2291
|
duplicate: "duplicate";
|
|
2283
2292
|
fraudulent: "fraudulent";
|
|
2284
2293
|
abandoned: "abandoned";
|
|
@@ -2480,6 +2489,7 @@ export declare const paymentIntentRoutes: readonly [{
|
|
|
2480
2489
|
message: z.ZodString;
|
|
2481
2490
|
}, z.core.$strict>>;
|
|
2482
2491
|
cancellation_reason: z.ZodNullable<z.ZodEnum<{
|
|
2492
|
+
faircoin_network_closed: "faircoin_network_closed";
|
|
2483
2493
|
duplicate: "duplicate";
|
|
2484
2494
|
fraudulent: "fraudulent";
|
|
2485
2495
|
abandoned: "abandoned";
|
|
@@ -166,7 +166,7 @@ export declare const socialRoutes: readonly [{
|
|
|
166
166
|
readonly path: "/v1/social/{username}/next_address";
|
|
167
167
|
readonly tag: "Social payments";
|
|
168
168
|
readonly summary: "Reserve an address to pay a person";
|
|
169
|
-
readonly description: "A fresh address of the recipient's, derived from their Oxy identity key. Limited per (sender, recipient) pair; a recipient without an identity answers 409 `keyless_recipient`; paying yourself is refused.";
|
|
169
|
+
readonly description: "A fresh address of the recipient's, derived from their Oxy identity key. Limited per (sender, recipient) pair; a recipient without an identity answers 409 `keyless_recipient`, and one whose wallet watches no further address (every index below its watched bound is taken) 503 `faircoin_receive_tree_full`; paying yourself is refused.";
|
|
170
170
|
readonly auth: "user";
|
|
171
171
|
readonly params: {
|
|
172
172
|
readonly username: "The recipient’s Oxy username.";
|
|
@@ -120,6 +120,7 @@ export declare const paymentIntentTestHelperRoutes: readonly [{
|
|
|
120
120
|
message: z.ZodString;
|
|
121
121
|
}, z.core.$strict>>;
|
|
122
122
|
cancellation_reason: z.ZodNullable<z.ZodEnum<{
|
|
123
|
+
faircoin_network_closed: "faircoin_network_closed";
|
|
123
124
|
duplicate: "duplicate";
|
|
124
125
|
fraudulent: "fraudulent";
|
|
125
126
|
abandoned: "abandoned";
|
|
@@ -109,6 +109,7 @@ export declare const ERROR_CODE_DESCRIPTIONS: {
|
|
|
109
109
|
readonly faircoin_wallet_missing: "The Peable wallet that receives this payment (the merchant owner's, or the seller's) isn't set up yet, so it cannot be paid in FairCoin. The other payment methods still work.";
|
|
110
110
|
readonly faircoin_network_closed: "FairCoin payments on this network are not open on this deployment yet. The other payment methods still work.";
|
|
111
111
|
readonly faircoin_capacity_reached: "Too many FairCoin payments to this recipient are waiting to be paid right now, so no new FairCoin address can be handed out. The other payment methods still work; try FairCoin again shortly.";
|
|
112
|
+
readonly faircoin_receive_tree_full: "Every FairCoin address the recipient's Peable wallet watches has been handed out, so no new one can be derived for them. Nothing was reserved.";
|
|
112
113
|
readonly faircoin_amount_too_small: "One seller's share of this order is below the smallest amount the FairCoin network relays, so it cannot be paid in FairCoin. The other payment methods still work.";
|
|
113
114
|
readonly credit_note_exceeds_invoice: "The credit note's amount exceeds what the invoice can still credit.";
|
|
114
115
|
readonly test_clock_unexpected_state: "The test clock is advancing; wait until it is ready.";
|
|
@@ -20,14 +20,17 @@ export declare const PAYMENT_INTENT_MAX_EXPIRES_IN_SECONDS: number;
|
|
|
20
20
|
export declare const PAYMENT_INTENT_STATUSES: readonly ["requires_payment_method", "requires_confirmation", "requires_action", "processing", "requires_capture", "succeeded", "canceled"];
|
|
21
21
|
export type PaymentIntentStatus = (typeof PAYMENT_INTENT_STATUSES)[number];
|
|
22
22
|
/**
|
|
23
|
-
* Why an intent was cancelled — Stripe's reasons, plus
|
|
24
|
-
* `underpaid` (a transaction paid less than the amount)
|
|
23
|
+
* Why an intent was cancelled — Stripe's reasons, plus three FairCoin-only ones:
|
|
24
|
+
* `underpaid` (a transaction paid less than the amount),
|
|
25
25
|
* `recipient_key_changed` (the recipient's identity key was replaced after the
|
|
26
26
|
* address was reserved, so the address is no longer in the wallet it pays —
|
|
27
27
|
* ADR 0002, amended 2026-11-06; nothing had been broadcast, and the order stays
|
|
28
|
-
* open for a fresh address)
|
|
28
|
+
* open for a fresh address) and `faircoin_network_closed` (the deployment
|
|
29
|
+
* closed the payment's FairCoin network — ADR 0002's gate — before anything was
|
|
30
|
+
* broadcast; the order stays open, and FairCoin on it says the network is
|
|
31
|
+
* closed).
|
|
29
32
|
*/
|
|
30
|
-
export declare const PAYMENT_INTENT_CANCELLATION_REASONS: readonly ["abandoned", "automatic", "duplicate", "fraudulent", "recipient_key_changed", "requested_by_customer", "underpaid"];
|
|
33
|
+
export declare const PAYMENT_INTENT_CANCELLATION_REASONS: readonly ["abandoned", "automatic", "duplicate", "faircoin_network_closed", "fraudulent", "recipient_key_changed", "requested_by_customer", "underpaid"];
|
|
31
34
|
export type PaymentIntentCancellationReason = (typeof PAYMENT_INTENT_CANCELLATION_REASONS)[number];
|
|
32
35
|
/** The reasons a MERCHANT may give `POST /v1/payment_intents/:id/cancel`. */
|
|
33
36
|
export declare const MERCHANT_CANCELLATION_REASONS: readonly ["abandoned", "duplicate", "fraudulent", "requested_by_customer"];
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The size of a recipient's FairCoin receive tree (ADR 0021 D9, amended
|
|
3
|
+
* 2026-11-06) — ONE answer, read by the gateway that hands out indices and by
|
|
4
|
+
* the Peable wallet that watches them.
|
|
5
|
+
*
|
|
6
|
+
* Every FairCoin address the gateway reserves for an account — a merchant
|
|
7
|
+
* payment, a marketplace seller's, an invoice's, `@username` — is index `i` of
|
|
8
|
+
* that account's identity tree (ADR 0002, ADR 0021 D5). The wallet watches a
|
|
9
|
+
* contiguous window, indices `0 .. SOCIAL_RECEIVE_MAX_WATCHED - 1`, reaching
|
|
10
|
+
* {@link SOCIAL_RECEIVE_GAP_LIMIT} past the highest index reserved
|
|
11
|
+
* (`planSocialReceiveWindow` in `packages/frontend/src/wallet/social-receive.ts`),
|
|
12
|
+
* and stops offering `@username` once that reach would pass its bound. So an
|
|
13
|
+
* index is reserved only when the wallet, after reserving it, still reaches
|
|
14
|
+
* the gap above it inside its bound:
|
|
15
|
+
*
|
|
16
|
+
* index + SOCIAL_RECEIVE_GAP_LIMIT <= SOCIAL_RECEIVE_MAX_WATCHED - 1
|
|
17
|
+
* index < SOCIAL_RECEIVE_INDEX_LIMIT
|
|
18
|
+
*
|
|
19
|
+
* The gateway refuses to mint `index >= SOCIAL_RECEIVE_INDEX_LIMIT` (in the
|
|
20
|
+
* reservation's own statement), so every address it hands out is inside the
|
|
21
|
+
* window the wallet watches. Zod-free and dependency-free: the wallet bundles
|
|
22
|
+
* this module alone (`@peable.to/contracts/vocabulary/receiveTree`).
|
|
23
|
+
*/
|
|
24
|
+
/** The most indices the wallet watches: `0 .. SOCIAL_RECEIVE_MAX_WATCHED - 1`. */
|
|
25
|
+
export declare const SOCIAL_RECEIVE_MAX_WATCHED = 2000;
|
|
26
|
+
/**
|
|
27
|
+
* How many unused addresses the wallet watches beyond the highest index used
|
|
28
|
+
* or reserved — the FairCoin BIP44 external-chain gap limit.
|
|
29
|
+
*/
|
|
30
|
+
export declare const SOCIAL_RECEIVE_GAP_LIMIT = 20;
|
|
31
|
+
/**
|
|
32
|
+
* The first index the gateway never mints (exclusive bound): `1 980`. Every
|
|
33
|
+
* minted index `i` satisfies `i < SOCIAL_RECEIVE_INDEX_LIMIT`, i.e.
|
|
34
|
+
* `i + SOCIAL_RECEIVE_GAP_LIMIT <= SOCIAL_RECEIVE_MAX_WATCHED - 1`.
|
|
35
|
+
*/
|
|
36
|
+
export declare const SOCIAL_RECEIVE_INDEX_LIMIT: number;
|
|
37
|
+
/**
|
|
38
|
+
* How close to {@link SOCIAL_RECEIVE_INDEX_LIMIT} a tree is "nearly full":
|
|
39
|
+
* Orbit warns the owners once fewer fresh indices than this are left.
|
|
40
|
+
*/
|
|
41
|
+
export declare const SOCIAL_RECEIVE_NEARLY_FULL_REMAINING = 200;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@peable.to/contracts",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.6.0",
|
|
4
4
|
"description": "The Peable wire, declared once: Zod contracts of every public route, the OpenAPI 3.1 generator and the closed value sets (ADR 0014 D5).",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|