@stridge/openapi 0.5.0 → 0.5.1
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/openapi.dereferenced.json +229 -93
- package/dist/openapi.json +48 -29
- package/dist/types.d.ts +231 -65
- package/package.json +1 -1
package/dist/openapi.json
CHANGED
|
@@ -145,7 +145,7 @@
|
|
|
145
145
|
"UDA"
|
|
146
146
|
],
|
|
147
147
|
"summary": "Create a UDA address",
|
|
148
|
-
"description": "Allocate a new Universal Deposit Address for your tenant.
|
|
148
|
+
"description": "Allocate a new Universal Deposit Address for your tenant. The call is idempotent on the owner and the destination together: if a UDA with the same `owner` and the same destination already exists, the existing record is returned with `200` instead of a duplicate. The destination is the treasury for a treasury-backed UDA, or the `(network_id, address, asset)` triple for an inline one; a treasury-backed UDA and an inline UDA are never collapsed into one, even when they point at the same wallet. The same owner with a different destination gets a new UDA. `accepted_assets` is a list of asset symbols (e.g. `[\"USDC\", \"USDT\"]`); if empty, the UDA accepts every asset configured on every UDA-supported chain.\n",
|
|
149
149
|
"security": [
|
|
150
150
|
{
|
|
151
151
|
"ApiKeyAuth": []
|
|
@@ -169,7 +169,7 @@
|
|
|
169
169
|
},
|
|
170
170
|
"responses": {
|
|
171
171
|
"200": {
|
|
172
|
-
"description": "An existing UDA address
|
|
172
|
+
"description": "An existing UDA address with the same `owner` and destination was returned.",
|
|
173
173
|
"content": {
|
|
174
174
|
"application/json": {
|
|
175
175
|
"schema": {
|
|
@@ -2677,8 +2677,8 @@
|
|
|
2677
2677
|
},
|
|
2678
2678
|
"version": {
|
|
2679
2679
|
"type": "string",
|
|
2680
|
-
"description": "The
|
|
2681
|
-
"example": "
|
|
2680
|
+
"description": "The event format version: `v1` for most events; payout, transfer and treasury events send `1.0.0`.",
|
|
2681
|
+
"example": "v1"
|
|
2682
2682
|
},
|
|
2683
2683
|
"type": {
|
|
2684
2684
|
"type": "string",
|
|
@@ -2744,7 +2744,7 @@
|
|
|
2744
2744
|
],
|
|
2745
2745
|
"example": {
|
|
2746
2746
|
"id": "7401d9c7-e29d-4374-8952-af40f05168b7",
|
|
2747
|
-
"version": "
|
|
2747
|
+
"version": "v1",
|
|
2748
2748
|
"type": "uda.settlement.completed",
|
|
2749
2749
|
"time": "2026-10-24T11:59:25Z",
|
|
2750
2750
|
"livemode": false,
|
|
@@ -2752,8 +2752,8 @@
|
|
|
2752
2752
|
"reset_epoch": 2,
|
|
2753
2753
|
"payload": {
|
|
2754
2754
|
"id": "stl_71829304a5b6c7d8",
|
|
2755
|
-
"
|
|
2756
|
-
"
|
|
2755
|
+
"uda_address_id": "uda_2f8c1a9d4e5f6071",
|
|
2756
|
+
"state": "completed"
|
|
2757
2757
|
}
|
|
2758
2758
|
}
|
|
2759
2759
|
},
|
|
@@ -2823,49 +2823,55 @@
|
|
|
2823
2823
|
},
|
|
2824
2824
|
"DestinationInput": {
|
|
2825
2825
|
"type": "object",
|
|
2826
|
-
"description": "Where settlements for this UDA should be delivered.",
|
|
2826
|
+
"description": "Where settlements for this UDA should be delivered, in exactly one of two forms: `treasury` (the name of one of your treasuries, so a rotation of the treasury moves the UDA with it), or inline `network_id` + `address` (+ `asset_symbol`), fixed at create time. Sending both forms is rejected with `400`.\n",
|
|
2827
2827
|
"properties": {
|
|
2828
|
+
"treasury": {
|
|
2829
|
+
"type": "string",
|
|
2830
|
+
"description": "Name of one of your treasuries. Leave the inline fields empty when set.",
|
|
2831
|
+
"example": "main"
|
|
2832
|
+
},
|
|
2828
2833
|
"address": {
|
|
2829
2834
|
"type": "string",
|
|
2830
|
-
"description": "Destination wallet address.",
|
|
2835
|
+
"description": "Destination wallet address (inline form).",
|
|
2831
2836
|
"example": "0x3a1f8b2c9d4e5f60718293a4b5c6d7e8f9012345"
|
|
2832
2837
|
},
|
|
2833
2838
|
"network_id": {
|
|
2834
2839
|
"type": "string",
|
|
2835
|
-
"description": "Destination SLIP-44 network id.",
|
|
2840
|
+
"description": "Destination SLIP-44 network id (inline form).",
|
|
2836
2841
|
"example": "60"
|
|
2837
2842
|
},
|
|
2838
2843
|
"asset_symbol": {
|
|
2839
2844
|
"type": "string",
|
|
2840
|
-
"description": "Destination asset symbol.",
|
|
2845
|
+
"description": "Destination asset symbol (inline form).",
|
|
2841
2846
|
"example": "USDC"
|
|
2842
2847
|
}
|
|
2843
|
-
}
|
|
2844
|
-
"required": [
|
|
2845
|
-
"address",
|
|
2846
|
-
"network_id"
|
|
2847
|
-
]
|
|
2848
|
+
}
|
|
2848
2849
|
},
|
|
2849
2850
|
"RoutingRuleMatchInput": {
|
|
2850
2851
|
"type": "object",
|
|
2851
|
-
"description": "Conditions a deposit must meet for this routing rule to apply.",
|
|
2852
|
+
"description": "Conditions a deposit must meet for this routing rule to apply. At least one of the two fields is required: both pin one asset on one network, `source_network_id` alone matches any asset on that network, and `source_asset_symbol` alone matches that asset on any network. Two rules on one UDA may not share the same match.\n",
|
|
2852
2853
|
"properties": {
|
|
2853
2854
|
"source_network_id": {
|
|
2854
2855
|
"type": "string",
|
|
2856
|
+
"description": "Source SLIP-44 network id.",
|
|
2855
2857
|
"example": "60"
|
|
2856
2858
|
},
|
|
2857
2859
|
"source_asset_symbol": {
|
|
2858
2860
|
"type": "string",
|
|
2861
|
+
"description": "Source asset symbol; must be one of the UDA's `accepted_assets` when that list is set.",
|
|
2859
2862
|
"example": "USDT"
|
|
2860
2863
|
}
|
|
2861
|
-
}
|
|
2862
|
-
"required": [
|
|
2863
|
-
"source_network_id"
|
|
2864
|
-
]
|
|
2864
|
+
}
|
|
2865
2865
|
},
|
|
2866
2866
|
"RoutingRuleDestinationInput": {
|
|
2867
2867
|
"type": "object",
|
|
2868
|
+
"description": "Where a matching deposit settles, in the same two forms as the UDA's `destination`: a `treasury` name, or inline `network_id` + `address` (+ `asset_symbol`). Sending both forms is rejected with `400`.\n",
|
|
2868
2869
|
"properties": {
|
|
2870
|
+
"treasury": {
|
|
2871
|
+
"type": "string",
|
|
2872
|
+
"description": "Name of one of your treasuries. Leave the inline fields empty when set.",
|
|
2873
|
+
"example": "main"
|
|
2874
|
+
},
|
|
2869
2875
|
"address": {
|
|
2870
2876
|
"type": "string",
|
|
2871
2877
|
"example": "0x3a1f8b2c9d4e5f60718293a4b5c6d7e8f9012345"
|
|
@@ -2878,11 +2884,7 @@
|
|
|
2878
2884
|
"type": "string",
|
|
2879
2885
|
"example": "USDC"
|
|
2880
2886
|
}
|
|
2881
|
-
}
|
|
2882
|
-
"required": [
|
|
2883
|
-
"address",
|
|
2884
|
-
"network_id"
|
|
2885
|
-
]
|
|
2887
|
+
}
|
|
2886
2888
|
},
|
|
2887
2889
|
"RoutingRuleInput": {
|
|
2888
2890
|
"type": "object",
|
|
@@ -2923,10 +2925,11 @@
|
|
|
2923
2925
|
},
|
|
2924
2926
|
"routing_rules": {
|
|
2925
2927
|
"type": "array",
|
|
2928
|
+
"maxItems": 5,
|
|
2926
2929
|
"items": {
|
|
2927
2930
|
"$ref": "#/components/schemas/RoutingRuleInput"
|
|
2928
2931
|
},
|
|
2929
|
-
"description": "Optional; max
|
|
2932
|
+
"description": "Optional; max 5. Specificity wins, whatever the order: a rule pinning both `source_network_id` and `source_asset_symbol` beats a network-only rule, and either beats an asset-only rule. When no rule matches, the UDA's routing policy is consulted, and when that does not match either, settlements use the default destination.\n"
|
|
2930
2933
|
},
|
|
2931
2934
|
"routing_policy_id": {
|
|
2932
2935
|
"type": "string",
|
|
@@ -3011,6 +3014,11 @@
|
|
|
3011
3014
|
"type": "object",
|
|
3012
3015
|
"description": "Resolved destination (symbol plus the resolved contract address).",
|
|
3013
3016
|
"properties": {
|
|
3017
|
+
"treasury": {
|
|
3018
|
+
"type": "string",
|
|
3019
|
+
"description": "The treasury name; present only for a treasury-backed destination.",
|
|
3020
|
+
"example": "main"
|
|
3021
|
+
},
|
|
3014
3022
|
"address": {
|
|
3015
3023
|
"type": "string",
|
|
3016
3024
|
"example": "0x3a1f8b2c9d4e5f60718293a4b5c6d7e8f9012345"
|
|
@@ -3061,6 +3069,11 @@
|
|
|
3061
3069
|
"RoutingRuleDestination": {
|
|
3062
3070
|
"type": "object",
|
|
3063
3071
|
"properties": {
|
|
3072
|
+
"treasury": {
|
|
3073
|
+
"type": "string",
|
|
3074
|
+
"description": "The treasury name; present only for a treasury-backed destination.",
|
|
3075
|
+
"example": "main"
|
|
3076
|
+
},
|
|
3064
3077
|
"address": {
|
|
3065
3078
|
"type": "string",
|
|
3066
3079
|
"example": "0x3a1f8b2c9d4e5f60718293a4b5c6d7e8f9012345"
|
|
@@ -3428,6 +3441,7 @@
|
|
|
3428
3441
|
},
|
|
3429
3442
|
"SettlementFees": {
|
|
3430
3443
|
"type": "object",
|
|
3444
|
+
"description": "What was taken between the deposit and the settlement, as integer strings in the base units of the deposit's asset (not the destination asset).\n",
|
|
3431
3445
|
"properties": {
|
|
3432
3446
|
"total": {
|
|
3433
3447
|
"type": "string",
|
|
@@ -3483,11 +3497,16 @@
|
|
|
3483
3497
|
"type": "string",
|
|
3484
3498
|
"enum": [
|
|
3485
3499
|
"created",
|
|
3500
|
+
"refill_pending",
|
|
3501
|
+
"refill_confirmed",
|
|
3502
|
+
"awaiting_credit",
|
|
3486
3503
|
"routing",
|
|
3504
|
+
"retrying",
|
|
3487
3505
|
"completed",
|
|
3488
3506
|
"failed",
|
|
3489
|
-
"
|
|
3507
|
+
"refunded"
|
|
3490
3508
|
],
|
|
3509
|
+
"description": "Where the settlement is in its lifecycle. `created`: the deposit was credited and a settlement opened. `refill_pending` / `refill_confirmed`: the deposit address is being funded with gas (TRON-origin deposits) before the funds move. `awaiting_credit`: parked until the workspace has gas credit to pay for it; it resumes on its own and uses no retry. `routing`: the funds are moving to the destination. `retrying`: an attempt failed and another is scheduled. `completed`: delivered. `failed`: retries ran out. `refunded`: Stridge returned the deposit instead of settling it, from `retrying`, `awaiting_credit` or `failed`. `completed` and `refunded` are final.\n",
|
|
3491
3510
|
"example": "completed"
|
|
3492
3511
|
},
|
|
3493
3512
|
"created_at": {
|
|
@@ -3502,7 +3521,7 @@
|
|
|
3502
3521
|
},
|
|
3503
3522
|
"error": {
|
|
3504
3523
|
"type": "string",
|
|
3505
|
-
"description": "
|
|
3524
|
+
"description": "Why the last attempt failed or was refused, typically present while `status` is `retrying`, `awaiting_credit` or `failed`. Cleared when the settlement is retried or resumes; omitted when empty.\n",
|
|
3506
3525
|
"example": ""
|
|
3507
3526
|
},
|
|
3508
3527
|
"deposit": {
|