@chaindaddy/js 0.3.0 → 0.3.2
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/api.d.ts +626 -52
- package/dist/cd.js +4 -4
- package/dist/cd.js.sri +1 -1
- package/dist/core.d.ts +3 -2
- package/dist/embed.js +36 -5
- package/dist/index.js +40 -9
- package/dist/signin.js +3 -3
- package/package.json +2 -1
package/dist/api.d.ts
CHANGED
|
@@ -15,8 +15,8 @@ export interface paths {
|
|
|
15
15
|
* @description A verified coin page by chain and ticker: its name, token address, registration ID, logo, price,
|
|
16
16
|
* market cap, 24-hour volume, liquidity, 24-hour price change and holder count. A figure Chain Daddy
|
|
17
17
|
* does not have is `null`, never `0`. The logo is `null` for a page marked NSFW. Answers 404 for a
|
|
18
|
-
* ticker with no verified page on that chain
|
|
19
|
-
* about a minute.
|
|
18
|
+
* ticker with no verified page on that chain, and for a page Chain Daddy removed. Keyless, the same
|
|
19
|
+
* for every caller, and cached for about a minute.
|
|
20
20
|
*/
|
|
21
21
|
get: operations["getPublicCoin"];
|
|
22
22
|
put?: never;
|
|
@@ -38,9 +38,11 @@ export interface paths {
|
|
|
38
38
|
* List the apps on a verified coin's page
|
|
39
39
|
* @description The apps a verified coin's page shows, in page order: each app's ID, name, description, version,
|
|
40
40
|
* category, icon and whether it is a built-in. It names the apps; it does not include what the owner
|
|
41
|
-
* set up inside them. Apps turned off are left out, and so is every app rated NSFW
|
|
42
|
-
*
|
|
43
|
-
*
|
|
41
|
+
* set up inside them. Apps turned off are left out, and so is every app rated NSFW, every app the
|
|
42
|
+
* page itself no longer shows (not reviewed yet, suspended or removed) and the built-in parts of
|
|
43
|
+
* the page that are not apps (its header, its market panel). Answers 404 for a ticker
|
|
44
|
+
* with no verified page on that chain, and for a page Chain Daddy removed. Keyless, the same for
|
|
45
|
+
* every caller, and cached for about a minute.
|
|
44
46
|
*/
|
|
45
47
|
get: operations["listPublicCoinApps"];
|
|
46
48
|
put?: never;
|
|
@@ -64,7 +66,8 @@ export interface paths {
|
|
|
64
66
|
* smallest unit as a decimal string, and `holds` (whether it is above zero). Use it to re-check a
|
|
65
67
|
* holding after someone signed in to your site with Chain Daddy, without an API key. Works for any
|
|
66
68
|
* token on a chain Chain Daddy serves. Each caller gets 60 requests a minute; past that it
|
|
67
|
-
* answers 429. Cached for about 30 seconds.
|
|
69
|
+
* answers 429. Cached for about 30 seconds. All callers together share a limit on chain reads:
|
|
70
|
+
* in a busy moment it answers 503 with `Retry-After`.
|
|
68
71
|
*/
|
|
69
72
|
get: operations["getPublicHolding"];
|
|
70
73
|
put?: never;
|
|
@@ -86,10 +89,11 @@ export interface paths {
|
|
|
86
89
|
* List a registration's verified sites
|
|
87
90
|
* @description The websites a coin's registration has verified with a DNS record. `badgeHosts` show the coin's
|
|
88
91
|
* verified badge on the Chain Daddy sign-in page. `embedHosts` may also run the coin's apps and take
|
|
89
|
-
* its checkout. A host covers its subdomains. `interactive` is `false` when there are no
|
|
92
|
+
* its checkout. A host covers its subdomains, except one Chain Daddy has blocked. `interactive` is `false` when there are no
|
|
90
93
|
* `embedHosts` or Chain Daddy has turned the coin's embeds off. A registration with no verified
|
|
91
|
-
* sites answers 200 with empty lists.
|
|
92
|
-
*
|
|
94
|
+
* sites answers 200 with empty lists. Only the registration a verified coin page shows answers
|
|
95
|
+
* (the `crownId` the coin read gives); any other ID answers 404. Keyless, the same for every
|
|
96
|
+
* caller, and cached for about a minute.
|
|
93
97
|
*/
|
|
94
98
|
get: operations["getPublicCrownSites"];
|
|
95
99
|
put?: never;
|
|
@@ -100,6 +104,30 @@ export interface paths {
|
|
|
100
104
|
patch?: never;
|
|
101
105
|
trace?: never;
|
|
102
106
|
};
|
|
107
|
+
"/api/v2/iap/config": {
|
|
108
|
+
parameters: {
|
|
109
|
+
query?: never;
|
|
110
|
+
header?: never;
|
|
111
|
+
path?: never;
|
|
112
|
+
cookie?: never;
|
|
113
|
+
};
|
|
114
|
+
/**
|
|
115
|
+
* Store configuration
|
|
116
|
+
* @description How creator stores work right now: whether they are switched on, the chains a store can run
|
|
117
|
+
* on, what an item on each chain can be priced in besides the store's own token (the chain's
|
|
118
|
+
* coin, a dollar stablecoin), and where the receipt signing keys are published. It also says
|
|
119
|
+
* whether test stores are available here (`testMode`) and whether checkout sessions are
|
|
120
|
+
* (`checkoutSessions`, with the limits on how long one may stay open).
|
|
121
|
+
*/
|
|
122
|
+
get: operations["getIapConfig"];
|
|
123
|
+
put?: never;
|
|
124
|
+
post?: never;
|
|
125
|
+
delete?: never;
|
|
126
|
+
options?: never;
|
|
127
|
+
head?: never;
|
|
128
|
+
patch?: never;
|
|
129
|
+
trace?: never;
|
|
130
|
+
};
|
|
103
131
|
"/api/v2/iap/jwks": {
|
|
104
132
|
parameters: {
|
|
105
133
|
query?: never;
|
|
@@ -136,6 +164,10 @@ export interface paths {
|
|
|
136
164
|
* amount paid, when) with its current status. A refunded order's receipt reads `revoked`: offline
|
|
137
165
|
* verification proves a receipt was issued, this proves it still stands. The receipt is the compact JWS
|
|
138
166
|
* exactly as issued (three base64url parts joined by dots).
|
|
167
|
+
*
|
|
168
|
+
* The answer is `200` whatever the receipt is. Act on `valid`, which is true only for status `valid`.
|
|
169
|
+
* A string that is not a receipt Chain Daddy signed (a bad signature, a changed payload, an unknown
|
|
170
|
+
* key, not a JWS at all) answers `{"valid": false, "status": "invalid", "error": "…"}` with no `payload`.
|
|
139
171
|
*/
|
|
140
172
|
post: operations["verifyIapReceipt"];
|
|
141
173
|
delete?: never;
|
|
@@ -164,6 +196,43 @@ export interface paths {
|
|
|
164
196
|
patch?: never;
|
|
165
197
|
trace?: never;
|
|
166
198
|
};
|
|
199
|
+
"/api/v2/iap/stores/{storeId}/test-store": {
|
|
200
|
+
parameters: {
|
|
201
|
+
query?: never;
|
|
202
|
+
header?: never;
|
|
203
|
+
path: {
|
|
204
|
+
/** @description The store's ID (a UUID) */
|
|
205
|
+
storeId: components["parameters"]["IapStoreId"];
|
|
206
|
+
};
|
|
207
|
+
cookie?: never;
|
|
208
|
+
};
|
|
209
|
+
/**
|
|
210
|
+
* Get a store's test store
|
|
211
|
+
* @description The test store that stands beside a live store: the same coin page and payout, its own
|
|
212
|
+
* catalog, keys, orders and webhook, and `mode: test`. Its orders are paid with
|
|
213
|
+
* `POST /api/v2/iap/orders/{orderId}/test-pay`; nothing is sent on chain and no fee is taken. Pass the
|
|
214
|
+
* live store's id (a test store's own id returns that test store). Your account credentials, as a wallet
|
|
215
|
+
* that manages the coin's page; a store key is refused (403 `SESSION_REQUIRED`).
|
|
216
|
+
* Guide: https://docs.chaindaddy.io/developer/test-your-integration#test-store
|
|
217
|
+
*/
|
|
218
|
+
get: operations["getIapTestStore"];
|
|
219
|
+
put?: never;
|
|
220
|
+
/**
|
|
221
|
+
* Create a store's test store
|
|
222
|
+
* @description Creates the live store's test store with a copy of its catalog as it is now, drafts included and
|
|
223
|
+
* nothing sold (201), or returns the one it already has (200). Safe to call again. From then on the
|
|
224
|
+
* two catalogs are separate. Make its keys with `POST /api/v2/iap/stores/{storeId}/keys` on the test
|
|
225
|
+
* store's id: they start with `cd_iap_test_` and work only on it. It takes no body. Your account
|
|
226
|
+
* credentials, as a wallet that manages the coin's page and has the plan a store needs.
|
|
227
|
+
* Guide: https://docs.chaindaddy.io/developer/test-your-integration#test-store
|
|
228
|
+
*/
|
|
229
|
+
post: operations["openIapTestStore"];
|
|
230
|
+
delete?: never;
|
|
231
|
+
options?: never;
|
|
232
|
+
head?: never;
|
|
233
|
+
patch?: never;
|
|
234
|
+
trace?: never;
|
|
235
|
+
};
|
|
167
236
|
"/api/v2/iap/stores/{storeId}/skus": {
|
|
168
237
|
parameters: {
|
|
169
238
|
query?: never;
|
|
@@ -711,9 +780,8 @@ export interface paths {
|
|
|
711
780
|
* (200, secret unchanged; also turns back on a webhook turned off after repeated failures). Events default
|
|
712
781
|
* to every `iap.*` type there is at the time of the save (a type added later needs another save); names
|
|
713
782
|
* may omit the `iap.` prefix. The URL must be https and must not resolve to a
|
|
714
|
-
* private address. Needs the store
|
|
715
|
-
*
|
|
716
|
-
* with `webhooks:write`.
|
|
783
|
+
* private address. Needs only the plan the store itself needs (any paid plan), not the Developer plan the
|
|
784
|
+
* general `/api/v2/webhooks` routes need. Account credentials, or a store key with `webhooks:write`.
|
|
717
785
|
*/
|
|
718
786
|
put: operations["setIapStoreWebhook"];
|
|
719
787
|
post?: never;
|
|
@@ -833,6 +901,12 @@ export interface paths {
|
|
|
833
901
|
* A buyer paying a checkout session sends `checkoutSessionId` from their own session on chaindaddy.io. The
|
|
834
902
|
* session then fixes the store, the SKU, the quantity and `appAccountToken`, so `storeId` and `sku` may be
|
|
835
903
|
* left out. The amount and the fee are quoted exactly as for any other order of that item.
|
|
904
|
+
*
|
|
905
|
+
* When the session's item belongs to an installed app, the order is that app's order: it pays the page, the
|
|
906
|
+
* fee and the app's developer, needs `acknowledgeFinalSale: true`, and stays inside the app's limits. The app
|
|
907
|
+
* is the item's own; an `appId` sent with a session is ignored. Everything is checked again when the order is
|
|
908
|
+
* made, so a session opened while the item could be sold answers 409 `APP_ITEM_NOT_SOLD_HERE` once its
|
|
909
|
+
* developer turns that off, pauses, or changes the item's terms.
|
|
836
910
|
*/
|
|
837
911
|
post: operations["createIapOrder"];
|
|
838
912
|
delete?: never;
|
|
@@ -864,6 +938,36 @@ export interface paths {
|
|
|
864
938
|
patch?: never;
|
|
865
939
|
trace?: never;
|
|
866
940
|
};
|
|
941
|
+
"/api/v2/iap/orders/{orderId}/test-pay": {
|
|
942
|
+
parameters: {
|
|
943
|
+
query?: never;
|
|
944
|
+
header?: never;
|
|
945
|
+
path: {
|
|
946
|
+
/** @description `0x` followed by 64 hex characters */
|
|
947
|
+
orderId: components["parameters"]["IapOrderId"];
|
|
948
|
+
};
|
|
949
|
+
cookie?: never;
|
|
950
|
+
};
|
|
951
|
+
get?: never;
|
|
952
|
+
put?: never;
|
|
953
|
+
/**
|
|
954
|
+
* Pay a test order
|
|
955
|
+
* @description Pays a pending order of a test store with a simulated payment and confirms it at once: the items
|
|
956
|
+
* are granted, the receipt is signed and `order.confirmed` is written, exactly as for a real payment.
|
|
957
|
+
* No chain is read or written and no money moves. Where a transaction hash would be, the order carries
|
|
958
|
+
* `test:` and an id. Calling it again on a confirmed order returns that order and changes nothing.
|
|
959
|
+
*
|
|
960
|
+
* Call it with a key of the order's test store (`cd_iap_test_…`, scope `orders:write`), or signed in as
|
|
961
|
+
* a wallet that manages the coin's page. It takes no body. A live store's order is only ever paid on
|
|
962
|
+
* chain (409 `LIVE_ORDER`). Guide: https://docs.chaindaddy.io/developer/test-your-integration#test-store
|
|
963
|
+
*/
|
|
964
|
+
post: operations["testPayIapOrder"];
|
|
965
|
+
delete?: never;
|
|
966
|
+
options?: never;
|
|
967
|
+
head?: never;
|
|
968
|
+
patch?: never;
|
|
969
|
+
trace?: never;
|
|
970
|
+
};
|
|
867
971
|
"/api/v2/iap/checkout/sessions": {
|
|
868
972
|
parameters: {
|
|
869
973
|
query?: never;
|
|
@@ -884,8 +988,12 @@ export interface paths {
|
|
|
884
988
|
*
|
|
885
989
|
* `successUrl` and `cancelUrl` must be `https` pages on one of the coin's verified sites, or a subdomain of
|
|
886
990
|
* one (400 `RETURN_URL_NOT_VERIFIED`, which lists the sites that pass). The wallet that opened the store
|
|
887
|
-
* must have signed the Seller Terms (403 `SELLER_TERMS_REQUIRED`).
|
|
888
|
-
*
|
|
991
|
+
* must have signed the Seller Terms (403 `SELLER_TERMS_REQUIRED`).
|
|
992
|
+
*
|
|
993
|
+
* An item of an app installed on the coin's page (its `sku` starts with `app.`) is sold through a session
|
|
994
|
+
* only when the app's developer has allowed that item to be sold outside the app; otherwise the call answers
|
|
995
|
+
* 409 `APP_ITEM_NOT_SOLD_HERE`, with a `reason`. The sale pays the same wallets as inside the app: the page,
|
|
996
|
+
* the fee and the developer's share. Such a session takes at most the app's per-order quantity.
|
|
889
997
|
*
|
|
890
998
|
* Send an `Idempotency-Key`. A retry of the same request returns the session it opened, with status 200
|
|
891
999
|
* and the header `Idempotent-Replayed: true`.
|
|
@@ -946,6 +1054,10 @@ export interface paths {
|
|
|
946
1054
|
* needs no credential (the session id in the buyer's link is enough) and never carries the session's
|
|
947
1055
|
* `metadata` or `clientReferenceId`. The answer is never cached.
|
|
948
1056
|
*
|
|
1057
|
+
* When the item belongs to an app installed on the coin's page, `sku` names the app (`appId`) and carries
|
|
1058
|
+
* nothing else of the app's: no `appBps`, `appTermsVersion`, `appItemKey` or `appRole`, and an empty
|
|
1059
|
+
* `metadata`.
|
|
1060
|
+
*
|
|
949
1061
|
* Pass `origin` to learn whether a page on that origin may open this checkout in a popup
|
|
950
1062
|
* (`openerAllowed`): it must be `https` on one of the coin's verified sites.
|
|
951
1063
|
*
|
|
@@ -1019,7 +1131,8 @@ export interface paths {
|
|
|
1019
1131
|
* List the event types a webhook can subscribe to
|
|
1020
1132
|
* @description Returns every subscribable event type with a one-line description: registration, heartbeat, holder, trade
|
|
1021
1133
|
* and alert events, API quota events, deal lifecycle events (`deal.created`, `deal.accepted`,
|
|
1022
|
-
* `deal.rejected`, `deal.cancelled`, `deal.completed`, `deal.failed`)
|
|
1134
|
+
* `deal.rejected`, `deal.cancelled`, `deal.completed`, `deal.failed`), creator-store events (`iap.*`) and
|
|
1135
|
+
* `app.order.confirmed`, which tells a paid app's developer of each confirmed order made through the app.
|
|
1023
1136
|
* This list is exactly what create and update accept. Read it before creating a webhook rather than
|
|
1024
1137
|
* guessing names: a misspelled type is refused with 400.
|
|
1025
1138
|
*
|
|
@@ -1343,6 +1456,18 @@ export interface components {
|
|
|
1343
1456
|
error: string;
|
|
1344
1457
|
/** @description Machine-readable error code (e.g. `IAP_PLAN_REQUIRED`, `INSUFFICIENT_QUANTITY`) */
|
|
1345
1458
|
code?: string;
|
|
1459
|
+
/**
|
|
1460
|
+
* @description Which of a code's causes this is, where a code has several. Sent with `APP_NOT_SELLING`:
|
|
1461
|
+
* `app_not_published`, `selling_switched_off` (stopped by Chain Daddy), `developer_paused`
|
|
1462
|
+
* (paused by the app's developer), `developer_unavailable` (the developer cannot sell right
|
|
1463
|
+
* now; why is between them and Chain Daddy, and their own portal tells them), `no_payout_on_chain`
|
|
1464
|
+
* or `payout_contract_missing` (the developer is not paid on this chain). Sent with
|
|
1465
|
+
* `APP_ITEM_NOT_SOLD_HERE` (an app's item and a checkout session): any of those, or
|
|
1466
|
+
* `not_allowed_outside_app` (the app's developer has not allowed the item to be sold outside the app),
|
|
1467
|
+
* `app_not_installed`, `terms_changed` or `item_not_for_sale`. Absent on every other error. Expect new
|
|
1468
|
+
* values.
|
|
1469
|
+
*/
|
|
1470
|
+
reason?: string;
|
|
1346
1471
|
};
|
|
1347
1472
|
/** @description One token prize. Amounts are base units, as strings. */
|
|
1348
1473
|
IapAirdropAward: {
|
|
@@ -1416,6 +1541,112 @@ export interface components {
|
|
|
1416
1541
|
award?: components["schemas"]["IapAirdropAward"];
|
|
1417
1542
|
campaign?: components["schemas"]["IapAwardAirdrop"];
|
|
1418
1543
|
};
|
|
1544
|
+
IapChain: {
|
|
1545
|
+
/**
|
|
1546
|
+
* @description CAIP-2 chain id
|
|
1547
|
+
* @example eip155:8453
|
|
1548
|
+
*/
|
|
1549
|
+
chainId?: string;
|
|
1550
|
+
/** @example base */
|
|
1551
|
+
chainKey?: string;
|
|
1552
|
+
/**
|
|
1553
|
+
* @description The checkout contract an order with a fee is paid through. Absent on Solana. A hint only: the
|
|
1554
|
+
* contract to pay is always the one in the order's own `payment` block.
|
|
1555
|
+
*/
|
|
1556
|
+
checkout?: string;
|
|
1557
|
+
/**
|
|
1558
|
+
* @description The checkout contract an order with no fee is paid through (a store whose `feeBps` is 0). Absent on
|
|
1559
|
+
* Solana and where the chain has none. A hint only, like `checkout`.
|
|
1560
|
+
*/
|
|
1561
|
+
checkoutNoFee?: string;
|
|
1562
|
+
/** @description Confirmations an order waits for before it is `confirmed` */
|
|
1563
|
+
confirmations?: number;
|
|
1564
|
+
/**
|
|
1565
|
+
* @description What a SKU on this chain may be paid in besides the store's own token (always allowed, and the
|
|
1566
|
+
* default): the chain's coin and, where the chain has one, its dollar stable.
|
|
1567
|
+
*/
|
|
1568
|
+
currencies?: components["schemas"]["IapCurrency"][];
|
|
1569
|
+
};
|
|
1570
|
+
IapCurrency: {
|
|
1571
|
+
/** @enum {string} */
|
|
1572
|
+
currency?: "native" | "usdc";
|
|
1573
|
+
/**
|
|
1574
|
+
* @description The zero address for an EVM chain's coin, `11111111111111111111111111111111` for SOL, otherwise
|
|
1575
|
+
* the stable's contract or mint
|
|
1576
|
+
*/
|
|
1577
|
+
address?: string;
|
|
1578
|
+
/** @example USDC */
|
|
1579
|
+
symbol?: string;
|
|
1580
|
+
/** @example 6 */
|
|
1581
|
+
decimals?: number;
|
|
1582
|
+
};
|
|
1583
|
+
IapConfig: {
|
|
1584
|
+
enabled?: boolean;
|
|
1585
|
+
/**
|
|
1586
|
+
* @description Whether test stores are available here: a store's test store, its `cd_iap_test_` keys, and paying a
|
|
1587
|
+
* test order with no money
|
|
1588
|
+
*/
|
|
1589
|
+
testMode?: boolean;
|
|
1590
|
+
chains?: components["schemas"]["IapChain"][];
|
|
1591
|
+
/** @description The read-only account every Solana store payment references */
|
|
1592
|
+
solanaStaticKey?: string;
|
|
1593
|
+
/** @example https://api.chaindaddy.io/api/v2/iap/jwks */
|
|
1594
|
+
jwksUrl?: string;
|
|
1595
|
+
/**
|
|
1596
|
+
* @description The limits on what an app can make a buyer pay (paid apps). Chain Daddy may change them at any time.
|
|
1597
|
+
* Amounts are in millionths of a dollar.
|
|
1598
|
+
*/
|
|
1599
|
+
paidApps?: {
|
|
1600
|
+
/**
|
|
1601
|
+
* Format: int64
|
|
1602
|
+
* @description The most one purchase through an app may cost; an app item priced above it cannot be saved
|
|
1603
|
+
* @example 250000000
|
|
1604
|
+
*/
|
|
1605
|
+
maxOrderUsdMicros?: number;
|
|
1606
|
+
/**
|
|
1607
|
+
* Format: int64
|
|
1608
|
+
* @description The most one buyer wallet may pay one app in any 24 hours
|
|
1609
|
+
* @example 1000000000
|
|
1610
|
+
*/
|
|
1611
|
+
walletAppDayUsdMicros?: number;
|
|
1612
|
+
/**
|
|
1613
|
+
* Format: int64
|
|
1614
|
+
* @description Above this, the purchase sheet asks the buyer to press and hold
|
|
1615
|
+
* @example 50000000
|
|
1616
|
+
*/
|
|
1617
|
+
confirmAboveUsdMicros?: number;
|
|
1618
|
+
/**
|
|
1619
|
+
* @description The most units in one order through an app
|
|
1620
|
+
* @example 10
|
|
1621
|
+
*/
|
|
1622
|
+
maxQuantity?: number;
|
|
1623
|
+
/**
|
|
1624
|
+
* @description The most orders one buyer wallet may open through one app in a minute
|
|
1625
|
+
* @example 5
|
|
1626
|
+
*/
|
|
1627
|
+
ordersPerMinute?: number;
|
|
1628
|
+
};
|
|
1629
|
+
/** @description Present only where checkout sessions are switched on */
|
|
1630
|
+
checkoutSessions?: {
|
|
1631
|
+
/** @description When true, only a test store's key can open a checkout session here */
|
|
1632
|
+
testOnly?: boolean;
|
|
1633
|
+
/**
|
|
1634
|
+
* @description The least `expiresInSeconds` a session may ask for
|
|
1635
|
+
* @example 900
|
|
1636
|
+
*/
|
|
1637
|
+
minExpiresInSeconds?: number;
|
|
1638
|
+
/**
|
|
1639
|
+
* @description The most `expiresInSeconds` a session may ask for
|
|
1640
|
+
* @example 86400
|
|
1641
|
+
*/
|
|
1642
|
+
maxExpiresInSeconds?: number;
|
|
1643
|
+
/**
|
|
1644
|
+
* @description How long a session stays open when it does not say
|
|
1645
|
+
* @example 3600
|
|
1646
|
+
*/
|
|
1647
|
+
defaultExpiresInSeconds?: number;
|
|
1648
|
+
};
|
|
1649
|
+
};
|
|
1419
1650
|
IapStore: {
|
|
1420
1651
|
/** Format: uuid */
|
|
1421
1652
|
id?: string;
|
|
@@ -1453,6 +1684,12 @@ export interface components {
|
|
|
1453
1684
|
* for its own items; items from apps installed on the page keep selling.
|
|
1454
1685
|
*/
|
|
1455
1686
|
live?: boolean;
|
|
1687
|
+
/**
|
|
1688
|
+
* @description `test` for a test store: its orders are paid by the test-pay call instead of a wallet, nothing is sent
|
|
1689
|
+
* on chain and no fee is taken. Unrelated to `live` above.
|
|
1690
|
+
* @enum {string}
|
|
1691
|
+
*/
|
|
1692
|
+
mode?: "live" | "test";
|
|
1456
1693
|
/** Format: date-time */
|
|
1457
1694
|
createdAt?: string;
|
|
1458
1695
|
/**
|
|
@@ -1857,13 +2094,24 @@ export interface components {
|
|
|
1857
2094
|
refundedAt?: string | null;
|
|
1858
2095
|
/** @description Signed receipt (JWS) once confirmed */
|
|
1859
2096
|
receipt?: string | null;
|
|
1860
|
-
/**
|
|
1861
|
-
|
|
2097
|
+
/**
|
|
2098
|
+
* @description Present while pending; how to pay. A test store's order carries `{"kind": "test"}`: nothing is signed,
|
|
2099
|
+
* and it is paid with `POST /api/v2/iap/orders/{orderId}/test-pay`.
|
|
2100
|
+
*/
|
|
2101
|
+
payment?: components["schemas"]["IapEvmPayment"] | components["schemas"]["IapSolanaPayment"] | components["schemas"]["IapTestPayment"];
|
|
1862
2102
|
/** @description How to check this order's payment on chain without trusting the API. EVM: call hashOrder(order) on `checkout`, then paidBy(hash) at a block `confirmations` deep; `checkout` is the contract the order was (or will be) paid through, which hashOrder is bound to. Solana: find the transfer by its `reference` key and `memo`. Absent on test orders, and on EVM orders paid before the contract was recorded. */
|
|
1863
2103
|
verification?: components["schemas"]["IapEvmVerification"] | components["schemas"]["IapSolanaVerification"];
|
|
1864
2104
|
/** Format: date-time */
|
|
1865
2105
|
createdAt?: string;
|
|
1866
2106
|
};
|
|
2107
|
+
/** @description The payment block of a test store's pending order. There is nothing to sign or send */
|
|
2108
|
+
IapTestPayment: {
|
|
2109
|
+
/**
|
|
2110
|
+
* @description discriminator enum property added by openapi-typescript
|
|
2111
|
+
* @enum {string}
|
|
2112
|
+
*/
|
|
2113
|
+
kind: "test";
|
|
2114
|
+
};
|
|
1867
2115
|
IapEvmVerification: {
|
|
1868
2116
|
/**
|
|
1869
2117
|
* @description discriminator enum property added by openapi-typescript
|
|
@@ -2119,12 +2367,18 @@ export interface components {
|
|
|
2119
2367
|
deliveredAt?: string | null;
|
|
2120
2368
|
};
|
|
2121
2369
|
IapReceiptVerification: {
|
|
2370
|
+
/** @description True only when `status` is `valid`. Deliver on this */
|
|
2371
|
+
valid?: boolean;
|
|
2122
2372
|
/**
|
|
2123
|
-
* @description `
|
|
2373
|
+
* @description `valid`: the receipt is ours and its order stands. `revoked`: a refund was recorded since.
|
|
2374
|
+
* `invalid`: not a receipt Chain Daddy signed; `error` says why and there is no `payload`.
|
|
2375
|
+
* `unknown`: the signature is ours, but this API has no record of the receipt.
|
|
2124
2376
|
* @enum {string}
|
|
2125
2377
|
*/
|
|
2126
|
-
status?: "valid" | "revoked";
|
|
2127
|
-
/** @description
|
|
2378
|
+
status?: "valid" | "revoked" | "invalid" | "unknown";
|
|
2379
|
+
/** @description Why the receipt is `invalid`. Absent otherwise */
|
|
2380
|
+
error?: string;
|
|
2381
|
+
/** @description The receipt's decoded claims. Absent when `status` is `invalid` */
|
|
2128
2382
|
payload?: {
|
|
2129
2383
|
/** @example https://chaindaddy.io */
|
|
2130
2384
|
iss?: string;
|
|
@@ -2460,8 +2714,8 @@ export interface components {
|
|
|
2460
2714
|
iat: number;
|
|
2461
2715
|
/** @description Five minutes after `iat` */
|
|
2462
2716
|
exp: number;
|
|
2463
|
-
/** @description When the Chain Daddy session this sign-in rides on began */
|
|
2464
|
-
auth_time
|
|
2717
|
+
/** @description When the Chain Daddy session this sign-in rides on began. Only for a client whose `sub` is the wallet; a client with a per-site `sub` gets none, because the same value at every site would link its ids */
|
|
2718
|
+
auth_time?: number;
|
|
2465
2719
|
/** @description Your `nonce`, when you sent one */
|
|
2466
2720
|
nonce?: string;
|
|
2467
2721
|
jti: string;
|
|
@@ -2533,8 +2787,9 @@ export interface components {
|
|
|
2533
2787
|
};
|
|
2534
2788
|
/**
|
|
2535
2789
|
* @description Not allowed. `IAP_PLAN_REQUIRED` when the wallet (for a store key, the wallet that opened the store)
|
|
2536
|
-
*
|
|
2537
|
-
* caller does not manage this token page, or the store key
|
|
2790
|
+
* cannot run a store. That takes any paid plan with the Seller Terms signed, or Developer Beta Program
|
|
2791
|
+
* membership in good standing. Otherwise the caller does not manage this token page, or the store key
|
|
2792
|
+
* lacks the scope.
|
|
2538
2793
|
*/
|
|
2539
2794
|
IapForbidden: {
|
|
2540
2795
|
headers: {
|
|
@@ -2543,13 +2798,28 @@ export interface components {
|
|
|
2543
2798
|
content: {
|
|
2544
2799
|
/**
|
|
2545
2800
|
* @example {
|
|
2546
|
-
* "error": "a Developer plan is
|
|
2801
|
+
* "error": "running a store needs a paid plan or Developer Beta Program membership (the Developer plan is in beta and free while it is): https://chaindaddy.io/_developer",
|
|
2547
2802
|
* "code": "IAP_PLAN_REQUIRED"
|
|
2548
2803
|
* }
|
|
2549
2804
|
*/
|
|
2550
2805
|
"application/json": components["schemas"]["IapError"];
|
|
2551
2806
|
};
|
|
2552
2807
|
};
|
|
2808
|
+
/** @description No wallet session */
|
|
2809
|
+
IapUnauthorized: {
|
|
2810
|
+
headers: {
|
|
2811
|
+
[name: string]: unknown;
|
|
2812
|
+
};
|
|
2813
|
+
content: {
|
|
2814
|
+
/**
|
|
2815
|
+
* @example {
|
|
2816
|
+
* "error": "sign in first",
|
|
2817
|
+
* "code": "UNAUTHORIZED"
|
|
2818
|
+
* }
|
|
2819
|
+
*/
|
|
2820
|
+
"application/json": components["schemas"]["IapError"];
|
|
2821
|
+
};
|
|
2822
|
+
};
|
|
2553
2823
|
/** @description `AIRDROPS_DISABLED` or `IAP_DISABLED`: the feature is switched off */
|
|
2554
2824
|
IapAirdropsUnavailable: {
|
|
2555
2825
|
headers: {
|
|
@@ -2665,6 +2935,12 @@ export interface components {
|
|
|
2665
2935
|
* and never sells, grants or consumes twice.
|
|
2666
2936
|
*/
|
|
2667
2937
|
IdempotencyKey: string;
|
|
2938
|
+
/**
|
|
2939
|
+
* @description Required: a call without it answers 400 `IDEMPOTENCY_KEY_REQUIRED`. Send one value per attempt (a UUID,
|
|
2940
|
+
* or an id of your own such as `cart-8842-attempt-1`), up to 255 characters. Retrying with the same key
|
|
2941
|
+
* and the same request returns the first result and never sells, grants or consumes twice.
|
|
2942
|
+
*/
|
|
2943
|
+
IdempotencyKeyRequired: string;
|
|
2668
2944
|
/** @description The store's ID (a UUID) */
|
|
2669
2945
|
IapStoreId: string;
|
|
2670
2946
|
/** @description The SKU key, e.g. `badge.gold` */
|
|
@@ -2740,7 +3016,7 @@ export interface operations {
|
|
|
2740
3016
|
/** @description The registration's ID on that chain */
|
|
2741
3017
|
crownId: number;
|
|
2742
3018
|
tokenAddress: string;
|
|
2743
|
-
/** @description The page's logo; `null` when it has none
|
|
3019
|
+
/** @description The page's logo; `null` when it has none, the page is marked NSFW, or Chain Daddy removed the image */
|
|
2744
3020
|
logoUrl: string | null;
|
|
2745
3021
|
/** @description Whether the page carries the NSFW label */
|
|
2746
3022
|
nsfw: boolean;
|
|
@@ -2758,6 +3034,21 @@ export interface operations {
|
|
|
2758
3034
|
};
|
|
2759
3035
|
};
|
|
2760
3036
|
};
|
|
3037
|
+
/** @description The request came with the user agent of an AI or LLM crawler, and no cached answer was there to serve instead. Never sent to a browser or to a server using its own user agent. */
|
|
3038
|
+
403: {
|
|
3039
|
+
headers: {
|
|
3040
|
+
[name: string]: unknown;
|
|
3041
|
+
};
|
|
3042
|
+
content: {
|
|
3043
|
+
/**
|
|
3044
|
+
* @example {
|
|
3045
|
+
* "error": "ai_bot_blocked",
|
|
3046
|
+
* "message": "AI/LLM scraping is not permitted. Use our API with a developer-tier API key for programmatic access."
|
|
3047
|
+
* }
|
|
3048
|
+
*/
|
|
3049
|
+
"application/json": components["schemas"]["Error"];
|
|
3050
|
+
};
|
|
3051
|
+
};
|
|
2761
3052
|
/** @description No verified page for that ticker on that chain, or an unknown chain */
|
|
2762
3053
|
404: {
|
|
2763
3054
|
headers: {
|
|
@@ -2774,6 +3065,24 @@ export interface operations {
|
|
|
2774
3065
|
"application/json": components["schemas"]["Error"];
|
|
2775
3066
|
};
|
|
2776
3067
|
};
|
|
3068
|
+
/** @description More than 400 requests in a minute from one IP address, across the whole API. Never cached. */
|
|
3069
|
+
429: {
|
|
3070
|
+
headers: {
|
|
3071
|
+
/** @description Seconds to wait before trying again */
|
|
3072
|
+
"Retry-After"?: number;
|
|
3073
|
+
[name: string]: unknown;
|
|
3074
|
+
};
|
|
3075
|
+
content: {
|
|
3076
|
+
/**
|
|
3077
|
+
* @example {
|
|
3078
|
+
* "error": "Too many requests. Please try again later.",
|
|
3079
|
+
* "code": "rate_limit_exceeded",
|
|
3080
|
+
* "message": "Too many requests. Please try again later."
|
|
3081
|
+
* }
|
|
3082
|
+
*/
|
|
3083
|
+
"application/json": components["schemas"]["Error"];
|
|
3084
|
+
};
|
|
3085
|
+
};
|
|
2777
3086
|
/** @description The read could not be answered right now. Never cached; try again. */
|
|
2778
3087
|
503: {
|
|
2779
3088
|
headers: {
|
|
@@ -2852,6 +3161,21 @@ export interface operations {
|
|
|
2852
3161
|
};
|
|
2853
3162
|
};
|
|
2854
3163
|
};
|
|
3164
|
+
/** @description The request came with the user agent of an AI or LLM crawler, and no cached answer was there to serve instead. Never sent to a browser or to a server using its own user agent. */
|
|
3165
|
+
403: {
|
|
3166
|
+
headers: {
|
|
3167
|
+
[name: string]: unknown;
|
|
3168
|
+
};
|
|
3169
|
+
content: {
|
|
3170
|
+
/**
|
|
3171
|
+
* @example {
|
|
3172
|
+
* "error": "ai_bot_blocked",
|
|
3173
|
+
* "message": "AI/LLM scraping is not permitted. Use our API with a developer-tier API key for programmatic access."
|
|
3174
|
+
* }
|
|
3175
|
+
*/
|
|
3176
|
+
"application/json": components["schemas"]["Error"];
|
|
3177
|
+
};
|
|
3178
|
+
};
|
|
2855
3179
|
/** @description No verified page for that ticker on that chain, or an unknown chain */
|
|
2856
3180
|
404: {
|
|
2857
3181
|
headers: {
|
|
@@ -2868,6 +3192,24 @@ export interface operations {
|
|
|
2868
3192
|
"application/json": components["schemas"]["Error"];
|
|
2869
3193
|
};
|
|
2870
3194
|
};
|
|
3195
|
+
/** @description More than 400 requests in a minute from one IP address, across the whole API. Never cached. */
|
|
3196
|
+
429: {
|
|
3197
|
+
headers: {
|
|
3198
|
+
/** @description Seconds to wait before trying again */
|
|
3199
|
+
"Retry-After"?: number;
|
|
3200
|
+
[name: string]: unknown;
|
|
3201
|
+
};
|
|
3202
|
+
content: {
|
|
3203
|
+
/**
|
|
3204
|
+
* @example {
|
|
3205
|
+
* "error": "Too many requests. Please try again later.",
|
|
3206
|
+
* "code": "rate_limit_exceeded",
|
|
3207
|
+
* "message": "Too many requests. Please try again later."
|
|
3208
|
+
* }
|
|
3209
|
+
*/
|
|
3210
|
+
"application/json": components["schemas"]["Error"];
|
|
3211
|
+
};
|
|
3212
|
+
};
|
|
2871
3213
|
/** @description The read could not be answered right now. Never cached; try again. */
|
|
2872
3214
|
503: {
|
|
2873
3215
|
headers: {
|
|
@@ -2932,6 +3274,21 @@ export interface operations {
|
|
|
2932
3274
|
};
|
|
2933
3275
|
};
|
|
2934
3276
|
};
|
|
3277
|
+
/** @description The request came with the user agent of an AI or LLM crawler, and no cached answer was there to serve instead. Never sent to a browser or to a server using its own user agent. */
|
|
3278
|
+
403: {
|
|
3279
|
+
headers: {
|
|
3280
|
+
[name: string]: unknown;
|
|
3281
|
+
};
|
|
3282
|
+
content: {
|
|
3283
|
+
/**
|
|
3284
|
+
* @example {
|
|
3285
|
+
* "error": "ai_bot_blocked",
|
|
3286
|
+
* "message": "AI/LLM scraping is not permitted. Use our API with a developer-tier API key for programmatic access."
|
|
3287
|
+
* }
|
|
3288
|
+
*/
|
|
3289
|
+
"application/json": components["schemas"]["Error"];
|
|
3290
|
+
};
|
|
3291
|
+
};
|
|
2935
3292
|
/** @description An unknown chain, or an address that is not one on that chain */
|
|
2936
3293
|
404: {
|
|
2937
3294
|
headers: {
|
|
@@ -2966,9 +3323,15 @@ export interface operations {
|
|
|
2966
3323
|
"application/json": components["schemas"]["Error"];
|
|
2967
3324
|
};
|
|
2968
3325
|
};
|
|
2969
|
-
/**
|
|
3326
|
+
/**
|
|
3327
|
+
* @description The read could not be answered right now. Never cached; try again. It never means the wallet
|
|
3328
|
+
* holds nothing. In a busy moment, when Chain Daddy is making as many chain reads as it allows,
|
|
3329
|
+
* it carries `Retry-After`.
|
|
3330
|
+
*/
|
|
2970
3331
|
503: {
|
|
2971
3332
|
headers: {
|
|
3333
|
+
/** @description Seconds to wait before trying again. Sent only in a busy moment */
|
|
3334
|
+
"Retry-After"?: number;
|
|
2972
3335
|
[name: string]: unknown;
|
|
2973
3336
|
};
|
|
2974
3337
|
content: {
|
|
@@ -3023,7 +3386,7 @@ export interface operations {
|
|
|
3023
3386
|
chain: string;
|
|
3024
3387
|
chainId: string;
|
|
3025
3388
|
crownId: number;
|
|
3026
|
-
/** @description The coin's ticker
|
|
3389
|
+
/** @description The coin's ticker */
|
|
3027
3390
|
symbol: string;
|
|
3028
3391
|
badgeHosts: string[];
|
|
3029
3392
|
embedHosts: string[];
|
|
@@ -3031,7 +3394,22 @@ export interface operations {
|
|
|
3031
3394
|
};
|
|
3032
3395
|
};
|
|
3033
3396
|
};
|
|
3034
|
-
/** @description
|
|
3397
|
+
/** @description The request came with the user agent of an AI or LLM crawler, and no cached answer was there to serve instead. Never sent to a browser or to a server using its own user agent. */
|
|
3398
|
+
403: {
|
|
3399
|
+
headers: {
|
|
3400
|
+
[name: string]: unknown;
|
|
3401
|
+
};
|
|
3402
|
+
content: {
|
|
3403
|
+
/**
|
|
3404
|
+
* @example {
|
|
3405
|
+
* "error": "ai_bot_blocked",
|
|
3406
|
+
* "message": "AI/LLM scraping is not permitted. Use our API with a developer-tier API key for programmatic access."
|
|
3407
|
+
* }
|
|
3408
|
+
*/
|
|
3409
|
+
"application/json": components["schemas"]["Error"];
|
|
3410
|
+
};
|
|
3411
|
+
};
|
|
3412
|
+
/** @description An unknown chain, an ID that is not a positive whole number, or a registration that is not a verified coin page's */
|
|
3035
3413
|
404: {
|
|
3036
3414
|
headers: {
|
|
3037
3415
|
[name: string]: unknown;
|
|
@@ -3047,6 +3425,24 @@ export interface operations {
|
|
|
3047
3425
|
"application/json": components["schemas"]["Error"];
|
|
3048
3426
|
};
|
|
3049
3427
|
};
|
|
3428
|
+
/** @description More than 400 requests in a minute from one IP address, across the whole API. Never cached. */
|
|
3429
|
+
429: {
|
|
3430
|
+
headers: {
|
|
3431
|
+
/** @description Seconds to wait before trying again */
|
|
3432
|
+
"Retry-After"?: number;
|
|
3433
|
+
[name: string]: unknown;
|
|
3434
|
+
};
|
|
3435
|
+
content: {
|
|
3436
|
+
/**
|
|
3437
|
+
* @example {
|
|
3438
|
+
* "error": "Too many requests. Please try again later.",
|
|
3439
|
+
* "code": "rate_limit_exceeded",
|
|
3440
|
+
* "message": "Too many requests. Please try again later."
|
|
3441
|
+
* }
|
|
3442
|
+
*/
|
|
3443
|
+
"application/json": components["schemas"]["Error"];
|
|
3444
|
+
};
|
|
3445
|
+
};
|
|
3050
3446
|
/** @description The read could not be answered right now. Never cached; try again. */
|
|
3051
3447
|
503: {
|
|
3052
3448
|
headers: {
|
|
@@ -3065,6 +3461,26 @@ export interface operations {
|
|
|
3065
3461
|
};
|
|
3066
3462
|
};
|
|
3067
3463
|
};
|
|
3464
|
+
getIapConfig: {
|
|
3465
|
+
parameters: {
|
|
3466
|
+
query?: never;
|
|
3467
|
+
header?: never;
|
|
3468
|
+
path?: never;
|
|
3469
|
+
cookie?: never;
|
|
3470
|
+
};
|
|
3471
|
+
requestBody?: never;
|
|
3472
|
+
responses: {
|
|
3473
|
+
/** @description Configuration */
|
|
3474
|
+
200: {
|
|
3475
|
+
headers: {
|
|
3476
|
+
[name: string]: unknown;
|
|
3477
|
+
};
|
|
3478
|
+
content: {
|
|
3479
|
+
"application/json": components["schemas"]["IapConfig"];
|
|
3480
|
+
};
|
|
3481
|
+
};
|
|
3482
|
+
};
|
|
3483
|
+
};
|
|
3068
3484
|
getIapJwks: {
|
|
3069
3485
|
parameters: {
|
|
3070
3486
|
query?: never;
|
|
@@ -3121,7 +3537,7 @@ export interface operations {
|
|
|
3121
3537
|
};
|
|
3122
3538
|
};
|
|
3123
3539
|
responses: {
|
|
3124
|
-
/** @description
|
|
3540
|
+
/** @description The check's answer, also for a receipt that is not valid (read `valid` and `status`) */
|
|
3125
3541
|
200: {
|
|
3126
3542
|
headers: {
|
|
3127
3543
|
[name: string]: unknown;
|
|
@@ -3158,6 +3574,89 @@ export interface operations {
|
|
|
3158
3574
|
404: components["responses"]["IapNotFound"];
|
|
3159
3575
|
};
|
|
3160
3576
|
};
|
|
3577
|
+
getIapTestStore: {
|
|
3578
|
+
parameters: {
|
|
3579
|
+
query?: never;
|
|
3580
|
+
header?: never;
|
|
3581
|
+
path: {
|
|
3582
|
+
/** @description The store's ID (a UUID) */
|
|
3583
|
+
storeId: components["parameters"]["IapStoreId"];
|
|
3584
|
+
};
|
|
3585
|
+
cookie?: never;
|
|
3586
|
+
};
|
|
3587
|
+
requestBody?: never;
|
|
3588
|
+
responses: {
|
|
3589
|
+
/** @description The test store */
|
|
3590
|
+
200: {
|
|
3591
|
+
headers: {
|
|
3592
|
+
[name: string]: unknown;
|
|
3593
|
+
};
|
|
3594
|
+
content: {
|
|
3595
|
+
"application/json": components["schemas"]["IapStore"];
|
|
3596
|
+
};
|
|
3597
|
+
};
|
|
3598
|
+
401: components["responses"]["IapUnauthorized"];
|
|
3599
|
+
403: components["responses"]["IapForbidden"];
|
|
3600
|
+
/**
|
|
3601
|
+
* @description `NOT_FOUND`: no such store, or it has no test store yet (POST here to create it).
|
|
3602
|
+
* `TEST_MODE_DISABLED`: test stores are not available here (`testMode` in `GET /api/v2/iap/config`).
|
|
3603
|
+
*/
|
|
3604
|
+
404: {
|
|
3605
|
+
headers: {
|
|
3606
|
+
[name: string]: unknown;
|
|
3607
|
+
};
|
|
3608
|
+
content: {
|
|
3609
|
+
"application/json": components["schemas"]["IapError"];
|
|
3610
|
+
};
|
|
3611
|
+
};
|
|
3612
|
+
};
|
|
3613
|
+
};
|
|
3614
|
+
openIapTestStore: {
|
|
3615
|
+
parameters: {
|
|
3616
|
+
query?: never;
|
|
3617
|
+
header?: never;
|
|
3618
|
+
path: {
|
|
3619
|
+
/** @description The store's ID (a UUID) */
|
|
3620
|
+
storeId: components["parameters"]["IapStoreId"];
|
|
3621
|
+
};
|
|
3622
|
+
cookie?: never;
|
|
3623
|
+
};
|
|
3624
|
+
requestBody?: never;
|
|
3625
|
+
responses: {
|
|
3626
|
+
/** @description The test store the live store already had */
|
|
3627
|
+
200: {
|
|
3628
|
+
headers: {
|
|
3629
|
+
[name: string]: unknown;
|
|
3630
|
+
};
|
|
3631
|
+
content: {
|
|
3632
|
+
"application/json": components["schemas"]["IapStore"];
|
|
3633
|
+
};
|
|
3634
|
+
};
|
|
3635
|
+
/** @description The test store, just created */
|
|
3636
|
+
201: {
|
|
3637
|
+
headers: {
|
|
3638
|
+
[name: string]: unknown;
|
|
3639
|
+
};
|
|
3640
|
+
content: {
|
|
3641
|
+
"application/json": components["schemas"]["IapStore"];
|
|
3642
|
+
};
|
|
3643
|
+
};
|
|
3644
|
+
401: components["responses"]["IapUnauthorized"];
|
|
3645
|
+
403: components["responses"]["IapForbidden"];
|
|
3646
|
+
/**
|
|
3647
|
+
* @description `NOT_FOUND`: no such store. `TEST_MODE_DISABLED`: test stores are not available here (`testMode` in
|
|
3648
|
+
* `GET /api/v2/iap/config`).
|
|
3649
|
+
*/
|
|
3650
|
+
404: {
|
|
3651
|
+
headers: {
|
|
3652
|
+
[name: string]: unknown;
|
|
3653
|
+
};
|
|
3654
|
+
content: {
|
|
3655
|
+
"application/json": components["schemas"]["IapError"];
|
|
3656
|
+
};
|
|
3657
|
+
};
|
|
3658
|
+
};
|
|
3659
|
+
};
|
|
3161
3660
|
listIapSkus: {
|
|
3162
3661
|
parameters: {
|
|
3163
3662
|
query?: never;
|
|
@@ -3427,12 +3926,13 @@ export interface operations {
|
|
|
3427
3926
|
grantIapItems: {
|
|
3428
3927
|
parameters: {
|
|
3429
3928
|
query?: never;
|
|
3430
|
-
header
|
|
3929
|
+
header: {
|
|
3431
3930
|
/**
|
|
3432
|
-
* @description
|
|
3433
|
-
*
|
|
3931
|
+
* @description Required: a call without it answers 400 `IDEMPOTENCY_KEY_REQUIRED`. Send one value per attempt (a UUID,
|
|
3932
|
+
* or an id of your own such as `cart-8842-attempt-1`), up to 255 characters. Retrying with the same key
|
|
3933
|
+
* and the same request returns the first result and never sells, grants or consumes twice.
|
|
3434
3934
|
*/
|
|
3435
|
-
"Idempotency-Key"
|
|
3935
|
+
"Idempotency-Key": components["parameters"]["IdempotencyKeyRequired"];
|
|
3436
3936
|
};
|
|
3437
3937
|
path: {
|
|
3438
3938
|
/** @description The store's ID (a UUID) */
|
|
@@ -3467,12 +3967,13 @@ export interface operations {
|
|
|
3467
3967
|
consumeIapItems: {
|
|
3468
3968
|
parameters: {
|
|
3469
3969
|
query?: never;
|
|
3470
|
-
header
|
|
3970
|
+
header: {
|
|
3471
3971
|
/**
|
|
3472
|
-
* @description
|
|
3473
|
-
*
|
|
3972
|
+
* @description Required: a call without it answers 400 `IDEMPOTENCY_KEY_REQUIRED`. Send one value per attempt (a UUID,
|
|
3973
|
+
* or an id of your own such as `cart-8842-attempt-1`), up to 255 characters. Retrying with the same key
|
|
3974
|
+
* and the same request returns the first result and never sells, grants or consumes twice.
|
|
3474
3975
|
*/
|
|
3475
|
-
"Idempotency-Key"
|
|
3976
|
+
"Idempotency-Key": components["parameters"]["IdempotencyKeyRequired"];
|
|
3476
3977
|
};
|
|
3477
3978
|
path: {
|
|
3478
3979
|
/** @description The store's ID (a UUID) */
|
|
@@ -3790,12 +4291,13 @@ export interface operations {
|
|
|
3790
4291
|
awardIapDrop: {
|
|
3791
4292
|
parameters: {
|
|
3792
4293
|
query?: never;
|
|
3793
|
-
header
|
|
4294
|
+
header: {
|
|
3794
4295
|
/**
|
|
3795
|
-
* @description
|
|
3796
|
-
*
|
|
4296
|
+
* @description Required: a call without it answers 400 `IDEMPOTENCY_KEY_REQUIRED`. Send one value per attempt (a UUID,
|
|
4297
|
+
* or an id of your own such as `cart-8842-attempt-1`), up to 255 characters. Retrying with the same key
|
|
4298
|
+
* and the same request returns the first result and never sells, grants or consumes twice.
|
|
3797
4299
|
*/
|
|
3798
|
-
"Idempotency-Key"
|
|
4300
|
+
"Idempotency-Key": components["parameters"]["IdempotencyKeyRequired"];
|
|
3799
4301
|
};
|
|
3800
4302
|
path: {
|
|
3801
4303
|
/** @description The store's ID (a UUID) */
|
|
@@ -4347,12 +4849,13 @@ export interface operations {
|
|
|
4347
4849
|
createIapOrder: {
|
|
4348
4850
|
parameters: {
|
|
4349
4851
|
query?: never;
|
|
4350
|
-
header
|
|
4852
|
+
header: {
|
|
4351
4853
|
/**
|
|
4352
|
-
* @description
|
|
4353
|
-
*
|
|
4854
|
+
* @description Required: a call without it answers 400 `IDEMPOTENCY_KEY_REQUIRED`. Send one value per attempt (a UUID,
|
|
4855
|
+
* or an id of your own such as `cart-8842-attempt-1`), up to 255 characters. Retrying with the same key
|
|
4856
|
+
* and the same request returns the first result and never sells, grants or consumes twice.
|
|
4354
4857
|
*/
|
|
4355
|
-
"Idempotency-Key"
|
|
4858
|
+
"Idempotency-Key": components["parameters"]["IdempotencyKeyRequired"];
|
|
4356
4859
|
};
|
|
4357
4860
|
path?: never;
|
|
4358
4861
|
cookie?: never;
|
|
@@ -4412,7 +4915,8 @@ export interface operations {
|
|
|
4412
4915
|
* @description Sold out, or the wallet has reached the SKU's per-wallet limit. For an app's item: `APP_TERMS_CHANGED`
|
|
4413
4916
|
* (its developer changed its terms and the page's owner has not accepted them yet), `APP_NOT_INSTALLED`,
|
|
4414
4917
|
* `APP_NOT_SELLING`, `APP_ORDER_LIMIT` (above the per-purchase limit) or `APP_DAILY_LIMIT` (the wallet
|
|
4415
|
-
* reached what it may pay that app in 24 hours)
|
|
4918
|
+
* reached what it may pay that app in 24 hours). For an app's item paid through a checkout session:
|
|
4919
|
+
* `APP_ITEM_NOT_SOLD_HERE`, with a `reason`
|
|
4416
4920
|
*/
|
|
4417
4921
|
409: {
|
|
4418
4922
|
headers: {
|
|
@@ -4484,15 +4988,79 @@ export interface operations {
|
|
|
4484
4988
|
404: components["responses"]["IapNotFound"];
|
|
4485
4989
|
};
|
|
4486
4990
|
};
|
|
4991
|
+
testPayIapOrder: {
|
|
4992
|
+
parameters: {
|
|
4993
|
+
query?: never;
|
|
4994
|
+
header?: never;
|
|
4995
|
+
path: {
|
|
4996
|
+
/** @description `0x` followed by 64 hex characters */
|
|
4997
|
+
orderId: components["parameters"]["IapOrderId"];
|
|
4998
|
+
};
|
|
4999
|
+
cookie?: never;
|
|
5000
|
+
};
|
|
5001
|
+
requestBody?: never;
|
|
5002
|
+
responses: {
|
|
5003
|
+
/** @description The order, confirmed, with its receipt */
|
|
5004
|
+
200: {
|
|
5005
|
+
headers: {
|
|
5006
|
+
[name: string]: unknown;
|
|
5007
|
+
};
|
|
5008
|
+
content: {
|
|
5009
|
+
"application/json": components["schemas"]["IapOrder"];
|
|
5010
|
+
};
|
|
5011
|
+
};
|
|
5012
|
+
/** @description No credential, or a store key that is unknown or revoked (`INVALID_STORE_KEY`) */
|
|
5013
|
+
401: {
|
|
5014
|
+
headers: {
|
|
5015
|
+
[name: string]: unknown;
|
|
5016
|
+
};
|
|
5017
|
+
content: {
|
|
5018
|
+
"application/json": components["schemas"]["IapError"];
|
|
5019
|
+
};
|
|
5020
|
+
};
|
|
5021
|
+
403: components["responses"]["IapForbidden"];
|
|
5022
|
+
/**
|
|
5023
|
+
* @description `NOT_FOUND`: no such order, or it is not an order of the caller's store or coin page.
|
|
5024
|
+
* `TEST_MODE_DISABLED`: test stores are not available here (`testMode` in `GET /api/v2/iap/config`).
|
|
5025
|
+
*/
|
|
5026
|
+
404: {
|
|
5027
|
+
headers: {
|
|
5028
|
+
[name: string]: unknown;
|
|
5029
|
+
};
|
|
5030
|
+
content: {
|
|
5031
|
+
"application/json": components["schemas"]["IapError"];
|
|
5032
|
+
};
|
|
5033
|
+
};
|
|
5034
|
+
/**
|
|
5035
|
+
* @description `LIVE_ORDER`: the order belongs to a live store. `ORDER_EXPIRED`: the order's deadline has passed;
|
|
5036
|
+
* create a new one.
|
|
5037
|
+
*/
|
|
5038
|
+
409: {
|
|
5039
|
+
headers: {
|
|
5040
|
+
[name: string]: unknown;
|
|
5041
|
+
};
|
|
5042
|
+
content: {
|
|
5043
|
+
/**
|
|
5044
|
+
* @example {
|
|
5045
|
+
* "error": "this is a live order: it is paid on chain, and test-pay pays test orders only",
|
|
5046
|
+
* "code": "LIVE_ORDER"
|
|
5047
|
+
* }
|
|
5048
|
+
*/
|
|
5049
|
+
"application/json": components["schemas"]["IapError"];
|
|
5050
|
+
};
|
|
5051
|
+
};
|
|
5052
|
+
};
|
|
5053
|
+
};
|
|
4487
5054
|
createIapCheckoutSession: {
|
|
4488
5055
|
parameters: {
|
|
4489
5056
|
query?: never;
|
|
4490
|
-
header
|
|
5057
|
+
header: {
|
|
4491
5058
|
/**
|
|
4492
|
-
* @description
|
|
4493
|
-
*
|
|
5059
|
+
* @description Required: a call without it answers 400 `IDEMPOTENCY_KEY_REQUIRED`. Send one value per attempt (a UUID,
|
|
5060
|
+
* or an id of your own such as `cart-8842-attempt-1`), up to 255 characters. Retrying with the same key
|
|
5061
|
+
* and the same request returns the first result and never sells, grants or consumes twice.
|
|
4494
5062
|
*/
|
|
4495
|
-
"Idempotency-Key"
|
|
5063
|
+
"Idempotency-Key": components["parameters"]["IdempotencyKeyRequired"];
|
|
4496
5064
|
};
|
|
4497
5065
|
path?: never;
|
|
4498
5066
|
cookie?: never;
|
|
@@ -4599,7 +5167,13 @@ export interface operations {
|
|
|
4599
5167
|
"application/json": components["schemas"]["IapError"];
|
|
4600
5168
|
};
|
|
4601
5169
|
};
|
|
4602
|
-
/**
|
|
5170
|
+
/**
|
|
5171
|
+
* @description `SKU_NOT_FOR_SALE`: the item is archived, has no price or is an unlock. `APP_ITEM_NOT_SOLD_HERE`: the
|
|
5172
|
+
* item belongs to an app installed on the coin's page and cannot be sold from the coin's own site now.
|
|
5173
|
+
* `reason` says why: `not_allowed_outside_app` (the app's developer has not turned it on for this item),
|
|
5174
|
+
* `app_not_installed`, `terms_changed` (the coin's owner must accept the app's new terms on the coin's
|
|
5175
|
+
* page), `item_not_for_sale` (the app no longer sells it), or one of the `APP_NOT_SELLING` reasons
|
|
5176
|
+
*/
|
|
4603
5177
|
409: {
|
|
4604
5178
|
headers: {
|
|
4605
5179
|
[name: string]: unknown;
|