@odatano/core 2.0.0-rc.4 → 2.0.0-rc.41
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/CardanoAgentService/index.d.ts +251 -0
- package/@cds-models/CardanoAgentService/index.js +36 -0
- package/@cds-models/CardanoBackendService/index.d.ts +357 -0
- package/@cds-models/CardanoBackendService/index.js +40 -0
- package/@cds-models/CardanoIndexerService/index.d.ts +194 -2
- package/@cds-models/CardanoIndexerService/index.js +25 -0
- package/@cds-models/CardanoODataService/index.d.ts +305 -7
- package/@cds-models/CardanoODataService/index.js +34 -0
- package/@cds-models/CardanoSignService/index.d.ts +28 -3
- package/@cds-models/CardanoSignService/index.js +3 -0
- package/@cds-models/CardanoTransactionService/index.d.ts +46 -13
- package/@cds-models/CardanoTransactionService/index.js +4 -0
- package/@cds-models/index.d.ts +72 -0
- package/@cds-models/index.js +12 -0
- package/@cds-models/odatano/cardano/index.d.ts +408 -7
- package/@cds-models/odatano/cardano/index.js +42 -0
- package/README.md +64 -5
- package/db/schema.cds +2297 -1633
- package/db/types.cds +114 -0
- package/package.json +27 -6
- package/scripts/migrate-slot-leader.mjs +104 -0
- package/scripts/migrate-txseq.mjs +147 -0
- package/src/index.d.ts +18 -11
- package/src/index.js +44 -14
- package/src/plugin.js +42 -52
- package/srv/blockchain/backends/blockfrost-backend.d.ts +29 -131
- package/srv/blockchain/backends/blockfrost-backend.js +53 -162
- package/srv/blockchain/backends/cardano-backend.d.ts +104 -158
- package/srv/blockchain/backends/cardano-backend.js +19 -5
- package/srv/blockchain/backends/koios-backend.d.ts +126 -60
- package/srv/blockchain/backends/koios-backend.js +376 -235
- package/srv/blockchain/backends/odatano-backend.d.ts +64 -0
- package/srv/blockchain/backends/odatano-backend.js +170 -0
- package/srv/blockchain/backends/ogmios-backend.d.ts +162 -94
- package/srv/blockchain/backends/ogmios-backend.js +556 -201
- package/srv/blockchain/backends/ogmios-frame-guard.d.ts +32 -0
- package/srv/blockchain/backends/ogmios-frame-guard.js +142 -0
- package/srv/blockchain/cardano-client.d.ts +87 -202
- package/srv/blockchain/cardano-client.js +210 -240
- package/srv/blockchain/cardano-indexer.d.ts +311 -242
- package/srv/blockchain/cardano-indexer.js +1238 -362
- package/srv/blockchain/cardano-tx-builder.d.ts +44 -81
- package/srv/blockchain/cardano-tx-builder.js +173 -132
- package/srv/blockchain/crawler/certificate-backfill.d.ts +67 -0
- package/srv/blockchain/crawler/certificate-backfill.js +169 -0
- package/srv/blockchain/crawler/crawler.d.ts +139 -54
- package/srv/blockchain/crawler/crawler.js +478 -96
- package/srv/blockchain/crawler/hooks.d.ts +3 -14
- package/srv/blockchain/crawler/index.d.ts +5 -0
- package/srv/blockchain/crawler/index.js +35 -7
- package/srv/blockchain/crawler/sync-state.d.ts +46 -28
- package/srv/blockchain/crawler/sync-state.js +128 -43
- package/srv/blockchain/crawler/transaction-backfill.d.ts +52 -0
- package/srv/blockchain/crawler/transaction-backfill.js +283 -0
- package/srv/blockchain/crawler/utxo-set-import.d.ts +78 -0
- package/srv/blockchain/crawler/utxo-set-import.js +363 -0
- package/srv/blockchain/ledger-state.d.ts +101 -0
- package/srv/blockchain/ledger-state.js +432 -0
- package/srv/blockchain/pending-spends.d.ts +28 -0
- package/srv/blockchain/pending-spends.js +89 -0
- package/srv/blockchain/signing/cose-verifier.d.ts +5 -12
- package/srv/blockchain/signing/cose-verifier.js +6 -12
- package/srv/blockchain/signing/external-signer.d.ts +16 -113
- package/srv/blockchain/signing/external-signer.js +19 -122
- package/srv/blockchain/signing/hsm-signer.d.ts +13 -45
- package/srv/blockchain/signing/hsm-signer.js +23 -63
- package/srv/blockchain/signing/signature-verifier.d.ts +14 -45
- package/srv/blockchain/signing/signature-verifier.js +73 -76
- package/srv/blockchain/signing/submission-finalizer.d.ts +9 -36
- package/srv/blockchain/signing/submission-finalizer.js +16 -49
- package/srv/blockchain/stored-chain.d.ts +33 -0
- package/srv/blockchain/stored-chain.js +234 -0
- package/srv/blockchain/transaction-building/buildooor-tx.d.ts +111 -173
- package/srv/blockchain/transaction-building/buildooor-tx.js +649 -326
- package/srv/blockchain/transaction-building/caller-datums.d.ts +29 -0
- package/srv/blockchain/transaction-building/caller-datums.js +139 -0
- package/srv/blockchain/transaction-building/cardano-tx.d.ts +10 -35
- package/srv/blockchain/transaction-rows.d.ts +12 -0
- package/srv/blockchain/transaction-rows.js +43 -0
- package/srv/blockchain/wallet-worker/build-request.d.ts +4 -17
- package/srv/blockchain/wallet-worker/build-request.js +18 -23
- package/srv/blockchain/wallet-worker/confirmation-tracker.d.ts +25 -17
- package/srv/blockchain/wallet-worker/confirmation-tracker.js +87 -41
- package/srv/blockchain/wallet-worker/index.js +2 -8
- package/srv/blockchain/wallet-worker/job-store.d.ts +36 -103
- package/srv/blockchain/wallet-worker/job-store.js +0 -0
- package/srv/blockchain/wallet-worker/lease-heartbeat.d.ts +4 -20
- package/srv/blockchain/wallet-worker/lease-heartbeat.js +4 -20
- package/srv/blockchain/wallet-worker/signers.d.ts +6 -19
- package/srv/blockchain/wallet-worker/signers.js +3 -8
- package/srv/blockchain/wallet-worker/wallet-worker.d.ts +15 -71
- package/srv/blockchain/wallet-worker/wallet-worker.js +40 -91
- package/srv/cardano-agent-service.cds +146 -0
- package/srv/cardano-agent-service.d.ts +2 -0
- package/srv/cardano-agent-service.js +12 -0
- package/srv/cardano-backend-service.cds +52 -0
- package/srv/cardano-backend-service.d.ts +2 -0
- package/srv/cardano-backend-service.js +244 -0
- package/srv/cardano-indexer-service.cds +201 -73
- package/srv/cardano-indexer-service.js +280 -11
- package/srv/cardano-service.cds +65 -2
- package/srv/cardano-service.js +170 -129
- package/srv/cardano-sign-service.cds +200 -180
- package/srv/cardano-sign-service.js +57 -184
- package/srv/cardano-tx-service.cds +439 -370
- package/srv/cardano-tx-service.js +231 -190
- package/srv/cardano-ui.cds +16 -16
- package/srv/cardano-worker-service.js +7 -15
- package/srv/cbor/index.d.ts +1 -1
- package/srv/cbor/parse.d.ts +27 -0
- package/srv/cbor/parse.js +63 -2
- package/srv/server.d.ts +28 -86
- package/srv/server.js +132 -135
- package/srv/utils/agent-grants-config.d.ts +37 -0
- package/srv/utils/agent-grants-config.js +138 -0
- package/srv/utils/agent-grants.d.ts +262 -0
- package/srv/utils/agent-grants.js +922 -0
- package/srv/utils/agent-token-auth.d.ts +16 -0
- package/srv/utils/agent-token-auth.js +78 -0
- package/srv/utils/backend-request-handler.d.ts +2 -16
- package/srv/utils/backend-request-handler.js +3 -18
- package/srv/utils/collections.d.ts +4 -8
- package/srv/utils/collections.js +4 -8
- package/srv/utils/const.d.ts +30 -67
- package/srv/utils/const.js +32 -72
- package/srv/utils/crypto.d.ts +3 -12
- package/srv/utils/crypto.js +5 -18
- package/srv/utils/db-indexes.d.ts +25 -0
- package/srv/utils/db-indexes.js +94 -0
- package/srv/utils/db-sanitize.d.ts +27 -0
- package/srv/utils/db-sanitize.js +85 -0
- package/srv/utils/epoch-slots.d.ts +20 -0
- package/srv/utils/epoch-slots.js +43 -0
- package/srv/utils/error-codes.d.ts +20 -73
- package/srv/utils/error-codes.js +19 -70
- package/srv/utils/errors.d.ts +50 -177
- package/srv/utils/errors.js +94 -218
- package/srv/utils/legacy-service-paths.d.ts +11 -0
- package/srv/utils/legacy-service-paths.js +58 -0
- package/srv/utils/liveness.d.ts +16 -0
- package/srv/utils/liveness.js +40 -0
- package/srv/utils/mappers.d.ts +128 -214
- package/srv/utils/mappers.js +354 -299
- package/srv/utils/network-context.js +2 -11
- package/srv/utils/pg-inline-json.d.ts +8 -0
- package/srv/utils/pg-inline-json.js +62 -0
- package/srv/utils/pg-order-nulls.d.ts +14 -0
- package/srv/utils/pg-order-nulls.js +56 -0
- package/srv/utils/plutus-placeholders.d.ts +23 -16
- package/srv/utils/plutus-placeholders.js +63 -27
- package/srv/utils/rate-limiter.d.ts +46 -0
- package/srv/utils/rate-limiter.js +116 -0
- package/srv/utils/service-events.d.ts +2 -22
- package/srv/utils/service-events.js +3 -23
- package/srv/utils/signing-helper.d.ts +6 -16
- package/srv/utils/signing-helper.js +36 -60
- package/srv/utils/tx-build-helper.d.ts +28 -93
- package/srv/utils/tx-build-helper.js +75 -124
- package/srv/utils/tx-request-parsers.d.ts +101 -28
- package/srv/utils/tx-request-parsers.js +410 -43
- package/srv/utils/tx-utils.d.ts +4 -23
- package/srv/utils/tx-utils.js +12 -41
- package/srv/utils/types.d.ts +252 -179
- package/srv/utils/types.js +2 -6
- package/srv/utils/validators.d.ts +24 -90
- package/srv/utils/validators.js +50 -147
|
@@ -1,180 +1,200 @@
|
|
|
1
|
-
using {odatano.cardano as db} from '../db/schema';
|
|
2
|
-
using {Bech32} from '../db/types';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Cardano Sign Service
|
|
6
|
-
*
|
|
7
|
-
* Handles the external signing workflow for Cardano transactions, including:
|
|
8
|
-
* - Creating signing requests with transaction details and signing instructions
|
|
9
|
-
* - Verifying signatures of signed transactions and storing verification results
|
|
10
|
-
* - Submitting verified transactions to the blockchain and tracking submission status
|
|
11
|
-
* - Providing actions for signing with a Hardware Security Module (HSM) and retrieving HSM status
|
|
12
|
-
*
|
|
13
|
-
* Security note: see CardanoODataService (cardano-service.cds) for the rationale
|
|
14
|
-
*
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
@
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
@
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
@
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
@
|
|
49
|
-
@
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
@
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
@
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
1
|
+
using {odatano.cardano as db} from '../db/schema';
|
|
2
|
+
using {Bech32} from '../db/types';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Cardano Sign Service
|
|
6
|
+
*
|
|
7
|
+
* Handles the external signing workflow for Cardano transactions, including:
|
|
8
|
+
* - Creating signing requests with transaction details and signing instructions
|
|
9
|
+
* - Verifying signatures of signed transactions and storing verification results
|
|
10
|
+
* - Submitting verified transactions to the blockchain and tracking submission status
|
|
11
|
+
* - Providing actions for signing with a Hardware Security Module (HSM) and retrieving HSM status
|
|
12
|
+
*
|
|
13
|
+
* Security note: see CardanoODataService (cardano-service.cds) for the rationale on auth
|
|
14
|
+
* without per-resource ownership enforcement. Deliberately NO service-level @requires:
|
|
15
|
+
* CAP checks it on every request BEFORE the operation annotation, which silenced the
|
|
16
|
+
* `any` on VerifyDataSignature (anonymous callers got the 401 challenge first). The
|
|
17
|
+
* requirement therefore sits on each element; VerifyDataSignature alone is public.
|
|
18
|
+
*/
|
|
19
|
+
// Service-level 'any' on purpose: CAP authorizes the service BEFORE the operation and
|
|
20
|
+
// treats a service without a service-level @requires as authenticated-user under
|
|
21
|
+
// NODE_ENV=production, which would 401 the anonymous operation below despite its own
|
|
22
|
+
// 'any'. Every element carries its requirement; the service itself refuses nothing.
|
|
23
|
+
@requires: 'any'
|
|
24
|
+
service CardanoSignService @(impl: './cardano-sign-service') {
|
|
25
|
+
|
|
26
|
+
// ---------------------------------------------------------------------------
|
|
27
|
+
// Signing Workflow Projections
|
|
28
|
+
// ---------------------------------------------------------------------------
|
|
29
|
+
@readonly
|
|
30
|
+
@title : 'Signature Verifications'
|
|
31
|
+
@description: 'Projection for Signature Verifications - stores verification results'
|
|
32
|
+
@requires : 'authenticated-user'
|
|
33
|
+
entity SignatureVerifications as projection on db.SignatureVerifications;
|
|
34
|
+
|
|
35
|
+
@readonly
|
|
36
|
+
@title : 'Address Signing Requests'
|
|
37
|
+
@description: 'Projection for retrieving signing requests by address'
|
|
38
|
+
@requires : 'authenticated-user'
|
|
39
|
+
entity AddressSigningRequests as projection on db.AddressSigningRequests;
|
|
40
|
+
|
|
41
|
+
@readonly
|
|
42
|
+
@title : 'Transaction Builds'
|
|
43
|
+
@description: 'Projection for Transaction Builds - needed by CreateSigningRequest to look up build details'
|
|
44
|
+
@requires : 'authenticated-user'
|
|
45
|
+
entity TransactionBuilds as projection on db.TransactionBuilds;
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
@readonly
|
|
49
|
+
@title : 'Transaction Submissions'
|
|
50
|
+
@description: 'Projection for Transaction Submissions - stores submission results'
|
|
51
|
+
@requires : 'authenticated-user'
|
|
52
|
+
entity TransactionSubmissions as projection on db.TransactionSubmissions;
|
|
53
|
+
|
|
54
|
+
@readonly
|
|
55
|
+
@title : 'Signing Requests'
|
|
56
|
+
@description: 'Projection for Signing Requests - tracks signing workflow'
|
|
57
|
+
@requires : 'authenticated-user'
|
|
58
|
+
entity SigningRequests as projection on db.SigningRequests;
|
|
59
|
+
|
|
60
|
+
@title : 'Verify Signature'
|
|
61
|
+
@description: 'Verify the signature of a signed transaction. Stores the verification result for audit trail.'
|
|
62
|
+
@requires : 'authenticated-user'
|
|
63
|
+
action VerifySignature(
|
|
64
|
+
@title: 'Signing Request ID'
|
|
65
|
+
@description: 'The unique identifier of the signing request'
|
|
66
|
+
signingRequestId: UUID,
|
|
67
|
+
@title: 'Signed Transaction CBOR'
|
|
68
|
+
@description: 'The signed transaction CBOR to verify'
|
|
69
|
+
signedTxCbor: String,
|
|
70
|
+
@title: 'Signer Type'
|
|
71
|
+
@description: 'Type of signer used (cardano-cli | browser-wallet | hardware-wallet | custom)'
|
|
72
|
+
signerType: String(20),
|
|
73
|
+
@title: 'Signer Info'
|
|
74
|
+
@description: 'Additional signer information (wallet name, etc.)'
|
|
75
|
+
signerInfo: String(100),
|
|
76
|
+
@title: 'Sender Address'
|
|
77
|
+
@description: 'Optional sender address for ownership verification. When provided, verifies the signing request belongs to this address.'
|
|
78
|
+
address: Bech32) returns SignatureVerifications;
|
|
79
|
+
|
|
80
|
+
@title : 'Submit Verified Transaction'
|
|
81
|
+
@description: 'Verify and submit a signed transaction in one step. Updates the signing request status and creates submission record.'
|
|
82
|
+
@requires : 'authenticated-user'
|
|
83
|
+
action SubmitVerifiedTransaction(
|
|
84
|
+
@title: 'Signing Request ID'
|
|
85
|
+
@description: 'The unique identifier of the signing request'
|
|
86
|
+
signingRequestId: UUID,
|
|
87
|
+
@title: 'Signed Transaction CBOR'
|
|
88
|
+
@description: 'The signed transaction CBOR'
|
|
89
|
+
signedTxCbor: String,
|
|
90
|
+
@title: 'Signer Type'
|
|
91
|
+
@description: 'Type of signer used'
|
|
92
|
+
signerType: String(20),
|
|
93
|
+
@title: 'Signer Info'
|
|
94
|
+
@description: 'Additional signer information'
|
|
95
|
+
signerInfo: String(100),
|
|
96
|
+
@title: 'Sender Address'
|
|
97
|
+
@description: 'Optional sender address for ownership verification. When provided, verifies the signing request belongs to this address.'
|
|
98
|
+
address: Bech32,
|
|
99
|
+
@title: 'Defer Submit'
|
|
100
|
+
@description: 'When true, verify + claim run on the caller''s transaction and the network submit happens detached AFTER the caller''s commit. Returns immediately with the tx hash (= tx body hash) and status ''pending''. Designed for in-process CAP consumers whose request transaction would otherwise deadlock the pooled sqlite connection. Track the outcome via the signing request / submission status.'
|
|
101
|
+
deferSubmit: Boolean) returns TransactionSubmissions;
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
// ---------------------------------------------------------------------------
|
|
105
|
+
// CIP-30 signData (COSE_Sign1) message-signature verification
|
|
106
|
+
// ---------------------------------------------------------------------------
|
|
107
|
+
|
|
108
|
+
// Public override: this action is the crypto check behind wallet-based LOGIN,
|
|
109
|
+
// so the caller is not yet authenticated. It is a stateless verification —
|
|
110
|
+
// no DB write, no key access, no state — so exposing it leaks nothing.
|
|
111
|
+
@requires : 'any'
|
|
112
|
+
@title : 'Verify Data Signature (CIP-30 signData)'
|
|
113
|
+
@description: 'Verify a COSE_Sign1 message signature against a bech32 address. Confirms the Ed25519 signature, that the signer key hashes to the address payment credential, and (optionally) that the signed payload matches an expected value.'
|
|
114
|
+
action VerifyDataSignature(
|
|
115
|
+
@description: 'Bech32 address the wallet claimed to sign with'
|
|
116
|
+
address : Bech32,
|
|
117
|
+
@description: 'Hex-encoded COSE_Sign1 CBOR (the `signature` field from CIP-30 signData)'
|
|
118
|
+
coseSignature : String,
|
|
119
|
+
@description: 'Hex-encoded COSE_Key CBOR (the `key` field from CIP-30 signData)'
|
|
120
|
+
coseKey : String,
|
|
121
|
+
@description: 'Optional expected UTF-8 payload; when set, the signed payload must equal it (anti-replay). When omitted, the decoded payload is returned for the caller to check.'
|
|
122
|
+
expectedPayload: String) returns {
|
|
123
|
+
@description: 'Whether the signature is valid and all checks passed' valid : Boolean;
|
|
124
|
+
@description: 'Failure detail when not valid' reason : String;
|
|
125
|
+
@description: 'UTF-8 of the signed payload, echoed back' signedPayload : String;
|
|
126
|
+
@description: 'Hex blake2b-224 of the signer public key' signerVkh : String;
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
// ---------------------------------------------------------------------------
|
|
130
|
+
// General Signing Workflow Actions
|
|
131
|
+
// ---------------------------------------------------------------------------
|
|
132
|
+
|
|
133
|
+
@title : 'Create Signing Request'
|
|
134
|
+
@description: 'Create a signing request for external signing. Returns transaction details, signing instructions, and CLI commands. The request is persisted for audit trail.'
|
|
135
|
+
@requires : 'authenticated-user'
|
|
136
|
+
action CreateSigningRequest(
|
|
137
|
+
@title: 'Build ID'
|
|
138
|
+
@description: 'The unique identifier of the transaction build'
|
|
139
|
+
buildId: UUID,
|
|
140
|
+
@title: 'Message to Signer'
|
|
141
|
+
@description: 'A message to include for the signer'
|
|
142
|
+
message: String) returns SigningRequests;
|
|
143
|
+
|
|
144
|
+
@title : 'Get Signing Request'
|
|
145
|
+
@description: 'Retrieve an existing signing request by ID'
|
|
146
|
+
@requires : 'authenticated-user'
|
|
147
|
+
action GetSigningRequest(
|
|
148
|
+
@title: 'Signing Request ID'
|
|
149
|
+
@description: 'The unique identifier of the signing request'
|
|
150
|
+
signingRequestId: UUID) returns SigningRequests;
|
|
151
|
+
|
|
152
|
+
@title : 'Address Signing Requests'
|
|
153
|
+
@description: 'Projection for retrieving signing requests by address'
|
|
154
|
+
@requires : 'authenticated-user'
|
|
155
|
+
action GetSigningRequestsByAddress(
|
|
156
|
+
@title: 'Bech32 Address'
|
|
157
|
+
@description: 'The Bech32 encoded address to retrieve signing requests for'
|
|
158
|
+
address: Bech32) returns array of AddressSigningRequests;
|
|
159
|
+
|
|
160
|
+
// ---------------------------------------------------------------------------
|
|
161
|
+
// HSM (Hardware Security Module) Signing Actions
|
|
162
|
+
// ---------------------------------------------------------------------------
|
|
163
|
+
|
|
164
|
+
@title : 'Sign with HSM'
|
|
165
|
+
@description: 'Sign a transaction using the configured Hardware Security Module. Creates a signing request, signs with the HSM, and verifies the signature. Returns the signing request with status verified.'
|
|
166
|
+
@requires : 'authenticated-user'
|
|
167
|
+
action SignWithHsm(
|
|
168
|
+
@title: 'Build ID'
|
|
169
|
+
@description: 'The unique identifier of the transaction build to sign'
|
|
170
|
+
buildId: UUID,
|
|
171
|
+
@title: 'Sender Address'
|
|
172
|
+
@description: 'Optional sender address for ownership verification. When provided, verifies the build belongs to this address.'
|
|
173
|
+
address: Bech32) returns SigningRequests;
|
|
174
|
+
|
|
175
|
+
@title : 'Sign and Submit with HSM'
|
|
176
|
+
@description: 'Sign a transaction using the HSM and submit it to the blockchain in one atomic operation. Returns the transaction submission details.'
|
|
177
|
+
@requires : 'authenticated-user'
|
|
178
|
+
action SignAndSubmitWithHsm(
|
|
179
|
+
@title: 'Build ID'
|
|
180
|
+
@description: 'The unique identifier of the transaction build to sign and submit'
|
|
181
|
+
buildId: UUID,
|
|
182
|
+
@title: 'Sender Address'
|
|
183
|
+
@description: 'Optional sender address for ownership verification. When provided, verifies the build belongs to this address.'
|
|
184
|
+
address: Bech32,
|
|
185
|
+
@title: 'Defer Submit'
|
|
186
|
+
@description: 'When true, sign + verify + claim run on the caller''s transaction and the network submit happens detached AFTER the caller''s commit (see SubmitVerifiedTransaction.deferSubmit).'
|
|
187
|
+
deferSubmit: Boolean) returns TransactionSubmissions;
|
|
188
|
+
|
|
189
|
+
@title : 'Get HSM Status'
|
|
190
|
+
@description: 'Check the current status of the HSM connection and key availability.'
|
|
191
|
+
@requires : 'authenticated-user'
|
|
192
|
+
action GetHsmStatus() returns {
|
|
193
|
+
@title: 'Connected' @description: 'Whether the HSM session is active' connected : Boolean;
|
|
194
|
+
@title: 'Key ID' @description: 'The PKCS#11 key identifier in use' keyId : String;
|
|
195
|
+
@title: 'Key Label' @description: 'The PKCS#11 key label in use' keyLabel : String;
|
|
196
|
+
@title: 'Public Key Hash' @description: 'Blake2b-224 hash of the HSM Ed25519 public key (= Cardano verification key hash)' publicKeyHash : String;
|
|
197
|
+
@title: 'Cardano Address' @description: 'Enterprise Cardano address derived from the HSM public key' cardanoAddress : String;
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
}
|