@fairmint/canton-fairmint-sdk 0.0.55 → 0.0.56
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/dist/clients/json-api/sdkHelper.d.ts +4 -24
- package/dist/clients/json-api/sdkHelper.d.ts.map +1 -1
- package/dist/clients/json-api/sdkHelper.js +8 -74
- package/dist/clients/json-api/sdkHelper.js.map +1 -1
- package/dist/clients/shared/index.d.ts +1 -0
- package/dist/clients/shared/index.d.ts.map +1 -1
- package/dist/clients/shared/index.js +1 -0
- package/dist/clients/shared/index.js.map +1 -1
- package/dist/clients/shared/runtime.d.ts +29 -0
- package/dist/clients/shared/runtime.d.ts.map +1 -0
- package/dist/clients/shared/runtime.js +163 -0
- package/dist/clients/shared/runtime.js.map +1 -0
- package/dist/clients/validator-api/index.d.ts +3 -2
- package/dist/clients/validator-api/index.d.ts.map +1 -1
- package/dist/clients/validator-api/index.js +6 -54
- package/dist/clients/validator-api/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,28 +1,8 @@
|
|
|
1
1
|
import { LedgerJsonApiClient } from '@fairmint/canton-node-sdk';
|
|
2
2
|
import { OcpClient } from '@open-captable-protocol/canton';
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
*
|
|
7
|
-
* @param network Network type (devnet | mainnet | staging). Staging uses `CANTON_DEVNET_*` credentials.
|
|
8
|
-
* @param providerType Provider type (intellect | 5n | 5n-broker)
|
|
9
|
-
* @returns Configured LedgerJsonApiClient instance
|
|
10
|
-
*/
|
|
11
|
-
export declare function createLedgerJsonApiClient(network: NetworkType, providerType: ProviderType): LedgerJsonApiClient;
|
|
12
|
-
/**
|
|
13
|
-
* Extract the LedgerJsonApiClient from an OcpClient with proper typing This ensures type compatibility when passing the
|
|
14
|
-
* client to other functions
|
|
15
|
-
*
|
|
16
|
-
* @param ocpClient The OcpClient instance
|
|
17
|
-
* @returns The LedgerJsonApiClient instance with proper typing
|
|
18
|
-
*/
|
|
3
|
+
import { CantonClientRuntime } from '../shared/runtime';
|
|
4
|
+
export { CantonClientRuntime, createCantonClientRuntime, } from '../shared/runtime';
|
|
5
|
+
export declare function createLedgerJsonApiClient(runtime: CantonClientRuntime): LedgerJsonApiClient;
|
|
19
6
|
export declare function getLedgerClientFromOcp(ocpClient: OcpClient): LedgerJsonApiClient;
|
|
20
|
-
|
|
21
|
-
* Create an OcpClient instance using EnvLoader for scripts
|
|
22
|
-
*
|
|
23
|
-
* @param network Network type (devnet | mainnet | staging). Staging uses `CANTON_DEVNET_*` credentials.
|
|
24
|
-
* @param providerType Provider type (intellect | 5n | 5n-broker)
|
|
25
|
-
* @returns Configured OcpClient instance
|
|
26
|
-
*/
|
|
27
|
-
export declare function createOcpClient(network: NetworkType, providerType: ProviderType): OcpClient;
|
|
7
|
+
export declare function createOcpClient(runtime: CantonClientRuntime): OcpClient;
|
|
28
8
|
//# sourceMappingURL=sdkHelper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdkHelper.d.ts","sourceRoot":"","sources":["../../../src/clients/json-api/sdkHelper.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"sdkHelper.d.ts","sourceRoot":"","sources":["../../../src/clients/json-api/sdkHelper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAExD,OAAO,EACL,mBAAmB,EACnB,yBAAyB,GAC1B,MAAM,mBAAmB,CAAC;AAE3B,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,mBAAmB,GAC3B,mBAAmB,CAErB;AAED,wBAAgB,sBAAsB,CACpC,SAAS,EAAE,SAAS,GACnB,mBAAmB,CAErB;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,mBAAmB,GAAG,SAAS,CAEvE"}
|
|
@@ -1,85 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createCantonClientRuntime = exports.CantonClientRuntime = void 0;
|
|
3
4
|
exports.createLedgerJsonApiClient = createLedgerJsonApiClient;
|
|
4
5
|
exports.getLedgerClientFromOcp = getLedgerClientFromOcp;
|
|
5
6
|
exports.createOcpClient = createOcpClient;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
function
|
|
10
|
-
|
|
11
|
-
throw new Error(`Missing required configuration: ${envDescription}. ` +
|
|
12
|
-
`Check your environment variables.`);
|
|
13
|
-
}
|
|
14
|
-
return value;
|
|
7
|
+
var runtime_1 = require("../shared/runtime");
|
|
8
|
+
Object.defineProperty(exports, "CantonClientRuntime", { enumerable: true, get: function () { return runtime_1.CantonClientRuntime; } });
|
|
9
|
+
Object.defineProperty(exports, "createCantonClientRuntime", { enumerable: true, get: function () { return runtime_1.createCantonClientRuntime; } });
|
|
10
|
+
function createLedgerJsonApiClient(runtime) {
|
|
11
|
+
return runtime.createLedgerJsonApiClient();
|
|
15
12
|
}
|
|
16
|
-
/**
|
|
17
|
-
* Create a LedgerJsonApiClient instance using EnvLoader for scripts
|
|
18
|
-
*
|
|
19
|
-
* @param network Network type (devnet | mainnet | staging). Staging uses `CANTON_DEVNET_*` credentials.
|
|
20
|
-
* @param providerType Provider type (intellect | 5n | 5n-broker)
|
|
21
|
-
* @returns Configured LedgerJsonApiClient instance
|
|
22
|
-
*/
|
|
23
|
-
function createLedgerJsonApiClient(network, providerType) {
|
|
24
|
-
const envLoader = canton_node_sdk_1.EnvLoader.getInstance();
|
|
25
|
-
const envNetwork = (0, config_1.cantonCredentialsNetwork)(network);
|
|
26
|
-
const sdkProvider = providerType;
|
|
27
|
-
return new canton_node_sdk_1.LedgerJsonApiClient({
|
|
28
|
-
network: envNetwork,
|
|
29
|
-
provider: sdkProvider,
|
|
30
|
-
authUrl: envLoader.getAuthUrl(envNetwork, sdkProvider),
|
|
31
|
-
apis: {
|
|
32
|
-
LEDGER_JSON_API: {
|
|
33
|
-
apiUrl: requireEnv(envLoader.getApiUri('LEDGER_JSON_API', envNetwork, sdkProvider), `CANTON_${envNetwork.toUpperCase()}_${sdkProvider.toUpperCase()}_LEDGER_JSON_API_URI`),
|
|
34
|
-
auth: {
|
|
35
|
-
clientId: envLoader.getApiClientId('LEDGER_JSON_API', envNetwork, sdkProvider) ?? '',
|
|
36
|
-
clientSecret: envLoader.getApiClientSecret('LEDGER_JSON_API', envNetwork, sdkProvider) ?? '',
|
|
37
|
-
grantType: 'client_credentials',
|
|
38
|
-
},
|
|
39
|
-
partyId: envLoader.getPartyId(envNetwork, sdkProvider),
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
logger: new canton_node_sdk_1.FileLogger(),
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Extract the LedgerJsonApiClient from an OcpClient with proper typing This ensures type compatibility when passing the
|
|
47
|
-
* client to other functions
|
|
48
|
-
*
|
|
49
|
-
* @param ocpClient The OcpClient instance
|
|
50
|
-
* @returns The LedgerJsonApiClient instance with proper typing
|
|
51
|
-
*/
|
|
52
13
|
function getLedgerClientFromOcp(ocpClient) {
|
|
53
|
-
// Type assertion to handle potential duplicate type definitions from node_modules
|
|
54
14
|
return ocpClient.client;
|
|
55
15
|
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
*
|
|
59
|
-
* @param network Network type (devnet | mainnet | staging). Staging uses `CANTON_DEVNET_*` credentials.
|
|
60
|
-
* @param providerType Provider type (intellect | 5n | 5n-broker)
|
|
61
|
-
* @returns Configured OcpClient instance
|
|
62
|
-
*/
|
|
63
|
-
function createOcpClient(network, providerType) {
|
|
64
|
-
const envLoader = canton_node_sdk_1.EnvLoader.getInstance();
|
|
65
|
-
const envNetwork = (0, config_1.cantonCredentialsNetwork)(network);
|
|
66
|
-
const sdkProvider = providerType;
|
|
67
|
-
return new canton_1.OcpClient({
|
|
68
|
-
network: envNetwork,
|
|
69
|
-
provider: sdkProvider,
|
|
70
|
-
authUrl: envLoader.getAuthUrl(envNetwork, sdkProvider),
|
|
71
|
-
apis: {
|
|
72
|
-
LEDGER_JSON_API: {
|
|
73
|
-
apiUrl: requireEnv(envLoader.getApiUri('LEDGER_JSON_API', envNetwork, sdkProvider), `CANTON_${envNetwork.toUpperCase()}_${sdkProvider.toUpperCase()}_LEDGER_JSON_API_URI`),
|
|
74
|
-
auth: {
|
|
75
|
-
clientId: envLoader.getApiClientId('LEDGER_JSON_API', envNetwork, sdkProvider) ?? '',
|
|
76
|
-
clientSecret: envLoader.getApiClientSecret('LEDGER_JSON_API', envNetwork, sdkProvider) ?? '',
|
|
77
|
-
grantType: 'client_credentials',
|
|
78
|
-
},
|
|
79
|
-
partyId: envLoader.getPartyId(envNetwork, sdkProvider),
|
|
80
|
-
},
|
|
81
|
-
},
|
|
82
|
-
logger: new canton_node_sdk_1.FileLogger(),
|
|
83
|
-
});
|
|
16
|
+
function createOcpClient(runtime) {
|
|
17
|
+
return runtime.createOcpClient();
|
|
84
18
|
}
|
|
85
19
|
//# sourceMappingURL=sdkHelper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdkHelper.js","sourceRoot":"","sources":["../../../src/clients/json-api/sdkHelper.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sdkHelper.js","sourceRoot":"","sources":["../../../src/clients/json-api/sdkHelper.ts"],"names":[],"mappings":";;;AASA,8DAIC;AAED,wDAIC;AAED,0CAEC;AAnBD,6CAG2B;AAFzB,8GAAA,mBAAmB,OAAA;AACnB,oHAAA,yBAAyB,OAAA;AAG3B,SAAgB,yBAAyB,CACvC,OAA4B;IAE5B,OAAO,OAAO,CAAC,yBAAyB,EAAE,CAAC;AAC7C,CAAC;AAED,SAAgB,sBAAsB,CACpC,SAAoB;IAEpB,OAAO,SAAS,CAAC,MAAM,CAAC;AAC1B,CAAC;AAED,SAAgB,eAAe,CAAC,OAA4B;IAC1D,OAAO,OAAO,CAAC,eAAe,EAAE,CAAC;AACnC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/clients/shared/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/clients/shared/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC"}
|
|
@@ -15,5 +15,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./config"), exports);
|
|
18
|
+
__exportStar(require("./runtime"), exports);
|
|
18
19
|
__exportStar(require("./types"), exports);
|
|
19
20
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/clients/shared/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,0CAAwB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/clients/shared/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,4CAA0B;AAC1B,0CAAwB"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { LedgerJsonApiClient, ValidatorApiClient } from '@fairmint/canton-node-sdk';
|
|
2
|
+
import { OcpClient } from '@open-captable-protocol/canton';
|
|
3
|
+
import { cantonCredentialsNetwork } from './config';
|
|
4
|
+
import { type NetworkType, type ProviderType } from './types';
|
|
5
|
+
type CredentialsNetwork = ReturnType<typeof cantonCredentialsNetwork>;
|
|
6
|
+
export declare class CantonClientRuntime {
|
|
7
|
+
readonly logicalNetwork: NetworkType;
|
|
8
|
+
readonly credentialsNetwork: CredentialsNetwork;
|
|
9
|
+
readonly providerType: ProviderType;
|
|
10
|
+
private readonly envLoader;
|
|
11
|
+
private readonly authUrl;
|
|
12
|
+
private readonly logger;
|
|
13
|
+
private ledgerSourceClient?;
|
|
14
|
+
private validatorSourceClient?;
|
|
15
|
+
private ledgerApiConfig?;
|
|
16
|
+
private validatorApiConfig?;
|
|
17
|
+
constructor(network: NetworkType, providerType: ProviderType);
|
|
18
|
+
private getValidatorProvider;
|
|
19
|
+
private getLedgerApiConfig;
|
|
20
|
+
private getValidatorApiConfig;
|
|
21
|
+
private getLedgerSourceClient;
|
|
22
|
+
private getValidatorSourceClient;
|
|
23
|
+
createLedgerJsonApiClient(): LedgerJsonApiClient;
|
|
24
|
+
createValidatorApiClient(): ValidatorApiClient;
|
|
25
|
+
createOcpClient(): OcpClient;
|
|
26
|
+
}
|
|
27
|
+
export declare function createCantonClientRuntime(network: NetworkType, providerType: ProviderType): CantonClientRuntime;
|
|
28
|
+
export {};
|
|
29
|
+
//# sourceMappingURL=runtime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../../src/clients/shared/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,mBAAmB,EACnB,kBAAkB,EAInB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AAG9D,KAAK,kBAAkB,GAAG,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAC;AA4JtE,qBAAa,mBAAmB;IAC9B,SAAgB,cAAc,EAAE,WAAW,CAAC;IAC5C,SAAgB,kBAAkB,EAAE,kBAAkB,CAAC;IACvD,SAAgB,YAAY,EAAE,YAAY,CAAC;IAE3C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAY;IACtC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAa;IACpC,OAAO,CAAC,kBAAkB,CAAC,CAAsB;IACjD,OAAO,CAAC,qBAAqB,CAAC,CAAqB;IACnD,OAAO,CAAC,eAAe,CAAC,CAAY;IACpC,OAAO,CAAC,kBAAkB,CAAC,CAAY;gBAE3B,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY;IAiB5D,OAAO,CAAC,oBAAoB;IAI5B,OAAO,CAAC,kBAAkB;IAY1B,OAAO,CAAC,qBAAqB;IAc7B,OAAO,CAAC,qBAAqB;IAiB7B,OAAO,CAAC,wBAAwB;IAiBzB,yBAAyB,IAAI,mBAAmB;IAqBhD,wBAAwB,IAAI,kBAAkB;IAsB9C,eAAe,IAAI,SAAS;CAoBpC;AAED,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,WAAW,EACpB,YAAY,EAAE,YAAY,GACzB,mBAAmB,CAErB"}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CantonClientRuntime = void 0;
|
|
4
|
+
exports.createCantonClientRuntime = createCantonClientRuntime;
|
|
5
|
+
const canton_node_sdk_1 = require("@fairmint/canton-node-sdk");
|
|
6
|
+
const canton_1 = require("@open-captable-protocol/canton");
|
|
7
|
+
const config_1 = require("./config");
|
|
8
|
+
function requireEnv(value, envDescription) {
|
|
9
|
+
if (!value || value.trim() === '') {
|
|
10
|
+
throw new Error(`Missing required configuration: ${envDescription}. ` +
|
|
11
|
+
`Check your environment variables.`);
|
|
12
|
+
}
|
|
13
|
+
return value;
|
|
14
|
+
}
|
|
15
|
+
function createDerivedAuthConfig(auth, tokenGenerator) {
|
|
16
|
+
if (auth.clientId.trim() === '' &&
|
|
17
|
+
auth.bearerToken === undefined &&
|
|
18
|
+
auth.tokenGenerator === undefined) {
|
|
19
|
+
return auth;
|
|
20
|
+
}
|
|
21
|
+
return {
|
|
22
|
+
grantType: 'client_credentials',
|
|
23
|
+
clientId: auth.clientId,
|
|
24
|
+
...(auth.audience ? { audience: auth.audience } : {}),
|
|
25
|
+
...(auth.scope ? { scope: auth.scope } : {}),
|
|
26
|
+
tokenGenerator,
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
function createClientConfig(network, providerType, authUrl, apiType, apiConfig, logger) {
|
|
30
|
+
return {
|
|
31
|
+
network,
|
|
32
|
+
provider: providerType,
|
|
33
|
+
authUrl,
|
|
34
|
+
apis: {
|
|
35
|
+
[apiType]: apiConfig,
|
|
36
|
+
},
|
|
37
|
+
logger,
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function createLedgerApiConfig(envLoader, network, providerType) {
|
|
41
|
+
return {
|
|
42
|
+
apiUrl: requireEnv(envLoader.getApiUri('LEDGER_JSON_API', network, providerType), `CANTON_${network.toUpperCase()}_${providerType.toUpperCase()}_LEDGER_JSON_API_URI`),
|
|
43
|
+
auth: {
|
|
44
|
+
grantType: 'client_credentials',
|
|
45
|
+
clientId: envLoader.getApiClientId('LEDGER_JSON_API', network, providerType) ??
|
|
46
|
+
'',
|
|
47
|
+
clientSecret: envLoader.getApiClientSecret('LEDGER_JSON_API', network, providerType) ?? '',
|
|
48
|
+
},
|
|
49
|
+
partyId: envLoader.getPartyId(network, providerType),
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
function createValidatorAuthConfig(envLoader, network, providerType) {
|
|
53
|
+
const clientId = envLoader.getApiClientId('VALIDATOR_API', network, providerType);
|
|
54
|
+
const clientSecret = envLoader.getApiClientSecret('VALIDATOR_API', network, providerType);
|
|
55
|
+
const username = envLoader.getApiUsername('VALIDATOR_API', network, providerType);
|
|
56
|
+
const password = envLoader.getApiPassword('VALIDATOR_API', network, providerType);
|
|
57
|
+
if (!clientId) {
|
|
58
|
+
throw new Error('Missing required environment configuration for ValidatorApiClient');
|
|
59
|
+
}
|
|
60
|
+
const hasClientCredentials = Boolean(clientSecret);
|
|
61
|
+
const hasPasswordGrant = Boolean(username && password);
|
|
62
|
+
if (!hasClientCredentials && !hasPasswordGrant) {
|
|
63
|
+
throw new Error('Must provide either clientId+clientSecret or clientId+username+password');
|
|
64
|
+
}
|
|
65
|
+
if (hasPasswordGrant && !clientSecret && username && password) {
|
|
66
|
+
return {
|
|
67
|
+
grantType: 'password',
|
|
68
|
+
clientId,
|
|
69
|
+
username,
|
|
70
|
+
password,
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
return {
|
|
74
|
+
grantType: 'client_credentials',
|
|
75
|
+
clientId,
|
|
76
|
+
clientSecret,
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
function createValidatorApiConfig(envLoader, network, providerType) {
|
|
80
|
+
const apiUrl = envLoader.getApiUri('VALIDATOR_API', network, providerType);
|
|
81
|
+
if (!apiUrl) {
|
|
82
|
+
throw new Error('Missing required environment configuration for ValidatorApiClient');
|
|
83
|
+
}
|
|
84
|
+
return {
|
|
85
|
+
apiUrl,
|
|
86
|
+
auth: createValidatorAuthConfig(envLoader, network, providerType),
|
|
87
|
+
partyId: envLoader.getPartyId(network, providerType),
|
|
88
|
+
userId: envLoader.getUserId(network, providerType),
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
class CantonClientRuntime {
|
|
92
|
+
constructor(network, providerType) {
|
|
93
|
+
const envLoader = canton_node_sdk_1.EnvLoader.getInstance();
|
|
94
|
+
const credentialsNetwork = (0, config_1.cantonCredentialsNetwork)(network);
|
|
95
|
+
const authUrl = requireEnv(envLoader.getAuthUrl(credentialsNetwork, providerType), `CANTON_${credentialsNetwork.toUpperCase()}_${providerType.toUpperCase()}_AUTH_URL`);
|
|
96
|
+
const logger = new canton_node_sdk_1.FileLogger();
|
|
97
|
+
this.logicalNetwork = network;
|
|
98
|
+
this.credentialsNetwork = credentialsNetwork;
|
|
99
|
+
this.providerType = providerType;
|
|
100
|
+
this.envLoader = envLoader;
|
|
101
|
+
this.authUrl = authUrl;
|
|
102
|
+
this.logger = logger;
|
|
103
|
+
}
|
|
104
|
+
getValidatorProvider() {
|
|
105
|
+
return this.providerType === '5n-broker' ? '5n' : this.providerType;
|
|
106
|
+
}
|
|
107
|
+
getLedgerApiConfig() {
|
|
108
|
+
if (this.ledgerApiConfig === undefined) {
|
|
109
|
+
this.ledgerApiConfig = createLedgerApiConfig(this.envLoader, this.credentialsNetwork, this.providerType);
|
|
110
|
+
}
|
|
111
|
+
return this.ledgerApiConfig;
|
|
112
|
+
}
|
|
113
|
+
getValidatorApiConfig() {
|
|
114
|
+
if (this.validatorApiConfig === undefined) {
|
|
115
|
+
this.validatorApiConfig = createValidatorApiConfig(this.envLoader, this.credentialsNetwork, this.getValidatorProvider());
|
|
116
|
+
}
|
|
117
|
+
return this.validatorApiConfig;
|
|
118
|
+
}
|
|
119
|
+
// Initialize source clients lazily so runtime creation stays valid for
|
|
120
|
+
// ledger-only or validator-only consumers.
|
|
121
|
+
getLedgerSourceClient() {
|
|
122
|
+
if (this.ledgerSourceClient === undefined) {
|
|
123
|
+
this.ledgerSourceClient = new canton_node_sdk_1.LedgerJsonApiClient(createClientConfig(this.credentialsNetwork, this.providerType, this.authUrl, 'LEDGER_JSON_API', this.getLedgerApiConfig(), this.logger));
|
|
124
|
+
}
|
|
125
|
+
return this.ledgerSourceClient;
|
|
126
|
+
}
|
|
127
|
+
getValidatorSourceClient() {
|
|
128
|
+
if (this.validatorSourceClient === undefined) {
|
|
129
|
+
this.validatorSourceClient = new canton_node_sdk_1.ValidatorApiClient(createClientConfig(this.credentialsNetwork, this.getValidatorProvider(), this.authUrl, 'VALIDATOR_API', this.getValidatorApiConfig(), this.logger));
|
|
130
|
+
}
|
|
131
|
+
return this.validatorSourceClient;
|
|
132
|
+
}
|
|
133
|
+
createLedgerJsonApiClient() {
|
|
134
|
+
const ledgerApiConfig = this.getLedgerApiConfig();
|
|
135
|
+
const ledgerSourceClient = this.getLedgerSourceClient();
|
|
136
|
+
return new canton_node_sdk_1.LedgerJsonApiClient(createClientConfig(this.credentialsNetwork, this.providerType, this.authUrl, 'LEDGER_JSON_API', {
|
|
137
|
+
...ledgerApiConfig,
|
|
138
|
+
auth: createDerivedAuthConfig(ledgerApiConfig.auth, async () => ledgerSourceClient.authenticate()),
|
|
139
|
+
}, this.logger));
|
|
140
|
+
}
|
|
141
|
+
createValidatorApiClient() {
|
|
142
|
+
const validatorProvider = this.getValidatorProvider();
|
|
143
|
+
const validatorApiConfig = this.getValidatorApiConfig();
|
|
144
|
+
const validatorSourceClient = this.getValidatorSourceClient();
|
|
145
|
+
return new canton_node_sdk_1.ValidatorApiClient(createClientConfig(this.credentialsNetwork, validatorProvider, this.authUrl, 'VALIDATOR_API', {
|
|
146
|
+
...validatorApiConfig,
|
|
147
|
+
auth: createDerivedAuthConfig(validatorApiConfig.auth, async () => validatorSourceClient.authenticate()),
|
|
148
|
+
}, this.logger));
|
|
149
|
+
}
|
|
150
|
+
createOcpClient() {
|
|
151
|
+
const ledgerApiConfig = this.getLedgerApiConfig();
|
|
152
|
+
const ledgerSourceClient = this.getLedgerSourceClient();
|
|
153
|
+
return new canton_1.OcpClient(createClientConfig(this.credentialsNetwork, this.providerType, this.authUrl, 'LEDGER_JSON_API', {
|
|
154
|
+
...ledgerApiConfig,
|
|
155
|
+
auth: createDerivedAuthConfig(ledgerApiConfig.auth, async () => ledgerSourceClient.authenticate()),
|
|
156
|
+
}, this.logger));
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
exports.CantonClientRuntime = CantonClientRuntime;
|
|
160
|
+
function createCantonClientRuntime(network, providerType) {
|
|
161
|
+
return new CantonClientRuntime(network, providerType);
|
|
162
|
+
}
|
|
163
|
+
//# sourceMappingURL=runtime.js.map
|
|
@@ -0,0 +1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CAAC,OAAO,EACZ,eAAe,EACf;YACE,GAAG,kBAAkB;YACrB,IAAI,EAAE,uBAAuB,CAAC,kBAAkB,CAAC,IAAI,EAAE,KAAK,IAAI,EAAE,CAChE,qBAAqB,CAAC,YAAY,EAAE,CACrC;SACF,EACD,IAAI,CAAC,MAAM,CACZ,CACF,CAAC;IACJ,CAAC;IAEM,eAAe;QACpB,MAAM,eAAe,GAAG,IAAI,CAAC,kBAAkB,EAAE,CAAC;QAClD,MAAM,kBAAkB,GAAG,IAAI,CAAC,qBAAqB,EAAE,CAAC;QAExD,OAAO,IAAI,kBAAS,CAClB,kBAAkB,CAChB,IAAI,CAAC,kBAAkB,EACvB,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,OAAO,EACZ,iBAAiB,EACjB;YACE,GAAG,eAAe;YAClB,IAAI,EAAE,uBAAuB,CAAC,eAAe,CAAC,IAAI,EAAE,KAAK,IAAI,EAAE,CAC7D,kBAAkB,CAAC,YAAY,EAAE,CAClC;SACF,EACD,IAAI,CAAC,MAAM,CACZ,CACF,CAAC;IACJ,CAAC;CACF;AA7JD,kDA6JC;AAED,SAAgB,yBAAyB,CACvC,OAAoB,EACpB,YAA0B;IAE1B,OAAO,IAAI,mBAAmB,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;AACxD,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from '../shared/config';
|
|
2
2
|
import { ValidatorApiClient } from '@fairmint/canton-node-sdk';
|
|
3
|
-
import {
|
|
4
|
-
export
|
|
3
|
+
import { CantonClientRuntime } from '../shared/runtime';
|
|
4
|
+
export { CantonClientRuntime, createCantonClientRuntime, } from '../shared/runtime';
|
|
5
|
+
export declare function createValidatorApiClient(runtime: CantonClientRuntime): ValidatorApiClient;
|
|
5
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/clients/validator-api/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AAEjC,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/clients/validator-api/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AAEjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAExD,OAAO,EACL,mBAAmB,EACnB,yBAAyB,GAC1B,MAAM,mBAAmB,CAAC;AAE3B,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,mBAAmB,GAC3B,kBAAkB,CAEpB"}
|
|
@@ -14,61 +14,13 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.createCantonClientRuntime = exports.CantonClientRuntime = void 0;
|
|
17
18
|
exports.createValidatorApiClient = createValidatorApiClient;
|
|
18
19
|
__exportStar(require("../shared/config"), exports);
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
function
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
const apiUrl = envLoader.getApiUri('VALIDATOR_API', envNetwork, providerType);
|
|
25
|
-
const clientId = envLoader.getApiClientId('VALIDATOR_API', envNetwork, providerType);
|
|
26
|
-
const clientSecret = envLoader.getApiClientSecret('VALIDATOR_API', envNetwork, providerType);
|
|
27
|
-
const authUrl = envLoader.getAuthUrl(envNetwork, providerType);
|
|
28
|
-
const partyId = envLoader.getPartyId(envNetwork, providerType);
|
|
29
|
-
const userId = envLoader.getUserId(envNetwork, providerType);
|
|
30
|
-
const username = envLoader.getApiUsername('VALIDATOR_API', envNetwork, providerType);
|
|
31
|
-
const password = envLoader.getApiPassword('VALIDATOR_API', envNetwork, providerType);
|
|
32
|
-
if (!apiUrl || !authUrl || !clientId) {
|
|
33
|
-
throw new Error('Missing required environment configuration for ValidatorApiClient');
|
|
34
|
-
}
|
|
35
|
-
// Validate authentication method
|
|
36
|
-
const hasClientCredentials = clientId && clientSecret;
|
|
37
|
-
const hasPasswordGrant = username && password && clientId;
|
|
38
|
-
if (!hasClientCredentials && !hasPasswordGrant) {
|
|
39
|
-
throw new Error('Must provide either clientId+clientSecret or clientId+username+password');
|
|
40
|
-
}
|
|
41
|
-
// Build auth config based on grant type (discriminated union)
|
|
42
|
-
let auth;
|
|
43
|
-
if (hasPasswordGrant && !clientSecret) {
|
|
44
|
-
auth = {
|
|
45
|
-
grantType: 'password',
|
|
46
|
-
clientId,
|
|
47
|
-
username,
|
|
48
|
-
password,
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
else {
|
|
52
|
-
auth = {
|
|
53
|
-
grantType: 'client_credentials',
|
|
54
|
-
clientId,
|
|
55
|
-
clientSecret,
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
const clientConfig = {
|
|
59
|
-
network: envNetwork,
|
|
60
|
-
provider: providerType,
|
|
61
|
-
authUrl,
|
|
62
|
-
apis: {
|
|
63
|
-
VALIDATOR_API: {
|
|
64
|
-
apiUrl,
|
|
65
|
-
auth,
|
|
66
|
-
partyId,
|
|
67
|
-
userId,
|
|
68
|
-
},
|
|
69
|
-
},
|
|
70
|
-
logger: new canton_node_sdk_1.FileLogger(),
|
|
71
|
-
};
|
|
72
|
-
return new canton_node_sdk_1.ValidatorApiClient(clientConfig);
|
|
20
|
+
var runtime_1 = require("../shared/runtime");
|
|
21
|
+
Object.defineProperty(exports, "CantonClientRuntime", { enumerable: true, get: function () { return runtime_1.CantonClientRuntime; } });
|
|
22
|
+
Object.defineProperty(exports, "createCantonClientRuntime", { enumerable: true, get: function () { return runtime_1.createCantonClientRuntime; } });
|
|
23
|
+
function createValidatorApiClient(runtime) {
|
|
24
|
+
return runtime.createValidatorApiClient();
|
|
73
25
|
}
|
|
74
26
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/clients/validator-api/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/clients/validator-api/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAUA,4DAIC;AAdD,mDAAiC;AAKjC,6CAG2B;AAFzB,8GAAA,mBAAmB,OAAA;AACnB,oHAAA,yBAAyB,OAAA;AAG3B,SAAgB,wBAAwB,CACtC,OAA4B;IAE5B,OAAO,OAAO,CAAC,wBAAwB,EAAE,CAAC;AAC5C,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fairmint/canton-fairmint-sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.56",
|
|
4
4
|
"description": "Shared SDK utilities for Canton blockchain integration",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@eslint/eslintrc": "3.3.3",
|
|
59
|
-
"@fairmint/canton-node-sdk": "0.0.
|
|
59
|
+
"@fairmint/canton-node-sdk": "0.0.195",
|
|
60
60
|
"@fairmint/open-captable-protocol-daml-js": "0.2.137",
|
|
61
61
|
"@open-captable-protocol/canton": "0.2.259",
|
|
62
62
|
"@types/jest": "30.0.0",
|