@otim/utils 0.0.2 → 0.0.4
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/index.js +41 -7
- package/dist/api/index.js.map +2 -2
- package/dist/api/index.mjs +41 -7
- package/dist/api/index.mjs.map +2 -2
- package/dist/api/schemas/payments.d.mts +38 -0
- package/dist/api/schemas/payments.d.ts +38 -0
- package/dist/api/schemas/payments.d.ts.map +1 -1
- package/dist/api/services/payments.d.mts +2 -1
- package/dist/api/services/payments.d.ts +2 -1
- package/dist/api/services/payments.d.ts.map +1 -1
- package/dist/chains/index.js +1 -1
- package/dist/chains/index.mjs +1 -1
- package/dist/helpers/index.js +23 -1
- package/dist/helpers/index.js.map +2 -2
- package/dist/helpers/index.mjs +23 -1
- package/dist/helpers/index.mjs.map +2 -2
- package/dist/helpers/zod.d.mts +21 -0
- package/dist/helpers/zod.d.ts +21 -0
- package/dist/helpers/zod.d.ts.map +1 -1
- package/dist/payments/build.d.mts +1 -0
- package/dist/payments/build.d.ts +1 -0
- package/dist/payments/build.d.ts.map +1 -1
- package/dist/payments/comprehensive-payment-request.d.mts +1 -0
- package/dist/payments/comprehensive-payment-request.d.ts +1 -0
- package/dist/payments/comprehensive-payment-request.d.ts.map +1 -1
- package/dist/payments/index.js +16 -12
- package/dist/payments/index.js.map +2 -2
- package/dist/payments/index.mjs +16 -12
- package/dist/payments/index.mjs.map +2 -2
- package/dist/server/index.js +36 -4
- package/dist/server/index.js.map +2 -2
- package/dist/server/index.mjs +36 -4
- package/dist/server/index.mjs.map +2 -2
- package/dist/server/routes/bridge.d.mts +62 -0
- package/dist/server/routes/bridge.d.ts +62 -0
- package/dist/server/routes/bridge.d.ts.map +1 -1
- package/dist/server/routes/payments.d.mts +2 -1
- package/dist/server/routes/payments.d.ts +2 -1
- package/dist/server/routes/payments.d.ts.map +1 -1
- package/dist/wallet/wagmi/index.js +1 -1
- package/dist/wallet/wagmi/index.mjs +1 -1
- package/package.json +9 -5
package/dist/api/index.js
CHANGED
|
@@ -61,6 +61,8 @@ __export(api_exports, {
|
|
|
61
61
|
authLoginRequestSchema: () => authLoginRequestSchema,
|
|
62
62
|
authLoginResponseSchema: () => authLoginResponseSchema,
|
|
63
63
|
buildEphemeralInstructionSchema: () => buildEphemeralInstructionSchema,
|
|
64
|
+
buildSettlementRequestSchema: () => buildSettlementRequestSchema,
|
|
65
|
+
buildSettlementResponseSchema: () => buildSettlementResponseSchema,
|
|
64
66
|
calculateHasMore: () => calculateHasMore,
|
|
65
67
|
chainIdSchema: () => chainIdSchema,
|
|
66
68
|
chainSuccessResponseSchema: () => chainSuccessResponseSchema,
|
|
@@ -1228,7 +1230,10 @@ var paymentRequestBuildRequestSchema = import_zod16.z.object({
|
|
|
1228
1230
|
payerAddress: hexStringSchema.nullish(),
|
|
1229
1231
|
completionInstructions: import_zod16.z.array(buildEphemeralInstructionSchema),
|
|
1230
1232
|
instructions: import_zod16.z.array(buildEphemeralInstructionSchema),
|
|
1231
|
-
metadata: import_zod16.z.record(import_zod16.z.string(), import_zod16.z.unknown()).optional().default({})
|
|
1233
|
+
metadata: import_zod16.z.record(import_zod16.z.string(), import_zod16.z.unknown()).optional().default({}),
|
|
1234
|
+
maxRuns: import_zod16.z.number().int().positive({ message: "maxRuns must be greater than 0" }).max(Number.MAX_SAFE_INTEGER, {
|
|
1235
|
+
message: "maxRuns must be less than MAX_SAFE_INTEGER"
|
|
1236
|
+
}).optional()
|
|
1232
1237
|
});
|
|
1233
1238
|
var feeResponseSchema2 = import_zod16.z.object({
|
|
1234
1239
|
token: hexStringSchema,
|
|
@@ -1276,7 +1281,28 @@ var paymentRequestDetailsResponseSchema = import_zod16.z.object({
|
|
|
1276
1281
|
ephemeralWalletAddress: hexStringSchema,
|
|
1277
1282
|
ephemeralWalletId: import_zod16.z.string().optional(),
|
|
1278
1283
|
status: import_zod16.z.enum(["pending", "inProgress", "paid", "cancelled", "draft"]),
|
|
1279
|
-
metadata: import_zod16.z.record(import_zod16.z.string(), import_zod16.z.unknown())
|
|
1284
|
+
metadata: import_zod16.z.record(import_zod16.z.string(), import_zod16.z.unknown()),
|
|
1285
|
+
numRuns: import_zod16.z.number(),
|
|
1286
|
+
maxRuns: import_zod16.z.number().optional()
|
|
1287
|
+
});
|
|
1288
|
+
var buildSettlementRequestSchema = import_zod16.z.object({
|
|
1289
|
+
acceptedTokens: import_zod16.z.record(import_zod16.z.string(), import_zod16.z.array(hexStringSchema)),
|
|
1290
|
+
settlementChain: import_zod16.z.number(),
|
|
1291
|
+
settlementToken: hexStringSchema,
|
|
1292
|
+
settlementAmount: numberSchema,
|
|
1293
|
+
recipientAddress: hexStringSchema,
|
|
1294
|
+
metadata: import_zod16.z.record(import_zod16.z.string(), import_zod16.z.unknown()),
|
|
1295
|
+
payerAddress: hexStringSchema.nullish(),
|
|
1296
|
+
dueDate: import_zod16.z.string().datetime().nullish(),
|
|
1297
|
+
maxRuns: import_zod16.z.number().int().positive().nullish()
|
|
1298
|
+
});
|
|
1299
|
+
var buildSettlementResponseSchema = import_zod16.z.object({
|
|
1300
|
+
requestId: import_zod16.z.string(),
|
|
1301
|
+
subOrgId: import_zod16.z.string(),
|
|
1302
|
+
walletId: import_zod16.z.string(),
|
|
1303
|
+
ephemeralWalletAddress: hexStringSchema,
|
|
1304
|
+
completionInstructions: import_zod16.z.array(buildInstructionResponseSchema),
|
|
1305
|
+
instructions: import_zod16.z.array(buildInstructionResponseSchema)
|
|
1280
1306
|
});
|
|
1281
1307
|
|
|
1282
1308
|
// src/api/schemas/transaction.ts
|
|
@@ -1294,7 +1320,7 @@ var transactionGetListRequestSchema = import_zod17.z.object({
|
|
|
1294
1320
|
var transactionGetListResponseSchema = import_zod17.z.array(transactionSchema);
|
|
1295
1321
|
|
|
1296
1322
|
// src/env.ts
|
|
1297
|
-
var BUILD_MODE = "
|
|
1323
|
+
var BUILD_MODE = "development";
|
|
1298
1324
|
|
|
1299
1325
|
// src/helpers/logger.ts
|
|
1300
1326
|
var Logger = class {
|
|
@@ -1728,7 +1754,7 @@ var PaymentsService = class extends BaseService {
|
|
|
1728
1754
|
}
|
|
1729
1755
|
async buildPaymentRequest(requestBody) {
|
|
1730
1756
|
return this.makeRequest({
|
|
1731
|
-
url: "/
|
|
1757
|
+
url: "/orchestration/build",
|
|
1732
1758
|
method: HttpMethod.Post,
|
|
1733
1759
|
data: requestBody,
|
|
1734
1760
|
schema: paymentRequestBuildResponseSchema
|
|
@@ -1736,7 +1762,7 @@ var PaymentsService = class extends BaseService {
|
|
|
1736
1762
|
}
|
|
1737
1763
|
async newPaymentRequest(requestBody) {
|
|
1738
1764
|
return this.makeRequest({
|
|
1739
|
-
url: "/
|
|
1765
|
+
url: "/orchestration/new",
|
|
1740
1766
|
method: HttpMethod.Post,
|
|
1741
1767
|
data: requestBody,
|
|
1742
1768
|
validateResponse: () => true
|
|
@@ -1744,7 +1770,7 @@ var PaymentsService = class extends BaseService {
|
|
|
1744
1770
|
}
|
|
1745
1771
|
async getPaymentRequestDetails(requestBody) {
|
|
1746
1772
|
return this.makeRequest({
|
|
1747
|
-
url: "/
|
|
1773
|
+
url: "/orchestration/details",
|
|
1748
1774
|
method: HttpMethod.Get,
|
|
1749
1775
|
data: requestBody,
|
|
1750
1776
|
schema: paymentRequestDetailsResponseSchema
|
|
@@ -1752,12 +1778,20 @@ var PaymentsService = class extends BaseService {
|
|
|
1752
1778
|
}
|
|
1753
1779
|
async getPaymentRequests(request) {
|
|
1754
1780
|
return this.makePaginatedRequest({
|
|
1755
|
-
url: "/
|
|
1781
|
+
url: "/orchestrations",
|
|
1756
1782
|
method: HttpMethod.Get,
|
|
1757
1783
|
data: request,
|
|
1758
1784
|
schema: getPaymentRequestsResponseSchema
|
|
1759
1785
|
});
|
|
1760
1786
|
}
|
|
1787
|
+
async buildSettlementOrchestration(requestBody) {
|
|
1788
|
+
return this.makeRequest({
|
|
1789
|
+
url: "/orchestration/build/settlement",
|
|
1790
|
+
method: HttpMethod.Post,
|
|
1791
|
+
data: requestBody,
|
|
1792
|
+
schema: buildSettlementResponseSchema
|
|
1793
|
+
});
|
|
1794
|
+
}
|
|
1761
1795
|
};
|
|
1762
1796
|
|
|
1763
1797
|
// src/api/services/integration.ts
|