@rozoai/intent-common 0.1.31 → 0.1.32-beta.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/base.js +16 -22
- package/dist/api/base.js.map +1 -1
- package/dist/api/fee.js +9 -13
- package/dist/api/fee.js.map +1 -1
- package/dist/api/payment.d.ts +14 -5
- package/dist/api/payment.js +44 -47
- package/dist/api/payment.js.map +1 -1
- package/dist/api/types.js +6 -9
- package/dist/api/types.js.map +1 -1
- package/dist/assert.js +6 -12
- package/dist/assert.js.map +1 -1
- package/dist/bridge-utils.js +29 -33
- package/dist/bridge-utils.js.map +1 -1
- package/dist/chain.js +67 -78
- package/dist/chain.js.map +1 -1
- package/dist/debug.js +1 -4
- package/dist/debug.js.map +1 -1
- package/dist/format.js +12 -20
- package/dist/format.js.map +1 -1
- package/dist/index.js +15 -33
- package/dist/index.js.map +1 -1
- package/dist/primitiveTypes.js +6 -9
- package/dist/primitiveTypes.js.map +1 -1
- package/dist/retryBackoff.js +1 -4
- package/dist/retryBackoff.js.map +1 -1
- package/dist/rozoPay.js +73 -89
- package/dist/rozoPay.js.map +1 -1
- package/dist/token.js +383 -398
- package/dist/token.js.map +1 -1
- package/dist/try.js +5 -10
- package/dist/try.js.map +1 -1
- package/dist/validation.js +18 -26
- package/dist/validation.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,34 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.setApiConfig = void 0;
|
|
18
|
-
var base_1 = require("./api/base");
|
|
19
|
-
Object.defineProperty(exports, "setApiConfig", { enumerable: true, get: function () { return base_1.setApiConfig; } });
|
|
20
|
-
__exportStar(require("./api/fee"), exports);
|
|
21
|
-
__exportStar(require("./api/payment"), exports);
|
|
22
|
-
__exportStar(require("./api/types"), exports);
|
|
23
|
-
__exportStar(require("./assert"), exports);
|
|
24
|
-
__exportStar(require("./bridge-utils"), exports);
|
|
25
|
-
__exportStar(require("./chain"), exports);
|
|
26
|
-
__exportStar(require("./debug"), exports);
|
|
27
|
-
__exportStar(require("./format"), exports);
|
|
28
|
-
__exportStar(require("./primitiveTypes"), exports);
|
|
29
|
-
__exportStar(require("./retryBackoff"), exports);
|
|
30
|
-
__exportStar(require("./rozoPay"), exports);
|
|
31
|
-
__exportStar(require("./token"), exports);
|
|
32
|
-
__exportStar(require("./try"), exports);
|
|
33
|
-
__exportStar(require("./validation"), exports);
|
|
1
|
+
export { setApiConfig } from "./api/base";
|
|
2
|
+
export * from "./api/fee";
|
|
3
|
+
export * from "./api/payment";
|
|
4
|
+
export * from "./api/types";
|
|
5
|
+
export * from "./assert";
|
|
6
|
+
export * from "./bridge-utils";
|
|
7
|
+
export * from "./chain";
|
|
8
|
+
export * from "./debug";
|
|
9
|
+
export * from "./format";
|
|
10
|
+
export * from "./primitiveTypes";
|
|
11
|
+
export * from "./retryBackoff";
|
|
12
|
+
export * from "./rozoPay";
|
|
13
|
+
export * from "./token";
|
|
14
|
+
export * from "./try";
|
|
15
|
+
export * from "./validation";
|
|
34
16
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAmB,MAAM,YAAY,CAAC;AAC3D,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,cAAc,CAAC"}
|
package/dist/primitiveTypes.js
CHANGED
|
@@ -1,19 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.zStellarPublicKey = exports.zSolanaPublicKey = exports.zHex = exports.zAddress = exports.zBigIntStr = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
exports.zBigIntStr = zod_1.z
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const zBigIntStr = z
|
|
6
3
|
.string()
|
|
7
4
|
.regex(/^[0-9]+$/i)
|
|
8
5
|
.refine((s) => true);
|
|
9
|
-
|
|
6
|
+
export const zAddress = z
|
|
10
7
|
.string()
|
|
11
8
|
.regex(/^0x[0-9a-f]{40}$/i)
|
|
12
9
|
.refine((s) => true);
|
|
13
|
-
|
|
10
|
+
export const zHex = z
|
|
14
11
|
.string()
|
|
15
12
|
.regex(/^0x[0-9a-f]*$/i)
|
|
16
13
|
.refine((s) => true);
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
export const zSolanaPublicKey = z.string().regex(/^[1-9A-HJ-NP-Za-km-z]+$/);
|
|
15
|
+
export const zStellarPublicKey = z.string();
|
|
19
16
|
//# sourceMappingURL=primitiveTypes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"primitiveTypes.js","sourceRoot":"","sources":["../src/primitiveTypes.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"primitiveTypes.js","sourceRoot":"","sources":["../src/primitiveTypes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC;KACxB,MAAM,EAAE;KACR,KAAK,CAAC,WAAW,CAAC;KAClB,MAAM,CAAC,CAAC,CAAC,EAAkB,EAAE,CAAC,IAAI,CAAC,CAAC;AAIvC,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC;KACtB,MAAM,EAAE;KACR,KAAK,CAAC,mBAAmB,CAAC;KAC1B,MAAM,CAAC,CAAC,CAAC,EAAgB,EAAE,CAAC,IAAI,CAAC,CAAC;AAErC,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC;KAClB,MAAM,EAAE;KACR,KAAK,CAAC,gBAAgB,CAAC;KACvB,MAAM,CAAC,CAAC,CAAC,EAAY,EAAE,CAAC,IAAI,CAAC,CAAC;AAEjC,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAAC;AAI5E,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC"}
|
package/dist/retryBackoff.js
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.retryBackoff = retryBackoff;
|
|
4
1
|
/**
|
|
5
2
|
* Retries a function up to a maximum number of times, with exponential backoff.
|
|
6
3
|
* Current settings, max total wait time is ~10 seconds.
|
|
7
4
|
*/
|
|
8
|
-
async function retryBackoff(name, fn, maxRetries = 5, backoffFn = (i) => Math.min(2000, 250 * 2 ** i)) {
|
|
5
|
+
export async function retryBackoff(name, fn, maxRetries = 5, backoffFn = (i) => Math.min(2000, 250 * 2 ** i)) {
|
|
9
6
|
for (let i = 1;; i++) {
|
|
10
7
|
try {
|
|
11
8
|
return await fn();
|
package/dist/retryBackoff.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retryBackoff.js","sourceRoot":"","sources":["../src/retryBackoff.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"retryBackoff.js","sourceRoot":"","sources":["../src/retryBackoff.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,IAAY,EACZ,EAAoB,EACpB,UAAU,GAAG,CAAC,EACd,YAAmC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC;IAEtE,KAAK,IAAI,CAAC,GAAG,CAAC,GAAI,CAAC,EAAE,EAAE,CAAC;QACtB,IAAI,CAAC;YACH,OAAO,MAAM,EAAE,EAAE,CAAC;QACpB,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,IAAI,CAAC,IAAI,UAAU,EAAE,CAAC;gBACpB,MAAM,OAAO,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;gBAC7B,OAAO,CAAC,KAAK,CACX,WAAW,IAAI,aAAa,OAAO,gBAAgB,CAAC,UAAU,EAC9D,CAAC,CACF,CAAC;gBACF,MAAM,IAAI,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC;YACnD,CAAC;iBAAM,CAAC;gBACN,OAAO,CAAC,IAAI,CAAC,WAAW,IAAI,uBAAuB,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;gBACrE,MAAM;YACR,CAAC;QACH,CAAC;IACH,CAAC;IACD,gCAAgC;IAChC,MAAM,IAAI,KAAK,CAAC,qBAAqB,IAAI,EAAE,CAAC,CAAC;AAC/C,CAAC"}
|
package/dist/rozoPay.js
CHANGED
|
@@ -1,50 +1,34 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// TODO: this file defines types that shouldn't be exposed to the client.
|
|
3
2
|
// Clean this up to only expose the types that are needed by the client.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
exports.isHydrated = isHydrated;
|
|
10
|
-
exports.getCanonicalDestination = getCanonicalDestination;
|
|
11
|
-
exports.getOrderSourceChainId = getOrderSourceChainId;
|
|
12
|
-
exports.getOrderDestChainId = getOrderDestChainId;
|
|
13
|
-
exports.mergedMetadata = mergedMetadata;
|
|
14
|
-
exports.getRozoPayOrderView = getRozoPayOrderView;
|
|
15
|
-
exports.readRozoPayOrderID = readRozoPayOrderID;
|
|
16
|
-
exports.writeRozoPayOrderID = writeRozoPayOrderID;
|
|
17
|
-
exports.isUUID = isUUID;
|
|
18
|
-
exports.resolveOrderId = resolveOrderId;
|
|
19
|
-
const base_1 = require("@scure/base");
|
|
20
|
-
const viem_1 = require("viem");
|
|
21
|
-
const zod_1 = __importDefault(require("zod"));
|
|
22
|
-
const assert_1 = require("./assert");
|
|
23
|
-
const primitiveTypes_1 = require("./primitiveTypes");
|
|
3
|
+
import { base58 } from "@scure/base";
|
|
4
|
+
import { bytesToBigInt, formatUnits, getAddress, numberToBytes, zeroAddress, } from "viem";
|
|
5
|
+
import z from "zod";
|
|
6
|
+
import { assertNotNull } from "./assert";
|
|
7
|
+
import { zAddress, zBigIntStr, } from "./primitiveTypes";
|
|
24
8
|
// lifecycle: waiting payment -> pending processing -> start submitted -> processed (onchain tx was successful)
|
|
25
|
-
var RozoPayOrderStatusSource;
|
|
9
|
+
export var RozoPayOrderStatusSource;
|
|
26
10
|
(function (RozoPayOrderStatusSource) {
|
|
27
11
|
RozoPayOrderStatusSource["WAITING_PAYMENT"] = "waiting_payment";
|
|
28
12
|
RozoPayOrderStatusSource["PENDING_PROCESSING"] = "pending_processing";
|
|
29
13
|
RozoPayOrderStatusSource["START_SUBMITTED"] = "start_submitted";
|
|
30
14
|
/* Start transaction receipt confirmed. */
|
|
31
15
|
RozoPayOrderStatusSource["PROCESSED"] = "processed";
|
|
32
|
-
})(RozoPayOrderStatusSource || (
|
|
16
|
+
})(RozoPayOrderStatusSource || (RozoPayOrderStatusSource = {}));
|
|
33
17
|
// lifecycle: pending -> fast-finish-submitted (onchain tx submitted) -> fast-finished (onchain tx was successful) -> claimed (onchain tx was successful)
|
|
34
|
-
var RozoPayOrderStatusDest;
|
|
18
|
+
export var RozoPayOrderStatusDest;
|
|
35
19
|
(function (RozoPayOrderStatusDest) {
|
|
36
20
|
RozoPayOrderStatusDest["PENDING"] = "pending";
|
|
37
21
|
RozoPayOrderStatusDest["FAST_FINISH_SUBMITTED"] = "fast_finish_submitted";
|
|
38
22
|
/* Fast finish transaction receipt confirmed. */
|
|
39
23
|
RozoPayOrderStatusDest["FAST_FINISHED"] = "fast_finished";
|
|
40
24
|
RozoPayOrderStatusDest["CLAIM_SUCCESSFUL"] = "claimed";
|
|
41
|
-
})(RozoPayOrderStatusDest || (
|
|
42
|
-
var RozoPayOrderMode;
|
|
25
|
+
})(RozoPayOrderStatusDest || (RozoPayOrderStatusDest = {}));
|
|
26
|
+
export var RozoPayOrderMode;
|
|
43
27
|
(function (RozoPayOrderMode) {
|
|
44
28
|
RozoPayOrderMode["SALE"] = "sale";
|
|
45
29
|
RozoPayOrderMode["CHOOSE_AMOUNT"] = "choose_amount";
|
|
46
30
|
RozoPayOrderMode["HYDRATED"] = "hydrated";
|
|
47
|
-
})(RozoPayOrderMode || (
|
|
31
|
+
})(RozoPayOrderMode || (RozoPayOrderMode = {}));
|
|
48
32
|
/**
|
|
49
33
|
* Status values:
|
|
50
34
|
* - `payment_unpaid` - the user has not paid yet
|
|
@@ -54,75 +38,75 @@ var RozoPayOrderMode;
|
|
|
54
38
|
* - `payment_bounced` - the final call or transfer reverted. Funds were sent
|
|
55
39
|
* to the payment's configured refund address on the destination chain.
|
|
56
40
|
*/
|
|
57
|
-
var RozoPayIntentStatus;
|
|
41
|
+
export var RozoPayIntentStatus;
|
|
58
42
|
(function (RozoPayIntentStatus) {
|
|
59
43
|
RozoPayIntentStatus["UNPAID"] = "payment_unpaid";
|
|
60
44
|
RozoPayIntentStatus["STARTED"] = "payment_started";
|
|
61
45
|
RozoPayIntentStatus["COMPLETED"] = "payment_completed";
|
|
62
46
|
RozoPayIntentStatus["BOUNCED"] = "payment_bounced";
|
|
63
47
|
RozoPayIntentStatus["PAYOUT_COMPLETED"] = "payout_completed";
|
|
64
|
-
})(RozoPayIntentStatus || (
|
|
65
|
-
|
|
66
|
-
token:
|
|
67
|
-
amount:
|
|
48
|
+
})(RozoPayIntentStatus || (RozoPayIntentStatus = {}));
|
|
49
|
+
export const zBridgeTokenOutOptions = z.array(z.object({
|
|
50
|
+
token: zAddress,
|
|
51
|
+
amount: zBigIntStr.transform((a) => BigInt(a)),
|
|
68
52
|
}));
|
|
69
53
|
// NOTE: be careful to modify this type only in backward-compatible ways.
|
|
70
54
|
// Add OPTIONAL fields, etc. Anything else requires a migration.
|
|
71
|
-
|
|
72
|
-
style:
|
|
55
|
+
export const zRozoPayOrderMetadata = z.object({
|
|
56
|
+
style: z
|
|
73
57
|
.object({
|
|
74
|
-
background:
|
|
58
|
+
background: z.string().optional().describe("Background color."),
|
|
75
59
|
})
|
|
76
60
|
.optional()
|
|
77
61
|
.describe("Style of the checkout page."),
|
|
78
|
-
orgLogo:
|
|
79
|
-
intent:
|
|
62
|
+
orgLogo: z.string().optional().describe("Logo of the organization."),
|
|
63
|
+
intent: z
|
|
80
64
|
.string()
|
|
81
65
|
.describe("Title verb, eg 'Preorder', 'Check out', 'Deposit'."),
|
|
82
|
-
items:
|
|
83
|
-
.array(
|
|
84
|
-
name:
|
|
85
|
-
description:
|
|
86
|
-
image:
|
|
87
|
-
price:
|
|
88
|
-
priceDetails:
|
|
66
|
+
items: z
|
|
67
|
+
.array(z.object({
|
|
68
|
+
name: z.string(),
|
|
69
|
+
description: z.string(),
|
|
70
|
+
image: z.string().optional(),
|
|
71
|
+
price: z.string().optional(),
|
|
72
|
+
priceDetails: z.string().optional(),
|
|
89
73
|
}))
|
|
90
74
|
.describe("Details about what's being ordered, donated, deposited, etc."),
|
|
91
|
-
payer:
|
|
75
|
+
payer: z
|
|
92
76
|
.object({
|
|
93
|
-
preferredChains:
|
|
94
|
-
.array(
|
|
77
|
+
preferredChains: z
|
|
78
|
+
.array(z.number())
|
|
95
79
|
.optional()
|
|
96
80
|
.describe("Preferred chain IDs, in descending order. Any assets the user owns on preferred chains will appear first. Defaults to destination chain."),
|
|
97
|
-
preferredTokens:
|
|
98
|
-
.array(
|
|
99
|
-
chain:
|
|
100
|
-
address:
|
|
81
|
+
preferredTokens: z
|
|
82
|
+
.array(z.object({
|
|
83
|
+
chain: z.number(),
|
|
84
|
+
address: zAddress.transform((a) => getAddress(a)),
|
|
101
85
|
}))
|
|
102
86
|
.optional()
|
|
103
87
|
.describe("Preferred tokens, in descending order. Any preferred assets the user owns will appear first. Defaults to destination token."),
|
|
104
88
|
// Filter to only allow payments on these chains. Keep this
|
|
105
89
|
// parameter undocumented. Only for specific customers.
|
|
106
|
-
evmChains:
|
|
107
|
-
.array(
|
|
90
|
+
evmChains: z
|
|
91
|
+
.array(z.number())
|
|
108
92
|
.optional()
|
|
109
93
|
.describe("Filter to only allow payments on these EVM chains. Defaults to all chains."),
|
|
110
|
-
paymentOptions:
|
|
111
|
-
.array(
|
|
94
|
+
paymentOptions: z
|
|
95
|
+
.array(z.string())
|
|
112
96
|
.optional()
|
|
113
97
|
.describe("Payment options like Coinbase, Binance, etc. Defaults to all available options."),
|
|
114
98
|
})
|
|
115
99
|
.optional()
|
|
116
100
|
.describe(""),
|
|
117
|
-
memo:
|
|
118
|
-
customDeeplinkUrl:
|
|
101
|
+
memo: z.string().optional().describe("Memo for the payment."),
|
|
102
|
+
customDeeplinkUrl: z
|
|
119
103
|
.string()
|
|
120
104
|
.optional()
|
|
121
105
|
.describe("Custom deeplink URL for the payment."),
|
|
122
106
|
// Base builder code attribution suffix. Stored so invoice checkout can
|
|
123
107
|
// forward it to getDefaultConfig even when the consumer's wagmi config
|
|
124
108
|
// is not present (ROZO_INVOICE_URL redirect path).
|
|
125
|
-
dataSuffix:
|
|
109
|
+
dataSuffix: z
|
|
126
110
|
.string()
|
|
127
111
|
.optional()
|
|
128
112
|
.describe("Base builder code attribution suffix (0x-prefixed hex)."),
|
|
@@ -131,10 +115,10 @@ exports.zRozoPayOrderMetadata = zod_1.default.object({
|
|
|
131
115
|
// where the source token can be native and its amount differs from the USD /
|
|
132
116
|
// destination payout. Consumers must NOT fall back to `usdValue` when this is
|
|
133
117
|
// missing for a native source — the value would be semantically wrong.
|
|
134
|
-
sourceAmountUnits:
|
|
118
|
+
sourceAmountUnits: z.string().nullish(),
|
|
135
119
|
// Source-side token symbol (e.g. "SOL", "ETH", "USDC"). Paired with
|
|
136
120
|
// `sourceAmountUnits` above.
|
|
137
|
-
sourceTokenSymbol:
|
|
121
|
+
sourceTokenSymbol: z.string().nullish(),
|
|
138
122
|
});
|
|
139
123
|
/**
|
|
140
124
|
* The user-passed metadata must meet these criteria:
|
|
@@ -144,14 +128,14 @@ exports.zRozoPayOrderMetadata = zod_1.default.object({
|
|
|
144
128
|
* - Maximum of 40 characters per key
|
|
145
129
|
* - Maximum of 500 characters per value
|
|
146
130
|
*/
|
|
147
|
-
|
|
148
|
-
.record(
|
|
131
|
+
export const zRozoPayUserMetadata = z
|
|
132
|
+
.record(z.string().max(40, "Metadata keys cannot be longer than 40 characters"), z.string().max(500, "Metadata values cannot be longer than 500 characters"))
|
|
149
133
|
.nullable()
|
|
150
134
|
.refine((obj) => !obj || Object.keys(obj).length <= 50, "Metadata cannot have more than 50 key-value pairs");
|
|
151
|
-
function isHydrated(order) {
|
|
135
|
+
export function isHydrated(order) {
|
|
152
136
|
return order.mode === RozoPayOrderMode.HYDRATED;
|
|
153
137
|
}
|
|
154
|
-
function getCanonicalDestination(order) {
|
|
138
|
+
export function getCanonicalDestination(order) {
|
|
155
139
|
const metadata = order.metadata ?? {};
|
|
156
140
|
// For v2 payments, bridge-utils/formatPaymentResponseToHydratedOrder stores
|
|
157
141
|
// canonical destination information in metadata. Prefer those when present.
|
|
@@ -176,16 +160,16 @@ function getCanonicalDestination(order) {
|
|
|
176
160
|
finalDestinationChainId,
|
|
177
161
|
};
|
|
178
162
|
}
|
|
179
|
-
function getOrderSourceChainId(order) {
|
|
163
|
+
export function getOrderSourceChainId(order) {
|
|
180
164
|
if (order.sourceTokenAmount == null) {
|
|
181
165
|
return null;
|
|
182
166
|
}
|
|
183
167
|
return order.sourceTokenAmount.token.chainId;
|
|
184
168
|
}
|
|
185
|
-
function getOrderDestChainId(order) {
|
|
169
|
+
export function getOrderDestChainId(order) {
|
|
186
170
|
return order.destFinalCallTokenAmount.token.chainId;
|
|
187
171
|
}
|
|
188
|
-
function mergedMetadata(data) {
|
|
172
|
+
export function mergedMetadata(data) {
|
|
189
173
|
// Ignore this metadata
|
|
190
174
|
delete data.payintokenaddress;
|
|
191
175
|
delete data.preferredChain;
|
|
@@ -194,7 +178,7 @@ function mergedMetadata(data) {
|
|
|
194
178
|
delete data.receivingAddress;
|
|
195
179
|
return data;
|
|
196
180
|
}
|
|
197
|
-
function getRozoPayOrderView(order) {
|
|
181
|
+
export function getRozoPayOrderView(order) {
|
|
198
182
|
// Handle both string (base58) and bigint order IDs
|
|
199
183
|
const orderId = typeof order.id === "string" ? order.id : writeRozoPayOrderID(order.id);
|
|
200
184
|
const destination = getCanonicalDestination(order);
|
|
@@ -213,8 +197,8 @@ function getRozoPayOrderView(order) {
|
|
|
213
197
|
? {
|
|
214
198
|
payerAddress: order.sourceFulfillerAddr,
|
|
215
199
|
txHash: order.sourceInitiateTxHash,
|
|
216
|
-
chainId:
|
|
217
|
-
amountUnits:
|
|
200
|
+
chainId: assertNotNull(getOrderSourceChainId(order), `source chain id is null for order with source token: ${order.id}`).toString(),
|
|
201
|
+
amountUnits: formatUnits(BigInt(order.sourceTokenAmount.amount), order.sourceTokenAmount.token.decimals),
|
|
218
202
|
tokenSymbol: order.sourceTokenAmount.token.symbol,
|
|
219
203
|
tokenAddress: order.sourceTokenAmount.token.token,
|
|
220
204
|
}
|
|
@@ -228,7 +212,7 @@ function getRozoPayOrderView(order) {
|
|
|
228
212
|
? String(order.destFastFinishTxHash ?? order.destClaimTxHash)
|
|
229
213
|
: null,
|
|
230
214
|
chainId: getOrderDestChainId(order).toString(),
|
|
231
|
-
amountUnits:
|
|
215
|
+
amountUnits: formatUnits(BigInt(order.destFinalCallTokenAmount.amount), order.destFinalCallTokenAmount.token.decimals),
|
|
232
216
|
tokenSymbol: order.destFinalCallTokenAmount.token.symbol,
|
|
233
217
|
tokenAddress: order.destFinalCallTokenAmount.token.token,
|
|
234
218
|
callData: order.destFinalCall.data,
|
|
@@ -241,7 +225,7 @@ function getRozoPayOrderView(order) {
|
|
|
241
225
|
}),
|
|
242
226
|
};
|
|
243
227
|
}
|
|
244
|
-
var ExternalPaymentOptions;
|
|
228
|
+
export var ExternalPaymentOptions;
|
|
245
229
|
(function (ExternalPaymentOptions) {
|
|
246
230
|
ExternalPaymentOptions["Rozo"] = "Rozo";
|
|
247
231
|
ExternalPaymentOptions["RampNetwork"] = "RampNetwork";
|
|
@@ -261,8 +245,8 @@ var ExternalPaymentOptions;
|
|
|
261
245
|
ExternalPaymentOptions["Revolut"] = "Revolut";
|
|
262
246
|
ExternalPaymentOptions["Wise"] = "Wise";
|
|
263
247
|
ExternalPaymentOptions["Ethereum"] = "Ethereum";
|
|
264
|
-
})(ExternalPaymentOptions || (
|
|
265
|
-
var DepositAddressPaymentOptions;
|
|
248
|
+
})(ExternalPaymentOptions || (ExternalPaymentOptions = {}));
|
|
249
|
+
export var DepositAddressPaymentOptions;
|
|
266
250
|
(function (DepositAddressPaymentOptions) {
|
|
267
251
|
DepositAddressPaymentOptions["TRON_USDT"] = "USDT on Tron";
|
|
268
252
|
DepositAddressPaymentOptions["BASE"] = "Base";
|
|
@@ -294,28 +278,28 @@ var DepositAddressPaymentOptions;
|
|
|
294
278
|
DepositAddressPaymentOptions["ZCASH"] = "Zcash";
|
|
295
279
|
/** @deprecated */
|
|
296
280
|
DepositAddressPaymentOptions["DASH"] = "Dash";
|
|
297
|
-
})(DepositAddressPaymentOptions || (
|
|
298
|
-
|
|
299
|
-
to:
|
|
281
|
+
})(DepositAddressPaymentOptions || (DepositAddressPaymentOptions = {}));
|
|
282
|
+
export const emptyOnChainCall = {
|
|
283
|
+
to: zeroAddress,
|
|
300
284
|
data: "0x",
|
|
301
285
|
value: 0n,
|
|
302
286
|
};
|
|
303
287
|
// base58 encoded bigint
|
|
304
|
-
const zRozoPayOrderID =
|
|
288
|
+
const zRozoPayOrderID = z.string().regex(/^[1-9A-HJ-NP-Za-km-z]+$/);
|
|
305
289
|
/**
|
|
306
290
|
* Read a base58-encoded id into a bigint.
|
|
307
291
|
*/
|
|
308
|
-
function readRozoPayOrderID(id) {
|
|
309
|
-
return
|
|
292
|
+
export function readRozoPayOrderID(id) {
|
|
293
|
+
return bytesToBigInt(base58.decode(id));
|
|
310
294
|
}
|
|
311
295
|
/**
|
|
312
296
|
* Write a bigint into a base58-encoded id.
|
|
313
297
|
*/
|
|
314
|
-
function writeRozoPayOrderID(id) {
|
|
315
|
-
return
|
|
298
|
+
export function writeRozoPayOrderID(id) {
|
|
299
|
+
return base58.encode(numberToBytes(id));
|
|
316
300
|
}
|
|
317
301
|
const UUID_REGEX = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
318
|
-
function isUUID(id) {
|
|
302
|
+
export function isUUID(id) {
|
|
319
303
|
return UUID_REGEX.test(id);
|
|
320
304
|
}
|
|
321
305
|
/**
|
|
@@ -323,26 +307,26 @@ function isUUID(id) {
|
|
|
323
307
|
* the getOrder API. Base58 IDs are decoded to bigint then stringified; UUID IDs
|
|
324
308
|
* are passed through unchanged.
|
|
325
309
|
*/
|
|
326
|
-
function resolveOrderId(id) {
|
|
310
|
+
export function resolveOrderId(id) {
|
|
327
311
|
if (isUUID(id))
|
|
328
312
|
return id;
|
|
329
313
|
return readRozoPayOrderID(id).toString();
|
|
330
314
|
}
|
|
331
|
-
|
|
332
|
-
var RozoPayEventType;
|
|
315
|
+
export const zUUID = z.string().uuid();
|
|
316
|
+
export var RozoPayEventType;
|
|
333
317
|
(function (RozoPayEventType) {
|
|
334
318
|
RozoPayEventType["PaymentStarted"] = "payment_started";
|
|
335
319
|
RozoPayEventType["PaymentCompleted"] = "payment_completed";
|
|
336
320
|
RozoPayEventType["PaymentBounced"] = "payment_bounced";
|
|
337
321
|
RozoPayEventType["PaymentRefunded"] = "payment_refunded";
|
|
338
322
|
RozoPayEventType["PaymentPayoutCompleted"] = "payment_payout_completed";
|
|
339
|
-
})(RozoPayEventType || (
|
|
323
|
+
})(RozoPayEventType || (RozoPayEventType = {}));
|
|
340
324
|
// Lifecycle: Pending (just created) -> (if failing) Retrying (exponential backoff) -> Successful or Failed
|
|
341
|
-
var WebhookEventStatus;
|
|
325
|
+
export var WebhookEventStatus;
|
|
342
326
|
(function (WebhookEventStatus) {
|
|
343
327
|
WebhookEventStatus["PENDING"] = "pending";
|
|
344
328
|
WebhookEventStatus["RETRYING"] = "retrying";
|
|
345
329
|
WebhookEventStatus["SUCCESSFUL"] = "successful";
|
|
346
330
|
WebhookEventStatus["FAILED"] = "failed";
|
|
347
|
-
})(WebhookEventStatus || (
|
|
331
|
+
})(WebhookEventStatus || (WebhookEventStatus = {}));
|
|
348
332
|
//# sourceMappingURL=rozoPay.js.map
|
package/dist/rozoPay.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rozoPay.js","sourceRoot":"","sources":["../src/rozoPay.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"rozoPay.js","sourceRoot":"","sources":["../src/rozoPay.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,wEAAwE;AAExE,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAEL,aAAa,EACb,WAAW,EACX,UAAU,EAEV,aAAa,EACb,WAAW,GACZ,MAAM,MAAM,CAAC;AACd,OAAO,CAAC,MA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