@moonpay/platform-protocol 1.25.0 → 1.26.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.
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
|
|
16
|
+
// src/api/enterprise.ts
|
|
17
|
+
var enterprise_exports = {};
|
|
18
|
+
module.exports = __toCommonJS(enterprise_exports);
|
|
19
|
+
//# sourceMappingURL=enterprise.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/api/enterprise.ts"],"sourcesContent":["/**\n * Enterprise quote type, aliased from the generated Enterprise OpenAPI types.\n * The rest of the Enterprise API is server-to-server and intentionally not\n * part of the SDK.\n *\n * Quotes are created from your server (`POST /enterprise/v1/quotes`); pass the\n * resulting `signature` to the enterprise frames as `quote`.\n */\nexport type { CreateTransferQuoteResponse as EnterpriseQuote } from './gen/enterprise/index.js';\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
type CreateTransferQuoteResponse = {
|
|
2
|
+
kind: MoonPayDevPlatformTransferKind;
|
|
3
|
+
source: QuoteFiatLeg | QuoteCryptoLeg;
|
|
4
|
+
destination: QuoteFiatLeg | QuoteWalletLeg;
|
|
5
|
+
mode: ExchangeRateMode;
|
|
6
|
+
feeBehavior: FeeBehavior;
|
|
7
|
+
expiresAt?: string;
|
|
8
|
+
exchangeRate: string;
|
|
9
|
+
signature: string;
|
|
10
|
+
};
|
|
11
|
+
type CryptoAsset = {
|
|
12
|
+
code: string;
|
|
13
|
+
caip19?: string;
|
|
14
|
+
};
|
|
15
|
+
type ExchangeRateMode = 'fixed' | 'floating';
|
|
16
|
+
type FeeBehavior = 'inclusive' | 'exclusive';
|
|
17
|
+
type FiatAsset = {
|
|
18
|
+
code: string;
|
|
19
|
+
};
|
|
20
|
+
type MoonPayDevPlatformTransferKind = 'buy' | 'sell';
|
|
21
|
+
type QuoteCryptoLeg = {
|
|
22
|
+
amount?: string;
|
|
23
|
+
asset: CryptoAsset;
|
|
24
|
+
};
|
|
25
|
+
type QuoteFiatLeg = {
|
|
26
|
+
amount?: string;
|
|
27
|
+
asset: FiatAsset;
|
|
28
|
+
};
|
|
29
|
+
type QuoteWalletLeg = {
|
|
30
|
+
amount?: string;
|
|
31
|
+
asset: CryptoAsset;
|
|
32
|
+
/**
|
|
33
|
+
* Wallet address that receives the crypto. When set, it is signed into the quote and the transfer must use the same address.
|
|
34
|
+
*/
|
|
35
|
+
address?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Destination tag or memo, for networks that need one.
|
|
38
|
+
*/
|
|
39
|
+
tag?: string;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export type { CreateTransferQuoteResponse as EnterpriseQuote };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
type CreateTransferQuoteResponse = {
|
|
2
|
+
kind: MoonPayDevPlatformTransferKind;
|
|
3
|
+
source: QuoteFiatLeg | QuoteCryptoLeg;
|
|
4
|
+
destination: QuoteFiatLeg | QuoteWalletLeg;
|
|
5
|
+
mode: ExchangeRateMode;
|
|
6
|
+
feeBehavior: FeeBehavior;
|
|
7
|
+
expiresAt?: string;
|
|
8
|
+
exchangeRate: string;
|
|
9
|
+
signature: string;
|
|
10
|
+
};
|
|
11
|
+
type CryptoAsset = {
|
|
12
|
+
code: string;
|
|
13
|
+
caip19?: string;
|
|
14
|
+
};
|
|
15
|
+
type ExchangeRateMode = 'fixed' | 'floating';
|
|
16
|
+
type FeeBehavior = 'inclusive' | 'exclusive';
|
|
17
|
+
type FiatAsset = {
|
|
18
|
+
code: string;
|
|
19
|
+
};
|
|
20
|
+
type MoonPayDevPlatformTransferKind = 'buy' | 'sell';
|
|
21
|
+
type QuoteCryptoLeg = {
|
|
22
|
+
amount?: string;
|
|
23
|
+
asset: CryptoAsset;
|
|
24
|
+
};
|
|
25
|
+
type QuoteFiatLeg = {
|
|
26
|
+
amount?: string;
|
|
27
|
+
asset: FiatAsset;
|
|
28
|
+
};
|
|
29
|
+
type QuoteWalletLeg = {
|
|
30
|
+
amount?: string;
|
|
31
|
+
asset: CryptoAsset;
|
|
32
|
+
/**
|
|
33
|
+
* Wallet address that receives the crypto. When set, it is signed into the quote and the transfer must use the same address.
|
|
34
|
+
*/
|
|
35
|
+
address?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Destination tag or memo, for networks that need one.
|
|
38
|
+
*/
|
|
39
|
+
tag?: string;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export type { CreateTransferQuoteResponse as EnterpriseQuote };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=enterprise.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moonpay/platform-protocol",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.26.0",
|
|
4
4
|
"description": "Shared protocol types for the MoonPay Developer Platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -194,6 +194,16 @@
|
|
|
194
194
|
"default": "./dist/api/customer.cjs"
|
|
195
195
|
}
|
|
196
196
|
},
|
|
197
|
+
"./api/enterprise": {
|
|
198
|
+
"import": {
|
|
199
|
+
"types": "./dist/api/enterprise.d.ts",
|
|
200
|
+
"default": "./dist/api/enterprise.js"
|
|
201
|
+
},
|
|
202
|
+
"require": {
|
|
203
|
+
"types": "./dist/api/enterprise.d.cts",
|
|
204
|
+
"default": "./dist/api/enterprise.cjs"
|
|
205
|
+
}
|
|
206
|
+
},
|
|
197
207
|
"./api/errors": {
|
|
198
208
|
"import": {
|
|
199
209
|
"types": "./dist/api/errors.d.ts",
|
|
@@ -323,7 +333,7 @@
|
|
|
323
333
|
"dev": "tsup --watch --config tsup.config.dev.ts",
|
|
324
334
|
"typecheck": "tsc --noEmit",
|
|
325
335
|
"clean": "rm -rf dist",
|
|
326
|
-
"openapi": "openapi-ts -i https://api.moonpay.com/platform/openapi.json -o src/api/gen -p @hey-api/typescript"
|
|
336
|
+
"openapi": "openapi-ts -i https://api.moonpay.com/platform/openapi.json -o src/api/gen -p @hey-api/typescript && openapi-ts -i https://api.moonpay.com/enterprise/openapi.json -o src/api/gen/enterprise -p @hey-api/typescript"
|
|
327
337
|
},
|
|
328
338
|
"devDependencies": {
|
|
329
339
|
"@hey-api/openapi-ts": "0.97.3",
|