@odatano/core 0.3.17 → 0.3.18
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/@cds-models/CardanoODataService/index.d.ts +434 -427
- package/@cds-models/CardanoODataService/index.d.ts.map +1 -1
- package/@cds-models/CardanoODataService/index.js +7 -0
- package/@cds-models/CardanoODataService/index.js.map +1 -1
- package/@cds-models/CardanoODataService/index.ts +99 -92
- package/@cds-models/CardanoSignService/index.d.ts +1549 -0
- package/@cds-models/CardanoSignService/index.d.ts.map +1 -0
- package/@cds-models/CardanoSignService/index.js +291 -0
- package/@cds-models/CardanoSignService/index.js.map +1 -0
- package/@cds-models/CardanoSignService/index.ts +519 -0
- package/@cds-models/CardanoTransactionService/index.d.ts +338 -815
- package/@cds-models/CardanoTransactionService/index.d.ts.map +1 -1
- package/@cds-models/CardanoTransactionService/index.js +3 -63
- package/@cds-models/CardanoTransactionService/index.js.map +1 -1
- package/@cds-models/CardanoTransactionService/index.ts +71 -210
- package/@cds-models/index.d.ts +150 -1
- package/@cds-models/index.d.ts.map +1 -1
- package/@cds-models/index.js +51 -1
- package/@cds-models/index.js.map +1 -1
- package/@cds-models/index.ts +74 -2
- package/@cds-models/odatano/cardano/index.d.ts +553 -696
- package/@cds-models/odatano/cardano/index.d.ts.map +1 -1
- package/@cds-models/odatano/cardano/index.js +3 -52
- package/@cds-models/odatano/cardano/index.js.map +1 -1
- package/@cds-models/odatano/cardano/index.ts +93 -165
- package/README.md +78 -19
- package/db/schema.cds +6 -108
- package/db/types.cds +111 -0
- package/package.json +19 -4
- package/src/index.d.ts.map +1 -1
- package/src/index.js +8 -3
- package/src/index.js.map +1 -1
- package/src/plugin.d.ts.map +1 -1
- package/src/plugin.js +7 -2
- package/src/plugin.js.map +1 -1
- package/srv/blockchain/backends/koios-backend.d.ts.map +1 -1
- package/srv/blockchain/backends/koios-backend.js +6 -16
- package/srv/blockchain/backends/koios-backend.js.map +1 -1
- package/srv/blockchain/cardano-client.d.ts.map +1 -1
- package/srv/blockchain/cardano-client.js +13 -10
- package/srv/blockchain/cardano-client.js.map +1 -1
- package/srv/blockchain/cardano-indexer.d.ts.map +1 -1
- package/srv/blockchain/cardano-indexer.js +10 -8
- package/srv/blockchain/cardano-indexer.js.map +1 -1
- package/srv/blockchain/cardano-tx-builder.d.ts.map +1 -1
- package/srv/blockchain/cardano-tx-builder.js +16 -16
- package/srv/blockchain/cardano-tx-builder.js.map +1 -1
- package/srv/blockchain/signing/hsm-signer.d.ts.map +1 -0
- package/srv/blockchain/signing/hsm-signer.js +290 -0
- package/srv/blockchain/signing/hsm-signer.js.map +1 -0
- package/srv/blockchain/signing/signature-verifier.d.ts.map +1 -1
- package/srv/blockchain/signing/signature-verifier.js +7 -25
- package/srv/blockchain/signing/signature-verifier.js.map +1 -1
- package/srv/blockchain/transaction-building/buildooor-tx.d.ts.map +1 -1
- package/srv/blockchain/transaction-building/buildooor-tx.js +171 -437
- package/srv/blockchain/transaction-building/buildooor-tx.js.map +1 -1
- package/srv/blockchain/transaction-building/cardano-tx.d.ts.map +1 -1
- package/srv/blockchain/transaction-building/csl-tx.d.ts.map +1 -1
- package/srv/blockchain/transaction-building/csl-tx.js +230 -611
- package/srv/blockchain/transaction-building/csl-tx.js.map +1 -1
- package/srv/cardano-service.cds +17 -9
- package/srv/cardano-service.js +2 -14
- package/srv/cardano-service.js.map +1 -1
- package/srv/cardano-sign-service.cds +128 -0
- package/srv/cardano-sign-service.d.ts.map +1 -0
- package/srv/cardano-sign-service.js +401 -0
- package/srv/cardano-sign-service.js.map +1 -0
- package/srv/cardano-tx-service.cds +116 -196
- package/srv/cardano-tx-service.js +5 -308
- package/srv/cardano-tx-service.js.map +1 -1
- package/srv/server.d.ts.map +1 -1
- package/srv/server.js +60 -5
- package/srv/server.js.map +1 -1
- package/srv/utils/const.d.ts.map +1 -1
- package/srv/utils/const.js +5 -1
- package/srv/utils/const.js.map +1 -1
- package/srv/utils/error-codes.d.ts.map +1 -1
- package/srv/utils/error-codes.js +15 -0
- package/srv/utils/error-codes.js.map +1 -1
- package/srv/utils/errors.d.ts.map +1 -1
- package/srv/utils/errors.js +12 -1
- package/srv/utils/errors.js.map +1 -1
- package/srv/utils/mappers.d.ts.map +1 -1
- package/srv/utils/mappers.js +9 -29
- package/srv/utils/mappers.js.map +1 -1
- package/srv/utils/signing-helper.d.ts.map +1 -1
- package/srv/utils/signing-helper.js +3 -18
- package/srv/utils/signing-helper.js.map +1 -1
- package/srv/utils/tx-build-helper.d.ts.map +1 -1
- package/srv/utils/tx-build-helper.js +10 -4
- package/srv/utils/tx-build-helper.js.map +1 -1
- package/srv/utils/types.d.ts.map +1 -1
- package/srv/utils/types.js +2 -0
- package/srv/utils/types.js.map +1 -1
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
using {odatano.cardano as db} from '../db/schema';
|
|
2
|
+
using {Bech32, Lovelace} from '../db/types';
|
|
3
|
+
|
|
2
4
|
|
|
3
5
|
/**
|
|
4
6
|
* Cardano Transaction Service
|
|
@@ -7,7 +9,7 @@ using {odatano.cardano as db} from '../db/schema';
|
|
|
7
9
|
* Separate from the read-only CardanoODataService to provide
|
|
8
10
|
* clear separation between general query and command operations.
|
|
9
11
|
*/
|
|
10
|
-
service CardanoTransactionService @(impl: '
|
|
12
|
+
service CardanoTransactionService @(impl: './cardano-tx-service') {
|
|
11
13
|
// ---------------------------------------------------------------------------
|
|
12
14
|
// Entity Projections - Transaction Building & Submission
|
|
13
15
|
// ---------------------------------------------------------------------------
|
|
@@ -32,18 +34,32 @@ service CardanoTransactionService @(impl: 'srv/cardano-tx-service') {
|
|
|
32
34
|
@description: 'Projection for Transaction Build Output Assets'
|
|
33
35
|
entity TransactionBuildOutputAssets as projection on db.TransactionBuildOutputAssets;
|
|
34
36
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
entity TransactionSubmissions as projection on db.TransactionSubmissions
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
@title : 'Transaction Submissions'
|
|
38
|
+
@description: 'Projection for Transaction Submissions'
|
|
39
|
+
entity TransactionSubmissions as projection on db.TransactionSubmissions
|
|
40
|
+
actions {
|
|
41
|
+
@title : 'Check Submission Status'
|
|
42
|
+
@description: 'Check the status of a submitted transaction by querying the blockchain for confirmation'
|
|
43
|
+
action CheckSubmissionStatus() returns TransactionSubmissions;
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* TransactionSubmissions status flow:
|
|
47
|
+
* pending ──[submit to chain]──→ submitted (internal, in SubmitTransaction handler)
|
|
48
|
+
* submitted ──[CheckSubmissionStatus]──→ confirmed | stays submitted (conditional)
|
|
49
|
+
* pending | submitted ──→ failed (blockchain error)
|
|
50
|
+
*/
|
|
51
|
+
annotate CardanoTransactionService.TransactionSubmissions with @flow.status: status actions {
|
|
52
|
+
CheckSubmissionStatus @from : [ #submitted];
|
|
41
53
|
};
|
|
42
54
|
|
|
43
55
|
@title : 'Transaction Submission Errors'
|
|
44
56
|
@description: 'Projection for Transaction Submission Errors'
|
|
45
57
|
entity TransactionSubmissionErrors as projection on db.TransactionSubmissionErrors;
|
|
46
58
|
|
|
59
|
+
@title : 'Address Transaction Builds'
|
|
60
|
+
@description: 'Projection for retrieving transaction builds by address'
|
|
61
|
+
entity AddressTransactionBuilds as projection on db.AddressTransactionBuilds;
|
|
62
|
+
|
|
47
63
|
// ---------------------------------------------------------------------------
|
|
48
64
|
// Transaction Building Actions
|
|
49
65
|
// ---------------------------------------------------------------------------
|
|
@@ -53,76 +69,76 @@ service CardanoTransactionService @(impl: 'srv/cardano-tx-service') {
|
|
|
53
69
|
action BuildSimpleAdaTransaction(
|
|
54
70
|
@title: 'Sender Address'
|
|
55
71
|
@description: 'The Bech32 encoded address of the sender'
|
|
56
|
-
senderAddress:
|
|
72
|
+
senderAddress: Bech32,
|
|
57
73
|
@title: 'Recipient Address'
|
|
58
74
|
@description: 'The Bech32 encoded address of the recipient'
|
|
59
|
-
recipientAddress:
|
|
75
|
+
recipientAddress: Bech32,
|
|
60
76
|
@title: 'Lovelace Amount'
|
|
61
77
|
@description: 'The amount of ADA to send in lovelace'
|
|
62
|
-
lovelaceAmount:
|
|
78
|
+
lovelaceAmount: Lovelace,
|
|
63
79
|
@title: 'Change Address'
|
|
64
80
|
@description: 'The Bech32 encoded address for returning change - defaults to sender address if not specified'
|
|
65
|
-
changeAddress:
|
|
81
|
+
changeAddress: Bech32,
|
|
66
82
|
@title: 'Output Datum JSON'
|
|
67
83
|
@description: 'Optional inline datum to attach to the recipient output (JSON, cardano-cli DetailedSchema format). Required when sending to a script address.'
|
|
68
84
|
outputDatumJson: String,
|
|
69
85
|
@title: 'Assets JSON'
|
|
70
86
|
@description: 'Optional JSON array of native assets to include in the output ([{"unit":"policyId+assetName","quantity":"amount"}]). Use when locking tokens at a script address.'
|
|
71
|
-
assetsJson: String)
|
|
87
|
+
assetsJson: String) returns TransactionBuilds;
|
|
72
88
|
|
|
73
|
-
@title
|
|
89
|
+
@title : 'Build Transaction with Metadata'
|
|
74
90
|
@description: 'Build a transaction with custom metadata from sender to recipient with specified amount and change address'
|
|
75
91
|
action BuildTransactionWithMetadata(
|
|
76
|
-
@title: 'Sender Address'
|
|
77
|
-
@description: 'The Bech32 encoded address of the sender'
|
|
78
|
-
senderAddress: db.Bech32,
|
|
79
|
-
@title: 'Recipient Address'
|
|
80
|
-
@description: 'The Bech32 encoded address of the recipient'
|
|
81
|
-
recipientAddress: db.Bech32,
|
|
82
|
-
@title: 'Lovelace Amount'
|
|
83
|
-
@description: 'The amount of ADA to send in lovelace'
|
|
84
|
-
lovelaceAmount: db.Lovelace,
|
|
85
|
-
@title: 'Change Address'
|
|
86
|
-
@description: 'The Bech32 encoded address for returning change -defaults to sender address if not specified'
|
|
87
|
-
changeAddress: db.Bech32,
|
|
88
|
-
@title: 'Metadata JSON'
|
|
89
|
-
@description: 'The JSON representation of the transaction metadata as string'
|
|
90
|
-
metadataJson: String) returns TransactionBuilds;
|
|
91
|
-
|
|
92
|
-
@title : 'Build Multi-Asset Transaction'
|
|
93
|
-
@description: 'Build a transaction to send native assets (tokens) along with ADA'
|
|
94
|
-
action BuildMultiAssetTransaction(
|
|
95
92
|
@title: 'Sender Address'
|
|
96
93
|
@description: 'The Bech32 encoded address of the sender'
|
|
97
|
-
senderAddress:
|
|
94
|
+
senderAddress: Bech32,
|
|
98
95
|
@title: 'Recipient Address'
|
|
99
96
|
@description: 'The Bech32 encoded address of the recipient'
|
|
100
|
-
recipientAddress:
|
|
97
|
+
recipientAddress: Bech32,
|
|
101
98
|
@title: 'Lovelace Amount'
|
|
102
99
|
@description: 'The amount of ADA to send in lovelace'
|
|
103
|
-
lovelaceAmount:
|
|
104
|
-
@title: 'Assets JSON'
|
|
105
|
-
@description: 'JSON array of assets to send (format: [{"unit":"policyId+assetName","quantity":"amount"}])'
|
|
106
|
-
assetsJson: String,
|
|
100
|
+
lovelaceAmount: Lovelace,
|
|
107
101
|
@title: 'Change Address'
|
|
108
102
|
@description: 'The Bech32 encoded address for returning change -defaults to sender address if not specified'
|
|
109
|
-
changeAddress:
|
|
110
|
-
@title: '
|
|
111
|
-
@description: '
|
|
112
|
-
|
|
103
|
+
changeAddress: Bech32,
|
|
104
|
+
@title: 'Metadata JSON'
|
|
105
|
+
@description: 'The JSON representation of the transaction metadata as string'
|
|
106
|
+
metadataJson: String) returns TransactionBuilds;
|
|
113
107
|
|
|
114
|
-
@title
|
|
108
|
+
@title : 'Build Multi-Asset Transaction'
|
|
109
|
+
@description: 'Build a transaction to send native assets (tokens) along with ADA'
|
|
110
|
+
action BuildMultiAssetTransaction(
|
|
111
|
+
@title: 'Sender Address'
|
|
112
|
+
@description: 'The Bech32 encoded address of the sender'
|
|
113
|
+
senderAddress: Bech32,
|
|
114
|
+
@title: 'Recipient Address'
|
|
115
|
+
@description: 'The Bech32 encoded address of the recipient'
|
|
116
|
+
recipientAddress: Bech32,
|
|
117
|
+
@title: 'Lovelace Amount'
|
|
118
|
+
@description: 'The amount of ADA to send in lovelace'
|
|
119
|
+
lovelaceAmount: Lovelace,
|
|
120
|
+
@title: 'Assets JSON'
|
|
121
|
+
@description: 'JSON array of assets to send (format: [{"unit":"policyId+assetName","quantity":"amount"}])'
|
|
122
|
+
assetsJson: String,
|
|
123
|
+
@title: 'Change Address'
|
|
124
|
+
@description: 'The Bech32 encoded address for returning change -defaults to sender address if not specified'
|
|
125
|
+
changeAddress: Bech32,
|
|
126
|
+
@title: 'Output Datum JSON'
|
|
127
|
+
@description: 'Optional inline datum to attach to the recipient output (JSON, DetailedSchema). Required when sending to a script address.'
|
|
128
|
+
outputDatumJson: String) returns TransactionBuilds;
|
|
129
|
+
|
|
130
|
+
@title : 'Build Minting Transaction'
|
|
115
131
|
@description: 'Build a transaction to mint or burn native assets'
|
|
116
132
|
action BuildMintTransaction(
|
|
117
133
|
@title: 'Sender Address'
|
|
118
134
|
@description: 'The Bech32 encoded address of the sender (pays fees)'
|
|
119
|
-
senderAddress:
|
|
135
|
+
senderAddress: Bech32,
|
|
120
136
|
@title: 'Recipient Address'
|
|
121
137
|
@description: 'The Bech32 encoded address to receive minted assets'
|
|
122
|
-
recipientAddress:
|
|
138
|
+
recipientAddress: Bech32,
|
|
123
139
|
@title: 'Lovelace Amount'
|
|
124
140
|
@description: 'The amount of ADA to send with minted assets in lovelace'
|
|
125
|
-
lovelaceAmount:
|
|
141
|
+
lovelaceAmount: Lovelace,
|
|
126
142
|
@title: 'Mint Actions JSON'
|
|
127
143
|
@description: 'JSON array of mint/burn actions (format: [{"assetUnit":"policyId+assetName","quantity":"amount"}])'
|
|
128
144
|
mintActionsJson: String,
|
|
@@ -131,7 +147,7 @@ service CardanoTransactionService @(impl: 'srv/cardano-tx-service') {
|
|
|
131
147
|
mintingPolicyScript: String,
|
|
132
148
|
@title: 'Change Address'
|
|
133
149
|
@description: 'The Bech32 encoded address for returning change -defaults to sender address if not specified'
|
|
134
|
-
changeAddress:
|
|
150
|
+
changeAddress: Bech32,
|
|
135
151
|
@title: 'Required Signers JSON'
|
|
136
152
|
@description: 'Optional JSON array of Ed25519 key hashes (hex, 28 bytes each) that must sign the transaction. Required for Plutus validators checking extra_signatories.'
|
|
137
153
|
requiredSignersJson: String,
|
|
@@ -146,57 +162,7 @@ service CardanoTransactionService @(impl: 'srv/cardano-tx-service') {
|
|
|
146
162
|
mintRedeemerJson: String,
|
|
147
163
|
@title: 'Lock on Script Address'
|
|
148
164
|
@description: 'When true and scriptParamsJson is provided, routes the output to the enterprise script address derived from the applied script hash instead of recipientAddress. Returns scriptAddress in the response.'
|
|
149
|
-
lockOnScript: Boolean)
|
|
150
|
-
|
|
151
|
-
@title : 'Build Plutus Spend Transaction'
|
|
152
|
-
@description: 'Build a transaction to spend a UTxO locked at a Plutus script address'
|
|
153
|
-
action BuildPlutusSpendTransaction(
|
|
154
|
-
@title: 'Sender Address'
|
|
155
|
-
@description: 'The Bech32 encoded address of the sender (pays fees)'
|
|
156
|
-
senderAddress: db.Bech32,
|
|
157
|
-
@title: 'Recipient Address'
|
|
158
|
-
@description: 'The Bech32 encoded address to receive the unlocked funds'
|
|
159
|
-
recipientAddress: db.Bech32,
|
|
160
|
-
@title: 'Lovelace Amount'
|
|
161
|
-
@description: 'The amount of ADA to send to the recipient in lovelace'
|
|
162
|
-
lovelaceAmount: db.Lovelace,
|
|
163
|
-
@title: 'Validator Script'
|
|
164
|
-
@description: 'The Plutus validator script in CBOR hex format'
|
|
165
|
-
validatorScript: String,
|
|
166
|
-
@title: 'Script UTxO Transaction Hash'
|
|
167
|
-
@description: 'The transaction hash of the UTxO locked at the script address (64-char hex)'
|
|
168
|
-
scriptTxHash: String,
|
|
169
|
-
@title: 'Script UTxO Output Index'
|
|
170
|
-
@description: 'The output index of the UTxO locked at the script address'
|
|
171
|
-
scriptOutputIndex: Integer,
|
|
172
|
-
@title: 'Redeemer JSON'
|
|
173
|
-
@description: 'The redeemer data as JSON string (will be converted to PlutusData)'
|
|
174
|
-
redeemerJson: String,
|
|
175
|
-
@title: 'Datum JSON'
|
|
176
|
-
@description: 'The datum data as JSON string (optional, for hash-based datums)'
|
|
177
|
-
datumJson: String,
|
|
178
|
-
@title: 'Change Address'
|
|
179
|
-
@description: 'The Bech32 encoded address for returning change - defaults to sender address if not specified'
|
|
180
|
-
changeAddress: db.Bech32,
|
|
181
|
-
@title: 'Required Signers JSON'
|
|
182
|
-
@description: 'Optional JSON array of Ed25519 key hashes (hex, 28 bytes each) that must sign the transaction. Required for Plutus validators checking extra_signatories.'
|
|
183
|
-
requiredSignersJson: String,
|
|
184
|
-
@title: 'Script Parameters JSON'
|
|
185
|
-
@description: 'Optional JSON array of PlutusData parameters to apply to the validator script before building. For parameterized validators.'
|
|
186
|
-
scriptParamsJson: String,
|
|
187
|
-
@title: 'Output Inline Datum JSON'
|
|
188
|
-
@description: 'Optional PlutusData JSON to attach as inline datum on the recipient output. Used for state-machine validators that require continuing output datum.'
|
|
189
|
-
inlineDatumJson: String,
|
|
190
|
-
@title: 'Lock on Script Address'
|
|
191
|
-
@description: 'When true and scriptParamsJson is provided, routes the output to the enterprise script address derived from the applied script hash instead of recipientAddress. Returns scriptAddress in the response.'
|
|
192
|
-
lockOnScript: Boolean) returns TransactionBuilds;
|
|
193
|
-
|
|
194
|
-
@title : 'Set Collateral'
|
|
195
|
-
@description: 'Ensure a dedicated ADA-only collateral UTxO exists for Plutus transactions. Checks if the address has at least 2 UTxOs with >= 5 ADA each. If not, builds a self-send transaction to create a 5 ADA collateral UTxO.'
|
|
196
|
-
action SetCollateral(
|
|
197
|
-
@title: 'Address'
|
|
198
|
-
@description: 'The Bech32 encoded address to check and set up collateral for'
|
|
199
|
-
address: db.Bech32) returns TransactionBuilds;
|
|
165
|
+
lockOnScript: Boolean) returns TransactionBuilds;
|
|
200
166
|
|
|
201
167
|
@title : 'Get Build Details'
|
|
202
168
|
@description: 'Retrieve transaction build details using the Build Id'
|
|
@@ -225,107 +191,61 @@ service CardanoTransactionService @(impl: 'srv/cardano-tx-service') {
|
|
|
225
191
|
@description: 'The Cardano network to submit the transaction to (e.g., mainnet, testnet)'
|
|
226
192
|
network: String(10)) returns TransactionSubmissions;
|
|
227
193
|
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
194
|
+
@title : 'Build Plutus Spend Transaction'
|
|
195
|
+
@description: 'Build a transaction to spend a UTxO locked at a Plutus script address'
|
|
196
|
+
action BuildPlutusSpendTransaction(
|
|
197
|
+
@title: 'Sender Address'
|
|
198
|
+
@description: 'The Bech32 encoded address of the sender (pays fees)'
|
|
199
|
+
senderAddress: Bech32,
|
|
200
|
+
@title: 'Recipient Address'
|
|
201
|
+
@description: 'The Bech32 encoded address to receive the unlocked funds'
|
|
202
|
+
recipientAddress: Bech32,
|
|
203
|
+
@title: 'Lovelace Amount'
|
|
204
|
+
@description: 'The amount of ADA to send to the recipient in lovelace'
|
|
205
|
+
lovelaceAmount: Lovelace,
|
|
206
|
+
@title: 'Validator Script'
|
|
207
|
+
@description: 'The Plutus validator script in CBOR hex format'
|
|
208
|
+
validatorScript: String,
|
|
209
|
+
@title: 'Script UTxO Transaction Hash'
|
|
210
|
+
@description: 'The transaction hash of the UTxO locked at the script address (64-char hex)'
|
|
211
|
+
scriptTxHash: String,
|
|
212
|
+
@title: 'Script UTxO Output Index'
|
|
213
|
+
@description: 'The output index of the UTxO locked at the script address'
|
|
214
|
+
scriptOutputIndex: Integer,
|
|
215
|
+
@title: 'Redeemer JSON'
|
|
216
|
+
@description: 'The redeemer data as JSON string (will be converted to PlutusData)'
|
|
217
|
+
redeemerJson: String,
|
|
218
|
+
@title: 'Datum JSON'
|
|
219
|
+
@description: 'The datum data as JSON string (optional, for hash-based datums)'
|
|
220
|
+
datumJson: String,
|
|
221
|
+
@title: 'Change Address'
|
|
222
|
+
@description: 'The Bech32 encoded address for returning change - defaults to sender address if not specified'
|
|
223
|
+
changeAddress: Bech32,
|
|
224
|
+
@title: 'Required Signers JSON'
|
|
225
|
+
@description: 'Optional JSON array of Ed25519 key hashes (hex, 28 bytes each) that must sign the transaction. Required for Plutus validators checking extra_signatories.'
|
|
226
|
+
requiredSignersJson: String,
|
|
227
|
+
@title: 'Script Parameters JSON'
|
|
228
|
+
@description: 'Optional JSON array of PlutusData parameters to apply to the validator script before building. For parameterized validators.'
|
|
229
|
+
scriptParamsJson: String,
|
|
230
|
+
@title: 'Output Inline Datum JSON'
|
|
231
|
+
@description: 'Optional PlutusData JSON to attach as inline datum on the recipient output. Used for state-machine validators that require continuing output datum.'
|
|
232
|
+
inlineDatumJson: String,
|
|
233
|
+
@title: 'Lock on Script Address'
|
|
234
|
+
@description: 'When true and scriptParamsJson is provided, routes the output to the enterprise script address derived from the applied script hash instead of recipientAddress. Returns scriptAddress in the response.'
|
|
235
|
+
lockOnScript: Boolean) returns TransactionBuilds;
|
|
236
|
+
|
|
237
|
+
@title : 'Set Collateral'
|
|
238
|
+
@description: 'Ensure a dedicated ADA-only collateral UTxO exists for Plutus transactions. Checks if the address has at least 2 UTxOs with >= 5 ADA each. If not, builds a self-send transaction to create a 5 ADA collateral UTxO.'
|
|
239
|
+
action SetCollateral(
|
|
240
|
+
@title: 'Address'
|
|
241
|
+
@description: 'The Bech32 encoded address to check and set up collateral for'
|
|
242
|
+
address: Bech32) returns TransactionBuilds;
|
|
272
243
|
@title : 'Address Transaction Builds'
|
|
273
244
|
@description: 'Projection for retrieving transaction builds by address'
|
|
274
|
-
entity AddressTransactionBuilds as projection on db.AddressTransactionBuilds;
|
|
275
|
-
|
|
276
|
-
@title : 'Create Signing Request'
|
|
277
|
-
@description: 'Create a signing request for external signing. Returns transaction details, signing instructions, and CLI commands. The request is persisted for audit trail.'
|
|
278
|
-
action CreateSigningRequest(
|
|
279
|
-
@title: 'Build ID'
|
|
280
|
-
@description: 'The unique identifier of the transaction build'
|
|
281
|
-
buildId: UUID,
|
|
282
|
-
@title: 'Message to Signer'
|
|
283
|
-
@description: 'A message to include for the signer'
|
|
284
|
-
message: String) returns SigningRequests;
|
|
285
|
-
|
|
286
|
-
@title : 'Get Signing Request'
|
|
287
|
-
@description: 'Retrieve an existing signing request by ID'
|
|
288
|
-
action GetSigningRequest(
|
|
289
|
-
@title: 'Signing Request ID'
|
|
290
|
-
@description: 'The unique identifier of the signing request'
|
|
291
|
-
signingRequestId: UUID) returns SigningRequests;
|
|
292
|
-
|
|
293
|
-
@title: 'Address Signing Requests'
|
|
294
|
-
@description: 'Projection for retrieving signing requests by address'
|
|
295
|
-
action GetSigningRequestsByAddress(
|
|
296
|
-
@title: 'Bech32 Address'
|
|
297
|
-
@description: 'The Bech32 encoded address to retrieve signing requests for'
|
|
298
|
-
address: db.Bech32) returns array of AddressSigningRequests;
|
|
299
|
-
@title: 'Address Transaction Builds'
|
|
300
|
-
@description: 'Projection for retrieving transaction builds by address'
|
|
301
245
|
action GetTransactionBuildsByAddress(
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
246
|
+
@title: 'Bech32 Address'
|
|
247
|
+
@description: 'The Bech32 encoded address to retrieve transaction builds for'
|
|
248
|
+
address: Bech32) returns array of AddressTransactionBuilds;
|
|
306
249
|
}
|
|
307
250
|
|
|
308
|
-
// ---------------------------------------------------------------------------
|
|
309
|
-
// Status-Transition Flows (CAP @flow.status — Gamma)
|
|
310
|
-
// ---------------------------------------------------------------------------
|
|
311
|
-
|
|
312
|
-
/**
|
|
313
|
-
* SigningRequests status flow:
|
|
314
|
-
* pending ──[VerifySignature]──→ verified | failed (conditional in handler)
|
|
315
|
-
* pending | verified ──[SubmitVerifiedTransaction]──→ submitted
|
|
316
|
-
* pending ──[checkExpire]──→ expired (custom time-based logic in handler)
|
|
317
|
-
*/
|
|
318
|
-
annotate CardanoTransactionService.SigningRequests with @flow.status: status actions {
|
|
319
|
-
VerifySignature @from: [#pending];
|
|
320
|
-
SubmitVerifiedTransaction @from: [#pending, #verified] @to: #submitted;
|
|
321
|
-
};
|
|
322
251
|
|
|
323
|
-
/**
|
|
324
|
-
* TransactionSubmissions status flow:
|
|
325
|
-
* pending ──[submit to chain]──→ submitted (internal, in SubmitTransaction handler)
|
|
326
|
-
* submitted ──[CheckSubmissionStatus]──→ confirmed | stays submitted (conditional)
|
|
327
|
-
* pending | submitted ──→ failed (on blockchain error)
|
|
328
|
-
*/
|
|
329
|
-
annotate CardanoTransactionService.TransactionSubmissions with @flow.status: status actions {
|
|
330
|
-
CheckSubmissionStatus @from: [#submitted];
|
|
331
|
-
};
|