@settlemint/dalp-sdk 3.0.7-main.28529883879 → 3.0.7-main.28538365167
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/dapi-errors.d.ts +1 -0
- package/dist/dapi-errors.d.ts.map +1 -1
- package/dist/index.js +763 -716
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1177,9 +1177,9 @@ var ENTRIES_INDEX = {
|
|
|
1177
1177
|
retryable: false,
|
|
1178
1178
|
expectedClientError: true,
|
|
1179
1179
|
public: {
|
|
1180
|
-
message: "
|
|
1181
|
-
why: "The
|
|
1182
|
-
fix: "
|
|
1180
|
+
message: "This action requires a role the acting wallet does not hold.",
|
|
1181
|
+
why: "The token or system contract restricts this action to the {{requiredRoles}} role, and the acting wallet was granted no matching role.",
|
|
1182
|
+
fix: "Ask an administrator to grant the {{requiredRoles}} role, then retry, or perform this action with a wallet that already holds it."
|
|
1183
1183
|
},
|
|
1184
1184
|
observability: {
|
|
1185
1185
|
severity: "info",
|
|
@@ -1199,6 +1199,12 @@ var ENTRIES_INDEX = {
|
|
|
1199
1199
|
authSensitivity: {
|
|
1200
1200
|
existenceDisclosure: "public-safe",
|
|
1201
1201
|
rationale: "The public response only reveals missing authorization, not protected resource existence."
|
|
1202
|
+
},
|
|
1203
|
+
ui: {
|
|
1204
|
+
surface: "inline",
|
|
1205
|
+
retry: "none",
|
|
1206
|
+
ariaLive: "assertive",
|
|
1207
|
+
toastMode: "title-and-why"
|
|
1202
1208
|
}
|
|
1203
1209
|
},
|
|
1204
1210
|
"DALP-0007": {
|
|
@@ -42218,6 +42224,38 @@ var ENTRIES_INDEX = {
|
|
|
42218
42224
|
owner: "dapi",
|
|
42219
42225
|
orpcCode: "XVP_MIXED_CHAIN_SETTLEMENT"
|
|
42220
42226
|
},
|
|
42227
|
+
"DALP-9166": {
|
|
42228
|
+
id: "DALP-9166",
|
|
42229
|
+
kind: "route",
|
|
42230
|
+
category: "permission",
|
|
42231
|
+
status: 403,
|
|
42232
|
+
retryable: false,
|
|
42233
|
+
expectedClientError: true,
|
|
42234
|
+
public: {
|
|
42235
|
+
message: "The wallet must be registered in the token identity registry before delegating voting power.",
|
|
42236
|
+
why: "Delegating voting power requires the acting wallet to hold an identity in the token's identity registry, and the selected wallet has no identity there.",
|
|
42237
|
+
fix: "Register the wallet's identity in the token identity registry, then retry the delegation."
|
|
42238
|
+
},
|
|
42239
|
+
observability: {
|
|
42240
|
+
severity: "info",
|
|
42241
|
+
otelEventName: "dapi.error",
|
|
42242
|
+
metricAttributeKey: "dapi.error.id",
|
|
42243
|
+
dimensions: [
|
|
42244
|
+
"error.id",
|
|
42245
|
+
"error.category",
|
|
42246
|
+
"surface",
|
|
42247
|
+
"route",
|
|
42248
|
+
"status_class",
|
|
42249
|
+
"retryable"
|
|
42250
|
+
]
|
|
42251
|
+
},
|
|
42252
|
+
owner: "dapi",
|
|
42253
|
+
orpcCode: "USER_NOT_AUTHORIZED",
|
|
42254
|
+
authSensitivity: {
|
|
42255
|
+
existenceDisclosure: "public-safe",
|
|
42256
|
+
rationale: "The public response reveals only that the wallet is not registered for delegation, not any protected resource existence."
|
|
42257
|
+
}
|
|
42258
|
+
},
|
|
42221
42259
|
"DALP-CHAIN-EMPTY-REVERT": {
|
|
42222
42260
|
id: "DALP-CHAIN-EMPTY-REVERT",
|
|
42223
42261
|
kind: "contract",
|
|
@@ -52632,6 +52670,9 @@ var DALP_ERROR_TYPED_FIELD_NAMES = {
|
|
|
52632
52670
|
"DALP-9163": [],
|
|
52633
52671
|
"DALP-9164": [],
|
|
52634
52672
|
"DALP-9165": [],
|
|
52673
|
+
"DALP-9166": [
|
|
52674
|
+
"requiredRoles"
|
|
52675
|
+
],
|
|
52635
52676
|
"DALP-CHAIN-EMPTY-REVERT": [
|
|
52636
52677
|
"args",
|
|
52637
52678
|
"correlationId",
|
|
@@ -52712,7 +52753,7 @@ var DALP_ERROR_DATA_SCHEMA_BY_ID = {
|
|
|
52712
52753
|
"DALP-0004": DALP_ORPC_ERROR_DATA_WIRE_SCHEMA,
|
|
52713
52754
|
"DALP-0005": DALP_ORPC_ERROR_DATA_WIRE_SCHEMA,
|
|
52714
52755
|
"DALP-0006": DALP_ORPC_ERROR_DATA_BASE_SCHEMA.extend({
|
|
52715
|
-
requiredRoles: z2.union([z2.string(), z2.array(z2.string())])
|
|
52756
|
+
requiredRoles: z2.union([z2.string(), z2.array(z2.string()), z2.record(z2.string(), DALP_ORPC_JSON_VALUE_SCHEMA)])
|
|
52716
52757
|
}).catchall(DALP_ORPC_JSON_VALUE_SCHEMA),
|
|
52717
52758
|
"DALP-0007": DALP_ORPC_ERROR_DATA_WIRE_SCHEMA,
|
|
52718
52759
|
"DALP-0008": DALP_ORPC_ERROR_DATA_WIRE_SCHEMA,
|
|
@@ -62715,6 +62756,9 @@ var DALP_ERROR_DATA_SCHEMA_BY_ID = {
|
|
|
62715
62756
|
"DALP-9163": DALP_ORPC_ERROR_DATA_WIRE_SCHEMA,
|
|
62716
62757
|
"DALP-9164": DALP_ORPC_ERROR_DATA_WIRE_SCHEMA,
|
|
62717
62758
|
"DALP-9165": DALP_ORPC_ERROR_DATA_WIRE_SCHEMA,
|
|
62759
|
+
"DALP-9166": DALP_ORPC_ERROR_DATA_BASE_SCHEMA.extend({
|
|
62760
|
+
requiredRoles: z2.union([z2.string(), z2.array(z2.string()), z2.record(z2.string(), DALP_ORPC_JSON_VALUE_SCHEMA)])
|
|
62761
|
+
}).catchall(DALP_ORPC_JSON_VALUE_SCHEMA),
|
|
62718
62762
|
"DALP-CHAIN-EMPTY-REVERT": DALP_ORPC_ERROR_DATA_BASE_SCHEMA.extend({
|
|
62719
62763
|
args: z2.record(z2.string(), z2.string()),
|
|
62720
62764
|
correlationId: z2.string(),
|
|
@@ -63019,19 +63063,294 @@ function readDalpOrpcError(error) {
|
|
|
63019
63063
|
import { oc } from "@orpc/contract";
|
|
63020
63064
|
|
|
63021
63065
|
// ../../packages/core/validation/src/role-requirement.ts
|
|
63066
|
+
import { z as z7 } from "zod";
|
|
63067
|
+
|
|
63068
|
+
// ../../packages/core/validation/src/access-control-roles.ts
|
|
63069
|
+
import { z as z6 } from "zod";
|
|
63070
|
+
|
|
63071
|
+
// ../../packages/core/validation/src/account.ts
|
|
63072
|
+
import { z as z4 } from "zod";
|
|
63073
|
+
|
|
63074
|
+
// ../../packages/core/validation/src/ethereum-address.ts
|
|
63075
|
+
import { getAddress, isAddress, zeroAddress } from "viem";
|
|
63022
63076
|
import { z as z3 } from "zod";
|
|
63023
|
-
var
|
|
63024
|
-
|
|
63025
|
-
|
|
63026
|
-
|
|
63077
|
+
var ethereumAddress = z3.string().meta({
|
|
63078
|
+
description: "A valid Ethereum address (42 characters, starting with 0x)",
|
|
63079
|
+
examples: ["0x71C7656EC7ab88b098defB751B7401B5f6d8976F"]
|
|
63080
|
+
}).min(42, "Ethereum address must be at least 42 characters long").max(42, "Ethereum address must be at most 42 characters long").regex(/^0x[a-fA-F0-9]{40}$/, "Ethereum address must start with 0x followed by 40 hexadecimal characters").transform((value, ctx) => {
|
|
63081
|
+
if (!isAddress(value)) {
|
|
63082
|
+
ctx.addIssue({
|
|
63083
|
+
code: z3.ZodIssueCode.custom,
|
|
63084
|
+
message: "Invalid Ethereum address format or checksum"
|
|
63085
|
+
});
|
|
63086
|
+
return z3.NEVER;
|
|
63087
|
+
}
|
|
63088
|
+
return getAddress(value);
|
|
63089
|
+
});
|
|
63090
|
+
var nonZeroEthereumAddress = ethereumAddress.refine((address) => address !== zeroAddress, "Fee recipient cannot be the zero address");
|
|
63091
|
+
var lowercaseEthereumAddress = ethereumAddress.transform((value) => value.toLowerCase());
|
|
63092
|
+
|
|
63093
|
+
// ../../packages/core/validation/src/account.ts
|
|
63094
|
+
var AccountSchema = z4.object({
|
|
63095
|
+
id: ethereumAddress,
|
|
63096
|
+
isContract: z4.boolean().meta({ description: "Whether this address is a smart contract (true) or EOA (false)", examples: [true, false] })
|
|
63097
|
+
});
|
|
63098
|
+
var account = () => AccountSchema;
|
|
63099
|
+
var accountArray = () => z4.array(account()).meta({
|
|
63100
|
+
description: "Array of Account entities",
|
|
63101
|
+
examples: [[{ id: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", isContract: false }]]
|
|
63102
|
+
});
|
|
63103
|
+
|
|
63104
|
+
// ../../packages/core/validation/src/ethereum-hex.ts
|
|
63105
|
+
import { isHex } from "viem";
|
|
63106
|
+
import { z as z5 } from "zod";
|
|
63107
|
+
var ethereumHex = z5.string().meta({
|
|
63108
|
+
description: "A valid Ethereum hex string (starting with 0x)",
|
|
63109
|
+
examples: ["0x1234abcd", "0x00", "0xdeadbeef"]
|
|
63110
|
+
}).min(2, "Hex string must be at least 2 characters long (0x)").refine(isHex, {
|
|
63111
|
+
message: "Invalid hex format - must start with '0x' followed by hexadecimal characters"
|
|
63112
|
+
}).transform((value) => value);
|
|
63113
|
+
|
|
63114
|
+
// ../../packages/core/validation/src/v1-frozen-spec.ts
|
|
63115
|
+
var V1_FROZEN_SPEC_META_KEY = "x-dalp-v1-frozen-spec";
|
|
63116
|
+
function v1FrozenSpecMeta(directive) {
|
|
63117
|
+
return { [V1_FROZEN_SPEC_META_KEY]: directive };
|
|
63118
|
+
}
|
|
63119
|
+
function v1FrozenRequired(schema, directive = {}) {
|
|
63120
|
+
return schema.meta(v1FrozenSpecMeta({ required: true, ...directive }));
|
|
63121
|
+
}
|
|
63122
|
+
|
|
63123
|
+
// ../../packages/core/validation/src/access-control-roles.ts
|
|
63124
|
+
var roles = [
|
|
63125
|
+
"addonManager",
|
|
63126
|
+
"addonModule",
|
|
63127
|
+
"addonRegistryModule",
|
|
63128
|
+
"admin",
|
|
63129
|
+
"auditor",
|
|
63130
|
+
"claimPolicyManager",
|
|
63131
|
+
"claimIssuer",
|
|
63132
|
+
"complianceManager",
|
|
63133
|
+
"custodian",
|
|
63134
|
+
"emergency",
|
|
63135
|
+
"feedsManager",
|
|
63136
|
+
"fundsManager",
|
|
63137
|
+
"gasManager",
|
|
63138
|
+
"governance",
|
|
63139
|
+
"identityManager",
|
|
63140
|
+
"identityRegistryModule",
|
|
63141
|
+
"organisationIdentityManager",
|
|
63142
|
+
"saleAdmin",
|
|
63143
|
+
"supplyManagement",
|
|
63144
|
+
"systemManager",
|
|
63145
|
+
"systemModule",
|
|
63146
|
+
"tokenFactoryModule",
|
|
63147
|
+
"tokenFactoryRegistryModule",
|
|
63148
|
+
"tokenManager",
|
|
63149
|
+
"trustedIssuersMetaRegistryModule"
|
|
63150
|
+
];
|
|
63151
|
+
var accessControlRoles = z6.object(Object.fromEntries(roles.map((role) => [role, z6.boolean().default(false)])));
|
|
63152
|
+
var accessControlRole = z6.enum(roles);
|
|
63153
|
+
var assetAccessControlRoles = [
|
|
63154
|
+
"admin",
|
|
63155
|
+
"custodian",
|
|
63156
|
+
"emergency",
|
|
63157
|
+
"fundsManager",
|
|
63158
|
+
"governance",
|
|
63159
|
+
"saleAdmin",
|
|
63160
|
+
"supplyManagement"
|
|
63161
|
+
];
|
|
63162
|
+
var assetAccessControlRole = z6.enum(assetAccessControlRoles);
|
|
63163
|
+
var assetAccessControlRolesSchema = accessControlRoles.pick({
|
|
63164
|
+
admin: true,
|
|
63165
|
+
custodian: true,
|
|
63166
|
+
emergency: true,
|
|
63167
|
+
fundsManager: true,
|
|
63168
|
+
governance: true,
|
|
63169
|
+
saleAdmin: true,
|
|
63170
|
+
supplyManagement: true
|
|
63171
|
+
});
|
|
63172
|
+
var systemAccessControlRoles = [
|
|
63173
|
+
"admin",
|
|
63174
|
+
"auditor",
|
|
63175
|
+
"systemManager",
|
|
63176
|
+
"tokenManager",
|
|
63177
|
+
"complianceManager",
|
|
63178
|
+
"claimPolicyManager",
|
|
63179
|
+
"claimIssuer",
|
|
63180
|
+
"identityManager",
|
|
63181
|
+
"feedsManager",
|
|
63182
|
+
"gasManager"
|
|
63183
|
+
];
|
|
63184
|
+
var systemAccessControlRole = z6.enum(systemAccessControlRoles);
|
|
63185
|
+
var systemAccessControlRolesV1 = [...systemAccessControlRoles, "addonManager"];
|
|
63186
|
+
var systemAccessControlRoleV1 = z6.enum(systemAccessControlRolesV1);
|
|
63187
|
+
var systemAccessControlRolesSchema = accessControlRoles.pick({
|
|
63188
|
+
addonManager: true,
|
|
63189
|
+
admin: true,
|
|
63190
|
+
auditor: true,
|
|
63191
|
+
systemManager: true,
|
|
63192
|
+
tokenManager: true,
|
|
63193
|
+
complianceManager: true,
|
|
63194
|
+
claimPolicyManager: true,
|
|
63195
|
+
claimIssuer: true,
|
|
63196
|
+
identityManager: true,
|
|
63197
|
+
feedsManager: true,
|
|
63198
|
+
gasManager: true
|
|
63199
|
+
});
|
|
63200
|
+
var roleAdminSchema = z6.object({
|
|
63201
|
+
id: ethereumHex.meta({
|
|
63202
|
+
description: "Role admin mapping identifier",
|
|
63203
|
+
examples: ["0x0102030405060708091011121314151617181920212223242526272829303132"]
|
|
63027
63204
|
}),
|
|
63028
|
-
|
|
63029
|
-
|
|
63205
|
+
role: ethereumHex.meta({
|
|
63206
|
+
description: "Role identifier (bytes32)",
|
|
63207
|
+
examples: ["0x0000000000000000000000000000000000000000000000000000000000000001"]
|
|
63208
|
+
}),
|
|
63209
|
+
roleFieldName: accessControlRole.meta({
|
|
63210
|
+
description: "Role field name",
|
|
63211
|
+
examples: ["admin", "tokenManager", "complianceManager"]
|
|
63212
|
+
}),
|
|
63213
|
+
adminRole: ethereumHex.meta({
|
|
63214
|
+
description: "Admin role identifier (bytes32)",
|
|
63215
|
+
examples: ["0x0000000000000000000000000000000000000000000000000000000000000000"]
|
|
63216
|
+
}),
|
|
63217
|
+
adminFieldName: accessControlRole.meta({
|
|
63218
|
+
description: "Admin role field name",
|
|
63219
|
+
examples: ["admin", "systemManager"]
|
|
63220
|
+
})
|
|
63221
|
+
});
|
|
63222
|
+
var AccessControlSchema = z6.object({
|
|
63223
|
+
id: ethereumAddress.meta({
|
|
63224
|
+
description: "Access control contract address",
|
|
63225
|
+
examples: ["0x71C7656EC7ab88b098defB751B7401B5f6d8976F"]
|
|
63226
|
+
}),
|
|
63227
|
+
addonManager: v1FrozenRequired(accountArray().default([]).meta({
|
|
63228
|
+
description: "Accounts with addon manager role. Frozen v1-compat role — always empty.",
|
|
63229
|
+
examples: [[]]
|
|
63230
|
+
}), { required: true }),
|
|
63231
|
+
addonModule: accountArray().meta({
|
|
63232
|
+
description: "Accounts with addon module role",
|
|
63233
|
+
examples: [[]]
|
|
63234
|
+
}),
|
|
63235
|
+
addonRegistryModule: accountArray().meta({
|
|
63236
|
+
description: "Accounts with addon registry module role",
|
|
63237
|
+
examples: [[]]
|
|
63238
|
+
}),
|
|
63239
|
+
admin: accountArray().meta({
|
|
63240
|
+
description: "Accounts with admin role",
|
|
63241
|
+
examples: [
|
|
63242
|
+
[
|
|
63243
|
+
{
|
|
63244
|
+
id: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F",
|
|
63245
|
+
isContract: false
|
|
63246
|
+
}
|
|
63247
|
+
]
|
|
63248
|
+
]
|
|
63249
|
+
}),
|
|
63250
|
+
auditor: accountArray().meta({
|
|
63251
|
+
description: "Accounts with auditor role",
|
|
63252
|
+
examples: [[]]
|
|
63253
|
+
}),
|
|
63254
|
+
claimPolicyManager: accountArray().meta({
|
|
63255
|
+
description: "Accounts with claim policy manager role",
|
|
63256
|
+
examples: [[]]
|
|
63257
|
+
}),
|
|
63258
|
+
claimIssuer: accountArray().meta({
|
|
63259
|
+
description: "Accounts with claim issuer role",
|
|
63260
|
+
examples: [[]]
|
|
63261
|
+
}),
|
|
63262
|
+
complianceManager: accountArray().meta({
|
|
63263
|
+
description: "Accounts with compliance manager role",
|
|
63264
|
+
examples: [[]]
|
|
63265
|
+
}),
|
|
63266
|
+
custodian: accountArray().meta({
|
|
63267
|
+
description: "Accounts with custodian role",
|
|
63268
|
+
examples: [[]]
|
|
63269
|
+
}),
|
|
63270
|
+
emergency: accountArray().meta({
|
|
63271
|
+
description: "Accounts with emergency role",
|
|
63272
|
+
examples: [[]]
|
|
63273
|
+
}),
|
|
63274
|
+
feedsManager: accountArray().meta({
|
|
63275
|
+
description: "Accounts with feeds manager role",
|
|
63276
|
+
examples: [[]]
|
|
63277
|
+
}),
|
|
63278
|
+
fundsManager: accountArray().meta({
|
|
63279
|
+
description: "Accounts with funds manager role",
|
|
63280
|
+
examples: [[]]
|
|
63281
|
+
}),
|
|
63282
|
+
gasManager: accountArray().meta({
|
|
63283
|
+
description: "Accounts with gas manager role",
|
|
63284
|
+
examples: [[]]
|
|
63285
|
+
}),
|
|
63286
|
+
governance: accountArray().meta({
|
|
63287
|
+
description: "Accounts with governance role",
|
|
63288
|
+
examples: [[]]
|
|
63289
|
+
}),
|
|
63290
|
+
identityManager: accountArray().meta({
|
|
63291
|
+
description: "Accounts with identity manager role",
|
|
63292
|
+
examples: [[]]
|
|
63293
|
+
}),
|
|
63294
|
+
identityRegistryModule: accountArray().meta({
|
|
63295
|
+
description: "Accounts with identity registry module role",
|
|
63296
|
+
examples: [[]]
|
|
63297
|
+
}),
|
|
63298
|
+
organisationIdentityManager: accountArray().meta({
|
|
63299
|
+
description: "Accounts with organisation identity manager role",
|
|
63300
|
+
examples: [[]]
|
|
63301
|
+
}),
|
|
63302
|
+
saleAdmin: accountArray().meta({
|
|
63303
|
+
description: "Accounts with sale admin role",
|
|
63304
|
+
examples: [[]]
|
|
63305
|
+
}),
|
|
63306
|
+
supplyManagement: accountArray().meta({
|
|
63307
|
+
description: "Accounts with supply management role",
|
|
63308
|
+
examples: [[]]
|
|
63309
|
+
}),
|
|
63310
|
+
systemManager: accountArray().meta({
|
|
63311
|
+
description: "Accounts with system manager role",
|
|
63312
|
+
examples: [[]]
|
|
63313
|
+
}),
|
|
63314
|
+
systemModule: accountArray().meta({
|
|
63315
|
+
description: "Accounts with system module role",
|
|
63316
|
+
examples: [[]]
|
|
63317
|
+
}),
|
|
63318
|
+
tokenFactoryModule: accountArray().meta({
|
|
63319
|
+
description: "Accounts with token factory module role",
|
|
63320
|
+
examples: [[]]
|
|
63321
|
+
}),
|
|
63322
|
+
tokenFactoryRegistryModule: accountArray().meta({
|
|
63323
|
+
description: "Accounts with token factory registry module role",
|
|
63324
|
+
examples: [[]]
|
|
63325
|
+
}),
|
|
63326
|
+
tokenManager: accountArray().meta({
|
|
63327
|
+
description: "Accounts with token manager role",
|
|
63328
|
+
examples: [[]]
|
|
63329
|
+
}),
|
|
63330
|
+
trustedIssuersMetaRegistryModule: accountArray().meta({
|
|
63331
|
+
description: "Accounts with trusted issuers meta registry module role",
|
|
63332
|
+
examples: [[]]
|
|
63333
|
+
}),
|
|
63334
|
+
roleAdmins: z6.array(roleAdminSchema).meta({
|
|
63335
|
+
description: "Admin role mapping per access control role",
|
|
63336
|
+
examples: [[]]
|
|
63337
|
+
}).default([])
|
|
63338
|
+
});
|
|
63339
|
+
var accessControlSchema = () => AccessControlSchema;
|
|
63340
|
+
|
|
63341
|
+
// ../../packages/core/validation/src/role-requirement.ts
|
|
63342
|
+
var RoleRequirementSchema = z7.lazy(() => z7.union([
|
|
63343
|
+
z7.string(),
|
|
63344
|
+
z7.object({
|
|
63345
|
+
any: z7.array(RoleRequirementSchema)
|
|
63346
|
+
}),
|
|
63347
|
+
z7.object({
|
|
63348
|
+
all: z7.array(RoleRequirementSchema)
|
|
63030
63349
|
})
|
|
63031
63350
|
]));
|
|
63032
63351
|
|
|
63033
63352
|
// ../../packages/core/validation/src/asset-type-template-features.ts
|
|
63034
|
-
import { z as
|
|
63353
|
+
import { z as z8 } from "zod";
|
|
63035
63354
|
|
|
63036
63355
|
// ../../packages/core/validation/src/addon-registry.ts
|
|
63037
63356
|
var addonFunctionalCategoryIds = [
|
|
@@ -63271,8 +63590,8 @@ var addonIds = [
|
|
|
63271
63590
|
"price-resolver",
|
|
63272
63591
|
"paymaster-signer"
|
|
63273
63592
|
];
|
|
63274
|
-
var tokenFeatureIdSchema =
|
|
63275
|
-
var addonIdSchema =
|
|
63593
|
+
var tokenFeatureIdSchema = z8.enum(tokenFeatureIds);
|
|
63594
|
+
var addonIdSchema = z8.enum(addonIds);
|
|
63276
63595
|
var tokenFeatureIdSet = new Set(tokenFeatureIds);
|
|
63277
63596
|
function isTokenFeatureId(value) {
|
|
63278
63597
|
return tokenFeatureIdSet.has(value);
|
|
@@ -63282,29 +63601,10 @@ var INCOMPATIBLE_FEATURE_PAIRS = Object.freeze([
|
|
|
63282
63601
|
["transaction-fee", "transaction-fee-accounting"]
|
|
63283
63602
|
]);
|
|
63284
63603
|
|
|
63285
|
-
// ../../packages/core/validation/src/ethereum-address.ts
|
|
63286
|
-
import { getAddress, isAddress, zeroAddress } from "viem";
|
|
63287
|
-
import { z as z5 } from "zod";
|
|
63288
|
-
var ethereumAddress = z5.string().meta({
|
|
63289
|
-
description: "A valid Ethereum address (42 characters, starting with 0x)",
|
|
63290
|
-
examples: ["0x71C7656EC7ab88b098defB751B7401B5f6d8976F"]
|
|
63291
|
-
}).min(42, "Ethereum address must be at least 42 characters long").max(42, "Ethereum address must be at most 42 characters long").regex(/^0x[a-fA-F0-9]{40}$/, "Ethereum address must start with 0x followed by 40 hexadecimal characters").transform((value, ctx) => {
|
|
63292
|
-
if (!isAddress(value)) {
|
|
63293
|
-
ctx.addIssue({
|
|
63294
|
-
code: z5.ZodIssueCode.custom,
|
|
63295
|
-
message: "Invalid Ethereum address format or checksum"
|
|
63296
|
-
});
|
|
63297
|
-
return z5.NEVER;
|
|
63298
|
-
}
|
|
63299
|
-
return getAddress(value);
|
|
63300
|
-
});
|
|
63301
|
-
var nonZeroEthereumAddress = ethereumAddress.refine((address) => address !== zeroAddress, "Fee recipient cannot be the zero address");
|
|
63302
|
-
var lowercaseEthereumAddress = ethereumAddress.transform((value) => value.toLowerCase());
|
|
63303
|
-
|
|
63304
63604
|
// ../../packages/core/validation/src/timestamp.ts
|
|
63305
63605
|
import { getUnixTime } from "date-fns";
|
|
63306
|
-
import { z as
|
|
63307
|
-
var TimestampSchema =
|
|
63606
|
+
import { z as z9 } from "zod";
|
|
63607
|
+
var TimestampSchema = z9.preprocess((value) => {
|
|
63308
63608
|
if (value instanceof Date) {
|
|
63309
63609
|
return value;
|
|
63310
63610
|
}
|
|
@@ -63342,66 +63642,66 @@ var TimestampSchema = z6.preprocess((value) => {
|
|
|
63342
63642
|
return new Date(value);
|
|
63343
63643
|
}
|
|
63344
63644
|
return value;
|
|
63345
|
-
},
|
|
63645
|
+
}, z9.date()).meta({
|
|
63346
63646
|
description: "A timestamp in various formats",
|
|
63347
63647
|
examples: ["2023-04-01T12:00:00Z", 1680354000, "1680354000000"]
|
|
63348
63648
|
});
|
|
63349
63649
|
var timestamp = () => TimestampSchema;
|
|
63350
63650
|
|
|
63351
63651
|
// ../../packages/dalp/api-contract/src/custom-error-data-schemas.ts
|
|
63352
|
-
import { z as
|
|
63652
|
+
import { z as z10 } from "zod";
|
|
63353
63653
|
var dapiPublicErrorBaseDataSchema = DALP_ORPC_ERROR_DATA_BASE_SCHEMA.omit({ requestId: true }).partial();
|
|
63354
63654
|
function dapiPublicErrorDataSchema(shape) {
|
|
63355
63655
|
return dapiPublicErrorBaseDataSchema.extend(shape);
|
|
63356
63656
|
}
|
|
63357
63657
|
var retryAfterDataSchema = dapiPublicErrorDataSchema({
|
|
63358
|
-
retryAfterSeconds:
|
|
63658
|
+
retryAfterSeconds: z10.number().int().positive()
|
|
63359
63659
|
}).optional();
|
|
63360
|
-
var dapiErrorContextDataSchema =
|
|
63660
|
+
var dapiErrorContextDataSchema = z10.record(z10.string(), z10.unknown()).optional();
|
|
63361
63661
|
var CUSTOM_ERROR_DATA_SCHEMAS = {
|
|
63362
63662
|
AA_ENABLED_CONTROLLER_MISMATCH: dapiErrorContextDataSchema,
|
|
63363
63663
|
AA_ENABLED_DRIFT_REQUIRES_ADMIN: dapiPublicErrorDataSchema({
|
|
63364
|
-
count:
|
|
63365
|
-
addresses:
|
|
63664
|
+
count: z10.number(),
|
|
63665
|
+
addresses: z10.string()
|
|
63366
63666
|
}),
|
|
63367
63667
|
AA_ENABLED_IDENTITY_MISMATCH: dapiErrorContextDataSchema,
|
|
63368
63668
|
AA_ENABLED_IDENTITY_SYNC_FORBIDDEN: dapiPublicErrorDataSchema({
|
|
63369
63669
|
address: ethereumAddress,
|
|
63370
|
-
missingRoles:
|
|
63670
|
+
missingRoles: z10.array(z10.string())
|
|
63371
63671
|
}),
|
|
63372
63672
|
ADDON_NOT_INSTALLED: dapiPublicErrorDataSchema({
|
|
63373
|
-
missingCapability:
|
|
63374
|
-
typeId:
|
|
63673
|
+
missingCapability: z10.string(),
|
|
63674
|
+
typeId: z10.string()
|
|
63375
63675
|
}),
|
|
63376
63676
|
CHAIN_NOT_AVAILABLE_FOR_ORGANIZATION: dapiPublicErrorDataSchema({
|
|
63377
|
-
chainId:
|
|
63677
|
+
chainId: z10.number().int().positive()
|
|
63378
63678
|
}),
|
|
63379
63679
|
CHAIN_NOT_READY: dapiPublicErrorDataSchema({
|
|
63380
|
-
chainId:
|
|
63381
|
-
chainStatus:
|
|
63680
|
+
chainId: z10.number().int().positive(),
|
|
63681
|
+
chainStatus: z10.enum(["pending", "deploying", "failed", "disabled"])
|
|
63382
63682
|
}),
|
|
63383
63683
|
CONFIRMATION_TIMEOUT: dapiPublicErrorDataSchema({
|
|
63384
|
-
transactionHash:
|
|
63385
|
-
details:
|
|
63684
|
+
transactionHash: z10.string(),
|
|
63685
|
+
details: z10.string().optional()
|
|
63386
63686
|
}),
|
|
63387
63687
|
CONTRACT_ERROR: dapiPublicErrorDataSchema({
|
|
63388
|
-
dalpCode:
|
|
63389
|
-
message:
|
|
63390
|
-
id:
|
|
63391
|
-
category:
|
|
63392
|
-
why:
|
|
63393
|
-
fix:
|
|
63394
|
-
suggestedAction:
|
|
63395
|
-
retryable:
|
|
63396
|
-
selector:
|
|
63397
|
-
solidityError:
|
|
63398
|
-
args:
|
|
63399
|
-
correlationId:
|
|
63400
|
-
requestId:
|
|
63688
|
+
dalpCode: z10.string(),
|
|
63689
|
+
message: z10.string(),
|
|
63690
|
+
id: z10.string().optional(),
|
|
63691
|
+
category: z10.string().optional(),
|
|
63692
|
+
why: z10.string().optional(),
|
|
63693
|
+
fix: z10.string().optional(),
|
|
63694
|
+
suggestedAction: z10.string().optional(),
|
|
63695
|
+
retryable: z10.boolean(),
|
|
63696
|
+
selector: z10.string(),
|
|
63697
|
+
solidityError: z10.string(),
|
|
63698
|
+
args: z10.record(z10.string(), z10.string()).optional(),
|
|
63699
|
+
correlationId: z10.string().optional(),
|
|
63700
|
+
requestId: z10.string().optional()
|
|
63401
63701
|
}),
|
|
63402
63702
|
CORE_ARRAY_EMPTY: dapiErrorContextDataSchema,
|
|
63403
63703
|
CUSTODY_CREDENTIALS_INVALID: dapiPublicErrorDataSchema({
|
|
63404
|
-
reason:
|
|
63704
|
+
reason: z10.string().optional()
|
|
63405
63705
|
}).optional(),
|
|
63406
63706
|
CUSTODY_CONFIG_NOT_FOUND: dapiErrorContextDataSchema,
|
|
63407
63707
|
CUSTODY_CREDENTIALS_UNAVAILABLE: dapiErrorContextDataSchema,
|
|
@@ -63418,29 +63718,29 @@ var CUSTOM_ERROR_DATA_SCHEMAS = {
|
|
|
63418
63718
|
CORE_UNWRAP_SYNC_QUEUE_EXECUTION_RETURNED_NO_DATA_READRESULT_CALLBACK_REQUIRED: dapiErrorContextDataSchema,
|
|
63419
63719
|
ERC20_METADATA_PROBE_UNAVAILABLE: retryAfterDataSchema,
|
|
63420
63720
|
FEATURE_NOT_ENABLED: dapiPublicErrorDataSchema({
|
|
63421
|
-
requiredFeature:
|
|
63721
|
+
requiredFeature: z10.string()
|
|
63422
63722
|
}),
|
|
63423
63723
|
GAS_REQUIRED: dapiPublicErrorDataSchema({
|
|
63424
|
-
shortfallWei:
|
|
63425
|
-
recommendedTotalWei:
|
|
63724
|
+
shortfallWei: z10.string().regex(/^\d+$/, "wei amount must be a non-negative integer string"),
|
|
63725
|
+
recommendedTotalWei: z10.string().regex(/^\d+$/, "wei amount must be a non-negative integer string"),
|
|
63426
63726
|
address: ethereumAddress,
|
|
63427
|
-
chainId:
|
|
63428
|
-
tokenSymbol:
|
|
63429
|
-
walletRole:
|
|
63430
|
-
retryableByFunding:
|
|
63727
|
+
chainId: z10.number().int().positive(),
|
|
63728
|
+
tokenSymbol: z10.string().min(1),
|
|
63729
|
+
walletRole: z10.string().min(1),
|
|
63730
|
+
retryableByFunding: z10.boolean()
|
|
63431
63731
|
}),
|
|
63432
63732
|
IDEMPOTENCY_KEY_INFLIGHT: retryAfterDataSchema,
|
|
63433
63733
|
IDENTITY_RECOVERY_FACTORY_ADDRESS_NOT_FOUND_USER_S_INDICATES_DATA_INTEGRITY_ISSUE_INDEXER: dapiErrorContextDataSchema,
|
|
63434
63734
|
INDEXER_REINDEXING: retryAfterDataSchema,
|
|
63435
63735
|
INPUT_VALIDATION_FAILED: dapiPublicErrorDataSchema({
|
|
63436
|
-
errors:
|
|
63736
|
+
errors: z10.array(z10.string())
|
|
63437
63737
|
}),
|
|
63438
63738
|
INSUFFICIENT_TREASURY_ALLOWANCE: dapiPublicErrorDataSchema({
|
|
63439
|
-
allowance:
|
|
63440
|
-
required:
|
|
63441
|
-
denominationAsset:
|
|
63442
|
-
feature:
|
|
63443
|
-
treasury:
|
|
63739
|
+
allowance: z10.string(),
|
|
63740
|
+
required: z10.string(),
|
|
63741
|
+
denominationAsset: z10.string(),
|
|
63742
|
+
feature: z10.string(),
|
|
63743
|
+
treasury: z10.string()
|
|
63444
63744
|
}),
|
|
63445
63745
|
TOKEN_MINT_MATURITY_REDEMPTION_MATURED: dapiPublicErrorDataSchema({
|
|
63446
63746
|
tokenAddress: ethereumAddress
|
|
@@ -63449,25 +63749,25 @@ var CUSTOM_ERROR_DATA_SCHEMAS = {
|
|
|
63449
63749
|
maturityDate: timestamp().meta({
|
|
63450
63750
|
description: "Configured maturity date the redemption preflight gates on; emitted as ISO-8601 UTC."
|
|
63451
63751
|
}),
|
|
63452
|
-
feature:
|
|
63752
|
+
feature: z10.string()
|
|
63453
63753
|
}),
|
|
63454
63754
|
MIGRATION_STREAM_WORKFLOW_FAILED: dapiPublicErrorDataSchema({
|
|
63455
|
-
reason:
|
|
63755
|
+
reason: z10.string()
|
|
63456
63756
|
}),
|
|
63457
63757
|
RESTATE_WORKFLOW_RETRY_BLOCKED: dapiPublicErrorDataSchema({
|
|
63458
|
-
reason:
|
|
63459
|
-
invocationIds:
|
|
63758
|
+
reason: z10.enum(["active-invocation", "already-succeeded", "purge-failed", "query-failed"]),
|
|
63759
|
+
invocationIds: z10.array(z10.string())
|
|
63460
63760
|
}),
|
|
63461
63761
|
SERVICE_UNAVAILABLE: dapiPublicErrorDataSchema({
|
|
63462
|
-
retryAfterSeconds:
|
|
63762
|
+
retryAfterSeconds: z10.number().optional()
|
|
63463
63763
|
}),
|
|
63464
63764
|
SETTINGS_ASSET_FAILED_TO_CREATE_CLASS_DEFINITION_DATABASE_CONNECTIVITY: dapiErrorContextDataSchema,
|
|
63465
63765
|
SETTINGS_ASSET_FAILED_TO_CREATE_TYPE_TEMPLATE_DATABASE_CONNECTIVITY_NAME_UNIQUE: dapiErrorContextDataSchema,
|
|
63466
63766
|
SETTINGS_ASSET_TEMPLATE_FEATURES_INCOMPATIBLE: dapiPublicErrorDataSchema({
|
|
63467
|
-
conflictingPairs:
|
|
63767
|
+
conflictingPairs: z10.array(z10.tuple([tokenFeatureIdSchema, tokenFeatureIdSchema]))
|
|
63468
63768
|
}),
|
|
63469
63769
|
SETTINGS_COMPLIANCE_TEMPLATE_INCOMPATIBLE_MODULE_SET: dapiPublicErrorDataSchema({
|
|
63470
|
-
typeIds:
|
|
63770
|
+
typeIds: z10.array(z10.string())
|
|
63471
63771
|
}),
|
|
63472
63772
|
SETTINGS_THEME_PAYLOAD_EXCEEDS_SUPPORTED_LIMITS: dapiErrorContextDataSchema,
|
|
63473
63773
|
SMART_WALLETS_APPROVAL_WORKFLOW_COMPLETED_WITHOUT_ENOUGH_DATA_BUILD_RESPONSE: dapiErrorContextDataSchema,
|
|
@@ -63492,16 +63792,16 @@ var CUSTOM_ERROR_DATA_SCHEMAS = {
|
|
|
63492
63792
|
SYSTEM_IDENTITY_NO_ACTIVE_CLAIM_FOUND_TOPIC: dapiErrorContextDataSchema,
|
|
63493
63793
|
SYSTEM_IDENTITY_TOPIC_CLAIM_MUST_MATCH_APPROVED_KYC_CONTENT_HASH: dapiErrorContextDataSchema,
|
|
63494
63794
|
SYSTEM_IDENTITY_TOPIC_REQUIRES_APPROVED_KYC_PROFILE_TARGET: dapiPublicErrorDataSchema({
|
|
63495
|
-
topic:
|
|
63795
|
+
topic: z10.string()
|
|
63496
63796
|
}),
|
|
63497
63797
|
SYSTEM_IDENTITY_TOPIC_REQUIRES_SINGLE_CLAIM_NOT_ARRAY_STRUCTURED_DATA: dapiErrorContextDataSchema,
|
|
63498
63798
|
SYSTEM_IDENTITY_UNEXPECTED_CLAIM_MISSING_VALIDATION: dapiErrorContextDataSchema,
|
|
63499
63799
|
SYSTEM_TRUSTED_ISSUER_ADD_REMOVE_CLAIM_TOPIC_ROUTES_SYNC_ONLY_PREFER_RESPOND_ASYNC_NOT_SUP: dapiErrorContextDataSchema,
|
|
63500
63800
|
TARGET_CURRENCIES_REMOVAL_FORBIDDEN: dapiPublicErrorDataSchema({
|
|
63501
|
-
removed:
|
|
63801
|
+
removed: z10.array(z10.string())
|
|
63502
63802
|
}),
|
|
63503
63803
|
TARGET_CURRENCY_NOT_SUPPORTED: dapiPublicErrorDataSchema({
|
|
63504
|
-
unsupported:
|
|
63804
|
+
unsupported: z10.array(z10.string())
|
|
63505
63805
|
}),
|
|
63506
63806
|
TOKEN_CLAIM_ACCOUNT_ADDRESS_DOES_NOT_ASSOCIATED_IDENTITY_CONTRACT_ONLY_USERS_CAN_ISSUE_CLA: dapiErrorContextDataSchema,
|
|
63507
63807
|
TOKEN_CLAIM_ACCOUNT_ADDRESS_DOES_NOT_ASSOCIATED_IDENTITY_CONTRACT_ONLY_USERS_CAN_REVOKE_CL: dapiErrorContextDataSchema,
|
|
@@ -63510,11 +63810,11 @@ var CUSTOM_ERROR_DATA_SCHEMAS = {
|
|
|
63510
63810
|
TOKEN_CLAIM_TOPIC_NOT_REGISTERED_SCHEME_REGISTRY: dapiErrorContextDataSchema,
|
|
63511
63811
|
TOKEN_CREATE_DATABASE_CONTEXT_REQUIRED_DALP_ASSET_CREATION: dapiErrorContextDataSchema,
|
|
63512
63812
|
TOKEN_CREATE_FEATURES_INCOMPATIBLE: dapiPublicErrorDataSchema({
|
|
63513
|
-
conflictingPairs:
|
|
63813
|
+
conflictingPairs: z10.array(z10.tuple([tokenFeatureIdSchema, tokenFeatureIdSchema]))
|
|
63514
63814
|
}),
|
|
63515
63815
|
TOKEN_CREATE_WORKFLOW_PHASE_FAILED: dapiPublicErrorDataSchema({
|
|
63516
|
-
phase:
|
|
63517
|
-
error:
|
|
63816
|
+
phase: z10.string(),
|
|
63817
|
+
error: z10.string().optional()
|
|
63518
63818
|
}),
|
|
63519
63819
|
TOKEN_FEATURES_NO_YIELD_AVAILABLE_CLAIM_FIRST_PERIOD_NOT_COMPLETED_YET: dapiErrorContextDataSchema,
|
|
63520
63820
|
TOKEN_FEATURES_NO_YIELD_AVAILABLE_FOR_HOLDER: dapiErrorContextDataSchema,
|
|
@@ -63529,17 +63829,17 @@ var CUSTOM_ERROR_DATA_SCHEMAS = {
|
|
|
63529
63829
|
TOKEN_INDEXED_PRICERESOLVER_REGISTRATION_MISSING_VALID_INITIALIZATION_CALLDATA: dapiErrorContextDataSchema,
|
|
63530
63830
|
TOKEN_INDEXER_DATA_INVALID: dapiErrorContextDataSchema,
|
|
63531
63831
|
TOKEN_INTERFACE_NOT_SUPPORTED: dapiPublicErrorDataSchema({
|
|
63532
|
-
requiredInterfaces:
|
|
63832
|
+
requiredInterfaces: z10.array(z10.string())
|
|
63533
63833
|
}),
|
|
63534
63834
|
TOKEN_LIST_METADATA_KEY_IDENTIFIER_INELIGIBLE: dapiPublicErrorDataSchema({
|
|
63535
|
-
key:
|
|
63835
|
+
key: z10.string()
|
|
63536
63836
|
}),
|
|
63537
63837
|
TOKEN_LIST_METADATA_KEY_NOT_BUCKETABLE: dapiPublicErrorDataSchema({
|
|
63538
|
-
key:
|
|
63838
|
+
key: z10.string()
|
|
63539
63839
|
}),
|
|
63540
63840
|
TOKEN_LIST_METADATA_KEY_UNKNOWN: dapiPublicErrorDataSchema({
|
|
63541
|
-
key:
|
|
63542
|
-
availableKeys:
|
|
63841
|
+
key: z10.string(),
|
|
63842
|
+
availableKeys: z10.array(z10.string())
|
|
63543
63843
|
}),
|
|
63544
63844
|
TOKEN_REDEEM_BOND_MATURITY_REDEMPTION_FEATURE_ATTACHED_LEGACY_TOP_UP_WOULD_NOT_FUND_CONFIG: dapiErrorContextDataSchema,
|
|
63545
63845
|
TOKEN_REDEEM_BOND_NOT_YET_INDEXED_INDEXER_PROCESSED_INITIALIZATION_PLEASE_LATER: dapiErrorContextDataSchema,
|
|
@@ -63550,7 +63850,7 @@ var CUSTOM_ERROR_DATA_SCHEMAS = {
|
|
|
63550
63850
|
USER_KYC_NO_VERSION_CLONE_INITIALDATA_NEW_USERS: dapiErrorContextDataSchema,
|
|
63551
63851
|
USER_KYC_SOURCE_VERSION_NOT_FOUND_INITIALDATA_NEW_USERS: dapiErrorContextDataSchema,
|
|
63552
63852
|
USER_NOT_AUTHORIZED: dapiPublicErrorDataSchema({
|
|
63553
|
-
requiredRoles:
|
|
63853
|
+
requiredRoles: z10.union([z10.string(), z10.array(z10.string()), RoleRequirementSchema])
|
|
63554
63854
|
}),
|
|
63555
63855
|
WEBHOOK_REPLAY_RATE_LIMITED: retryAfterDataSchema
|
|
63556
63856
|
};
|
|
@@ -67932,7 +68232,7 @@ var CUSTOM_ERRORS = {
|
|
|
67932
68232
|
},
|
|
67933
68233
|
USER_NOT_AUTHORIZED: {
|
|
67934
68234
|
status: 403,
|
|
67935
|
-
message: "
|
|
68235
|
+
message: "This action requires a role the acting wallet does not hold.",
|
|
67936
68236
|
data: CUSTOM_ERROR_DATA_SCHEMAS.USER_NOT_AUTHORIZED
|
|
67937
68237
|
},
|
|
67938
68238
|
USER_NOT_FOUND: {
|
|
@@ -68133,23 +68433,23 @@ var v2Contract = baseContract.$route({
|
|
|
68133
68433
|
});
|
|
68134
68434
|
|
|
68135
68435
|
// ../../packages/dalp/api-contract/src/routes/account/routes/account.search.schema.ts
|
|
68136
|
-
import { z as
|
|
68137
|
-
var AccountSearchGraphResponseSchema =
|
|
68138
|
-
account:
|
|
68436
|
+
import { z as z11 } from "zod";
|
|
68437
|
+
var AccountSearchGraphResponseSchema = z11.object({
|
|
68438
|
+
account: z11.object({
|
|
68139
68439
|
id: ethereumAddress,
|
|
68140
|
-
isContract:
|
|
68141
|
-
contractName:
|
|
68440
|
+
isContract: z11.boolean(),
|
|
68441
|
+
contractName: z11.string().nullable().optional()
|
|
68142
68442
|
}).nullable()
|
|
68143
68443
|
});
|
|
68144
|
-
var AccountSearchInputSchema =
|
|
68145
|
-
query:
|
|
68146
|
-
limit:
|
|
68444
|
+
var AccountSearchInputSchema = z11.object({
|
|
68445
|
+
query: z11.string().min(1).meta({ description: "Search query for account address", examples: ["0x71C7", "alice.eth"] }),
|
|
68446
|
+
limit: z11.number().int().positive().max(50).default(10)
|
|
68147
68447
|
});
|
|
68148
|
-
var AccountSearchResultSchema =
|
|
68448
|
+
var AccountSearchResultSchema = z11.object({
|
|
68149
68449
|
id: ethereumAddress,
|
|
68150
|
-
isContract:
|
|
68151
|
-
contractName:
|
|
68152
|
-
displayName:
|
|
68450
|
+
isContract: z11.boolean().optional().default(false).meta({ description: "Whether the account is a contract", examples: [true, false] }),
|
|
68451
|
+
contractName: z11.string().optional().meta({ description: "The name of the contract", examples: ["MyToken", "BondFactory"] }),
|
|
68452
|
+
displayName: z11.string().optional().meta({ description: "The display name of the account", examples: ["Alice", "Treasury"] })
|
|
68153
68453
|
});
|
|
68154
68454
|
|
|
68155
68455
|
// ../../packages/dalp/api-contract/src/tag-registry.ts
|
|
@@ -68606,10 +68906,10 @@ var accountSearchContract = v1Contract.route({
|
|
|
68606
68906
|
}).input(AccountSearchInputSchema).output(AccountSearchResultSchema.array());
|
|
68607
68907
|
|
|
68608
68908
|
// ../../packages/dalp/api-contract/src/routes/actions/routes/actions.list.schema.ts
|
|
68609
|
-
import { z as
|
|
68610
|
-
var ActionStatusSchema =
|
|
68611
|
-
var ActionSourceSchema =
|
|
68612
|
-
var ActionTypeSchema =
|
|
68909
|
+
import { z as z12 } from "zod";
|
|
68910
|
+
var ActionStatusSchema = z12.enum(["PENDING", "UPCOMING", "EXECUTED", "EXPIRED"]);
|
|
68911
|
+
var ActionSourceSchema = z12.enum(["on-chain", "off-chain"]);
|
|
68912
|
+
var ActionTypeSchema = z12.enum([
|
|
68613
68913
|
"MatureBond",
|
|
68614
68914
|
"RedeemBond",
|
|
68615
68915
|
"ClaimYield",
|
|
@@ -68624,26 +68924,26 @@ var ActionTypeSchema = z9.enum([
|
|
|
68624
68924
|
"CastPollBallot",
|
|
68625
68925
|
"ActivateVotingPower"
|
|
68626
68926
|
]);
|
|
68627
|
-
var KycActionMetadataSchema =
|
|
68628
|
-
reason:
|
|
68927
|
+
var KycActionMetadataSchema = z12.object({
|
|
68928
|
+
reason: z12.string().meta({
|
|
68629
68929
|
description: "Reason for the update request",
|
|
68630
68930
|
examples: ["Address change required", "Document expired"]
|
|
68631
68931
|
}),
|
|
68632
|
-
requiredFields:
|
|
68932
|
+
requiredFields: z12.array(z12.string()).meta({
|
|
68633
68933
|
description: "List of fields that need updating",
|
|
68634
68934
|
examples: [["address", "phone"], ["passport"]]
|
|
68635
68935
|
}),
|
|
68636
|
-
sourceVersionId:
|
|
68936
|
+
sourceVersionId: z12.string().meta({
|
|
68637
68937
|
description: "ID of the version to clone data from when creating draft",
|
|
68638
68938
|
examples: ["ver-001", "ver-002"]
|
|
68639
68939
|
}),
|
|
68640
|
-
requestId:
|
|
68940
|
+
requestId: z12.string().meta({
|
|
68641
68941
|
description: "ID of the KYC action request",
|
|
68642
68942
|
examples: ["req-001", "req-002"]
|
|
68643
68943
|
})
|
|
68644
68944
|
});
|
|
68645
|
-
var MultisigActionMetadataSchema =
|
|
68646
|
-
userOpHash:
|
|
68945
|
+
var MultisigActionMetadataSchema = z12.object({
|
|
68946
|
+
userOpHash: z12.string().meta({
|
|
68647
68947
|
description: "UserOperation hash — needed to call POST /sign endpoint",
|
|
68648
68948
|
examples: ["0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"]
|
|
68649
68949
|
}),
|
|
@@ -68651,61 +68951,61 @@ var MultisigActionMetadataSchema = z9.object({
|
|
|
68651
68951
|
description: "Smart wallet address — needed to build the sign URL",
|
|
68652
68952
|
examples: ["0x71C7656EC7ab88b098defB751B7401B5f6d8976F"]
|
|
68653
68953
|
}),
|
|
68654
|
-
threshold:
|
|
68954
|
+
threshold: z12.string().meta({
|
|
68655
68955
|
description: "Required cumulative weight (bigint as decimal string)",
|
|
68656
68956
|
examples: ["2"]
|
|
68657
68957
|
}),
|
|
68658
|
-
currentWeight:
|
|
68958
|
+
currentWeight: z12.string().meta({
|
|
68659
68959
|
description: "Current accumulated weight (bigint as decimal string)",
|
|
68660
68960
|
examples: ["1"]
|
|
68661
68961
|
}),
|
|
68662
|
-
description:
|
|
68962
|
+
description: z12.string().nullable().meta({
|
|
68663
68963
|
description: "Human-readable description of the pending operation",
|
|
68664
68964
|
examples: ["Add signer 0x1234...abcd", null]
|
|
68665
68965
|
}),
|
|
68666
|
-
operationKind:
|
|
68966
|
+
operationKind: z12.string().nullable().meta({
|
|
68667
68967
|
description: "Operation kind from the transaction queue (e.g., smart-wallet.add-signer)",
|
|
68668
68968
|
examples: ["smart-wallet.add-signer", null]
|
|
68669
68969
|
})
|
|
68670
68970
|
});
|
|
68671
|
-
var CustodyPendingActionMetadataSchema =
|
|
68672
|
-
provider:
|
|
68971
|
+
var CustodyPendingActionMetadataSchema = z12.object({
|
|
68972
|
+
provider: z12.string().meta({
|
|
68673
68973
|
description: "Custody provider backing this approval",
|
|
68674
68974
|
examples: ["luna", "dfns", "fireblocks"]
|
|
68675
68975
|
}),
|
|
68676
|
-
executable:
|
|
68976
|
+
executable: z12.boolean().meta({
|
|
68677
68977
|
description: "Whether the approval can be approved/denied in-app (true for DFNS/Fireblocks, false for out-of-band Luna)",
|
|
68678
68978
|
examples: [true, false]
|
|
68679
68979
|
}),
|
|
68680
|
-
approvalId:
|
|
68980
|
+
approvalId: z12.string().nullable().meta({
|
|
68681
68981
|
description: "Provider approval id passed to the resolve-approval route; null for out-of-band providers",
|
|
68682
68982
|
examples: ["appr-001", null]
|
|
68683
68983
|
}),
|
|
68684
|
-
transactionId:
|
|
68984
|
+
transactionId: z12.string().nullable().meta({
|
|
68685
68985
|
description: "transaction_request id this approval blocks, when known (out-of-band path)",
|
|
68686
68986
|
examples: ["019dce7d-4bd0-7daf-a42c-fcc222517fbb", null]
|
|
68687
68987
|
}),
|
|
68688
|
-
operationKind:
|
|
68988
|
+
operationKind: z12.string().nullable().meta({
|
|
68689
68989
|
description: "Human-readable operation kind awaiting approval",
|
|
68690
68990
|
examples: ["token.transfer", null]
|
|
68691
68991
|
})
|
|
68692
68992
|
});
|
|
68693
|
-
var GovernanceActionMetadataSchema =
|
|
68993
|
+
var GovernanceActionMetadataSchema = z12.object({
|
|
68694
68994
|
governorAddress: ethereumAddress.nullable().meta({
|
|
68695
68995
|
description: "Governor contract address the proposal lives on (null for poll actions)",
|
|
68696
68996
|
examples: ["0x71C7656EC7ab88b098defB751B7401B5f6d8976F", null]
|
|
68697
68997
|
}),
|
|
68698
|
-
proposalId:
|
|
68998
|
+
proposalId: z12.string().nullable().meta({
|
|
68699
68999
|
description: "On-chain proposal id — uint256 as a decimal string (null for poll actions)",
|
|
68700
69000
|
examples: ["12345678901234567890", null]
|
|
68701
69001
|
}),
|
|
68702
|
-
pollId:
|
|
69002
|
+
pollId: z12.string().nullable().meta({
|
|
68703
69003
|
description: "Off-chain poll id (null for on-chain governance actions)",
|
|
68704
69004
|
examples: ["019dce7d-4bd0-7daf-a42c-fcc222517fbb", null]
|
|
68705
69005
|
})
|
|
68706
69006
|
});
|
|
68707
|
-
var ActionSchema =
|
|
68708
|
-
id:
|
|
69007
|
+
var ActionSchema = z12.object({
|
|
69008
|
+
id: z12.string().meta({
|
|
68709
69009
|
description: "Unique identifier for the action",
|
|
68710
69010
|
examples: ["action-001", "action-002"]
|
|
68711
69011
|
}),
|
|
@@ -68713,7 +69013,7 @@ var ActionSchema = z9.object({
|
|
|
68713
69013
|
description: "Canonical action type used for filtering and execution",
|
|
68714
69014
|
examples: ["ApproveXvPSettlement", "UpdateKYCData"]
|
|
68715
69015
|
}),
|
|
68716
|
-
name:
|
|
69016
|
+
name: z12.string().meta({
|
|
68717
69017
|
description: "Human-readable display name of the action",
|
|
68718
69018
|
examples: ["Settlement approval for Series A", "KYC Update"]
|
|
68719
69019
|
}),
|
|
@@ -68763,17 +69063,17 @@ var ActionSchema = z9.object({
|
|
|
68763
69063
|
examples: [null]
|
|
68764
69064
|
})
|
|
68765
69065
|
});
|
|
68766
|
-
var ActionsListDataSchema =
|
|
68767
|
-
var ActionsListInputSchema =
|
|
69066
|
+
var ActionsListDataSchema = z12.array(ActionSchema);
|
|
69067
|
+
var ActionsListInputSchema = z12.object({
|
|
68768
69068
|
status: ActionStatusSchema.optional().meta({
|
|
68769
69069
|
description: "Filter actions by their current status",
|
|
68770
69070
|
examples: ["PENDING", "EXECUTED"]
|
|
68771
69071
|
}),
|
|
68772
|
-
targets:
|
|
69072
|
+
targets: z12.array(ethereumAddress).optional().meta({
|
|
68773
69073
|
description: "Filter actions by their target addresses",
|
|
68774
69074
|
examples: [["0x71C7656EC7ab88b098defB751B7401B5f6d8976F"]]
|
|
68775
69075
|
}),
|
|
68776
|
-
name:
|
|
69076
|
+
name: z12.string().optional().meta({
|
|
68777
69077
|
description: "Filter actions by their name",
|
|
68778
69078
|
examples: ["Transfer Approval", "KYC Update"]
|
|
68779
69079
|
}),
|
|
@@ -68782,12 +69082,12 @@ var ActionsListInputSchema = z9.object({
|
|
|
68782
69082
|
examples: ["ClaimYield", "ApproveXvPSettlement"]
|
|
68783
69083
|
})
|
|
68784
69084
|
});
|
|
68785
|
-
var ActionExecutorSchemaV1 =
|
|
68786
|
-
id:
|
|
69085
|
+
var ActionExecutorSchemaV1 = z12.object({
|
|
69086
|
+
id: z12.string().meta({
|
|
68787
69087
|
description: "Unique identifier for the action executor",
|
|
68788
69088
|
examples: ["exec-001", "exec-002"]
|
|
68789
69089
|
}),
|
|
68790
|
-
executors:
|
|
69090
|
+
executors: z12.array(ethereumAddress.nullable()).meta({
|
|
68791
69091
|
description: "List of addresses authorized to execute actions",
|
|
68792
69092
|
examples: [["0x71C7656EC7ab88b098defB751B7401B5f6d8976F"]]
|
|
68793
69093
|
})
|
|
@@ -68798,7 +69098,7 @@ var ActionSchemaV1 = ActionSchema.extend({
|
|
|
68798
69098
|
examples: [{ id: "exec-001", executors: ["0x71C7656EC7ab88b098defB751B7401B5f6d8976F"] }]
|
|
68799
69099
|
})
|
|
68800
69100
|
});
|
|
68801
|
-
var ActionsListResponseSchemaV1 =
|
|
69101
|
+
var ActionsListResponseSchemaV1 = z12.array(ActionSchemaV1);
|
|
68802
69102
|
|
|
68803
69103
|
// ../../packages/dalp/api-contract/src/routes/actions/actions.contract.ts
|
|
68804
69104
|
var list = v1Contract.route({
|
|
@@ -68810,47 +69110,47 @@ var list = v1Contract.route({
|
|
|
68810
69110
|
}).input(ActionsListInputSchema).output(ActionsListResponseSchemaV1);
|
|
68811
69111
|
|
|
68812
69112
|
// ../../packages/dalp/api-contract/src/routes/addons/fixed-yield-schedule/routes/fixed-yield-schedule.claim.schema.ts
|
|
68813
|
-
import { z as
|
|
69113
|
+
import { z as z18 } from "zod";
|
|
68814
69114
|
|
|
68815
69115
|
// ../../packages/dalp/api-contract/src/routes/common/schemas/mutation-output.schema.ts
|
|
68816
|
-
import { z as
|
|
68817
|
-
var BaseMutationOutputSchema =
|
|
68818
|
-
txHash:
|
|
69116
|
+
import { z as z13 } from "zod";
|
|
69117
|
+
var BaseMutationOutputSchema = z13.object({
|
|
69118
|
+
txHash: z13.string().meta({
|
|
68819
69119
|
description: "The transaction hash",
|
|
68820
69120
|
examples: ["0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"]
|
|
68821
69121
|
})
|
|
68822
69122
|
});
|
|
68823
69123
|
|
|
68824
69124
|
// ../../packages/dalp/api-contract/src/routes/addons/fixed-yield-schedule/schemas/fixed-yield-schedule.input.schema.ts
|
|
68825
|
-
import { z as
|
|
69125
|
+
import { z as z17 } from "zod";
|
|
68826
69126
|
|
|
68827
69127
|
// ../../packages/dalp/api-contract/src/routes/common/schemas/mutation.schema.ts
|
|
68828
|
-
import { z as
|
|
69128
|
+
import { z as z16 } from "zod";
|
|
68829
69129
|
|
|
68830
69130
|
// ../../packages/core/validation/src/verification-type.ts
|
|
68831
|
-
import { z as
|
|
69131
|
+
import { z as z14 } from "zod";
|
|
68832
69132
|
var verificationTypes = ["OTP", "PINCODE", "SECRET_CODES"];
|
|
68833
69133
|
var walletVerificationTypes = ["OTP", "PINCODE", "SECRET_CODES", "OIDC_MFA"];
|
|
68834
|
-
var verificationType =
|
|
69134
|
+
var verificationType = z14.enum(verificationTypes).meta({
|
|
68835
69135
|
description: "Type of verification",
|
|
68836
69136
|
examples: ["OTP", "PINCODE", "SECRET_CODES"]
|
|
68837
69137
|
});
|
|
68838
|
-
var walletVerificationType =
|
|
69138
|
+
var walletVerificationType = z14.enum(walletVerificationTypes).describe("Type of verification for wallet transactions");
|
|
68839
69139
|
|
|
68840
69140
|
// ../../packages/dalp/api-contract/src/routes/common/schemas/user-verification.schema.ts
|
|
68841
|
-
import { z as
|
|
68842
|
-
var UserVerificationSchema =
|
|
68843
|
-
secretVerificationCode:
|
|
69141
|
+
import { z as z15 } from "zod";
|
|
69142
|
+
var UserVerificationSchema = z15.object({
|
|
69143
|
+
secretVerificationCode: z15.string(),
|
|
68844
69144
|
verificationType: walletVerificationType.default("PINCODE")
|
|
68845
69145
|
});
|
|
68846
69146
|
|
|
68847
69147
|
// ../../packages/dalp/api-contract/src/routes/common/schemas/mutation.schema.ts
|
|
68848
|
-
var MutationInputSchema =
|
|
69148
|
+
var MutationInputSchema = z16.object({
|
|
68849
69149
|
walletVerification: UserVerificationSchema.optional()
|
|
68850
69150
|
});
|
|
68851
69151
|
|
|
68852
69152
|
// ../../packages/dalp/api-contract/src/routes/addons/fixed-yield-schedule/schemas/fixed-yield-schedule.input.schema.ts
|
|
68853
|
-
var FixedYieldScheduleReadInputSchema =
|
|
69153
|
+
var FixedYieldScheduleReadInputSchema = z17.object({
|
|
68854
69154
|
scheduleAddress: ethereumAddress.meta({
|
|
68855
69155
|
description: "The fixed yield schedule contract address",
|
|
68856
69156
|
examples: ["0x71C7656EC7ab88b098defB751B7401B5f6d8976F"]
|
|
@@ -68861,7 +69161,7 @@ var FixedYieldScheduleMutationInputSchema = FixedYieldScheduleReadInputSchema.ex
|
|
|
68861
69161
|
// ../../packages/dalp/api-contract/src/routes/addons/fixed-yield-schedule/routes/fixed-yield-schedule.claim.schema.ts
|
|
68862
69162
|
var FixedYieldScheduleClaimInputSchema = FixedYieldScheduleMutationInputSchema;
|
|
68863
69163
|
var FixedYieldScheduleClaimOutputSchema = BaseMutationOutputSchema.extend({
|
|
68864
|
-
complete:
|
|
69164
|
+
complete: z18.boolean().optional().meta({
|
|
68865
69165
|
description: "False when more completed periods remain to claim after this request (call claim again to continue); true when fully caught up. Omitted for async-accepted claims.",
|
|
68866
69166
|
examples: [true]
|
|
68867
69167
|
})
|
|
@@ -68877,10 +69177,10 @@ var fixedYieldScheduleClaimContract = v1Contract.route({
|
|
|
68877
69177
|
}).input(FixedYieldScheduleClaimInputSchema).output(FixedYieldScheduleClaimOutputSchema);
|
|
68878
69178
|
|
|
68879
69179
|
// ../../packages/core/validation/src/basis-points.ts
|
|
68880
|
-
import { z as
|
|
68881
|
-
var BasisPointsSchema =
|
|
69180
|
+
import { z as z19 } from "zod";
|
|
69181
|
+
var BasisPointsSchema = z19.int("Basis points must be an integer").min(0, "Basis points cannot be negative").max(20000, "Basis points cannot exceed 20000 (200%)").meta({ description: "Basis points value between 0 and 20000 (0% to 200%)", examples: [100, 250, 500, 1000] }).brand("BasisPoints");
|
|
68882
69182
|
var basisPoints = () => BasisPointsSchema;
|
|
68883
|
-
var FeeRateBpsSchema =
|
|
69183
|
+
var FeeRateBpsSchema = z19.int("Fee rate basis points must be an integer").min(0, "Fee rate basis points cannot be negative").max(1e4, "Fee rate basis points cannot exceed 10000 (100%)").meta({
|
|
68884
69184
|
description: "Fee rate in basis points (0-10000, 0%-100%) — capped to match on-chain fee feature contracts",
|
|
68885
69185
|
examples: [0, 100, 250, 1000, 1e4]
|
|
68886
69186
|
}).brand("FeeRateBps");
|
|
@@ -68891,12 +69191,12 @@ function getBasisPoints(value2) {
|
|
|
68891
69191
|
|
|
68892
69192
|
// ../../packages/core/validation/src/blocktime.ts
|
|
68893
69193
|
import { getUnixTime as getUnixTime2 } from "date-fns";
|
|
68894
|
-
import { z as
|
|
69194
|
+
import { z as z20 } from "zod";
|
|
68895
69195
|
var blocktime = (options = {}) => {
|
|
68896
|
-
const base =
|
|
69196
|
+
const base = z20.unknown().superRefine((value2, ctx) => {
|
|
68897
69197
|
if (typeof value2 === "number" && value2 < 0) {
|
|
68898
69198
|
ctx.addIssue({
|
|
68899
|
-
code:
|
|
69199
|
+
code: z20.ZodIssueCode.custom,
|
|
68900
69200
|
message: "Timestamp cannot be negative"
|
|
68901
69201
|
});
|
|
68902
69202
|
}
|
|
@@ -68919,7 +69219,7 @@ var blocktime = (options = {}) => {
|
|
|
68919
69219
|
|
|
68920
69220
|
// ../../packages/core/validation/src/iso-country-code.ts
|
|
68921
69221
|
import { iso31661, iso31661Alpha2ToNumeric, iso31661NumericToAlpha2 } from "iso-3166";
|
|
68922
|
-
import { z as
|
|
69222
|
+
import { z as z21 } from "zod";
|
|
68923
69223
|
var displayNamesCache = new Map;
|
|
68924
69224
|
var KOSOVO_ALPHA2 = "XK";
|
|
68925
69225
|
var KOSOVO_NUMERIC = "983";
|
|
@@ -68937,25 +69237,25 @@ var validNumericCountryCodes = numericCountryCodes;
|
|
|
68937
69237
|
var validNumericCountryCodesAsNumbers = validNumericCountryCodes.map((code) => Number.parseInt(code, 10));
|
|
68938
69238
|
var validNumericCountryCodesAsStrings = validNumericCountryCodesAsNumbers.map((code) => code.toString());
|
|
68939
69239
|
var validNumericCountryCodesAsNumbersSet = new Set(validNumericCountryCodesAsNumbers);
|
|
68940
|
-
var validNumericCountryCodesAsNumbersSchema =
|
|
69240
|
+
var validNumericCountryCodesAsNumbersSchema = z21.number().refine((n) => validNumericCountryCodesAsNumbersSet.has(n), {
|
|
68941
69241
|
message: "Invalid ISO 3166-1 numeric country code"
|
|
68942
69242
|
});
|
|
68943
69243
|
var validNumericCountryCodesAsStringsSet = new Set(validNumericCountryCodesAsStrings);
|
|
68944
|
-
var validNumericCountryCodesAsStringsSchema =
|
|
69244
|
+
var validNumericCountryCodesAsStringsSchema = z21.string().refine((s) => validNumericCountryCodesAsStringsSet.has(s), {
|
|
68945
69245
|
message: "Invalid ISO 3166-1 numeric country code"
|
|
68946
69246
|
});
|
|
68947
|
-
var isoCountryCode =
|
|
68948
|
-
var isoCountryCodeNormalized =
|
|
68949
|
-
var isoCountryCodeNumeric =
|
|
68950
|
-
|
|
69247
|
+
var isoCountryCode = z21.enum(validCountryCodes).meta({ description: "ISO 3166-1 alpha-2 country code", examples: ["US", "GB", "DE", "JP"] });
|
|
69248
|
+
var isoCountryCodeNormalized = z21.preprocess((val) => typeof val === "string" ? val.toUpperCase() : val, isoCountryCode).meta({ description: "ISO 3166-1 alpha-2 country code (case-insensitive)", examples: ["US", "us", "Us", "GB"] });
|
|
69249
|
+
var isoCountryCodeNumeric = z21.union([
|
|
69250
|
+
z21.enum(validNumericCountryCodes),
|
|
68951
69251
|
validNumericCountryCodesAsNumbersSchema,
|
|
68952
69252
|
validNumericCountryCodesAsStringsSchema
|
|
68953
|
-
]).pipe(
|
|
69253
|
+
]).pipe(z21.coerce.number()).meta({ description: "ISO 3166-1 numeric country code", examples: [840, 826, 276, 392] });
|
|
68954
69254
|
|
|
68955
69255
|
// ../../packages/core/validation/src/time-interval.ts
|
|
68956
|
-
import { z as
|
|
69256
|
+
import { z as z22 } from "zod";
|
|
68957
69257
|
var timeIntervals = ["HOURLY", "DAILY", "WEEKLY", "MONTHLY", "QUARTERLY", "SEMI_ANNUAL", "YEARLY"];
|
|
68958
|
-
var TimeIntervalSchema =
|
|
69258
|
+
var TimeIntervalSchema = z22.enum(timeIntervals).meta({ description: "Time interval for scheduling", examples: ["DAILY", "WEEKLY", "MONTHLY", "YEARLY"] });
|
|
68959
69259
|
var timeInterval = () => TimeIntervalSchema;
|
|
68960
69260
|
var TIME_INTERVAL_SECONDS = {
|
|
68961
69261
|
HOURLY: 3600,
|
|
@@ -68968,15 +69268,15 @@ var TIME_INTERVAL_SECONDS = {
|
|
|
68968
69268
|
};
|
|
68969
69269
|
|
|
68970
69270
|
// ../../packages/dalp/api-contract/src/routes/addons/fixed-yield-schedule/routes/fixed-yield-schedule.create.schema.ts
|
|
68971
|
-
import { z as
|
|
69271
|
+
import { z as z23 } from "zod";
|
|
68972
69272
|
var FixedYieldScheduleCreateInputSchema = MutationInputSchema.extend({
|
|
68973
69273
|
yieldRate: basisPoints().meta({ description: "The yield rate in basis points (1% = 100)", examples: [500, 1000] }),
|
|
68974
|
-
paymentInterval:
|
|
69274
|
+
paymentInterval: z23.union([
|
|
68975
69275
|
timeInterval().meta({
|
|
68976
69276
|
description: "The payment interval (HOURLY, DAILY, WEEKLY, MONTHLY, QUARTERLY, YEARLY)",
|
|
68977
69277
|
examples: ["DAILY", "MONTHLY"]
|
|
68978
69278
|
}),
|
|
68979
|
-
|
|
69279
|
+
z23.int().positive().meta({ description: "The payment interval in seconds", examples: [86400, 2592000] })
|
|
68980
69280
|
]).meta({ description: "The payment interval", examples: ["MONTHLY"] }),
|
|
68981
69281
|
startTime: blocktime({ future: true }).meta({
|
|
68982
69282
|
description: "The start time for yield payments as Unix timestamp",
|
|
@@ -69005,26 +69305,15 @@ var FixedYieldScheduleCreateInputSchema = MutationInputSchema.extend({
|
|
|
69005
69305
|
});
|
|
69006
69306
|
|
|
69007
69307
|
// ../../packages/core/validation/src/fixed-yield-schedule.ts
|
|
69008
|
-
import { z as
|
|
69308
|
+
import { z as z26 } from "zod";
|
|
69009
69309
|
|
|
69010
69310
|
// ../../packages/core/validation/src/bigdecimal.ts
|
|
69011
69311
|
import { add, from, greaterThan, isDnum, setDecimals, toJSON } from "dnum";
|
|
69012
|
-
import { z as
|
|
69013
|
-
|
|
69014
|
-
|
|
69015
|
-
|
|
69016
|
-
|
|
69017
|
-
return { [V1_FROZEN_SPEC_META_KEY]: directive };
|
|
69018
|
-
}
|
|
69019
|
-
function v1FrozenRequired(schema, directive = {}) {
|
|
69020
|
-
return schema.meta(v1FrozenSpecMeta({ required: true, ...directive }));
|
|
69021
|
-
}
|
|
69022
|
-
|
|
69023
|
-
// ../../packages/core/validation/src/bigdecimal.ts
|
|
69024
|
-
var BigDecimalSchema = z21.union([
|
|
69025
|
-
z21.string(),
|
|
69026
|
-
z21.number(),
|
|
69027
|
-
z21.custom((val) => isDnum(val), {
|
|
69312
|
+
import { z as z24 } from "zod";
|
|
69313
|
+
var BigDecimalSchema = z24.union([
|
|
69314
|
+
z24.string(),
|
|
69315
|
+
z24.number(),
|
|
69316
|
+
z24.custom((val) => isDnum(val), {
|
|
69028
69317
|
message: "Expected a Dnum value"
|
|
69029
69318
|
})
|
|
69030
69319
|
]).meta({
|
|
@@ -69041,7 +69330,7 @@ var BigDecimalSchema = z21.union([
|
|
|
69041
69330
|
code: "custom",
|
|
69042
69331
|
message: "Invalid value. NaN, Infinity, and -Infinity are not allowed"
|
|
69043
69332
|
});
|
|
69044
|
-
return
|
|
69333
|
+
return z24.NEVER;
|
|
69045
69334
|
}
|
|
69046
69335
|
}
|
|
69047
69336
|
try {
|
|
@@ -69051,7 +69340,7 @@ var BigDecimalSchema = z21.union([
|
|
|
69051
69340
|
code: "custom",
|
|
69052
69341
|
message: "Invalid decimal format. Please provide a valid numeric string"
|
|
69053
69342
|
});
|
|
69054
|
-
return
|
|
69343
|
+
return z24.NEVER;
|
|
69055
69344
|
}
|
|
69056
69345
|
}).meta(v1FrozenSpecMeta({ type: "string" }));
|
|
69057
69346
|
var bigDecimal = () => BigDecimalSchema;
|
|
@@ -69083,8 +69372,8 @@ function dnumFromDecimalString(s) {
|
|
|
69083
69372
|
}
|
|
69084
69373
|
|
|
69085
69374
|
// ../../packages/core/validation/src/decimals.ts
|
|
69086
|
-
import { z as
|
|
69087
|
-
var DecimalsSchema =
|
|
69375
|
+
import { z as z25 } from "zod";
|
|
69376
|
+
var DecimalsSchema = z25.union([z25.string(), z25.number()]).transform((value2, ctx) => {
|
|
69088
69377
|
if (typeof value2 === "number") {
|
|
69089
69378
|
return value2;
|
|
69090
69379
|
}
|
|
@@ -69094,7 +69383,7 @@ var DecimalsSchema = z22.union([z22.string(), z22.number()]).transform((value2,
|
|
|
69094
69383
|
code: "custom",
|
|
69095
69384
|
message: "Decimals must be a whole number (integer)"
|
|
69096
69385
|
});
|
|
69097
|
-
return
|
|
69386
|
+
return z25.NEVER;
|
|
69098
69387
|
}
|
|
69099
69388
|
return parsed;
|
|
69100
69389
|
}).refine((value2) => Number.isInteger(value2), {
|
|
@@ -69108,14 +69397,14 @@ var decimals = () => DecimalsSchema;
|
|
|
69108
69397
|
|
|
69109
69398
|
// ../../packages/core/validation/src/fixed-yield-schedule.ts
|
|
69110
69399
|
function fixedYieldSchedulePeriodId() {
|
|
69111
|
-
return
|
|
69400
|
+
return z26.string().refine((id) => /^0x[a-f0-9]{40}-period-\d+$/i.test(id), {
|
|
69112
69401
|
message: 'Period ID must be in format "0x{40-hex-chars}-period-{index}"'
|
|
69113
69402
|
}).meta({
|
|
69114
69403
|
description: "Unique identifier for a fixed yield period (composite: {scheduleAddress}-period-{index})",
|
|
69115
69404
|
examples: ["0x1234567890abcdef1234567890abcdef12345678-period-0"]
|
|
69116
69405
|
});
|
|
69117
69406
|
}
|
|
69118
|
-
var FixedYieldSchedulePeriodSchema =
|
|
69407
|
+
var FixedYieldSchedulePeriodSchema = z26.object({
|
|
69119
69408
|
id: fixedYieldSchedulePeriodId(),
|
|
69120
69409
|
startDate: timestamp().meta({
|
|
69121
69410
|
description: "Unix timestamp when period starts",
|
|
@@ -69134,10 +69423,10 @@ var FixedYieldSchedulePeriodSchema = z23.object({
|
|
|
69134
69423
|
description: "Total yield generated in this period",
|
|
69135
69424
|
examples: ["1500.0", "1000.0"]
|
|
69136
69425
|
}),
|
|
69137
|
-
completed:
|
|
69426
|
+
completed: z26.boolean().meta({ description: "Whether this period has been completed", examples: [true, false] })
|
|
69138
69427
|
});
|
|
69139
69428
|
var fixedYieldSchedulePeriod = () => FixedYieldSchedulePeriodSchema;
|
|
69140
|
-
var FixedYieldScheduleSchema =
|
|
69429
|
+
var FixedYieldScheduleSchema = z26.object({
|
|
69141
69430
|
id: ethereumAddress.meta({
|
|
69142
69431
|
description: "Yield schedule contract address",
|
|
69143
69432
|
examples: ["0x71C7656EC7ab88b098defB751B7401B5f6d8976F"]
|
|
@@ -69150,18 +69439,18 @@ var FixedYieldScheduleSchema = z23.object({
|
|
|
69150
69439
|
description: "Unix timestamp when yield ends",
|
|
69151
69440
|
examples: [1711890000, 1735689600]
|
|
69152
69441
|
}),
|
|
69153
|
-
rate:
|
|
69154
|
-
interval:
|
|
69442
|
+
rate: z26.string().meta({ description: "Yield rate in basis points", examples: ["500", "1000", "250"] }),
|
|
69443
|
+
interval: z26.string().meta({ description: "Payment interval in seconds", examples: ["2592000", "86400", "604800"] }),
|
|
69155
69444
|
totalClaimed: bigDecimal().meta({ description: "Total yield claimed", examples: ["1000.0", "0"] }),
|
|
69156
69445
|
totalUnclaimedYield: bigDecimal().meta({ description: "Total unclaimed yield", examples: ["500.0", "0"] }),
|
|
69157
69446
|
totalYield: bigDecimal().meta({ description: "Total yield generated", examples: ["1500.0", "1000.0"] }),
|
|
69158
|
-
denominationAsset:
|
|
69447
|
+
denominationAsset: z26.object({
|
|
69159
69448
|
id: ethereumAddress.meta({
|
|
69160
69449
|
description: "Denomination asset contract address",
|
|
69161
69450
|
examples: ["0x71C7656EC7ab88b098defB751B7401B5f6d8976F"]
|
|
69162
69451
|
}),
|
|
69163
69452
|
decimals: decimals().meta({ description: "Denomination asset decimals", examples: [6, 18] }),
|
|
69164
|
-
symbol:
|
|
69453
|
+
symbol: z26.string().meta({ description: "Denomination asset symbol", examples: ["USDC", "USDT", "DAI"] })
|
|
69165
69454
|
}),
|
|
69166
69455
|
currentPeriod: FixedYieldSchedulePeriodSchema.nullable().meta({
|
|
69167
69456
|
description: "Current active yield period",
|
|
@@ -69171,7 +69460,7 @@ var FixedYieldScheduleSchema = z23.object({
|
|
|
69171
69460
|
description: "Next scheduled yield period",
|
|
69172
69461
|
examples: [null]
|
|
69173
69462
|
}),
|
|
69174
|
-
periods:
|
|
69463
|
+
periods: z26.array(FixedYieldSchedulePeriodSchema).meta({ description: "Array of all yield periods", examples: [[]] })
|
|
69175
69464
|
});
|
|
69176
69465
|
var fixedYieldSchedule = () => FixedYieldScheduleSchema;
|
|
69177
69466
|
|
|
@@ -69198,17 +69487,17 @@ var fixedYieldScheduleReadContract = v1Contract.route({
|
|
|
69198
69487
|
|
|
69199
69488
|
// ../../packages/core/validation/src/asset-amount.ts
|
|
69200
69489
|
import { from as from2, isDnum as isDnum2 } from "dnum";
|
|
69201
|
-
import { z as
|
|
69490
|
+
import { z as z27 } from "zod";
|
|
69202
69491
|
var MAX_UINT256 = 2n ** 256n - 1n;
|
|
69203
69492
|
var DNUM_WIRE_DECIMAL = /^-?\d+\.\d+$/;
|
|
69204
|
-
var assetAmount =
|
|
69493
|
+
var assetAmount = z27.preprocess((value2, ctx) => {
|
|
69205
69494
|
const isDnumValue = isDnum2(value2);
|
|
69206
69495
|
if (Array.isArray(value2) && (value2.length !== 2 || !isDnumValue)) {
|
|
69207
69496
|
ctx.addIssue({
|
|
69208
69497
|
code: "custom",
|
|
69209
69498
|
message: "Invalid asset amount format: array (not a dnum)"
|
|
69210
69499
|
});
|
|
69211
|
-
return
|
|
69500
|
+
return z27.NEVER;
|
|
69212
69501
|
}
|
|
69213
69502
|
try {
|
|
69214
69503
|
const dnum = typeof value2 === "string" && DNUM_WIRE_DECIMAL.test(value2) ? dnumFromDecimalString(value2) : from2(value2);
|
|
@@ -69217,14 +69506,14 @@ var assetAmount = z24.preprocess((value2, ctx) => {
|
|
|
69217
69506
|
code: "custom",
|
|
69218
69507
|
message: "Asset amount cannot be negative"
|
|
69219
69508
|
});
|
|
69220
|
-
return
|
|
69509
|
+
return z27.NEVER;
|
|
69221
69510
|
}
|
|
69222
69511
|
if (dnum[0] > MAX_UINT256) {
|
|
69223
69512
|
ctx.addIssue({
|
|
69224
69513
|
code: "custom",
|
|
69225
69514
|
message: "Asset amount exceeds the maximum uint256 value"
|
|
69226
69515
|
});
|
|
69227
|
-
return
|
|
69516
|
+
return z27.NEVER;
|
|
69228
69517
|
}
|
|
69229
69518
|
return dnum[0];
|
|
69230
69519
|
} catch {
|
|
@@ -69235,14 +69524,14 @@ var assetAmount = z24.preprocess((value2, ctx) => {
|
|
|
69235
69524
|
code: "custom",
|
|
69236
69525
|
message: "Asset amount cannot be negative"
|
|
69237
69526
|
});
|
|
69238
|
-
return
|
|
69527
|
+
return z27.NEVER;
|
|
69239
69528
|
}
|
|
69240
69529
|
if (bigintValue > MAX_UINT256) {
|
|
69241
69530
|
ctx.addIssue({
|
|
69242
69531
|
code: "custom",
|
|
69243
69532
|
message: "Asset amount exceeds the maximum uint256 value"
|
|
69244
69533
|
});
|
|
69245
|
-
return
|
|
69534
|
+
return z27.NEVER;
|
|
69246
69535
|
}
|
|
69247
69536
|
return bigintValue;
|
|
69248
69537
|
} catch {
|
|
@@ -69250,10 +69539,10 @@ var assetAmount = z24.preprocess((value2, ctx) => {
|
|
|
69250
69539
|
code: "custom",
|
|
69251
69540
|
message: "must be a positive number"
|
|
69252
69541
|
});
|
|
69253
|
-
return
|
|
69542
|
+
return z27.NEVER;
|
|
69254
69543
|
}
|
|
69255
69544
|
}
|
|
69256
|
-
},
|
|
69545
|
+
}, z27.coerce.bigint());
|
|
69257
69546
|
|
|
69258
69547
|
// ../../packages/dalp/api-contract/src/routes/addons/fixed-yield-schedule/routes/fixed-yield-schedule.top-up.schema.ts
|
|
69259
69548
|
var FixedYieldScheduleTopUpInputSchema = FixedYieldScheduleMutationInputSchema.extend({
|
|
@@ -69304,11 +69593,11 @@ var fixedYieldScheduleWithdrawContract = v1Contract.route({
|
|
|
69304
69593
|
}).input(FixedYieldScheduleWithdrawInputSchema).output(FixedYieldScheduleWithdrawOutputSchema);
|
|
69305
69594
|
|
|
69306
69595
|
// ../../packages/dalp/api-contract/src/routes/addons/xvp/routes/mutations/approve/xvp.approve.schema.ts
|
|
69307
|
-
import { z as
|
|
69596
|
+
import { z as z29 } from "zod";
|
|
69308
69597
|
|
|
69309
69598
|
// ../../packages/dalp/api-contract/src/routes/addons/xvp/schemas/xvp.input.schema.ts
|
|
69310
|
-
import { z as
|
|
69311
|
-
var XvpSettlementReadInputSchema =
|
|
69599
|
+
import { z as z28 } from "zod";
|
|
69600
|
+
var XvpSettlementReadInputSchema = z28.object({
|
|
69312
69601
|
settlementAddress: ethereumAddress.meta({
|
|
69313
69602
|
description: "The XvP settlement contract address",
|
|
69314
69603
|
examples: ["0x71C7656EC7ab88b098defB751B7401B5f6d8976F"]
|
|
@@ -69318,20 +69607,20 @@ var XvpSettlementMutationInputSchema = XvpSettlementReadInputSchema.extend(Mutat
|
|
|
69318
69607
|
|
|
69319
69608
|
// ../../packages/dalp/api-contract/src/routes/addons/xvp/routes/mutations/approve/xvp.approve.schema.ts
|
|
69320
69609
|
var XvpApproveInputSchema = XvpSettlementMutationInputSchema;
|
|
69321
|
-
var XvpApproveOutputSchema =
|
|
69322
|
-
transactionHash:
|
|
69610
|
+
var XvpApproveOutputSchema = z29.object({
|
|
69611
|
+
transactionHash: z29.string()
|
|
69323
69612
|
});
|
|
69324
69613
|
|
|
69325
69614
|
// ../../packages/dalp/api-contract/src/routes/addons/xvp/routes/mutations/cancel/xvp.cancel.schema.ts
|
|
69326
|
-
import { z as
|
|
69615
|
+
import { z as z30 } from "zod";
|
|
69327
69616
|
var XvpCancelInputSchema = XvpSettlementMutationInputSchema;
|
|
69328
|
-
var XvpCancelOutputSchema =
|
|
69329
|
-
transactionHash:
|
|
69617
|
+
var XvpCancelOutputSchema = z30.object({
|
|
69618
|
+
transactionHash: z30.string()
|
|
69330
69619
|
});
|
|
69331
69620
|
|
|
69332
69621
|
// ../../packages/dalp/api-contract/src/routes/addons/xvp/routes/mutations/create/xvp.create.schema.ts
|
|
69333
|
-
import { z as
|
|
69334
|
-
function
|
|
69622
|
+
import { z as z31 } from "zod";
|
|
69623
|
+
function isHex2(value2) {
|
|
69335
69624
|
return /^0x[0-9a-fA-F]*$/.test(value2);
|
|
69336
69625
|
}
|
|
69337
69626
|
var SECRET_MIN_LENGTH = 32;
|
|
@@ -69342,8 +69631,8 @@ var XVP_CREATE_NAME_VISIBLE_CHARACTER_PATTERN = String.raw`[^\p{White_Space}\p{D
|
|
|
69342
69631
|
var XVP_CREATE_NAME_HAS_VISIBLE_CHARACTER = new RegExp(XVP_CREATE_NAME_VISIBLE_CHARACTER_PATTERN, "u");
|
|
69343
69632
|
var XVP_CREATE_FLOWS_MIN_LENGTH_MESSAGE = "At least one flow is required";
|
|
69344
69633
|
var XVP_CREATE_FLOWS_MAX_LENGTH_MESSAGE = `At most ${XVP_CREATE_FLOWS_MAX_LENGTH} flows are supported`;
|
|
69345
|
-
var LocalFlowSchema =
|
|
69346
|
-
type:
|
|
69634
|
+
var LocalFlowSchema = z31.object({
|
|
69635
|
+
type: z31.literal("local"),
|
|
69347
69636
|
assetId: ethereumAddress.meta({
|
|
69348
69637
|
description: "ERC-20 asset address",
|
|
69349
69638
|
examples: ["0x71C7656EC7ab88b098defB751B7401B5f6d8976F"]
|
|
@@ -69358,8 +69647,8 @@ var LocalFlowSchema = z28.object({
|
|
|
69358
69647
|
}),
|
|
69359
69648
|
amount: assetAmount.meta({ description: "Token amount in base units", examples: ["1000000000000000000"] })
|
|
69360
69649
|
});
|
|
69361
|
-
var ExternalFlowSchema =
|
|
69362
|
-
type:
|
|
69650
|
+
var ExternalFlowSchema = z31.object({
|
|
69651
|
+
type: z31.literal("external"),
|
|
69363
69652
|
assetId: ethereumAddress.meta({
|
|
69364
69653
|
description: "ERC-20 asset address on external chain",
|
|
69365
69654
|
examples: ["0x71C7656EC7ab88b098defB751B7401B5f6d8976F"]
|
|
@@ -69373,16 +69662,16 @@ var ExternalFlowSchema = z28.object({
|
|
|
69373
69662
|
examples: ["0xbDA5747bFD65F08deb54cb465eB87D40e51B197E"]
|
|
69374
69663
|
}),
|
|
69375
69664
|
amount: assetAmount.meta({ description: "Token amount in base units", examples: ["1000000000000000000"] }),
|
|
69376
|
-
externalChainId:
|
|
69665
|
+
externalChainId: z31.int().positive().meta({ description: "Target chain ID", examples: [1, 137, 42161] }),
|
|
69377
69666
|
externalAssetDecimals: decimals().meta({ description: "Asset decimals on external chain", examples: [18, 6, 8] })
|
|
69378
69667
|
});
|
|
69379
|
-
var XvpSettlementFlowSchema =
|
|
69380
|
-
var XvpSettlementFlowsSchema =
|
|
69381
|
-
var RawSecretSchema =
|
|
69668
|
+
var XvpSettlementFlowSchema = z31.discriminatedUnion("type", [LocalFlowSchema, ExternalFlowSchema]);
|
|
69669
|
+
var XvpSettlementFlowsSchema = z31.array(XvpSettlementFlowSchema).min(1, XVP_CREATE_FLOWS_MIN_LENGTH_MESSAGE).max(XVP_CREATE_FLOWS_MAX_LENGTH, XVP_CREATE_FLOWS_MAX_LENGTH_MESSAGE);
|
|
69670
|
+
var RawSecretSchema = z31.string().min(SECRET_MIN_LENGTH, `Secret must be at least ${SECRET_MIN_LENGTH} characters`).max(SECRET_MAX_LENGTH, `Secret must be at most ${SECRET_MAX_LENGTH} characters`).meta({
|
|
69382
69671
|
description: "Raw HTLC secret pre-image (plain text string).",
|
|
69383
69672
|
examples: ["my-super-secret-preimage-for-htlc-swap"]
|
|
69384
69673
|
});
|
|
69385
|
-
var HashlockSchema =
|
|
69674
|
+
var HashlockSchema = z31.string().refine((value2) => isHex2(value2) && value2.length === 66, {
|
|
69386
69675
|
message: "Hashlock must be a 0x-prefixed 32-byte hex string (66 chars)"
|
|
69387
69676
|
}).meta({
|
|
69388
69677
|
description: "Pre-computed keccak256 hashlock (bytes32)",
|
|
@@ -69405,8 +69694,8 @@ var XvpCreateBaseSchema = MutationInputSchema.extend({
|
|
|
69405
69694
|
description: "The XvP addon factory contract address",
|
|
69406
69695
|
examples: ["0x71C7656EC7ab88b098defB751B7401B5f6d8976F"]
|
|
69407
69696
|
}),
|
|
69408
|
-
name:
|
|
69409
|
-
autoExecute:
|
|
69697
|
+
name: z31.string().min(1, "Name is required").max(XVP_CREATE_NAME_MAX_LENGTH, `Name must be at most ${XVP_CREATE_NAME_MAX_LENGTH} characters`).regex(XVP_CREATE_NAME_HAS_VISIBLE_CHARACTER, "Name is required"),
|
|
69698
|
+
autoExecute: z31.boolean().default(false),
|
|
69410
69699
|
cutoffDate: blocktime({ future: true }).meta({ description: "Settlement cutoff", examples: [1735689600] }),
|
|
69411
69700
|
secret: RawSecretSchema.optional(),
|
|
69412
69701
|
hashlock: HashlockSchema.optional(),
|
|
@@ -69423,8 +69712,8 @@ var XvpCreateSchema = XvpCreateBaseSchema.refine(validateHashlockRequirement, {
|
|
|
69423
69712
|
message: "At least one flow must be a local flow (type: 'local').",
|
|
69424
69713
|
path: ["flows"]
|
|
69425
69714
|
});
|
|
69426
|
-
var XvpCreateOutputSchema =
|
|
69427
|
-
transactionHash:
|
|
69715
|
+
var XvpCreateOutputSchema = z31.object({
|
|
69716
|
+
transactionHash: z31.string(),
|
|
69428
69717
|
settlementId: ethereumAddress.meta({
|
|
69429
69718
|
description: "Created XvP settlement contract address",
|
|
69430
69719
|
examples: ["0x71C7656EC7ab88b098defB751B7401B5f6d8976F"]
|
|
@@ -69432,99 +69721,87 @@ var XvpCreateOutputSchema = z28.object({
|
|
|
69432
69721
|
});
|
|
69433
69722
|
|
|
69434
69723
|
// ../../packages/dalp/api-contract/src/routes/addons/xvp/routes/mutations/execute/xvp.execute.schema.ts
|
|
69435
|
-
import { z as
|
|
69724
|
+
import { z as z32 } from "zod";
|
|
69436
69725
|
var XvpExecuteInputSchema = XvpSettlementMutationInputSchema;
|
|
69437
|
-
var XvpExecuteOutputSchema =
|
|
69438
|
-
transactionHash:
|
|
69726
|
+
var XvpExecuteOutputSchema = z32.object({
|
|
69727
|
+
transactionHash: z32.string()
|
|
69439
69728
|
});
|
|
69440
69729
|
|
|
69441
69730
|
// ../../packages/dalp/api-contract/src/routes/addons/xvp/routes/mutations/reveal-secret/xvp.reveal-secret.schema.ts
|
|
69442
|
-
import { z as
|
|
69443
|
-
var EmailRecipientsSchema =
|
|
69731
|
+
import { z as z33 } from "zod";
|
|
69732
|
+
var EmailRecipientsSchema = z33.array(z33.email("Invalid email address")).max(10, "Maximum 10 email recipients allowed").optional().default([]);
|
|
69444
69733
|
var XvpRevealSecretInputSchema = XvpSettlementMutationInputSchema.extend({
|
|
69445
69734
|
secret: RawSecretSchema,
|
|
69446
69735
|
emailRecipients: EmailRecipientsSchema,
|
|
69447
|
-
settlementName:
|
|
69736
|
+
settlementName: z33.string().optional()
|
|
69448
69737
|
});
|
|
69449
|
-
var EmailSendResultSchema =
|
|
69450
|
-
recipient:
|
|
69451
|
-
success:
|
|
69452
|
-
error:
|
|
69738
|
+
var EmailSendResultSchema = z33.object({
|
|
69739
|
+
recipient: z33.email(),
|
|
69740
|
+
success: z33.boolean(),
|
|
69741
|
+
error: z33.string().optional()
|
|
69453
69742
|
});
|
|
69454
|
-
var XvpRevealSecretOutputSchema =
|
|
69455
|
-
transactionHash:
|
|
69456
|
-
emailResults:
|
|
69743
|
+
var XvpRevealSecretOutputSchema = z33.object({
|
|
69744
|
+
transactionHash: z33.string(),
|
|
69745
|
+
emailResults: z33.array(EmailSendResultSchema).optional()
|
|
69457
69746
|
});
|
|
69458
69747
|
|
|
69459
69748
|
// ../../packages/dalp/api-contract/src/routes/addons/xvp/routes/mutations/revoke-approval/xvp.revoke-approval.schema.ts
|
|
69460
|
-
import { z as
|
|
69749
|
+
import { z as z34 } from "zod";
|
|
69461
69750
|
var XvpRevokeApprovalInputSchema = XvpSettlementMutationInputSchema;
|
|
69462
|
-
var XvpRevokeApprovalOutputSchema =
|
|
69463
|
-
transactionHash:
|
|
69751
|
+
var XvpRevokeApprovalOutputSchema = z34.object({
|
|
69752
|
+
transactionHash: z34.string()
|
|
69464
69753
|
});
|
|
69465
69754
|
|
|
69466
69755
|
// ../../packages/dalp/api-contract/src/routes/addons/xvp/routes/mutations/withdraw-cancel/xvp.withdraw-cancel.schema.ts
|
|
69467
|
-
import { z as
|
|
69756
|
+
import { z as z35 } from "zod";
|
|
69468
69757
|
var XvpWithdrawCancelInputSchema = XvpSettlementMutationInputSchema;
|
|
69469
|
-
var XvpWithdrawCancelOutputSchema =
|
|
69470
|
-
transactionHash:
|
|
69758
|
+
var XvpWithdrawCancelOutputSchema = z35.object({
|
|
69759
|
+
transactionHash: z35.string()
|
|
69471
69760
|
});
|
|
69472
69761
|
|
|
69473
69762
|
// ../../packages/dalp/api-contract/src/routes/addons/xvp/routes/mutations/withdraw-expired/xvp.withdraw-expired.schema.ts
|
|
69474
|
-
import { z as
|
|
69763
|
+
import { z as z36 } from "zod";
|
|
69475
69764
|
var XvpWithdrawExpiredInputSchema = XvpSettlementMutationInputSchema;
|
|
69476
|
-
var XvpWithdrawExpiredOutputSchema =
|
|
69477
|
-
transactionHash:
|
|
69765
|
+
var XvpWithdrawExpiredOutputSchema = z36.object({
|
|
69766
|
+
transactionHash: z36.string()
|
|
69478
69767
|
});
|
|
69479
69768
|
|
|
69480
69769
|
// ../../packages/dalp/api-contract/src/routes/addons/xvp/routes/xvp.decrypt.schema.ts
|
|
69481
|
-
import { z as
|
|
69770
|
+
import { z as z37 } from "zod";
|
|
69482
69771
|
var XvpDecryptInputSchema = XvpSettlementMutationInputSchema;
|
|
69483
|
-
var XvpDecryptOutputSchema =
|
|
69484
|
-
secret:
|
|
69772
|
+
var XvpDecryptOutputSchema = z37.object({
|
|
69773
|
+
secret: z37.string().meta({
|
|
69485
69774
|
description: "Decrypted HTLC secret in hex format",
|
|
69486
69775
|
examples: ["0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"]
|
|
69487
69776
|
}),
|
|
69488
|
-
hashlock:
|
|
69777
|
+
hashlock: z37.string().meta({
|
|
69489
69778
|
description: "Keccak256 hashlock of the decrypted secret",
|
|
69490
69779
|
examples: ["0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef12"]
|
|
69491
69780
|
})
|
|
69492
69781
|
});
|
|
69493
69782
|
|
|
69494
|
-
// ../../packages/core/validation/src/account.ts
|
|
69495
|
-
import { z as z35 } from "zod";
|
|
69496
|
-
var AccountSchema = z35.object({
|
|
69497
|
-
id: ethereumAddress,
|
|
69498
|
-
isContract: z35.boolean().meta({ description: "Whether this address is a smart contract (true) or EOA (false)", examples: [true, false] })
|
|
69499
|
-
});
|
|
69500
|
-
var account = () => AccountSchema;
|
|
69501
|
-
var accountArray = () => z35.array(account()).meta({
|
|
69502
|
-
description: "Array of Account entities",
|
|
69503
|
-
examples: [[{ id: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", isContract: false }]]
|
|
69504
|
-
});
|
|
69505
|
-
|
|
69506
69783
|
// ../../packages/dalp/api-contract/src/routes/addons/xvp/routes/xvp.list.schema.ts
|
|
69507
|
-
import { z as
|
|
69784
|
+
import { z as z40 } from "zod";
|
|
69508
69785
|
|
|
69509
69786
|
// ../../packages/dalp/api-contract/src/routes/common/schemas/paginated-list.schema.ts
|
|
69510
|
-
import { z as
|
|
69787
|
+
import { z as z39 } from "zod";
|
|
69511
69788
|
|
|
69512
69789
|
// ../../packages/dalp/api-contract/src/routes/common/schemas/sortable-list.schema.ts
|
|
69513
|
-
import { z as
|
|
69514
|
-
var SortableListSchema =
|
|
69515
|
-
orderDirection:
|
|
69516
|
-
orderBy:
|
|
69790
|
+
import { z as z38 } from "zod";
|
|
69791
|
+
var SortableListSchema = z38.object({
|
|
69792
|
+
orderDirection: z38.enum(["asc", "desc"]).default("asc"),
|
|
69793
|
+
orderBy: z38.string().default("id")
|
|
69517
69794
|
});
|
|
69518
69795
|
|
|
69519
69796
|
// ../../packages/dalp/api-contract/src/routes/common/schemas/paginated-list.schema.ts
|
|
69520
69797
|
var PaginatedListSchema = SortableListSchema.extend({
|
|
69521
|
-
offset:
|
|
69522
|
-
limit:
|
|
69798
|
+
offset: z39.number().int().nonnegative().default(0),
|
|
69799
|
+
limit: z39.number().int().positive().max(200).default(25)
|
|
69523
69800
|
});
|
|
69524
69801
|
|
|
69525
69802
|
// ../../packages/dalp/api-contract/src/routes/addons/xvp/routes/xvp.list.schema.ts
|
|
69526
|
-
var XvpSettlementTypeSchema =
|
|
69527
|
-
var XvpSettlementStatusSchema =
|
|
69803
|
+
var XvpSettlementTypeSchema = z40.enum(["LOCAL", "HTLC"]);
|
|
69804
|
+
var XvpSettlementStatusSchema = z40.enum([
|
|
69528
69805
|
"EXECUTED",
|
|
69529
69806
|
"CANCELLED",
|
|
69530
69807
|
"EXPIRED",
|
|
@@ -69533,59 +69810,59 @@ var XvpSettlementStatusSchema = z38.enum([
|
|
|
69533
69810
|
"WAITING_SECRET",
|
|
69534
69811
|
"PENDING"
|
|
69535
69812
|
]);
|
|
69536
|
-
var XvpSettlementWarningSchema =
|
|
69813
|
+
var XvpSettlementWarningSchema = z40.enum([
|
|
69537
69814
|
"CANCEL_PROPOSED",
|
|
69538
69815
|
"EXPIRY_APPROACHING",
|
|
69539
69816
|
"WAITING_SECRET_DELAY",
|
|
69540
69817
|
"WITHDRAW_EXPIRED"
|
|
69541
69818
|
]);
|
|
69542
|
-
var XvpUserParticipationRoleSchema =
|
|
69543
|
-
var XvpSettlementGraphItemSchema =
|
|
69819
|
+
var XvpUserParticipationRoleSchema = z40.enum(["SENDER", "RECIPIENT", "BOTH"]);
|
|
69820
|
+
var XvpSettlementGraphItemSchema = z40.object({
|
|
69544
69821
|
id: ethereumAddress,
|
|
69545
|
-
name:
|
|
69546
|
-
hasExternalFlows:
|
|
69822
|
+
name: z40.string(),
|
|
69823
|
+
hasExternalFlows: z40.boolean(),
|
|
69547
69824
|
cutoffDate: timestamp(),
|
|
69548
69825
|
createdAt: timestamp(),
|
|
69549
69826
|
createdBy: account(),
|
|
69550
|
-
secretRevealTx:
|
|
69551
|
-
executed:
|
|
69552
|
-
cancelled:
|
|
69553
|
-
withdrawn:
|
|
69827
|
+
secretRevealTx: z40.string().nullable().optional(),
|
|
69828
|
+
executed: z40.boolean(),
|
|
69829
|
+
cancelled: z40.boolean(),
|
|
69830
|
+
withdrawn: z40.boolean(),
|
|
69554
69831
|
allApprovedAt: timestamp().nullable(),
|
|
69555
|
-
approvalsCount:
|
|
69556
|
-
approvals:
|
|
69557
|
-
id:
|
|
69832
|
+
approvalsCount: z40.coerce.number().int().nonnegative(),
|
|
69833
|
+
approvals: z40.array(z40.object({
|
|
69834
|
+
id: z40.string()
|
|
69558
69835
|
})).optional(),
|
|
69559
|
-
cancelVotesCount:
|
|
69560
|
-
localSendersCount:
|
|
69561
|
-
localParticipantsCount:
|
|
69836
|
+
cancelVotesCount: z40.coerce.number().int().nonnegative(),
|
|
69837
|
+
localSendersCount: z40.coerce.number().int().nonnegative(),
|
|
69838
|
+
localParticipantsCount: z40.coerce.number().int().nonnegative()
|
|
69562
69839
|
});
|
|
69563
69840
|
var XvpSettlementListItemSchema = XvpSettlementGraphItemSchema.extend({
|
|
69564
|
-
userApproved:
|
|
69841
|
+
userApproved: z40.boolean()
|
|
69565
69842
|
});
|
|
69566
|
-
var XvpSettlementListSchema =
|
|
69567
|
-
var XvpSettlementOrderBySchema =
|
|
69843
|
+
var XvpSettlementListSchema = z40.array(XvpSettlementListItemSchema);
|
|
69844
|
+
var XvpSettlementOrderBySchema = z40.enum(["createdAt", "cutoffDate", "name"]);
|
|
69568
69845
|
var XvpSettlementListInputSchema = PaginatedListSchema.extend({
|
|
69569
69846
|
participant: ethereumAddress.optional(),
|
|
69570
69847
|
systemAddon: ethereumAddress.optional(),
|
|
69571
69848
|
orderBy: XvpSettlementOrderBySchema.default("createdAt"),
|
|
69572
|
-
orderDirection:
|
|
69849
|
+
orderDirection: z40.enum(["asc", "desc"]).default("desc")
|
|
69573
69850
|
});
|
|
69574
|
-
var XvpSettlementListResponseSchema =
|
|
69851
|
+
var XvpSettlementListResponseSchema = z40.object({
|
|
69575
69852
|
xvPSettlements: XvpSettlementListSchema,
|
|
69576
|
-
total:
|
|
69853
|
+
total: z40.number().int().nonnegative()
|
|
69577
69854
|
});
|
|
69578
69855
|
|
|
69579
69856
|
// ../../packages/core/validation/src/asset-symbol.ts
|
|
69580
|
-
import { z as
|
|
69581
|
-
var AssetSymbolSchema =
|
|
69857
|
+
import { z as z41 } from "zod";
|
|
69858
|
+
var AssetSymbolSchema = z41.string().min(1, "Asset symbol is required").max(24, "Asset symbol must not exceed 24 characters").regex(/^[A-Z0-9]+$/, "Asset symbol must contain only uppercase letters (A-Z) and numbers (0-9)").meta({ description: "Trading symbol for the asset", examples: ["ETH", "BTC", "USDC", "AAPL"] });
|
|
69582
69859
|
var assetSymbol = () => AssetSymbolSchema;
|
|
69583
69860
|
|
|
69584
69861
|
// ../../packages/core/validation/src/bigint.ts
|
|
69585
69862
|
import { ceil, toString as dnumToString, floor, from as from3, isDnum as isDnum3 } from "dnum";
|
|
69586
|
-
import { z as
|
|
69863
|
+
import { z as z42 } from "zod";
|
|
69587
69864
|
var INTEGER_BIGINT_STRING_PATTERN = /^-?\d+$/;
|
|
69588
|
-
var apiBigInt =
|
|
69865
|
+
var apiBigInt = z42.preprocess((value2, ctx) => {
|
|
69589
69866
|
if (typeof value2 === "bigint") {
|
|
69590
69867
|
return value2;
|
|
69591
69868
|
}
|
|
@@ -69594,7 +69871,7 @@ var apiBigInt = z40.preprocess((value2, ctx) => {
|
|
|
69594
69871
|
code: "custom",
|
|
69595
69872
|
message: "Invalid BigInt format: multiple decimal points"
|
|
69596
69873
|
});
|
|
69597
|
-
return
|
|
69874
|
+
return z42.NEVER;
|
|
69598
69875
|
}
|
|
69599
69876
|
const isDnumValue = isDnum3(value2);
|
|
69600
69877
|
if (Array.isArray(value2) && (value2.length !== 2 || !isDnumValue)) {
|
|
@@ -69602,7 +69879,7 @@ var apiBigInt = z40.preprocess((value2, ctx) => {
|
|
|
69602
69879
|
code: "custom",
|
|
69603
69880
|
message: "Invalid BigInt format: array (not a dnum)"
|
|
69604
69881
|
});
|
|
69605
|
-
return
|
|
69882
|
+
return z42.NEVER;
|
|
69606
69883
|
}
|
|
69607
69884
|
try {
|
|
69608
69885
|
const dnum = from3(value2);
|
|
@@ -69611,8 +69888,8 @@ var apiBigInt = z40.preprocess((value2, ctx) => {
|
|
|
69611
69888
|
} catch {
|
|
69612
69889
|
return value2;
|
|
69613
69890
|
}
|
|
69614
|
-
},
|
|
69615
|
-
var apiIntegerBigInt =
|
|
69891
|
+
}, z42.coerce.bigint());
|
|
69892
|
+
var apiIntegerBigInt = z42.preprocess((value2, ctx) => {
|
|
69616
69893
|
if (typeof value2 === "bigint") {
|
|
69617
69894
|
return value2;
|
|
69618
69895
|
}
|
|
@@ -69622,14 +69899,14 @@ var apiIntegerBigInt = z40.preprocess((value2, ctx) => {
|
|
|
69622
69899
|
code: "custom",
|
|
69623
69900
|
message: "Invalid integer BigInt format"
|
|
69624
69901
|
});
|
|
69625
|
-
return
|
|
69902
|
+
return z42.NEVER;
|
|
69626
69903
|
}
|
|
69627
69904
|
if (!Number.isSafeInteger(value2)) {
|
|
69628
69905
|
ctx.addIssue({
|
|
69629
69906
|
code: "custom",
|
|
69630
69907
|
message: "Unsafe integer number: pass large integer values as strings"
|
|
69631
69908
|
});
|
|
69632
|
-
return
|
|
69909
|
+
return z42.NEVER;
|
|
69633
69910
|
}
|
|
69634
69911
|
return value2;
|
|
69635
69912
|
}
|
|
@@ -69640,65 +69917,65 @@ var apiIntegerBigInt = z40.preprocess((value2, ctx) => {
|
|
|
69640
69917
|
code: "custom",
|
|
69641
69918
|
message: "Invalid integer BigInt format"
|
|
69642
69919
|
});
|
|
69643
|
-
return
|
|
69920
|
+
return z42.NEVER;
|
|
69644
69921
|
}
|
|
69645
69922
|
return trimmed;
|
|
69646
69923
|
}
|
|
69647
69924
|
return value2;
|
|
69648
|
-
},
|
|
69925
|
+
}, z42.coerce.bigint());
|
|
69649
69926
|
|
|
69650
69927
|
// ../../packages/dalp/api-contract/src/routes/addons/xvp/routes/xvp.read.schema.ts
|
|
69651
|
-
import { z as
|
|
69652
|
-
var XvpSettlementFlowReadSchema =
|
|
69653
|
-
id:
|
|
69654
|
-
isExternal:
|
|
69655
|
-
externalChainId:
|
|
69928
|
+
import { z as z43 } from "zod";
|
|
69929
|
+
var XvpSettlementFlowReadSchema = z43.object({
|
|
69930
|
+
id: z43.string(),
|
|
69931
|
+
isExternal: z43.boolean(),
|
|
69932
|
+
externalChainId: z43.coerce.number(),
|
|
69656
69933
|
amount: bigDecimal().meta({ description: "Flow amount with arbitrary precision", examples: ["1000.50"] }),
|
|
69657
69934
|
amountExact: apiBigInt,
|
|
69658
|
-
from:
|
|
69659
|
-
to:
|
|
69660
|
-
asset:
|
|
69935
|
+
from: z43.object({ id: ethereumAddress }),
|
|
69936
|
+
to: z43.object({ id: ethereumAddress }),
|
|
69937
|
+
asset: z43.object({
|
|
69661
69938
|
id: ethereumAddress,
|
|
69662
69939
|
decimals: decimals(),
|
|
69663
69940
|
symbol: assetSymbol()
|
|
69664
69941
|
}).nullable(),
|
|
69665
|
-
assetReference:
|
|
69666
|
-
id:
|
|
69942
|
+
assetReference: z43.object({
|
|
69943
|
+
id: z43.string(),
|
|
69667
69944
|
address: ethereumAddress,
|
|
69668
69945
|
decimals: decimals()
|
|
69669
69946
|
}).nullable()
|
|
69670
69947
|
});
|
|
69671
|
-
var XvpSettlementApprovalSchema =
|
|
69672
|
-
id:
|
|
69673
|
-
approved:
|
|
69948
|
+
var XvpSettlementApprovalSchema = z43.object({
|
|
69949
|
+
id: z43.string(),
|
|
69950
|
+
approved: z43.boolean(),
|
|
69674
69951
|
timestamp: timestamp().nullable(),
|
|
69675
|
-
account:
|
|
69952
|
+
account: z43.object({ id: ethereumAddress })
|
|
69676
69953
|
});
|
|
69677
|
-
var XvpSettlementCancelVoteSchema =
|
|
69678
|
-
id:
|
|
69954
|
+
var XvpSettlementCancelVoteSchema = z43.object({
|
|
69955
|
+
id: z43.string(),
|
|
69679
69956
|
votedAt: timestamp().nullable(),
|
|
69680
|
-
active:
|
|
69681
|
-
account:
|
|
69957
|
+
active: z43.boolean(),
|
|
69958
|
+
account: z43.object({ id: ethereumAddress })
|
|
69682
69959
|
});
|
|
69683
69960
|
var XvpSettlementReadGraphSchema = XvpSettlementGraphItemSchema.extend({
|
|
69684
|
-
secret:
|
|
69685
|
-
secretRevealed:
|
|
69961
|
+
secret: z43.string().meta({ description: "Secret from GraphQL", examples: ["0x1234..."] }).nullable().optional(),
|
|
69962
|
+
secretRevealed: z43.boolean(),
|
|
69686
69963
|
secretRevealedAt: timestamp().nullable(),
|
|
69687
|
-
secretRevealTx:
|
|
69688
|
-
secretRevealedBy:
|
|
69964
|
+
secretRevealTx: z43.string().nullable(),
|
|
69965
|
+
secretRevealedBy: z43.object({ id: ethereumAddress }).nullable(),
|
|
69689
69966
|
hashlock: HashlockSchema.nullable().optional(),
|
|
69690
|
-
autoExecute:
|
|
69691
|
-
approvals:
|
|
69692
|
-
cancelVotes:
|
|
69693
|
-
flows:
|
|
69694
|
-
systemAddon:
|
|
69967
|
+
autoExecute: z43.boolean(),
|
|
69968
|
+
approvals: z43.array(XvpSettlementApprovalSchema),
|
|
69969
|
+
cancelVotes: z43.array(XvpSettlementCancelVoteSchema),
|
|
69970
|
+
flows: z43.array(XvpSettlementFlowReadSchema),
|
|
69971
|
+
systemAddon: z43.object({ id: ethereumAddress })
|
|
69695
69972
|
});
|
|
69696
69973
|
var XvpSettlementReadSchema = XvpSettlementReadGraphSchema.extend({
|
|
69697
|
-
hasStoredSecret:
|
|
69974
|
+
hasStoredSecret: z43.boolean().meta({
|
|
69698
69975
|
description: "Whether an encrypted secret is stored in the database for this settlement",
|
|
69699
69976
|
examples: [true, false]
|
|
69700
69977
|
}),
|
|
69701
|
-
userApproved:
|
|
69978
|
+
userApproved: z43.boolean().meta({
|
|
69702
69979
|
description: "Whether the current user has approved this settlement",
|
|
69703
69980
|
examples: [true, false]
|
|
69704
69981
|
})
|
|
@@ -69785,52 +70062,52 @@ var execute = v1Contract.route({
|
|
|
69785
70062
|
}).input(XvpExecuteInputSchema).output(XvpExecuteOutputSchema);
|
|
69786
70063
|
|
|
69787
70064
|
// ../../packages/dalp/api-contract/src/routes/admin/routes/organizations.list.schema.ts
|
|
69788
|
-
import { z as
|
|
69789
|
-
var OrganizationListItemSchema =
|
|
69790
|
-
id:
|
|
69791
|
-
name:
|
|
69792
|
-
slug:
|
|
70065
|
+
import { z as z44 } from "zod";
|
|
70066
|
+
var OrganizationListItemSchema = z44.object({
|
|
70067
|
+
id: z44.string().meta({ description: "Organization ID", examples: ["org_123abc"] }),
|
|
70068
|
+
name: z44.string().meta({ description: "Organization name", examples: ["Acme Corp"] }),
|
|
70069
|
+
slug: z44.string().meta({
|
|
69793
70070
|
description: "Organization slug for URLs",
|
|
69794
70071
|
examples: ["acme-corp"]
|
|
69795
70072
|
}),
|
|
69796
|
-
logo:
|
|
70073
|
+
logo: z44.string().nullable().meta({
|
|
69797
70074
|
description: "URL to organization logo",
|
|
69798
70075
|
examples: ["https://example.com/logo.png"]
|
|
69799
70076
|
}),
|
|
69800
70077
|
createdAt: timestamp().meta({ description: "When the organization was created" }),
|
|
69801
|
-
ownerCount:
|
|
70078
|
+
ownerCount: z44.number().int().nonnegative().meta({
|
|
69802
70079
|
description: "Number of owners in the organization",
|
|
69803
70080
|
examples: [2]
|
|
69804
70081
|
}),
|
|
69805
|
-
ownerEmails:
|
|
70082
|
+
ownerEmails: z44.array(z44.string().email()).meta({
|
|
69806
70083
|
description: "Email addresses for all organization owners",
|
|
69807
70084
|
examples: [["owner@company.com", "owner2@company.com"]]
|
|
69808
70085
|
}),
|
|
69809
|
-
memberCount:
|
|
70086
|
+
memberCount: z44.number().int().nonnegative().meta({
|
|
69810
70087
|
description: "Total number of members (including owners)",
|
|
69811
70088
|
examples: [10]
|
|
69812
70089
|
}),
|
|
69813
|
-
assetCount:
|
|
70090
|
+
assetCount: z44.number().int().nonnegative().meta({
|
|
69814
70091
|
description: "Number of assets owned by the organization",
|
|
69815
70092
|
examples: [5]
|
|
69816
70093
|
})
|
|
69817
70094
|
});
|
|
69818
70095
|
var OrganizationListInputSchema = PaginatedListSchema.extend({
|
|
69819
70096
|
orderBy: PaginatedListSchema.shape.orderBy.default("createdAt").describe("Field to order by (supports: name, slug, createdAt)"),
|
|
69820
|
-
filters:
|
|
69821
|
-
search:
|
|
70097
|
+
filters: z44.object({
|
|
70098
|
+
search: z44.string().optional().meta({
|
|
69822
70099
|
description: "Search query for organization name or slug",
|
|
69823
70100
|
examples: ["acme", "corp"]
|
|
69824
70101
|
})
|
|
69825
70102
|
}).optional()
|
|
69826
70103
|
});
|
|
69827
|
-
var OrganizationListOutputSchema =
|
|
69828
|
-
items:
|
|
69829
|
-
total:
|
|
70104
|
+
var OrganizationListOutputSchema = z44.object({
|
|
70105
|
+
items: z44.array(OrganizationListItemSchema).meta({ description: "List of organizations" }),
|
|
70106
|
+
total: z44.number().int().nonnegative().meta({
|
|
69830
70107
|
description: "Total count of organizations matching the query"
|
|
69831
70108
|
}),
|
|
69832
|
-
limit:
|
|
69833
|
-
offset:
|
|
70109
|
+
limit: z44.number().int().positive().optional().meta({ description: "Applied limit" }),
|
|
70110
|
+
offset: z44.number().int().nonnegative().meta({ description: "Applied offset" })
|
|
69834
70111
|
});
|
|
69835
70112
|
|
|
69836
70113
|
// ../../packages/dalp/api-contract/src/routes/admin/admin.contract.ts
|
|
@@ -69843,22 +70120,22 @@ var organizationsList = v1Contract.route({
|
|
|
69843
70120
|
}).input(OrganizationListInputSchema).output(OrganizationListOutputSchema);
|
|
69844
70121
|
|
|
69845
70122
|
// ../../packages/dalp/api-contract/src/routes/contacts/routes/contacts.delete.schema.ts
|
|
69846
|
-
import { z as
|
|
69847
|
-
var ContactsDeleteSchema =
|
|
69848
|
-
id:
|
|
70123
|
+
import { z as z45 } from "zod";
|
|
70124
|
+
var ContactsDeleteSchema = z45.object({
|
|
70125
|
+
id: z45.uuid()
|
|
69849
70126
|
});
|
|
69850
|
-
var ContactsDeleteOutputSchema =
|
|
69851
|
-
success:
|
|
70127
|
+
var ContactsDeleteOutputSchema = z45.object({
|
|
70128
|
+
success: z45.literal(true)
|
|
69852
70129
|
});
|
|
69853
70130
|
|
|
69854
70131
|
// ../../packages/dalp/api-contract/src/routes/contacts/routes/contacts.list.schema.ts
|
|
69855
|
-
import { z as
|
|
70132
|
+
import { z as z47 } from "zod";
|
|
69856
70133
|
|
|
69857
70134
|
// ../../packages/dalp/api-contract/src/routes/contacts/routes/contacts.record.schema.ts
|
|
69858
|
-
import { z as
|
|
69859
|
-
var ContactSchema =
|
|
69860
|
-
id:
|
|
69861
|
-
name:
|
|
70135
|
+
import { z as z46 } from "zod";
|
|
70136
|
+
var ContactSchema = z46.object({
|
|
70137
|
+
id: z46.string(),
|
|
70138
|
+
name: z46.string(),
|
|
69862
70139
|
wallet: ethereumAddress,
|
|
69863
70140
|
createdAt: timestamp(),
|
|
69864
70141
|
updatedAt: timestamp()
|
|
@@ -69866,29 +70143,29 @@ var ContactSchema = z44.object({
|
|
|
69866
70143
|
|
|
69867
70144
|
// ../../packages/dalp/api-contract/src/routes/contacts/routes/contacts.list.schema.ts
|
|
69868
70145
|
var ContactsListInputSchema = PaginatedListSchema.extend({
|
|
69869
|
-
orderBy:
|
|
69870
|
-
filters:
|
|
69871
|
-
search:
|
|
70146
|
+
orderBy: z47.enum(["createdAt", "updatedAt", "name", "wallet"]).default("createdAt"),
|
|
70147
|
+
filters: z47.object({
|
|
70148
|
+
search: z47.string().min(1).max(120).optional().meta({ description: "Case-insensitive match against name or wallet address", examples: ["alice", "0x71C7"] })
|
|
69872
70149
|
}).optional()
|
|
69873
70150
|
});
|
|
69874
|
-
var ContactsListOutputSchema =
|
|
70151
|
+
var ContactsListOutputSchema = z47.object({
|
|
69875
70152
|
items: ContactSchema.array(),
|
|
69876
|
-
total:
|
|
69877
|
-
limit:
|
|
69878
|
-
offset:
|
|
70153
|
+
total: z47.number(),
|
|
70154
|
+
limit: z47.number().optional(),
|
|
70155
|
+
offset: z47.number()
|
|
69879
70156
|
});
|
|
69880
70157
|
|
|
69881
70158
|
// ../../packages/dalp/api-contract/src/routes/contacts/routes/contacts.read.schema.ts
|
|
69882
|
-
import { z as
|
|
69883
|
-
var ContactsReadSchema =
|
|
69884
|
-
id:
|
|
70159
|
+
import { z as z48 } from "zod";
|
|
70160
|
+
var ContactsReadSchema = z48.object({
|
|
70161
|
+
id: z48.string().uuid()
|
|
69885
70162
|
});
|
|
69886
70163
|
|
|
69887
70164
|
// ../../packages/dalp/api-contract/src/routes/contacts/routes/contacts.search.schema.ts
|
|
69888
|
-
import { z as
|
|
69889
|
-
var ContactsSearchSchema =
|
|
69890
|
-
query:
|
|
69891
|
-
limit:
|
|
70165
|
+
import { z as z49 } from "zod";
|
|
70166
|
+
var ContactsSearchSchema = z49.object({
|
|
70167
|
+
query: z49.string().trim().min(1).max(120).meta({ description: "Case-insensitive search across contact name and wallet", examples: ["alice", "0x71C7"] }),
|
|
70168
|
+
limit: z49.number().int().positive().max(50).default(10)
|
|
69892
70169
|
});
|
|
69893
70170
|
var ContactSearchResultSchema = ContactSchema.pick({
|
|
69894
70171
|
id: true,
|
|
@@ -69898,10 +70175,10 @@ var ContactSearchResultSchema = ContactSchema.pick({
|
|
|
69898
70175
|
var ContactsSearchOutputSchema = ContactSearchResultSchema.array();
|
|
69899
70176
|
|
|
69900
70177
|
// ../../packages/dalp/api-contract/src/routes/contacts/routes/contacts.upsert.schema.ts
|
|
69901
|
-
import { z as
|
|
69902
|
-
var ContactsUpsertSchema =
|
|
69903
|
-
id:
|
|
69904
|
-
name:
|
|
70178
|
+
import { z as z50 } from "zod";
|
|
70179
|
+
var ContactsUpsertSchema = z50.object({
|
|
70180
|
+
id: z50.uuid().optional(),
|
|
70181
|
+
name: z50.string().trim().min(1, "Contact name cannot be empty").max(120).meta({ description: "Human readable label for the contact", examples: ["Alice", "Treasury Wallet"] }),
|
|
69905
70182
|
wallet: ethereumAddress
|
|
69906
70183
|
});
|
|
69907
70184
|
|
|
@@ -69943,11 +70220,11 @@ var search = v1Contract.route({
|
|
|
69943
70220
|
}).input(ContactsSearchSchema).output(ContactsSearchOutputSchema);
|
|
69944
70221
|
|
|
69945
70222
|
// ../../packages/dalp/api-contract/src/routes/exchange-rates/exchange-rates.contract.ts
|
|
69946
|
-
import { z as
|
|
70223
|
+
import { z as z55 } from "zod";
|
|
69947
70224
|
|
|
69948
70225
|
// ../../packages/core/validation/src/fiat-currency.ts
|
|
69949
70226
|
import * as cc from "currency-codes";
|
|
69950
|
-
import { z as
|
|
70227
|
+
import { z as z51 } from "zod";
|
|
69951
70228
|
var NON_FIAT_X_CODES = new Set([
|
|
69952
70229
|
"XAG",
|
|
69953
70230
|
"XAU",
|
|
@@ -69991,7 +70268,7 @@ var fiatCurrencyMetadata = Object.fromEntries(allFiatCurrencies.map((code2) => {
|
|
|
69991
70268
|
const metadata = getCurrencyMetadata(code2);
|
|
69992
70269
|
return [code2, metadata ?? { name: code2, decimals: 2 }];
|
|
69993
70270
|
}));
|
|
69994
|
-
var fiatCurrency = () =>
|
|
70271
|
+
var fiatCurrency = () => z51.string().regex(/^[A-Z]{3}$/, "Currency code must be 3 uppercase letters").refine((code2) => allFiatCurrenciesSet.has(code2), {
|
|
69995
70272
|
message: "Invalid ISO 4217 alpha-3 currency code"
|
|
69996
70273
|
}).meta({
|
|
69997
70274
|
description: "Fiat currency code (ISO 4217)",
|
|
@@ -69999,45 +70276,45 @@ var fiatCurrency = () => z49.string().regex(/^[A-Z]{3}$/, "Currency code must be
|
|
|
69999
70276
|
});
|
|
70000
70277
|
|
|
70001
70278
|
// ../../packages/dalp/api-contract/src/routes/exchange-rates/routes/exchange-rates.history.schema.ts
|
|
70002
|
-
import { z as
|
|
70003
|
-
var ExchangeRatesHistorySchema =
|
|
70279
|
+
import { z as z52 } from "zod";
|
|
70280
|
+
var ExchangeRatesHistorySchema = z52.object({
|
|
70004
70281
|
baseCurrency: fiatCurrency(),
|
|
70005
70282
|
quoteCurrency: fiatCurrency(),
|
|
70006
70283
|
startDate: timestamp().optional(),
|
|
70007
70284
|
endDate: timestamp().optional(),
|
|
70008
|
-
limit:
|
|
70285
|
+
limit: z52.number().int().positive().max(1000).default(100)
|
|
70009
70286
|
});
|
|
70010
70287
|
|
|
70011
70288
|
// ../../packages/dalp/api-contract/src/routes/exchange-rates/routes/exchange-rates.list.schema.ts
|
|
70012
|
-
import { z as
|
|
70289
|
+
import { z as z53 } from "zod";
|
|
70013
70290
|
var ExchangeRatesListSchema = PaginatedListSchema.extend({
|
|
70014
|
-
baseCurrencies:
|
|
70015
|
-
quoteCurrencies:
|
|
70291
|
+
baseCurrencies: z53.array(fiatCurrency()).optional(),
|
|
70292
|
+
quoteCurrencies: z53.array(fiatCurrency()).optional()
|
|
70016
70293
|
});
|
|
70017
|
-
var ExchangeRatesListOutputSchema =
|
|
70018
|
-
items:
|
|
70294
|
+
var ExchangeRatesListOutputSchema = z53.object({
|
|
70295
|
+
items: z53.array(z53.object({
|
|
70019
70296
|
baseCurrency: fiatCurrency(),
|
|
70020
70297
|
quoteCurrency: fiatCurrency(),
|
|
70021
|
-
rate: v1FrozenRequired(
|
|
70298
|
+
rate: v1FrozenRequired(z53.number().nullable(), { nonNullable: true }),
|
|
70022
70299
|
effectiveAt: v1FrozenRequired(timestamp().nullable(), { nonNullable: true }),
|
|
70023
70300
|
updatedAt: v1FrozenRequired(timestamp().nullable(), { nonNullable: true }),
|
|
70024
70301
|
feedAddress: ethereumAddress.nullable()
|
|
70025
70302
|
})),
|
|
70026
|
-
totalCount:
|
|
70027
|
-
offset:
|
|
70028
|
-
limit:
|
|
70303
|
+
totalCount: z53.number(),
|
|
70304
|
+
offset: z53.number(),
|
|
70305
|
+
limit: z53.number().optional()
|
|
70029
70306
|
});
|
|
70030
70307
|
|
|
70031
70308
|
// ../../packages/dalp/api-contract/src/routes/exchange-rates/routes/exchange-rates.read.schema.ts
|
|
70032
|
-
import { z as
|
|
70033
|
-
var ExchangeRatesReadSchema =
|
|
70309
|
+
import { z as z54 } from "zod";
|
|
70310
|
+
var ExchangeRatesReadSchema = z54.object({
|
|
70034
70311
|
baseCurrency: fiatCurrency(),
|
|
70035
70312
|
quoteCurrency: fiatCurrency()
|
|
70036
70313
|
});
|
|
70037
|
-
var ExchangeRatesReadOutputSchema =
|
|
70314
|
+
var ExchangeRatesReadOutputSchema = z54.object({
|
|
70038
70315
|
baseCurrency: fiatCurrency(),
|
|
70039
70316
|
quoteCurrency: fiatCurrency(),
|
|
70040
|
-
rate:
|
|
70317
|
+
rate: z54.number().positive(),
|
|
70041
70318
|
effectiveAt: timestamp()
|
|
70042
70319
|
}).nullable();
|
|
70043
70320
|
|
|
@@ -70048,10 +70325,10 @@ var read3 = v1Contract.route({
|
|
|
70048
70325
|
description: "Get the current exchange rate between two currencies",
|
|
70049
70326
|
successDescription: "Exchange rate retrieved successfully",
|
|
70050
70327
|
tags: [V1_TAG.exchangeRates]
|
|
70051
|
-
}).input(ExchangeRatesReadSchema).output(
|
|
70052
|
-
baseCurrency:
|
|
70053
|
-
quoteCurrency:
|
|
70054
|
-
rate:
|
|
70328
|
+
}).input(ExchangeRatesReadSchema).output(z55.object({
|
|
70329
|
+
baseCurrency: z55.string(),
|
|
70330
|
+
quoteCurrency: z55.string(),
|
|
70331
|
+
rate: z55.number(),
|
|
70055
70332
|
effectiveAt: timestamp()
|
|
70056
70333
|
}).nullable());
|
|
70057
70334
|
var list4 = v1Contract.route({
|
|
@@ -70067,34 +70344,34 @@ var history = v1Contract.route({
|
|
|
70067
70344
|
description: "Get historical exchange rates for a currency pair",
|
|
70068
70345
|
successDescription: "Historical rates retrieved successfully",
|
|
70069
70346
|
tags: [V1_TAG.exchangeRates]
|
|
70070
|
-
}).input(ExchangeRatesHistorySchema).output(
|
|
70071
|
-
baseCurrency:
|
|
70072
|
-
quoteCurrency:
|
|
70073
|
-
rate:
|
|
70347
|
+
}).input(ExchangeRatesHistorySchema).output(z55.array(z55.object({
|
|
70348
|
+
baseCurrency: z55.string(),
|
|
70349
|
+
quoteCurrency: z55.string(),
|
|
70350
|
+
rate: z55.number(),
|
|
70074
70351
|
effectiveAt: timestamp()
|
|
70075
70352
|
})));
|
|
70076
70353
|
|
|
70077
70354
|
// ../../packages/dalp/api-contract/src/routes/external-token/routes/external-token.list.schema.ts
|
|
70078
|
-
import { z as
|
|
70079
|
-
var ExternalTokenSchema =
|
|
70355
|
+
import { z as z56 } from "zod";
|
|
70356
|
+
var ExternalTokenSchema = z56.object({
|
|
70080
70357
|
id: ethereumAddress.meta({
|
|
70081
70358
|
description: "The token contract address",
|
|
70082
70359
|
examples: ["0x71C7656EC7ab88b098defB751B7401B5f6d8976F"]
|
|
70083
70360
|
}),
|
|
70084
|
-
name:
|
|
70085
|
-
symbol:
|
|
70361
|
+
name: z56.string().meta({ description: "The name of the token", examples: ["USD Coin", "Wrapped Ether"] }),
|
|
70362
|
+
symbol: z56.string().meta({ description: "The symbol of the token", examples: ["USDC", "WETH"] }),
|
|
70086
70363
|
decimals: decimals(),
|
|
70087
70364
|
totalSupply: bigDecimal().nullable().meta({ description: "The total supply of the token (scaled by decimals)", examples: ["1000000000.00"] }),
|
|
70088
70365
|
totalSupplyExact: apiBigInt.optional().meta({
|
|
70089
70366
|
description: "The total supply of the token (raw on-chain uint256)",
|
|
70090
70367
|
examples: ["1000000000000000000000"]
|
|
70091
70368
|
}),
|
|
70092
|
-
type:
|
|
70093
|
-
pausable:
|
|
70094
|
-
paused:
|
|
70369
|
+
type: z56.string().meta({ description: "The type assigned to the token", examples: ["stablecoin", "bond", "equity"] }),
|
|
70370
|
+
pausable: z56.object({
|
|
70371
|
+
paused: z56.boolean().meta({ description: "Whether the token is paused", examples: [true, false] })
|
|
70095
70372
|
}).nullable().optional(),
|
|
70096
70373
|
externalRegisteredAt: timestamp().nullable().meta({ description: "When the token was registered as external", examples: ["2024-01-15T10:30:00.000Z"] }),
|
|
70097
|
-
externalRegisteredBy:
|
|
70374
|
+
externalRegisteredBy: z56.object({
|
|
70098
70375
|
id: ethereumAddress.meta({
|
|
70099
70376
|
description: "Address that registered the token",
|
|
70100
70377
|
examples: ["0x2546BcD3c84621e976D8185a91A922aE77ECEc30"]
|
|
@@ -70103,18 +70380,18 @@ var ExternalTokenSchema = z54.object({
|
|
|
70103
70380
|
description: "Account that registered the token",
|
|
70104
70381
|
examples: [{ id: "0x2546BcD3c84621e976D8185a91A922aE77ECEc30" }]
|
|
70105
70382
|
}),
|
|
70106
|
-
externalDetectedInterfaces:
|
|
70107
|
-
implementsERC3643:
|
|
70108
|
-
implementsSMART:
|
|
70383
|
+
externalDetectedInterfaces: z56.array(z56.string()).nullable().meta({ description: "Detected interfaces on the token", examples: [["ERC20", "Pausable"]] }),
|
|
70384
|
+
implementsERC3643: z56.boolean().meta({ description: "Whether the token implements ERC3643", examples: [true, false] }),
|
|
70385
|
+
implementsSMART: z56.boolean().meta({ description: "Whether the token implements SMART", examples: [true, false] })
|
|
70109
70386
|
});
|
|
70110
|
-
var ExternalTokenListSchema =
|
|
70111
|
-
var ExternalTokenListInputSchema =
|
|
70112
|
-
orderBy:
|
|
70113
|
-
orderDirection:
|
|
70387
|
+
var ExternalTokenListSchema = z56.array(ExternalTokenSchema);
|
|
70388
|
+
var ExternalTokenListInputSchema = z56.object({
|
|
70389
|
+
orderBy: z56.string().optional().meta({ description: "Field to order by", examples: ["name", "symbol", "type"] }),
|
|
70390
|
+
orderDirection: z56.enum(["asc", "desc"]).optional().meta({ description: "Order direction", examples: ["asc", "desc"] })
|
|
70114
70391
|
});
|
|
70115
|
-
var ExternalTokenListResponseSchema =
|
|
70392
|
+
var ExternalTokenListResponseSchema = z56.object({
|
|
70116
70393
|
tokens: ExternalTokenListSchema,
|
|
70117
|
-
totalCount:
|
|
70394
|
+
totalCount: z56.number().int().nonnegative()
|
|
70118
70395
|
});
|
|
70119
70396
|
|
|
70120
70397
|
// ../../packages/dalp/api-contract/src/routes/external-token/routes/external-token.list.contract.ts
|
|
@@ -70127,20 +70404,20 @@ var externalTokenListContract = v1Contract.route({
|
|
|
70127
70404
|
}).input(ExternalTokenListInputSchema).output(ExternalTokenListResponseSchema);
|
|
70128
70405
|
|
|
70129
70406
|
// ../../packages/dalp/api-contract/src/routes/external-token/routes/mutations/external-token.register.schema.ts
|
|
70130
|
-
import { z as
|
|
70131
|
-
var ExternalTokenRegisterInputSchema =
|
|
70407
|
+
import { z as z57 } from "zod";
|
|
70408
|
+
var ExternalTokenRegisterInputSchema = z57.object({
|
|
70132
70409
|
tokenAddress: ethereumAddress.meta({
|
|
70133
70410
|
description: "The external token contract address to register",
|
|
70134
70411
|
examples: ["0x71C7656EC7ab88b098defB751B7401B5f6d8976F"]
|
|
70135
70412
|
}),
|
|
70136
|
-
tokenType:
|
|
70413
|
+
tokenType: z57.string().min(1, "Token type cannot be empty").meta({
|
|
70137
70414
|
description: "The type to assign to the token",
|
|
70138
70415
|
examples: ["bond", "equity", "stablecoin"]
|
|
70139
70416
|
}),
|
|
70140
70417
|
walletVerification: UserVerificationSchema.optional()
|
|
70141
70418
|
});
|
|
70142
|
-
var ExternalTokenRegisterOutputSchema =
|
|
70143
|
-
txHash:
|
|
70419
|
+
var ExternalTokenRegisterOutputSchema = z57.object({
|
|
70420
|
+
txHash: z57.string().meta({
|
|
70144
70421
|
description: "The transaction hash",
|
|
70145
70422
|
examples: ["0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef12"]
|
|
70146
70423
|
}),
|
|
@@ -70160,9 +70437,9 @@ var externalTokenRegisterContract = v1Contract.route({
|
|
|
70160
70437
|
}).input(ExternalTokenRegisterInputSchema).output(ExternalTokenRegisterOutputSchema);
|
|
70161
70438
|
|
|
70162
70439
|
// ../../packages/dalp/api-contract/src/routes/identity-recovery/routes/recovery.execute.schema.ts
|
|
70163
|
-
import { z as
|
|
70164
|
-
var RecoveryExecuteInputSchema =
|
|
70165
|
-
userId:
|
|
70440
|
+
import { z as z58 } from "zod";
|
|
70441
|
+
var RecoveryExecuteInputSchema = z58.object({
|
|
70442
|
+
userId: z58.string().min(1).meta({
|
|
70166
70443
|
description: "The internal database ID of the user to recover"
|
|
70167
70444
|
}),
|
|
70168
70445
|
wallet: ethereumAddress.optional().meta({
|
|
@@ -70172,45 +70449,45 @@ var RecoveryExecuteInputSchema = z56.object({
|
|
|
70172
70449
|
description: "Wallet verification (PIN/2FA) for the admin executing the recovery"
|
|
70173
70450
|
})
|
|
70174
70451
|
});
|
|
70175
|
-
var RecoveryExecuteOutputSchema =
|
|
70176
|
-
success:
|
|
70452
|
+
var RecoveryExecuteOutputSchema = z58.object({
|
|
70453
|
+
success: z58.boolean().meta({
|
|
70177
70454
|
description: "Whether the workflow was submitted successfully"
|
|
70178
70455
|
})
|
|
70179
70456
|
});
|
|
70180
70457
|
|
|
70181
70458
|
// ../../packages/core/validation/src/identity-status.ts
|
|
70182
|
-
import { z as
|
|
70459
|
+
import { z as z59 } from "zod";
|
|
70183
70460
|
var identityStatuses = ["pending", "registered"];
|
|
70184
70461
|
var indexedIdentityStatuses = ["PENDING", "ACTIVE"];
|
|
70185
|
-
var IdentityStatusSchema =
|
|
70462
|
+
var IdentityStatusSchema = z59.enum(identityStatuses).meta({ description: "On-chain identity registration status", examples: ["pending", "registered"] });
|
|
70186
70463
|
var identityStatus = () => IdentityStatusSchema;
|
|
70187
|
-
var IndexedIdentityStatusSchema =
|
|
70464
|
+
var IndexedIdentityStatusSchema = z59.enum(indexedIdentityStatuses).meta({ description: "Indexed identity registration status", examples: ["PENDING", "ACTIVE"] });
|
|
70188
70465
|
var indexedIdentityStatus = () => IndexedIdentityStatusSchema;
|
|
70189
70466
|
|
|
70190
70467
|
// ../../packages/dalp/api-contract/src/routes/identity-recovery/routes/recovery.preview.schema.ts
|
|
70191
|
-
import { z as
|
|
70192
|
-
var RecoveryPreviewParamsSchema =
|
|
70193
|
-
userId:
|
|
70468
|
+
import { z as z60 } from "zod";
|
|
70469
|
+
var RecoveryPreviewParamsSchema = z60.object({
|
|
70470
|
+
userId: z60.string().min(1).meta({
|
|
70194
70471
|
description: "The internal database ID of the user to recover"
|
|
70195
70472
|
})
|
|
70196
70473
|
});
|
|
70197
|
-
var RecoveryPreviewQuerySchema =
|
|
70474
|
+
var RecoveryPreviewQuerySchema = z60.object({
|
|
70198
70475
|
wallet: ethereumAddress.optional().meta({
|
|
70199
70476
|
description: "The wallet address that has lost access and needs recovery. If omitted, defaults to the user's personal identity wallet."
|
|
70200
70477
|
})
|
|
70201
70478
|
});
|
|
70202
|
-
var RecoveryPreviewInputSchema =
|
|
70479
|
+
var RecoveryPreviewInputSchema = z60.object({
|
|
70203
70480
|
...RecoveryPreviewParamsSchema.shape,
|
|
70204
70481
|
...RecoveryPreviewQuerySchema.shape
|
|
70205
70482
|
});
|
|
70206
|
-
var TokenBalanceSchema =
|
|
70483
|
+
var TokenBalanceSchema = z60.object({
|
|
70207
70484
|
tokenAddress: ethereumAddress.meta({
|
|
70208
70485
|
description: "The token contract address"
|
|
70209
70486
|
}),
|
|
70210
|
-
tokenName:
|
|
70487
|
+
tokenName: z60.string().meta({
|
|
70211
70488
|
description: "The token name"
|
|
70212
70489
|
}),
|
|
70213
|
-
tokenSymbol:
|
|
70490
|
+
tokenSymbol: z60.string().meta({
|
|
70214
70491
|
description: "The token symbol"
|
|
70215
70492
|
}),
|
|
70216
70493
|
balance: bigDecimal().meta({
|
|
@@ -70219,55 +70496,55 @@ var TokenBalanceSchema = z58.object({
|
|
|
70219
70496
|
balanceExact: apiBigInt.optional().meta({
|
|
70220
70497
|
description: "The token balance (raw on-chain uint256)"
|
|
70221
70498
|
}),
|
|
70222
|
-
decimals:
|
|
70499
|
+
decimals: z60.number().meta({
|
|
70223
70500
|
description: "The token decimals"
|
|
70224
70501
|
})
|
|
70225
70502
|
});
|
|
70226
|
-
var RecoveryPreviewOutputSchema =
|
|
70227
|
-
user:
|
|
70228
|
-
id:
|
|
70503
|
+
var RecoveryPreviewOutputSchema = z60.object({
|
|
70504
|
+
user: z60.object({
|
|
70505
|
+
id: z60.string().meta({
|
|
70229
70506
|
description: "The internal database ID of the user"
|
|
70230
70507
|
}),
|
|
70231
|
-
email:
|
|
70508
|
+
email: z60.string().nullable().meta({
|
|
70232
70509
|
description: "The user's email address"
|
|
70233
70510
|
}),
|
|
70234
|
-
name:
|
|
70511
|
+
name: z60.string().nullable().meta({
|
|
70235
70512
|
description: "The user's display name"
|
|
70236
70513
|
})
|
|
70237
70514
|
}),
|
|
70238
70515
|
lostWallet: ethereumAddress.meta({
|
|
70239
70516
|
description: "The wallet address that has lost access"
|
|
70240
70517
|
}),
|
|
70241
|
-
identity:
|
|
70518
|
+
identity: z60.object({
|
|
70242
70519
|
id: ethereumAddress.nullable().meta({
|
|
70243
70520
|
description: "The OnchainID contract address"
|
|
70244
70521
|
}),
|
|
70245
70522
|
status: identityStatus().nullable().meta({
|
|
70246
70523
|
description: "The identity registration status (pending or registered)"
|
|
70247
70524
|
}),
|
|
70248
|
-
isMarkedAsLost:
|
|
70525
|
+
isMarkedAsLost: z60.boolean().meta({
|
|
70249
70526
|
description: "Whether the wallet is already marked as lost"
|
|
70250
70527
|
})
|
|
70251
70528
|
}),
|
|
70252
|
-
tokenBalances:
|
|
70529
|
+
tokenBalances: z60.array(TokenBalanceSchema).meta({
|
|
70253
70530
|
description: "Token balances that will need recovery"
|
|
70254
70531
|
}),
|
|
70255
|
-
canRecover:
|
|
70532
|
+
canRecover: z60.boolean().meta({
|
|
70256
70533
|
description: "Whether recovery can proceed"
|
|
70257
70534
|
}),
|
|
70258
|
-
blockingReasons:
|
|
70535
|
+
blockingReasons: z60.array(z60.string()).meta({
|
|
70259
70536
|
description: "Reasons why recovery cannot proceed (if canRecover is false)"
|
|
70260
70537
|
})
|
|
70261
70538
|
});
|
|
70262
70539
|
|
|
70263
70540
|
// ../../packages/dalp/api-contract/src/routes/identity-recovery/routes/recovery.status.schema.ts
|
|
70264
|
-
import { z as
|
|
70265
|
-
var RecoveryStatusInputSchema =
|
|
70266
|
-
userId:
|
|
70541
|
+
import { z as z61 } from "zod";
|
|
70542
|
+
var RecoveryStatusInputSchema = z61.object({
|
|
70543
|
+
userId: z61.string().min(1).meta({
|
|
70267
70544
|
description: "The internal database ID of the user being recovered"
|
|
70268
70545
|
})
|
|
70269
70546
|
});
|
|
70270
|
-
var RecoveryPhaseSchema =
|
|
70547
|
+
var RecoveryPhaseSchema = z61.enum([
|
|
70271
70548
|
"creating-wallet",
|
|
70272
70549
|
"creating-identity",
|
|
70273
70550
|
"creating-smart-wallet",
|
|
@@ -70282,14 +70559,14 @@ var RecoveryPhaseSchema = z59.enum([
|
|
|
70282
70559
|
"completed-with-token-failures",
|
|
70283
70560
|
"failed"
|
|
70284
70561
|
]);
|
|
70285
|
-
var TokenRecoveryFailureReasonSchema =
|
|
70562
|
+
var TokenRecoveryFailureReasonSchema = z61.enum([
|
|
70286
70563
|
"TOKEN_PAUSED",
|
|
70287
70564
|
"MISSING_CUSTODIAN_ROLE",
|
|
70288
70565
|
"NO_TOKENS",
|
|
70289
70566
|
"RPC_ERROR",
|
|
70290
70567
|
"UNKNOWN"
|
|
70291
70568
|
]);
|
|
70292
|
-
var TokenRecoveryFailureSchema =
|
|
70569
|
+
var TokenRecoveryFailureSchema = z61.object({
|
|
70293
70570
|
tokenAddress: ethereumAddress.meta({
|
|
70294
70571
|
description: "Token contract whose forcedRecover call failed"
|
|
70295
70572
|
}),
|
|
@@ -70299,24 +70576,24 @@ var TokenRecoveryFailureSchema = z59.object({
|
|
|
70299
70576
|
reason: TokenRecoveryFailureReasonSchema.meta({
|
|
70300
70577
|
description: "Classified failure reason driving the operator's retry decision"
|
|
70301
70578
|
}),
|
|
70302
|
-
message:
|
|
70579
|
+
message: z61.string().meta({
|
|
70303
70580
|
description: "Operator-friendly explanation classified from the raw revert"
|
|
70304
70581
|
}),
|
|
70305
|
-
rawError:
|
|
70582
|
+
rawError: z61.string().meta({
|
|
70306
70583
|
description: "Verbatim error message from the contract call for debugging"
|
|
70307
70584
|
})
|
|
70308
70585
|
});
|
|
70309
|
-
var RecoveryStatusOutputSchema =
|
|
70586
|
+
var RecoveryStatusOutputSchema = z61.object({
|
|
70310
70587
|
phase: RecoveryPhaseSchema.meta({
|
|
70311
70588
|
description: "The current phase of the recovery workflow"
|
|
70312
70589
|
}),
|
|
70313
|
-
tokensRecovered:
|
|
70590
|
+
tokensRecovered: z61.number().meta({
|
|
70314
70591
|
description: "Number of tokens successfully recovered so far"
|
|
70315
70592
|
}),
|
|
70316
|
-
totalTokens:
|
|
70593
|
+
totalTokens: z61.number().meta({
|
|
70317
70594
|
description: "Total number of tokens to recover"
|
|
70318
70595
|
}),
|
|
70319
|
-
error:
|
|
70596
|
+
error: z61.string().nullable().meta({
|
|
70320
70597
|
description: "Error message if the workflow failed"
|
|
70321
70598
|
}),
|
|
70322
70599
|
newWallet: ethereumAddress.nullable().meta({
|
|
@@ -70325,7 +70602,7 @@ var RecoveryStatusOutputSchema = z59.object({
|
|
|
70325
70602
|
newIdentity: ethereumAddress.nullable().meta({
|
|
70326
70603
|
description: "New OnchainID address (populated when completed)"
|
|
70327
70604
|
}),
|
|
70328
|
-
tokenRecoveryFailures:
|
|
70605
|
+
tokenRecoveryFailures: z61.array(TokenRecoveryFailureSchema).meta({
|
|
70329
70606
|
description: "Per-token failure manifest. Empty when phase is 'completed'. " + "Populated when phase is 'completed-with-token-failures' — the on-chain " + "recovery link persists, so any listed token can be reclaimed later via retry."
|
|
70330
70607
|
})
|
|
70331
70608
|
});
|
|
@@ -70360,237 +70637,6 @@ import { z as z74 } from "zod";
|
|
|
70360
70637
|
// ../../packages/dalp/api-contract/src/routes/token/routes/token.search.schema.ts
|
|
70361
70638
|
import { z as z71 } from "zod";
|
|
70362
70639
|
|
|
70363
|
-
// ../../packages/core/validation/src/access-control-roles.ts
|
|
70364
|
-
import { z as z61 } from "zod";
|
|
70365
|
-
|
|
70366
|
-
// ../../packages/core/validation/src/ethereum-hex.ts
|
|
70367
|
-
import { isHex as isHex2 } from "viem";
|
|
70368
|
-
import { z as z60 } from "zod";
|
|
70369
|
-
var ethereumHex = z60.string().meta({
|
|
70370
|
-
description: "A valid Ethereum hex string (starting with 0x)",
|
|
70371
|
-
examples: ["0x1234abcd", "0x00", "0xdeadbeef"]
|
|
70372
|
-
}).min(2, "Hex string must be at least 2 characters long (0x)").refine(isHex2, {
|
|
70373
|
-
message: "Invalid hex format - must start with '0x' followed by hexadecimal characters"
|
|
70374
|
-
}).transform((value2) => value2);
|
|
70375
|
-
|
|
70376
|
-
// ../../packages/core/validation/src/access-control-roles.ts
|
|
70377
|
-
var roles = [
|
|
70378
|
-
"addonManager",
|
|
70379
|
-
"addonModule",
|
|
70380
|
-
"addonRegistryModule",
|
|
70381
|
-
"admin",
|
|
70382
|
-
"auditor",
|
|
70383
|
-
"claimPolicyManager",
|
|
70384
|
-
"claimIssuer",
|
|
70385
|
-
"complianceManager",
|
|
70386
|
-
"custodian",
|
|
70387
|
-
"emergency",
|
|
70388
|
-
"feedsManager",
|
|
70389
|
-
"fundsManager",
|
|
70390
|
-
"gasManager",
|
|
70391
|
-
"governance",
|
|
70392
|
-
"identityManager",
|
|
70393
|
-
"identityRegistryModule",
|
|
70394
|
-
"organisationIdentityManager",
|
|
70395
|
-
"saleAdmin",
|
|
70396
|
-
"supplyManagement",
|
|
70397
|
-
"systemManager",
|
|
70398
|
-
"systemModule",
|
|
70399
|
-
"tokenFactoryModule",
|
|
70400
|
-
"tokenFactoryRegistryModule",
|
|
70401
|
-
"tokenManager",
|
|
70402
|
-
"trustedIssuersMetaRegistryModule"
|
|
70403
|
-
];
|
|
70404
|
-
var accessControlRoles = z61.object(Object.fromEntries(roles.map((role) => [role, z61.boolean().default(false)])));
|
|
70405
|
-
var accessControlRole = z61.enum(roles);
|
|
70406
|
-
var assetAccessControlRoles = [
|
|
70407
|
-
"admin",
|
|
70408
|
-
"custodian",
|
|
70409
|
-
"emergency",
|
|
70410
|
-
"fundsManager",
|
|
70411
|
-
"governance",
|
|
70412
|
-
"saleAdmin",
|
|
70413
|
-
"supplyManagement"
|
|
70414
|
-
];
|
|
70415
|
-
var assetAccessControlRole = z61.enum(assetAccessControlRoles);
|
|
70416
|
-
var assetAccessControlRolesSchema = accessControlRoles.pick({
|
|
70417
|
-
admin: true,
|
|
70418
|
-
custodian: true,
|
|
70419
|
-
emergency: true,
|
|
70420
|
-
fundsManager: true,
|
|
70421
|
-
governance: true,
|
|
70422
|
-
saleAdmin: true,
|
|
70423
|
-
supplyManagement: true
|
|
70424
|
-
});
|
|
70425
|
-
var systemAccessControlRoles = [
|
|
70426
|
-
"admin",
|
|
70427
|
-
"auditor",
|
|
70428
|
-
"systemManager",
|
|
70429
|
-
"tokenManager",
|
|
70430
|
-
"complianceManager",
|
|
70431
|
-
"claimPolicyManager",
|
|
70432
|
-
"claimIssuer",
|
|
70433
|
-
"identityManager",
|
|
70434
|
-
"feedsManager",
|
|
70435
|
-
"gasManager"
|
|
70436
|
-
];
|
|
70437
|
-
var systemAccessControlRole = z61.enum(systemAccessControlRoles);
|
|
70438
|
-
var systemAccessControlRolesV1 = [...systemAccessControlRoles, "addonManager"];
|
|
70439
|
-
var systemAccessControlRoleV1 = z61.enum(systemAccessControlRolesV1);
|
|
70440
|
-
var systemAccessControlRolesSchema = accessControlRoles.pick({
|
|
70441
|
-
addonManager: true,
|
|
70442
|
-
admin: true,
|
|
70443
|
-
auditor: true,
|
|
70444
|
-
systemManager: true,
|
|
70445
|
-
tokenManager: true,
|
|
70446
|
-
complianceManager: true,
|
|
70447
|
-
claimPolicyManager: true,
|
|
70448
|
-
claimIssuer: true,
|
|
70449
|
-
identityManager: true,
|
|
70450
|
-
feedsManager: true,
|
|
70451
|
-
gasManager: true
|
|
70452
|
-
});
|
|
70453
|
-
var roleAdminSchema = z61.object({
|
|
70454
|
-
id: ethereumHex.meta({
|
|
70455
|
-
description: "Role admin mapping identifier",
|
|
70456
|
-
examples: ["0x0102030405060708091011121314151617181920212223242526272829303132"]
|
|
70457
|
-
}),
|
|
70458
|
-
role: ethereumHex.meta({
|
|
70459
|
-
description: "Role identifier (bytes32)",
|
|
70460
|
-
examples: ["0x0000000000000000000000000000000000000000000000000000000000000001"]
|
|
70461
|
-
}),
|
|
70462
|
-
roleFieldName: accessControlRole.meta({
|
|
70463
|
-
description: "Role field name",
|
|
70464
|
-
examples: ["admin", "tokenManager", "complianceManager"]
|
|
70465
|
-
}),
|
|
70466
|
-
adminRole: ethereumHex.meta({
|
|
70467
|
-
description: "Admin role identifier (bytes32)",
|
|
70468
|
-
examples: ["0x0000000000000000000000000000000000000000000000000000000000000000"]
|
|
70469
|
-
}),
|
|
70470
|
-
adminFieldName: accessControlRole.meta({
|
|
70471
|
-
description: "Admin role field name",
|
|
70472
|
-
examples: ["admin", "systemManager"]
|
|
70473
|
-
})
|
|
70474
|
-
});
|
|
70475
|
-
var AccessControlSchema = z61.object({
|
|
70476
|
-
id: ethereumAddress.meta({
|
|
70477
|
-
description: "Access control contract address",
|
|
70478
|
-
examples: ["0x71C7656EC7ab88b098defB751B7401B5f6d8976F"]
|
|
70479
|
-
}),
|
|
70480
|
-
addonManager: v1FrozenRequired(accountArray().default([]).meta({
|
|
70481
|
-
description: "Accounts with addon manager role. Frozen v1-compat role — always empty.",
|
|
70482
|
-
examples: [[]]
|
|
70483
|
-
}), { required: true }),
|
|
70484
|
-
addonModule: accountArray().meta({
|
|
70485
|
-
description: "Accounts with addon module role",
|
|
70486
|
-
examples: [[]]
|
|
70487
|
-
}),
|
|
70488
|
-
addonRegistryModule: accountArray().meta({
|
|
70489
|
-
description: "Accounts with addon registry module role",
|
|
70490
|
-
examples: [[]]
|
|
70491
|
-
}),
|
|
70492
|
-
admin: accountArray().meta({
|
|
70493
|
-
description: "Accounts with admin role",
|
|
70494
|
-
examples: [
|
|
70495
|
-
[
|
|
70496
|
-
{
|
|
70497
|
-
id: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F",
|
|
70498
|
-
isContract: false
|
|
70499
|
-
}
|
|
70500
|
-
]
|
|
70501
|
-
]
|
|
70502
|
-
}),
|
|
70503
|
-
auditor: accountArray().meta({
|
|
70504
|
-
description: "Accounts with auditor role",
|
|
70505
|
-
examples: [[]]
|
|
70506
|
-
}),
|
|
70507
|
-
claimPolicyManager: accountArray().meta({
|
|
70508
|
-
description: "Accounts with claim policy manager role",
|
|
70509
|
-
examples: [[]]
|
|
70510
|
-
}),
|
|
70511
|
-
claimIssuer: accountArray().meta({
|
|
70512
|
-
description: "Accounts with claim issuer role",
|
|
70513
|
-
examples: [[]]
|
|
70514
|
-
}),
|
|
70515
|
-
complianceManager: accountArray().meta({
|
|
70516
|
-
description: "Accounts with compliance manager role",
|
|
70517
|
-
examples: [[]]
|
|
70518
|
-
}),
|
|
70519
|
-
custodian: accountArray().meta({
|
|
70520
|
-
description: "Accounts with custodian role",
|
|
70521
|
-
examples: [[]]
|
|
70522
|
-
}),
|
|
70523
|
-
emergency: accountArray().meta({
|
|
70524
|
-
description: "Accounts with emergency role",
|
|
70525
|
-
examples: [[]]
|
|
70526
|
-
}),
|
|
70527
|
-
feedsManager: accountArray().meta({
|
|
70528
|
-
description: "Accounts with feeds manager role",
|
|
70529
|
-
examples: [[]]
|
|
70530
|
-
}),
|
|
70531
|
-
fundsManager: accountArray().meta({
|
|
70532
|
-
description: "Accounts with funds manager role",
|
|
70533
|
-
examples: [[]]
|
|
70534
|
-
}),
|
|
70535
|
-
gasManager: accountArray().meta({
|
|
70536
|
-
description: "Accounts with gas manager role",
|
|
70537
|
-
examples: [[]]
|
|
70538
|
-
}),
|
|
70539
|
-
governance: accountArray().meta({
|
|
70540
|
-
description: "Accounts with governance role",
|
|
70541
|
-
examples: [[]]
|
|
70542
|
-
}),
|
|
70543
|
-
identityManager: accountArray().meta({
|
|
70544
|
-
description: "Accounts with identity manager role",
|
|
70545
|
-
examples: [[]]
|
|
70546
|
-
}),
|
|
70547
|
-
identityRegistryModule: accountArray().meta({
|
|
70548
|
-
description: "Accounts with identity registry module role",
|
|
70549
|
-
examples: [[]]
|
|
70550
|
-
}),
|
|
70551
|
-
organisationIdentityManager: accountArray().meta({
|
|
70552
|
-
description: "Accounts with organisation identity manager role",
|
|
70553
|
-
examples: [[]]
|
|
70554
|
-
}),
|
|
70555
|
-
saleAdmin: accountArray().meta({
|
|
70556
|
-
description: "Accounts with sale admin role",
|
|
70557
|
-
examples: [[]]
|
|
70558
|
-
}),
|
|
70559
|
-
supplyManagement: accountArray().meta({
|
|
70560
|
-
description: "Accounts with supply management role",
|
|
70561
|
-
examples: [[]]
|
|
70562
|
-
}),
|
|
70563
|
-
systemManager: accountArray().meta({
|
|
70564
|
-
description: "Accounts with system manager role",
|
|
70565
|
-
examples: [[]]
|
|
70566
|
-
}),
|
|
70567
|
-
systemModule: accountArray().meta({
|
|
70568
|
-
description: "Accounts with system module role",
|
|
70569
|
-
examples: [[]]
|
|
70570
|
-
}),
|
|
70571
|
-
tokenFactoryModule: accountArray().meta({
|
|
70572
|
-
description: "Accounts with token factory module role",
|
|
70573
|
-
examples: [[]]
|
|
70574
|
-
}),
|
|
70575
|
-
tokenFactoryRegistryModule: accountArray().meta({
|
|
70576
|
-
description: "Accounts with token factory registry module role",
|
|
70577
|
-
examples: [[]]
|
|
70578
|
-
}),
|
|
70579
|
-
tokenManager: accountArray().meta({
|
|
70580
|
-
description: "Accounts with token manager role",
|
|
70581
|
-
examples: [[]]
|
|
70582
|
-
}),
|
|
70583
|
-
trustedIssuersMetaRegistryModule: accountArray().meta({
|
|
70584
|
-
description: "Accounts with trusted issuers meta registry module role",
|
|
70585
|
-
examples: [[]]
|
|
70586
|
-
}),
|
|
70587
|
-
roleAdmins: z61.array(roleAdminSchema).meta({
|
|
70588
|
-
description: "Admin role mapping per access control role",
|
|
70589
|
-
examples: [[]]
|
|
70590
|
-
}).default([])
|
|
70591
|
-
});
|
|
70592
|
-
var accessControlSchema = () => AccessControlSchema;
|
|
70593
|
-
|
|
70594
70640
|
// ../../packages/core/validation/src/asset-extensions.ts
|
|
70595
70641
|
import { z as z62 } from "zod";
|
|
70596
70642
|
var AssetExtensionEnum = {
|
|
@@ -96390,7 +96436,7 @@ function normalizeDalpBaseUrl(url) {
|
|
|
96390
96436
|
// package.json
|
|
96391
96437
|
var package_default = {
|
|
96392
96438
|
name: "@settlemint/dalp-sdk",
|
|
96393
|
-
version: "3.0.7-main.
|
|
96439
|
+
version: "3.0.7-main.28538365167",
|
|
96394
96440
|
private: false,
|
|
96395
96441
|
description: "Fully typed SDK for the DALP tokenization platform API",
|
|
96396
96442
|
homepage: "https://settlemint.com",
|
|
@@ -98545,7 +98591,8 @@ var DAPI_ROUTE_ERROR_IDS = {
|
|
|
98545
98591
|
"DALP-9162": "DALP-9162",
|
|
98546
98592
|
"DALP-9163": "DALP-9163",
|
|
98547
98593
|
"DALP-9164": "DALP-9164",
|
|
98548
|
-
"DALP-9165": "DALP-9165"
|
|
98594
|
+
"DALP-9165": "DALP-9165",
|
|
98595
|
+
"DALP-9166": "DALP-9166"
|
|
98549
98596
|
};
|
|
98550
98597
|
var DAPI_ERROR_IDS = {
|
|
98551
98598
|
...DAPI_ROUTE_ERROR_IDS,
|