@otim/utils 0.0.3 → 0.0.5
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 +31 -0
- package/dist/api/index.js.map +2 -2
- package/dist/api/index.mjs +31 -0
- package/dist/api/index.mjs.map +2 -2
- package/dist/api/schemas/payments.d.mts +42 -0
- package/dist/api/schemas/payments.d.ts +42 -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/helpers/index.js +8 -6
- package/dist/helpers/index.js.map +2 -2
- package/dist/helpers/index.mjs +8 -6
- package/dist/helpers/index.mjs.map +2 -2
- package/dist/helpers/zod.d.mts +2 -2
- package/dist/helpers/zod.d.ts +2 -2
- package/dist/helpers/zod.d.ts.map +1 -1
- package/dist/server/index.js +32 -0
- package/dist/server/index.js.map +2 -2
- package/dist/server/index.mjs +32 -0
- 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/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,
|
|
@@ -1245,6 +1247,7 @@ var buildInstructionResponseSchema = import_zod16.z.object({
|
|
|
1245
1247
|
salt: hexStringSchema,
|
|
1246
1248
|
maxExecutions: hexStringSchema,
|
|
1247
1249
|
action: hexStringSchema,
|
|
1250
|
+
actionName: import_zod16.z.string().optional(),
|
|
1248
1251
|
arguments: hexStringSchema
|
|
1249
1252
|
});
|
|
1250
1253
|
var paymentRequestBuildResponseSchema = import_zod16.z.object({
|
|
@@ -1257,6 +1260,7 @@ var paymentRequestBuildResponseSchema = import_zod16.z.object({
|
|
|
1257
1260
|
});
|
|
1258
1261
|
var newInstructionRequestSchema = import_zod16.z.object({
|
|
1259
1262
|
nickname: import_zod16.z.string().optional(),
|
|
1263
|
+
actionName: import_zod16.z.string().optional(),
|
|
1260
1264
|
address: hexStringSchema,
|
|
1261
1265
|
chainId: import_zod16.z.number(),
|
|
1262
1266
|
salt: hexStringSchema,
|
|
@@ -1283,6 +1287,25 @@ var paymentRequestDetailsResponseSchema = import_zod16.z.object({
|
|
|
1283
1287
|
numRuns: import_zod16.z.number(),
|
|
1284
1288
|
maxRuns: import_zod16.z.number().optional()
|
|
1285
1289
|
});
|
|
1290
|
+
var buildSettlementRequestSchema = import_zod16.z.object({
|
|
1291
|
+
acceptedTokens: import_zod16.z.record(import_zod16.z.string(), import_zod16.z.array(hexStringSchema)),
|
|
1292
|
+
settlementChain: import_zod16.z.number(),
|
|
1293
|
+
settlementToken: hexStringSchema,
|
|
1294
|
+
settlementAmount: numberSchema,
|
|
1295
|
+
recipientAddress: hexStringSchema,
|
|
1296
|
+
metadata: import_zod16.z.record(import_zod16.z.string(), import_zod16.z.unknown()),
|
|
1297
|
+
payerAddress: hexStringSchema.nullish(),
|
|
1298
|
+
dueDate: import_zod16.z.string().datetime().nullish(),
|
|
1299
|
+
maxRuns: import_zod16.z.number().int().positive().nullish()
|
|
1300
|
+
});
|
|
1301
|
+
var buildSettlementResponseSchema = import_zod16.z.object({
|
|
1302
|
+
requestId: import_zod16.z.string(),
|
|
1303
|
+
subOrgId: import_zod16.z.string(),
|
|
1304
|
+
walletId: import_zod16.z.string(),
|
|
1305
|
+
ephemeralWalletAddress: hexStringSchema,
|
|
1306
|
+
completionInstructions: import_zod16.z.array(buildInstructionResponseSchema),
|
|
1307
|
+
instructions: import_zod16.z.array(buildInstructionResponseSchema)
|
|
1308
|
+
});
|
|
1286
1309
|
|
|
1287
1310
|
// src/api/schemas/transaction.ts
|
|
1288
1311
|
var import_zod17 = require("zod");
|
|
@@ -1763,6 +1786,14 @@ var PaymentsService = class extends BaseService {
|
|
|
1763
1786
|
schema: getPaymentRequestsResponseSchema
|
|
1764
1787
|
});
|
|
1765
1788
|
}
|
|
1789
|
+
async buildSettlementOrchestration(requestBody) {
|
|
1790
|
+
return this.makeRequest({
|
|
1791
|
+
url: "/orchestration/build/settlement",
|
|
1792
|
+
method: HttpMethod.Post,
|
|
1793
|
+
data: requestBody,
|
|
1794
|
+
schema: buildSettlementResponseSchema
|
|
1795
|
+
});
|
|
1796
|
+
}
|
|
1766
1797
|
};
|
|
1767
1798
|
|
|
1768
1799
|
// src/api/services/integration.ts
|