@hsuite/smart-engines-cli 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -2
- package/dist/_lib/cluster-convergence.d.ts.map +1 -1
- package/dist/_lib/cluster-convergence.js +1 -1
- package/dist/_lib/cluster-convergence.js.map +1 -1
- package/dist/_lib/deposit-verification.d.ts +91 -0
- package/dist/_lib/deposit-verification.d.ts.map +1 -0
- package/dist/_lib/deposit-verification.js +265 -0
- package/dist/_lib/deposit-verification.js.map +1 -0
- package/dist/_lib/payment-guard.d.ts +2 -2
- package/dist/_lib/payment-guard.d.ts.map +1 -1
- package/dist/_lib/payment-guard.js.map +1 -1
- package/dist/_lib/payment-record.d.ts +6 -0
- package/dist/_lib/payment-record.d.ts.map +1 -1
- package/dist/_lib/payment-record.js +7 -1
- package/dist/_lib/payment-record.js.map +1 -1
- package/dist/_lib/subscription-client.d.ts +152 -4
- package/dist/_lib/subscription-client.d.ts.map +1 -1
- package/dist/_lib/subscription-client.js +35 -2
- package/dist/_lib/subscription-client.js.map +1 -1
- package/dist/_lib/swap-payment.d.ts +54 -0
- package/dist/_lib/swap-payment.d.ts.map +1 -0
- package/dist/_lib/swap-payment.js +203 -0
- package/dist/_lib/swap-payment.js.map +1 -0
- package/dist/_lib/xrp-payment.d.ts +20 -5
- package/dist/_lib/xrp-payment.d.ts.map +1 -1
- package/dist/_lib/xrp-payment.js +26 -8
- package/dist/_lib/xrp-payment.js.map +1 -1
- package/dist/commands/billing.d.ts +5 -3
- package/dist/commands/billing.d.ts.map +1 -1
- package/dist/commands/billing.js +12 -6
- package/dist/commands/billing.js.map +1 -1
- package/dist/commands/deploy.d.ts +1 -1
- package/dist/commands/deploy.js +2 -2
- package/dist/commands/deploy.js.map +1 -1
- package/dist/commands/list.d.ts.map +1 -1
- package/dist/commands/list.js +4 -2
- package/dist/commands/list.js.map +1 -1
- package/dist/commands/redeploy.d.ts +4 -3
- package/dist/commands/redeploy.d.ts.map +1 -1
- package/dist/commands/redeploy.js +5 -4
- package/dist/commands/redeploy.js.map +1 -1
- package/dist/commands/renew.d.ts +47 -4
- package/dist/commands/renew.d.ts.map +1 -1
- package/dist/commands/renew.js +338 -9
- package/dist/commands/renew.js.map +1 -1
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +22 -2
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/subscribe.d.ts +22 -0
- package/dist/commands/subscribe.d.ts.map +1 -1
- package/dist/commands/subscribe.js +207 -9
- package/dist/commands/subscribe.js.map +1 -1
- package/dist/commands/topup.d.ts +14 -0
- package/dist/commands/topup.d.ts.map +1 -1
- package/dist/commands/topup.js +22 -2
- package/dist/commands/topup.js.map +1 -1
- package/dist/commands/upgrade.d.ts +7 -0
- package/dist/commands/upgrade.d.ts.map +1 -1
- package/dist/commands/upgrade.js +20 -1
- package/dist/commands/upgrade.js.map +1 -1
- package/dist/commands/verify.js +1 -1
- package/dist/commands/verify.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +9 -9
- package/dist/__tests__/helpers/fixtures-image-hygiene.d.ts +0 -18
- package/dist/__tests__/helpers/fixtures-image-hygiene.d.ts.map +0 -1
- package/dist/__tests__/helpers/fixtures-image-hygiene.js +0 -42
- package/dist/__tests__/helpers/fixtures-image-hygiene.js.map +0 -1
- package/dist/__tests__/helpers/fixtures.d.ts +0 -48
- package/dist/__tests__/helpers/fixtures.d.ts.map +0 -1
- package/dist/__tests__/helpers/fixtures.js +0 -79
- package/dist/__tests__/helpers/fixtures.js.map +0 -1
- package/dist/__tests__/helpers/xrpl-signing.d.ts +0 -26
- package/dist/__tests__/helpers/xrpl-signing.d.ts.map +0 -1
- package/dist/__tests__/helpers/xrpl-signing.js +0 -39
- package/dist/__tests__/helpers/xrpl-signing.js.map +0 -1
|
@@ -51,6 +51,12 @@ export type DepositInstructions = {
|
|
|
51
51
|
orderId?: string;
|
|
52
52
|
/** #3699 — the order's locked quote expiry (deadline display comes in PR1b). */
|
|
53
53
|
expiresAt?: string;
|
|
54
|
+
/**
|
|
55
|
+
* #4081 — present ONLY on the answer to a repeated `request` for a subscription still awaiting its deposit:
|
|
56
|
+
* whether `expiresAt` had already passed on the validator's clock. The validator requotes a lapsed order itself, so
|
|
57
|
+
* `true` means it could not and these are the lapsed quote's instructions.
|
|
58
|
+
*/
|
|
59
|
+
expired?: boolean;
|
|
54
60
|
/** #3699 — the CSPRNG tag the auto-pay Payment must carry so PR1b's
|
|
55
61
|
* `account_tx` matcher (never bare `Amount`) can find it. */
|
|
56
62
|
destinationTag?: number;
|
|
@@ -74,6 +80,59 @@ export type DepositInstructions = {
|
|
|
74
80
|
address: string;
|
|
75
81
|
destinationTag: number;
|
|
76
82
|
};
|
|
83
|
+
/**
|
|
84
|
+
* #3699 PR3 — present ONLY for an order paid through a swap provider (BTC, ETH, ...): what the BUILDER sends,
|
|
85
|
+
* and where. This CLI cannot spend those assets and never tries: it prints this and stops. There is no `pay`
|
|
86
|
+
* block with it, and the HST fields above describe what the deposit account ends up holding once the provider
|
|
87
|
+
* has landed the XRP and the platform has converted it.
|
|
88
|
+
*/
|
|
89
|
+
swap?: SwapPaymentInstruction;
|
|
90
|
+
/**
|
|
91
|
+
* #3699 pre-arming item 4 — `true` when this plain XRP order (`pay`) is the REMAINDER of a swap order: what is still
|
|
92
|
+
* owed after the swap's XRP reached the deposit account short. The builder chose to pay in another asset, so this CLI
|
|
93
|
+
* prints the instruction and stops unless the builder asks it to pay XRP (`--pay-with xrp`).
|
|
94
|
+
*/
|
|
95
|
+
swapRemainder?: boolean;
|
|
96
|
+
/**
|
|
97
|
+
* #3699 pre-arming item 4 — with `swapRemainder`: the order's status when this was answered. `paid` / `converting`
|
|
98
|
+
* mean the remainder has been counted and is being converted: nothing is left to send.
|
|
99
|
+
*/
|
|
100
|
+
orderStatus?: string;
|
|
101
|
+
};
|
|
102
|
+
/** What to send to the swap provider (#3699 PR3); see {@link DepositInstructions.swap}. */
|
|
103
|
+
export type SwapPaymentInstruction = {
|
|
104
|
+
provider: string;
|
|
105
|
+
exchangeId: string;
|
|
106
|
+
/** The source asset's ticker, upper case ('BTC'). */
|
|
107
|
+
asset: string;
|
|
108
|
+
/** The network it is sent on ('btc', 'trx'). */
|
|
109
|
+
network: string;
|
|
110
|
+
/** How much to send, a plain decimal in the asset's own units. */
|
|
111
|
+
amount: string;
|
|
112
|
+
/** The provider's deposit address. */
|
|
113
|
+
payinAddress: string;
|
|
114
|
+
/** The memo the payment must carry, for an asset that uses one. */
|
|
115
|
+
payinExtraId?: string;
|
|
116
|
+
/** The provider holds this price until then (ISO time). */
|
|
117
|
+
validUntil: string;
|
|
118
|
+
/** Where the provider returns the funds if the exchange cannot complete: the builder's own. */
|
|
119
|
+
refundAddress: string;
|
|
120
|
+
refundExtraId?: string;
|
|
121
|
+
/** The XRP the exchange lands on the deposit account (a plain decimal). */
|
|
122
|
+
toAmountXrp: string;
|
|
123
|
+
/** The order's status: `paid` / `converting` mean the payout has landed and the platform is converting it. */
|
|
124
|
+
status?: string;
|
|
125
|
+
};
|
|
126
|
+
/** One entry of `GET /api/v3/subscription/payment-assets` (#3699 PR3). */
|
|
127
|
+
export type PaymentAssetOption = {
|
|
128
|
+
symbol: string;
|
|
129
|
+
kind: 'native' | 'swap';
|
|
130
|
+
chain: string;
|
|
131
|
+
network?: string;
|
|
132
|
+
name?: string;
|
|
133
|
+
provider?: string;
|
|
134
|
+
/** The asset's refund addresses take a memo, which `--refund-extra-id` must then carry. */
|
|
135
|
+
refundExtraIdRequired?: boolean;
|
|
77
136
|
};
|
|
78
137
|
/**
|
|
79
138
|
* Canonical `ValidatorRules` block — what the validator's mandatory creation
|
|
@@ -135,6 +194,14 @@ export type CreateAppPayload = {
|
|
|
135
194
|
* the order's tag) or refuses (`xrp_quote_unavailable:`, or "not yet supported" when XRP payments are off).
|
|
136
195
|
*/
|
|
137
196
|
paymentAsset?: string;
|
|
197
|
+
/**
|
|
198
|
+
* #3699 PR3 — for a SWAP asset (anything but hsuite and xrp): the network the ticker travels on when it has
|
|
199
|
+
* several, and where the swap provider returns the builder's funds if the exchange cannot complete
|
|
200
|
+
* (`refundAddress`, required by the validator for a swap asset) with its memo (`refundExtraId`).
|
|
201
|
+
*/
|
|
202
|
+
paymentNetwork?: string;
|
|
203
|
+
refundAddress?: string;
|
|
204
|
+
refundExtraId?: string;
|
|
138
205
|
};
|
|
139
206
|
/**
|
|
140
207
|
* Response from `POST /api/v3/smart-apps` (SmartAppController.create).
|
|
@@ -184,9 +251,36 @@ export type SubscriptionStatusResponse = {
|
|
|
184
251
|
expiresAt?: string | number;
|
|
185
252
|
remainingBalance?: string;
|
|
186
253
|
createdAt?: string | number;
|
|
254
|
+
/** #4081 — the tier the subscription is on, in every state. */
|
|
255
|
+
tier?: string;
|
|
256
|
+
/** #4081 — the scheduled tier change, while one exists. Same spelling as the upgrade/downgrade answers. */
|
|
257
|
+
pendingTierChange?: {
|
|
258
|
+
fromTier: string;
|
|
259
|
+
toTier: string;
|
|
260
|
+
direction: 'upgrade' | 'downgrade';
|
|
261
|
+
/** ISO-8601; a downgrade's renewal boundary. Never present for an upgrade. */
|
|
262
|
+
effectiveAt?: string;
|
|
263
|
+
orderId?: string;
|
|
264
|
+
};
|
|
265
|
+
/** #4081 — while `pending_deposit`: the order the deposit is waiting on (the one `getOrder` returns). */
|
|
266
|
+
currentOrder?: {
|
|
267
|
+
orderId: string;
|
|
268
|
+
status: string;
|
|
269
|
+
pay?: {
|
|
270
|
+
asset: string;
|
|
271
|
+
amount: string;
|
|
272
|
+
address: string;
|
|
273
|
+
destinationTag: number;
|
|
274
|
+
};
|
|
275
|
+
swap?: SwapPaymentInstruction;
|
|
276
|
+
swapRemainder?: true;
|
|
277
|
+
expiresAt: string;
|
|
278
|
+
receivedAmount?: string;
|
|
279
|
+
};
|
|
187
280
|
depositWallet?: {
|
|
188
281
|
walletAddress: string;
|
|
189
282
|
chain: string;
|
|
283
|
+
/** The deposit required at creation (the bond); a tier upgrade does not raise it. `actualDepositAmount` is what the account holds. */
|
|
190
284
|
depositAmount: string;
|
|
191
285
|
status: string;
|
|
192
286
|
actualDepositAmount?: string;
|
|
@@ -205,12 +299,21 @@ export type RenewResponse = {
|
|
|
205
299
|
appId: string;
|
|
206
300
|
newExpiresAt?: string | number;
|
|
207
301
|
message?: string;
|
|
302
|
+
/**
|
|
303
|
+
* #3699 — set when renewal is PAID on the validator (`subscription.renewal.paid`): nothing is extended yet, and
|
|
304
|
+
* `depositInstructions` is the price-locked `renew` order to pay (its `orderStatus` says whether a payment has
|
|
305
|
+
* already been seen). Absent when the validator extends the lock and takes no payment, as it always did.
|
|
306
|
+
*/
|
|
307
|
+
pendingPayment?: boolean;
|
|
308
|
+
depositInstructions?: DepositInstructions;
|
|
208
309
|
};
|
|
209
310
|
export type TierChangeResponse = {
|
|
210
311
|
success: boolean;
|
|
211
312
|
appId: string;
|
|
212
313
|
fromTier?: string;
|
|
213
314
|
toTier?: string;
|
|
315
|
+
/** #4081 — `direction` is the one name for the kind of a tier change in every response. */
|
|
316
|
+
direction?: 'upgrade' | 'downgrade';
|
|
214
317
|
effectiveAt?: string | number;
|
|
215
318
|
depositInstructions?: DepositInstructions;
|
|
216
319
|
message?: string;
|
|
@@ -240,16 +343,30 @@ export type UsageStatusResponse = {
|
|
|
240
343
|
};
|
|
241
344
|
projectedDaysUntilLimit: number | null;
|
|
242
345
|
};
|
|
346
|
+
/**
|
|
347
|
+
* One page of `GET /api/v3/subscription/billing/:appId` (#4092 C4): the orders of the app that took a payment, and its
|
|
348
|
+
* float credits, newest first. Kept local (the published SDK this CLI depends on predates the entry type).
|
|
349
|
+
*/
|
|
243
350
|
export type BillingLedgerResponse = {
|
|
244
351
|
appId: string;
|
|
245
352
|
entries: Array<{
|
|
353
|
+
/** The order id, or `credit:<tx hash>` for a float credit. */
|
|
246
354
|
id: string;
|
|
247
|
-
|
|
355
|
+
/** `subscribe` (the initial deposit), `upgrade`, `topup`, `renew` or `credit`. */
|
|
248
356
|
operation: string;
|
|
357
|
+
status: string;
|
|
358
|
+
tier?: string;
|
|
359
|
+
priceUsd?: number;
|
|
360
|
+
/** `HSUITE`, or `XRP` for an XRP order. */
|
|
361
|
+
asset: string;
|
|
362
|
+
/** What reached the deposit account, exact: XRP drops, or an HST decimal (`'49.5'`). */
|
|
249
363
|
amount: string;
|
|
250
|
-
|
|
364
|
+
due?: string;
|
|
365
|
+
/** XRP orders: the HST its conversion delivered. */
|
|
366
|
+
hsuiteCredited?: string;
|
|
367
|
+
txHashes: string[];
|
|
368
|
+
account?: string;
|
|
251
369
|
timestamp: string;
|
|
252
|
-
metadata?: Record<string, unknown>;
|
|
253
370
|
}>;
|
|
254
371
|
total: number;
|
|
255
372
|
hasMore: boolean;
|
|
@@ -362,6 +479,14 @@ export declare class SubscriptionClient {
|
|
|
362
479
|
appId: string;
|
|
363
480
|
configCid?: string;
|
|
364
481
|
}>;
|
|
482
|
+
/**
|
|
483
|
+
* What a subscription can be paid in right now (`GET /api/v3/subscription/payment-assets`, public): HSUITE,
|
|
484
|
+
* XRP when it is on, and the swap provider's assets when swap payments are on (#3699 PR3). Called through the
|
|
485
|
+
* same HTTP client as the rest, so no SDK release is needed for it.
|
|
486
|
+
*/
|
|
487
|
+
paymentAssets(): Promise<{
|
|
488
|
+
assets: PaymentAssetOption[];
|
|
489
|
+
}>;
|
|
365
490
|
request(payload: {
|
|
366
491
|
appId: string;
|
|
367
492
|
developerAccountId: string;
|
|
@@ -372,6 +497,13 @@ export declare class SubscriptionClient {
|
|
|
372
497
|
appDescription?: string;
|
|
373
498
|
logoUrl?: string;
|
|
374
499
|
metadata?: Record<string, unknown>;
|
|
500
|
+
/** #3699 PR2/PR3 — the asset to pay in (a symbol); the swap fields go with a swap asset. */
|
|
501
|
+
paymentAsset?: string | {
|
|
502
|
+
symbol: string;
|
|
503
|
+
network?: string;
|
|
504
|
+
};
|
|
505
|
+
refundAddress?: string;
|
|
506
|
+
refundExtraId?: string;
|
|
375
507
|
/** The developer's signed intent for the deposit wallet this request creates (#3506 A2c). */
|
|
376
508
|
depositCreationIntent?: CreationIntentProof;
|
|
377
509
|
}): Promise<SubscriptionRequestResponse>;
|
|
@@ -383,7 +515,11 @@ export declare class SubscriptionClient {
|
|
|
383
515
|
depositTokenId(chain: string): Promise<string | undefined>;
|
|
384
516
|
status(appId: string): Promise<SubscriptionStatusResponse>;
|
|
385
517
|
mint(appId: string): Promise<MintResponse>;
|
|
386
|
-
|
|
518
|
+
/**
|
|
519
|
+
* `paymentAsset` (`HSUITE` | `XRP`) is read only by a PAID renewal (#3699), which prices the order in it; it rides
|
|
520
|
+
* the request only when named, so a request that names none is the call it always was.
|
|
521
|
+
*/
|
|
522
|
+
renew(appId: string, additionalDays?: number, paymentAsset?: string): Promise<RenewResponse>;
|
|
387
523
|
/**
|
|
388
524
|
* Request a SAME-TIER prepaid-float top-up (#2857).
|
|
389
525
|
*
|
|
@@ -425,4 +561,16 @@ export declare class SubscriptionClient {
|
|
|
425
561
|
usageStatus(appId: string): Promise<UsageStatusResponse>;
|
|
426
562
|
billing(appId: string, limit?: number, offset?: number): Promise<BillingLedgerResponse>;
|
|
427
563
|
}
|
|
564
|
+
/**
|
|
565
|
+
* The code a validator's retryable 503 carries when it has not yet replicated the subscription of an app its caller
|
|
566
|
+
* owns (#4081): `subscription_not_replicated: ...` in the message, with `Retry-After`.
|
|
567
|
+
*/
|
|
568
|
+
export declare const SUBSCRIPTION_NOT_REPLICATED_CODE = "subscription_not_replicated";
|
|
569
|
+
/** Is `err` the validator's "this node has not replicated that subscription yet" 503 (see {@link SUBSCRIPTION_NOT_REPLICATED_CODE})? */
|
|
570
|
+
export declare function isSubscriptionNotReplicatedYet(err: unknown): boolean;
|
|
571
|
+
/**
|
|
572
|
+
* What a polling loop reads in place of that 503: the not-found answer a node that does not hold the subscription gave
|
|
573
|
+
* before #4081, which every wait for a deposit already waits through (its `done` test is false, so it polls again).
|
|
574
|
+
*/
|
|
575
|
+
export declare function notYetReplicatedStatus(appId: string): SubscriptionStatusResponse;
|
|
428
576
|
//# sourceMappingURL=subscription-client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscription-client.d.ts","sourceRoot":"","sources":["../../src/_lib/subscription-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,OAAO,EAML,KAAK,iBAAiB,EACvB,MAAM,2BAA2B,CAAC;AAEnC,YAAY,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAInE,MAAM,MAAM,mBAAmB,GAAG;IAChC,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,sEAAsE;IACtE,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,oEAAoE;IACpE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gEAAgE;IAChE,gBAAgB,CAAC,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,cAAc,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;IAC1G;yDACqD;IACrD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gFAAgF;IAChF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;iEAC6D;IAC7D,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,2EAA2E;IAC3E,IAAI,CAAC,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAC7C,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oDAAoD;IACpD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,GAAG,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,O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AAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAI3D;;;;;OAKG;IACG,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAIzD,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAMnD,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAMxD,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,SAAK,EAAE,MAAM,SAAI,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAMrF;AA2BD;;;GAGG;AACH,eAAO,MAAM,gCAAgC,gCAAgC,CAAC;AAE9E,wIAAwI;AACxI,wBAAgB,8BAA8B,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAGpE;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,0BAA0B,CAEhF"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SubscriptionClient = void 0;
|
|
3
|
+
exports.SUBSCRIPTION_NOT_REPLICATED_CODE = exports.SubscriptionClient = void 0;
|
|
4
|
+
exports.isSubscriptionNotReplicatedYet = isSubscriptionNotReplicatedYet;
|
|
5
|
+
exports.notYetReplicatedStatus = notYetReplicatedStatus;
|
|
4
6
|
/**
|
|
5
7
|
* Thin CLI adapter over the SDK's subscription + validator-auth clients.
|
|
6
8
|
*
|
|
@@ -172,6 +174,14 @@ class SubscriptionClient {
|
|
|
172
174
|
async setCustomerScope(appId, customerScope) {
|
|
173
175
|
return this.withReauth(() => this.http.put(`/smart-apps/${encodeURIComponent(appId)}`, { config: { customerScope } }));
|
|
174
176
|
}
|
|
177
|
+
/**
|
|
178
|
+
* What a subscription can be paid in right now (`GET /api/v3/subscription/payment-assets`, public): HSUITE,
|
|
179
|
+
* XRP when it is on, and the swap provider's assets when swap payments are on (#3699 PR3). Called through the
|
|
180
|
+
* same HTTP client as the rest, so no SDK release is needed for it.
|
|
181
|
+
*/
|
|
182
|
+
async paymentAssets() {
|
|
183
|
+
return this.withReauth(() => this.http.get('/subscription/payment-assets'));
|
|
184
|
+
}
|
|
175
185
|
async request(payload) {
|
|
176
186
|
return this.withReauth(() => this.sdk.request(payload));
|
|
177
187
|
}
|
|
@@ -190,10 +200,15 @@ class SubscriptionClient {
|
|
|
190
200
|
async mint(appId) {
|
|
191
201
|
return this.withReauth(() => this.sdk.mintNft(appId));
|
|
192
202
|
}
|
|
193
|
-
|
|
203
|
+
/**
|
|
204
|
+
* `paymentAsset` (`HSUITE` | `XRP`) is read only by a PAID renewal (#3699), which prices the order in it; it rides
|
|
205
|
+
* the request only when named, so a request that names none is the call it always was.
|
|
206
|
+
*/
|
|
207
|
+
async renew(appId, additionalDays, paymentAsset) {
|
|
194
208
|
return this.withReauth(() => this.sdk.renew({
|
|
195
209
|
appId,
|
|
196
210
|
...(additionalDays !== undefined ? { additionalDays } : {}),
|
|
211
|
+
...(paymentAsset !== undefined ? { paymentAsset } : {}),
|
|
197
212
|
}));
|
|
198
213
|
}
|
|
199
214
|
/**
|
|
@@ -274,6 +289,23 @@ function isAuthExpiredError(err) {
|
|
|
274
289
|
return true;
|
|
275
290
|
return /(invalid|expired)[^.]*authentication token/i.test(message);
|
|
276
291
|
}
|
|
292
|
+
/**
|
|
293
|
+
* The code a validator's retryable 503 carries when it has not yet replicated the subscription of an app its caller
|
|
294
|
+
* owns (#4081): `subscription_not_replicated: ...` in the message, with `Retry-After`.
|
|
295
|
+
*/
|
|
296
|
+
exports.SUBSCRIPTION_NOT_REPLICATED_CODE = 'subscription_not_replicated';
|
|
297
|
+
/** Is `err` the validator's "this node has not replicated that subscription yet" 503 (see {@link SUBSCRIPTION_NOT_REPLICATED_CODE})? */
|
|
298
|
+
function isSubscriptionNotReplicatedYet(err) {
|
|
299
|
+
const message = err instanceof Error ? err.message : typeof err === 'string' ? err : '';
|
|
300
|
+
return message.includes(`${exports.SUBSCRIPTION_NOT_REPLICATED_CODE}:`);
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* What a polling loop reads in place of that 503: the not-found answer a node that does not hold the subscription gave
|
|
304
|
+
* before #4081, which every wait for a deposit already waits through (its `done` test is false, so it polls again).
|
|
305
|
+
*/
|
|
306
|
+
function notYetReplicatedStatus(appId) {
|
|
307
|
+
return { appId, hasSubscription: false, status: 'not_found' };
|
|
308
|
+
}
|
|
277
309
|
/**
|
|
278
310
|
* Normalize the SDK's tier-change envelope onto the flat shape the CLI
|
|
279
311
|
* consumers read. The SDK nests `effectiveAt`/`depositInstructions` under
|
|
@@ -289,6 +321,7 @@ function flattenTierChange(res) {
|
|
|
289
321
|
message: res.message,
|
|
290
322
|
fromTier: ptc?.fromTier,
|
|
291
323
|
toTier: ptc?.toTier,
|
|
324
|
+
direction: ptc?.direction,
|
|
292
325
|
effectiveAt: ptc?.effectiveAt,
|
|
293
326
|
depositInstructions: res.depositInstructions ?? ptc?.depositInstructions,
|
|
294
327
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscription-client.js","sourceRoot":"","sources":["../../src/_lib/subscription-client.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"subscription-client.js","sourceRoot":"","sources":["../../src/_lib/subscription-client.ts"],"names":[],"mappings":";;;AA0uBA,wEAGC;AAMD,wDAEC;AArvBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,iEAOmC;AAGnC,2CAAmD;AACnD,2DAA2D;AAyW3D;;;;;;;;GAQG;AACH,MAAa,kBAAkB;IAC7B,iFAAiF;IAChE,MAAM,CAAS;IACf,GAAG,CAAwB;IAC3B,IAAI,CAAa;IACjB,IAAI,CAAoD;IAEzE,YAAY,IAA+B;QACzC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,OAA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C,IAAI,CAAI,KAAK,EAAE,IAAI,CAAC;QAC9C,IAAI,EAAE,CAAI,IAAY,EAAE,CAAU,EAAE,EAAE,CAAC,IAAI,CAAI,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;QAC/D,GAAG,EAAE,WAAW,CAAC,KAAK,CAAsB;QAC5C,KAAK,EAAE,WAAW,CAAC,OAAO,CAAwB;QAClD,MAAM,EAAE,WAAW,CAAC,QAAQ,CAAyB;QACrD,OAAO,EAAE,WAAW,CAAC,SAAS,CAA0B;QACxD,SAAS,EAAE,WAAW,CAAC,WAAW,CAA4B;QAC9D,iBAAiB,EAAE,WAAW,CAAC,mBAAmB,CAAoC;QACtF,MAAM,EAAE,WAAW,CAAC,QAAQ,CAAyB;QACrD,YAAY,EAAE,CAAC,CAAqB,EAAE,EAAE;YACtC,KAAK,GAAG,CAAC,CAAC;QACZ,CAAC;QACD,YAAY,EAAE,GAAG,EAAE,CAAC,KAAK;KAC1B,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { DepositInstructions, PaymentAssetOption, SwapPaymentInstruction } from './subscription-client';
|
|
2
|
+
/** What the builder asked for, to check the answer against. */
|
|
3
|
+
export type SwapAsk = {
|
|
4
|
+
ticker: string;
|
|
5
|
+
network?: string;
|
|
6
|
+
refundAddress: string;
|
|
7
|
+
refundExtraId?: string;
|
|
8
|
+
};
|
|
9
|
+
/** The swap instruction of a deposit, or `undefined` when the order is not paid through a swap. */
|
|
10
|
+
export declare function swapPaymentOf(deposit: Pick<DepositInstructions, 'swap'>): SwapPaymentInstruction | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* Check a swap instruction before it is shown. `ask` is what this run asked for (absent on a resume that named
|
|
13
|
+
* no asset: the stored instructions are then the contract, and are only checked for being well-formed).
|
|
14
|
+
*/
|
|
15
|
+
export declare function assertSwapPaymentConsistent(swap: SwapPaymentInstruction, ask: SwapAsk | undefined): void;
|
|
16
|
+
/**
|
|
17
|
+
* Never put a lapsed quote's payin address in front of a payer: the provider no longer honours its price. The
|
|
18
|
+
* platform opens a NEW exchange for a lapsed quote when the builder re-runs and names the asset and the SAME
|
|
19
|
+
* refund address again (and only while the provider does not report a payment to the old one as received), so the
|
|
20
|
+
* refusal says exactly that. The command it suggests is built from the validator's answer, so every value in it is
|
|
21
|
+
* quoted.
|
|
22
|
+
*/
|
|
23
|
+
export declare function assertSwapQuoteLive(swap: SwapPaymentInstruction): void;
|
|
24
|
+
/** Has the platform already counted the builder's swap payment (the order is `paid` or `converting`)? Then nothing is to be sent. */
|
|
25
|
+
export declare function swapPaymentCounted(swap: Pick<SwapPaymentInstruction, 'status'>): boolean;
|
|
26
|
+
/** The payment lines of a swap order's instructions. */
|
|
27
|
+
export declare function renderSwapPayment(swap: SwapPaymentInstruction): void;
|
|
28
|
+
/**
|
|
29
|
+
* Find the asset a builder asked to pay in among what `GET /subscription/payment-assets` offers, and refuse,
|
|
30
|
+
* before anything is created, what the validator would refuse: an asset it does not offer (or no swap
|
|
31
|
+
* payments at all), a ticker on several networks with none named, and an asset whose refund address needs a
|
|
32
|
+
* memo that was not given. Returns the listing entry, whose `network` is the one to send.
|
|
33
|
+
*/
|
|
34
|
+
export declare function resolveSwapListing(assets: readonly PaymentAssetOption[], ask: SwapAsk): PaymentAssetOption;
|
|
35
|
+
/**
|
|
36
|
+
* The swap fields of a smart-app create (`POST /api/v3/smart-apps`): the asset as a symbol, the network it
|
|
37
|
+
* travels on (the listing's, else the one asked for), and the builder's refund address and memo.
|
|
38
|
+
*/
|
|
39
|
+
export declare function swapCreateFields(ask: SwapAsk, listing?: Pick<PaymentAssetOption, 'network'>): {
|
|
40
|
+
paymentAsset: string;
|
|
41
|
+
paymentNetwork?: string;
|
|
42
|
+
refundAddress: string;
|
|
43
|
+
refundExtraId?: string;
|
|
44
|
+
};
|
|
45
|
+
/** The same fields in the shape of a subscription request (`POST /api/v3/subscription/request`). */
|
|
46
|
+
export declare function swapRequestFields(ask: SwapAsk, listing?: Pick<PaymentAssetOption, 'network'>): {
|
|
47
|
+
paymentAsset: {
|
|
48
|
+
symbol: string;
|
|
49
|
+
network?: string;
|
|
50
|
+
};
|
|
51
|
+
refundAddress: string;
|
|
52
|
+
refundExtraId?: string;
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=swap-payment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"swap-payment.d.ts","sourceRoot":"","sources":["../../src/_lib/swap-payment.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAE7G,+DAA+D;AAC/D,MAAM,MAAM,OAAO,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,CAAC;IAAC,aAAa,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAE1G,mGAAmG;AACnG,wBAAgB,aAAa,CAAC,OAAO,EAAE,IAAI,CAAC,mBAAmB,EAAE,MAAM,CAAC,GAAG,sBAAsB,GAAG,SAAS,CAE5G;AAUD;;;GAGG;AACH,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,sBAAsB,EAAE,GAAG,EAAE,OAAO,GAAG,SAAS,GAAG,IAAI,CA8CxG;AAOD;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,sBAAsB,GAAG,IAAI,CAiBtE;AAED,qIAAqI;AACrI,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,IAAI,CAAC,sBAAsB,EAAE,QAAQ,CAAC,GAAG,OAAO,CAExF;AAED,wDAAwD;AACxD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,sBAAsB,GAAG,IAAI,CAuBpE;AAKD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,SAAS,kBAAkB,EAAE,EAAE,GAAG,EAAE,OAAO,GAA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