@vapi-network/sources 0.8.0 → 0.9.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/index.js +19 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -20369,6 +20369,14 @@ var configSchema = external_exports.object({
|
|
|
20369
20369
|
})
|
|
20370
20370
|
).optional(),
|
|
20371
20371
|
allowPrivateNetwork: external_exports.boolean().default(false).optional(),
|
|
20372
|
+
tasksEscrowDurationOverrides: external_exports.record(
|
|
20373
|
+
external_exports.string().regex(/^\d+$/),
|
|
20374
|
+
external_exports.object({
|
|
20375
|
+
workDurationSeconds: external_exports.number().int().positive().max(Number.MAX_SAFE_INTEGER).optional(),
|
|
20376
|
+
reviewWindowSeconds: external_exports.number().int().positive().max(Number.MAX_SAFE_INTEGER).optional()
|
|
20377
|
+
}).strict()
|
|
20378
|
+
).optional(),
|
|
20379
|
+
tasksEscrowFactoryOverrides: external_exports.record(external_exports.string().regex(/^\d+$/), external_exports.string()).optional(),
|
|
20372
20380
|
networks: external_exports.record(
|
|
20373
20381
|
external_exports.string().refine((network) => isSupportedPaymentNetwork(network), {
|
|
20374
20382
|
message: "Expected a supported eip155:<chainId> or Solana network identifier."
|
|
@@ -20387,6 +20395,17 @@ var configSchema = external_exports.object({
|
|
|
20387
20395
|
spendCaps: spendCapsSchema,
|
|
20388
20396
|
device: external_exports.string().regex(/^[a-z0-9][a-z0-9-]{0,31}$/).optional()
|
|
20389
20397
|
}).superRefine((config2, context) => {
|
|
20398
|
+
for (const [chainId, factory] of Object.entries(config2.tasksEscrowFactoryOverrides ?? {})) {
|
|
20399
|
+
try {
|
|
20400
|
+
getAddress(factory);
|
|
20401
|
+
} catch {
|
|
20402
|
+
context.addIssue({
|
|
20403
|
+
code: "custom",
|
|
20404
|
+
path: ["tasksEscrowFactoryOverrides", chainId],
|
|
20405
|
+
message: "Expected a valid EVM escrow factory address."
|
|
20406
|
+
});
|
|
20407
|
+
}
|
|
20408
|
+
}
|
|
20390
20409
|
for (const [network, configured] of Object.entries(config2.networks)) {
|
|
20391
20410
|
if (isSolanaNetwork(network)) {
|
|
20392
20411
|
if (configured.usdc !== NETWORKS[SOLANA_MAINNET_CAIP2].usdc) {
|