@moonpay/platform-protocol 1.4.2 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/errors.cjs.map +1 -1
- package/dist/api/errors.d.cts +2 -1
- package/dist/api/errors.d.ts +2 -1
- package/dist/api/errors.js.map +1 -1
- package/dist/api/index.cjs.map +1 -1
- package/dist/api/index.d.cts +124 -21
- package/dist/api/index.d.ts +124 -21
- package/dist/frames/apple-pay.cjs.map +1 -1
- package/dist/frames/apple-pay.d.cts +1 -1
- package/dist/frames/apple-pay.d.ts +1 -1
- package/dist/models/connection.cjs.map +1 -1
- package/dist/models/connection.d.cts +10 -3
- package/dist/models/connection.d.ts +10 -3
- package/dist/models/connection.js.map +1 -1
- package/dist/sdks/apple-pay.cjs.map +1 -1
- package/dist/sdks/apple-pay.d.cts +1 -1
- package/dist/sdks/apple-pay.d.ts +1 -1
- package/package.json +1 -1
package/dist/api/errors.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/api/errors.ts"],"sourcesContent":["// ---------------------------------------------------------------------------\n// API errors\n// ---------------------------------------------------------------------------\n\nexport const DevPlatformApiErrorCodes = {\n unknownError: 'unknown_error',\n unauthorized: 'unauthorized',\n forbidden: 'forbidden',\n notFound: 'not_found',\n invalidRequest: 'invalid_request',\n notImplemented: 'not_implemented',\n tooManyRequests: 'too_many_requests',\n notAllowed: 'not_allowed',\n conflict: 'conflict',\n unprocessableEntity: 'unprocessable_entity',\n sseTimeout: 'sse_timeout',\n sseError: 'sse_error',\n connectionRequired: 'connection_required',\n connectionPending: 'connection_pending',\n connectionUnavailable: 'connection_unavailable',\n serviceUnavailable: 'service_unavailable',\n requirementsIncomplete: 'requirements_incomplete',\n verificationRejected: 'verification_rejected',\n countryMismatch: 'country_mismatch',\n unsupportedCountry: 'unsupported_country',\n} as const;\n\nexport type DevPlatformApiErrorCode =\n (typeof DevPlatformApiErrorCodes)[keyof typeof DevPlatformApiErrorCodes];\n\nexport interface DevPlatformApiErrorDetail {\n field?: string;\n message: string;\n}\n\n/** Shape returned by the MoonPay Platform API on error responses. */\nexport interface DevPlatformApiError {\n code: DevPlatformApiErrorCode;\n message: string;\n errors?: DevPlatformApiErrorDetail[];\n}\n\n// ---------------------------------------------------------------------------\n// API call result errors (all alias DevPlatformApiError)\n// ---------------------------------------------------------------------------\n\nexport type GetQuoteError = DevPlatformApiError;\nexport type GetPaymentMethodsError = DevPlatformApiError;\nexport type GetTransactionsError = DevPlatformApiError;\nexport type CreateSessionError = DevPlatformApiError;\nexport type RevokeSessionError = DevPlatformApiError;\nexport type CreateIdentityError = DevPlatformApiError;\nexport type GetIdentityError = DevPlatformApiError;\nexport type UpdateIdentityError = DevPlatformApiError;\nexport type VerifyIdentityError = DevPlatformApiError;\nexport type GetIdentityUploadUrlError = DevPlatformApiError;\nexport type SubmitIdentityFilesError = DevPlatformApiError;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIO,IAAM,2BAA2B;AAAA,EACtC,cAAc;AAAA,EACd,cAAc;AAAA,EACd,WAAW;AAAA,EACX,UAAU;AAAA,EACV,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,iBAAiB;AAAA,EACjB,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,qBAAqB;AAAA,EACrB,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,oBAAoB;AAAA,EACpB,mBAAmB;AAAA,EACnB,uBAAuB;AAAA,EACvB,oBAAoB;AAAA,EACpB,wBAAwB;AAAA,EACxB,sBAAsB;AAAA,EACtB,iBAAiB;AAAA,EACjB,oBAAoB;AACtB;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/api/errors.ts"],"sourcesContent":["// ---------------------------------------------------------------------------\n// API errors\n// ---------------------------------------------------------------------------\n\nexport const DevPlatformApiErrorCodes = {\n unknownError: 'unknown_error',\n unauthorized: 'unauthorized',\n forbidden: 'forbidden',\n notFound: 'not_found',\n invalidRequest: 'invalid_request',\n notImplemented: 'not_implemented',\n tooManyRequests: 'too_many_requests',\n notAllowed: 'not_allowed',\n conflict: 'conflict',\n unprocessableEntity: 'unprocessable_entity',\n sseTimeout: 'sse_timeout',\n sseError: 'sse_error',\n connectionRequired: 'connection_required',\n connectionPending: 'connection_pending',\n connectionUnavailable: 'connection_unavailable',\n serviceUnavailable: 'service_unavailable',\n requirementsIncomplete: 'requirements_incomplete',\n verificationRejected: 'verification_rejected',\n countryMismatch: 'country_mismatch',\n unsupportedCountry: 'unsupported_country',\n} as const;\n\nexport type DevPlatformApiErrorCode =\n (typeof DevPlatformApiErrorCodes)[keyof typeof DevPlatformApiErrorCodes];\n\nexport interface DevPlatformApiErrorDetail {\n field?: string;\n message: string;\n}\n\n/** Shape returned by the MoonPay Platform API on error responses. */\nexport interface DevPlatformApiError {\n code: DevPlatformApiErrorCode;\n message: string;\n errors?: DevPlatformApiErrorDetail[];\n}\n\n// ---------------------------------------------------------------------------\n// API call result errors (all alias DevPlatformApiError)\n// ---------------------------------------------------------------------------\n\nexport type GetQuoteError = DevPlatformApiError;\nexport type GetAssetsError = DevPlatformApiError;\nexport type GetPaymentMethodsError = DevPlatformApiError;\nexport type GetTransactionsError = DevPlatformApiError;\nexport type CreateSessionError = DevPlatformApiError;\nexport type RevokeSessionError = DevPlatformApiError;\nexport type CreateIdentityError = DevPlatformApiError;\nexport type GetIdentityError = DevPlatformApiError;\nexport type UpdateIdentityError = DevPlatformApiError;\nexport type VerifyIdentityError = DevPlatformApiError;\nexport type GetIdentityUploadUrlError = DevPlatformApiError;\nexport type SubmitIdentityFilesError = DevPlatformApiError;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIO,IAAM,2BAA2B;AAAA,EACtC,cAAc;AAAA,EACd,cAAc;AAAA,EACd,WAAW;AAAA,EACX,UAAU;AAAA,EACV,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,iBAAiB;AAAA,EACjB,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,qBAAqB;AAAA,EACrB,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,oBAAoB;AAAA,EACpB,mBAAmB;AAAA,EACnB,uBAAuB;AAAA,EACvB,oBAAoB;AAAA,EACpB,wBAAwB;AAAA,EACxB,sBAAsB;AAAA,EACtB,iBAAiB;AAAA,EACjB,oBAAoB;AACtB;","names":[]}
|
package/dist/api/errors.d.cts
CHANGED
|
@@ -32,6 +32,7 @@ interface DevPlatformApiError {
|
|
|
32
32
|
errors?: DevPlatformApiErrorDetail[];
|
|
33
33
|
}
|
|
34
34
|
type GetQuoteError = DevPlatformApiError;
|
|
35
|
+
type GetAssetsError = DevPlatformApiError;
|
|
35
36
|
type GetPaymentMethodsError = DevPlatformApiError;
|
|
36
37
|
type GetTransactionsError = DevPlatformApiError;
|
|
37
38
|
type CreateSessionError = DevPlatformApiError;
|
|
@@ -43,4 +44,4 @@ type VerifyIdentityError = DevPlatformApiError;
|
|
|
43
44
|
type GetIdentityUploadUrlError = DevPlatformApiError;
|
|
44
45
|
type SubmitIdentityFilesError = DevPlatformApiError;
|
|
45
46
|
|
|
46
|
-
export { type CreateIdentityError, type CreateSessionError, type DevPlatformApiError, type DevPlatformApiErrorCode, DevPlatformApiErrorCodes, type DevPlatformApiErrorDetail, type GetIdentityError, type GetIdentityUploadUrlError, type GetPaymentMethodsError, type GetQuoteError, type GetTransactionsError, type RevokeSessionError, type SubmitIdentityFilesError, type UpdateIdentityError, type VerifyIdentityError };
|
|
47
|
+
export { type CreateIdentityError, type CreateSessionError, type DevPlatformApiError, type DevPlatformApiErrorCode, DevPlatformApiErrorCodes, type DevPlatformApiErrorDetail, type GetAssetsError, type GetIdentityError, type GetIdentityUploadUrlError, type GetPaymentMethodsError, type GetQuoteError, type GetTransactionsError, type RevokeSessionError, type SubmitIdentityFilesError, type UpdateIdentityError, type VerifyIdentityError };
|
package/dist/api/errors.d.ts
CHANGED
|
@@ -32,6 +32,7 @@ interface DevPlatformApiError {
|
|
|
32
32
|
errors?: DevPlatformApiErrorDetail[];
|
|
33
33
|
}
|
|
34
34
|
type GetQuoteError = DevPlatformApiError;
|
|
35
|
+
type GetAssetsError = DevPlatformApiError;
|
|
35
36
|
type GetPaymentMethodsError = DevPlatformApiError;
|
|
36
37
|
type GetTransactionsError = DevPlatformApiError;
|
|
37
38
|
type CreateSessionError = DevPlatformApiError;
|
|
@@ -43,4 +44,4 @@ type VerifyIdentityError = DevPlatformApiError;
|
|
|
43
44
|
type GetIdentityUploadUrlError = DevPlatformApiError;
|
|
44
45
|
type SubmitIdentityFilesError = DevPlatformApiError;
|
|
45
46
|
|
|
46
|
-
export { type CreateIdentityError, type CreateSessionError, type DevPlatformApiError, type DevPlatformApiErrorCode, DevPlatformApiErrorCodes, type DevPlatformApiErrorDetail, type GetIdentityError, type GetIdentityUploadUrlError, type GetPaymentMethodsError, type GetQuoteError, type GetTransactionsError, type RevokeSessionError, type SubmitIdentityFilesError, type UpdateIdentityError, type VerifyIdentityError };
|
|
47
|
+
export { type CreateIdentityError, type CreateSessionError, type DevPlatformApiError, type DevPlatformApiErrorCode, DevPlatformApiErrorCodes, type DevPlatformApiErrorDetail, type GetAssetsError, type GetIdentityError, type GetIdentityUploadUrlError, type GetPaymentMethodsError, type GetQuoteError, type GetTransactionsError, type RevokeSessionError, type SubmitIdentityFilesError, type UpdateIdentityError, type VerifyIdentityError };
|
package/dist/api/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/api/errors.ts"],"sourcesContent":["// ---------------------------------------------------------------------------\n// API errors\n// ---------------------------------------------------------------------------\n\nexport const DevPlatformApiErrorCodes = {\n unknownError: 'unknown_error',\n unauthorized: 'unauthorized',\n forbidden: 'forbidden',\n notFound: 'not_found',\n invalidRequest: 'invalid_request',\n notImplemented: 'not_implemented',\n tooManyRequests: 'too_many_requests',\n notAllowed: 'not_allowed',\n conflict: 'conflict',\n unprocessableEntity: 'unprocessable_entity',\n sseTimeout: 'sse_timeout',\n sseError: 'sse_error',\n connectionRequired: 'connection_required',\n connectionPending: 'connection_pending',\n connectionUnavailable: 'connection_unavailable',\n serviceUnavailable: 'service_unavailable',\n requirementsIncomplete: 'requirements_incomplete',\n verificationRejected: 'verification_rejected',\n countryMismatch: 'country_mismatch',\n unsupportedCountry: 'unsupported_country',\n} as const;\n\nexport type DevPlatformApiErrorCode =\n (typeof DevPlatformApiErrorCodes)[keyof typeof DevPlatformApiErrorCodes];\n\nexport interface DevPlatformApiErrorDetail {\n field?: string;\n message: string;\n}\n\n/** Shape returned by the MoonPay Platform API on error responses. */\nexport interface DevPlatformApiError {\n code: DevPlatformApiErrorCode;\n message: string;\n errors?: DevPlatformApiErrorDetail[];\n}\n\n// ---------------------------------------------------------------------------\n// API call result errors (all alias DevPlatformApiError)\n// ---------------------------------------------------------------------------\n\nexport type GetQuoteError = DevPlatformApiError;\nexport type GetPaymentMethodsError = DevPlatformApiError;\nexport type GetTransactionsError = DevPlatformApiError;\nexport type CreateSessionError = DevPlatformApiError;\nexport type RevokeSessionError = DevPlatformApiError;\nexport type CreateIdentityError = DevPlatformApiError;\nexport type GetIdentityError = DevPlatformApiError;\nexport type UpdateIdentityError = DevPlatformApiError;\nexport type VerifyIdentityError = DevPlatformApiError;\nexport type GetIdentityUploadUrlError = DevPlatformApiError;\nexport type SubmitIdentityFilesError = DevPlatformApiError;\n"],"mappings":";AAIO,IAAM,2BAA2B;AAAA,EACtC,cAAc;AAAA,EACd,cAAc;AAAA,EACd,WAAW;AAAA,EACX,UAAU;AAAA,EACV,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,iBAAiB;AAAA,EACjB,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,qBAAqB;AAAA,EACrB,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,oBAAoB;AAAA,EACpB,mBAAmB;AAAA,EACnB,uBAAuB;AAAA,EACvB,oBAAoB;AAAA,EACpB,wBAAwB;AAAA,EACxB,sBAAsB;AAAA,EACtB,iBAAiB;AAAA,EACjB,oBAAoB;AACtB;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/api/errors.ts"],"sourcesContent":["// ---------------------------------------------------------------------------\n// API errors\n// ---------------------------------------------------------------------------\n\nexport const DevPlatformApiErrorCodes = {\n unknownError: 'unknown_error',\n unauthorized: 'unauthorized',\n forbidden: 'forbidden',\n notFound: 'not_found',\n invalidRequest: 'invalid_request',\n notImplemented: 'not_implemented',\n tooManyRequests: 'too_many_requests',\n notAllowed: 'not_allowed',\n conflict: 'conflict',\n unprocessableEntity: 'unprocessable_entity',\n sseTimeout: 'sse_timeout',\n sseError: 'sse_error',\n connectionRequired: 'connection_required',\n connectionPending: 'connection_pending',\n connectionUnavailable: 'connection_unavailable',\n serviceUnavailable: 'service_unavailable',\n requirementsIncomplete: 'requirements_incomplete',\n verificationRejected: 'verification_rejected',\n countryMismatch: 'country_mismatch',\n unsupportedCountry: 'unsupported_country',\n} as const;\n\nexport type DevPlatformApiErrorCode =\n (typeof DevPlatformApiErrorCodes)[keyof typeof DevPlatformApiErrorCodes];\n\nexport interface DevPlatformApiErrorDetail {\n field?: string;\n message: string;\n}\n\n/** Shape returned by the MoonPay Platform API on error responses. */\nexport interface DevPlatformApiError {\n code: DevPlatformApiErrorCode;\n message: string;\n errors?: DevPlatformApiErrorDetail[];\n}\n\n// ---------------------------------------------------------------------------\n// API call result errors (all alias DevPlatformApiError)\n// ---------------------------------------------------------------------------\n\nexport type GetQuoteError = DevPlatformApiError;\nexport type GetAssetsError = DevPlatformApiError;\nexport type GetPaymentMethodsError = DevPlatformApiError;\nexport type GetTransactionsError = DevPlatformApiError;\nexport type CreateSessionError = DevPlatformApiError;\nexport type RevokeSessionError = DevPlatformApiError;\nexport type CreateIdentityError = DevPlatformApiError;\nexport type GetIdentityError = DevPlatformApiError;\nexport type UpdateIdentityError = DevPlatformApiError;\nexport type VerifyIdentityError = DevPlatformApiError;\nexport type GetIdentityUploadUrlError = DevPlatformApiError;\nexport type SubmitIdentityFilesError = DevPlatformApiError;\n"],"mappings":";AAIO,IAAM,2BAA2B;AAAA,EACtC,cAAc;AAAA,EACd,cAAc;AAAA,EACd,WAAW;AAAA,EACX,UAAU;AAAA,EACV,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,iBAAiB;AAAA,EACjB,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,qBAAqB;AAAA,EACrB,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,oBAAoB;AAAA,EACpB,mBAAmB;AAAA,EACnB,uBAAuB;AAAA,EACvB,oBAAoB;AAAA,EACpB,wBAAwB;AAAA,EACxB,sBAAsB;AAAA,EACtB,iBAAiB;AAAA,EACjB,oBAAoB;AACtB;","names":[]}
|
package/dist/api/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/api/index.ts"],"sourcesContent":["/**\n * Partner-friendly type aliases re-exported from the generated OpenAPI types.\n * These drop namespace prefixes and provide consistent names across SDK versions.\n */\nexport type {\n // Assets\n Asset,\n AssetBase,\n // Session\n CreateSessionTokenRequestBody,\n CreateSessionTokenResponse as CreateSessionTokenReturnType,\n // Fees / wallet\n Fees,\n // Quotes\n GetQuoteBody as GetQuoteParams,\n GetQuoteResponse as Quote,\n LimitWithAsset,\n MonetaryFeeAmount,\n MoonPayCorePaginationInfo as PaginationInfo,\n // Payment methods — config catalog\n MoonPayPaymentsListPaymentMethodsResponse as ListPaymentMethodsResponse,\n MoonPayPaymentsPaymentMethod as PaymentMethodConfig,\n MoonPayPaymentsPaymentMethodAvailability as PaymentMethodAvailability,\n MoonPayPaymentsPaymentMethodCapabilities as PaymentMethodCapabilities,\n MoonPayPaymentsStoredCardPaymentMethod as StoredCardPaymentMethod,\n // Payment methods — stored cards\n MoonPayPaymentsStoredPaymentMethod as StoredPaymentMethod,\n PaymentMethodType,\n QuoteLimitEntry,\n QuoteLimits,\n QuotePaymentMethod,\n // Stages\n Stage,\n StageKind,\n StageStatus,\n //
|
|
1
|
+
{"version":3,"sources":["../../src/api/index.ts"],"sourcesContent":["/**\n * Partner-friendly type aliases re-exported from the generated OpenAPI types.\n * These drop namespace prefixes and provide consistent names across SDK versions.\n */\nexport type {\n // Assets\n Asset,\n AssetBase,\n AssetControllerListAssetsResponse as ListAssetsResponse,\n AssetStatus,\n // Session\n CreateSessionTokenRequestBody,\n CreateSessionTokenResponse as CreateSessionTokenReturnType,\n // Fees / wallet\n Fees,\n // Quotes\n GetQuoteBody as GetQuoteParams,\n GetQuoteResponse as Quote,\n LimitWithAsset,\n MonetaryFeeAmount,\n MoonPayCorePaginationInfo as PaginationInfo,\n // Payment methods — config catalog\n MoonPayPaymentsListPaymentMethodsResponse as ListPaymentMethodsResponse,\n MoonPayPaymentsPaymentMethod as PaymentMethodConfig,\n MoonPayPaymentsPaymentMethodAvailability as PaymentMethodAvailability,\n MoonPayPaymentsPaymentMethodCapabilities as PaymentMethodCapabilities,\n MoonPayPaymentsStoredCardPaymentMethod as StoredCardPaymentMethod,\n // Payment methods — stored cards\n MoonPayPaymentsStoredPaymentMethod as StoredPaymentMethod,\n PaymentMethodType,\n PlatformAsset,\n QuoteLimitEntry,\n QuoteLimits,\n QuotePaymentMethod,\n // Stages\n Stage,\n StageKind,\n StageStatus,\n // Transactions\n Transaction,\n TransactionCustomer,\n TransactionPaymentMethod,\n TransactionStatus,\n TransactionWithStages,\n Wallet,\n} from './gen/index.js';\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
package/dist/api/index.d.cts
CHANGED
|
@@ -41,6 +41,32 @@ type AssetBase = {
|
|
|
41
41
|
*/
|
|
42
42
|
code: string;
|
|
43
43
|
};
|
|
44
|
+
/**
|
|
45
|
+
* Current status flags for an asset.
|
|
46
|
+
*/
|
|
47
|
+
type AssetStatus = {
|
|
48
|
+
/**
|
|
49
|
+
* Temporarily unavailable for trading.
|
|
50
|
+
*/
|
|
51
|
+
suspended: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Disabled for trading.
|
|
54
|
+
*/
|
|
55
|
+
disabled: boolean;
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* Destination crypto asset. Identify it by `code` for CeFi assets, or by `caip19` (the CAIP-19 identifier from the assets listing) for DeFi tokens, whose `code` is not unique. Provide exactly one; `caip19` takes precedence if both are sent.
|
|
59
|
+
*/
|
|
60
|
+
type BuyQuoteDestinationAsset = {
|
|
61
|
+
/**
|
|
62
|
+
* CeFi currency code, e.g. `BTC` or `ETH`. Use for centralised assets.
|
|
63
|
+
*/
|
|
64
|
+
code?: string;
|
|
65
|
+
/**
|
|
66
|
+
* CAIP-19 asset identifier from the assets listing. Required for DeFi tokens.
|
|
67
|
+
*/
|
|
68
|
+
caip19?: string;
|
|
69
|
+
};
|
|
44
70
|
type CreateSessionTokenRequestBody = {
|
|
45
71
|
/**
|
|
46
72
|
* A unique identifier for the customer from your system.
|
|
@@ -51,13 +77,17 @@ type CreateSessionTokenRequestBody = {
|
|
|
51
77
|
*/
|
|
52
78
|
deviceIp: IPv4Address | IPv6Address;
|
|
53
79
|
/**
|
|
54
|
-
* The customer's email address. Must be a valid email. If provided,
|
|
80
|
+
* The customer's email address. Must be a valid email. If provided, enables email OTP authentication.
|
|
55
81
|
*/
|
|
56
82
|
email?: string;
|
|
57
83
|
/**
|
|
58
|
-
* The customer's phone number in E.164 format. If provided,
|
|
84
|
+
* The customer's phone number in E.164 format. If both email and phone are provided, enables phone OTP authentication for returning customers.
|
|
59
85
|
*/
|
|
60
86
|
phoneNumber?: string;
|
|
87
|
+
/**
|
|
88
|
+
* An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp of when the customer accepted MoonPay's Terms of Use. Send this when you capture Terms of Use acceptance in your own UI. The value can be at most 60 seconds ahead of server time, with no past limit. MoonPay records the terms version live at this timestamp and binds the acceptance to the customer when the session is authorized.
|
|
89
|
+
*/
|
|
90
|
+
termsAcceptedAt?: string;
|
|
61
91
|
};
|
|
62
92
|
type CreateSessionTokenResponse = {
|
|
63
93
|
/**
|
|
@@ -80,6 +110,10 @@ type Fees = {
|
|
|
80
110
|
* Ecosystem fees (in fiat) for the transaction, if applicable.
|
|
81
111
|
*/
|
|
82
112
|
ecosystem?: MonetaryFeeAmount;
|
|
113
|
+
/**
|
|
114
|
+
* DeFi swap fee (in fiat) for the transaction, converted to the quote's base currency like the other fees. Present only for DeFi swaps that carry an itemized swap fee; when the fee is taken on-chain it is reflected in `destination.amount` instead.
|
|
115
|
+
*/
|
|
116
|
+
defi?: MonetaryFeeAmount;
|
|
83
117
|
/**
|
|
84
118
|
* Partner fees (in fiat) for the transaction, if applicable. Deprecated: use `fees.ecosystem` instead. This field will be removed in a future release.
|
|
85
119
|
* @deprecated
|
|
@@ -101,10 +135,10 @@ type GetQuoteBody = {
|
|
|
101
135
|
amount?: string;
|
|
102
136
|
};
|
|
103
137
|
/**
|
|
104
|
-
* Destination asset in crypto. Amount can be set in `destination` or `source`.
|
|
138
|
+
* Destination asset in crypto. Amount can be set in `destination` or `source`. For DeFi tokens, identify the asset by `caip19` and set the amount on `source` only (quoting by destination token amount is not supported).
|
|
105
139
|
*/
|
|
106
140
|
destination: {
|
|
107
|
-
asset:
|
|
141
|
+
asset: BuyQuoteDestinationAsset;
|
|
108
142
|
/**
|
|
109
143
|
* The amount being received, if known
|
|
110
144
|
*/
|
|
@@ -144,7 +178,7 @@ type GetQuoteResponse = {
|
|
|
144
178
|
* A stringified amount, which can include decimals.
|
|
145
179
|
*/
|
|
146
180
|
amount: string;
|
|
147
|
-
asset:
|
|
181
|
+
asset: QuoteDestinationAsset;
|
|
148
182
|
};
|
|
149
183
|
/**
|
|
150
184
|
* Breakdown of network, MoonPay, and ecosystem fees.
|
|
@@ -168,9 +202,13 @@ type GetQuoteResponse = {
|
|
|
168
202
|
*/
|
|
169
203
|
executable: boolean;
|
|
170
204
|
/**
|
|
171
|
-
* The rate used to convert fiat <-> crypto, expressed as the
|
|
205
|
+
* The rate used to convert fiat <-> crypto, expressed as the fiat value of one unit of crypto (e.g. `1 SOL = {exchangeRate} USD`).
|
|
172
206
|
*/
|
|
173
207
|
exchangeRate: string;
|
|
208
|
+
/**
|
|
209
|
+
* Slippage tolerance applied to the DeFi swap, in basis points (e.g. `50` = 0.5%). Only present when the destination is a DeFi token.
|
|
210
|
+
*/
|
|
211
|
+
slippageBps?: number;
|
|
174
212
|
/**
|
|
175
213
|
* Disclosures the partner must render verbatim before the customer can complete the transaction. Empty when no disclosure is required for the customer's geography, payment method, and asset combination.
|
|
176
214
|
*/
|
|
@@ -307,6 +345,75 @@ type PaymentDisclosure = {
|
|
|
307
345
|
version: string;
|
|
308
346
|
};
|
|
309
347
|
type PaymentMethodType = 'apple_pay' | 'card' | 'ach' | 'fps' | 'fps_open_banking' | 'google_pay' | 'sepa' | 'sepa_open_banking' | 'pix' | 'paypal' | 'venmo' | 'revolut_pay' | 'moonpay_balance' | 'interac';
|
|
348
|
+
/**
|
|
349
|
+
* A crypto asset available for purchase through MoonPay.
|
|
350
|
+
*/
|
|
351
|
+
type PlatformAsset = {
|
|
352
|
+
/**
|
|
353
|
+
* The CAIP-19 asset identifier (encodes chain and contract). Use this value when creating quotes for DeFi tokens.
|
|
354
|
+
*/
|
|
355
|
+
caip19: string;
|
|
356
|
+
/**
|
|
357
|
+
* The asset code. Use this value when creating quotes for CeFi assets.
|
|
358
|
+
*/
|
|
359
|
+
code: string;
|
|
360
|
+
/**
|
|
361
|
+
* The human-readable name of the asset.
|
|
362
|
+
*/
|
|
363
|
+
name: string;
|
|
364
|
+
/**
|
|
365
|
+
* The blockchain network code this asset belongs to.
|
|
366
|
+
*/
|
|
367
|
+
network: string;
|
|
368
|
+
/**
|
|
369
|
+
* Whether this is a centralised asset listed by MoonPay (`cefi`) or a DeFi token (`defi`). Quote CeFi assets by `code` and DeFi tokens by `caip19`.
|
|
370
|
+
*/
|
|
371
|
+
source: 'cefi' | 'defi';
|
|
372
|
+
/**
|
|
373
|
+
* The on-chain contract address. Null for native gas tokens.
|
|
374
|
+
*/
|
|
375
|
+
contractAddress: string | null;
|
|
376
|
+
/**
|
|
377
|
+
* The number of decimal places used on-chain, or null if unknown.
|
|
378
|
+
*/
|
|
379
|
+
decimals: number | null;
|
|
380
|
+
/**
|
|
381
|
+
* The maximum decimal places MoonPay supports for trading this asset, or null if unknown.
|
|
382
|
+
*/
|
|
383
|
+
precision: number | null;
|
|
384
|
+
status: AssetStatus;
|
|
385
|
+
};
|
|
386
|
+
/**
|
|
387
|
+
* Destination crypto asset returned on the quote. Adds the resolved network and, for DeFi tokens, the CAIP-19 identifier on top of the base asset fields.
|
|
388
|
+
*/
|
|
389
|
+
type QuoteDestinationAsset = {
|
|
390
|
+
/**
|
|
391
|
+
* A fiat or crypto currency code.
|
|
392
|
+
*
|
|
393
|
+
* **Fiat**
|
|
394
|
+
* Fiat codes are represented as [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) codes.
|
|
395
|
+
*
|
|
396
|
+
* Currently only `USD` is supported.
|
|
397
|
+
*
|
|
398
|
+
* **Crypto**
|
|
399
|
+
* For crypto currency codes, see [supported currencies](https://dev.moonpay.com/docs/list-of-supported-cryptocurrencies).
|
|
400
|
+
*
|
|
401
|
+
* Examples: `BTC` `SOL` `ETH` `USDC_BASE` `USDC_SOL`
|
|
402
|
+
*/
|
|
403
|
+
code: string;
|
|
404
|
+
/**
|
|
405
|
+
* The human-readable name
|
|
406
|
+
*/
|
|
407
|
+
name?: string;
|
|
408
|
+
/**
|
|
409
|
+
* The number of supported decimal places
|
|
410
|
+
*/
|
|
411
|
+
precision?: number;
|
|
412
|
+
/**
|
|
413
|
+
* The CAIP-19 asset identifier (encodes chain and contract). Present for DeFi tokens.
|
|
414
|
+
*/
|
|
415
|
+
caip19?: string;
|
|
416
|
+
};
|
|
310
417
|
type QuoteLimitEntry = {
|
|
311
418
|
/**
|
|
312
419
|
* The maximum amount.
|
|
@@ -364,20 +471,6 @@ type StageKind = 'ordering' | 'waiting_payment' | 'waiting_authentication' | 've
|
|
|
364
471
|
* The status of a transaction stage.
|
|
365
472
|
*/
|
|
366
473
|
type StageStatus = 'not_started' | 'in_progress' | 'success' | 'failed';
|
|
367
|
-
type TermsAttestation = {
|
|
368
|
-
/**
|
|
369
|
-
* The MoonPay ID of the terms attestation.
|
|
370
|
-
*/
|
|
371
|
-
id: string;
|
|
372
|
-
/**
|
|
373
|
-
* Your identifier for the end customer who accepted MoonPay's terms.
|
|
374
|
-
*/
|
|
375
|
-
externalCustomerId: string;
|
|
376
|
-
/**
|
|
377
|
-
* An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) formatted string indicating when the attestation was recorded.
|
|
378
|
-
*/
|
|
379
|
-
attestedAt: string;
|
|
380
|
-
};
|
|
381
474
|
type Transaction = {
|
|
382
475
|
/**
|
|
383
476
|
* The MoonPay ID of the transaction.
|
|
@@ -462,5 +555,15 @@ type Wallet = {
|
|
|
462
555
|
*/
|
|
463
556
|
tag?: string;
|
|
464
557
|
};
|
|
558
|
+
type AssetControllerListAssetsResponses = {
|
|
559
|
+
/**
|
|
560
|
+
* The request has succeeded.
|
|
561
|
+
*/
|
|
562
|
+
200: {
|
|
563
|
+
data: Array<PlatformAsset>;
|
|
564
|
+
pageInfo: MoonPayCorePaginationInfo;
|
|
565
|
+
};
|
|
566
|
+
};
|
|
567
|
+
type AssetControllerListAssetsResponse = AssetControllerListAssetsResponses[keyof AssetControllerListAssetsResponses];
|
|
465
568
|
|
|
466
|
-
export type { Asset, AssetBase, CreateSessionTokenRequestBody, CreateSessionTokenResponse as CreateSessionTokenReturnType, Fees, GetQuoteBody as GetQuoteParams, LimitWithAsset, MoonPayPaymentsListPaymentMethodsResponse as ListPaymentMethodsResponse, MonetaryFeeAmount, MoonPayCorePaginationInfo as PaginationInfo, MoonPayPaymentsPaymentMethodAvailability as PaymentMethodAvailability, MoonPayPaymentsPaymentMethodCapabilities as PaymentMethodCapabilities, MoonPayPaymentsPaymentMethod as PaymentMethodConfig, PaymentMethodType, GetQuoteResponse as Quote, QuoteLimitEntry, QuoteLimits, QuotePaymentMethod, Stage, StageKind, StageStatus, MoonPayPaymentsStoredCardPaymentMethod as StoredCardPaymentMethod, MoonPayPaymentsStoredPaymentMethod as StoredPaymentMethod,
|
|
569
|
+
export type { Asset, AssetBase, AssetStatus, CreateSessionTokenRequestBody, CreateSessionTokenResponse as CreateSessionTokenReturnType, Fees, GetQuoteBody as GetQuoteParams, LimitWithAsset, AssetControllerListAssetsResponse as ListAssetsResponse, MoonPayPaymentsListPaymentMethodsResponse as ListPaymentMethodsResponse, MonetaryFeeAmount, MoonPayCorePaginationInfo as PaginationInfo, MoonPayPaymentsPaymentMethodAvailability as PaymentMethodAvailability, MoonPayPaymentsPaymentMethodCapabilities as PaymentMethodCapabilities, MoonPayPaymentsPaymentMethod as PaymentMethodConfig, PaymentMethodType, PlatformAsset, GetQuoteResponse as Quote, QuoteLimitEntry, QuoteLimits, QuotePaymentMethod, Stage, StageKind, StageStatus, MoonPayPaymentsStoredCardPaymentMethod as StoredCardPaymentMethod, MoonPayPaymentsStoredPaymentMethod as StoredPaymentMethod, Transaction, TransactionCustomer, TransactionPaymentMethod, TransactionStatus, TransactionWithStages, Wallet };
|
package/dist/api/index.d.ts
CHANGED
|
@@ -41,6 +41,32 @@ type AssetBase = {
|
|
|
41
41
|
*/
|
|
42
42
|
code: string;
|
|
43
43
|
};
|
|
44
|
+
/**
|
|
45
|
+
* Current status flags for an asset.
|
|
46
|
+
*/
|
|
47
|
+
type AssetStatus = {
|
|
48
|
+
/**
|
|
49
|
+
* Temporarily unavailable for trading.
|
|
50
|
+
*/
|
|
51
|
+
suspended: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Disabled for trading.
|
|
54
|
+
*/
|
|
55
|
+
disabled: boolean;
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* Destination crypto asset. Identify it by `code` for CeFi assets, or by `caip19` (the CAIP-19 identifier from the assets listing) for DeFi tokens, whose `code` is not unique. Provide exactly one; `caip19` takes precedence if both are sent.
|
|
59
|
+
*/
|
|
60
|
+
type BuyQuoteDestinationAsset = {
|
|
61
|
+
/**
|
|
62
|
+
* CeFi currency code, e.g. `BTC` or `ETH`. Use for centralised assets.
|
|
63
|
+
*/
|
|
64
|
+
code?: string;
|
|
65
|
+
/**
|
|
66
|
+
* CAIP-19 asset identifier from the assets listing. Required for DeFi tokens.
|
|
67
|
+
*/
|
|
68
|
+
caip19?: string;
|
|
69
|
+
};
|
|
44
70
|
type CreateSessionTokenRequestBody = {
|
|
45
71
|
/**
|
|
46
72
|
* A unique identifier for the customer from your system.
|
|
@@ -51,13 +77,17 @@ type CreateSessionTokenRequestBody = {
|
|
|
51
77
|
*/
|
|
52
78
|
deviceIp: IPv4Address | IPv6Address;
|
|
53
79
|
/**
|
|
54
|
-
* The customer's email address. Must be a valid email. If provided,
|
|
80
|
+
* The customer's email address. Must be a valid email. If provided, enables email OTP authentication.
|
|
55
81
|
*/
|
|
56
82
|
email?: string;
|
|
57
83
|
/**
|
|
58
|
-
* The customer's phone number in E.164 format. If provided,
|
|
84
|
+
* The customer's phone number in E.164 format. If both email and phone are provided, enables phone OTP authentication for returning customers.
|
|
59
85
|
*/
|
|
60
86
|
phoneNumber?: string;
|
|
87
|
+
/**
|
|
88
|
+
* An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp of when the customer accepted MoonPay's Terms of Use. Send this when you capture Terms of Use acceptance in your own UI. The value can be at most 60 seconds ahead of server time, with no past limit. MoonPay records the terms version live at this timestamp and binds the acceptance to the customer when the session is authorized.
|
|
89
|
+
*/
|
|
90
|
+
termsAcceptedAt?: string;
|
|
61
91
|
};
|
|
62
92
|
type CreateSessionTokenResponse = {
|
|
63
93
|
/**
|
|
@@ -80,6 +110,10 @@ type Fees = {
|
|
|
80
110
|
* Ecosystem fees (in fiat) for the transaction, if applicable.
|
|
81
111
|
*/
|
|
82
112
|
ecosystem?: MonetaryFeeAmount;
|
|
113
|
+
/**
|
|
114
|
+
* DeFi swap fee (in fiat) for the transaction, converted to the quote's base currency like the other fees. Present only for DeFi swaps that carry an itemized swap fee; when the fee is taken on-chain it is reflected in `destination.amount` instead.
|
|
115
|
+
*/
|
|
116
|
+
defi?: MonetaryFeeAmount;
|
|
83
117
|
/**
|
|
84
118
|
* Partner fees (in fiat) for the transaction, if applicable. Deprecated: use `fees.ecosystem` instead. This field will be removed in a future release.
|
|
85
119
|
* @deprecated
|
|
@@ -101,10 +135,10 @@ type GetQuoteBody = {
|
|
|
101
135
|
amount?: string;
|
|
102
136
|
};
|
|
103
137
|
/**
|
|
104
|
-
* Destination asset in crypto. Amount can be set in `destination` or `source`.
|
|
138
|
+
* Destination asset in crypto. Amount can be set in `destination` or `source`. For DeFi tokens, identify the asset by `caip19` and set the amount on `source` only (quoting by destination token amount is not supported).
|
|
105
139
|
*/
|
|
106
140
|
destination: {
|
|
107
|
-
asset:
|
|
141
|
+
asset: BuyQuoteDestinationAsset;
|
|
108
142
|
/**
|
|
109
143
|
* The amount being received, if known
|
|
110
144
|
*/
|
|
@@ -144,7 +178,7 @@ type GetQuoteResponse = {
|
|
|
144
178
|
* A stringified amount, which can include decimals.
|
|
145
179
|
*/
|
|
146
180
|
amount: string;
|
|
147
|
-
asset:
|
|
181
|
+
asset: QuoteDestinationAsset;
|
|
148
182
|
};
|
|
149
183
|
/**
|
|
150
184
|
* Breakdown of network, MoonPay, and ecosystem fees.
|
|
@@ -168,9 +202,13 @@ type GetQuoteResponse = {
|
|
|
168
202
|
*/
|
|
169
203
|
executable: boolean;
|
|
170
204
|
/**
|
|
171
|
-
* The rate used to convert fiat <-> crypto, expressed as the
|
|
205
|
+
* The rate used to convert fiat <-> crypto, expressed as the fiat value of one unit of crypto (e.g. `1 SOL = {exchangeRate} USD`).
|
|
172
206
|
*/
|
|
173
207
|
exchangeRate: string;
|
|
208
|
+
/**
|
|
209
|
+
* Slippage tolerance applied to the DeFi swap, in basis points (e.g. `50` = 0.5%). Only present when the destination is a DeFi token.
|
|
210
|
+
*/
|
|
211
|
+
slippageBps?: number;
|
|
174
212
|
/**
|
|
175
213
|
* Disclosures the partner must render verbatim before the customer can complete the transaction. Empty when no disclosure is required for the customer's geography, payment method, and asset combination.
|
|
176
214
|
*/
|
|
@@ -307,6 +345,75 @@ type PaymentDisclosure = {
|
|
|
307
345
|
version: string;
|
|
308
346
|
};
|
|
309
347
|
type PaymentMethodType = 'apple_pay' | 'card' | 'ach' | 'fps' | 'fps_open_banking' | 'google_pay' | 'sepa' | 'sepa_open_banking' | 'pix' | 'paypal' | 'venmo' | 'revolut_pay' | 'moonpay_balance' | 'interac';
|
|
348
|
+
/**
|
|
349
|
+
* A crypto asset available for purchase through MoonPay.
|
|
350
|
+
*/
|
|
351
|
+
type PlatformAsset = {
|
|
352
|
+
/**
|
|
353
|
+
* The CAIP-19 asset identifier (encodes chain and contract). Use this value when creating quotes for DeFi tokens.
|
|
354
|
+
*/
|
|
355
|
+
caip19: string;
|
|
356
|
+
/**
|
|
357
|
+
* The asset code. Use this value when creating quotes for CeFi assets.
|
|
358
|
+
*/
|
|
359
|
+
code: string;
|
|
360
|
+
/**
|
|
361
|
+
* The human-readable name of the asset.
|
|
362
|
+
*/
|
|
363
|
+
name: string;
|
|
364
|
+
/**
|
|
365
|
+
* The blockchain network code this asset belongs to.
|
|
366
|
+
*/
|
|
367
|
+
network: string;
|
|
368
|
+
/**
|
|
369
|
+
* Whether this is a centralised asset listed by MoonPay (`cefi`) or a DeFi token (`defi`). Quote CeFi assets by `code` and DeFi tokens by `caip19`.
|
|
370
|
+
*/
|
|
371
|
+
source: 'cefi' | 'defi';
|
|
372
|
+
/**
|
|
373
|
+
* The on-chain contract address. Null for native gas tokens.
|
|
374
|
+
*/
|
|
375
|
+
contractAddress: string | null;
|
|
376
|
+
/**
|
|
377
|
+
* The number of decimal places used on-chain, or null if unknown.
|
|
378
|
+
*/
|
|
379
|
+
decimals: number | null;
|
|
380
|
+
/**
|
|
381
|
+
* The maximum decimal places MoonPay supports for trading this asset, or null if unknown.
|
|
382
|
+
*/
|
|
383
|
+
precision: number | null;
|
|
384
|
+
status: AssetStatus;
|
|
385
|
+
};
|
|
386
|
+
/**
|
|
387
|
+
* Destination crypto asset returned on the quote. Adds the resolved network and, for DeFi tokens, the CAIP-19 identifier on top of the base asset fields.
|
|
388
|
+
*/
|
|
389
|
+
type QuoteDestinationAsset = {
|
|
390
|
+
/**
|
|
391
|
+
* A fiat or crypto currency code.
|
|
392
|
+
*
|
|
393
|
+
* **Fiat**
|
|
394
|
+
* Fiat codes are represented as [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) codes.
|
|
395
|
+
*
|
|
396
|
+
* Currently only `USD` is supported.
|
|
397
|
+
*
|
|
398
|
+
* **Crypto**
|
|
399
|
+
* For crypto currency codes, see [supported currencies](https://dev.moonpay.com/docs/list-of-supported-cryptocurrencies).
|
|
400
|
+
*
|
|
401
|
+
* Examples: `BTC` `SOL` `ETH` `USDC_BASE` `USDC_SOL`
|
|
402
|
+
*/
|
|
403
|
+
code: string;
|
|
404
|
+
/**
|
|
405
|
+
* The human-readable name
|
|
406
|
+
*/
|
|
407
|
+
name?: string;
|
|
408
|
+
/**
|
|
409
|
+
* The number of supported decimal places
|
|
410
|
+
*/
|
|
411
|
+
precision?: number;
|
|
412
|
+
/**
|
|
413
|
+
* The CAIP-19 asset identifier (encodes chain and contract). Present for DeFi tokens.
|
|
414
|
+
*/
|
|
415
|
+
caip19?: string;
|
|
416
|
+
};
|
|
310
417
|
type QuoteLimitEntry = {
|
|
311
418
|
/**
|
|
312
419
|
* The maximum amount.
|
|
@@ -364,20 +471,6 @@ type StageKind = 'ordering' | 'waiting_payment' | 'waiting_authentication' | 've
|
|
|
364
471
|
* The status of a transaction stage.
|
|
365
472
|
*/
|
|
366
473
|
type StageStatus = 'not_started' | 'in_progress' | 'success' | 'failed';
|
|
367
|
-
type TermsAttestation = {
|
|
368
|
-
/**
|
|
369
|
-
* The MoonPay ID of the terms attestation.
|
|
370
|
-
*/
|
|
371
|
-
id: string;
|
|
372
|
-
/**
|
|
373
|
-
* Your identifier for the end customer who accepted MoonPay's terms.
|
|
374
|
-
*/
|
|
375
|
-
externalCustomerId: string;
|
|
376
|
-
/**
|
|
377
|
-
* An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) formatted string indicating when the attestation was recorded.
|
|
378
|
-
*/
|
|
379
|
-
attestedAt: string;
|
|
380
|
-
};
|
|
381
474
|
type Transaction = {
|
|
382
475
|
/**
|
|
383
476
|
* The MoonPay ID of the transaction.
|
|
@@ -462,5 +555,15 @@ type Wallet = {
|
|
|
462
555
|
*/
|
|
463
556
|
tag?: string;
|
|
464
557
|
};
|
|
558
|
+
type AssetControllerListAssetsResponses = {
|
|
559
|
+
/**
|
|
560
|
+
* The request has succeeded.
|
|
561
|
+
*/
|
|
562
|
+
200: {
|
|
563
|
+
data: Array<PlatformAsset>;
|
|
564
|
+
pageInfo: MoonPayCorePaginationInfo;
|
|
565
|
+
};
|
|
566
|
+
};
|
|
567
|
+
type AssetControllerListAssetsResponse = AssetControllerListAssetsResponses[keyof AssetControllerListAssetsResponses];
|
|
465
568
|
|
|
466
|
-
export type { Asset, AssetBase, CreateSessionTokenRequestBody, CreateSessionTokenResponse as CreateSessionTokenReturnType, Fees, GetQuoteBody as GetQuoteParams, LimitWithAsset, MoonPayPaymentsListPaymentMethodsResponse as ListPaymentMethodsResponse, MonetaryFeeAmount, MoonPayCorePaginationInfo as PaginationInfo, MoonPayPaymentsPaymentMethodAvailability as PaymentMethodAvailability, MoonPayPaymentsPaymentMethodCapabilities as PaymentMethodCapabilities, MoonPayPaymentsPaymentMethod as PaymentMethodConfig, PaymentMethodType, GetQuoteResponse as Quote, QuoteLimitEntry, QuoteLimits, QuotePaymentMethod, Stage, StageKind, StageStatus, MoonPayPaymentsStoredCardPaymentMethod as StoredCardPaymentMethod, MoonPayPaymentsStoredPaymentMethod as StoredPaymentMethod,
|
|
569
|
+
export type { Asset, AssetBase, AssetStatus, CreateSessionTokenRequestBody, CreateSessionTokenResponse as CreateSessionTokenReturnType, Fees, GetQuoteBody as GetQuoteParams, LimitWithAsset, AssetControllerListAssetsResponse as ListAssetsResponse, MoonPayPaymentsListPaymentMethodsResponse as ListPaymentMethodsResponse, MonetaryFeeAmount, MoonPayCorePaginationInfo as PaginationInfo, MoonPayPaymentsPaymentMethodAvailability as PaymentMethodAvailability, MoonPayPaymentsPaymentMethodCapabilities as PaymentMethodCapabilities, MoonPayPaymentsPaymentMethod as PaymentMethodConfig, PaymentMethodType, PlatformAsset, GetQuoteResponse as Quote, QuoteLimitEntry, QuoteLimits, QuotePaymentMethod, Stage, StageKind, StageStatus, MoonPayPaymentsStoredCardPaymentMethod as StoredCardPaymentMethod, MoonPayPaymentsStoredPaymentMethod as StoredPaymentMethod, Transaction, TransactionCustomer, TransactionPaymentMethod, TransactionStatus, TransactionWithStages, Wallet };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/frames/apple-pay.ts"],"sourcesContent":["import type { ChallengeRequired } from '../models/challenge.js';\nimport type { FrameTransaction } from '../models/transaction.js';\nimport type { FrameError } from '../protocol.js';\n\nexport interface InboundMessageMap {\n ready: void;\n error: FrameError<\n
|
|
1
|
+
{"version":3,"sources":["../../src/frames/apple-pay.ts"],"sourcesContent":["import type { ChallengeRequired } from '../models/challenge.js';\nimport type { FrameTransaction } from '../models/transaction.js';\nimport type { FrameError } from '../protocol.js';\n\nexport interface InboundMessageMap {\n ready: void;\n error: FrameError<\n 'configurationError' | 'quoteExpired' | 'invalidQuote' | 'applePayUnavailable' | 'generic'\n >;\n /** Signals that the pipeline requires a challenge step. Load `url` in a challenge frame. */\n challenge: ChallengeRequired;\n complete: { transaction: FrameTransaction };\n}\n\nexport interface OutboundMessageMap {\n setQuote: { quote: { signature: string } };\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -4,7 +4,7 @@ import { FrameError } from '../protocol.cjs';
|
|
|
4
4
|
|
|
5
5
|
interface InboundMessageMap {
|
|
6
6
|
ready: void;
|
|
7
|
-
error: FrameError<'configurationError' | 'quoteExpired' | 'invalidQuote' | 'applePayUnavailable' | 'generic'
|
|
7
|
+
error: FrameError<'configurationError' | 'quoteExpired' | 'invalidQuote' | 'applePayUnavailable' | 'generic'>;
|
|
8
8
|
/** Signals that the pipeline requires a challenge step. Load `url` in a challenge frame. */
|
|
9
9
|
challenge: ChallengeRequired;
|
|
10
10
|
complete: {
|
|
@@ -4,7 +4,7 @@ import { FrameError } from '../protocol.js';
|
|
|
4
4
|
|
|
5
5
|
interface InboundMessageMap {
|
|
6
6
|
ready: void;
|
|
7
|
-
error: FrameError<'configurationError' | 'quoteExpired' | 'invalidQuote' | 'applePayUnavailable' | 'generic'
|
|
7
|
+
error: FrameError<'configurationError' | 'quoteExpired' | 'invalidQuote' | 'applePayUnavailable' | 'generic'>;
|
|
8
8
|
/** Signals that the pipeline requires a challenge step. Load `url` in a challenge frame. */
|
|
9
9
|
challenge: ChallengeRequired;
|
|
10
10
|
complete: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/models/connection.ts"],"sourcesContent":["// ---------------------------------------------------------------------------\n// Connection statuses\n// ---------------------------------------------------------------------------\n\nexport enum ConnectionStatus {\n /**\n * New or expired user — needs the full connect flow.\n */\n connectionRequired = 'connectionRequired',\n\n /**\n * Valid connection — encrypted credentials are included.\n */\n active = 'active',\n\n /**\n * Restricted location — connection cannot be used.\n */\n unavailable = 'unavailable',\n\n /**\n * KYC decision delayed — may resolve on a subsequent visit.\n */\n pending = 'pending',\n\n /**\n * Terminal failure — KYC fail, rejection, etc.\n */\n failed = 'failed',\n\n /**\n * Customer has no valid Terms of Use attestation on file (headless/Identity API partners).\n * Display Terms of Use in your own UI, capture acceptance, call\n * `POST /platform/v1/terms/attestations`, then retry the connection.\n */\n termsAcceptanceRequired = 'termsAcceptanceRequired',\n}\n\nexport interface ConnectionRequired {\n status: ConnectionStatus.connectionRequired;\n /**\n * Base64-encoded, X25519+AES-GCM encrypted anonymous token payload.\n * These are frame-internal tokens used by the connect frame — they cannot be\n * used to call MoonPay APIs directly. Decrypt via `decryptCredentials()` only\n * if you need the `clientToken` to bootstrap the connect frame manually.\n */\n credentials: string;\n /**\n * Capabilities and regulatory requirements available before authentication, if any.\n * Present when
|
|
1
|
+
{"version":3,"sources":["../../src/models/connection.ts"],"sourcesContent":["// ---------------------------------------------------------------------------\n// Connection statuses\n// ---------------------------------------------------------------------------\n\nexport enum ConnectionStatus {\n /**\n * New or expired user — needs the full connect flow.\n */\n connectionRequired = 'connectionRequired',\n\n /**\n * Valid connection — encrypted credentials are included.\n */\n active = 'active',\n\n /**\n * Restricted location — connection cannot be used.\n */\n unavailable = 'unavailable',\n\n /**\n * KYC decision delayed — may resolve on a subsequent visit.\n */\n pending = 'pending',\n\n /**\n * Terminal failure — KYC fail, rejection, etc.\n */\n failed = 'failed',\n\n /**\n * Customer has no valid Terms of Use attestation on file (headless/Identity API partners).\n * Display Terms of Use in your own UI, capture acceptance, call\n * `POST /platform/v1/terms/attestations`, then retry the connection.\n */\n termsAcceptanceRequired = 'termsAcceptanceRequired',\n}\n\nexport interface ConnectionRequired {\n status: ConnectionStatus.connectionRequired;\n /**\n * Base64-encoded, X25519+AES-GCM encrypted anonymous token payload.\n * These are frame-internal tokens used by the connect frame — they cannot be\n * used to call MoonPay APIs directly. Decrypt via `decryptCredentials()` only\n * if you need the `clientToken` to bootstrap the connect frame manually.\n */\n credentials: string;\n /**\n * Capabilities and regulatory requirements available before authentication, if any.\n * Present when guest checkout is enabled for the partner.\n */\n capabilities?: CustomerCapabilities;\n /**\n * Set when the session's email and phone number resolve to two different\n * MoonPay customers (a conflict). Partners should route the customer\n * through Connect proactively before rendering payment UI (e.g. Apple Pay).\n *\n * Note: the check-connection frame does not emit this field yet — treat\n * it as absent until frame support ships.\n */\n mismatch?: boolean;\n}\n\nexport interface ActiveConnection {\n status: ConnectionStatus.active;\n /** The authenticated MoonPay customer. */\n customer: {\n /** The MoonPay customer ID. */\n id: string;\n /** ISO 3166-1 alpha-3 country code for the customer's jurisdiction. */\n country?: string;\n /** State or province code within the country (e.g. `'NY'` for New York). Present for US customers only. */\n administrativeArea?: string;\n /** Supra-national regulatory area code (e.g. `'EEA'`, `'EFTA'`). Present when the customer is in a regulated area. */\n area?: string;\n };\n /**\n * Base64-encoded, X25519+AES-GCM encrypted JSON containing:\n * ```json\n * {\n * \"accessToken\": \"<token>\",\n * \"clientToken\": \"<token>\",\n * \"expiresAt\": \"<iso8601>\"\n * }\n * ```\n *\n * - `accessToken`: A token that can be used to make API requests from the client.\n * - `clientToken`: A token that can be used to initialize sensitive frames such as Apple Pay.\n * - `expiresAt`: An ISO 8601 formatted string indicating when the tokens expire.\n */\n credentials: string;\n /**\n * Capabilities and regulatory requirements for the authenticated customer.\n */\n capabilities: CustomerCapabilities;\n}\n\nexport interface UnavailableConnection {\n status: ConnectionStatus.unavailable;\n}\n\nexport interface PendingConnection {\n status: ConnectionStatus.pending;\n}\n\nexport interface FailedConnection {\n status: ConnectionStatus.failed;\n reason: string;\n}\n\nexport interface TermsAcceptanceRequiredConnection {\n status: ConnectionStatus.termsAcceptanceRequired;\n}\n\n/** Discriminated union of all connection result statuses. */\nexport type Connection =\n | ConnectionRequired\n | ActiveConnection\n | UnavailableConnection\n | PendingConnection\n | FailedConnection\n | TermsAcceptanceRequiredConnection;\n\n// ---------------------------------------------------------------------------\n// Decrypted credentials (what the SDK exposes after decryption)\n// ---------------------------------------------------------------------------\n\nexport interface DecryptedCredentials {\n accessToken: string;\n clientToken: string;\n expiresAt: string;\n}\n\n// ---------------------------------------------------------------------------\n// Customer capabilities\n// ---------------------------------------------------------------------------\n\n/**\n * Capabilities and regulatory requirements for the authenticated customer.\n */\nexport interface CustomerCapabilities {\n /** Capabilities for the ramps (buy and sell) product. */\n ramps?: RampsCapability;\n /** Capabilities for the guest checkout flow. Present when guest checkout is enabled for the partner and the session is a guest-checkout session. */\n guestCheckout?: RampsCapability;\n}\n\n/**\n * Capabilities and requirements for the ramps (buy and sell) product.\n */\nexport interface RampsCapability {\n /** Regulatory requirements for ramps operations in the customer's jurisdiction. */\n requirements: RampsRequirements;\n}\n\n/**\n * Regulatory requirements that apply to ramps operations for the customer.\n */\nexport interface RampsRequirements {\n /**\n * Present when the customer's jurisdiction requires payment disclosures\n * before a ramps transaction. Omitted when no disclosures are required.\n *\n * @deprecated Use `customer.country`, `customer.administrativeArea`, and `customer.area`\n * from the active connection instead. This field will be removed in a future release.\n */\n paymentDisclosures?: PaymentDisclosuresRequirement;\n}\n\n/**\n * A jurisdiction that requires payment disclosures before a ramps transaction.\n */\nexport interface PaymentDisclosuresRequirement {\n /** The ISO 3166-1 alpha-3 country code for the jurisdiction. */\n country: string;\n /** The state or province code within the country (e.g. `'NY'` for New York). Present for US customers only. */\n administrativeArea?: string;\n /** Supra-national regulatory area code (e.g. `'EEA'`, `'EFTA'`). */\n area?: string;\n}\n\n// ---------------------------------------------------------------------------\n// Connection errors\n// ---------------------------------------------------------------------------\n\nexport enum ConnectionErrorCode {\n validationError = 'validationError',\n /** Wire value is `'generic'`. */\n connectionFailedGeneric = 'generic',\n}\n\nexport interface ConfigValidationFieldError {\n code: 'invalidSessionToken' | 'invalidClientToken' | 'invalidPublicKey';\n message: string;\n}\n\nexport type ConnectionError =\n | {\n code: ConnectionErrorCode.validationError;\n errors: ConfigValidationFieldError[];\n }\n | {\n code: ConnectionErrorCode.connectionFailedGeneric;\n message?: string;\n };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAIO,IAAK,mBAAL,kBAAKA,sBAAL;AAIL,EAAAA,kBAAA,wBAAqB;AAKrB,EAAAA,kBAAA,YAAS;AAKT,EAAAA,kBAAA,iBAAc;AAKd,EAAAA,kBAAA,aAAU;AAKV,EAAAA,kBAAA,YAAS;AAOT,EAAAA,kBAAA,6BAA0B;AA/BhB,SAAAA;AAAA,GAAA;AAqLL,IAAK,sBAAL,kBAAKC,yBAAL;AACL,EAAAA,qBAAA,qBAAkB;AAElB,EAAAA,qBAAA,6BAA0B;AAHhB,SAAAA;AAAA,GAAA;","names":["ConnectionStatus","ConnectionErrorCode"]}
|
|
@@ -37,9 +37,18 @@ interface ConnectionRequired {
|
|
|
37
37
|
credentials: string;
|
|
38
38
|
/**
|
|
39
39
|
* Capabilities and regulatory requirements available before authentication, if any.
|
|
40
|
-
* Present when
|
|
40
|
+
* Present when guest checkout is enabled for the partner.
|
|
41
41
|
*/
|
|
42
42
|
capabilities?: CustomerCapabilities;
|
|
43
|
+
/**
|
|
44
|
+
* Set when the session's email and phone number resolve to two different
|
|
45
|
+
* MoonPay customers (a conflict). Partners should route the customer
|
|
46
|
+
* through Connect proactively before rendering payment UI (e.g. Apple Pay).
|
|
47
|
+
*
|
|
48
|
+
* Note: the check-connection frame does not emit this field yet — treat
|
|
49
|
+
* it as absent until frame support ships.
|
|
50
|
+
*/
|
|
51
|
+
mismatch?: boolean;
|
|
43
52
|
}
|
|
44
53
|
interface ActiveConnection {
|
|
45
54
|
status: ConnectionStatus.active;
|
|
@@ -100,8 +109,6 @@ interface DecryptedCredentials {
|
|
|
100
109
|
interface CustomerCapabilities {
|
|
101
110
|
/** Capabilities for the ramps (buy and sell) product. */
|
|
102
111
|
ramps?: RampsCapability;
|
|
103
|
-
/** Capabilities for the Apple Pay 1TAP flow. Present when 1TAP is enabled for the partner and the customer matches. */
|
|
104
|
-
oneTapApplePay?: RampsCapability;
|
|
105
112
|
/** Capabilities for the guest checkout flow. Present when guest checkout is enabled for the partner and the session is a guest-checkout session. */
|
|
106
113
|
guestCheckout?: RampsCapability;
|
|
107
114
|
}
|
|
@@ -37,9 +37,18 @@ interface ConnectionRequired {
|
|
|
37
37
|
credentials: string;
|
|
38
38
|
/**
|
|
39
39
|
* Capabilities and regulatory requirements available before authentication, if any.
|
|
40
|
-
* Present when
|
|
40
|
+
* Present when guest checkout is enabled for the partner.
|
|
41
41
|
*/
|
|
42
42
|
capabilities?: CustomerCapabilities;
|
|
43
|
+
/**
|
|
44
|
+
* Set when the session's email and phone number resolve to two different
|
|
45
|
+
* MoonPay customers (a conflict). Partners should route the customer
|
|
46
|
+
* through Connect proactively before rendering payment UI (e.g. Apple Pay).
|
|
47
|
+
*
|
|
48
|
+
* Note: the check-connection frame does not emit this field yet — treat
|
|
49
|
+
* it as absent until frame support ships.
|
|
50
|
+
*/
|
|
51
|
+
mismatch?: boolean;
|
|
43
52
|
}
|
|
44
53
|
interface ActiveConnection {
|
|
45
54
|
status: ConnectionStatus.active;
|
|
@@ -100,8 +109,6 @@ interface DecryptedCredentials {
|
|
|
100
109
|
interface CustomerCapabilities {
|
|
101
110
|
/** Capabilities for the ramps (buy and sell) product. */
|
|
102
111
|
ramps?: RampsCapability;
|
|
103
|
-
/** Capabilities for the Apple Pay 1TAP flow. Present when 1TAP is enabled for the partner and the customer matches. */
|
|
104
|
-
oneTapApplePay?: RampsCapability;
|
|
105
112
|
/** Capabilities for the guest checkout flow. Present when guest checkout is enabled for the partner and the session is a guest-checkout session. */
|
|
106
113
|
guestCheckout?: RampsCapability;
|
|
107
114
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/models/connection.ts"],"sourcesContent":["// ---------------------------------------------------------------------------\n// Connection statuses\n// ---------------------------------------------------------------------------\n\nexport enum ConnectionStatus {\n /**\n * New or expired user — needs the full connect flow.\n */\n connectionRequired = 'connectionRequired',\n\n /**\n * Valid connection — encrypted credentials are included.\n */\n active = 'active',\n\n /**\n * Restricted location — connection cannot be used.\n */\n unavailable = 'unavailable',\n\n /**\n * KYC decision delayed — may resolve on a subsequent visit.\n */\n pending = 'pending',\n\n /**\n * Terminal failure — KYC fail, rejection, etc.\n */\n failed = 'failed',\n\n /**\n * Customer has no valid Terms of Use attestation on file (headless/Identity API partners).\n * Display Terms of Use in your own UI, capture acceptance, call\n * `POST /platform/v1/terms/attestations`, then retry the connection.\n */\n termsAcceptanceRequired = 'termsAcceptanceRequired',\n}\n\nexport interface ConnectionRequired {\n status: ConnectionStatus.connectionRequired;\n /**\n * Base64-encoded, X25519+AES-GCM encrypted anonymous token payload.\n * These are frame-internal tokens used by the connect frame — they cannot be\n * used to call MoonPay APIs directly. Decrypt via `decryptCredentials()` only\n * if you need the `clientToken` to bootstrap the connect frame manually.\n */\n credentials: string;\n /**\n * Capabilities and regulatory requirements available before authentication, if any.\n * Present when
|
|
1
|
+
{"version":3,"sources":["../../src/models/connection.ts"],"sourcesContent":["// ---------------------------------------------------------------------------\n// Connection statuses\n// ---------------------------------------------------------------------------\n\nexport enum ConnectionStatus {\n /**\n * New or expired user — needs the full connect flow.\n */\n connectionRequired = 'connectionRequired',\n\n /**\n * Valid connection — encrypted credentials are included.\n */\n active = 'active',\n\n /**\n * Restricted location — connection cannot be used.\n */\n unavailable = 'unavailable',\n\n /**\n * KYC decision delayed — may resolve on a subsequent visit.\n */\n pending = 'pending',\n\n /**\n * Terminal failure — KYC fail, rejection, etc.\n */\n failed = 'failed',\n\n /**\n * Customer has no valid Terms of Use attestation on file (headless/Identity API partners).\n * Display Terms of Use in your own UI, capture acceptance, call\n * `POST /platform/v1/terms/attestations`, then retry the connection.\n */\n termsAcceptanceRequired = 'termsAcceptanceRequired',\n}\n\nexport interface ConnectionRequired {\n status: ConnectionStatus.connectionRequired;\n /**\n * Base64-encoded, X25519+AES-GCM encrypted anonymous token payload.\n * These are frame-internal tokens used by the connect frame — they cannot be\n * used to call MoonPay APIs directly. Decrypt via `decryptCredentials()` only\n * if you need the `clientToken` to bootstrap the connect frame manually.\n */\n credentials: string;\n /**\n * Capabilities and regulatory requirements available before authentication, if any.\n * Present when guest checkout is enabled for the partner.\n */\n capabilities?: CustomerCapabilities;\n /**\n * Set when the session's email and phone number resolve to two different\n * MoonPay customers (a conflict). Partners should route the customer\n * through Connect proactively before rendering payment UI (e.g. Apple Pay).\n *\n * Note: the check-connection frame does not emit this field yet — treat\n * it as absent until frame support ships.\n */\n mismatch?: boolean;\n}\n\nexport interface ActiveConnection {\n status: ConnectionStatus.active;\n /** The authenticated MoonPay customer. */\n customer: {\n /** The MoonPay customer ID. */\n id: string;\n /** ISO 3166-1 alpha-3 country code for the customer's jurisdiction. */\n country?: string;\n /** State or province code within the country (e.g. `'NY'` for New York). Present for US customers only. */\n administrativeArea?: string;\n /** Supra-national regulatory area code (e.g. `'EEA'`, `'EFTA'`). Present when the customer is in a regulated area. */\n area?: string;\n };\n /**\n * Base64-encoded, X25519+AES-GCM encrypted JSON containing:\n * ```json\n * {\n * \"accessToken\": \"<token>\",\n * \"clientToken\": \"<token>\",\n * \"expiresAt\": \"<iso8601>\"\n * }\n * ```\n *\n * - `accessToken`: A token that can be used to make API requests from the client.\n * - `clientToken`: A token that can be used to initialize sensitive frames such as Apple Pay.\n * - `expiresAt`: An ISO 8601 formatted string indicating when the tokens expire.\n */\n credentials: string;\n /**\n * Capabilities and regulatory requirements for the authenticated customer.\n */\n capabilities: CustomerCapabilities;\n}\n\nexport interface UnavailableConnection {\n status: ConnectionStatus.unavailable;\n}\n\nexport interface PendingConnection {\n status: ConnectionStatus.pending;\n}\n\nexport interface FailedConnection {\n status: ConnectionStatus.failed;\n reason: string;\n}\n\nexport interface TermsAcceptanceRequiredConnection {\n status: ConnectionStatus.termsAcceptanceRequired;\n}\n\n/** Discriminated union of all connection result statuses. */\nexport type Connection =\n | ConnectionRequired\n | ActiveConnection\n | UnavailableConnection\n | PendingConnection\n | FailedConnection\n | TermsAcceptanceRequiredConnection;\n\n// ---------------------------------------------------------------------------\n// Decrypted credentials (what the SDK exposes after decryption)\n// ---------------------------------------------------------------------------\n\nexport interface DecryptedCredentials {\n accessToken: string;\n clientToken: string;\n expiresAt: string;\n}\n\n// ---------------------------------------------------------------------------\n// Customer capabilities\n// ---------------------------------------------------------------------------\n\n/**\n * Capabilities and regulatory requirements for the authenticated customer.\n */\nexport interface CustomerCapabilities {\n /** Capabilities for the ramps (buy and sell) product. */\n ramps?: RampsCapability;\n /** Capabilities for the guest checkout flow. Present when guest checkout is enabled for the partner and the session is a guest-checkout session. */\n guestCheckout?: RampsCapability;\n}\n\n/**\n * Capabilities and requirements for the ramps (buy and sell) product.\n */\nexport interface RampsCapability {\n /** Regulatory requirements for ramps operations in the customer's jurisdiction. */\n requirements: RampsRequirements;\n}\n\n/**\n * Regulatory requirements that apply to ramps operations for the customer.\n */\nexport interface RampsRequirements {\n /**\n * Present when the customer's jurisdiction requires payment disclosures\n * before a ramps transaction. Omitted when no disclosures are required.\n *\n * @deprecated Use `customer.country`, `customer.administrativeArea`, and `customer.area`\n * from the active connection instead. This field will be removed in a future release.\n */\n paymentDisclosures?: PaymentDisclosuresRequirement;\n}\n\n/**\n * A jurisdiction that requires payment disclosures before a ramps transaction.\n */\nexport interface PaymentDisclosuresRequirement {\n /** The ISO 3166-1 alpha-3 country code for the jurisdiction. */\n country: string;\n /** The state or province code within the country (e.g. `'NY'` for New York). Present for US customers only. */\n administrativeArea?: string;\n /** Supra-national regulatory area code (e.g. `'EEA'`, `'EFTA'`). */\n area?: string;\n}\n\n// ---------------------------------------------------------------------------\n// Connection errors\n// ---------------------------------------------------------------------------\n\nexport enum ConnectionErrorCode {\n validationError = 'validationError',\n /** Wire value is `'generic'`. */\n connectionFailedGeneric = 'generic',\n}\n\nexport interface ConfigValidationFieldError {\n code: 'invalidSessionToken' | 'invalidClientToken' | 'invalidPublicKey';\n message: string;\n}\n\nexport type ConnectionError =\n | {\n code: ConnectionErrorCode.validationError;\n errors: ConfigValidationFieldError[];\n }\n | {\n code: ConnectionErrorCode.connectionFailedGeneric;\n message?: string;\n };\n"],"mappings":";AAIO,IAAK,mBAAL,kBAAKA,sBAAL;AAIL,EAAAA,kBAAA,wBAAqB;AAKrB,EAAAA,kBAAA,YAAS;AAKT,EAAAA,kBAAA,iBAAc;AAKd,EAAAA,kBAAA,aAAU;AAKV,EAAAA,kBAAA,YAAS;AAOT,EAAAA,kBAAA,6BAA0B;AA/BhB,SAAAA;AAAA,GAAA;AAqLL,IAAK,sBAAL,kBAAKC,yBAAL;AACL,EAAAA,qBAAA,qBAAkB;AAElB,EAAAA,qBAAA,6BAA0B;AAHhB,SAAAA;AAAA,GAAA;","names":["ConnectionStatus","ConnectionErrorCode"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/sdks/apple-pay.ts"],"sourcesContent":["import type * as ApplePayFrame from '../frames/apple-pay.js';\nimport type { FrameTransaction } from '../models/transaction.js';\n\nexport type EventError = {\n kind
|
|
1
|
+
{"version":3,"sources":["../../src/sdks/apple-pay.ts"],"sourcesContent":["import type * as ApplePayFrame from '../frames/apple-pay.js';\nimport type { FrameTransaction } from '../models/transaction.js';\n\nexport type EventError = {\n kind: 'configurationError' | 'invalidQuote' | 'quoteExpired' | 'genericError';\n message: string;\n};\n\nexport type Event =\n | { kind: 'ready' }\n | { kind: 'complete'; payload: { transaction: FrameTransaction } }\n | { kind: 'challenge'; payload: ApplePayFrame.InboundMessageMap['challenge'] }\n | { kind: 'quoteExpired'; payload: { setQuote: (signature: string) => void } }\n | { kind: 'error'; payload: EventError }\n | { kind: 'unsupported' };\n\nexport interface SetupError {\n kind: 'configurationError' | 'genericError';\n message: string;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -4,7 +4,7 @@ import '../models/challenge.cjs';
|
|
|
4
4
|
import '../protocol.cjs';
|
|
5
5
|
|
|
6
6
|
type EventError = {
|
|
7
|
-
kind: 'configurationError' | 'invalidQuote' | 'quoteExpired' | '
|
|
7
|
+
kind: 'configurationError' | 'invalidQuote' | 'quoteExpired' | 'genericError';
|
|
8
8
|
message: string;
|
|
9
9
|
};
|
|
10
10
|
type Event = {
|
package/dist/sdks/apple-pay.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import '../models/challenge.js';
|
|
|
4
4
|
import '../protocol.js';
|
|
5
5
|
|
|
6
6
|
type EventError = {
|
|
7
|
-
kind: 'configurationError' | 'invalidQuote' | 'quoteExpired' | '
|
|
7
|
+
kind: 'configurationError' | 'invalidQuote' | 'quoteExpired' | 'genericError';
|
|
8
8
|
message: string;
|
|
9
9
|
};
|
|
10
10
|
type Event = {
|