@phala/pay-server 0.12.2 → 0.13.1
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 +1 -1
- package/dist/addresses.d.ts +3 -3
- package/dist/addresses.d.ts.map +1 -1
- package/dist/addresses.js +4 -5
- package/dist/addresses.js.map +1 -1
- package/dist/generated/openapi.d.ts +61 -23
- package/dist/generated/openapi.d.ts.map +1 -1
- package/dist/helpers.d.ts +1 -1
- package/dist/helpers.d.ts.map +1 -1
- package/dist/helpers.js +1 -1
- package/dist/helpers.js.map +1 -1
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +52 -0
- package/dist/schemas.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -167,7 +167,7 @@ const batchFile = safeBatch(1, TREASURY_SAFE, calls); // Safe Transaction Builde
|
|
|
167
167
|
```
|
|
168
168
|
|
|
169
169
|
`verifyDepositAddress(pins, address)` checks every network of a deposit address the same way.
|
|
170
|
-
`quoteAddress`, `depositAddress`, `forwarderAddress`,
|
|
170
|
+
`quoteAddress`, `depositAddress`, `forwarderAddress`, and `depositAddressSalt`
|
|
171
171
|
recompute an address offline from a treasury you pass, as the Python SDK does.
|
|
172
172
|
|
|
173
173
|
## Chain and token icons
|
package/dist/addresses.d.ts
CHANGED
|
@@ -5,8 +5,6 @@ import { type Address, type Hex } from "viem";
|
|
|
5
5
|
* address commits to the factory, the implementation, the treasury, and the salt.
|
|
6
6
|
*/
|
|
7
7
|
export declare function forwarderAddress(factory: string, implementation: string, treasury: string, salt: Hex): Address;
|
|
8
|
-
/** `keccak256(abi.encode(account, client_reference_id, "quote", quote_id))`: a quote's salt. */
|
|
9
|
-
export declare function quoteSalt(account: string, clientReferenceId: string, quoteId: string): Hex;
|
|
10
8
|
/**
|
|
11
9
|
* `keccak256(abi.encode(account, livemode, client_reference_id, "deposit_address", version))`:
|
|
12
10
|
* a deposit address's salt, the same on every chain.
|
|
@@ -19,7 +17,8 @@ export interface Forwarder {
|
|
|
19
17
|
/** The address of a quote over `treasury`, which you pin yourself (see `verifyQuoteAddress`). */
|
|
20
18
|
export declare function quoteAddress(forwarder: Forwarder, quote: {
|
|
21
19
|
client_reference_id: string;
|
|
22
|
-
|
|
20
|
+
livemode: boolean;
|
|
21
|
+
deposit_address_version: number | null;
|
|
23
22
|
}, treasury: string, account: string): Address;
|
|
24
23
|
/** A deposit address on the network whose treasury is `treasury`, which you pin yourself. */
|
|
25
24
|
export declare function depositAddress(forwarder: Forwarder, address: {
|
|
@@ -56,6 +55,7 @@ export declare function verifyQuoteAddress(pins: AddressPins, quote: {
|
|
|
56
55
|
treasury: string;
|
|
57
56
|
address: string;
|
|
58
57
|
client_reference_id: string;
|
|
58
|
+
deposit_address_version: number | null;
|
|
59
59
|
}): Address;
|
|
60
60
|
/**
|
|
61
61
|
* Recomputes every network of an active deposit address from your pins and returns the address,
|
package/dist/addresses.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addresses.d.ts","sourceRoot":"","sources":["../src/addresses.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,OAAO,EACZ,KAAK,GAAG,EACT,MAAM,MAAM,CAAC;AAEd;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,MAAM,EACf,cAAc,EAAE,MAAM,EACtB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,GAAG,GACR,OAAO,CAgBT;AAED
|
|
1
|
+
{"version":3,"file":"addresses.d.ts","sourceRoot":"","sources":["../src/addresses.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,OAAO,EACZ,KAAK,GAAG,EACT,MAAM,MAAM,CAAC;AAEd;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,MAAM,EACf,cAAc,EAAE,MAAM,EACtB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,GAAG,GACR,OAAO,CAgBT;AAED;;;GAGG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AC;IAChB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,uBAAuB,EAAE,MAAM,GAAG,IAAI,CAAC;CACxC,GACA,OAAO,CAST;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,WAAW,EACjB,OAAO,EAAE;IACP,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,OAAO,CAAC;IAClB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,SAAS;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAC9E,GACA,OAAO,CAgBT"}
|
package/dist/addresses.js
CHANGED
|
@@ -21,10 +21,6 @@ export function forwarderAddress(factory, implementation, treasury, salt) {
|
|
|
21
21
|
bytecodeHash: keccak256(initCode),
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
|
-
/** `keccak256(abi.encode(account, client_reference_id, "quote", quote_id))`: a quote's salt. */
|
|
25
|
-
export function quoteSalt(account, clientReferenceId, quoteId) {
|
|
26
|
-
return keccak256(encodeAbiParameters([{ type: "string" }, { type: "string" }, { type: "string" }, { type: "string" }], [account, clientReferenceId, "quote", quoteId]));
|
|
27
|
-
}
|
|
28
24
|
/**
|
|
29
25
|
* `keccak256(abi.encode(account, livemode, client_reference_id, "deposit_address", version))`:
|
|
30
26
|
* a deposit address's salt, the same on every chain.
|
|
@@ -40,7 +36,10 @@ export function depositAddressSalt(account, livemode, clientReferenceId, version
|
|
|
40
36
|
}
|
|
41
37
|
/** The address of a quote over `treasury`, which you pin yourself (see `verifyQuoteAddress`). */
|
|
42
38
|
export function quoteAddress(forwarder, quote, treasury, account) {
|
|
43
|
-
|
|
39
|
+
if (quote.deposit_address_version === null || !Number.isSafeInteger(quote.deposit_address_version) || quote.deposit_address_version < 1) {
|
|
40
|
+
throw new AddressMismatchError("quote has no valid deposit-address version");
|
|
41
|
+
}
|
|
42
|
+
return forwarderAddress(forwarder.factory, forwarder.implementation, treasury, depositAddressSalt(account, quote.livemode, quote.client_reference_id, quote.deposit_address_version));
|
|
44
43
|
}
|
|
45
44
|
/** A deposit address on the network whose treasury is `treasury`, which you pin yourself. */
|
|
46
45
|
export function depositAddress(forwarder, address, treasury, account) {
|
package/dist/addresses.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addresses.js","sourceRoot":"","sources":["../src/addresses.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,UAAU,EACV,kBAAkB,EAClB,SAAS,EACT,MAAM,GAGP,MAAM,MAAM,CAAC;AAEd;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAC9B,OAAe,EACf,cAAsB,EACtB,QAAgB,EAChB,IAAS;IAET,MAAM,QAAQ,GAAG,MAAM,CAAC;QACtB,MAAM;QACN,QAAQ,EAAE,8DAA8D;QACxE,kBAAkB;QAClB,wBAAwB;QACxB,UAAU,CAAC,cAAc,CAAC;QAC1B,kCAAkC;QAClC,UAAU,CAAC,QAAQ,CAAC;KACrB,CAAC,CAAC;IACH,OAAO,kBAAkB,CAAC;QACxB,MAAM,EAAE,SAAS;QACjB,IAAI,EAAE,UAAU,CAAC,OAAO,CAAC;QACzB,IAAI;QACJ,YAAY,EAAE,SAAS,CAAC,QAAQ,CAAC;KAClC,CAAC,CAAC;AACL,CAAC;AAED
|
|
1
|
+
{"version":3,"file":"addresses.js","sourceRoot":"","sources":["../src/addresses.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,UAAU,EACV,kBAAkB,EAClB,SAAS,EACT,MAAM,GAGP,MAAM,MAAM,CAAC;AAEd;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAC9B,OAAe,EACf,cAAsB,EACtB,QAAgB,EAChB,IAAS;IAET,MAAM,QAAQ,GAAG,MAAM,CAAC;QACtB,MAAM;QACN,QAAQ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AO,CAAC,EAAE,aAAa,OAAO,CAAC,QAAQ,EAAE,CAAC;QAC3E,MAAM,QAAQ,GAAG,cAAc,CAAC,IAAI,EAAE,OAAO,CAAC,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;QACnG,MAAM,OAAO,GAAG,cAAc,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QACtE,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;YAC3C,MAAM,IAAI,oBAAoB,CAAC,GAAG,KAAK,oCAAoC,CAAC,CAAC;QAC/E,CAAC;QACD,KAAK,KAAK,OAAO,CAAC;IACpB,CAAC;IACD,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACxB,MAAM,IAAI,oBAAoB,CAAC,mBAAmB,OAAO,CAAC,EAAE,iBAAiB,CAAC,CAAC;IACjF,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -479,7 +479,7 @@ export interface paths {
|
|
|
479
479
|
readonly put?: never;
|
|
480
480
|
/**
|
|
481
481
|
* Quotes `amount` cents payable in `asset` on `chain_id`: a locked price, the exact token amount,
|
|
482
|
-
* and a
|
|
482
|
+
* and a fixed customer address, valid until `expires_at`, on the terms your payment settings set for
|
|
483
483
|
* the asset; the quote keeps them for good. An asset your settings do not accept is
|
|
484
484
|
* `asset_not_accepted`.
|
|
485
485
|
*/
|
|
@@ -1319,7 +1319,7 @@ export interface components {
|
|
|
1319
1319
|
* @description The public view of a quote, read with its `client_secret` and without a signature, for the
|
|
1320
1320
|
* payer's checkout page. It has no account or internal fields.
|
|
1321
1321
|
* @example {
|
|
1322
|
-
* "address": "
|
|
1322
|
+
* "address": "0x0f45147a02e4c9d91aff20024e22095536fd5053",
|
|
1323
1323
|
* "amount": 2500,
|
|
1324
1324
|
* "amount_atomic": "25000000",
|
|
1325
1325
|
* "amount_credited": null,
|
|
@@ -1328,18 +1328,22 @@ export interface components {
|
|
|
1328
1328
|
* "confirmations": 1,
|
|
1329
1329
|
* "currency": "usd",
|
|
1330
1330
|
* "decimals": 6,
|
|
1331
|
+
* "deposit_address": "da_7b2e9c4a1f6d48b3a5c0e2d4f6a8b1c3",
|
|
1332
|
+
* "deposit_address_version": 1,
|
|
1331
1333
|
* "expires_at": 1790554500,
|
|
1332
1334
|
* "id": "qt_5f1c0b6a2d9e4f3a8b7c6d5e4f3a2b10",
|
|
1333
1335
|
* "livemode": false,
|
|
1334
1336
|
* "object": "quote",
|
|
1335
1337
|
* "payment_status": "seen",
|
|
1336
1338
|
* "payment_uri": "ethereum:0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48@1/transfer?address=0x2f3e91325b2288bce392711f85f5359661062a91&uint256=25000000",
|
|
1339
|
+
* "replaced_by": null,
|
|
1337
1340
|
* "status": "open",
|
|
1338
|
-
* "typical_credit_seconds": 30
|
|
1341
|
+
* "typical_credit_seconds": 30,
|
|
1342
|
+
* "window_start": 1790553600
|
|
1339
1343
|
* }
|
|
1340
1344
|
*/
|
|
1341
1345
|
readonly ClientQuote: {
|
|
1342
|
-
/** @description
|
|
1346
|
+
/** @description Customer deposit-address network to pay. */
|
|
1343
1347
|
readonly address: string;
|
|
1344
1348
|
/**
|
|
1345
1349
|
* Format: int64
|
|
@@ -1379,6 +1383,13 @@ export interface components {
|
|
|
1379
1383
|
* @description The token's decimals, to display `amount_atomic`.
|
|
1380
1384
|
*/
|
|
1381
1385
|
readonly decimals: number;
|
|
1386
|
+
/** @description Deposit address id; null only for historical single-use quotes. */
|
|
1387
|
+
readonly deposit_address: string | null;
|
|
1388
|
+
/**
|
|
1389
|
+
* Format: int64
|
|
1390
|
+
* @description Deposit-address salt version; null only for historical single-use quotes.
|
|
1391
|
+
*/
|
|
1392
|
+
readonly deposit_address_version: number | null;
|
|
1382
1393
|
/**
|
|
1383
1394
|
* Format: int64
|
|
1384
1395
|
* @description End of the payment window, Unix seconds.
|
|
@@ -1404,6 +1415,8 @@ export interface components {
|
|
|
1404
1415
|
readonly payment_status: string;
|
|
1405
1416
|
/** @description EIP-681 URI carrying the token, chain, address, and amount. */
|
|
1406
1417
|
readonly payment_uri: string;
|
|
1418
|
+
/** @description The quote that closed this price window, if replaced. */
|
|
1419
|
+
readonly replaced_by: string | null;
|
|
1407
1420
|
/**
|
|
1408
1421
|
* @description `open`, `complete`, `expired`, or `canceled`, as on `Quote`; hide the address once
|
|
1409
1422
|
* `expires_at` has passed.
|
|
@@ -1415,6 +1428,11 @@ export interface components {
|
|
|
1415
1428
|
* are credited at, as `GET /v1/config` reports it.
|
|
1416
1429
|
*/
|
|
1417
1430
|
readonly typical_credit_seconds: number;
|
|
1431
|
+
/**
|
|
1432
|
+
* Format: int64
|
|
1433
|
+
* @description Exclusive start of the payment window, Unix seconds.
|
|
1434
|
+
*/
|
|
1435
|
+
readonly window_start: number;
|
|
1418
1436
|
};
|
|
1419
1437
|
/**
|
|
1420
1438
|
* @description What a product's UI reads instead of hardcoding: assets, limits, and quote terms.
|
|
@@ -1894,8 +1912,7 @@ export interface components {
|
|
|
1894
1912
|
readonly currency: string;
|
|
1895
1913
|
/**
|
|
1896
1914
|
* @description The deposit address that received the transfer, `da_…`, on `chain_id` at `address`; `null`
|
|
1897
|
-
* for a
|
|
1898
|
-
* spot.
|
|
1915
|
+
* for a historical single-use address. Transfers that do not consume a quote use spot.
|
|
1899
1916
|
*/
|
|
1900
1917
|
readonly deposit_address?: string | null;
|
|
1901
1918
|
/** @description USD per token, a decimal string with 8 places, once valued. */
|
|
@@ -1930,9 +1947,8 @@ export interface components {
|
|
|
1930
1947
|
*/
|
|
1931
1948
|
readonly log_index: number;
|
|
1932
1949
|
/**
|
|
1933
|
-
* @description Your key/value pairs ([metadata](https://docs.stripe.com/api/metadata)):
|
|
1934
|
-
* quote
|
|
1935
|
-
* afterwards; `{}` when none.
|
|
1950
|
+
* @description Your key/value pairs ([metadata](https://docs.stripe.com/api/metadata)): copied from the
|
|
1951
|
+
* consumed quote, otherwise from the deposit address when recorded; independent afterwards.
|
|
1936
1952
|
*/
|
|
1937
1953
|
readonly metadata: {
|
|
1938
1954
|
readonly [key: string]: string;
|
|
@@ -3016,9 +3032,9 @@ export interface components {
|
|
|
3016
3032
|
readonly updated: number;
|
|
3017
3033
|
};
|
|
3018
3034
|
/**
|
|
3019
|
-
* @description A
|
|
3035
|
+
* @description A price window on the customer's persistent deposit address.
|
|
3020
3036
|
* @example {
|
|
3021
|
-
* "address": "
|
|
3037
|
+
* "address": "0x0f45147a02e4c9d91aff20024e22095536fd5053",
|
|
3022
3038
|
* "amount": 2500,
|
|
3023
3039
|
* "amount_atomic": "25000000",
|
|
3024
3040
|
* "asset": "usdc",
|
|
@@ -3028,6 +3044,8 @@ export interface components {
|
|
|
3028
3044
|
* "created": 1790553600,
|
|
3029
3045
|
* "currency": "usd",
|
|
3030
3046
|
* "deposit": null,
|
|
3047
|
+
* "deposit_address": "da_7b2e9c4a1f6d48b3a5c0e2d4f6a8b1c3",
|
|
3048
|
+
* "deposit_address_version": 1,
|
|
3031
3049
|
* "exchange_rate": "1.00000000",
|
|
3032
3050
|
* "expires_at": 1790554500,
|
|
3033
3051
|
* "id": "qt_5f1c0b6a2d9e4f3a8b7c6d5e4f3a2b10",
|
|
@@ -3048,6 +3066,7 @@ export interface components {
|
|
|
3048
3066
|
* "tx_hash": "0x7d3c1e5a9b2f4d6c8e0a1b3d5f7c9e2a4b6d8f0c1e3a5b7d9f1c3e5a7b9d1f3e"
|
|
3049
3067
|
* },
|
|
3050
3068
|
* "payment_uri": "ethereum:0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48@1/transfer?address=0x2f3e91325b2288bce392711f85f5359661062a91&uint256=25000000",
|
|
3069
|
+
* "replaced_by": null,
|
|
3051
3070
|
* "status": "open",
|
|
3052
3071
|
* "terms": {
|
|
3053
3072
|
* "confirmations": "12",
|
|
@@ -3060,11 +3079,12 @@ export interface components {
|
|
|
3060
3079
|
* "quote_tolerance_bps": 100,
|
|
3061
3080
|
* "quote_ttl_seconds": 900
|
|
3062
3081
|
* },
|
|
3063
|
-
* "treasury": "0x936c1991f8da9a919fa11b557a3514719f5a4504"
|
|
3082
|
+
* "treasury": "0x936c1991f8da9a919fa11b557a3514719f5a4504",
|
|
3083
|
+
* "window_start": 1790553600
|
|
3064
3084
|
* }
|
|
3065
3085
|
*/
|
|
3066
3086
|
readonly Quote: {
|
|
3067
|
-
/** @description
|
|
3087
|
+
/** @description Customer deposit-address network to pay. */
|
|
3068
3088
|
readonly address: string;
|
|
3069
3089
|
/**
|
|
3070
3090
|
* Format: int64
|
|
@@ -3103,6 +3123,13 @@ export interface components {
|
|
|
3103
3123
|
/** @description `usd`. */
|
|
3104
3124
|
readonly currency: string;
|
|
3105
3125
|
readonly deposit?: components["schemas"]["ExpandableDeposit"] | null;
|
|
3126
|
+
/** @description Deposit address id; null only for historical single-use quotes. */
|
|
3127
|
+
readonly deposit_address: string | null;
|
|
3128
|
+
/**
|
|
3129
|
+
* Format: int64
|
|
3130
|
+
* @description Deposit-address salt version; null only for historical single-use quotes.
|
|
3131
|
+
*/
|
|
3132
|
+
readonly deposit_address_version: number | null;
|
|
3106
3133
|
/** @description The locked price in USD per token, a decimal string with 8 decimal places. */
|
|
3107
3134
|
readonly exchange_rate: string;
|
|
3108
3135
|
/**
|
|
@@ -3110,11 +3137,7 @@ export interface components {
|
|
|
3110
3137
|
* @description End of the payment window, Unix seconds.
|
|
3111
3138
|
*/
|
|
3112
3139
|
readonly expires_at: number;
|
|
3113
|
-
/**
|
|
3114
|
-
* @description `qt_` id. The quote's address salt is `keccak256(abi.encode(account,
|
|
3115
|
-
* client_reference_id, "quote", id))` with the types `(string, string, string, string)`,
|
|
3116
|
-
* where `account` is your `acct_` id.
|
|
3117
|
-
*/
|
|
3140
|
+
/** @description `qt_` id. */
|
|
3118
3141
|
readonly id: string;
|
|
3119
3142
|
/** @description Whether the quote was created with a live key. */
|
|
3120
3143
|
readonly livemode: boolean;
|
|
@@ -3130,6 +3153,8 @@ export interface components {
|
|
|
3130
3153
|
readonly payment?: components["schemas"]["Payment"] | null;
|
|
3131
3154
|
/** @description EIP-681 URI carrying the token, chain, address, and amount. */
|
|
3132
3155
|
readonly payment_uri: string;
|
|
3156
|
+
/** @description The quote that closed this price window, if replaced. */
|
|
3157
|
+
readonly replaced_by: string | null;
|
|
3133
3158
|
/**
|
|
3134
3159
|
* @description `open`, `complete` (a matching payment consumed it), `expired`, or `canceled`. A quote stays
|
|
3135
3160
|
* `open` after `expires_at` until the finalized chain passes it, so a payment mined in time
|
|
@@ -3146,13 +3171,18 @@ export interface components {
|
|
|
3146
3171
|
* address is the factory's `CREATE2` over it and the salt.
|
|
3147
3172
|
*/
|
|
3148
3173
|
readonly treasury: string;
|
|
3174
|
+
/**
|
|
3175
|
+
* Format: int64
|
|
3176
|
+
* @description Exclusive start of the payment window, Unix seconds.
|
|
3177
|
+
*/
|
|
3178
|
+
readonly window_start: number;
|
|
3149
3179
|
};
|
|
3150
3180
|
/**
|
|
3151
3181
|
* @description A page of quotes, newest first (<https://docs.stripe.com/api/pagination>).
|
|
3152
3182
|
* @example {
|
|
3153
3183
|
* "data": [
|
|
3154
3184
|
* {
|
|
3155
|
-
* "address": "
|
|
3185
|
+
* "address": "0x0f45147a02e4c9d91aff20024e22095536fd5053",
|
|
3156
3186
|
* "amount": 2500,
|
|
3157
3187
|
* "amount_atomic": "25000000",
|
|
3158
3188
|
* "asset": "usdc",
|
|
@@ -3162,6 +3192,8 @@ export interface components {
|
|
|
3162
3192
|
* "created": 1790553600,
|
|
3163
3193
|
* "currency": "usd",
|
|
3164
3194
|
* "deposit": null,
|
|
3195
|
+
* "deposit_address": "da_7b2e9c4a1f6d48b3a5c0e2d4f6a8b1c3",
|
|
3196
|
+
* "deposit_address_version": 1,
|
|
3165
3197
|
* "exchange_rate": "1.00000000",
|
|
3166
3198
|
* "expires_at": 1790554500,
|
|
3167
3199
|
* "id": "qt_5f1c0b6a2d9e4f3a8b7c6d5e4f3a2b10",
|
|
@@ -3182,6 +3214,7 @@ export interface components {
|
|
|
3182
3214
|
* "tx_hash": "0x7d3c1e5a9b2f4d6c8e0a1b3d5f7c9e2a4b6d8f0c1e3a5b7d9f1c3e5a7b9d1f3e"
|
|
3183
3215
|
* },
|
|
3184
3216
|
* "payment_uri": "ethereum:0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48@1/transfer?address=0x2f3e91325b2288bce392711f85f5359661062a91&uint256=25000000",
|
|
3217
|
+
* "replaced_by": null,
|
|
3185
3218
|
* "status": "open",
|
|
3186
3219
|
* "terms": {
|
|
3187
3220
|
* "confirmations": "12",
|
|
@@ -3194,7 +3227,8 @@ export interface components {
|
|
|
3194
3227
|
* "quote_tolerance_bps": 100,
|
|
3195
3228
|
* "quote_ttl_seconds": 900
|
|
3196
3229
|
* },
|
|
3197
|
-
* "treasury": "0x936c1991f8da9a919fa11b557a3514719f5a4504"
|
|
3230
|
+
* "treasury": "0x936c1991f8da9a919fa11b557a3514719f5a4504",
|
|
3231
|
+
* "window_start": 1790553600
|
|
3198
3232
|
* }
|
|
3199
3233
|
* ],
|
|
3200
3234
|
* "has_more": false,
|
|
@@ -3259,7 +3293,7 @@ export interface components {
|
|
|
3259
3293
|
* @description `GET /v1/quotes/{id}` returns a `Quote` to a signed request and a `ClientQuote` to a request by
|
|
3260
3294
|
* `client_secret`.
|
|
3261
3295
|
* @example {
|
|
3262
|
-
* "address": "
|
|
3296
|
+
* "address": "0x0f45147a02e4c9d91aff20024e22095536fd5053",
|
|
3263
3297
|
* "amount": 2500,
|
|
3264
3298
|
* "amount_atomic": "25000000",
|
|
3265
3299
|
* "asset": "usdc",
|
|
@@ -3269,6 +3303,8 @@ export interface components {
|
|
|
3269
3303
|
* "created": 1790553600,
|
|
3270
3304
|
* "currency": "usd",
|
|
3271
3305
|
* "deposit": null,
|
|
3306
|
+
* "deposit_address": "da_7b2e9c4a1f6d48b3a5c0e2d4f6a8b1c3",
|
|
3307
|
+
* "deposit_address_version": 1,
|
|
3272
3308
|
* "exchange_rate": "1.00000000",
|
|
3273
3309
|
* "expires_at": 1790554500,
|
|
3274
3310
|
* "id": "qt_5f1c0b6a2d9e4f3a8b7c6d5e4f3a2b10",
|
|
@@ -3289,6 +3325,7 @@ export interface components {
|
|
|
3289
3325
|
* "tx_hash": "0x7d3c1e5a9b2f4d6c8e0a1b3d5f7c9e2a4b6d8f0c1e3a5b7d9f1c3e5a7b9d1f3e"
|
|
3290
3326
|
* },
|
|
3291
3327
|
* "payment_uri": "ethereum:0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48@1/transfer?address=0x2f3e91325b2288bce392711f85f5359661062a91&uint256=25000000",
|
|
3328
|
+
* "replaced_by": null,
|
|
3292
3329
|
* "status": "open",
|
|
3293
3330
|
* "terms": {
|
|
3294
3331
|
* "confirmations": "12",
|
|
@@ -3301,7 +3338,8 @@ export interface components {
|
|
|
3301
3338
|
* "quote_tolerance_bps": 100,
|
|
3302
3339
|
* "quote_ttl_seconds": 900
|
|
3303
3340
|
* },
|
|
3304
|
-
* "treasury": "0x936c1991f8da9a919fa11b557a3514719f5a4504"
|
|
3341
|
+
* "treasury": "0x936c1991f8da9a919fa11b557a3514719f5a4504",
|
|
3342
|
+
* "window_start": 1790553600
|
|
3305
3343
|
* }
|
|
3306
3344
|
*/
|
|
3307
3345
|
readonly QuoteView: components["schemas"]["Quote"] | components["schemas"]["ClientQuote"];
|
|
@@ -5881,7 +5919,7 @@ export interface operations {
|
|
|
5881
5919
|
readonly query?: {
|
|
5882
5920
|
/** @description Only this customer's deposits */
|
|
5883
5921
|
readonly client_reference_id?: string;
|
|
5884
|
-
/** @description Only deposits
|
|
5922
|
+
/** @description Only deposits that consumed this quote */
|
|
5885
5923
|
readonly quote?: string;
|
|
5886
5924
|
/** @description Only deposits to this deposit address, `da_…` */
|
|
5887
5925
|
readonly deposit_address?: string;
|