@odatano/core 2.0.0-rc.18 → 2.0.0-rc.19

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.
Files changed (35) hide show
  1. package/@cds-models/CardanoIndexerService/index.d.ts +52 -0
  2. package/@cds-models/CardanoIndexerService/index.js +7 -0
  3. package/@cds-models/CardanoODataService/index.d.ts +170 -0
  4. package/@cds-models/CardanoODataService/index.js +21 -0
  5. package/@cds-models/odatano/cardano/index.d.ts +176 -0
  6. package/@cds-models/odatano/cardano/index.js +21 -0
  7. package/README.md +3 -3
  8. package/db/schema.cds +277 -0
  9. package/package.json +179 -179
  10. package/srv/blockchain/backends/cardano-backend.d.ts +16 -0
  11. package/srv/blockchain/backends/cardano-backend.js +4 -0
  12. package/srv/blockchain/backends/koios-backend.d.ts +80 -1
  13. package/srv/blockchain/backends/koios-backend.js +128 -48
  14. package/srv/blockchain/backends/ogmios-backend.d.ts +21 -2
  15. package/srv/blockchain/backends/ogmios-backend.js +120 -16
  16. package/srv/blockchain/cardano-client.d.ts +3 -1
  17. package/srv/blockchain/cardano-client.js +9 -0
  18. package/srv/blockchain/cardano-indexer.d.ts +56 -3
  19. package/srv/blockchain/cardano-indexer.js +124 -3
  20. package/srv/blockchain/crawler/crawler.d.ts +11 -1
  21. package/srv/blockchain/crawler/crawler.js +70 -1
  22. package/srv/blockchain/crawler/sync-state.d.ts +27 -1
  23. package/srv/blockchain/crawler/sync-state.js +83 -1
  24. package/srv/blockchain/crawler/utxo-set-import.d.ts +86 -0
  25. package/srv/blockchain/crawler/utxo-set-import.js +289 -0
  26. package/srv/blockchain/ledger-state.d.ts +89 -0
  27. package/srv/blockchain/ledger-state.js +383 -0
  28. package/srv/cardano-indexer-service.cds +26 -0
  29. package/srv/cardano-indexer-service.js +71 -0
  30. package/srv/cardano-service.cds +35 -0
  31. package/srv/server.js +6 -1
  32. package/srv/utils/db-indexes.js +12 -0
  33. package/srv/utils/mappers.d.ts +43 -3
  34. package/srv/utils/mappers.js +115 -1
  35. package/srv/utils/types.d.ts +38 -0
