@settlemint/dalp-cli 3.1.33-main.43218154827 → 3.1.33-main.43236641077
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 +46 -19
- package/dist/dalp.js.map +14 -13
- package/dist/{openapi-surface-k29k4fag.json → openapi-surface-3q0zashj.json} +185 -20
- package/package.json +4 -4
- package/src/generated/openapi-surface.json +185 -20
- package/src/lib/errors.ts +20 -1
- package/src/lib/feature-gated-operations.ts +18 -0
- package/src/lib/register-operations.ts +3 -0
- package/src/lib/webhook-fixtures.ts +11 -0
|
@@ -537,13 +537,14 @@
|
|
|
537
537
|
"name": "status",
|
|
538
538
|
"in": "query",
|
|
539
539
|
"required": false,
|
|
540
|
-
"description": "`open` while units remain locked. Once the lock is empty, the move that emptied it: `unlocked` back to free, `relocked` into another lock, `paid` out, `reclaimed` by the owner after it expired, or `forced` by a custodian's forced transfer.",
|
|
540
|
+
"description": "`open` while units remain locked. Once the lock is empty, the move that emptied it: `unlocked` back to free, `relocked` into another lock, `paid` out, `booked` to another owner's free balance (a venue delivery whose receiver could not take the transfer), `reclaimed` by the owner after it expired, or `forced` by a custodian's forced transfer.",
|
|
541
541
|
"type": "string",
|
|
542
542
|
"enum": [
|
|
543
543
|
"open",
|
|
544
544
|
"unlocked",
|
|
545
545
|
"relocked",
|
|
546
546
|
"paid",
|
|
547
|
+
"booked",
|
|
547
548
|
"reclaimed",
|
|
548
549
|
"forced"
|
|
549
550
|
],
|
|
@@ -9551,6 +9552,108 @@
|
|
|
9551
9552
|
}
|
|
9552
9553
|
]
|
|
9553
9554
|
},
|
|
9555
|
+
"bankRail/clientLinkDecision": {
|
|
9556
|
+
"name": "bankRail/clientLinkDecision",
|
|
9557
|
+
"method": "POST",
|
|
9558
|
+
"url": "/api/v2/bank-rail/connections/{connectionId}/client-links/{clientLinkId}/decisions",
|
|
9559
|
+
"summary": "Decide a client's delivery request",
|
|
9560
|
+
"description": "Approves or rejects the link's open delivery request, named by its approval id, with an optional reason. `approve` reads the gateway again and switches delivery to it; it is refused with `delivery-stale`, after closing the request and raising a case, when the gateway or a check no longer matches the request. `reject` keeps the client's credits minting to its wallet. The manager who opened the request cannot decide it (`same-actor`). Refused with `state` when the request is no longer open.",
|
|
9561
|
+
"help": "Approves or rejects the link's open delivery request, named by its approval id, with an optional reason. `approve` reads the gateway again and switches delivery to it; it is refused with `delivery-stale`, after closing the request and raising a case, when the gateway or a check no longer matches the request. `reject` keeps the client's credits minting to its wallet. The manager who opened the request cannot decide it (`same-actor`). Refused with `state` when the request is no longer open.",
|
|
9562
|
+
"tags": [
|
|
9563
|
+
"Bank rail"
|
|
9564
|
+
],
|
|
9565
|
+
"pathParams": [
|
|
9566
|
+
{
|
|
9567
|
+
"name": "connectionId",
|
|
9568
|
+
"in": "path",
|
|
9569
|
+
"required": true,
|
|
9570
|
+
"description": null,
|
|
9571
|
+
"type": "string",
|
|
9572
|
+
"enum": null,
|
|
9573
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
|
|
9574
|
+
"examples": [],
|
|
9575
|
+
"fields": []
|
|
9576
|
+
},
|
|
9577
|
+
{
|
|
9578
|
+
"name": "clientLinkId",
|
|
9579
|
+
"in": "path",
|
|
9580
|
+
"required": true,
|
|
9581
|
+
"description": null,
|
|
9582
|
+
"type": "string",
|
|
9583
|
+
"enum": null,
|
|
9584
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
|
|
9585
|
+
"examples": [],
|
|
9586
|
+
"fields": []
|
|
9587
|
+
}
|
|
9588
|
+
],
|
|
9589
|
+
"queryParams": [],
|
|
9590
|
+
"headerParams": [
|
|
9591
|
+
{
|
|
9592
|
+
"name": "Idempotency-Key",
|
|
9593
|
+
"in": "header",
|
|
9594
|
+
"required": false,
|
|
9595
|
+
"description": "Retry key for one mutation. Reuse it only for the same method, path, and body on a route that documents replay safety. If omitted, the platform generates a UUIDv7 key; replay-safe writes echo it in the `Idempotency-Key` response header. A lost response still requires status reconciliation.",
|
|
9596
|
+
"type": "string",
|
|
9597
|
+
"enum": null,
|
|
9598
|
+
"pattern": null,
|
|
9599
|
+
"examples": [],
|
|
9600
|
+
"fields": []
|
|
9601
|
+
}
|
|
9602
|
+
],
|
|
9603
|
+
"requestBodyDescription": "Approves or rejects the link's open delivery request. An approval reads the gateway again and sets delivery to the gateway only when every check still passes; a rejection keeps the client's credits minting to its wallet.",
|
|
9604
|
+
"hasRequestBody": true,
|
|
9605
|
+
"bodyIsComplex": false,
|
|
9606
|
+
"bodyFields": [
|
|
9607
|
+
{
|
|
9608
|
+
"name": "decision",
|
|
9609
|
+
"in": "query",
|
|
9610
|
+
"required": true,
|
|
9611
|
+
"description": null,
|
|
9612
|
+
"type": "string",
|
|
9613
|
+
"enum": [
|
|
9614
|
+
"approve",
|
|
9615
|
+
"reject"
|
|
9616
|
+
],
|
|
9617
|
+
"pattern": null,
|
|
9618
|
+
"examples": [
|
|
9619
|
+
"approve",
|
|
9620
|
+
"reject"
|
|
9621
|
+
],
|
|
9622
|
+
"fields": []
|
|
9623
|
+
},
|
|
9624
|
+
{
|
|
9625
|
+
"name": "approvalId",
|
|
9626
|
+
"in": "query",
|
|
9627
|
+
"required": true,
|
|
9628
|
+
"description": "The link's open delivery request.",
|
|
9629
|
+
"type": "string",
|
|
9630
|
+
"enum": null,
|
|
9631
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
|
|
9632
|
+
"examples": [],
|
|
9633
|
+
"fields": []
|
|
9634
|
+
},
|
|
9635
|
+
{
|
|
9636
|
+
"name": "reason",
|
|
9637
|
+
"in": "query",
|
|
9638
|
+
"required": false,
|
|
9639
|
+
"description": "Why the request is decided, kept on the approval.",
|
|
9640
|
+
"type": "string",
|
|
9641
|
+
"enum": null,
|
|
9642
|
+
"pattern": null,
|
|
9643
|
+
"examples": [],
|
|
9644
|
+
"fields": []
|
|
9645
|
+
}
|
|
9646
|
+
],
|
|
9647
|
+
"examples": [
|
|
9648
|
+
{
|
|
9649
|
+
"description": "Approves or rejects the link's open delivery request, named by its approval id, with an optional reason. `approve` reads the gateway again and switches delivery to it; it is refused with `delivery-stale`, after closing the request and raising a case, when the gateway or a check no longer matches the request. `reject` keeps the client's credits minting to its wallet. The manager who opened the request cannot decide it (`same-actor`). Refused with `state` when the request is no longer open.",
|
|
9650
|
+
"path": {
|
|
9651
|
+
"connectionId": "<connectionId>",
|
|
9652
|
+
"clientLinkId": "<clientLinkId>"
|
|
9653
|
+
}
|
|
9654
|
+
}
|
|
9655
|
+
]
|
|
9656
|
+
},
|
|
9554
9657
|
"bankRail/clientLinkDelete": {
|
|
9555
9658
|
"name": "bankRail/clientLinkDelete",
|
|
9556
9659
|
"method": "DELETE",
|
|
@@ -9613,6 +9716,68 @@
|
|
|
9613
9716
|
}
|
|
9614
9717
|
]
|
|
9615
9718
|
},
|
|
9719
|
+
"bankRail/clientLinkTransition": {
|
|
9720
|
+
"name": "bankRail/clientLinkTransition",
|
|
9721
|
+
"method": "POST",
|
|
9722
|
+
"url": "/api/v2/bank-rail/connections/{connectionId}/client-links/{clientLinkId}/transitions",
|
|
9723
|
+
"summary": "Switch a client's credit delivery",
|
|
9724
|
+
"description": "`enable-gateway-delivery` reads the client's custody gateway, runs the delivery checks and opens a delivery request that another bank rail manager decides; it names the link's rowVersion. It is refused with `booked-mode` when the connection books credits without minting, `preconditions-failed` when a check fails, `delivery-request-open` when a request is already open and `row-version` when the link moved, and answers a retryable 503 when the gateway cannot be read. `disable-gateway-delivery` sends the client's future credits back to its wallet at once and withdraws an open delivery request. It names the link's rowVersion; a replay that finds the link already delivering to the wallet returns it unchanged. Credits whose mint already settled keep delivering.",
|
|
9725
|
+
"help": "`enable-gateway-delivery` reads the client's custody gateway, runs the delivery checks and opens a delivery request that another bank rail manager decides; it names the link's rowVersion. It is refused with `booked-mode` when the connection books credits without minting, `preconditions-failed` when a check fails, `delivery-request-open` when a request is already open and `row-version` when the link moved, and answers a retryable 503 when the gateway cannot be read. `disable-gateway-delivery` sends the client's future credits back to its wallet at once and withdraws an open delivery request. It names the link's rowVersion; a replay that finds the link already delivering to the wallet returns it unchanged. Credits whose mint already settled keep delivering.",
|
|
9726
|
+
"tags": [
|
|
9727
|
+
"Bank rail"
|
|
9728
|
+
],
|
|
9729
|
+
"pathParams": [
|
|
9730
|
+
{
|
|
9731
|
+
"name": "connectionId",
|
|
9732
|
+
"in": "path",
|
|
9733
|
+
"required": true,
|
|
9734
|
+
"description": null,
|
|
9735
|
+
"type": "string",
|
|
9736
|
+
"enum": null,
|
|
9737
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
|
|
9738
|
+
"examples": [],
|
|
9739
|
+
"fields": []
|
|
9740
|
+
},
|
|
9741
|
+
{
|
|
9742
|
+
"name": "clientLinkId",
|
|
9743
|
+
"in": "path",
|
|
9744
|
+
"required": true,
|
|
9745
|
+
"description": null,
|
|
9746
|
+
"type": "string",
|
|
9747
|
+
"enum": null,
|
|
9748
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
|
|
9749
|
+
"examples": [],
|
|
9750
|
+
"fields": []
|
|
9751
|
+
}
|
|
9752
|
+
],
|
|
9753
|
+
"queryParams": [],
|
|
9754
|
+
"headerParams": [
|
|
9755
|
+
{
|
|
9756
|
+
"name": "Idempotency-Key",
|
|
9757
|
+
"in": "header",
|
|
9758
|
+
"required": false,
|
|
9759
|
+
"description": "Retry key for one mutation. Reuse it only for the same method, path, and body on a route that documents replay safety. If omitted, the platform generates a UUIDv7 key; replay-safe writes echo it in the `Idempotency-Key` response header. A lost response still requires status reconciliation.",
|
|
9760
|
+
"type": "string",
|
|
9761
|
+
"enum": null,
|
|
9762
|
+
"pattern": null,
|
|
9763
|
+
"examples": [],
|
|
9764
|
+
"fields": []
|
|
9765
|
+
}
|
|
9766
|
+
],
|
|
9767
|
+
"requestBodyDescription": "enable-gateway-delivery reads the client's gateway and, when every check passes, opens a request another bank rail manager decides; the client's credits keep minting to its wallet until then. disable-gateway-delivery sends the client's future credits back to its wallet at once and withdraws an open delivery request. Credits whose mint already settled keep delivering.",
|
|
9768
|
+
"hasRequestBody": true,
|
|
9769
|
+
"bodyIsComplex": true,
|
|
9770
|
+
"bodyFields": [],
|
|
9771
|
+
"examples": [
|
|
9772
|
+
{
|
|
9773
|
+
"description": "`enable-gateway-delivery` reads the client's custody gateway, runs the delivery checks and opens a delivery request that another bank rail manager decides; it names the link's rowVersion. It is refused with `booked-mode` when the connection books credits without minting, `preconditions-failed` when a check fails, `delivery-request-open` when a request is already open and `row-version` when the link moved, and answers a retryable 503 when the gateway cannot be read. `disable-gateway-delivery` sends the client's future credits back to its wallet at once and withdraws an open delivery request. It names the link's rowVersion; a replay that finds the link already delivering to the wallet returns it unchanged. Credits whose mint already settled keep delivering.",
|
|
9774
|
+
"path": {
|
|
9775
|
+
"connectionId": "<connectionId>",
|
|
9776
|
+
"clientLinkId": "<clientLinkId>"
|
|
9777
|
+
}
|
|
9778
|
+
}
|
|
9779
|
+
]
|
|
9780
|
+
},
|
|
9616
9781
|
"bankRail/clientLinksList": {
|
|
9617
9782
|
"name": "bankRail/clientLinksList",
|
|
9618
9783
|
"method": "GET",
|
|
@@ -12877,8 +13042,8 @@
|
|
|
12877
13042
|
"method": "GET",
|
|
12878
13043
|
"url": "/api/v2/wallets/allocations/{allocationId}",
|
|
12879
13044
|
"summary": "Read a wallet allocation",
|
|
12880
|
-
"description": "Returns the durable allocation that creates a Canton party wallet. Use the allocation id from the 202 accept body. When status is awaiting-existing-approval, use lifecycleRequestId with the custody-account approval flow. An allocation of another organization answers the same not-found response as a missing allocation.",
|
|
12881
|
-
"help": "Returns the durable allocation that creates a Canton party wallet. Use the allocation id from the 202 accept body. When status is awaiting-existing-approval, use lifecycleRequestId with the custody-account approval flow. An allocation of another organization answers the same not-found response as a missing allocation.",
|
|
13045
|
+
"description": "Returns the durable allocation that creates a Canton party wallet. Use the allocation id from the 202 accept body. When status is awaiting-existing-approval, use lifecycleRequestId with the custody-account approval flow. An allocation of another organization answers the same not-found response as a missing allocation. Available only on a deployment that has `features.canton` switched on. While it is off, this route answers `404 ROUTE_NOT_FOUND`, the same answer as a route that does not exist.",
|
|
13046
|
+
"help": "Returns the durable allocation that creates a Canton party wallet. Use the allocation id from the 202 accept body. When status is awaiting-existing-approval, use lifecycleRequestId with the custody-account approval flow. An allocation of another organization answers the same not-found response as a missing allocation. Available only on a deployment that has `features.canton` switched on. While it is off, this route answers `404 ROUTE_NOT_FOUND`, the same answer as a route that does not exist.",
|
|
12882
13047
|
"tags": [
|
|
12883
13048
|
"Wallets"
|
|
12884
13049
|
],
|
|
@@ -12903,7 +13068,7 @@
|
|
|
12903
13068
|
"bodyFields": [],
|
|
12904
13069
|
"examples": [
|
|
12905
13070
|
{
|
|
12906
|
-
"description": "Returns the durable allocation that creates a Canton party wallet. Use the allocation id from the 202 accept body. When status is awaiting-existing-approval, use lifecycleRequestId with the custody-account approval flow. An allocation of another organization answers the same not-found response as a missing allocation.",
|
|
13071
|
+
"description": "Returns the durable allocation that creates a Canton party wallet. Use the allocation id from the 202 accept body. When status is awaiting-existing-approval, use lifecycleRequestId with the custody-account approval flow. An allocation of another organization answers the same not-found response as a missing allocation. Available only on a deployment that has `features.canton` switched on. While it is off, this route answers `404 ROUTE_NOT_FOUND`, the same answer as a route that does not exist.",
|
|
12907
13072
|
"path": {
|
|
12908
13073
|
"allocationId": "<allocationId>"
|
|
12909
13074
|
}
|
|
@@ -12915,8 +13080,8 @@
|
|
|
12915
13080
|
"method": "POST",
|
|
12916
13081
|
"url": "/api/v2/wallets",
|
|
12917
13082
|
"summary": "Create a wallet",
|
|
12918
|
-
"description": "Creates a custody-held wallet. Family canton allocates a Canton external party whose topology is signed automatically by the organization's custody-held Ed25519 key. A finished allocation returns 200. Background work and existing-signer approval return 202 with a status URL; the allocation status exposes the lifecycle request to approve.",
|
|
12919
|
-
"help": "Creates a custody-held wallet. Family canton allocates a Canton external party whose topology is signed automatically by the organization's custody-held Ed25519 key. A finished allocation returns 200. Background work and existing-signer approval return 202 with a status URL; the allocation status exposes the lifecycle request to approve.",
|
|
13083
|
+
"description": "Creates a custody-held wallet. Family canton allocates a Canton external party whose topology is signed automatically by the organization's custody-held Ed25519 key. A finished allocation returns 200. Background work and existing-signer approval return 202 with a status URL; the allocation status exposes the lifecycle request to approve. Available only on a deployment that has `features.canton` switched on. While it is off, this route answers `404 ROUTE_NOT_FOUND`, the same answer as a route that does not exist.",
|
|
13084
|
+
"help": "Creates a custody-held wallet. Family canton allocates a Canton external party whose topology is signed automatically by the organization's custody-held Ed25519 key. A finished allocation returns 200. Background work and existing-signer approval return 202 with a status URL; the allocation status exposes the lifecycle request to approve. Available only on a deployment that has `features.canton` switched on. While it is off, this route answers `404 ROUTE_NOT_FOUND`, the same answer as a route that does not exist.",
|
|
12920
13085
|
"tags": [
|
|
12921
13086
|
"Wallets"
|
|
12922
13087
|
],
|
|
@@ -12995,8 +13160,8 @@
|
|
|
12995
13160
|
"method": "GET",
|
|
12996
13161
|
"url": "/api/v2/wallets",
|
|
12997
13162
|
"summary": "List wallets",
|
|
12998
|
-
"description": "Returns one page of custody-held wallets for the selected participant in the active organization. Canton party wallets currently populate this list. Sort defaults to cantonPartyId ascending. Filter on family, party id, participant id, network id, or signer wallet id. Repeating the request is safe.",
|
|
12999
|
-
"help": "Returns one page of custody-held wallets for the selected participant in the active organization. Canton party wallets currently populate this list. Sort defaults to cantonPartyId ascending. Filter on family, party id, participant id, network id, or signer wallet id. Repeating the request is safe.",
|
|
13163
|
+
"description": "Returns one page of custody-held wallets for the selected participant in the active organization. Canton party wallets currently populate this list. Sort defaults to cantonPartyId ascending. Filter on family, party id, participant id, network id, or signer wallet id. Repeating the request is safe. Available only on a deployment that has `features.canton` switched on. While it is off, this route answers `404 ROUTE_NOT_FOUND`, the same answer as a route that does not exist.",
|
|
13164
|
+
"help": "Returns one page of custody-held wallets for the selected participant in the active organization. Canton party wallets currently populate this list. Sort defaults to cantonPartyId ascending. Filter on family, party id, participant id, network id, or signer wallet id. Repeating the request is safe. Available only on a deployment that has `features.canton` switched on. While it is off, this route answers `404 ROUTE_NOT_FOUND`, the same answer as a route that does not exist.",
|
|
13000
13165
|
"tags": [
|
|
13001
13166
|
"Wallets"
|
|
13002
13167
|
],
|
|
@@ -13139,7 +13304,7 @@
|
|
|
13139
13304
|
"bodyFields": [],
|
|
13140
13305
|
"examples": [
|
|
13141
13306
|
{
|
|
13142
|
-
"description": "Returns one page of custody-held wallets for the selected participant in the active organization. Canton party wallets currently populate this list. Sort defaults to cantonPartyId ascending. Filter on family, party id, participant id, network id, or signer wallet id. Repeating the request is safe.",
|
|
13307
|
+
"description": "Returns one page of custody-held wallets for the selected participant in the active organization. Canton party wallets currently populate this list. Sort defaults to cantonPartyId ascending. Filter on family, party id, participant id, network id, or signer wallet id. Repeating the request is safe. Available only on a deployment that has `features.canton` switched on. While it is off, this route answers `404 ROUTE_NOT_FOUND`, the same answer as a route that does not exist.",
|
|
13143
13308
|
"query": {
|
|
13144
13309
|
"sort": "family"
|
|
13145
13310
|
}
|
|
@@ -13151,8 +13316,8 @@
|
|
|
13151
13316
|
"method": "GET",
|
|
13152
13317
|
"url": "/api/v2/wallets/{walletId}",
|
|
13153
13318
|
"summary": "Read a wallet",
|
|
13154
|
-
"description": "Returns one custody-held wallet in the active organization. For a Canton party wallet the identifier is the external party id. A wallet that belongs to another organization answers the same not-found response as a missing wallet.",
|
|
13155
|
-
"help": "Returns one custody-held wallet in the active organization. For a Canton party wallet the identifier is the external party id. A wallet that belongs to another organization answers the same not-found response as a missing wallet.",
|
|
13319
|
+
"description": "Returns one custody-held wallet in the active organization. For a Canton party wallet the identifier is the external party id. A wallet that belongs to another organization answers the same not-found response as a missing wallet. Available only on a deployment that has `features.canton` switched on. While it is off, this route answers `404 ROUTE_NOT_FOUND`, the same answer as a route that does not exist.",
|
|
13320
|
+
"help": "Returns one custody-held wallet in the active organization. For a Canton party wallet the identifier is the external party id. A wallet that belongs to another organization answers the same not-found response as a missing wallet. Available only on a deployment that has `features.canton` switched on. While it is off, this route answers `404 ROUTE_NOT_FOUND`, the same answer as a route that does not exist.",
|
|
13156
13321
|
"tags": [
|
|
13157
13322
|
"Wallets"
|
|
13158
13323
|
],
|
|
@@ -13177,7 +13342,7 @@
|
|
|
13177
13342
|
"bodyFields": [],
|
|
13178
13343
|
"examples": [
|
|
13179
13344
|
{
|
|
13180
|
-
"description": "Returns one custody-held wallet in the active organization. For a Canton party wallet the identifier is the external party id. A wallet that belongs to another organization answers the same not-found response as a missing wallet.",
|
|
13345
|
+
"description": "Returns one custody-held wallet in the active organization. For a Canton party wallet the identifier is the external party id. A wallet that belongs to another organization answers the same not-found response as a missing wallet. Available only on a deployment that has `features.canton` switched on. While it is off, this route answers `404 ROUTE_NOT_FOUND`, the same answer as a route that does not exist.",
|
|
13181
13346
|
"path": {
|
|
13182
13347
|
"walletId": "<walletId>"
|
|
13183
13348
|
}
|
|
@@ -13189,8 +13354,8 @@
|
|
|
13189
13354
|
"method": "POST",
|
|
13190
13355
|
"url": "/api/v2/wallets/{walletId}/submissions",
|
|
13191
13356
|
"summary": "Submit a DAML command (escape hatch)",
|
|
13192
|
-
"description": "Submits a hand-built DAML command for a custody-held Canton party wallet through interactive submission. This is the escape hatch, not the ordinary write path: the caller supplies the template id, the choice name and the argument record itself, so a command that names them wrongly is refused by the ledger rather than by this platform. Reach for it only for a choice the platform does not yet model as a typed operation. For token issuance, burning, transfer, transfer acceptance and holding unlock, use the typed Canton token operations on the family-aware token collections under /api/v2/tokens/{assetId}, which state the operation in business terms and build the Daml themselves; for delivery-versus-payment use the XvP writes at /api/v2/addons/xvp-settlements, /api/v2/addons/xvp-settlements/{settlementAddress}/approvals and /api/v2/addons/xvp-settlements/{settlementAddress}/executions. When approval is required, the platform authorizes the command intent and re-prepares a fresh hash after approval. A settled command returns 200. When the platform accepts the work and finishes it in the background, the response is 202 with a status URL.",
|
|
13193
|
-
"help": "Submits a hand-built DAML command for a custody-held Canton party wallet through interactive submission. This is the escape hatch, not the ordinary write path: the caller supplies the template id, the choice name and the argument record itself, so a command that names them wrongly is refused by the ledger rather than by this platform. Reach for it only for a choice the platform does not yet model as a typed operation. For token issuance, burning, transfer, transfer acceptance and holding unlock, use the typed Canton token operations on the family-aware token collections under /api/v2/tokens/{assetId}, which state the operation in business terms and build the Daml themselves; for delivery-versus-payment use the XvP writes at /api/v2/addons/xvp-settlements, /api/v2/addons/xvp-settlements/{settlementAddress}/approvals and /api/v2/addons/xvp-settlements/{settlementAddress}/executions. When approval is required, the platform authorizes the command intent and re-prepares a fresh hash after approval. A settled command returns 200. When the platform accepts the work and finishes it in the background, the response is 202 with a status URL.",
|
|
13357
|
+
"description": "Submits a hand-built DAML command for a custody-held Canton party wallet through interactive submission. This is the escape hatch, not the ordinary write path: the caller supplies the template id, the choice name and the argument record itself, so a command that names them wrongly is refused by the ledger rather than by this platform. Reach for it only for a choice the platform does not yet model as a typed operation. For token issuance, burning, transfer, transfer acceptance and holding unlock, use the typed Canton token operations on the family-aware token collections under /api/v2/tokens/{assetId}, which state the operation in business terms and build the Daml themselves; for delivery-versus-payment use the XvP writes at /api/v2/addons/xvp-settlements, /api/v2/addons/xvp-settlements/{settlementAddress}/approvals and /api/v2/addons/xvp-settlements/{settlementAddress}/executions. When approval is required, the platform authorizes the command intent and re-prepares a fresh hash after approval. A settled command returns 200. When the platform accepts the work and finishes it in the background, the response is 202 with a status URL. Available only on a deployment that has `features.canton` switched on. While it is off, this route answers `404 ROUTE_NOT_FOUND`, the same answer as a route that does not exist.",
|
|
13358
|
+
"help": "Submits a hand-built DAML command for a custody-held Canton party wallet through interactive submission. This is the escape hatch, not the ordinary write path: the caller supplies the template id, the choice name and the argument record itself, so a command that names them wrongly is refused by the ledger rather than by this platform. Reach for it only for a choice the platform does not yet model as a typed operation. For token issuance, burning, transfer, transfer acceptance and holding unlock, use the typed Canton token operations on the family-aware token collections under /api/v2/tokens/{assetId}, which state the operation in business terms and build the Daml themselves; for delivery-versus-payment use the XvP writes at /api/v2/addons/xvp-settlements, /api/v2/addons/xvp-settlements/{settlementAddress}/approvals and /api/v2/addons/xvp-settlements/{settlementAddress}/executions. When approval is required, the platform authorizes the command intent and re-prepares a fresh hash after approval. A settled command returns 200. When the platform accepts the work and finishes it in the background, the response is 202 with a status URL. Available only on a deployment that has `features.canton` switched on. While it is off, this route answers `404 ROUTE_NOT_FOUND`, the same answer as a route that does not exist.",
|
|
13194
13359
|
"tags": [
|
|
13195
13360
|
"Wallets"
|
|
13196
13361
|
],
|
|
@@ -13250,7 +13415,7 @@
|
|
|
13250
13415
|
],
|
|
13251
13416
|
"examples": [
|
|
13252
13417
|
{
|
|
13253
|
-
"description": "Submits a hand-built DAML command for a custody-held Canton party wallet through interactive submission. This is the escape hatch, not the ordinary write path: the caller supplies the template id, the choice name and the argument record itself, so a command that names them wrongly is refused by the ledger rather than by this platform. Reach for it only for a choice the platform does not yet model as a typed operation. For token issuance, burning, transfer, transfer acceptance and holding unlock, use the typed Canton token operations on the family-aware token collections under /api/v2/tokens/{assetId}, which state the operation in business terms and build the Daml themselves; for delivery-versus-payment use the XvP writes at /api/v2/addons/xvp-settlements, /api/v2/addons/xvp-settlements/{settlementAddress}/approvals and /api/v2/addons/xvp-settlements/{settlementAddress}/executions. When approval is required, the platform authorizes the command intent and re-prepares a fresh hash after approval. A settled command returns 200. When the platform accepts the work and finishes it in the background, the response is 202 with a status URL.",
|
|
13418
|
+
"description": "Submits a hand-built DAML command for a custody-held Canton party wallet through interactive submission. This is the escape hatch, not the ordinary write path: the caller supplies the template id, the choice name and the argument record itself, so a command that names them wrongly is refused by the ledger rather than by this platform. Reach for it only for a choice the platform does not yet model as a typed operation. For token issuance, burning, transfer, transfer acceptance and holding unlock, use the typed Canton token operations on the family-aware token collections under /api/v2/tokens/{assetId}, which state the operation in business terms and build the Daml themselves; for delivery-versus-payment use the XvP writes at /api/v2/addons/xvp-settlements, /api/v2/addons/xvp-settlements/{settlementAddress}/approvals and /api/v2/addons/xvp-settlements/{settlementAddress}/executions. When approval is required, the platform authorizes the command intent and re-prepares a fresh hash after approval. A settled command returns 200. When the platform accepts the work and finishes it in the background, the response is 202 with a status URL. Available only on a deployment that has `features.canton` switched on. While it is off, this route answers `404 ROUTE_NOT_FOUND`, the same answer as a route that does not exist.",
|
|
13254
13419
|
"path": {
|
|
13255
13420
|
"walletId": "<walletId>"
|
|
13256
13421
|
}
|
|
@@ -13262,8 +13427,8 @@
|
|
|
13262
13427
|
"method": "POST",
|
|
13263
13428
|
"url": "/api/v2/wallets/submissions/{submissionId}/decision",
|
|
13264
13429
|
"summary": "Decide a DAML command intent",
|
|
13265
|
-
"description": "Records an organization-owner or platform-administrator approval decision, then idempotently signals the durable Canton submission. Repeating the same decision is safe.",
|
|
13266
|
-
"help": "Records an organization-owner or platform-administrator approval decision, then idempotently signals the durable Canton submission. Repeating the same decision is safe.",
|
|
13430
|
+
"description": "Records an organization-owner or platform-administrator approval decision, then idempotently signals the durable Canton submission. Repeating the same decision is safe. Available only on a deployment that has `features.canton` switched on. While it is off, this route answers `404 ROUTE_NOT_FOUND`, the same answer as a route that does not exist.",
|
|
13431
|
+
"help": "Records an organization-owner or platform-administrator approval decision, then idempotently signals the durable Canton submission. Repeating the same decision is safe. Available only on a deployment that has `features.canton` switched on. While it is off, this route answers `404 ROUTE_NOT_FOUND`, the same answer as a route that does not exist.",
|
|
13267
13432
|
"tags": [
|
|
13268
13433
|
"Wallets"
|
|
13269
13434
|
],
|
|
@@ -13318,7 +13483,7 @@
|
|
|
13318
13483
|
],
|
|
13319
13484
|
"examples": [
|
|
13320
13485
|
{
|
|
13321
|
-
"description": "Records an organization-owner or platform-administrator approval decision, then idempotently signals the durable Canton submission. Repeating the same decision is safe.",
|
|
13486
|
+
"description": "Records an organization-owner or platform-administrator approval decision, then idempotently signals the durable Canton submission. Repeating the same decision is safe. Available only on a deployment that has `features.canton` switched on. While it is off, this route answers `404 ROUTE_NOT_FOUND`, the same answer as a route that does not exist.",
|
|
13322
13487
|
"path": {
|
|
13323
13488
|
"submissionId": "<submissionId>"
|
|
13324
13489
|
}
|
|
@@ -56944,8 +57109,8 @@
|
|
|
56944
57109
|
"method": "POST",
|
|
56945
57110
|
"url": "/api/v2/tokens",
|
|
56946
57111
|
"summary": "Create a token",
|
|
56947
|
-
"description": "Deploys a new token for the active organization on the request chain, using a factory the organization can use. By default the platform queues the deployment and answers with the transaction identifier, its current state, and the status URL under status 202. A caller that sends Prefer: wait=<seconds> waits for settlement and receives the indexed token plus transaction hashes. Follow progress on the creation stream. A second identical call starts another deployment. The body may be the Canton instrument member instead: a member whose `type` is `canton` creates a Canton instrument, which the platform submits as one workflow of admin-single-party ledger commands and answers with the settled Canton arm under 201, or with the accepted shape when the work finishes in the background.",
|
|
56948
|
-
"help": "Deploys a new token for the active organization on the request chain, using a factory the organization can use. By default the platform queues the deployment and answers with the transaction identifier, its current state, and the status URL under status 202. A caller that sends Prefer: wait=<seconds> waits for settlement and receives the indexed token plus transaction hashes. Follow progress on the creation stream. A second identical call starts another deployment. The body may be the Canton instrument member instead: a member whose `type` is `canton` creates a Canton instrument, which the platform submits as one workflow of admin-single-party ledger commands and answers with the settled Canton arm under 201, or with the accepted shape when the work finishes in the background.",
|
|
57112
|
+
"description": "Deploys a new token for the active organization on the request chain, using a factory the organization can use. By default the platform queues the deployment and answers with the transaction identifier, its current state, and the status URL under status 202. A caller that sends Prefer: wait=<seconds> waits for settlement and receives the indexed token plus transaction hashes. Follow progress on the creation stream. A second identical call starts another deployment. The body may be the Canton instrument member instead: a member whose `type` is `canton` creates a Canton instrument, which the platform submits as one workflow of admin-single-party ledger commands and answers with the settled Canton arm under 201, or with the accepted shape when the work finishes in the background. `templateId` is required for `dalp-asset` and optional for a classic asset type. The platform creates a classic type only when its operator turned on legacy asset creation, and otherwise refuses it with HTTP 422 and `TOKEN_CREATE_ASSET_FAMILY_DEPRECATED`. A classic type created without a template gets no template checks; with one, it gets only the check that the template is published and not hidden from Issue asset, and is refused with `TemplateFeaturesUnavailable` when the template declares features.",
|
|
57113
|
+
"help": "Deploys a new token for the active organization on the request chain, using a factory the organization can use. By default the platform queues the deployment and answers with the transaction identifier, its current state, and the status URL under status 202. A caller that sends Prefer: wait=<seconds> waits for settlement and receives the indexed token plus transaction hashes. Follow progress on the creation stream. A second identical call starts another deployment. The body may be the Canton instrument member instead: a member whose `type` is `canton` creates a Canton instrument, which the platform submits as one workflow of admin-single-party ledger commands and answers with the settled Canton arm under 201, or with the accepted shape when the work finishes in the background. `templateId` is required for `dalp-asset` and optional for a classic asset type. The platform creates a classic type only when its operator turned on legacy asset creation, and otherwise refuses it with HTTP 422 and `TOKEN_CREATE_ASSET_FAMILY_DEPRECATED`. A classic type created without a template gets no template checks; with one, it gets only the check that the template is published and not hidden from Issue asset, and is refused with `TemplateFeaturesUnavailable` when the template declares features.",
|
|
56949
57114
|
"tags": [
|
|
56950
57115
|
"Token creation"
|
|
56951
57116
|
],
|
package/src/lib/errors.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { findDalpSdkError, isDalpApiError } from "@settlemint/dalp-sdk";
|
|
2
2
|
import { buildErrorCta, extractResourceLinks, type CliCtaBlock, type ResourceLinks } from "./cli-cta.ts";
|
|
3
|
+
import type { GatedFeature } from "./feature-gated-operations.ts";
|
|
3
4
|
|
|
4
5
|
export interface CliErrorContext {
|
|
5
6
|
readonly code: string;
|
|
6
7
|
readonly fallbackMessage: string;
|
|
7
8
|
readonly fallbackWhy: string;
|
|
8
9
|
readonly fallbackFix: string;
|
|
10
|
+
readonly gatedFeature?: GatedFeature;
|
|
9
11
|
}
|
|
10
12
|
|
|
11
13
|
export interface RenderedCliError {
|
|
@@ -171,8 +173,25 @@ function normalizeFailure(error: unknown, context: CliErrorContext): NormalizedF
|
|
|
171
173
|
};
|
|
172
174
|
}
|
|
173
175
|
|
|
176
|
+
const ROUTE_NOT_FOUND_CODE = "ROUTE_NOT_FOUND";
|
|
177
|
+
|
|
178
|
+
function featureNotEnabledFailure(feature: GatedFeature): NormalizedFailure {
|
|
179
|
+
return {
|
|
180
|
+
code: "FEATURE_NOT_ENABLED",
|
|
181
|
+
message: `${feature.name} is not enabled on this deployment.`,
|
|
182
|
+
why: `The platform answered with an unknown route because ${feature.name} is switched off (${feature.setting}), so it does not serve this command.`,
|
|
183
|
+
fix: `Ask the operator of this deployment to switch ${feature.name} on, or use a deployment that has it enabled.`,
|
|
184
|
+
retryable: false,
|
|
185
|
+
category: "domain",
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
|
|
174
189
|
export function renderSdkErrorForCli(error: unknown, context: CliErrorContext): RenderedCliError {
|
|
175
|
-
const
|
|
190
|
+
const normalized = normalizeFailure(error, context);
|
|
191
|
+
const failure =
|
|
192
|
+
context.gatedFeature !== undefined && normalized.code === ROUTE_NOT_FOUND_CODE
|
|
193
|
+
? featureNotEnabledFailure(context.gatedFeature)
|
|
194
|
+
: normalized;
|
|
176
195
|
return {
|
|
177
196
|
code: failure.code,
|
|
178
197
|
message: failure.message,
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface GatedFeature {
|
|
2
|
+
readonly name: string;
|
|
3
|
+
readonly setting: string;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
const FEATURE_GATED_OPERATION_GROUPS: Readonly<Record<string, GatedFeature>> = {
|
|
7
|
+
cantonV2: { name: "Canton", setting: "features.canton" },
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export const gatedFeatureOfOperation = (operationName: string): GatedFeature | undefined => {
|
|
11
|
+
const group = operationName.split(".", 1)[0] ?? "";
|
|
12
|
+
return Object.hasOwn(FEATURE_GATED_OPERATION_GROUPS, group) ? FEATURE_GATED_OPERATION_GROUPS[group] : undefined;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const gatedFeatureContext = (operationName: string): { readonly gatedFeature?: GatedFeature } => {
|
|
16
|
+
const gatedFeature = gatedFeatureOfOperation(operationName);
|
|
17
|
+
return gatedFeature === undefined ? {} : { gatedFeature };
|
|
18
|
+
};
|
|
@@ -3,6 +3,7 @@ import { Cli, z } from "incur";
|
|
|
3
3
|
import { buildErrorCta, buildSuccessCtaFromResult, renderCtaText, type CliCtaBlock } from "./cli-cta.ts";
|
|
4
4
|
import { createCliStatus } from "./cli-status.ts";
|
|
5
5
|
import { renderSdkErrorForCli } from "./errors.ts";
|
|
6
|
+
import { gatedFeatureContext } from "./feature-gated-operations.ts";
|
|
6
7
|
import { INDEX_COMMAND } from "@settlemint/dalp-sdk/routes";
|
|
7
8
|
import { listCliOperations, operationHintKey, type OperationDescriptor } from "./operation-inventory.ts";
|
|
8
9
|
import { tagDescription, type SurfaceOperation } from "./openapi-surface.ts";
|
|
@@ -447,6 +448,7 @@ function makeLeafHandler(ops: ReadonlyArray<OperationDescriptor>) {
|
|
|
447
448
|
fallbackMessage: "Operation failed.",
|
|
448
449
|
fallbackWhy: "The DALP API rejected the request or the network call failed.",
|
|
449
450
|
fallbackFix: "Verify authentication, organization context, and args/options, then retry.",
|
|
451
|
+
...gatedFeatureContext(descriptor.name),
|
|
450
452
|
}
|
|
451
453
|
);
|
|
452
454
|
|
|
@@ -480,6 +482,7 @@ function makeLeafHandler(ops: ReadonlyArray<OperationDescriptor>) {
|
|
|
480
482
|
fallbackMessage: "SSE stream failed",
|
|
481
483
|
fallbackWhy: "The Server-Sent Events stream ended with an error before a terminal event.",
|
|
482
484
|
fallbackFix: "Retry the stream command, or poll the matching status endpoint.",
|
|
485
|
+
...gatedFeatureContext(descriptor.name),
|
|
483
486
|
});
|
|
484
487
|
const failed = status.fail(rendered.message);
|
|
485
488
|
if (failed !== undefined) {
|
|
@@ -911,6 +911,17 @@ export const WEBHOOK_FIXTURES = [
|
|
|
911
911
|
"webhook-timestamp": "1767225600",
|
|
912
912
|
},
|
|
913
913
|
},
|
|
914
|
+
{
|
|
915
|
+
eventName: "trading-venue.trade-leg.parked",
|
|
916
|
+
version: 1,
|
|
917
|
+
body: '{"evt_id":"evt_e9f4a20988d55f112eb6324a6e34e36f","lifecycle_state":"final","payload":{"amount":"25000000000000000000","blockNumber":1204311,"chainId":537001,"leg":"base","logIndex":6,"marketId":"0x1111111111111111111111111111111111111111111111111111111111111111","receiverAddress":"0x5555555555555555555555555555555555555555","tokenAddress":"0x7777777777777777777777777777777777777777","transactionHash":"0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","venueAddress":"0x9999999999999999999999999999999999999999","venueTradeId":"0x2222222222222222222222222222222222222222222222222222222222222222"},"related":{"idxr_trading_venue":"0x9999999999999999999999999999999999999999"},"source_id":"example:trading-venue.trade-leg.parked@1:0","type":"trading-venue.trade-leg.parked","version":1}',
|
|
918
|
+
headers: {
|
|
919
|
+
"content-type": "application/json",
|
|
920
|
+
"webhook-id": "evt_e9f4a20988d55f112eb6324a6e34e36f",
|
|
921
|
+
"webhook-signature": "v1,nNBrv/CUes/mGoXAUsdu2VTrAWqpiE+wNH3h/Z/ZKe8=",
|
|
922
|
+
"webhook-timestamp": "1767225600",
|
|
923
|
+
},
|
|
924
|
+
},
|
|
914
925
|
{
|
|
915
926
|
eventName: "trading-venue.trade-settled.final",
|
|
916
927
|
version: 1,
|