@@ -6,14 +6,19 @@ const {
6
6
withTypeormTransaction,
7
7
typeormTransactionCommit,
8
8
TypeormStabilityWindowBuffer,
9
+ BlockDataEntity,
9
10
BlockEntity,
10
- BlockEntity,
11
- CredentialEntity,
12
- TransactionEntity,
13
- storeUtxo,
11
+ StakePoolEntity,
12
+ PoolRegistrationEntity,
13
+ PoolRetirementEntity,
14
+ OutputEntity,
15
+ AssetEntity,
16
+ TokensEntity,
14
17
storeBlock,
15
- storeCredentials,
16
- storeTransactions,
18
+ storeAssets,
19
+ storeUtxo,
20
+ storeStakePools,
21
+ storeStakePoolMetadataJob,
17
22
isRecoverableTypeormError
18
23
} = require ( '@cardano-sdk/projection-typeorm' ) ;
19
24
const { OgmiosObservableCardanoNode } = require ( '@cardano-sdk/ogmios' ) ;
@@ -27,9 +32,14 @@ const logger = {
27
32
} ;
28
33
29
34
const entities = [
35
+ BlockDataEntity ,
30
36
BlockEntity ,
31
- CredentialEntity ,
32
- TransactionEntity ,
37
+ StakePoolEntity ,
38
+ PoolRegistrationEntity ,
39
+ PoolRetirementEntity ,
40
+ AssetEntity ,
41
+ TokensEntity ,
42
+ OutputEntity
33
43
] ;
34
44
const extensions = {
35
45
pgBoss : true
@@ -91,17 +101,26 @@ Bootstrap.fromCardanoNode({
91
101
logger
92
102
} )
93
103
. pipe (
104
+ Mappers . withCertificates ( ) ,
105
+ Mappers . withStakePools ( ) ,
106
+ Mappers . withMint ( ) ,
94
107
Mappers . withUtxo ( ) ,
95
- Mappers . withAddresses ( ) ,
108
+ // Single-tenant example
109
+ // Mappers.filterProducedUtxoByAddresses({
110
+ // addresses: [
111
+ // 'addr_test1qpgn04xka0857kh6859za75tfvlrlu2lft0yc9z87598yjezw8yvpkv977yj5va20xmd9vw5fczfl3uu4expskz8adfqpydths'
112
+ // ]
113
+ // }),
96
114
shareRetryBackoff (
97
115
( evt$ ) =>
98
116
evt$ . pipe (
99
117
withTypeormTransaction ( { dataSource$, logger } , extensions ) ,
100
- storeUtxo ( ) ,
101
118
storeBlock ( ) ,
102
- storeCredentials ( ) ,
103
- storeTransactions ( ) ,
104
- // buffer.storeBlockData(),
119
+ buffer . storeBlockData ( ) ,
120
+ storeAssets ( ) ,
121
+ storeUtxo ( ) ,
122
+ storeStakePools ( ) ,
123
+ storeStakePoolMetadataJob ( ) ,
105
124
typeormTransactionCommit ( )
106
125
) ,
107
126
{ shouldRetry : isRecoverableTypeormError }
0 commit comments