package/db/schema.cds CHANGED
@@ -683,6 +683,16 @@ entity Transactions {
683
683
  outputs : Composition of many TransactionOutputs
684
684
  on outputs.tx = $self;
685
685
 
686
+ @title : 'Transaction Certificates'
687
+ @description: 'Certificates carried by the transaction (stake/pool/DRep). Filled by the chain crawler only (crawler.certificates); the lazy path leaves it empty.'
688
+ certificates : Composition of many TransactionCertificates
689
+ on certificates.tx = $self;
690
+
691
+ @title : 'Transaction Withdrawals'
692
+ @description: 'Reward-account withdrawals of the transaction. Filled by the chain crawler only (crawler.certificates); the lazy path leaves it empty.'
693
+ withdrawals : Composition of many TransactionWithdrawals
694
+ on withdrawals.tx = $self;
695
+
686
696
  @title : 'Transaction Has Metadata'
687
697
  @description: 'Indicates if transaction has metadata'
688
698
  hasMetadata : Boolean;
@@ -717,6 +727,14 @@ entity TransactionInputs {
717
727
  @description: 'The UTxO specific data of the input utxo'
718
728
  utxoData : UTxODataSlice; // input utxo data
719
729
 
730
+ @title : 'Spent Transaction Hash'
731
+ @description: 'Hash of the transaction that created the consumed UTxO (outpoint). Null on rows indexed before the column existed.'
732
+ spentTxHash : Blake2b256;
733
+
734
+ @title : 'Spent Output Index'
735
+ @description: 'Output index of the consumed UTxO within spentTxHash (outpoint). Null on rows indexed before the column existed.'
736
+ spentOutputIndex : Integer;
737
+
720
738
  @title : 'Input Lovelace Amount'
721
739
  @description: 'The lovelace amount of the input utxo'
722
740
  isCollateral : Boolean;
@@ -757,6 +775,241 @@ entity TransactionInputAssets {
757
775
  asset : AssetSlice;
758
776
  }
759
777
 
778
+ // -----------------------------------------------------
779
+ // Crawler-fed ledger state (crawler.utxoSet) — non-temporal, separate from the lazy
780
+ // provider-fed Addresses / AddressUTxOs so their TTL semantics stay untouched.
781
+ // -----------------------------------------------------
782
+
783
+ @title : 'Ledger UTxOs'
784
+ @description: 'UTxO set maintained by the chain crawler from an imported anchor snapshot (crawler.utxoSet). A row is unspent while spentTxHash is null. createdSlot is null for rows that came with the snapshot. Not written by the lazy path; a reorg reopens what a rolled-back block spent and drops what it created.'
785
+ @readonly
786
+ entity LedgerUTxOs {
787
+
788
+ @title : 'Transaction Hash (Key)'
789
+ @description: 'Transaction that created the output'
790
+ key txHash : Blake2b256;
791
+
792
+ @title : 'Output Index (Key)'
793
+ @description: 'Output index within the creating transaction'
794
+ key outputIndex : Integer;
795
+
796
+ @title : 'Address'
797
+ @description: 'Bech32 address holding the output'
798
+ address : Bech32;
799
+
800
+ @title : 'Stake Address'
801
+ @description: 'Reward account of a base address (bech32); null for enterprise, pointer and Byron addresses'
802
+ stakeAddress : Bech32;
803
+
804
+ @title : 'Address Type'
805
+ @description: 'base | enterprise | pointer | reward | byron | unknown'
806
+ addressType : String(20);
807
+
808
+ @title : 'Is Script Address'
809
+ @description: 'Payment credential is a script hash'
810
+ isScript : Boolean;
811
+
812
+ @title : 'Lovelace'
813
+ @description: 'Lovelace held by the output'
814
+ lovelace : Lovelace;
815
+
816
+ @title : 'Created Slot'
817
+ @description: 'Absolute slot of the creating block; null when the row came with the snapshot'
818
+ createdSlot : Integer64;
819
+
820
+ @title : 'Spent Transaction Hash'
821
+ @description: 'Transaction that consumed the output; null while unspent'
822
+ spentTxHash : Blake2b256;
823
+
824
+ @title : 'Spent Slot'
825
+ @description: 'Absolute slot of the consuming block; null while unspent'
826
+ spentSlot : Integer64;
827
+
828
+ @title : 'UTxO Data'
829
+ @description: 'Datum hash, inline datum and reference script hash'
830
+ utxo : UTxODataSlice;
831
+
832
+ @title : 'Has Assets'
833
+ @description: 'Output carries native assets (see assets)'
834
+ hasAssets : Boolean;
835
+
836
+ @title : 'Assets'
837
+ @description: 'Native assets of the output'
838
+ assets : Composition of many LedgerUTxOAssets
839
+ on assets.utxo = $self;
840
+ }
841
+
842
+ @title : 'Ledger UTxO Assets'
843
+ @description: 'Native assets of a LedgerUTxOs row'
844
+ @readonly
845
+ entity LedgerUTxOAssets {
846
+
847
+ @title : 'UTxO (Key)'
848
+ @description: 'The owning UTxO'
849
+ key utxo : Association to LedgerUTxOs;
850
+
851
+ @title : 'Asset Unit (Key)'
852
+ @description: 'policyId + assetNameHex'
853
+ key unit : AssetUnit;
854
+
855
+ @title : 'Asset'
856
+ @description: 'Quantity and decomposed unit'
857
+ asset : AssetSlice;
858
+ }
859
+
860
+ @title : 'Ledger Addresses'
861
+ @description: 'Per-address running sums over the unspent LedgerUTxOs rows (crawler.utxoSet): balance and UTxO count as of the crawl tip. firstSeenSlot / lastActiveSlot are null for addresses that only appear in the snapshot. Recounted from the open rows on a reorg.'
862
+ @readonly
863
+ entity LedgerAddresses {
864
+
865
+ @title : 'Address (Key)'
866
+ @description: 'Bech32 address'
867
+ key address : Bech32;
868
+
869
+ @title : 'Stake Address'
870
+ @description: 'Reward account of a base address (bech32); null otherwise'
871
+ stakeAddress : Bech32;
872
+
873
+ @title : 'Address Type'
874
+ @description: 'base | enterprise | pointer | reward | byron | unknown'
875
+ addressType : String(20);
876
+
877
+ @title : 'Is Script Address'
878
+ @description: 'Payment credential is a script hash'
879
+ isScript : Boolean;
880
+
881
+ @title : 'Total Lovelace'
882
+ @description: 'Sum of lovelace over the unspent UTxOs of the address'
883
+ totalLovelace : Lovelace;
884
+
885
+ @title : 'UTxO Count'
886
+ @description: 'Number of unspent UTxOs'
887
+ utxoCount : Integer;
888
+
889
+ @title : 'First Seen Slot'
890
+ @description: 'Slot of the first crawled block that produced an output for the address; null when the address came with the snapshot'
891
+ firstSeenSlot : Integer64;
892
+
893
+ @title : 'Last Active Slot'
894
+ @description: 'Slot of the last crawled block that touched the address'
895
+ lastActiveSlot : Integer64;
896
+
897
+ @title : 'Assets'
898
+ @description: 'Native-asset balances of the address'
899
+ assets : Composition of many LedgerAddressAssets
900
+ on assets.address = $self;
901
+
902
+ @title : 'UTxOs'
903
+ @description: 'UTxO rows of the address (spent and unspent; filter spentTxHash eq null for the current set)'
904
+ utxos : Association to many LedgerUTxOs
905
+ on utxos.address = $self.address;
906
+ }
907
+
908
+ @title : 'Ledger Address Assets'
909
+ @description: 'Native-asset balance of a LedgerAddresses row; rows at zero are removed'
910
+ @readonly
911
+ entity LedgerAddressAssets {
912
+
913
+ @title : 'Address (Key)'
914
+ @description: 'The owning address'
915
+ key address : Association to LedgerAddresses;
916
+
917
+ @title : 'Asset Unit (Key)'
918
+ @description: 'policyId + assetNameHex'
919
+ key unit : AssetUnit;
920
+
921
+ @title : 'Asset'
922
+ @description: 'Quantity and decomposed unit'
923
+ asset : AssetSlice;
924
+ }
925
+
926
+ @title : 'Ledger Accounts'
927
+ @description: 'Per-stake-key running sums over LedgerAddresses (crawler.utxoSet): controlled amount, address and UTxO counts as of the crawl tip. Delegation is a query over TransactionCertificates (newest pool_delegation / vote_delegation for the stake key); rewards are ledger state and stay provider-fed.'
928
+ @readonly
929
+ entity LedgerAccounts {
930
+
931
+ @title : 'Stake Address (Key)'
932
+ @description: 'Reward account (bech32)'
933
+ key stakeAddress : Bech32;
934
+
935
+ @title : 'Controlled Amount'
936
+ @description: 'Sum of totalLovelace over the base addresses of the stake key'
937
+ controlledAmount : Lovelace;
938
+
939
+ @title : 'Address Count'
940
+ @description: 'Number of LedgerAddresses rows under the stake key'
941
+ addressCount : Integer;
942
+
943
+ @title : 'UTxO Count'
944
+ @description: 'Number of unspent UTxOs across those addresses'
945
+ utxoCount : Integer;
946
+
947
+ @title : 'Last Active Slot'
948
+ @description: 'Slot of the last crawled block that touched one of the addresses'
949
+ lastActiveSlot : Integer64;
950
+
951
+ @title : 'Addresses'
952
+ @description: 'Addresses under the stake key'
953
+ addresses : Association to many LedgerAddresses
954
+ on addresses.stakeAddress = $self.stakeAddress;
955
+ }
956
+
957
+ @title : 'Transaction Certificates'
958
+ @description: 'Certificates of a transaction as the chain crawler saw them (crawler.certificates, off by default). One row per certificate and kind: a Conway stake+vote delegation yields a pool_delegation and a vote_delegation row with the same certIndex, so the Ogmios and Koios sources produce identical rows. Not written by the lazy path.'
959
+ @readonly
960
+ entity TransactionCertificates {
961
+
962
+ @title : 'Transaction (key)'
963
+ @description: 'The transaction carrying the certificate'
964
+ key tx : Association to Transactions;
965
+
966
+ @title : 'Certificate Index (key)'
967
+ @description: 'Position of the certificate in the transaction, as reported by the source'
968
+ key certIndex : Integer;
969
+
970
+ @title : 'Certificate Kind (key)'
971
+ @description: 'stake_registration | stake_deregistration | pool_delegation | vote_delegation | pool_registration | pool_retirement | drep_registration | drep_update | drep_retirement | committee_hot_auth | committee_resign | genesis_delegation | treasury_mir | reserve_mir | pot_transfer | param_proposal — or the raw source type for anything else'
972
+ key kind : String(40);
973
+
974
+ @title : 'Stake Address'
975
+ @description: 'Reward account the certificate concerns (bech32), when it has one'
976
+ stakeAddress : Bech32;
977
+
978
+ @title : 'Pool Id'
979
+ @description: 'Stake pool (bech32) for delegation, registration and retirement certificates'
980
+ poolId : Bech32;
981
+
982
+ @title : 'DRep Id'
983
+ @description: 'DRep (CIP-129 bech32) for vote delegation and DRep certificates; drep_always_abstain / drep_always_no_confidence for the predefined ones'
984
+ drepId : Bech32;
985
+
986
+ @title : 'Deposit'
987
+ @description: 'Deposit paid (registration) or refunded (deregistration) in lovelace, when the source reports it'
988
+ deposit : Lovelace;
989
+
990
+ @title : 'Epoch'
991
+ @description: 'Retirement epoch of a pool_retirement certificate'
992
+ epoch : Integer;
993
+ }
994
+
995
+ @title : 'Transaction Withdrawals'
996
+ @description: 'Reward-account withdrawals of a transaction as the chain crawler saw them (crawler.certificates, off by default). Not written by the lazy path.'
997
+ @readonly
998
+ entity TransactionWithdrawals {
999
+
1000
+ @title : 'Transaction (key)'
1001
+ @description: 'The withdrawing transaction'
1002
+ key tx : Association to Transactions;
1003
+
1004
+ @title : 'Stake Address (key)'
1005
+ @description: 'Reward account withdrawn from (bech32)'
1006
+ key stakeAddress : Bech32;
1007
+
1008
+ @title : 'Lovelace'
1009
+ @description: 'Amount withdrawn in lovelace'
1010
+ lovelace : Lovelace;
1011
+ }
1012
+
760
1013
  @title : 'Transaction Outputs'
761
1014
  @description: 'Projection for Transaction Outputs'
762
1015
  @readonly
@@ -1536,6 +1789,30 @@ entity CardanoSyncState {
1536
1789
  @description: 'Opaque process identifier of the single crawler instance currently allowed to write'
1537
1790
  leaseOwner : String(128);
1538
1791
 
1792
+ @title : 'UTxO Set Status'
1793
+ @description: 'Crawler-fed ledger state (crawler.utxoSet): none | importing | active | invalid'
1794
+ utxoSetStatus : String(20) default 'none';
1795
+
1796
+ @title : 'UTxO Set Anchor Slot'
1797
+ @description: 'Absolute slot the imported UTxO set describes; blocks after it are applied to the ledger tables'
1798
+ utxoAnchorSlot : Integer64;
1799
+
1800
+ @title : 'UTxO Set Anchor Hash'
1801
+ @description: 'Block hash of the anchor point'
1802
+ utxoAnchorHash : Blake2b256;
1803
+
1804
+ @title : 'UTxO Set Imported At'
1805
+ @description: 'When the snapshot import completed'
1806
+ utxoSetImportedAt : Timestamp;
1807
+
1808
+ @title : 'UTxO Set Applied Slot'
1809
+ @description: 'Slot of the last block applied to the ledger tables; a cursor ahead of it means blocks were crawled without the set (mode off, invalidated) and the set is stale'
1810
+ utxoAppliedSlot : Integer64;
1811
+
1812
+ @title : 'UTxO Set Error'
1813
+ @description: 'Why the set is invalid (reorg past the anchor, failed import)'
1814
+ utxoSetError : String(500);
1815
+
1539
1816
  @title : 'Crawler Lease Expiry'
1540
1817
  @description: 'Lease deadline renewed by the active crawler; another instance may take over only after this time'
1541
1818
  leaseUntil : Timestamp;
package/package.json CHANGED
@@ -1,179 +1,179 @@
1
- {
2
- "name": "@odatano/core",
3
- "version": "2.0.0-rc.18",
4
- "description": "SAP CAP plugin for Cardano blockchain OData V4 integration",
5
- "imports": {
6
- "#cds-models/*": "./@cds-models/*/index.js"
7
- },
8
- "main": "src/index.js",
9
- "types": "src/index.d.ts",
10
- "files": [
11
- "cds-plugin.js",
12
- "src/**/*.js",
13
- "src/**/*.d.ts",
14
- "srv/**/*.js",
15
- "srv/**/*.d.ts",
16
- "srv/**/*.cds",
17
- "db/**/*.cds",
18
- "@cds-models/"
19
- ],
20
- "engines": {
21
- "node": ">=22.5"
22
- },
23
- "peerDependencies": {
24
- "@sap/cds": ">=10"
25
- },
26
- "dependencies": {
27
- "@blockfrost/blockfrost-js": "~6.0.0",
28
- "@cap-js/hana": "^3",
29
- "@cardano-ogmios/client": "^6.14.0",
30
- "@harmoniclabs/buildooor": "0.2.9",
31
- "@harmoniclabs/cardano-costmodels-ts": "~1.6.1",
32
- "@harmoniclabs/cardano-ledger-ts": "^0.5.6",
33
- "@harmoniclabs/cbor": "^2.0.1",
34
- "@harmoniclabs/crypto": "^0.3.0",
35
- "@harmoniclabs/uint8array-utils": "^1.0.4",
36
- "@odatano/cap-auth": "^0.1.0",
37
- "@sap/xssec": "^4",
38
- "axios": "^1.18.0",
39
- "bech32": "^2.0.0",
40
- "blake2b": "^2.1.4"
41
- },
42
- "optionalDependencies": {
43
- "pkcs11js": "^2.1.6"
44
- },
45
- "overrides": {
46
- "axios": "^1.18.0",
47
- "esbuild": "0.28.1",
48
- "form-data": "^4.0.6",
49
- "fast-uri": "^3.1.7",
50
- "ws": "7.5.11",
51
- "@sap/approuter": {
52
- "body-parser": "^2.2.3"
53
- }
54
- },
55
- "devDependencies": {
56
- "@cap-js/cds-test": "^0.4.1",
57
- "@cap-js/cds-typer": "^0.40.0",
58
- "@cap-js/cds-types": "^0.18.0",
59
- "@cap-js/postgres": "^3.1.1",
60
- "@cap-js/sqlite": "^3",
61
- "@sap/cds": "^10",
62
- "@sap/cds-dk": "^10",
63
- "@sap/eslint-plugin-cds": "^4.2.4",
64
- "@types/blake2b": "^2.1.3",
65
- "@types/node": "^22.19.7",
66
- "@typescript-eslint/eslint-plugin": "^8.50.1",
67
- "@typescript-eslint/parser": "^8.50.1",
68
- "@vitest/coverage-v8": "^4.1.10",
69
- "dotenv": "^16.3.1",
70
- "eslint": "^9.39.2",
71
- "nock": "^13.5.6",
72
- "ts-node": "^10.9.2",
73
- "tsx": "^4.21.0",
74
- "typescript": "^5.9.3",
75
- "vitest": "^4.1.10"
76
- },
77
- "cds": {
78
- "typer": {
79
- "ieee754compatible": true
80
- },
81
- "build": {
82
- "tasks": [
83
- {
84
- "for": "node-cf",
85
- "src": "srv",
86
- "dest": "../gen/srv"
87
- },
88
- {
89
- "for": "hana",
90
- "src": "db",
91
- "dest": "../gen/db"
92
- }
93
- ]
94
- },
95
- "requires": {
96
- "db": {
97
- "kind": "sqlite",
98
- "credentials": {
99
- "url": "db.sqlite"
100
- },
101
- "client": {
102
- "timeout": 5000
103
- }
104
- },
105
- "[production]": {
106
- "db": {
107
- "kind": "hana",
108
- "pool": {
109
- "acquireTimeoutMillis": 30000,
110
- "min": 0,
111
- "max": 10
112
- }
113
- },
114
- "auth": "xsuaa"
115
- }
116
- }
117
- },
118
- "scripts": {
119
- "clean": "node -e \"const fs=require('fs');fs.globSync('{srv,db,src}/**/*.{js,js.map,d.ts,d.ts.map}').filter(f=>!f.includes('node_modules')).forEach(f=>fs.unlinkSync(f));console.log('Clean complete')\"",
120
- "clean:models": "node -e \"require('fs').rmSync('@cds-models',{recursive:true,force:true});console.log('Removed @cds-models')\"",
121
- "build": "npm run cds:types && tsc",
122
- "build:plugin": "npm run cds:types && tsc -p tsconfig.build.json",
123
- "build:package": "npm run clean && npm run clean:models && npm run build:plugin",
124
- "prepare": "npm run build:package",
125
- "start": "cds-serve",
126
- "cds:watch": "cds watch",
127
- "cds:serve": "cds serve --with-mocks",
128
- "cds:types": "cds-typer \"*\" --outputDirectory @cds-models",
129
- "lint": "eslint .",
130
- "typecheck": "tsc --noEmit",
131
- "db:deploy": "cds deploy",
132
- "pretest": "npm run clean && npm run cds:types && npm run db:deploy",
133
- "test": "vitest run",
134
- "pretest:coverage": "npm run clean && npm run cds:types && npm run db:deploy",
135
- "test:coverage": "vitest run --coverage",
136
- "pretest:ci": "npm run clean && npm run cds:types && npm run db:deploy",
137
- "test:ci": "vitest run --exclude \"**/core-ogmios.test.ts\"",
138
- "pretest:ci:coverage": "npm run clean && npm run cds:types && npm run db:deploy",
139
- "test:ci:coverage": "vitest run --coverage --exclude \"**/core-ogmios.test.ts\"",
140
- "pretest:integration": "npm run clean && npm run cds:types && npm run db:deploy",
141
- "test:integration": "vitest run --project integration",
142
- "test:integration:blockfrost": "vitest run test/integration/core.blockfrost.test.ts",
143
- "test:integration:koios": "vitest run test/integration/core.koios.test.ts",
144
- "test:integration:ogmios": "vitest run test/integration/core-ogmios.test.ts",
145
- "test:integration:both": "npm run test:integration:blockfrost && npm run test:integration:koios",
146
- "pretest:unit": "npm run cds:types",
147
- "test:unit": "vitest run --project unit",
148
- "watch-odatano": "cds watch --open odatano/index.html?sap-ui-xx-viewCache=false --livereload false",
149
- "watch-wallet": "cds watch --open wallet/webapp/index.html",
150
- "release:check": "node scripts/release-check.mjs"
151
- },
152
- "sapux": [
153
- "app/odatano"
154
- ],
155
- "directories": {
156
- "doc": "docs",
157
- "test": "test"
158
- },
159
- "repository": {
160
- "type": "git",
161
- "url": "git+https://github.com/ODATANO/ODATANO.git"
162
- },
163
- "keywords": [
164
- "CAP",
165
- "CDS",
166
- "plugin",
167
- "Cardano",
168
- "blockchain",
169
- "OData",
170
- "SAP"
171
- ],
172
- "author": "Maximilian Weber",
173
- "license": "Apache-2.0",
174
- "type": "commonjs",
175
- "bugs": {
176
- "url": "https://github.com/ODATANO/ODATANO/issues"
177
- },
178
- "homepage": "https://github.com/ODATANO/ODATANO#readme"
179
- }
1
+ {
2
+ "name": "@odatano/core",
3
+ "version": "2.0.0-rc.19",
4
+ "description": "SAP CAP plugin for Cardano blockchain OData V4 integration",
5
+ "imports": {
6
+ "#cds-models/*": "./@cds-models/*/index.js"
7
+ },
8
+ "main": "src/index.js",
9
+ "types": "src/index.d.ts",
10
+ "files": [
11
+ "cds-plugin.js",
12
+ "src/**/*.js",
13
+ "src/**/*.d.ts",
14
+ "srv/**/*.js",
15
+ "srv/**/*.d.ts",
16
+ "srv/**/*.cds",
17
+ "db/**/*.cds",
18
+ "@cds-models/"
19
+ ],
20
+ "engines": {
21
+ "node": ">=22.5"
22
+ },
23
+ "peerDependencies": {
24
+ "@sap/cds": ">=10"
25
+ },
26
+ "dependencies": {
27
+ "@blockfrost/blockfrost-js": "~6.0.0",
28
+ "@cap-js/hana": "^3",
29
+ "@cardano-ogmios/client": "^6.14.0",
30
+ "@harmoniclabs/buildooor": "0.2.9",
31
+ "@harmoniclabs/cardano-costmodels-ts": "~1.6.1",
32
+ "@harmoniclabs/cardano-ledger-ts": "^0.5.6",
33
+ "@harmoniclabs/cbor": "^2.0.1",
34
+ "@harmoniclabs/crypto": "^0.3.0",
35
+ "@harmoniclabs/uint8array-utils": "^1.0.4",
36
+ "@odatano/cap-auth": "^0.1.0",
37
+ "@sap/xssec": "^4",
38
+ "axios": "^1.18.0",
39
+ "bech32": "^2.0.0",
40
+ "blake2b": "^2.1.4"
41
+ },
42
+ "optionalDependencies": {
43
+ "pkcs11js": "^2.1.6"
44
+ },
45
+ "overrides": {
46
+ "axios": "^1.18.0",
47
+ "esbuild": "0.28.1",
48
+ "form-data": "^4.0.6",
49
+ "fast-uri": "^3.1.7",
50
+ "ws": "7.5.11",
51
+ "@sap/approuter": {
52
+ "body-parser": "^2.2.3"
53
+ }
54
+ },
55
+ "devDependencies": {
56
+ "@cap-js/cds-test": "^0.4.1",
57
+ "@cap-js/cds-typer": "^0.40.0",
58
+ "@cap-js/cds-types": "^0.18.0",
59
+ "@cap-js/postgres": "^3.1.1",
60
+ "@cap-js/sqlite": "^3",
61
+ "@sap/cds": "^10",
62
+ "@sap/cds-dk": "^10",
63
+ "@sap/eslint-plugin-cds": "^4.2.4",
64
+ "@types/blake2b": "^2.1.3",
65
+ "@types/node": "^22.19.7",
66
+ "@typescript-eslint/eslint-plugin": "^8.50.1",
67
+ "@typescript-eslint/parser": "^8.50.1",
68
+ "@vitest/coverage-v8": "^4.1.10",
69
+ "dotenv": "^16.3.1",
70
+ "eslint": "^9.39.2",
71
+ "nock": "^13.5.6",
72
+ "ts-node": "^10.9.2",
73
+ "tsx": "^4.21.0",
74
+ "typescript": "^5.9.3",
75
+ "vitest": "^4.1.10"
76
+ },
77
+ "cds": {
78
+ "typer": {
79
+ "ieee754compatible": true
80
+ },
81
+ "build": {
82
+ "tasks": [
83
+ {
84
+ "for": "node-cf",
85
+ "src": "srv",
86
+ "dest": "../gen/srv"
87
+ },
88
+ {
89
+ "for": "hana",
90
+ "src": "db",
91
+ "dest": "../gen/db"
92
+ }
93
+ ]
94
+ },
95
+ "requires": {
96
+ "db": {
97
+ "kind": "sqlite",
98
+ "credentials": {
99
+ "url": "db.sqlite"
100
+ },
101
+ "client": {
102
+ "timeout": 5000
103
+ }
104
+ },
105
+ "[production]": {
106
+ "db": {
107
+ "kind": "hana",
108
+ "pool": {
109
+ "acquireTimeoutMillis": 30000,
110
+ "min": 0,
111
+ "max": 10
112
+ }
113
+ },
114
+ "auth": "xsuaa"
115
+ }
116
+ }
117
+ },
118
+ "scripts": {
119
+ "clean": "node -e \"const fs=require('fs');fs.globSync('{srv,db,src}/**/*.{js,js.map,d.ts,d.ts.map}').filter(f=>!f.includes('node_modules')).forEach(f=>fs.unlinkSync(f));console.log('Clean complete')\"",
120
+ "clean:models": "node -e \"require('fs').rmSync('@cds-models',{recursive:true,force:true});console.log('Removed @cds-models')\"",
121
+ "build": "npm run cds:types && tsc",
122
+ "build:plugin": "npm run cds:types && tsc -p tsconfig.build.json",
123
+ "build:package": "npm run clean && npm run clean:models && npm run build:plugin",
124
+ "prepare": "npm run build:package",
125
+ "start": "cds-serve",
126
+ "cds:watch": "cds watch",
127
+ "cds:serve": "cds serve --with-mocks",
128
+ "cds:types": "cds-typer \"*\" --outputDirectory @cds-models",
129
+ "lint": "eslint .",
130
+ "typecheck": "tsc --noEmit",
131
+ "db:deploy": "cds deploy",
132
+ "pretest": "npm run clean && npm run cds:types && npm run db:deploy",
133
+ "test": "vitest run",
134
+ "pretest:coverage": "npm run clean && npm run cds:types && npm run db:deploy",
135
+ "test:coverage": "vitest run --coverage",
136
+ "pretest:ci": "npm run clean && npm run cds:types && npm run db:deploy",
137
+ "test:ci": "vitest run --exclude \"**/core-ogmios.test.ts\"",
138
+ "pretest:ci:coverage": "npm run clean && npm run cds:types && npm run db:deploy",
139
+ "test:ci:coverage": "vitest run --coverage --exclude \"**/core-ogmios.test.ts\"",
140
+ "pretest:integration": "npm run clean && npm run cds:types && npm run db:deploy",
141
+ "test:integration": "vitest run --project integration",
142
+ "test:integration:blockfrost": "vitest run test/integration/core.blockfrost.test.ts",
143
+ "test:integration:koios": "vitest run test/integration/core.koios.test.ts",
144
+ "test:integration:ogmios": "vitest run test/integration/core-ogmios.test.ts",
145
+ "test:integration:both": "npm run test:integration:blockfrost && npm run test:integration:koios",
146
+ "pretest:unit": "npm run cds:types",
147
+ "test:unit": "vitest run --project unit",
148
+ "watch-odatano": "cds watch --open odatano/index.html?sap-ui-xx-viewCache=false --livereload false",
149
+ "watch-wallet": "cds watch --open wallet/webapp/index.html",
150
+ "release:check": "node scripts/release-check.mjs"
151
+ },
152
+ "sapux": [
153
+ "app/odatano"
154
+ ],
155
+ "directories": {
156
+ "doc": "docs",
157
+ "test": "test"
158
+ },
159
+ "repository": {
160
+ "type": "git",
161
+ "url": "git+https://github.com/ODATANO/ODATANO.git"
162
+ },
163
+ "keywords": [
164
+ "CAP",
165
+ "CDS",
166
+ "plugin",
167
+ "Cardano",
168
+ "blockchain",
169
+ "OData",
170
+ "SAP"
171
+ ],
172
+ "author": "Maximilian Weber",
173
+ "license": "Apache-2.0",
174
+ "type": "commonjs",
175
+ "bugs": {
176
+ "url": "https://github.com/ODATANO/ODATANO/issues"
177
+ },
178
+ "homepage": "https://github.com/ODATANO/ODATANO#readme"
179
+ }