@fairmint/canton-fairmint-sdk 0.0.2
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/README.md +64 -0
- package/dist/clients/index.d.ts +5 -0
- package/dist/clients/index.d.ts.map +1 -0
- package/dist/clients/index.js +21 -0
- package/dist/clients/index.js.map +1 -0
- package/dist/clients/json-api/index.d.ts +2 -0
- package/dist/clients/json-api/index.d.ts.map +1 -0
- package/dist/clients/json-api/index.js +18 -0
- package/dist/clients/json-api/index.js.map +1 -0
- package/dist/clients/json-api/sdkHelper.d.ts +27 -0
- package/dist/clients/json-api/sdkHelper.d.ts.map +1 -0
- package/dist/clients/json-api/sdkHelper.js +73 -0
- package/dist/clients/json-api/sdkHelper.js.map +1 -0
- package/dist/clients/postgres-db-api/cantonDbClient.d.ts +335 -0
- package/dist/clients/postgres-db-api/cantonDbClient.d.ts.map +1 -0
- package/dist/clients/postgres-db-api/cantonDbClient.js +2703 -0
- package/dist/clients/postgres-db-api/cantonDbClient.js.map +1 -0
- package/dist/clients/postgres-db-api/fairmintDbClient.d.ts +241 -0
- package/dist/clients/postgres-db-api/fairmintDbClient.d.ts.map +1 -0
- package/dist/clients/postgres-db-api/fairmintDbClient.js +3078 -0
- package/dist/clients/postgres-db-api/fairmintDbClient.js.map +1 -0
- package/dist/clients/postgres-db-api/index.d.ts +5 -0
- package/dist/clients/postgres-db-api/index.d.ts.map +1 -0
- package/dist/clients/postgres-db-api/index.js +25 -0
- package/dist/clients/postgres-db-api/index.js.map +1 -0
- package/dist/clients/postgres-db-api/postgresDbClient.d.ts +118 -0
- package/dist/clients/postgres-db-api/postgresDbClient.d.ts.map +1 -0
- package/dist/clients/postgres-db-api/postgresDbClient.js +212 -0
- package/dist/clients/postgres-db-api/postgresDbClient.js.map +1 -0
- package/dist/clients/postgres-db-api/types.d.ts +330 -0
- package/dist/clients/postgres-db-api/types.d.ts.map +1 -0
- package/dist/clients/postgres-db-api/types.js +30 -0
- package/dist/clients/postgres-db-api/types.js.map +1 -0
- package/dist/clients/shared/config.d.ts +19 -0
- package/dist/clients/shared/config.d.ts.map +1 -0
- package/dist/clients/shared/config.js +208 -0
- package/dist/clients/shared/config.js.map +1 -0
- package/dist/clients/shared/index.d.ts +3 -0
- package/dist/clients/shared/index.d.ts.map +1 -0
- package/dist/clients/shared/index.js +19 -0
- package/dist/clients/shared/index.js.map +1 -0
- package/dist/clients/shared/types.d.ts +29 -0
- package/dist/clients/shared/types.d.ts.map +1 -0
- package/dist/clients/shared/types.js +3 -0
- package/dist/clients/shared/types.js.map +1 -0
- package/dist/clients/validator-api/index.d.ts +4 -0
- package/dist/clients/validator-api/index.d.ts.map +1 -0
- package/dist/clients/validator-api/index.js +61 -0
- package/dist/clients/validator-api/index.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +24 -0
- package/dist/index.js.map +1 -0
- package/package.json +60 -0
package/README.md
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# @fairmint/canton-fairmint-sdk
|
|
2
|
+
|
|
3
|
+
Shared SDK utilities for Canton blockchain integration at Fairmint.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @fairmint/canton-fairmint-sdk
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import {
|
|
15
|
+
CantonDbClient,
|
|
16
|
+
PostgresDbClient,
|
|
17
|
+
} from '@fairmint/canton-fairmint-sdk';
|
|
18
|
+
|
|
19
|
+
// Create a Canton database client
|
|
20
|
+
const client = new CantonDbClient({
|
|
21
|
+
host: 'localhost',
|
|
22
|
+
port: 5432,
|
|
23
|
+
database: 'canton',
|
|
24
|
+
user: 'canton',
|
|
25
|
+
password: 'password',
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
// Use the client
|
|
29
|
+
const result = await client.query('SELECT * FROM events LIMIT 10');
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Features
|
|
33
|
+
|
|
34
|
+
- **PostgresDbClient**: Base PostgreSQL client with connection pooling
|
|
35
|
+
- **CantonDbClient**: Specialized client for Canton blockchain database queries
|
|
36
|
+
- **FairmintDbClient**: Client for Fairmint-specific database operations
|
|
37
|
+
- **SDK Helper**: Utilities for working with the Canton JSON API
|
|
38
|
+
|
|
39
|
+
## Development
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
# Install dependencies
|
|
43
|
+
npm install
|
|
44
|
+
|
|
45
|
+
# Build
|
|
46
|
+
npm run build
|
|
47
|
+
|
|
48
|
+
# Type check
|
|
49
|
+
npm run typecheck
|
|
50
|
+
|
|
51
|
+
# Lint
|
|
52
|
+
npm run lint
|
|
53
|
+
|
|
54
|
+
# Format
|
|
55
|
+
npm run format
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Publishing
|
|
59
|
+
|
|
60
|
+
This package is automatically published to NPM when changes are merged to `main`. The version is automatically incremented and a changelog is generated from commit messages.
|
|
61
|
+
|
|
62
|
+
## License
|
|
63
|
+
|
|
64
|
+
MIT
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/clients/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./json-api"), exports);
|
|
18
|
+
__exportStar(require("./postgres-db-api"), exports);
|
|
19
|
+
__exportStar(require("./shared"), exports);
|
|
20
|
+
__exportStar(require("./validator-api"), exports);
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/clients/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,oDAAkC;AAClC,2CAAyB;AACzB,kDAAgC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/clients/json-api/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./sdkHelper"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/clients/json-api/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { LedgerJsonApiClient } from '@fairmint/canton-node-sdk';
|
|
2
|
+
import { OcpClient } from '@open-captable-protocol/canton';
|
|
3
|
+
/**
|
|
4
|
+
* Create a LedgerJsonApiClient instance using EnvLoader for scripts
|
|
5
|
+
*
|
|
6
|
+
* @param network Network type (any string)
|
|
7
|
+
* @param providerType Provider type (any string)
|
|
8
|
+
* @returns Configured LedgerJsonApiClient instance
|
|
9
|
+
*/
|
|
10
|
+
export declare function createLedgerJsonApiClient(network: string, providerType: string): LedgerJsonApiClient;
|
|
11
|
+
/**
|
|
12
|
+
* Extract the LedgerJsonApiClient from an OcpClient with proper typing This ensures type compatibility when passing the
|
|
13
|
+
* client to other functions
|
|
14
|
+
*
|
|
15
|
+
* @param ocpClient The OcpClient instance
|
|
16
|
+
* @returns The LedgerJsonApiClient instance with proper typing
|
|
17
|
+
*/
|
|
18
|
+
export declare function getLedgerClientFromOcp(ocpClient: OcpClient): LedgerJsonApiClient;
|
|
19
|
+
/**
|
|
20
|
+
* Create an OcpClient instance using EnvLoader for scripts
|
|
21
|
+
*
|
|
22
|
+
* @param network Network type (mainnet|devnet)
|
|
23
|
+
* @param providerType Provider type (intellect|5n)
|
|
24
|
+
* @returns Configured OcpClient instance
|
|
25
|
+
*/
|
|
26
|
+
export declare function createOcpClient(network: string, providerType: string): OcpClient;
|
|
27
|
+
//# sourceMappingURL=sdkHelper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sdkHelper.d.ts","sourceRoot":"","sources":["../../../src/clients/json-api/sdkHelper.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,mBAAmB,EACpB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAE3D;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,MAAM,GACnB,mBAAmB,CAmCrB;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CACpC,SAAS,EAAE,SAAS,GACnB,mBAAmB,CAGrB;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,MAAM,GACnB,SAAS,CAmCX"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createLedgerJsonApiClient = createLedgerJsonApiClient;
|
|
4
|
+
exports.getLedgerClientFromOcp = getLedgerClientFromOcp;
|
|
5
|
+
exports.createOcpClient = createOcpClient;
|
|
6
|
+
const canton_node_sdk_1 = require("@fairmint/canton-node-sdk");
|
|
7
|
+
const canton_1 = require("@open-captable-protocol/canton");
|
|
8
|
+
/**
|
|
9
|
+
* Create a LedgerJsonApiClient instance using EnvLoader for scripts
|
|
10
|
+
*
|
|
11
|
+
* @param network Network type (any string)
|
|
12
|
+
* @param providerType Provider type (any string)
|
|
13
|
+
* @returns Configured LedgerJsonApiClient instance
|
|
14
|
+
*/
|
|
15
|
+
function createLedgerJsonApiClient(network, providerType) {
|
|
16
|
+
const envLoader = canton_node_sdk_1.EnvLoader.getInstance();
|
|
17
|
+
return new canton_node_sdk_1.LedgerJsonApiClient({
|
|
18
|
+
network: network,
|
|
19
|
+
provider: providerType,
|
|
20
|
+
authUrl: envLoader.getAuthUrl(network, providerType),
|
|
21
|
+
apis: {
|
|
22
|
+
LEDGER_JSON_API: {
|
|
23
|
+
apiUrl: envLoader.getApiUri('LEDGER_JSON_API', network, providerType) ?? '',
|
|
24
|
+
auth: {
|
|
25
|
+
clientId: envLoader.getApiClientId('LEDGER_JSON_API', network, providerType) ?? '',
|
|
26
|
+
clientSecret: envLoader.getApiClientSecret('LEDGER_JSON_API', network, providerType) ?? '',
|
|
27
|
+
grantType: 'client_credentials',
|
|
28
|
+
},
|
|
29
|
+
partyId: envLoader.getPartyId(network, providerType),
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
logger: new canton_node_sdk_1.FileLogger(),
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Extract the LedgerJsonApiClient from an OcpClient with proper typing This ensures type compatibility when passing the
|
|
37
|
+
* client to other functions
|
|
38
|
+
*
|
|
39
|
+
* @param ocpClient The OcpClient instance
|
|
40
|
+
* @returns The LedgerJsonApiClient instance with proper typing
|
|
41
|
+
*/
|
|
42
|
+
function getLedgerClientFromOcp(ocpClient) {
|
|
43
|
+
// Type assertion to handle potential duplicate type definitions from node_modules
|
|
44
|
+
return ocpClient.client;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Create an OcpClient instance using EnvLoader for scripts
|
|
48
|
+
*
|
|
49
|
+
* @param network Network type (mainnet|devnet)
|
|
50
|
+
* @param providerType Provider type (intellect|5n)
|
|
51
|
+
* @returns Configured OcpClient instance
|
|
52
|
+
*/
|
|
53
|
+
function createOcpClient(network, providerType) {
|
|
54
|
+
const envLoader = canton_node_sdk_1.EnvLoader.getInstance();
|
|
55
|
+
return new canton_1.OcpClient({
|
|
56
|
+
network: network,
|
|
57
|
+
provider: providerType,
|
|
58
|
+
authUrl: envLoader.getAuthUrl(network, providerType),
|
|
59
|
+
apis: {
|
|
60
|
+
LEDGER_JSON_API: {
|
|
61
|
+
apiUrl: envLoader.getApiUri('LEDGER_JSON_API', network, providerType) ?? '',
|
|
62
|
+
auth: {
|
|
63
|
+
clientId: envLoader.getApiClientId('LEDGER_JSON_API', network, providerType) ?? '',
|
|
64
|
+
clientSecret: envLoader.getApiClientSecret('LEDGER_JSON_API', network, providerType) ?? '',
|
|
65
|
+
grantType: 'client_credentials',
|
|
66
|
+
},
|
|
67
|
+
partyId: envLoader.getPartyId(network, providerType),
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
logger: new canton_node_sdk_1.FileLogger(),
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=sdkHelper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sdkHelper.js","sourceRoot":"","sources":["../../../src/clients/json-api/sdkHelper.ts"],"names":[],"mappings":";;AAcA,8DAsCC;AASD,wDAKC;AASD,0CAsCC;AAjHD,+DAImC;AACnC,2DAA2D;AAE3D;;;;;;GAMG;AACH,SAAgB,yBAAyB,CACvC,OAAe,EACf,YAAoB;IAEpB,MAAM,SAAS,GAAG,2BAAS,CAAC,WAAW,EAAE,CAAC;IAE1C,OAAO,IAAI,qCAAmB,CAAC;QAC7B,OAAO,EAAE,OAAc;QACvB,QAAQ,EAAE,YAAmB;QAC7B,OAAO,EAAE,SAAS,CAAC,UAAU,CAAC,OAAc,EAAE,YAAmB,CAAC;QAClE,IAAI,EAAE;YACJ,eAAe,EAAE;gBACf,MAAM,EACJ,SAAS,CAAC,SAAS,CACjB,iBAAiB,EACjB,OAAc,EACd,YAAmB,CACpB,IAAI,EAAE;gBACT,IAAI,EAAE;oBACJ,QAAQ,EACN,SAAS,CAAC,cAAc,CACtB,iBAAiB,EACjB,OAAc,EACd,YAAmB,CACpB,IAAI,EAAE;oBACT,YAAY,EACV,SAAS,CAAC,kBAAkB,CAC1B,iBAAiB,EACjB,OAAc,EACd,YAAmB,CACpB,IAAI,EAAE;oBACT,SAAS,EAAE,oBAAoB;iBAChC;gBACD,OAAO,EAAE,SAAS,CAAC,UAAU,CAAC,OAAc,EAAE,YAAmB,CAAC;aACnE;SACF;QACD,MAAM,EAAE,IAAI,4BAAU,EAAE;KACzB,CAAC,CAAC;AACL,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,sBAAsB,CACpC,SAAoB;IAEpB,kFAAkF;IAClF,OAAO,SAAS,CAAC,MAAwC,CAAC;AAC5D,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,eAAe,CAC7B,OAAe,EACf,YAAoB;IAEpB,MAAM,SAAS,GAAG,2BAAS,CAAC,WAAW,EAAE,CAAC;IAE1C,OAAO,IAAI,kBAAS,CAAC;QACnB,OAAO,EAAE,OAAc;QACvB,QAAQ,EAAE,YAAmB;QAC7B,OAAO,EAAE,SAAS,CAAC,UAAU,CAAC,OAAc,EAAE,YAAmB,CAAC;QAClE,IAAI,EAAE;YACJ,eAAe,EAAE;gBACf,MAAM,EACJ,SAAS,CAAC,SAAS,CACjB,iBAAiB,EACjB,OAAc,EACd,YAAmB,CACpB,IAAI,EAAE;gBACT,IAAI,EAAE;oBACJ,QAAQ,EACN,SAAS,CAAC,cAAc,CACtB,iBAAiB,EACjB,OAAc,EACd,YAAmB,CACpB,IAAI,EAAE;oBACT,YAAY,EACV,SAAS,CAAC,kBAAkB,CAC1B,iBAAiB,EACjB,OAAc,EACd,YAAmB,CACpB,IAAI,EAAE;oBACT,SAAS,EAAE,oBAAoB;iBAChC;gBACD,OAAO,EAAE,SAAS,CAAC,UAAU,CAAC,OAAc,EAAE,YAAmB,CAAC;aACnE;SACF;QACD,MAAM,EAAE,IAAI,4BAAU,EAAE;KACzB,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
import { Pool, type PoolClient } from 'pg';
|
|
2
|
+
import { type CantonTransaction, type CantonTransactionEvent, type CantonTransactionEventAssigned, type CantonTransactionEventCreated, type CantonTransactionEventExercised, type CantonTransactionEventExercisedProvider, type CantonTransactionEventProvider, type CantonTransactionEventUnassigned, type CantonTransactionProvider } from './types';
|
|
3
|
+
export interface LockedAmuletRecord {
|
|
4
|
+
contractId: string;
|
|
5
|
+
updateId: string;
|
|
6
|
+
createdAt: string;
|
|
7
|
+
owner: string | null;
|
|
8
|
+
amount: number | null;
|
|
9
|
+
amountRaw: string | null;
|
|
10
|
+
lockExpiresAt: string | null;
|
|
11
|
+
lockHolders: string[];
|
|
12
|
+
lockDescription: string | null;
|
|
13
|
+
signatories: string[];
|
|
14
|
+
observers: string[];
|
|
15
|
+
templateId: string;
|
|
16
|
+
}
|
|
17
|
+
export declare class CantonDbClient {
|
|
18
|
+
private readonly pool;
|
|
19
|
+
private readonly config;
|
|
20
|
+
private readonly network;
|
|
21
|
+
constructor(network: string);
|
|
22
|
+
private getCantonTransactionsDatabaseUrl;
|
|
23
|
+
getNetwork(): string;
|
|
24
|
+
connect(): Promise<PoolClient>;
|
|
25
|
+
close(): Promise<void>;
|
|
26
|
+
runInTransaction<T>(callback: (client: PoolClient) => Promise<T>): Promise<T>;
|
|
27
|
+
insertCantonTransaction(tx: CantonTransaction, client?: Pool | PoolClient): Promise<{
|
|
28
|
+
id: bigint;
|
|
29
|
+
}>;
|
|
30
|
+
insertCantonTransactionProvider(provider: CantonTransactionProvider, client?: Pool | PoolClient): Promise<{
|
|
31
|
+
id: bigint;
|
|
32
|
+
}>;
|
|
33
|
+
insertCantonTransactionEvent(event: CantonTransactionEvent, client?: Pool | PoolClient): Promise<{
|
|
34
|
+
id: bigint;
|
|
35
|
+
}>;
|
|
36
|
+
insertCantonTransactionEventProvider(provider: CantonTransactionEventProvider, client?: Pool | PoolClient): Promise<void>;
|
|
37
|
+
insertCantonTransactionEventCreated(): Promise<void>;
|
|
38
|
+
insertCantonTransactionEventExercised(details: CantonTransactionEventExercised, client?: Pool | PoolClient): Promise<void>;
|
|
39
|
+
insertCantonTransactionEventExercisedProvider(details: CantonTransactionEventExercisedProvider, client?: Pool | PoolClient): Promise<void>;
|
|
40
|
+
insertCantonTransactionEventAssigned(_details: CantonTransactionEventAssigned, _client?: Pool | PoolClient): Promise<void>;
|
|
41
|
+
insertCantonTransactionEventUnassigned(_details: CantonTransactionEventUnassigned, _client?: Pool | PoolClient): Promise<void>;
|
|
42
|
+
upsertCantonParty(partyId: string, network: string, client?: Pool | PoolClient): Promise<bigint>;
|
|
43
|
+
insertActors(contractId: bigint, partyIds: string[], actorType: 'signatory' | 'observer', network: string, client?: Pool | PoolClient): Promise<void>;
|
|
44
|
+
insertActingParties(eventId: bigint, partyIds: string[], network: string, client?: Pool | PoolClient): Promise<void>;
|
|
45
|
+
bulkInsertCantonTransactions(transactions: CantonTransaction[], client?: Pool | PoolClient): Promise<Map<string, bigint>>;
|
|
46
|
+
bulkInsertCantonTransactionProviders(providers: CantonTransactionProvider[], client?: Pool | PoolClient): Promise<void>;
|
|
47
|
+
bulkInsertCantonTransactionEvents(events: CantonTransactionEvent[], client?: Pool | PoolClient): Promise<Map<string, bigint>>;
|
|
48
|
+
bulkInsertCantonTransactionEventProviders(providers: CantonTransactionEventProvider[], client?: Pool | PoolClient): Promise<void>;
|
|
49
|
+
bulkInsertCantonTransactionEventExercised(details: CantonTransactionEventExercised[], client?: Pool | PoolClient): Promise<void>;
|
|
50
|
+
bulkInsertCantonTransactionEventExercisedProviders(details: CantonTransactionEventExercisedProvider[], client?: Pool | PoolClient): Promise<void>;
|
|
51
|
+
getLastProcessedOffset(provider?: string): Promise<bigint>;
|
|
52
|
+
getAllPartiesForNetwork(): Promise<Array<{
|
|
53
|
+
party_id: string;
|
|
54
|
+
}>>;
|
|
55
|
+
/**
|
|
56
|
+
* Find all transaction update IDs that involve a specific contract ID Returns transactions ordered by record_time
|
|
57
|
+
* (most recent first)
|
|
58
|
+
*/
|
|
59
|
+
findTransactionsByContractId(contractId: string): Promise<Array<{
|
|
60
|
+
update_id: string;
|
|
61
|
+
record_time: string;
|
|
62
|
+
kind: string;
|
|
63
|
+
}>>;
|
|
64
|
+
/**
|
|
65
|
+
* Get comprehensive contract history for a specific contract ID Returns Created event, Archive event (if exists), and
|
|
66
|
+
* all Exercise events with updateIds
|
|
67
|
+
*/
|
|
68
|
+
getContractHistory(contractId: string): Promise<{
|
|
69
|
+
created: {
|
|
70
|
+
updateId: string;
|
|
71
|
+
recordTime: string;
|
|
72
|
+
effectiveAt: string;
|
|
73
|
+
createArgument: Record<string, unknown>;
|
|
74
|
+
templateId: string;
|
|
75
|
+
packageName: string;
|
|
76
|
+
signatories: string[];
|
|
77
|
+
observers: string[];
|
|
78
|
+
} | null;
|
|
79
|
+
archived: {
|
|
80
|
+
updateId: string;
|
|
81
|
+
recordTime: string;
|
|
82
|
+
effectiveAt: string;
|
|
83
|
+
eventKind: string;
|
|
84
|
+
templateId: string;
|
|
85
|
+
packageName: string;
|
|
86
|
+
} | null;
|
|
87
|
+
exercises: Array<{
|
|
88
|
+
updateId: string;
|
|
89
|
+
recordTime: string;
|
|
90
|
+
effectiveAt: string;
|
|
91
|
+
choice: string;
|
|
92
|
+
interfaceId: string | null;
|
|
93
|
+
choiceArgument: Record<string, unknown>;
|
|
94
|
+
exerciseResult: Record<string, unknown>;
|
|
95
|
+
actingParties: string[];
|
|
96
|
+
eventKind: string;
|
|
97
|
+
consuming: boolean;
|
|
98
|
+
templateId: string;
|
|
99
|
+
packageName: string;
|
|
100
|
+
eventCount: number;
|
|
101
|
+
eventBreakdown: Array<{
|
|
102
|
+
templateName: string;
|
|
103
|
+
packageName: string;
|
|
104
|
+
kind: string;
|
|
105
|
+
count: number;
|
|
106
|
+
}>;
|
|
107
|
+
}>;
|
|
108
|
+
}>;
|
|
109
|
+
/** Execute a query directly on the pool Useful for read operations that don't have dedicated methods */
|
|
110
|
+
query<R extends Record<string, unknown> = Record<string, unknown>>(queryText: string, values?: unknown[]): Promise<{
|
|
111
|
+
rows: R[];
|
|
112
|
+
}>;
|
|
113
|
+
/**
|
|
114
|
+
* Get traffic costs aggregated by round from MemberTraffic events. Queries the
|
|
115
|
+
* transactions schema for MemberTraffic created events.
|
|
116
|
+
*/
|
|
117
|
+
getTrafficCostsByRound(timeRange: '15m' | '1h' | '6h' | '1d' | '7d' | '30d' | 'last-month' | 'all', timePeriod?: 'most-recent' | 'custom-start', customStartDate?: string, partyFilter?: string, providerFilter?: string): Promise<Array<{
|
|
118
|
+
round: number;
|
|
119
|
+
timestamp: string;
|
|
120
|
+
amuletSpent: number;
|
|
121
|
+
usdSpent: number;
|
|
122
|
+
trafficPurchased: number;
|
|
123
|
+
numPurchases: number;
|
|
124
|
+
providers: string[];
|
|
125
|
+
}>>;
|
|
126
|
+
getMemberTrafficEvents(timeRange: '15m' | '1h' | '6h' | '1d' | '7d' | '30d' | 'last-month' | 'all', timePeriod?: 'most-recent' | 'custom-start', customStartDate?: string, partyFilter?: string, providerFilter?: string): Promise<Array<{
|
|
127
|
+
round: number;
|
|
128
|
+
timestamp: string;
|
|
129
|
+
amuletSpent: number;
|
|
130
|
+
usdSpent: number;
|
|
131
|
+
trafficPurchased: number;
|
|
132
|
+
contractId: string;
|
|
133
|
+
updateId: string;
|
|
134
|
+
ledgerOffset?: number;
|
|
135
|
+
providers: string[];
|
|
136
|
+
payerParties: string[];
|
|
137
|
+
}>>;
|
|
138
|
+
/** Get all available providers for a network */
|
|
139
|
+
getAvailableProviders(): Promise<Array<{
|
|
140
|
+
provider: string;
|
|
141
|
+
synchronizer_id: string;
|
|
142
|
+
}>>;
|
|
143
|
+
/** Get member traffic history for a specific party Returns all MemberTraffic events for the given party ID */
|
|
144
|
+
getMemberTrafficHistory(partyId: string): Promise<Array<{
|
|
145
|
+
offset: number;
|
|
146
|
+
createdAt: string;
|
|
147
|
+
memberId: string;
|
|
148
|
+
totalPurchased: string;
|
|
149
|
+
numPurchases: string;
|
|
150
|
+
amuletSpent: string;
|
|
151
|
+
usdSpent: string;
|
|
152
|
+
}>>;
|
|
153
|
+
insertSignatories(contractId: bigint, partyIds: string[], client?: Pool | PoolClient): Promise<void>;
|
|
154
|
+
insertObservers(contractId: bigint, partyIds: string[], client?: Pool | PoolClient): Promise<void>;
|
|
155
|
+
bulkInsertCantonTransactionEventCreated(_details: CantonTransactionEventCreated[], _client?: Pool | PoolClient): Promise<void>;
|
|
156
|
+
/**
|
|
157
|
+
* Latest offset and last transaction time for a provider.
|
|
158
|
+
*/
|
|
159
|
+
getProviderOffset(provider: string): Promise<{
|
|
160
|
+
last_offset: number | null;
|
|
161
|
+
last_updated: string | null;
|
|
162
|
+
}>;
|
|
163
|
+
/**
|
|
164
|
+
* Active Amulet contracts grouped by owner (signatory). Filters out DSO and empty owners.
|
|
165
|
+
*/
|
|
166
|
+
getActiveAmuletContractsByOwner(): Promise<Array<{
|
|
167
|
+
owner: string | null;
|
|
168
|
+
contract_count: number;
|
|
169
|
+
}>>;
|
|
170
|
+
/**
|
|
171
|
+
* Locked amulets for a signatory or owner. Filters to active contracts.
|
|
172
|
+
*/
|
|
173
|
+
getLockedAmuletsBySignatory(partyId: string): Promise<LockedAmuletRecord[]>;
|
|
174
|
+
/**
|
|
175
|
+
* Transaction lookup by updateId or offset with aggregated tree data.
|
|
176
|
+
* Returns a shape compatible with UI transaction-tree expectations.
|
|
177
|
+
*/
|
|
178
|
+
getTransactionTree(search: {
|
|
179
|
+
type: 'updateId';
|
|
180
|
+
value: string;
|
|
181
|
+
} | {
|
|
182
|
+
type: 'offset';
|
|
183
|
+
value: number;
|
|
184
|
+
}): Promise<{
|
|
185
|
+
transaction: {
|
|
186
|
+
updateId?: string;
|
|
187
|
+
commandId?: string | null;
|
|
188
|
+
workflowId?: string | null;
|
|
189
|
+
effectiveAt?: string;
|
|
190
|
+
recordTime?: string;
|
|
191
|
+
offset?: string;
|
|
192
|
+
traceContext?: Record<string, unknown> | null;
|
|
193
|
+
eventsById?: Record<string, unknown>;
|
|
194
|
+
};
|
|
195
|
+
}>;
|
|
196
|
+
/**
|
|
197
|
+
* Given a canton_contract_id, return related transactions (newest first).
|
|
198
|
+
*/
|
|
199
|
+
findTransactionsByCantonContractId(cantonContractId: string): Promise<Array<{
|
|
200
|
+
update_id: string;
|
|
201
|
+
record_time: string;
|
|
202
|
+
kind: string;
|
|
203
|
+
}>>;
|
|
204
|
+
/**
|
|
205
|
+
* Stats for a party (signatory/observer via contract_actors, acting via exercised_acting_parties).
|
|
206
|
+
*/
|
|
207
|
+
getPartyStats(partyId: string): Promise<{
|
|
208
|
+
total_transactions: number;
|
|
209
|
+
total_events: number;
|
|
210
|
+
contracts_created: number;
|
|
211
|
+
contracts_exercised: number;
|
|
212
|
+
contracts_archived: number;
|
|
213
|
+
unique_contracts: number;
|
|
214
|
+
unique_templates: number;
|
|
215
|
+
first_seen: string | null;
|
|
216
|
+
last_seen: string | null;
|
|
217
|
+
}>;
|
|
218
|
+
getPartyTopChoices(partyId: string, limit?: number): Promise<Array<{
|
|
219
|
+
choice_name: string;
|
|
220
|
+
exercise_count: number;
|
|
221
|
+
}>>;
|
|
222
|
+
getPartyTopTemplates(partyId: string, limit?: number): Promise<Array<{
|
|
223
|
+
template_name: string;
|
|
224
|
+
event_count: number;
|
|
225
|
+
created_count: number;
|
|
226
|
+
exercised_count: number;
|
|
227
|
+
archived_count: number;
|
|
228
|
+
}>>;
|
|
229
|
+
/**
|
|
230
|
+
* Paginated transactions for a party with role and summary filters.
|
|
231
|
+
*/
|
|
232
|
+
getPartyTransactions(options: {
|
|
233
|
+
partyId: string;
|
|
234
|
+
role: 'all' | 'signatory' | 'observer' | 'acting';
|
|
235
|
+
templateName?: string | null;
|
|
236
|
+
choiceName?: string | null;
|
|
237
|
+
limit: number;
|
|
238
|
+
offset: number;
|
|
239
|
+
}): Promise<Array<{
|
|
240
|
+
transaction_id: number;
|
|
241
|
+
update_id: string;
|
|
242
|
+
record_time: string;
|
|
243
|
+
roles: string[];
|
|
244
|
+
event_summary: Array<{
|
|
245
|
+
template_name: string;
|
|
246
|
+
kind: string;
|
|
247
|
+
count: number;
|
|
248
|
+
}>;
|
|
249
|
+
}>>;
|
|
250
|
+
/**
|
|
251
|
+
* Get AppRewardCoupon time series data from Canton transactions
|
|
252
|
+
* Queries AppRewardCoupon created events and aggregates by time interval
|
|
253
|
+
*/
|
|
254
|
+
getAppRewardCouponTimeSeriesData(timeRange: '15m' | '1h' | '6h' | '1d' | '7d' | '30d' | 'last-month' | 'all', metric: 'count' | 'amount' | 'couponAmount', timePeriod: 'most-recent' | 'custom-start', customStartDate?: string, partyFilter?: string, couponStatus?: 'good' | 'expired'): Promise<Array<{
|
|
255
|
+
timestamp: string;
|
|
256
|
+
count: number;
|
|
257
|
+
amount: number;
|
|
258
|
+
couponAmount: number;
|
|
259
|
+
}>>;
|
|
260
|
+
/**
|
|
261
|
+
* Get AppRewardCoupon round series data from Canton transactions
|
|
262
|
+
* Queries AppRewardCoupon created events and aggregates by round number
|
|
263
|
+
*/
|
|
264
|
+
getAppRewardCouponRoundSeriesData(timeRange: '15m' | '1h' | '6h' | '1d' | '7d' | '30d' | 'last-month' | 'all', metric: 'count' | 'amount' | 'couponAmount', timePeriod: 'most-recent' | 'custom-start', customStartDate?: string, partyFilter?: string, couponStatus?: 'good' | 'expired'): Promise<Array<{
|
|
265
|
+
timestamp: string;
|
|
266
|
+
count: number;
|
|
267
|
+
amount: number;
|
|
268
|
+
couponAmount: number;
|
|
269
|
+
round: number;
|
|
270
|
+
}>>;
|
|
271
|
+
/**
|
|
272
|
+
* Get AppMarker (FeaturedAppActivityMarker) time series data from Canton transactions
|
|
273
|
+
*/
|
|
274
|
+
getAppMarkerTimeSeriesData(timeRange: '15m' | '1h' | '6h' | '1d' | '7d' | '30d' | 'last-month' | 'all', metric: 'count', timePeriod: 'most-recent' | 'custom-start', customStartDate?: string, partyFilter?: string, status?: 'created' | 'archived'): Promise<Array<{
|
|
275
|
+
timestamp: string;
|
|
276
|
+
count: number;
|
|
277
|
+
createdCount?: number;
|
|
278
|
+
archivedCount?: number;
|
|
279
|
+
createdWeight?: number;
|
|
280
|
+
archivedWeight?: number;
|
|
281
|
+
}>>;
|
|
282
|
+
/**
|
|
283
|
+
* Get unique beneficiary parties from AppRewardCoupon contracts
|
|
284
|
+
*/
|
|
285
|
+
getUniqueCouponBeneficiaryParties(): Promise<Array<{
|
|
286
|
+
party_id: string;
|
|
287
|
+
display_name: string;
|
|
288
|
+
}>>;
|
|
289
|
+
/**
|
|
290
|
+
* Get unique beneficiary parties from FeaturedAppActivityMarker contracts
|
|
291
|
+
*/
|
|
292
|
+
getUniqueMarkerBeneficiaryParties(): Promise<Array<{
|
|
293
|
+
party_id: string;
|
|
294
|
+
display_name: string;
|
|
295
|
+
}>>;
|
|
296
|
+
/**
|
|
297
|
+
* Get last AppRewardCoupon timestamp
|
|
298
|
+
*/
|
|
299
|
+
getLastAppRewardCouponTimestamp(partyFilter?: string): Promise<string | null>;
|
|
300
|
+
/**
|
|
301
|
+
* Get lifetime app rewards (sum of all AppRewardCoupon amounts)
|
|
302
|
+
*/
|
|
303
|
+
getLifetimeAppRewards(): Promise<number>;
|
|
304
|
+
/**
|
|
305
|
+
* Get latest coupon amounts (featured and unfeatured)
|
|
306
|
+
*/
|
|
307
|
+
getLatestCouponAmounts(): Promise<{
|
|
308
|
+
featured: number | null;
|
|
309
|
+
unfeatured: number | null;
|
|
310
|
+
}>;
|
|
311
|
+
/**
|
|
312
|
+
* Get active contracts with optional filtering.
|
|
313
|
+
* Mirrors the SDK's getActiveContracts but runs against the local database.
|
|
314
|
+
* Note: For performance, signatories/observers/witnessParties are not included.
|
|
315
|
+
*/
|
|
316
|
+
getActiveContracts(options: {
|
|
317
|
+
partyId?: string;
|
|
318
|
+
templateIds?: string[];
|
|
319
|
+
}): Promise<Array<{
|
|
320
|
+
contractEntry: {
|
|
321
|
+
JsActiveContract: {
|
|
322
|
+
createdEvent: {
|
|
323
|
+
contractId: string;
|
|
324
|
+
templateId: string;
|
|
325
|
+
createArgument: Record<string, unknown>;
|
|
326
|
+
createdAt: string;
|
|
327
|
+
packageName: string;
|
|
328
|
+
};
|
|
329
|
+
synchronizerId: string;
|
|
330
|
+
reassignmentCounter: string;
|
|
331
|
+
};
|
|
332
|
+
};
|
|
333
|
+
}>>;
|
|
334
|
+
}
|
|
335
|
+
//# sourceMappingURL=cantonDbClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cantonDbClient.d.ts","sourceRoot":"","sources":["../../../src/clients/postgres-db-api/cantonDbClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,UAAU,EAAE,MAAM,IAAI,CAAC;AAE3C,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,8BAA8B,EACnC,KAAK,6BAA6B,EAClC,KAAK,+BAA+B,EACpC,KAAK,uCAAuC,EAC5C,KAAK,8BAA8B,EACnC,KAAK,gCAAgC,EACrC,KAAK,yBAAyB,EAC/B,MAAM,SAAS,CAAC;AAEjB,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACpB;AAiBD,qBAAa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAO;IAC5B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAiB;IACxC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;gBAErB,OAAO,EAAE,MAAM;IAkC3B,OAAO,CAAC,gCAAgC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