@settlemint/dalp-cli 3.0.6-main.28333103539 → 3.0.6-main.28339035451

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.
Files changed (2) hide show
  1. package/dist/dalp.js +641 -85
  2. package/package.json +1 -1
package/dist/dalp.js CHANGED
@@ -68673,6 +68673,34 @@ var ENTRIES_INDEX = {
68673
68673
  owner: "dapi",
68674
68674
  orpcCode: "CUSTODY_PROVIDER_IMMUTABLE"
68675
68675
  },
68676
+ "DALP-0679": {
68677
+ id: "DALP-0679",
68678
+ kind: "route",
68679
+ category: "client",
68680
+ status: 400,
68681
+ retryable: false,
68682
+ expectedClientError: true,
68683
+ public: {
68684
+ message: "The sale token cannot be withdrawn as a payment currency",
68685
+ why: "The selected withdrawal currency is the token being sold; the contract reserves those tokens for buyers and reverts CannotWithdrawSaleToken.",
68686
+ fix: "Choose one of the sale's payment currencies instead of the sale token, then retry."
68687
+ },
68688
+ observability: {
68689
+ severity: "info",
68690
+ otelEventName: "dapi.error",
68691
+ metricAttributeKey: "dapi.error.id",
68692
+ dimensions: [
68693
+ "error.id",
68694
+ "error.category",
68695
+ "surface",
68696
+ "route",
68697
+ "status_class",
68698
+ "retryable"
68699
+ ]
68700
+ },
68701
+ owner: "dapi",
68702
+ orpcCode: "TOKEN_SALE_CANNOT_WITHDRAW_SALE_TOKEN_CURRENCY"
68703
+ },
68676
68704
  "DALP-1001": {
68677
68705
  id: "DALP-1001",
68678
68706
  kind: "contract",
@@ -84508,7 +84536,7 @@ var ENTRIES_INDEX = {
84508
84536
  kind: "contract",
84509
84537
  category: "contract",
84510
84538
  status: 422,
84511
- retryable: false,
84539
+ retryable: true,
84512
84540
  expectedClientError: true,
84513
84541
  public: {
84514
84542
  message: "Slippage exceeded",
@@ -94271,6 +94299,7 @@ var DALP_ERROR_TYPED_FIELD_NAMES = {
94271
94299
  "DALP-0676": [],
94272
94300
  "DALP-0677": [],
94273
94301
  "DALP-0678": [],
94302
+ "DALP-0679": [],
94274
94303
  "DALP-1001": [
94275
94304
  "args",
94276
94305
  "correlationId",
@@ -104345,6 +104374,7 @@ var DALP_ERROR_DATA_SCHEMA_BY_ID = {
104345
104374
  "DALP-0676": DALP_ORPC_ERROR_DATA_WIRE_SCHEMA,
104346
104375
  "DALP-0677": DALP_ORPC_ERROR_DATA_WIRE_SCHEMA,
104347
104376
  "DALP-0678": DALP_ORPC_ERROR_DATA_WIRE_SCHEMA,
104377
+ "DALP-0679": DALP_ORPC_ERROR_DATA_WIRE_SCHEMA,
104348
104378
  "DALP-1001": DALP_ORPC_ERROR_DATA_BASE_SCHEMA.extend({
104349
104379
  args: exports_external.record(exports_external.string(), exports_external.string()),
104350
104380
  correlationId: exports_external.string(),
@@ -118200,6 +118230,10 @@ var CUSTOM_ERRORS = {
118200
118230
  status: 403,
118201
118231
  message: "Provided system addon does not belong to the authenticated system"
118202
118232
  },
118233
+ TOKEN_SALE_CANNOT_WITHDRAW_SALE_TOKEN_CURRENCY: {
118234
+ status: 400,
118235
+ message: "The sale token cannot be withdrawn as a payment currency"
118236
+ },
118203
118237
  TOKEN_SALE_DEPLOYMENT_INDEXED_AMBIGUOUSLY_TRANSACTION_MULTIPLE_SALES_MATCHED_CONFIRMED: {
118204
118238
  status: 500,
118205
118239
  message: "Token sale deployment indexed ambiguously for transaction {transactionHash}. Multiple token sales matched the confirmed deployment transaction"
@@ -121931,6 +121965,10 @@ var TokenSchema = exports_external.object({
121931
121965
  description: "The symbol of the token",
121932
121966
  examples: ["USTB", "CORP-A", "BOND"]
121933
121967
  }),
121968
+ logoUrl: exports_external.string().nullable().optional().meta({
121969
+ description: "Presigned URL for the token's brand logo (latest non-deleted `brand_logo` document), or null when none is uploaded. Short-lived (~1h); the client `Web3Avatar` falls back to the deterministic jazzicon when null/expired. Optional so token projections that do not resolve it omit the field.",
121970
+ examples: [null]
121971
+ }),
121934
121972
  decimals: decimals(),
121935
121973
  basePrice: bigDecimal().meta({
121936
121974
  description: "The base price of the token",
@@ -126865,6 +126903,7 @@ var tokenDocumentTypes = [
126865
126903
  "storage_receipt",
126866
126904
  "chain_of_custody",
126867
126905
  "insurance_certificate",
126906
+ "brand_logo",
126868
126907
  "other"
126869
126908
  ];
126870
126909
  var TokenDocumentTypeSchema = exports_external.enum(tokenDocumentTypes).meta({
@@ -131418,6 +131457,12 @@ var TokenSaleReadQuerySchema = exports_external.object({
131418
131457
  buyerAddress: ethereumAddress.optional().meta({
131419
131458
  description: "Optional buyer address filter for returned purchases",
131420
131459
  examples: ["0x71C7656EC7ab88b098defB751B7401B5f6d8976F"]
131460
+ }),
131461
+ live: exports_external.union([exports_external.boolean(), exports_external.literal("true"), exports_external.literal("false")]).optional().transform((value22) => value22 === true || value22 === "true").pipe(exports_external.boolean()).default(false).meta({
131462
+ description: "When true, recompute eligibility via a live canTransfer against the sale token's compliance engine. Cold-RPC, multi-second p95 latency; reserved for the explicit pre-submit recheck."
131463
+ }),
131464
+ amount: apiBigInt.optional().meta({
131465
+ description: "Token amount (base units) for the live eligibility recheck; ignored in indexer mode."
131421
131466
  })
131422
131467
  });
131423
131468
  var TokenSaleMutationInputSchema = TokenSaleReadInputSchema.extend(MutationInputSchema.shape);
@@ -131595,6 +131640,37 @@ var TokenSaleFinalizeInputSchema = TokenSaleMutationInputSchema;
131595
131640
  var TokenSaleFinalizeOutputSchema = exports_external.object({
131596
131641
  transactionHash: exports_external.string()
131597
131642
  });
131643
+ var TokenSaleAccessControlRoleSchema = exports_external.enum(["saleAdmin", "fundsManager"]);
131644
+ var TokenSaleGrantRoleByParticipantCommonSchema = TokenSaleMutationInputSchema.extend({
131645
+ role: TokenSaleAccessControlRoleSchema
131646
+ });
131647
+ var TokenSaleGrantRoleByParticipantInputSchema = exports_external.union([
131648
+ TokenSaleGrantRoleByParticipantCommonSchema.extend({
131649
+ participantId: exports_external.string().min(1)
131650
+ }),
131651
+ TokenSaleGrantRoleByParticipantCommonSchema.extend({
131652
+ identityAddress: ethereumAddress
131653
+ })
131654
+ ]);
131655
+ var TokenSaleGrantRoleByParticipantOutputSchema = exports_external.object({
131656
+ accounts: exports_external.array(ethereumAddress),
131657
+ roles: exports_external.array(TokenSaleAccessControlRoleSchema)
131658
+ });
131659
+ var TokenSaleRevokeRoleByParticipantCommonSchema = TokenSaleMutationInputSchema.extend({
131660
+ role: TokenSaleAccessControlRoleSchema
131661
+ });
131662
+ var TokenSaleRevokeRoleByParticipantInputSchema = exports_external.union([
131663
+ TokenSaleRevokeRoleByParticipantCommonSchema.extend({
131664
+ participantId: exports_external.string().min(1)
131665
+ }),
131666
+ TokenSaleRevokeRoleByParticipantCommonSchema.extend({
131667
+ identityAddress: ethereumAddress
131668
+ })
131669
+ ]);
131670
+ var TokenSaleRevokeRoleByParticipantOutputSchema = exports_external.object({
131671
+ accounts: exports_external.array(ethereumAddress),
131672
+ roles: exports_external.array(TokenSaleAccessControlRoleSchema)
131673
+ });
131598
131674
  var TokenSalePauseSaleInputSchema = TokenSaleMutationInputSchema;
131599
131675
  var TokenSalePauseSaleOutputSchema = exports_external.object({
131600
131676
  transactionHash: exports_external.string()
@@ -131651,6 +131727,10 @@ var TokenSaleSetTermsHashInputSchema = TokenSaleMutationInputSchema.extend({
131651
131727
  var TokenSaleSetTermsHashOutputSchema = exports_external.object({
131652
131728
  transactionHash: exports_external.string()
131653
131729
  });
131730
+ var TokenSaleTransitionToPublicInputSchema = TokenSaleMutationInputSchema;
131731
+ var TokenSaleTransitionToPublicOutputSchema = exports_external.object({
131732
+ transactionHash: exports_external.string()
131733
+ });
131654
131734
  var TokenSaleUnpauseSaleInputSchema = TokenSaleMutationInputSchema;
131655
131735
  var TokenSaleUnpauseSaleOutputSchema = exports_external.object({
131656
131736
  transactionHash: exports_external.string()
@@ -131660,8 +131740,8 @@ var TokenSaleWithdrawFundsInputSchema = TokenSaleMutationInputSchema.extend({
131660
131740
  description: "Payment currency token address",
131661
131741
  examples: ["0x71C7656EC7ab88b098defB751B7401B5f6d8976F"]
131662
131742
  }),
131663
- recipient: ethereumAddress.meta({
131664
- description: "Recipient wallet address",
131743
+ recipient: nonZeroEthereumAddress.meta({
131744
+ description: "Treasury recipient wallet address (the zero address is rejected)",
131665
131745
  examples: ["0x71C7656EC7ab88b098defB751B7401B5f6d8976F"]
131666
131746
  })
131667
131747
  });
@@ -131681,6 +131761,67 @@ var TokenSaleWithdrawUnsoldTokensInputSchema = TokenSaleMutationInputSchema.exte
131681
131761
  var TokenSaleWithdrawUnsoldTokensOutputSchema = exports_external.object({
131682
131762
  transactionHash: exports_external.string()
131683
131763
  });
131764
+ var EligibilityReadParamsSchema = exports_external.object({
131765
+ participantId: exports_external.string().min(1).meta({
131766
+ description: "Identifier of the participant whose global eligibility is being evaluated."
131767
+ })
131768
+ });
131769
+ var EligibilityReadQuerySchema = exports_external.object({
131770
+ live: exports_external.union([exports_external.boolean(), exports_external.literal("true"), exports_external.literal("false")]).optional().transform((value22) => value22 === true || value22 === "true").pipe(exports_external.boolean()).default(false).meta({
131771
+ description: "When true, bypass the indexer and evaluate the verdict via live readContract against installed compliance modules. Cold-RPC, multi-second p95 latency; reserved for the dapp's explicit Recheck action."
131772
+ })
131773
+ });
131774
+ var EligibilityVerdictSchema = exports_external.enum(["allowed", "needs-action", "blocked"]).meta({
131775
+ description: "Top-level eligibility verdict. `allowed` means the participant satisfies every installed rule; `needs-action` flags missing/expired claims or allow-list gaps; `blocked` indicates at least one block-list match."
131776
+ });
131777
+ var EligibilitySourceSchema = exports_external.enum(["indexer", "live"]).meta({
131778
+ description: "Where the verdict was evaluated."
131779
+ });
131780
+ var EligibilityReasonCodeSchema = exports_external.enum([
131781
+ "address-blocked",
131782
+ "country-blocked",
131783
+ "country-not-allowed",
131784
+ "identity-blocked",
131785
+ "identity-not-verified",
131786
+ "claim-missing",
131787
+ "claim-revoked",
131788
+ "claim-expired",
131789
+ "live-timeout"
131790
+ ]).meta({ description: "Reason code attached to a single rule failure." });
131791
+ var EligibilityReasonDetailsSchema = exports_external.object({
131792
+ topic: exports_external.string().optional().meta({ description: "Claim topic name (for claim-* reason codes)." }),
131793
+ expiresAt: timestamp().optional().meta({ description: "Timestamp the related claim expired or expires." }),
131794
+ countryCode: isoCountryCodeNumeric.optional().meta({
131795
+ description: "ISO numeric country code involved in a country-list reason."
131796
+ })
131797
+ }).meta({ description: "Optional reason-specific context." });
131798
+ var EligibilityReasonSchema = exports_external.object({
131799
+ code: EligibilityReasonCodeSchema,
131800
+ moduleTypeId: complianceTypeId().optional().meta({
131801
+ description: "TypeId of the module that produced this reason, when known."
131802
+ }),
131803
+ instanceAddress: ethereumAddress.optional().meta({
131804
+ description: "Address of the specific module instance that produced this reason."
131805
+ }),
131806
+ details: EligibilityReasonDetailsSchema.optional()
131807
+ });
131808
+ var WalletEligibilityVerdictItemSchema = exports_external.object({
131809
+ verdict: EligibilityVerdictSchema,
131810
+ source: EligibilitySourceSchema,
131811
+ checkedAt: timestamp().meta({
131812
+ description: "Timestamp at which the verdict was evaluated."
131813
+ }),
131814
+ wallet: ethereumAddress.nullable().meta({
131815
+ description: "Wallet address the verdict was evaluated against. Null when no wallet is resolvable yet."
131816
+ }),
131817
+ reasons: exports_external.array(EligibilityReasonSchema)
131818
+ });
131819
+ var EligibilityVerdictItemSchema = WalletEligibilityVerdictItemSchema.extend({
131820
+ wallets: exports_external.array(WalletEligibilityVerdictItemSchema).optional().meta({
131821
+ description: "Per-wallet verdict breakdown when the participant owns multiple wallets, such as an EOA and smart wallet pair."
131822
+ })
131823
+ });
131824
+ var EligibilityReadOutputSchema = createSingleResponse(EligibilityVerdictItemSchema);
131684
131825
  var TokenSaleGraphItemSchema = exports_external.object({
131685
131826
  id: ethereumAddress,
131686
131827
  token: exports_external.object({
@@ -131748,6 +131889,7 @@ var TokenSaleReadGraphSchema = TokenSaleGraphItemSchema.extend({
131748
131889
  vestingDuration: exports_external.string().nullable(),
131749
131890
  vestingCliff: exports_external.string().nullable(),
131750
131891
  termsHash: exports_external.string().nullable(),
131892
+ failedAt: timestamp().nullable(),
131751
131893
  paymentCurrencies: exports_external.array(TokenSalePaymentCurrencySchema),
131752
131894
  purchases: exports_external.array(TokenSalePurchaseSchema),
131753
131895
  whitelistEntries: exports_external.array(TokenSaleWhitelistEntrySchema),
@@ -131755,14 +131897,66 @@ var TokenSaleReadGraphSchema = TokenSaleGraphItemSchema.extend({
131755
131897
  id: ethereumAddress
131756
131898
  }).nullable()
131757
131899
  });
131900
+ var TokenSalePositionCurrencyAmountSchema = exports_external.object({
131901
+ currency: ethereumAddress,
131902
+ amount: bigDecimal(),
131903
+ amountExact: apiBigInt
131904
+ });
131905
+ var TokenSalePositionPendingReasonSchema = exports_external.enum([
131906
+ "pending_finalization",
131907
+ "before_cliff",
131908
+ "fully_withdrawn",
131909
+ "not_started"
131910
+ ]);
131911
+ var TokenSalePositionSchema = exports_external.object({
131912
+ buyerAddresses: exports_external.array(ethereumAddress),
131913
+ purchased: bigDecimal(),
131914
+ purchasedExact: apiBigInt,
131915
+ withdrawn: bigDecimal(),
131916
+ withdrawnExact: apiBigInt,
131917
+ claimableNow: bigDecimal(),
131918
+ claimableNowExact: apiBigInt,
131919
+ nextUnlockAt: timestamp().nullable(),
131920
+ pendingReason: TokenSalePositionPendingReasonSchema.nullable(),
131921
+ contributedByCurrency: exports_external.array(TokenSalePositionCurrencyAmountSchema),
131922
+ refundableByCurrency: exports_external.array(TokenSalePositionCurrencyAmountSchema)
131923
+ });
131758
131924
  var TokenSaleReadResponseSchema = TokenSaleReadGraphSchema.extend({
131759
- hasAcknowledgedTerms: exports_external.boolean()
131925
+ hasAcknowledgedTerms: exports_external.boolean(),
131926
+ position: TokenSalePositionSchema.nullable(),
131927
+ eligibility: EligibilityVerdictItemSchema.nullable(),
131928
+ accessControl: accessControlSchema().nullable(),
131929
+ coverPhotoUrl: exports_external.string().nullable(),
131930
+ logoUrl: exports_external.string().nullable()
131931
+ });
131932
+ var CapTableKycStatusSchema = exports_external.enum(["registered", "pending", "unknown"]);
131933
+ var CapTableRowSchema = exports_external.object({
131934
+ buyer: exports_external.object({ id: ethereumAddress }),
131935
+ identityAddress: ethereumAddress.nullable(),
131936
+ name: exports_external.string().nullable(),
131937
+ kycStatus: CapTableKycStatusSchema,
131938
+ country: isoCountryCode.nullable(),
131939
+ paymentCurrency: exports_external.object({ id: ethereumAddress, symbol: exports_external.string().nullable() }).nullable(),
131940
+ purchaseCount: exports_external.number().int(),
131941
+ totalPaymentAmount: bigDecimal(),
131942
+ totalPaymentAmountExact: apiBigInt,
131943
+ totalTokenAmount: bigDecimal(),
131944
+ totalTokenAmountExact: apiBigInt
131945
+ });
131946
+ var TokenSaleCapTableResponseSchema = exports_external.object({
131947
+ saleAddress: ethereumAddress,
131948
+ tokenAddress: ethereumAddress.nullable(),
131949
+ investorCount: exports_external.number().int(),
131950
+ totalTokenAllocated: bigDecimal(),
131951
+ totalTokenAllocatedExact: apiBigInt,
131952
+ rows: exports_external.array(CapTableRowSchema)
131760
131953
  });
131761
131954
  var TOKEN_SALE_COLLECTION_FIELDS = {
131762
131955
  saleStartTime: dateField(),
131763
131956
  saleEndTime: dateField(),
131764
131957
  totalSold: numberField(),
131765
131958
  systemAddon: addressField(),
131959
+ token: addressField({ defaultOperator: "eq" }),
131766
131960
  createdAt: dateField()
131767
131961
  };
131768
131962
  var TokenSaleV2ListInputSchema = createCollectionInputSchema(TOKEN_SALE_COLLECTION_FIELDS, {
@@ -131770,6 +131964,137 @@ var TokenSaleV2ListInputSchema = createCollectionInputSchema(TOKEN_SALE_COLLECTI
131770
131964
  globalSearch: true
131771
131965
  });
131772
131966
  var TokenSaleV2ListOutputSchema = createPaginatedResponse(TokenSaleListItemSchema);
131967
+ var TOKEN_SALE_INVESTMENT_COLLECTION_FIELDS = {
131968
+ saleStartTime: dateField(),
131969
+ saleEndTime: dateField(),
131970
+ totalSold: numberField(),
131971
+ createdAt: dateField(),
131972
+ investableNow: booleanField({ sortable: false })
131973
+ };
131974
+ var TokenSaleInvestmentsV2ListInputSchema = createCollectionInputSchema(TOKEN_SALE_INVESTMENT_COLLECTION_FIELDS, {
131975
+ defaultSort: "saleStartTime",
131976
+ globalSearch: true
131977
+ });
131978
+ var TokenSaleInvestmentItemSchema = TokenSaleListItemSchema.extend({
131979
+ position: TokenSalePositionSchema,
131980
+ participated: exports_external.boolean(),
131981
+ discoverable: exports_external.boolean(),
131982
+ coverPhotoUrl: exports_external.string().nullable(),
131983
+ logoUrl: exports_external.string().nullable()
131984
+ });
131985
+ var TokenSaleInvestmentsV2ListOutputSchema = createPaginatedResponse(TokenSaleInvestmentItemSchema);
131986
+ var TokenSaleAlertSchema = exports_external.enum(["near-cap", "presale-ended", "awaiting-finalization", "grace-closing"]);
131987
+ var TokenSaleOperationsItemSchema = TokenSaleListItemSchema.extend({
131988
+ alert: TokenSaleAlertSchema.nullable(),
131989
+ investorCount: exports_external.number().int().nonnegative()
131990
+ });
131991
+ var TOKEN_SALE_OPERATIONS_COLLECTION_FIELDS = {
131992
+ saleStartTime: dateField(),
131993
+ saleEndTime: dateField(),
131994
+ totalSold: numberField(),
131995
+ createdAt: dateField()
131996
+ };
131997
+ var TokenSaleV2OperationsInputSchema = createCollectionInputSchema(TOKEN_SALE_OPERATIONS_COLLECTION_FIELDS, {
131998
+ defaultSort: "saleStartTime",
131999
+ globalSearch: true
132000
+ });
132001
+ var TokenSaleV2OperationsOutputSchema = createPaginatedResponse(TokenSaleOperationsItemSchema);
132002
+ var tokenSaleDocumentTypes = ["cover_photo", "sale_logo", "brochure", "faq", "other"];
132003
+ var TokenSaleDocumentTypeSchema = exports_external.enum(tokenSaleDocumentTypes).meta({
132004
+ description: "Type of token-sale marketing document",
132005
+ examples: ["cover_photo", "sale_logo", "brochure"]
132006
+ });
132007
+ var tokenSaleDocumentType = () => TokenSaleDocumentTypeSchema;
132008
+ var TokenSaleDocumentTypeArraySchema = exports_external.array(TokenSaleDocumentTypeSchema).min(1, "At least one document type must be specified").meta({ description: "List of token-sale document types", examples: [["cover_photo", "brochure"]] });
132009
+ var TOKEN_SALE_DOCUMENTS_COLLECTION_FIELDS = {
132010
+ fileName: textField(),
132011
+ documentType: enumField(tokenSaleDocumentTypes, { facetable: true }),
132012
+ visibility: enumField(tokenDocumentVisibilities, { facetable: true }),
132013
+ mimeType: textField({ facetable: true }),
132014
+ isLatest: booleanField({ facetable: true }),
132015
+ fileSize: numberField(),
132016
+ uploadedAt: dateField()
132017
+ };
132018
+ var TokenSaleDocumentsV2ListInputSchema = createCollectionInputSchema(TOKEN_SALE_DOCUMENTS_COLLECTION_FIELDS, {
132019
+ defaultSort: "uploadedAt"
132020
+ });
132021
+ var TokenSaleDocumentsV2ListItemSchema = exports_external.object({
132022
+ id: exports_external.string(),
132023
+ saleAddress: exports_external.string(),
132024
+ documentType: tokenSaleDocumentType(),
132025
+ visibility: tokenDocumentVisibility(),
132026
+ groupId: exports_external.string(),
132027
+ versionNumber: exports_external.number(),
132028
+ isLatest: exports_external.boolean(),
132029
+ fileName: exports_external.string(),
132030
+ fileSize: exports_external.number(),
132031
+ mimeType: exports_external.string(),
132032
+ title: exports_external.string().nullable(),
132033
+ description: exports_external.string().nullable(),
132034
+ fileHash: exports_external.string().nullable(),
132035
+ uploadedAt: timestamp(),
132036
+ uploadedBy: exports_external.string().nullable(),
132037
+ thumbnailUrl: exports_external.string().url().nullable()
132038
+ });
132039
+ var TokenSaleDocumentsV2ListOutputSchema = createPaginatedResponse(TokenSaleDocumentsV2ListItemSchema);
132040
+ var TokenSaleDocumentGetUploadUrlBodySchema = exports_external.object({
132041
+ documentType: tokenSaleDocumentType(),
132042
+ fileName: exports_external.string().min(1, "File name is required").max(255, "File name too long"),
132043
+ fileSize: exports_external.number().int().positive("File size must be positive").max(TOKEN_DOCUMENT_MAX_FILE_SIZE, "File size must be under 50MB"),
132044
+ mimeType: tokenDocumentMimeType,
132045
+ visibility: tokenDocumentVisibility(),
132046
+ title: exports_external.string().max(500, "Title too long").optional(),
132047
+ description: exports_external.string().max(2000, "Description too long").optional()
132048
+ });
132049
+ var TokenSaleDocumentGetUploadUrlOutputSchema = exports_external.object({
132050
+ uploadUrl: exports_external.string().url(),
132051
+ objectKey: exports_external.string(),
132052
+ expiresAt: timestamp(),
132053
+ method: exports_external.literal("PUT"),
132054
+ headers: exports_external.record(exports_external.string(), exports_external.string())
132055
+ });
132056
+ var TokenSaleDocumentConfirmUploadBodySchema = exports_external.object({
132057
+ objectKey: exports_external.string().min(1, "Object key is required"),
132058
+ documentType: tokenSaleDocumentType(),
132059
+ fileName: exports_external.string().min(1, "File name is required").max(255, "File name too long"),
132060
+ fileSize: exports_external.number().int().positive("File size must be positive").max(TOKEN_DOCUMENT_MAX_FILE_SIZE, "File size must be under 50MB"),
132061
+ mimeType: tokenDocumentMimeType,
132062
+ visibility: tokenDocumentVisibility(),
132063
+ title: exports_external.string().max(500, "Title too long").optional(),
132064
+ description: exports_external.string().max(2000, "Description too long").optional(),
132065
+ replaceGroupId: exports_external.string().optional()
132066
+ });
132067
+ var TokenSaleDocumentConfirmUploadOutputSchema = exports_external.object({
132068
+ id: exports_external.string(),
132069
+ saleAddress: exports_external.string(),
132070
+ documentType: tokenSaleDocumentType(),
132071
+ visibility: tokenDocumentVisibility(),
132072
+ groupId: exports_external.string(),
132073
+ versionNumber: exports_external.number(),
132074
+ isLatest: exports_external.boolean(),
132075
+ fileName: exports_external.string(),
132076
+ fileSize: exports_external.number(),
132077
+ mimeType: exports_external.string(),
132078
+ title: exports_external.string().nullable(),
132079
+ description: exports_external.string().nullable(),
132080
+ fileHash: exports_external.string().nullable(),
132081
+ uploadedAt: timestamp(),
132082
+ uploadedBy: exports_external.string().nullable()
132083
+ });
132084
+ var TokenSaleDocumentGetDownloadUrlParamsSchema = exports_external.object({
132085
+ saleAddress: exports_external.string(),
132086
+ documentId: exports_external.string().min(1, "Document ID is required")
132087
+ });
132088
+ var TokenSaleDocumentGetDownloadUrlOutputSchema = exports_external.object({
132089
+ downloadUrl: exports_external.string().url(),
132090
+ fileName: exports_external.string(),
132091
+ mimeType: exports_external.string(),
132092
+ expiresAt: timestamp()
132093
+ });
132094
+ var TokenSaleDocumentDeleteParamsSchema = exports_external.object({
132095
+ saleAddress: exports_external.string(),
132096
+ documentId: exports_external.string().min(1, "Document ID is required")
132097
+ });
131773
132098
  var TAGS26 = [V2_TAG.tokenSale];
131774
132099
  var list16 = v2Contract.route({
131775
132100
  method: "GET",
@@ -131778,6 +132103,20 @@ var list16 = v2Contract.route({
131778
132103
  successDescription: "Paginated array of token sales with total count and faceted filter values.",
131779
132104
  tags: [...TAGS26]
131780
132105
  }).input(v2Input.query(TokenSaleV2ListInputSchema)).output(TokenSaleV2ListOutputSchema);
132106
+ var investments = v2Contract.route({
132107
+ method: "GET",
132108
+ path: "/addons/token-sale-investments",
132109
+ description: "List the authenticated caller's token-sale investments: every sale their wallet set (executor + signing EOAs) participated in, plus sales they are coarsely eligible for but have not bought. Each row carries the caller's aggregate position (purchased / claimable-now / refundable per currency). Buyer-scoped and caller-own only; never accepts an impersonation target. Scoped to the active chain (resolved via system context). The response `status` field is computed per request from the indexed status plus the active chain's timestamp, so it is not exposed as a filterable or facetable field.",
132110
+ successDescription: "Paginated array of the caller's investments with total count and faceted filter values.",
132111
+ tags: [...TAGS26]
132112
+ }).input(v2Input.query(TokenSaleInvestmentsV2ListInputSchema)).output(TokenSaleInvestmentsV2ListOutputSchema);
132113
+ var operationsList = v2Contract.route({
132114
+ method: "GET",
132115
+ path: "/addons/token-sale-operations",
132116
+ description: "List every token sale across all tokens in the tenant for the cross-token Operations view. Scoped registry-wide via the addon-registry parent address (NOT a single systemAddon factory) and gated on a system-level ops role (admin / tokenManager) so a caller privileged on one token cannot enumerate other tokens' sales. Each row carries an operations `alert` (near-cap, presale-ended, awaiting-finalization, grace-closing) and the distinct investor count. Sortable by saleStartTime, saleEndTime, createdAt, totalSold. Scoped to the active chain; the `status` and `alert` fields are computed per request from the chain clock and are therefore not filterable or facetable.",
132117
+ successDescription: "Paginated array of token sales across all tenant tokens with operations alerts and investor counts.",
132118
+ tags: [...TAGS26]
132119
+ }).input(v2Input.query(TokenSaleV2OperationsInputSchema)).output(TokenSaleV2OperationsOutputSchema);
131781
132120
  var read12 = v2Contract.route({
131782
132121
  method: "GET",
131783
132122
  path: "/addons/token-sales/{saleAddress}",
@@ -131788,6 +132127,13 @@ var read12 = v2Contract.route({
131788
132127
  params: TokenSaleReadInputSchema,
131789
132128
  query: TokenSaleReadQuerySchema.optional()
131790
132129
  })).output(createSingleResponse(TokenSaleReadResponseSchema));
132130
+ var capTable = v2Contract.route({
132131
+ method: "GET",
132132
+ path: "/addons/token-sales/{saleAddress}/cap-table",
132133
+ description: "Fetch the manager-gated cap table for a token sale: per-buyer identity, KYC status, and aggregated allocation. Returns investor PII and is restricted to a caller holding SALE_ADMIN or FUNDS_MANAGER (or admin / tokenManager) on the sold token's access manager; non-managers are rejected.",
132134
+ successDescription: "Identity-resolved cap table for the sale's buyers.",
132135
+ tags: [...TAGS26]
132136
+ }).input(exports_external.object({ params: TokenSaleReadInputSchema })).output(createSingleResponse(TokenSaleCapTableResponseSchema));
131791
132137
  var currentTime = v2Contract.route({
131792
132138
  method: "GET",
131793
132139
  path: "/addons/token-sales/current-time",
@@ -131809,6 +132155,13 @@ var activate = v2Contract.route({
131809
132155
  successDescription: "Token sale activated on-chain",
131810
132156
  tags: [...TAGS26]
131811
132157
  }).meta({ contractErrors: [...COMMON_CONTRACT_ERRORS, "DALP-4250", "DALP-4251"] }).input(v2Input.body(TokenSaleActivateInputSchema)).output(createAsyncBlockchainMutationResponse(TokenSaleActivateOutputSchema));
132158
+ var transitionToPublic = v2Contract.route({
132159
+ method: "POST",
132160
+ path: "/addons/token-sale-public-transitions",
132161
+ description: "Transition a token sale from its presale phase to the public sale phase",
132162
+ successDescription: "Token sale transitioned to public sale on-chain",
132163
+ tags: [...TAGS26]
132164
+ }).meta({ contractErrors: [...COMMON_CONTRACT_ERRORS, "DALP-4182", "DALP-4260"] }).input(v2Input.body(TokenSaleTransitionToPublicInputSchema)).output(createAsyncBlockchainMutationResponse(TokenSaleTransitionToPublicOutputSchema));
131812
132165
  var buy = v2Contract.route({
131813
132166
  method: "POST",
131814
132167
  path: "/addons/token-sale-purchases",
@@ -131935,12 +132288,65 @@ var setTermsHash = v2Contract.route({
131935
132288
  successDescription: "Terms hash set on-chain",
131936
132289
  tags: [...TAGS26]
131937
132290
  }).meta({ contractErrors: [...COMMON_CONTRACT_ERRORS] }).input(v2Input.body(TokenSaleSetTermsHashInputSchema)).output(createAsyncBlockchainMutationResponse(TokenSaleSetTermsHashOutputSchema));
132291
+ var grantRoleByParticipant = v2Contract.route({
132292
+ method: "POST",
132293
+ path: "/addons/token-sale-participant-role-grants",
132294
+ description: "Grant a sale role (Sale Admin / Funds Manager) to every wallet owned by a participant, on the sold token's access manager",
132295
+ successDescription: "Role grant submitted on-chain for the participant's wallets",
132296
+ tags: [...TAGS26]
132297
+ }).meta({ contractErrors: [...COMMON_CONTRACT_ERRORS] }).input(v2Input.body(TokenSaleGrantRoleByParticipantInputSchema)).output(createAsyncBlockchainMutationResponse(TokenSaleGrantRoleByParticipantOutputSchema));
132298
+ var revokeRoleByParticipant = v2Contract.route({
132299
+ method: "DELETE",
132300
+ path: "/addons/token-sale-participant-role-grants",
132301
+ description: "Revoke a sale role (Sale Admin / Funds Manager) from every wallet owned by a participant, on the sold token's access manager",
132302
+ successDescription: "Role revoke submitted on-chain for the participant's wallets",
132303
+ tags: [...TAGS26]
132304
+ }).meta({ contractErrors: [...COMMON_CONTRACT_ERRORS] }).input(v2Input.body(TokenSaleRevokeRoleByParticipantInputSchema)).output(createAsyncBlockchainMutationResponse(TokenSaleRevokeRoleByParticipantOutputSchema));
132305
+ var documentsGetUploadUrl = v2Contract.route({
132306
+ method: "POST",
132307
+ path: "/addons/token-sales/{saleAddress}/document-uploads",
132308
+ description: "Get presigned URL for direct token-sale document upload to object storage.",
132309
+ successDescription: "Presigned URL for upload.",
132310
+ tags: [...TAGS26]
132311
+ }).input(v2Input.paramsBody(TokenSaleReadInputSchema, TokenSaleDocumentGetUploadUrlBodySchema)).output(createSingleResponse(TokenSaleDocumentGetUploadUrlOutputSchema));
132312
+ var documentsConfirmUpload = v2Contract.route({
132313
+ method: "POST",
132314
+ path: "/addons/token-sales/{saleAddress}/documents",
132315
+ description: "Create token-sale document record after file has been uploaded via presigned URL.",
132316
+ successDescription: "Document record created successfully.",
132317
+ tags: [...TAGS26]
132318
+ }).input(v2Input.paramsBody(TokenSaleReadInputSchema, TokenSaleDocumentConfirmUploadBodySchema)).output(createSingleResponse(TokenSaleDocumentConfirmUploadOutputSchema));
132319
+ var documentsList = v2Contract.route({
132320
+ method: "GET",
132321
+ path: "/addons/token-sales/{saleAddress}/documents",
132322
+ description: "List documents for a token sale with pagination, sorting, and filtering. Visibility-tiered: public always visible; holders tier requires token balance or purchase position; restricted tier requires sale manager.",
132323
+ successDescription: "Paginated array of token-sale documents with total count and faceted filter values.",
132324
+ tags: [...TAGS26]
132325
+ }).input(v2Input.paramsQuery(TokenSaleReadInputSchema, TokenSaleDocumentsV2ListInputSchema)).output(TokenSaleDocumentsV2ListOutputSchema);
132326
+ var documentsGetDownloadUrl = v2Contract.route({
132327
+ method: "POST",
132328
+ path: "/addons/token-sales/{saleAddress}/documents/{documentId}/downloads",
132329
+ description: "Get presigned URL for secure token-sale document download.",
132330
+ successDescription: "Presigned URL for download.",
132331
+ tags: [...TAGS26]
132332
+ }).input(v2Input.params(TokenSaleDocumentGetDownloadUrlParamsSchema)).output(createSingleResponse(TokenSaleDocumentGetDownloadUrlOutputSchema));
132333
+ var documentsDelete = v2Contract.route({
132334
+ method: "DELETE",
132335
+ path: "/addons/token-sales/{saleAddress}/documents/{documentId}",
132336
+ description: "Delete a token-sale document.",
132337
+ successDescription: "Document deleted successfully.",
132338
+ tags: [...TAGS26]
132339
+ }).input(v2Input.params(TokenSaleDocumentDeleteParamsSchema)).output(DeleteResponseSchema);
131938
132340
  var tokenSaleV2Contract = {
131939
132341
  list: list16,
132342
+ investments,
132343
+ operationsList,
131940
132344
  read: read12,
132345
+ capTable,
131941
132346
  currentTime,
131942
132347
  create: create8,
131943
132348
  activate,
132349
+ transitionToPublic,
131944
132350
  buy,
131945
132351
  configureVesting,
131946
132352
  end,
@@ -131958,7 +132364,14 @@ var tokenSaleV2Contract = {
131958
132364
  removePaymentCurrency,
131959
132365
  setSoftCap,
131960
132366
  setPurchaseLimits,
131961
- setTermsHash
132367
+ setTermsHash,
132368
+ grantRoleByParticipant,
132369
+ revokeRoleByParticipant,
132370
+ documentsGetUploadUrl,
132371
+ documentsConfirmUpload,
132372
+ documentsList,
132373
+ documentsGetDownloadUrl,
132374
+ documentsDelete
131962
132375
  };
131963
132376
  var XVP_COLLECTION_FIELDS = {
131964
132377
  name: textField(),
@@ -134725,67 +135138,6 @@ var ActivityListV2InputSchema = createCollectionInputSchema(ACTIVITY_LIST_COLLEC
134725
135138
  globalSearch: true
134726
135139
  });
134727
135140
  var ActivityListV2OutputSchema = createPaginatedResponse(ActivityEventV2ItemSchema);
134728
- var EligibilityReadParamsSchema = exports_external.object({
134729
- participantId: exports_external.string().min(1).meta({
134730
- description: "Identifier of the participant whose global eligibility is being evaluated."
134731
- })
134732
- });
134733
- var EligibilityReadQuerySchema = exports_external.object({
134734
- live: exports_external.union([exports_external.boolean(), exports_external.literal("true"), exports_external.literal("false")]).optional().transform((value22) => value22 === true || value22 === "true").pipe(exports_external.boolean()).default(false).meta({
134735
- description: "When true, bypass the indexer and evaluate the verdict via live readContract against installed compliance modules. Cold-RPC, multi-second p95 latency; reserved for the dapp's explicit Recheck action."
134736
- })
134737
- });
134738
- var EligibilityVerdictSchema = exports_external.enum(["allowed", "needs-action", "blocked"]).meta({
134739
- description: "Top-level eligibility verdict. `allowed` means the participant satisfies every installed rule; `needs-action` flags missing/expired claims or allow-list gaps; `blocked` indicates at least one block-list match."
134740
- });
134741
- var EligibilitySourceSchema = exports_external.enum(["indexer", "live"]).meta({
134742
- description: "Where the verdict was evaluated."
134743
- });
134744
- var EligibilityReasonCodeSchema = exports_external.enum([
134745
- "address-blocked",
134746
- "country-blocked",
134747
- "country-not-allowed",
134748
- "identity-blocked",
134749
- "identity-not-verified",
134750
- "claim-missing",
134751
- "claim-revoked",
134752
- "claim-expired",
134753
- "live-timeout"
134754
- ]).meta({ description: "Reason code attached to a single rule failure." });
134755
- var EligibilityReasonDetailsSchema = exports_external.object({
134756
- topic: exports_external.string().optional().meta({ description: "Claim topic name (for claim-* reason codes)." }),
134757
- expiresAt: timestamp().optional().meta({ description: "Timestamp the related claim expired or expires." }),
134758
- countryCode: isoCountryCodeNumeric.optional().meta({
134759
- description: "ISO numeric country code involved in a country-list reason."
134760
- })
134761
- }).meta({ description: "Optional reason-specific context." });
134762
- var EligibilityReasonSchema = exports_external.object({
134763
- code: EligibilityReasonCodeSchema,
134764
- moduleTypeId: complianceTypeId().optional().meta({
134765
- description: "TypeId of the module that produced this reason, when known."
134766
- }),
134767
- instanceAddress: ethereumAddress.optional().meta({
134768
- description: "Address of the specific module instance that produced this reason."
134769
- }),
134770
- details: EligibilityReasonDetailsSchema.optional()
134771
- });
134772
- var WalletEligibilityVerdictItemSchema = exports_external.object({
134773
- verdict: EligibilityVerdictSchema,
134774
- source: EligibilitySourceSchema,
134775
- checkedAt: timestamp().meta({
134776
- description: "Timestamp at which the verdict was evaluated."
134777
- }),
134778
- wallet: ethereumAddress.nullable().meta({
134779
- description: "Wallet address the verdict was evaluated against. Null when no wallet is resolvable yet."
134780
- }),
134781
- reasons: exports_external.array(EligibilityReasonSchema)
134782
- });
134783
- var EligibilityVerdictItemSchema = WalletEligibilityVerdictItemSchema.extend({
134784
- wallets: exports_external.array(WalletEligibilityVerdictItemSchema).optional().meta({
134785
- description: "Per-wallet verdict breakdown when the participant owns multiple wallets, such as an EOA and smart wallet pair."
134786
- })
134787
- });
134788
- var EligibilityReadOutputSchema = createSingleResponse(EligibilityVerdictItemSchema);
134789
135141
  var read20 = v2Contract.route({
134790
135142
  method: "GET",
134791
135143
  path: "/participants/{participantId}/compliance-eligibility",
@@ -136455,7 +136807,7 @@ var grantRole = v2Contract.route({
136455
136807
  successDescription: "Roles granted successfully.",
136456
136808
  tags: [V2_TAG.accessManager]
136457
136809
  }).meta({ contractErrors: [...ACCESS_ERRORS] }).input(v2Input.paramsBody(exports_external.object({ address: GrantRoleInputSchema.shape.account }), GrantRoleInputSchema.omit({ account: true }))).output(createAsyncBlockchainMutationResponse(GrantRoleOutputSchema));
136458
- var grantRoleByParticipant = v2Contract.route({
136810
+ var grantRoleByParticipant2 = v2Contract.route({
136459
136811
  method: "POST",
136460
136812
  path: "/system/participants/role-grants",
136461
136813
  description: "Grant a role to every wallet owned by a participant.",
@@ -136469,7 +136821,7 @@ var revokeRole = v2Contract.route({
136469
136821
  successDescription: "Roles revoked successfully.",
136470
136822
  tags: [V2_TAG.accessManager]
136471
136823
  }).meta({ contractErrors: [...ACCESS_ERRORS] }).input(v2Input.paramsBody(exports_external.object({ address: RevokeRoleInputSchema.shape.account }), RevokeRoleInputSchema.omit({ account: true }))).output(createAsyncBlockchainMutationResponse(RevokeRoleOutputSchema));
136472
- var revokeRoleByParticipant = v2Contract.route({
136824
+ var revokeRoleByParticipant2 = v2Contract.route({
136473
136825
  method: "POST",
136474
136826
  path: "/system/participants/role-revocations",
136475
136827
  description: "Revoke a role from every wallet owned by a participant.",
@@ -136480,9 +136832,9 @@ var accessManagerV2Contract = {
136480
136832
  rolesList,
136481
136833
  rolesRead,
136482
136834
  grantRole,
136483
- grantRoleByParticipant,
136835
+ grantRoleByParticipant: grantRoleByParticipant2,
136484
136836
  revokeRole,
136485
- revokeRoleByParticipant,
136837
+ revokeRoleByParticipant: revokeRoleByParticipant2,
136486
136838
  participantRolesView
136487
136839
  };
136488
136840
  var BundlerStatusSchema = exports_external.object({
@@ -138550,6 +138902,7 @@ var TOKEN_COLLECTION_FIELDS = {
138550
138902
  templateId: textField({ sortable: false, defaultOperator: "eq" }),
138551
138903
  templateSlug: textField({ sortable: false, defaultOperator: "eq" }),
138552
138904
  paused: enumField(["active", "paused"], { sortable: false }),
138905
+ governedByCaller: booleanField({ sortable: false, facetable: false }),
138553
138906
  createdAt: dateField()
138554
138907
  };
138555
138908
  var BaseInputSchema = createCollectionInputSchema(TOKEN_COLLECTION_FIELDS, {
@@ -139782,7 +140135,7 @@ var grantRole2 = v2Contract.route({
139782
140135
  exports_external.object(TokenGrantRoleInputSchema.options[0].shape).omit({ tokenAddress: true }),
139783
140136
  exports_external.object(TokenGrantRoleInputSchema.options[1].shape).omit({ tokenAddress: true })
139784
140137
  ]))).output(createAsyncBlockchainMutationResponse(TokenGrantRoleOutputSchema));
139785
- var grantRoleByParticipant2 = v2Contract.route({
140138
+ var grantRoleByParticipant3 = v2Contract.route({
139786
140139
  method: "POST",
139787
140140
  path: "/tokens/{tokenAddress}/participant-role-grants",
139788
140141
  description: "Grant a role to every wallet owned by a participant on a token.",
@@ -139802,7 +140155,7 @@ var revokeRole2 = v2Contract.route({
139802
140155
  exports_external.object(TokenRevokeRoleInputSchema.options[0].shape).omit({ tokenAddress: true }),
139803
140156
  exports_external.object(TokenRevokeRoleInputSchema.options[1].shape).omit({ tokenAddress: true })
139804
140157
  ]))).output(createAsyncBlockchainMutationResponse(TokenRevokeRoleOutputSchema));
139805
- var revokeRoleByParticipant2 = v2Contract.route({
140158
+ var revokeRoleByParticipant3 = v2Contract.route({
139806
140159
  method: "POST",
139807
140160
  path: "/tokens/{tokenAddress}/participant-role-revocations",
139808
140161
  description: "Revoke a role from every wallet owned by a participant on a token.",
@@ -139901,9 +140254,9 @@ var tokenV2MutationsContract = {
139901
140254
  setModuleScope,
139902
140255
  configureScopedComplianceModule,
139903
140256
  grantRole: grantRole2,
139904
- grantRoleByParticipant: grantRoleByParticipant2,
140257
+ grantRoleByParticipant: grantRoleByParticipant3,
139905
140258
  revokeRole: revokeRole2,
139906
- revokeRoleByParticipant: revokeRoleByParticipant2,
140259
+ revokeRoleByParticipant: revokeRoleByParticipant3,
139907
140260
  claimIssue: claimIssue2,
139908
140261
  claimRevoke: claimRevoke2,
139909
140262
  setMetadata,
@@ -143268,28 +143621,28 @@ var versionRequestUpdate = v2Contract.route({
143268
143621
  successDescription: "Update request created successfully.",
143269
143622
  tags: [V2_TAG.userKyc]
143270
143623
  }).input(v2Input.paramsBody(exports_external.object({ versionId: KycProfileVersionRequestUpdateInputSchema.shape.versionId }), KycProfileVersionRequestUpdateInputSchema.omit({ versionId: true }))).output(createSingleResponse(KycProfileVersionRequestUpdateOutputSchema));
143271
- var documentsList = v2Contract.route({
143624
+ var documentsList2 = v2Contract.route({
143272
143625
  method: "GET",
143273
143626
  path: "/kyc-profile-versions/{versionId}/documents",
143274
143627
  description: "List documents attached to a KYC profile version with pagination, sorting, and filtering. Sortable by fileName, documentType, fileSize, uploadedAt.",
143275
143628
  successDescription: "Paginated array of KYC documents with total count and faceted filter values.",
143276
143629
  tags: [V2_TAG.userKyc]
143277
143630
  }).input(v2Input.paramsQuery(exports_external.object({ versionId: exports_external.string().min(1) }), KycProfileVersionDocumentsV2ListInputSchema)).output(KycProfileVersionDocumentsV2ListOutputSchema);
143278
- var documentsDelete = v2Contract.route({
143631
+ var documentsDelete2 = v2Contract.route({
143279
143632
  method: "DELETE",
143280
143633
  path: "/kyc-profile-versions/{versionId}/documents/{documentId}",
143281
143634
  description: "Delete a document from a draft KYC profile version.",
143282
143635
  successDescription: "KYC document deleted successfully.",
143283
143636
  tags: [V2_TAG.userKyc]
143284
143637
  }).input(v2Input.params(KycProfileVersionDocumentDeleteInputSchema)).output(DeleteResponseSchema);
143285
- var documentsConfirmUpload = v2Contract.route({
143638
+ var documentsConfirmUpload2 = v2Contract.route({
143286
143639
  method: "POST",
143287
143640
  path: "/kyc-profile-versions/{versionId}/documents",
143288
143641
  description: "Upload a KYC document through DAPI so the payload is encrypted before object storage.",
143289
143642
  successDescription: "Document uploaded successfully.",
143290
143643
  tags: [V2_TAG.userKyc]
143291
143644
  }).input(v2Input.paramsBody(exports_external.object({ versionId: KycProfileVersionDocumentConfirmUploadV2InputSchema.shape.versionId }), KycProfileVersionDocumentConfirmUploadV2InputSchema.omit({ versionId: true }))).output(createSingleResponse(KycProfileVersionDocumentConfirmUploadOutputSchema));
143292
- var documentsGetDownloadUrl = v2Contract.route({
143645
+ var documentsGetDownloadUrl2 = v2Contract.route({
143293
143646
  method: "POST",
143294
143647
  path: "/kyc-profile-versions/{versionId}/documents/{documentId}/downloads",
143295
143648
  description: "Generate a presigned URL for downloading a KYC document.",
@@ -143315,10 +143668,10 @@ var kycV2Contract = {
143315
143668
  requestUpdate: versionRequestUpdate
143316
143669
  },
143317
143670
  documents: {
143318
- list: documentsList,
143319
- delete: documentsDelete,
143320
- confirmUpload: documentsConfirmUpload,
143321
- getDownloadUrl: documentsGetDownloadUrl
143671
+ list: documentsList2,
143672
+ delete: documentsDelete2,
143673
+ confirmUpload: documentsConfirmUpload2,
143674
+ getDownloadUrl: documentsGetDownloadUrl2
143322
143675
  },
143323
143676
  actionRequest: { fulfill: actionRequestFulfill }
143324
143677
  };
@@ -144210,7 +144563,7 @@ function normalizeDalpBaseUrl(url2) {
144210
144563
  }
144211
144564
  var package_default = {
144212
144565
  name: "@settlemint/dalp-sdk",
144213
- version: "3.0.6-main.28333103539",
144566
+ version: "3.0.6-main.28339035451",
144214
144567
  private: false,
144215
144568
  description: "Fully typed SDK for the DALP tokenization platform API",
144216
144569
  homepage: "https://settlemint.com",
@@ -145391,6 +145744,7 @@ var DAPI_ROUTE_ERROR_IDS = {
145391
145744
  "DALP-0676": "DALP-0676",
145392
145745
  "DALP-0677": "DALP-0677",
145393
145746
  "DALP-0678": "DALP-0678",
145747
+ "DALP-0679": "DALP-0679",
145394
145748
  "DALP-9070": "DALP-9070",
145395
145749
  "DALP-9071": "DALP-9071",
145396
145750
  "DALP-9072": "DALP-9072",
@@ -145454,7 +145808,7 @@ var failedStateSet = new Set(FAILED_TRANSACTION_STATES);
145454
145808
  // package.json
145455
145809
  var package_default2 = {
145456
145810
  name: "@settlemint/dalp-cli",
145457
- version: "3.0.6-main.28333103539",
145811
+ version: "3.0.6-main.28339035451",
145458
145812
  private: false,
145459
145813
  description: "CLI for the Digital Asset Lifecycle Platform — manage tokens, identities, compliance, and more from the command line.",
145460
145814
  homepage: "https://settlemint.com",
@@ -163457,6 +163811,34 @@ var ENTRIES_INDEX2 = {
163457
163811
  owner: "dapi",
163458
163812
  orpcCode: "CUSTODY_PROVIDER_IMMUTABLE"
163459
163813
  },
163814
+ "DALP-0679": {
163815
+ id: "DALP-0679",
163816
+ kind: "route",
163817
+ category: "client",
163818
+ status: 400,
163819
+ retryable: false,
163820
+ expectedClientError: true,
163821
+ public: {
163822
+ message: "The sale token cannot be withdrawn as a payment currency",
163823
+ why: "The selected withdrawal currency is the token being sold; the contract reserves those tokens for buyers and reverts CannotWithdrawSaleToken.",
163824
+ fix: "Choose one of the sale's payment currencies instead of the sale token, then retry."
163825
+ },
163826
+ observability: {
163827
+ severity: "info",
163828
+ otelEventName: "dapi.error",
163829
+ metricAttributeKey: "dapi.error.id",
163830
+ dimensions: [
163831
+ "error.id",
163832
+ "error.category",
163833
+ "surface",
163834
+ "route",
163835
+ "status_class",
163836
+ "retryable"
163837
+ ]
163838
+ },
163839
+ owner: "dapi",
163840
+ orpcCode: "TOKEN_SALE_CANNOT_WITHDRAW_SALE_TOKEN_CURRENCY"
163841
+ },
163460
163842
  "DALP-1001": {
163461
163843
  id: "DALP-1001",
163462
163844
  kind: "contract",
@@ -179292,7 +179674,7 @@ var ENTRIES_INDEX2 = {
179292
179674
  kind: "contract",
179293
179675
  category: "contract",
179294
179676
  status: 422,
179295
- retryable: false,
179677
+ retryable: true,
179296
179678
  expectedClientError: true,
179297
179679
  public: {
179298
179680
  message: "Slippage exceeded",
@@ -189072,6 +189454,7 @@ var DALP_ERROR_TYPED_FIELD_NAMES2 = {
189072
189454
  "DALP-0676": [],
189073
189455
  "DALP-0677": [],
189074
189456
  "DALP-0678": [],
189457
+ "DALP-0679": [],
189075
189458
  "DALP-1001": [
189076
189459
  "args",
189077
189460
  "correlationId",
@@ -199148,6 +199531,7 @@ var DALP_ERROR_DATA_SCHEMA_BY_ID2 = {
199148
199531
  "DALP-0676": DALP_ORPC_ERROR_DATA_WIRE_SCHEMA2,
199149
199532
  "DALP-0677": DALP_ORPC_ERROR_DATA_WIRE_SCHEMA2,
199150
199533
  "DALP-0678": DALP_ORPC_ERROR_DATA_WIRE_SCHEMA2,
199534
+ "DALP-0679": DALP_ORPC_ERROR_DATA_WIRE_SCHEMA2,
199151
199535
  "DALP-1001": DALP_ORPC_ERROR_DATA_BASE_SCHEMA2.extend({
199152
199536
  args: exports_external.record(exports_external.string(), exports_external.string()),
199153
199537
  correlationId: exports_external.string(),
@@ -214521,6 +214905,12 @@ tokenSalesCommand.command("list", {
214521
214905
  return c.var.orpc.addons.tokenSale.list({ query: {} });
214522
214906
  }
214523
214907
  });
214908
+ tokenSalesCommand.command("investments", {
214909
+ description: "List the authenticated caller's token-sale investments (participated + coarsely-eligible sales)",
214910
+ run(c) {
214911
+ return c.var.orpc.addons.tokenSale.investments({ query: {} });
214912
+ }
214913
+ });
214524
214914
  tokenSalesCommand.command("read", {
214525
214915
  description: "Read token sale details",
214526
214916
  args: exports_external.object({ address: exports_external.string().describe("Token sale address") }),
@@ -214528,6 +214918,19 @@ tokenSalesCommand.command("read", {
214528
214918
  return c.var.orpc.addons.tokenSale.read({ params: { saleAddress: c.args.address } });
214529
214919
  }
214530
214920
  });
214921
+ tokenSalesCommand.command("operations", {
214922
+ description: "List every token sale across all tokens (cross-token Operations view; admin / tokenManager only)",
214923
+ run(c) {
214924
+ return c.var.orpc.addons.tokenSale.operationsList({ query: {} });
214925
+ }
214926
+ });
214927
+ tokenSalesCommand.command("cap-table", {
214928
+ description: "Read the manager-gated cap table (investor identity + KYC + allocation) for a token sale",
214929
+ args: exports_external.object({ address: exports_external.string().describe("Token sale address") }),
214930
+ run(c) {
214931
+ return c.var.orpc.addons.tokenSale.capTable({ params: { saleAddress: c.args.address } });
214932
+ }
214933
+ });
214531
214934
  tokenSalesCommand.command("create", {
214532
214935
  description: "Create a token sale",
214533
214936
  options: exports_external.object({
@@ -214547,6 +214950,13 @@ tokenSalesCommand.command("activate", {
214547
214950
  return c.var.orpc.addons.tokenSale.activate({ body: { saleAddress: c.args.address } });
214548
214951
  }
214549
214952
  });
214953
+ tokenSalesCommand.command("transition-to-public", {
214954
+ description: "Transition a token sale from presale to public sale",
214955
+ args: exports_external.object({ address: exports_external.string().describe("Token sale address") }),
214956
+ run(c) {
214957
+ return c.var.orpc.addons.tokenSale.transitionToPublic({ body: { saleAddress: c.args.address } });
214958
+ }
214959
+ });
214550
214960
  tokenSalesCommand.command("buy", {
214551
214961
  description: "Buy tokens in a sale",
214552
214962
  options: exports_external.object({
@@ -214780,12 +215190,158 @@ tokenSalesCommand.command("set-terms-hash", {
214780
215190
  });
214781
215191
  }
214782
215192
  });
215193
+ tokenSalesCommand.command("grant-role-by-participant", {
215194
+ description: "Grant a sale role (saleAdmin / fundsManager) to every wallet owned by a participant",
215195
+ options: exports_external.object({
215196
+ address: exports_external.string().describe("Token sale address"),
215197
+ role: exports_external.enum(["saleAdmin", "fundsManager"]).describe("Sale role to grant"),
215198
+ participantId: exports_external.string().optional().describe("Participant ID"),
215199
+ identityAddress: exports_external.string().optional().describe("Identity contract address (alternative to --participant-id)")
215200
+ }),
215201
+ run(c) {
215202
+ if (c.options.identityAddress) {
215203
+ return c.var.orpc.addons.tokenSale.grantRoleByParticipant({
215204
+ body: { saleAddress: c.options.address, role: c.options.role, identityAddress: c.options.identityAddress }
215205
+ });
215206
+ }
215207
+ if (!c.options.participantId) {
215208
+ throw new Error("Either --participant-id or --identity-address is required");
215209
+ }
215210
+ return c.var.orpc.addons.tokenSale.grantRoleByParticipant({
215211
+ body: { saleAddress: c.options.address, role: c.options.role, participantId: c.options.participantId }
215212
+ });
215213
+ }
215214
+ });
215215
+ tokenSalesCommand.command("revoke-role-by-participant", {
215216
+ description: "Revoke a sale role (saleAdmin / fundsManager) from every wallet owned by a participant",
215217
+ options: exports_external.object({
215218
+ address: exports_external.string().describe("Token sale address"),
215219
+ role: exports_external.enum(["saleAdmin", "fundsManager"]).describe("Sale role to revoke"),
215220
+ participantId: exports_external.string().optional().describe("Participant ID"),
215221
+ identityAddress: exports_external.string().optional().describe("Identity contract address (alternative to --participant-id)")
215222
+ }),
215223
+ run(c) {
215224
+ if (c.options.identityAddress) {
215225
+ return c.var.orpc.addons.tokenSale.revokeRoleByParticipant({
215226
+ body: { saleAddress: c.options.address, role: c.options.role, identityAddress: c.options.identityAddress }
215227
+ });
215228
+ }
215229
+ if (!c.options.participantId) {
215230
+ throw new Error("Either --participant-id or --identity-address is required");
215231
+ }
215232
+ return c.var.orpc.addons.tokenSale.revokeRoleByParticipant({
215233
+ body: { saleAddress: c.options.address, role: c.options.role, participantId: c.options.participantId }
215234
+ });
215235
+ }
215236
+ });
214783
215237
  tokenSalesCommand.command("current-time", {
214784
215238
  description: "Fetch the current chain head timestamp used for token sale scheduling",
214785
215239
  run(c) {
214786
215240
  return c.var.orpc.addons.tokenSale.currentTime({ query: {} });
214787
215241
  }
214788
215242
  });
215243
+ tokenSalesCommand.command("documents-get-upload-url", {
215244
+ description: "Get presigned URL for direct token-sale document upload (manager-gated)",
215245
+ options: exports_external.object({
215246
+ saleAddress: exports_external.string().describe("Token sale contract address"),
215247
+ fileName: exports_external.string().describe("File name"),
215248
+ fileSize: exports_external.coerce.number().describe("File size in bytes"),
215249
+ mimeType: exports_external.enum([
215250
+ "application/pdf",
215251
+ "image/jpeg",
215252
+ "image/png",
215253
+ "image/webp",
215254
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
215255
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
215256
+ "text/csv"
215257
+ ]).describe("MIME type"),
215258
+ documentType: exports_external.enum(["cover_photo", "sale_logo", "brochure", "faq", "other"]).describe("Document type"),
215259
+ visibility: exports_external.enum(["public", "holders", "restricted"]).describe("Visibility tier")
215260
+ }),
215261
+ run(c) {
215262
+ return c.var.orpc.addons.tokenSale.documentsGetUploadUrl({
215263
+ params: { saleAddress: c.options.saleAddress },
215264
+ body: {
215265
+ fileName: c.options.fileName,
215266
+ fileSize: c.options.fileSize,
215267
+ mimeType: c.options.mimeType,
215268
+ documentType: c.options.documentType,
215269
+ visibility: c.options.visibility
215270
+ }
215271
+ });
215272
+ }
215273
+ });
215274
+ tokenSalesCommand.command("documents-confirm-upload", {
215275
+ description: "Confirm a token-sale document upload after file has been stored (manager-gated)",
215276
+ options: exports_external.object({
215277
+ saleAddress: exports_external.string().describe("Token sale contract address"),
215278
+ objectKey: exports_external.string().describe("Object key returned from documents-get-upload-url"),
215279
+ fileName: exports_external.string().describe("File name"),
215280
+ fileSize: exports_external.coerce.number().describe("File size in bytes"),
215281
+ mimeType: exports_external.enum([
215282
+ "application/pdf",
215283
+ "image/jpeg",
215284
+ "image/png",
215285
+ "image/webp",
215286
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
215287
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
215288
+ "text/csv"
215289
+ ]).describe("MIME type"),
215290
+ documentType: exports_external.enum(["cover_photo", "sale_logo", "brochure", "faq", "other"]).describe("Document type"),
215291
+ visibility: exports_external.enum(["public", "holders", "restricted"]).describe("Visibility tier"),
215292
+ replaceGroupId: exports_external.string().optional().describe("Group ID of an existing document to replace")
215293
+ }),
215294
+ run(c) {
215295
+ return c.var.orpc.addons.tokenSale.documentsConfirmUpload({
215296
+ params: { saleAddress: c.options.saleAddress },
215297
+ body: {
215298
+ objectKey: c.options.objectKey,
215299
+ fileName: c.options.fileName,
215300
+ fileSize: c.options.fileSize,
215301
+ mimeType: c.options.mimeType,
215302
+ documentType: c.options.documentType,
215303
+ visibility: c.options.visibility,
215304
+ replaceGroupId: c.options.replaceGroupId
215305
+ }
215306
+ });
215307
+ }
215308
+ });
215309
+ tokenSalesCommand.command("documents-list", {
215310
+ description: "List documents for a token sale (visibility-tiered)",
215311
+ options: exports_external.object({
215312
+ saleAddress: exports_external.string().describe("Token sale contract address")
215313
+ }),
215314
+ run(c) {
215315
+ return c.var.orpc.addons.tokenSale.documentsList({
215316
+ params: { saleAddress: c.options.saleAddress },
215317
+ query: {}
215318
+ });
215319
+ }
215320
+ });
215321
+ tokenSalesCommand.command("documents-get-download-url", {
215322
+ description: "Get presigned download URL for a token-sale document",
215323
+ options: exports_external.object({
215324
+ saleAddress: exports_external.string().describe("Token sale contract address"),
215325
+ documentId: exports_external.string().describe("Document ID")
215326
+ }),
215327
+ run(c) {
215328
+ return c.var.orpc.addons.tokenSale.documentsGetDownloadUrl({
215329
+ params: { saleAddress: c.options.saleAddress, documentId: c.options.documentId }
215330
+ });
215331
+ }
215332
+ });
215333
+ tokenSalesCommand.command("documents-delete", {
215334
+ description: "Delete a token-sale document (manager-gated)",
215335
+ options: exports_external.object({
215336
+ saleAddress: exports_external.string().describe("Token sale contract address"),
215337
+ documentId: exports_external.string().describe("Document ID")
215338
+ }),
215339
+ run(c) {
215340
+ return c.var.orpc.addons.tokenSale.documentsDelete({
215341
+ params: { saleAddress: c.options.saleAddress, documentId: c.options.documentId }
215342
+ });
215343
+ }
215344
+ });
214789
215345
 
214790
215346
  // src/commands/blockchain-transactions.ts
214791
215347
  var blockchainTransactionsCommand = exports_Cli.create("blockchain-transactions", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@settlemint/dalp-cli",
3
- "version": "3.0.6-main.28333103539",
3
+ "version": "3.0.6-main.28339035451",
4
4
  "private": false,
5
5
  "description": "CLI for the Digital Asset Lifecycle Platform — manage tokens, identities, compliance, and more from the command line.",
6
6
  "homepage": "https://settlemint.com",