@otim/utils 0.0.3 → 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 +29 -0
- package/dist/api/index.js.map +2 -2
- package/dist/api/index.mjs +29 -0
- package/dist/api/index.mjs.map +2 -2
- package/dist/api/schemas/payments.d.mts +35 -0
- package/dist/api/schemas/payments.d.ts +35 -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,
|
|
@@ -1283,6 +1285,25 @@ var paymentRequestDetailsResponseSchema = import_zod16.z.object({
|
|
|
1283
1285
|
numRuns: import_zod16.z.number(),
|
|
1284
1286
|
maxRuns: import_zod16.z.number().optional()
|
|
1285
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)
|
|
1306
|
+
});
|
|
1286
1307
|
|
|
1287
1308
|
// src/api/schemas/transaction.ts
|
|
1288
1309
|
var import_zod17 = require("zod");
|
|
@@ -1763,6 +1784,14 @@ var PaymentsService = class extends BaseService {
|
|
|
1763
1784
|
schema: getPaymentRequestsResponseSchema
|
|
1764
1785
|
});
|
|
1765
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
|
+
}
|
|
1766
1795
|
};
|
|
1767
1796
|
|
|
1768
1797
|
// src/api/services/integration.ts
|