@settlemint/dalp-cli 2.1.7-main.25423542996 → 2.1.7-main.25431247785
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/dalp.js +163 -25
- package/package.json +1 -1
package/dist/dalp.js
CHANGED
|
@@ -54858,7 +54858,10 @@ function dapiError(args) {
|
|
|
54858
54858
|
},
|
|
54859
54859
|
surfaces: args.surfaces ?? ["orpc-v2-rest", "orpc-rpc"],
|
|
54860
54860
|
transports: args.transports ?? ["orpc-rest", "orpc-rpc"],
|
|
54861
|
-
observability: dapiObservability({
|
|
54861
|
+
observability: dapiObservability({
|
|
54862
|
+
expectedClientError,
|
|
54863
|
+
severity: args.severity
|
|
54864
|
+
}),
|
|
54862
54865
|
owner: args.owner ?? "dapi",
|
|
54863
54866
|
...args.authSensitivity ? { authSensitivity: args.authSensitivity } : {},
|
|
54864
54867
|
...args.reviewNotes ? { reviewNotes: args.reviewNotes } : {},
|
|
@@ -59807,6 +59810,58 @@ var DAPI_ROUTE_ERROR_ENTRIES = [
|
|
|
59807
59810
|
retryable: false,
|
|
59808
59811
|
expectedClientError: true
|
|
59809
59812
|
})
|
|
59813
|
+
},
|
|
59814
|
+
{
|
|
59815
|
+
code: "TREASURY_IS_CONTRACT_NOT_SUPPORTED",
|
|
59816
|
+
definition: dapiError({
|
|
59817
|
+
id: "DALP-0465",
|
|
59818
|
+
category: "client",
|
|
59819
|
+
status: 400,
|
|
59820
|
+
message: "Treasury is a contract; ERC-20 allowance must be granted by the treasury contract itself. This route only supports externally-owned treasury wallets.",
|
|
59821
|
+
why: "The configured maturity-redemption treasury is a smart contract. ERC-20 `approve` must be called from the contract that owns the funds, which this route cannot do on its behalf.",
|
|
59822
|
+
fix: "Call `approve(spender, amount)` directly from the treasury contract (e.g. via its admin or governance flow), or reconfigure the feature to use an externally-owned treasury wallet.",
|
|
59823
|
+
retryable: false,
|
|
59824
|
+
expectedClientError: true
|
|
59825
|
+
})
|
|
59826
|
+
},
|
|
59827
|
+
{
|
|
59828
|
+
code: "MATURITY_REDEMPTION_FEATURE_STATE_NOT_INDEXED",
|
|
59829
|
+
definition: dapiError({
|
|
59830
|
+
id: "DALP-0466",
|
|
59831
|
+
category: "client",
|
|
59832
|
+
status: 404,
|
|
59833
|
+
message: "Maturity-redemption feature state not yet indexed for this token",
|
|
59834
|
+
why: "The maturity-redemption feature row for this token has not been created or the indexer has not processed the feature initialization yet, so denomination asset and treasury are still unset.",
|
|
59835
|
+
fix: "Verify the token has the maturity-redemption feature attached and wait for the indexer to catch up, then retry.",
|
|
59836
|
+
retryable: true,
|
|
59837
|
+
expectedClientError: true
|
|
59838
|
+
})
|
|
59839
|
+
},
|
|
59840
|
+
{
|
|
59841
|
+
code: "TREASURY_WALLET_MISMATCH",
|
|
59842
|
+
definition: dapiError({
|
|
59843
|
+
id: "DALP-0467",
|
|
59844
|
+
category: "client",
|
|
59845
|
+
status: 403,
|
|
59846
|
+
message: "Caller wallet does not match the configured treasury wallet for the maturity-redemption feature",
|
|
59847
|
+
why: "ERC-20 `approve` must be called from the wallet that owns the funds. The authenticated caller is not the configured treasury wallet, so this route cannot proxy the approval.",
|
|
59848
|
+
fix: "Retry signed in as the configured treasury wallet.",
|
|
59849
|
+
retryable: false,
|
|
59850
|
+
expectedClientError: true
|
|
59851
|
+
})
|
|
59852
|
+
},
|
|
59853
|
+
{
|
|
59854
|
+
code: "MATURITY_REDEMPTION_TREASURY_NOT_YET_CLASSIFIED",
|
|
59855
|
+
definition: dapiError({
|
|
59856
|
+
id: "DALP-0468",
|
|
59857
|
+
category: "dependency",
|
|
59858
|
+
status: 503,
|
|
59859
|
+
message: "Maturity-redemption treasury has not been classified yet by the indexer",
|
|
59860
|
+
why: "The indexer populates `treasury_is_contract` via a single `eth_getCode` on every `MaturityRedemptionFeatureCreated` / `TreasuryUpdated`, but the column is still `null` for this feature — the indexer has not finished the classification step yet (typical during a partial reindex / backfill). Without that flag we cannot decide whether the approve flow is allowed (EOA treasuries) or must be blocked (contract treasuries), so we refuse to proceed rather than risk a misclassified on-chain failure.",
|
|
59861
|
+
fix: "Wait for the indexer to catch up and retry. If the column stays `null` for an extended period, verify the indexer is healthy and that `MaturityRedemptionFeatureCreated` / `TreasuryUpdated` for this feature were ingested.",
|
|
59862
|
+
retryable: true,
|
|
59863
|
+
expectedClientError: false
|
|
59864
|
+
})
|
|
59810
59865
|
}
|
|
59811
59866
|
];
|
|
59812
59867
|
var DAPI_ROUTE_ERROR_DEFINITIONS = Object.fromEntries(DAPI_ROUTE_ERROR_ENTRIES.map(({ code: code2, definition }) => [code2, definition]));
|
|
@@ -60571,21 +60626,23 @@ var ActionTypeSchema = exports_external.enum([
|
|
|
60571
60626
|
"UpdateKYCData",
|
|
60572
60627
|
"MultisigApproval"
|
|
60573
60628
|
]);
|
|
60574
|
-
var ActionExecutorSchema = exports_external.object({
|
|
60575
|
-
id: exports_external.string().meta({ description: "Unique identifier for the action executor", examples: ["exec-001", "exec-002"] }),
|
|
60576
|
-
executors: exports_external.array(ethereumAddress).meta({
|
|
60577
|
-
description: "List of addresses authorized to execute actions",
|
|
60578
|
-
examples: [["0x71C7656EC7ab88b098defB751B7401B5f6d8976F"]]
|
|
60579
|
-
})
|
|
60580
|
-
});
|
|
60581
60629
|
var KycActionMetadataSchema = exports_external.object({
|
|
60582
|
-
reason: exports_external.string().meta({
|
|
60583
|
-
|
|
60630
|
+
reason: exports_external.string().meta({
|
|
60631
|
+
description: "Reason for the update request",
|
|
60632
|
+
examples: ["Address change required", "Document expired"]
|
|
60633
|
+
}),
|
|
60634
|
+
requiredFields: exports_external.array(exports_external.string()).meta({
|
|
60635
|
+
description: "List of fields that need updating",
|
|
60636
|
+
examples: [["address", "phone"], ["passport"]]
|
|
60637
|
+
}),
|
|
60584
60638
|
sourceVersionId: exports_external.string().meta({
|
|
60585
60639
|
description: "ID of the version to clone data from when creating draft",
|
|
60586
60640
|
examples: ["ver-001", "ver-002"]
|
|
60587
60641
|
}),
|
|
60588
|
-
requestId: exports_external.string().meta({
|
|
60642
|
+
requestId: exports_external.string().meta({
|
|
60643
|
+
description: "ID of the KYC action request",
|
|
60644
|
+
examples: ["req-001", "req-002"]
|
|
60645
|
+
})
|
|
60589
60646
|
});
|
|
60590
60647
|
var MultisigActionMetadataSchema = exports_external.object({
|
|
60591
60648
|
userOpHash: exports_external.string().meta({
|
|
@@ -60596,7 +60653,10 @@ var MultisigActionMetadataSchema = exports_external.object({
|
|
|
60596
60653
|
description: "Smart wallet address — needed to build the sign URL",
|
|
60597
60654
|
examples: ["0x71C7656EC7ab88b098defB751B7401B5f6d8976F"]
|
|
60598
60655
|
}),
|
|
60599
|
-
threshold: exports_external.string().meta({
|
|
60656
|
+
threshold: exports_external.string().meta({
|
|
60657
|
+
description: "Required cumulative weight (bigint as decimal string)",
|
|
60658
|
+
examples: ["2"]
|
|
60659
|
+
}),
|
|
60600
60660
|
currentWeight: exports_external.string().meta({
|
|
60601
60661
|
description: "Current accumulated weight (bigint as decimal string)",
|
|
60602
60662
|
examples: ["1"]
|
|
@@ -60611,7 +60671,10 @@ var MultisigActionMetadataSchema = exports_external.object({
|
|
|
60611
60671
|
})
|
|
60612
60672
|
});
|
|
60613
60673
|
var ActionSchema = exports_external.object({
|
|
60614
|
-
id: exports_external.string().meta({
|
|
60674
|
+
id: exports_external.string().meta({
|
|
60675
|
+
description: "Unique identifier for the action",
|
|
60676
|
+
examples: ["action-001", "action-002"]
|
|
60677
|
+
}),
|
|
60615
60678
|
actionType: ActionTypeSchema.meta({
|
|
60616
60679
|
description: "Canonical action type used for filtering and execution",
|
|
60617
60680
|
examples: ["ApproveXvPSettlement", "UpdateKYCData"]
|
|
@@ -60624,21 +60687,30 @@ var ActionSchema = exports_external.object({
|
|
|
60624
60687
|
description: "Target address for the action (null for off-chain actions)",
|
|
60625
60688
|
examples: ["0x71C7656EC7ab88b098defB751B7401B5f6d8976F", null]
|
|
60626
60689
|
}),
|
|
60690
|
+
tokenAddress: ethereumAddress.nullable().meta({
|
|
60691
|
+
description: "Address of the underlying token this action targets, when distinct from `target` (e.g. ClaimYield's `target` is the yield schedule, while the bond is here). Null for off-chain actions.",
|
|
60692
|
+
examples: ["0x71C7656EC7ab88b098defB751B7401B5f6d8976F", null]
|
|
60693
|
+
}),
|
|
60627
60694
|
activeAt: timestamp().meta({
|
|
60628
60695
|
description: "Timestamp when the action becomes active",
|
|
60629
60696
|
examples: ["2024-01-15T10:30:00.000Z"]
|
|
60630
60697
|
}),
|
|
60631
|
-
status: ActionStatusSchema.meta({
|
|
60632
|
-
|
|
60698
|
+
status: ActionStatusSchema.meta({
|
|
60699
|
+
description: "Current status of the action",
|
|
60700
|
+
examples: ["PENDING", "EXECUTED"]
|
|
60701
|
+
}),
|
|
60702
|
+
executedAt: timestamp().nullable().meta({
|
|
60703
|
+
description: "Timestamp when the action was executed",
|
|
60704
|
+
examples: ["2024-01-16T14:00:00.000Z", null]
|
|
60705
|
+
}),
|
|
60633
60706
|
executedBy: ethereumAddress.nullable().meta({
|
|
60634
60707
|
description: "Address that executed the action",
|
|
60635
60708
|
examples: ["0x71C7656EC7ab88b098defB751B7401B5f6d8976F", null]
|
|
60636
60709
|
}),
|
|
60637
|
-
|
|
60638
|
-
description: "
|
|
60639
|
-
examples: [
|
|
60710
|
+
expiresAt: timestamp().nullable().meta({
|
|
60711
|
+
description: "Timestamp when the action expires",
|
|
60712
|
+
examples: ["2024-02-15T10:30:00.000Z", null]
|
|
60640
60713
|
}),
|
|
60641
|
-
expiresAt: timestamp().nullable().meta({ description: "Timestamp when the action expires", examples: ["2024-02-15T10:30:00.000Z", null] }),
|
|
60642
60714
|
source: ActionSourceSchema.default("on-chain").meta({
|
|
60643
60715
|
description: "Source of the action (on-chain or off-chain)",
|
|
60644
60716
|
examples: ["on-chain", "off-chain"]
|
|
@@ -60659,7 +60731,10 @@ var ActionsListInputSchema = exports_external.object({
|
|
|
60659
60731
|
description: "Filter actions by their target addresses",
|
|
60660
60732
|
examples: [["0x71C7656EC7ab88b098defB751B7401B5f6d8976F"]]
|
|
60661
60733
|
}),
|
|
60662
|
-
name: exports_external.string().optional().meta({
|
|
60734
|
+
name: exports_external.string().optional().meta({
|
|
60735
|
+
description: "Filter actions by their name",
|
|
60736
|
+
examples: ["Transfer Approval", "KYC Update"]
|
|
60737
|
+
}),
|
|
60663
60738
|
actionType: ActionTypeSchema.optional().meta({
|
|
60664
60739
|
description: "Filter actions by canonical action type",
|
|
60665
60740
|
examples: ["ClaimYield", "ApproveXvPSettlement"]
|
|
@@ -60874,6 +60949,7 @@ var FixedYieldSchedulePeriodSchema = exports_external.object({
|
|
|
60874
60949
|
}),
|
|
60875
60950
|
completed: exports_external.boolean().meta({ description: "Whether this period has been completed", examples: [true, false] })
|
|
60876
60951
|
});
|
|
60952
|
+
var fixedYieldSchedulePeriod = () => FixedYieldSchedulePeriodSchema;
|
|
60877
60953
|
var FixedYieldScheduleSchema = exports_external.object({
|
|
60878
60954
|
id: ethereumAddress.meta({
|
|
60879
60955
|
description: "Yield schedule contract address",
|
|
@@ -62967,6 +63043,14 @@ var TokenSchema = exports_external.object({
|
|
|
62967
63043
|
description: "The maturity date of the bond",
|
|
62968
63044
|
examples: ["2025-12-31T23:59:59Z"]
|
|
62969
63045
|
}),
|
|
63046
|
+
totalRedeemed: bigDecimal().meta({
|
|
63047
|
+
description: "Cumulative bonds redeemed across all holders (scaled by bond decimals)",
|
|
63048
|
+
examples: ["100", "1500.5"]
|
|
63049
|
+
}),
|
|
63050
|
+
totalRedeemedExact: apiBigInt.meta({
|
|
63051
|
+
description: "Cumulative bonds redeemed across all holders (raw on-chain uint256)",
|
|
63052
|
+
examples: ["100000000000000000000"]
|
|
63053
|
+
}),
|
|
62970
63054
|
denominationAsset: exports_external.object({
|
|
62971
63055
|
id: ethereumAddress.meta({
|
|
62972
63056
|
description: "The address of the denomination asset",
|
|
@@ -68828,6 +68912,26 @@ var StatsBondStatusOutputSchema = exports_external.object({
|
|
|
68828
68912
|
coveredPercentage: bigDecimal().meta({
|
|
68829
68913
|
description: "Percentage of denomination assets available (0-100)",
|
|
68830
68914
|
examples: ["20.00"]
|
|
68915
|
+
}),
|
|
68916
|
+
denominationAssetTreasuryAllowance: bigDecimal().meta({
|
|
68917
|
+
description: "Treasury → maturity-redemption-feature ERC20 allowance for the denomination asset. Indexer-backed (eventually consistent — may briefly read 0 between an Approval tx confirming and the indexer ingesting the event).",
|
|
68918
|
+
examples: ["0.00", "100.00"]
|
|
68919
|
+
}),
|
|
68920
|
+
allowanceCoveredPercentage: bigDecimal().meta({
|
|
68921
|
+
description: "Percentage of required redemption volume covered by the treasury's allowance (0-100)",
|
|
68922
|
+
examples: ["0.00", "100.00"]
|
|
68923
|
+
}),
|
|
68924
|
+
treasuryIsContract: exports_external.boolean().nullable().meta({
|
|
68925
|
+
description: "Whether the treasury address is a contract (vault, true) or an EOA (false). `null` when the indexer has not yet classified the treasury.",
|
|
68926
|
+
examples: [false, true, null]
|
|
68927
|
+
}),
|
|
68928
|
+
treasuryAddress: ethereumAddress.nullable().meta({
|
|
68929
|
+
description: "Treasury address for the maturity-redemption feature",
|
|
68930
|
+
examples: ["0x71C7656EC7ab88b098defB751B7401B5f6d8976F", null]
|
|
68931
|
+
}),
|
|
68932
|
+
featureAddress: ethereumAddress.nullable().meta({
|
|
68933
|
+
description: "Maturity-redemption feature contract address",
|
|
68934
|
+
examples: ["0x71C7656EC7ab88b098defB751B7401B5f6d8976F", null]
|
|
68831
68935
|
})
|
|
68832
68936
|
});
|
|
68833
68937
|
var statsBondStatusContract = v1Contract.route({
|
|
@@ -75406,6 +75510,12 @@ var TokenTopUpMaturityTreasuryInputSchema = TokenMutationInputSchema.extend({
|
|
|
75406
75510
|
examples: ["1000000000000000000"]
|
|
75407
75511
|
})
|
|
75408
75512
|
});
|
|
75513
|
+
var TokenFeatureApproveAllowanceInputSchema = TokenMutationInputSchema.extend({
|
|
75514
|
+
amount: assetAmount.meta({
|
|
75515
|
+
description: "Allowance to grant the maturity-redemption feature on the denomination asset, in base units. The treasury wallet must sign this transaction.",
|
|
75516
|
+
examples: ["1000000000000000000"]
|
|
75517
|
+
})
|
|
75518
|
+
});
|
|
75409
75519
|
var TokenSetTransactionFeeRatesInputSchema = TokenMutationInputSchema.extend({
|
|
75410
75520
|
mintFeeBps: basisPoints().meta({
|
|
75411
75521
|
description: "Mint fee rate in basis points (e.g. 200 = 2%)",
|
|
@@ -75950,6 +76060,13 @@ var featureRedeem = v2Contract.route({
|
|
|
75950
76060
|
successDescription: "Tokens redeemed via maturity feature successfully.",
|
|
75951
76061
|
tags: [V2_TAG.token]
|
|
75952
76062
|
}).meta({ contractErrors: [...COMMON_CONTRACT_ERRORS] }).input(v2Input.paramsBody(TokenReadInputSchema, TokenFeatureRedeemInputSchema.omit({ tokenAddress: true }))).output(mutationOutput);
|
|
76063
|
+
var featureApproveAllowance = v2Contract.route({
|
|
76064
|
+
method: "POST",
|
|
76065
|
+
path: "/tokens/{tokenAddress}/maturity-redemption/treasury-allowance",
|
|
76066
|
+
description: "Approve the maturity-redemption feature to spend denomination asset out of the configured treasury. Caller must be the treasury wallet — without this allowance `feature.redeem(...)` reverts with ERC20InsufficientAllowance because the feature uses `transferFrom` to pay holders.",
|
|
76067
|
+
successDescription: "Treasury allowance approved successfully.",
|
|
76068
|
+
tags: [V2_TAG.token]
|
|
76069
|
+
}).meta({ contractErrors: [...COMMON_CONTRACT_ERRORS] }).input(v2Input.paramsBody(TokenReadInputSchema, TokenFeatureApproveAllowanceInputSchema.omit({ tokenAddress: true }))).output(mutationOutput);
|
|
75953
76070
|
var setTransactionFeeRates = v2Contract.route({
|
|
75954
76071
|
method: "PATCH",
|
|
75955
76072
|
path: "/tokens/{tokenAddress}/transaction-fee/rates",
|
|
@@ -76153,6 +76270,7 @@ var tokenV2MutationsContract = {
|
|
|
76153
76270
|
setYieldTreasury,
|
|
76154
76271
|
featureMature,
|
|
76155
76272
|
featureRedeem,
|
|
76273
|
+
featureApproveAllowance,
|
|
76156
76274
|
matureEarly,
|
|
76157
76275
|
setMaturityTreasury,
|
|
76158
76276
|
topUpMaturityTreasury,
|
|
@@ -76288,9 +76406,29 @@ var TokenFeatureFixedTreasuryYieldSchema = exports_external.object({
|
|
|
76288
76406
|
description: "Treasury funding the yield payouts",
|
|
76289
76407
|
examples: ["0x71C7656EC7ab88b098defB751B7401B5f6d8976F"]
|
|
76290
76408
|
}),
|
|
76409
|
+
totalYield: bigDecimal().meta({
|
|
76410
|
+
description: "Total yield generated across completed periods (denomination asset units)",
|
|
76411
|
+
examples: ["7500.00"]
|
|
76412
|
+
}),
|
|
76291
76413
|
totalClaimed: bigDecimal().meta({
|
|
76292
76414
|
description: "Total yield claimed (denomination asset units)",
|
|
76293
76415
|
examples: ["5000.00"]
|
|
76416
|
+
}),
|
|
76417
|
+
totalUnclaimedYield: bigDecimal().meta({
|
|
76418
|
+
description: "Total unclaimed yield = totalYield - totalClaimed (denomination asset units)",
|
|
76419
|
+
examples: ["2500.00"]
|
|
76420
|
+
}),
|
|
76421
|
+
currentPeriod: fixedYieldSchedulePeriod().nullable().meta({
|
|
76422
|
+
description: "Active period when chain time is within [startDate, endDate); null when not yet started or fully ended",
|
|
76423
|
+
examples: [null]
|
|
76424
|
+
}),
|
|
76425
|
+
nextPeriod: fixedYieldSchedulePeriod().nullable().meta({
|
|
76426
|
+
description: "Period scheduled to start after the current one; null on the final period",
|
|
76427
|
+
examples: [null]
|
|
76428
|
+
}),
|
|
76429
|
+
periods: exports_external.array(fixedYieldSchedulePeriod()).meta({
|
|
76430
|
+
description: "All scheduled periods. Per-period totalYield/totalUnclaimed populate as each period closes; configured rows exist from creation",
|
|
76431
|
+
examples: [[]]
|
|
76294
76432
|
})
|
|
76295
76433
|
}).nullable();
|
|
76296
76434
|
var TokenFeatureVotingPowerSchema = exports_external.object({
|
|
@@ -77394,9 +77532,9 @@ var TokenAssetV2Schema = exports_external.object({
|
|
|
77394
77532
|
}).nullable().meta({ description: "The yield details", examples: [] })
|
|
77395
77533
|
});
|
|
77396
77534
|
var UserAssetBalanceV2ItemSchema = exports_external.object({
|
|
77397
|
-
id:
|
|
77398
|
-
description: "The balance record ID",
|
|
77399
|
-
examples: ["
|
|
77535
|
+
id: exports_external.uuid().meta({
|
|
77536
|
+
description: "The balance record ID (idxr_token_balances.id, UUIDv7).",
|
|
77537
|
+
examples: ["019283bc-7e0a-7c3d-9b1f-3f4d2c5e6a7b"]
|
|
77400
77538
|
}),
|
|
77401
77539
|
value: bigDecimal().meta({
|
|
77402
77540
|
description: "The total balance amount",
|
|
@@ -78012,7 +78150,7 @@ function normalizeDalpBaseUrl(url3) {
|
|
|
78012
78150
|
}
|
|
78013
78151
|
var package_default = {
|
|
78014
78152
|
name: "@settlemint/dalp-sdk",
|
|
78015
|
-
version: "2.1.7-main.
|
|
78153
|
+
version: "2.1.7-main.25431247785",
|
|
78016
78154
|
private: false,
|
|
78017
78155
|
description: "Fully typed SDK for the DALP tokenization platform API",
|
|
78018
78156
|
homepage: "https://settlemint.com",
|
|
@@ -78563,7 +78701,7 @@ function trimConfigValue(name, value3) {
|
|
|
78563
78701
|
// package.json
|
|
78564
78702
|
var package_default2 = {
|
|
78565
78703
|
name: "@settlemint/dalp-cli",
|
|
78566
|
-
version: "2.1.7-main.
|
|
78704
|
+
version: "2.1.7-main.25431247785",
|
|
78567
78705
|
private: false,
|
|
78568
78706
|
description: "CLI for the Digital Asset Lifecycle Platform — manage tokens, identities, compliance, and more from the command line.",
|
|
78569
78707
|
homepage: "https://settlemint.com",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@settlemint/dalp-cli",
|
|
3
|
-
"version": "2.1.7-main.
|
|
3
|
+
"version": "2.1.7-main.25431247785",
|
|
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",
|