@fairmint/canton-node-sdk 0.0.56 → 0.0.58
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/build/src/clients/index.d.ts +1 -0
- package/build/src/clients/index.d.ts.map +1 -1
- package/build/src/clients/index.js +1 -0
- package/build/src/clients/index.js.map +1 -1
- package/build/src/clients/lighthouse-api/LighthouseApiClient.d.ts +9 -0
- package/build/src/clients/lighthouse-api/LighthouseApiClient.d.ts.map +1 -0
- package/build/src/clients/lighthouse-api/LighthouseApiClient.js +15 -0
- package/build/src/clients/lighthouse-api/LighthouseApiClient.js.map +1 -0
- package/build/src/clients/lighthouse-api/index.d.ts +3 -0
- package/build/src/clients/lighthouse-api/index.d.ts.map +1 -0
- package/build/src/clients/lighthouse-api/index.js +21 -0
- package/build/src/clients/lighthouse-api/index.js.map +1 -0
- package/build/src/clients/lighthouse-api/operations/get-transfer-agent.d.ts +64 -0
- package/build/src/clients/lighthouse-api/operations/get-transfer-agent.d.ts.map +1 -0
- package/build/src/clients/lighthouse-api/operations/get-transfer-agent.js +26 -0
- package/build/src/clients/lighthouse-api/operations/get-transfer-agent.js.map +1 -0
- package/build/src/clients/lighthouse-api/types.d.ts +74 -0
- package/build/src/clients/lighthouse-api/types.d.ts.map +1 -0
- package/build/src/clients/lighthouse-api/types.js +49 -0
- package/build/src/clients/lighthouse-api/types.js.map +1 -0
- package/build/src/clients/register.d.ts.map +1 -1
- package/build/src/clients/register.js +3 -0
- package/build/src/clients/register.js.map +1 -1
- package/build/src/clients/validator-api/ValidatorApiClient.d.ts +3 -2
- package/build/src/clients/validator-api/ValidatorApiClient.d.ts.map +1 -1
- package/build/src/clients/validator-api/ValidatorApiClient.js +2 -0
- package/build/src/clients/validator-api/ValidatorApiClient.js.map +1 -1
- package/build/src/clients/validator-api/operations/v0/scan-proxy/get-member-traffic-status.d.ts +16 -21
- package/build/src/clients/validator-api/operations/v0/scan-proxy/get-member-traffic-status.d.ts.map +1 -1
- package/build/src/clients/validator-api/operations/v0/scan-proxy/get-member-traffic-status.js +23 -10
- package/build/src/clients/validator-api/operations/v0/scan-proxy/get-member-traffic-status.js.map +1 -1
- package/build/src/clients/validator-api/operations/v0/wallet/buy-traffic-requests/create.d.ts +1 -9
- package/build/src/clients/validator-api/operations/v0/wallet/buy-traffic-requests/create.d.ts.map +1 -1
- package/build/src/clients/validator-api/operations/v0/wallet/buy-traffic-requests/create.js +24 -6
- package/build/src/clients/validator-api/operations/v0/wallet/buy-traffic-requests/create.js.map +1 -1
- package/build/src/clients/validator-api/schemas/operations/scan-proxy.d.ts +2 -2
- package/build/src/clients/validator-api/schemas/operations/scan-proxy.js +2 -2
- package/build/src/clients/validator-api/schemas/operations/scan-proxy.js.map +1 -1
- package/build/src/clients/validator-api/schemas/operations/wallet.d.ts +0 -4
- package/build/src/clients/validator-api/schemas/operations/wallet.d.ts.map +1 -1
- package/build/src/clients/validator-api/schemas/operations/wallet.js +3 -1
- package/build/src/clients/validator-api/schemas/operations/wallet.js.map +1 -1
- package/build/src/core/BaseClient.d.ts +26 -2
- package/build/src/core/BaseClient.d.ts.map +1 -1
- package/build/src/core/BaseClient.js +54 -2
- package/build/src/core/BaseClient.js.map +1 -1
- package/build/src/core/ClientFactory.d.ts +3 -3
- package/build/src/core/ClientFactory.d.ts.map +1 -1
- package/build/src/core/ClientFactory.js.map +1 -1
- package/build/src/core/config/EnvLoader.d.ts.map +1 -1
- package/build/src/core/config/EnvLoader.js +52 -10
- package/build/src/core/config/EnvLoader.js.map +1 -1
- package/build/src/core/operations/ApiOperation.d.ts +22 -1
- package/build/src/core/operations/ApiOperation.d.ts.map +1 -1
- package/build/src/core/operations/ApiOperation.js +37 -1
- package/build/src/core/operations/ApiOperation.js.map +1 -1
- package/build/src/core/operations/ApiOperationFactory.d.ts +29 -1
- package/build/src/core/operations/ApiOperationFactory.d.ts.map +1 -1
- package/build/src/core/operations/ApiOperationFactory.js +34 -0
- package/build/src/core/operations/ApiOperationFactory.js.map +1 -1
- package/build/src/core/types.d.ts +6 -2
- package/build/src/core/types.d.ts.map +1 -1
- package/build/src/utils/amulet/index.d.ts +0 -1
- package/build/src/utils/amulet/index.d.ts.map +1 -1
- package/build/src/utils/amulet/index.js +0 -1
- package/build/src/utils/amulet/index.js.map +1 -1
- package/build/src/utils/amulet/pre-approve-transfers.js +2 -2
- package/build/src/utils/amulet/pre-approve-transfers.js.map +1 -1
- package/build/src/utils/amulet/transfer-to-preapproved.js +2 -2
- package/build/src/utils/amulet/transfer-to-preapproved.js.map +1 -1
- package/build/src/utils/contracts/contract-monitor.d.ts +23 -0
- package/build/src/utils/contracts/contract-monitor.d.ts.map +1 -0
- package/build/src/utils/contracts/contract-monitor.js +54 -0
- package/build/src/utils/contracts/contract-monitor.js.map +1 -0
- package/build/src/utils/contracts/disclosed-contracts.d.ts.map +1 -0
- package/build/src/utils/contracts/disclosed-contracts.js.map +1 -0
- package/build/src/utils/contracts/index.d.ts +3 -0
- package/build/src/utils/contracts/index.d.ts.map +1 -0
- package/build/src/utils/contracts/index.js +19 -0
- package/build/src/utils/contracts/index.js.map +1 -0
- package/build/src/utils/index.d.ts +2 -0
- package/build/src/utils/index.d.ts.map +1 -1
- package/build/src/utils/index.js +2 -0
- package/build/src/utils/index.js.map +1 -1
- package/build/src/utils/mining/index.d.ts +2 -0
- package/build/src/utils/mining/index.d.ts.map +1 -0
- package/build/src/utils/mining/index.js +18 -0
- package/build/src/utils/mining/index.js.map +1 -0
- package/build/src/utils/{amulet → mining}/mining-rounds.d.ts +10 -1
- package/build/src/utils/{amulet → mining}/mining-rounds.d.ts.map +1 -1
- package/build/src/utils/{amulet → mining}/mining-rounds.js +13 -0
- package/build/src/utils/mining/mining-rounds.js.map +1 -0
- package/package.json +1 -1
- package/build/src/utils/amulet/disclosed-contracts.d.ts.map +0 -1
- package/build/src/utils/amulet/disclosed-contracts.js.map +0 -1
- package/build/src/utils/amulet/mining-rounds.js.map +0 -1
- /package/build/src/utils/{amulet → contracts}/disclosed-contracts.d.ts +0 -0
- /package/build/src/utils/{amulet → contracts}/disclosed-contracts.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/clients/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/clients/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC"}
|
|
@@ -16,5 +16,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./ledger-json-api"), exports);
|
|
18
18
|
__exportStar(require("./validator-api"), exports);
|
|
19
|
+
__exportStar(require("./lighthouse-api"), exports);
|
|
19
20
|
__exportStar(require("./register"), exports);
|
|
20
21
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/clients/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,kDAAgC;AAChC,6CAA2B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/clients/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,kDAAgC;AAChC,mDAAiC;AACjC,6CAA2B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SimpleBaseClient, ClientConfig } from '../../core';
|
|
2
|
+
import type { GetTransferAgentParams } from './operations/get-transfer-agent';
|
|
3
|
+
import type { GetTransferAgentResponse } from './types';
|
|
4
|
+
/** Client for interacting with Lighthouse API */
|
|
5
|
+
export declare class LighthouseApiClient extends SimpleBaseClient {
|
|
6
|
+
getTransferAgent: (params: GetTransferAgentParams) => Promise<GetTransferAgentResponse>;
|
|
7
|
+
constructor(clientConfig: ClientConfig);
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=LighthouseApiClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LighthouseApiClient.d.ts","sourceRoot":"","sources":["../../../../src/clients/lighthouse-api/LighthouseApiClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAI5D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAExD,iDAAiD;AACjD,qBAAa,mBAAoB,SAAQ,gBAAgB;IAEhD,gBAAgB,EAAG,CAAC,MAAM,EAAE,sBAAsB,KAAK,OAAO,CAAC,wBAAwB,CAAC,CAAC;gBAEpF,YAAY,EAAE,YAAY;CAMvC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LighthouseApiClient = void 0;
|
|
4
|
+
const core_1 = require("../../core");
|
|
5
|
+
const get_transfer_agent_1 = require("./operations/get-transfer-agent");
|
|
6
|
+
/** Client for interacting with Lighthouse API */
|
|
7
|
+
class LighthouseApiClient extends core_1.SimpleBaseClient {
|
|
8
|
+
constructor(clientConfig) {
|
|
9
|
+
super('LIGHTHOUSE_API', clientConfig);
|
|
10
|
+
// Initialize operations
|
|
11
|
+
this.getTransferAgent = new get_transfer_agent_1.GetTransferAgent(this).execute.bind(new get_transfer_agent_1.GetTransferAgent(this));
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.LighthouseApiClient = LighthouseApiClient;
|
|
15
|
+
//# sourceMappingURL=LighthouseApiClient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LighthouseApiClient.js","sourceRoot":"","sources":["../../../../src/clients/lighthouse-api/LighthouseApiClient.ts"],"names":[],"mappings":";;;AAAA,qCAA4D;AAC5D,wEAAmE;AAMnE,iDAAiD;AACjD,MAAa,mBAAoB,SAAQ,uBAAgB;IAIvD,YAAY,YAA0B;QACpC,KAAK,CAAC,gBAAgB,EAAE,YAAY,CAAC,CAAC;QAEtC,wBAAwB;QACxB,IAAI,CAAC,gBAAgB,GAAG,IAAI,qCAAgB,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,qCAAgB,CAAC,IAAI,CAAC,CAAC,CAAC;IAC9F,CAAC;CACF;AAVD,kDAUC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/clients/lighthouse-api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,cAAc,SAAS,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
|
+
exports.LighthouseApiClient = void 0;
|
|
18
|
+
var LighthouseApiClient_1 = require("./LighthouseApiClient");
|
|
19
|
+
Object.defineProperty(exports, "LighthouseApiClient", { enumerable: true, get: function () { return LighthouseApiClient_1.LighthouseApiClient; } });
|
|
20
|
+
__exportStar(require("./types"), exports);
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/clients/lighthouse-api/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,6DAA4D;AAAnD,0HAAA,mBAAmB,OAAA;AAC5B,0CAAwB"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const GetTransferAgentParamsSchema: z.ZodObject<{
|
|
3
|
+
partyId: z.ZodString;
|
|
4
|
+
}, z.core.$strip>;
|
|
5
|
+
export type GetTransferAgentParams = z.infer<typeof GetTransferAgentParamsSchema>;
|
|
6
|
+
/**
|
|
7
|
+
* @description Get transfer agent information from Lighthouse
|
|
8
|
+
* @example
|
|
9
|
+
* ```typescript
|
|
10
|
+
* const transferAgent = await client.getTransferAgent({ partyId: 'TransferAgent-mainnet-1::12204a039322c01e9f714b56259c3e68b69058bf5dfe1debbe956c698f905ceba9d7' });
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
13
|
+
export declare const GetTransferAgent: {
|
|
14
|
+
new (client: import("../../../core/BaseClient").SimpleBaseClient): {
|
|
15
|
+
execute(params: {
|
|
16
|
+
partyId: string;
|
|
17
|
+
}): Promise<{
|
|
18
|
+
balance: {
|
|
19
|
+
currency: string;
|
|
20
|
+
total_cc: number;
|
|
21
|
+
};
|
|
22
|
+
traffic_status: {
|
|
23
|
+
total_consumed: number;
|
|
24
|
+
total_limit: number;
|
|
25
|
+
total_purchased: number;
|
|
26
|
+
usage_percent: number;
|
|
27
|
+
last_updated: string;
|
|
28
|
+
};
|
|
29
|
+
validator: {
|
|
30
|
+
id: string;
|
|
31
|
+
sponsor: string;
|
|
32
|
+
dso: string;
|
|
33
|
+
last_active_at: string;
|
|
34
|
+
first_round: number;
|
|
35
|
+
last_round: number;
|
|
36
|
+
miss_round: number;
|
|
37
|
+
version: string;
|
|
38
|
+
contact: string;
|
|
39
|
+
metadata_last_update: string;
|
|
40
|
+
created_at: string;
|
|
41
|
+
template_id: string;
|
|
42
|
+
contract_id: string;
|
|
43
|
+
updated_at: string;
|
|
44
|
+
};
|
|
45
|
+
}>;
|
|
46
|
+
client: import("../../../core/BaseClient").SimpleBaseClient;
|
|
47
|
+
validateParams<T>(params: T, schema: z.ZodSchema<T>): T;
|
|
48
|
+
makeGetRequest<T>(url: string, config?: {
|
|
49
|
+
contentType?: string;
|
|
50
|
+
}): Promise<T>;
|
|
51
|
+
makePostRequest<T>(url: string, data: unknown, config?: {
|
|
52
|
+
contentType?: string;
|
|
53
|
+
}): Promise<T>;
|
|
54
|
+
makeDeleteRequest<T>(url: string, config?: {
|
|
55
|
+
contentType?: string;
|
|
56
|
+
}): Promise<T>;
|
|
57
|
+
makePatchRequest<T>(url: string, data: unknown, config?: {
|
|
58
|
+
contentType?: string;
|
|
59
|
+
}): Promise<T>;
|
|
60
|
+
getPartyId(): string;
|
|
61
|
+
getApiUrl(): string;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
//# sourceMappingURL=get-transfer-agent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-transfer-agent.d.ts","sourceRoot":"","sources":["../../../../../src/clients/lighthouse-api/operations/get-transfer-agent.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,4BAA4B;;iBAEvC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAYgiD,CAAC;;;uBAA8L,CAAC;;;uBAAoL,CAAC;;;uBAAkM,CAAC;;;;;CAAnnE,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetTransferAgent = exports.GetTransferAgentParamsSchema = void 0;
|
|
4
|
+
const core_1 = require("../../../../src/core");
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
// Define the parameters schema
|
|
7
|
+
exports.GetTransferAgentParamsSchema = zod_1.z.object({
|
|
8
|
+
partyId: zod_1.z.string(),
|
|
9
|
+
});
|
|
10
|
+
/**
|
|
11
|
+
* @description Get transfer agent information from Lighthouse
|
|
12
|
+
* @example
|
|
13
|
+
* ```typescript
|
|
14
|
+
* const transferAgent = await client.getTransferAgent({ partyId: 'TransferAgent-mainnet-1::12204a039322c01e9f714b56259c3e68b69058bf5dfe1debbe956c698f905ceba9d7' });
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
exports.GetTransferAgent = (0, core_1.createSimpleApiOperation)({
|
|
18
|
+
paramsSchema: exports.GetTransferAgentParamsSchema,
|
|
19
|
+
method: 'GET',
|
|
20
|
+
buildUrl: (params, apiUrl) => {
|
|
21
|
+
const url = `${apiUrl}/validators/${encodeURIComponent(params.partyId)}`;
|
|
22
|
+
console.log('GetTransferAgent url: ', url);
|
|
23
|
+
return url;
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
//# sourceMappingURL=get-transfer-agent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-transfer-agent.js","sourceRoot":"","sources":["../../../../../src/clients/lighthouse-api/operations/get-transfer-agent.ts"],"names":[],"mappings":";;;AAAA,+CAAgE;AAChE,6BAAwB;AAGxB,+BAA+B;AAClB,QAAA,4BAA4B,GAAG,OAAC,CAAC,MAAM,CAAC;IACnD,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE;CACpB,CAAC,CAAC;AAIH;;;;;;GAMG;AACU,QAAA,gBAAgB,GAAG,IAAA,+BAAwB,EAGtD;IACA,YAAY,EAAE,oCAA4B;IAC1C,MAAM,EAAE,KAAK;IACb,QAAQ,EAAE,CAAC,MAA8B,EAAE,MAAc,EAAE,EAAE;QAE3D,MAAM,GAAG,GAAG,GAAG,MAAM,eAAe,kBAAkB,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC;QACzE,OAAO,CAAC,GAAG,CAAC,wBAAwB,EAAE,GAAG,CAAC,CAAC;QAC3C,OAAO,GAAG,CAAC;IACb,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Balance information for the transfer agent
|
|
4
|
+
*/
|
|
5
|
+
export declare const BalanceSchema: z.ZodObject<{
|
|
6
|
+
currency: z.ZodString;
|
|
7
|
+
total_cc: z.ZodNumber;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
export type Balance = z.infer<typeof BalanceSchema>;
|
|
10
|
+
/**
|
|
11
|
+
* Traffic status information for the transfer agent
|
|
12
|
+
*/
|
|
13
|
+
export declare const TrafficStatusSchema: z.ZodObject<{
|
|
14
|
+
total_consumed: z.ZodNumber;
|
|
15
|
+
total_limit: z.ZodNumber;
|
|
16
|
+
total_purchased: z.ZodNumber;
|
|
17
|
+
usage_percent: z.ZodNumber;
|
|
18
|
+
last_updated: z.ZodString;
|
|
19
|
+
}, z.core.$strip>;
|
|
20
|
+
export type TrafficStatus = z.infer<typeof TrafficStatusSchema>;
|
|
21
|
+
/**
|
|
22
|
+
* Validator information for the transfer agent
|
|
23
|
+
*/
|
|
24
|
+
export declare const ValidatorSchema: z.ZodObject<{
|
|
25
|
+
id: z.ZodString;
|
|
26
|
+
sponsor: z.ZodString;
|
|
27
|
+
dso: z.ZodString;
|
|
28
|
+
last_active_at: z.ZodString;
|
|
29
|
+
first_round: z.ZodNumber;
|
|
30
|
+
last_round: z.ZodNumber;
|
|
31
|
+
miss_round: z.ZodNumber;
|
|
32
|
+
version: z.ZodString;
|
|
33
|
+
contact: z.ZodString;
|
|
34
|
+
metadata_last_update: z.ZodString;
|
|
35
|
+
created_at: z.ZodString;
|
|
36
|
+
template_id: z.ZodString;
|
|
37
|
+
contract_id: z.ZodString;
|
|
38
|
+
updated_at: z.ZodString;
|
|
39
|
+
}, z.core.$strip>;
|
|
40
|
+
export type Validator = z.infer<typeof ValidatorSchema>;
|
|
41
|
+
/**
|
|
42
|
+
* Complete response from the Lighthouse API getTransferAgent endpoint
|
|
43
|
+
*/
|
|
44
|
+
export declare const GetTransferAgentResponseSchema: z.ZodObject<{
|
|
45
|
+
balance: z.ZodObject<{
|
|
46
|
+
currency: z.ZodString;
|
|
47
|
+
total_cc: z.ZodNumber;
|
|
48
|
+
}, z.core.$strip>;
|
|
49
|
+
traffic_status: z.ZodObject<{
|
|
50
|
+
total_consumed: z.ZodNumber;
|
|
51
|
+
total_limit: z.ZodNumber;
|
|
52
|
+
total_purchased: z.ZodNumber;
|
|
53
|
+
usage_percent: z.ZodNumber;
|
|
54
|
+
last_updated: z.ZodString;
|
|
55
|
+
}, z.core.$strip>;
|
|
56
|
+
validator: z.ZodObject<{
|
|
57
|
+
id: z.ZodString;
|
|
58
|
+
sponsor: z.ZodString;
|
|
59
|
+
dso: z.ZodString;
|
|
60
|
+
last_active_at: z.ZodString;
|
|
61
|
+
first_round: z.ZodNumber;
|
|
62
|
+
last_round: z.ZodNumber;
|
|
63
|
+
miss_round: z.ZodNumber;
|
|
64
|
+
version: z.ZodString;
|
|
65
|
+
contact: z.ZodString;
|
|
66
|
+
metadata_last_update: z.ZodString;
|
|
67
|
+
created_at: z.ZodString;
|
|
68
|
+
template_id: z.ZodString;
|
|
69
|
+
contract_id: z.ZodString;
|
|
70
|
+
updated_at: z.ZodString;
|
|
71
|
+
}, z.core.$strip>;
|
|
72
|
+
}, z.core.$strip>;
|
|
73
|
+
export type GetTransferAgentResponse = z.infer<typeof GetTransferAgentResponseSchema>;
|
|
74
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/clients/lighthouse-api/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,eAAO,MAAM,aAAa;;;iBAGxB,CAAC;AAEH,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAEpD;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;iBAM9B,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE;;GAEG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;iBAe1B,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAExD;;GAEG;AACH,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAIzC,CAAC;AAEH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetTransferAgentResponseSchema = exports.ValidatorSchema = exports.TrafficStatusSchema = exports.BalanceSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
/**
|
|
6
|
+
* Balance information for the transfer agent
|
|
7
|
+
*/
|
|
8
|
+
exports.BalanceSchema = zod_1.z.object({
|
|
9
|
+
currency: zod_1.z.string(),
|
|
10
|
+
total_cc: zod_1.z.number(),
|
|
11
|
+
});
|
|
12
|
+
/**
|
|
13
|
+
* Traffic status information for the transfer agent
|
|
14
|
+
*/
|
|
15
|
+
exports.TrafficStatusSchema = zod_1.z.object({
|
|
16
|
+
total_consumed: zod_1.z.number(),
|
|
17
|
+
total_limit: zod_1.z.number(),
|
|
18
|
+
total_purchased: zod_1.z.number(),
|
|
19
|
+
usage_percent: zod_1.z.number(),
|
|
20
|
+
last_updated: zod_1.z.string(), // ISO 8601 datetime string
|
|
21
|
+
});
|
|
22
|
+
/**
|
|
23
|
+
* Validator information for the transfer agent
|
|
24
|
+
*/
|
|
25
|
+
exports.ValidatorSchema = zod_1.z.object({
|
|
26
|
+
id: zod_1.z.string(),
|
|
27
|
+
sponsor: zod_1.z.string(),
|
|
28
|
+
dso: zod_1.z.string(),
|
|
29
|
+
last_active_at: zod_1.z.string(), // ISO 8601 datetime string
|
|
30
|
+
first_round: zod_1.z.number(),
|
|
31
|
+
last_round: zod_1.z.number(),
|
|
32
|
+
miss_round: zod_1.z.number(),
|
|
33
|
+
version: zod_1.z.string(),
|
|
34
|
+
contact: zod_1.z.string(),
|
|
35
|
+
metadata_last_update: zod_1.z.string(), // ISO 8601 datetime string
|
|
36
|
+
created_at: zod_1.z.string(), // ISO 8601 datetime string
|
|
37
|
+
template_id: zod_1.z.string(),
|
|
38
|
+
contract_id: zod_1.z.string(),
|
|
39
|
+
updated_at: zod_1.z.string(), // ISO 8601 datetime string
|
|
40
|
+
});
|
|
41
|
+
/**
|
|
42
|
+
* Complete response from the Lighthouse API getTransferAgent endpoint
|
|
43
|
+
*/
|
|
44
|
+
exports.GetTransferAgentResponseSchema = zod_1.z.object({
|
|
45
|
+
balance: exports.BalanceSchema,
|
|
46
|
+
traffic_status: exports.TrafficStatusSchema,
|
|
47
|
+
validator: exports.ValidatorSchema,
|
|
48
|
+
});
|
|
49
|
+
//# sourceMappingURL=types.js.map
|
|
@@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MAAM,EAAE;IACvB,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,EAAE,2BAA2B;CACpD,CAAC,CAAC;AAIH;;GAEG;AACU,QAAA,8BAA8B,GAAG,OAAC,CAAC,MAAM,CAAC;IACrD,OAAO,EAAE,qBAAa;IACtB,cAAc,EAAE,2BAAmB;IACnC,SAAS,EAAE,uBAAe;CAC3B,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../src/clients/register.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../src/clients/register.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAetD,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -9,4 +9,7 @@ ClientFactory_1.ClientFactory.registerClient('LEDGER_JSON_API', LedgerJsonApiCli
|
|
|
9
9
|
// Register the Validator API client
|
|
10
10
|
const ValidatorApiClient_1 = require("./validator-api/ValidatorApiClient");
|
|
11
11
|
ClientFactory_1.ClientFactory.registerClient('VALIDATOR_API', ValidatorApiClient_1.ValidatorApiClient);
|
|
12
|
+
// Register the Lighthouse API client
|
|
13
|
+
const LighthouseApiClient_1 = require("./lighthouse-api/LighthouseApiClient");
|
|
14
|
+
ClientFactory_1.ClientFactory.registerClient('LIGHTHOUSE_API', LighthouseApiClient_1.LighthouseApiClient);
|
|
12
15
|
//# sourceMappingURL=register.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register.js","sourceRoot":"","sources":["../../../src/clients/register.ts"],"names":[],"mappings":";;;AAAA,yDAAsD;
|
|
1
|
+
{"version":3,"file":"register.js","sourceRoot":"","sources":["../../../src/clients/register.ts"],"names":[],"mappings":";;;AAAA,yDAAsD;AAe7C,8FAfA,6BAAa,OAeA;AAbtB,sCAAsC;AACtC,+EAA4E;AAC5E,6BAAa,CAAC,cAAc,CAAC,iBAAiB,EAAE,yCAAmB,CAAC,CAAC;AAErE,oCAAoC;AACpC,2EAAwE;AACxE,6BAAa,CAAC,cAAc,CAAC,eAAe,EAAE,uCAAkB,CAAC,CAAC;AAElE,qCAAqC;AACrC,8EAA2E;AAC3E,6BAAa,CAAC,cAAc,CAAC,gBAAgB,EAAE,yCAAmB,CAAC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LookupFeaturedAppRightResponse } from './operations/v0/scan-proxy/lookup-featured-app-right';
|
|
2
2
|
import { BaseClient, ClientConfig } from '../../core';
|
|
3
|
-
import { AcceptTransferOfferParams, CreateBuyTrafficRequestParams, CreateTransferOfferParams, GetAllocationCancelContextParams, GetAllocationFactoryParams, GetAllocationTransferContextParams, GetAllocationWithdrawContextParams, GetFeaturedAppRightParams, GetInstrumentParams, GetMiningRoundDetailsParams, GetTransferFactoryParams, GetTransferInstructionAcceptContextParams, GetTransferInstructionRejectContextParams, GetTransferInstructionWithdrawContextParams, GetTransferPreapprovalsByPartyParams, ListInstrumentsParams, LookupTransferCommandCounterByPartyParams, LookupTransferCommandStatusParams, RejectTransferOfferParams, WithdrawTransferOfferParams } from './schemas/operations';
|
|
4
|
-
import { AcceptTransferOfferResponse, CreateBuyTrafficRequestResponse, CreateTransferOfferResponse, GetAllocationCancelContextResponse, GetAllocationFactoryResponse, GetAllocationTransferContextResponse, GetAllocationWithdrawContextResponse, GetInstrumentResponse, GetMiningRoundDetailsResponse, GetOpenAndIssuingMiningRoundsResponse, GetRegistryInfoResponse, GetTransferFactoryResponse, GetTransferInstructionAcceptContextResponse, GetTransferInstructionRejectContextResponse, GetTransferInstructionWithdrawContextResponse, ListInstrumentsResponse, ListTransferOffersResponse, LookupTransferCommandCounterByPartyResponse, LookupTransferCommandStatusResponse, LookupTransferPreapprovalByPartyResponse, RejectTransferOfferResponse, WithdrawTransferOfferResponse } from './schemas/api';
|
|
3
|
+
import { AcceptTransferOfferParams, CreateBuyTrafficRequestParams, CreateTransferOfferParams, GetAllocationCancelContextParams, GetAllocationFactoryParams, GetAllocationTransferContextParams, GetAllocationWithdrawContextParams, GetFeaturedAppRightParams, GetInstrumentParams, GetMemberTrafficStatusParams, GetMiningRoundDetailsParams, GetTransferFactoryParams, GetTransferInstructionAcceptContextParams, GetTransferInstructionRejectContextParams, GetTransferInstructionWithdrawContextParams, GetTransferPreapprovalsByPartyParams, ListInstrumentsParams, LookupTransferCommandCounterByPartyParams, LookupTransferCommandStatusParams, RejectTransferOfferParams, WithdrawTransferOfferParams } from './schemas/operations';
|
|
4
|
+
import { AcceptTransferOfferResponse, CreateBuyTrafficRequestResponse, CreateTransferOfferResponse, GetAllocationCancelContextResponse, GetAllocationFactoryResponse, GetAllocationTransferContextResponse, GetAllocationWithdrawContextResponse, GetInstrumentResponse, GetMemberTrafficStatusResponse, GetMiningRoundDetailsResponse, GetOpenAndIssuingMiningRoundsResponse, GetRegistryInfoResponse, GetTransferFactoryResponse, GetTransferInstructionAcceptContextResponse, GetTransferInstructionRejectContextResponse, GetTransferInstructionWithdrawContextResponse, ListInstrumentsResponse, ListTransferOffersResponse, LookupTransferCommandCounterByPartyResponse, LookupTransferCommandStatusResponse, LookupTransferPreapprovalByPartyResponse, RejectTransferOfferResponse, WithdrawTransferOfferResponse } from './schemas/api';
|
|
5
5
|
import { operations as ansOperations } from '../../generated/apps/validator/src/main/openapi/ans-external';
|
|
6
6
|
import { operations as scanProxyOperations } from '../../generated/apps/validator/src/main/openapi/scan-proxy';
|
|
7
7
|
import { operations as validatorOperations } from '../../generated/apps/validator/src/main/openapi/validator-internal';
|
|
@@ -24,6 +24,7 @@ export declare class ValidatorApiClient extends BaseClient {
|
|
|
24
24
|
registerNewUser: (params: void) => Promise<validatorOperations['register']['responses']['200']['content']['application/json']>;
|
|
25
25
|
getAmuletRules: (params: void) => Promise<scanProxyOperations['getAmuletRules']['responses']['200']['content']['application/json']>;
|
|
26
26
|
getDsoPartyId: (params: void) => Promise<scanProxyOperations['getDsoPartyId']['responses']['200']['content']['application/json']>;
|
|
27
|
+
getMemberTrafficStatus: (params: GetMemberTrafficStatusParams) => Promise<GetMemberTrafficStatusResponse>;
|
|
27
28
|
getMiningRoundDetails: (params: GetMiningRoundDetailsParams) => Promise<GetMiningRoundDetailsResponse>;
|
|
28
29
|
getOpenAndIssuingMiningRounds: (params: void) => Promise<GetOpenAndIssuingMiningRoundsResponse>;
|
|
29
30
|
lookupFeaturedAppRight: (params: GetFeaturedAppRightParams) => Promise<LookupFeaturedAppRightResponse>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ValidatorApiClient.d.ts","sourceRoot":"","sources":["../../../../src/clients/validator-api/ValidatorApiClient.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ValidatorApiClient.d.ts","sourceRoot":"","sources":["../../../../src/clients/validator-api/ValidatorApiClient.ts"],"names":[],"mappings":"AAcA,OAAO,EAA0B,8BAA8B,EAAE,MAAM,sDAAsD,CAAC;AA4B9H,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EAAE,yBAAyB,EAAE,6BAA6B,EAAE,yBAAyB,EAAE,gCAAgC,EAAE,0BAA0B,EAAE,kCAAkC,EAAE,kCAAkC,EAAE,yBAAyB,EAAE,mBAAmB,EAAE,4BAA4B,EAAE,2BAA2B,EAAE,wBAAwB,EAAE,yCAAyC,EAAE,yCAAyC,EAAE,2CAA2C,EAAE,oCAAoC,EAAE,qBAAqB,EAAE,yCAAyC,EAAE,iCAAiC,EAAE,yBAAyB,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AAC5sB,OAAO,EAAE,2BAA2B,EAAE,+BAA+B,EAAE,2BAA2B,EAAE,kCAAkC,EAAE,4BAA4B,EAAE,oCAAoC,EAAE,oCAAoC,EAAE,qBAAqB,EAAE,8BAA8B,EAAE,6BAA6B,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W,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC;IACrP,0BAA0B,EAAG,CAAC,MAAM,EAAE,IAAI,KAAK,OAAO,CAAC,gBAAgB,CAAC,4BAA4B,CAAC,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC;IAC1J,mBAAmB,EAAG,CAAC,MAAM,EAAE,yBAAyB,KAAK,OAAO,CAAC,2BAA2B,CAAC,CAAC;IAClG,mBAAmB,EAAG,CAAC,MAAM,EAAE,yBAAyB,KAAK,OAAO,CAAC,2BAA2B,CAAC,CAAC;IAClG,kBAAkB,EAAG,CAAC,MAAM,EAAE,IAAI,KAAK,OAAO,CAAC,0BAA0B,CAAC,CAAC;IAC3E,mBAAmB,EAAG,CAAC,MAAM,EAAE,yBAAyB,KAAK,OAAO,CAAC,2BAA2B,CAAC,CAAC;IAClG,qBAAqB,EAAG,CAAC,MAAM,EAAE,2BAA2B,KAAK,OAAO,CAAC,6BAA6B,CAAC,CAAC;gBAGnG,YAAY,EAAE,YAAY;IAKtC;;;;;;;;;OASG;IACH,OAAO,CAAC,iBAAiB;CA2C1B"}
|
|
@@ -13,6 +13,7 @@ const register_1 = require("./operations/v0/register");
|
|
|
13
13
|
const get_amulet_rules_1 = require("./operations/v0/scan-proxy/get-amulet-rules");
|
|
14
14
|
const get_dso_party_id_1 = require("./operations/v0/scan-proxy/get-dso-party-id");
|
|
15
15
|
const get_mining_round_details_1 = require("./operations/v0/scan-proxy/get-mining-round-details");
|
|
16
|
+
const get_member_traffic_status_1 = require("./operations/v0/scan-proxy/get-member-traffic-status");
|
|
16
17
|
const get_open_and_issuing_mining_rounds_1 = require("./operations/v0/scan-proxy/get-open-and-issuing-mining-rounds");
|
|
17
18
|
const lookup_featured_app_right_1 = require("./operations/v0/scan-proxy/lookup-featured-app-right");
|
|
18
19
|
const lookup_transfer_command_counter_by_party_1 = require("./operations/v0/scan-proxy/lookup-transfer-command-counter-by-party");
|
|
@@ -71,6 +72,7 @@ class ValidatorApiClient extends core_1.BaseClient {
|
|
|
71
72
|
this.registerNewUser = () => new register_1.RegisterNewUser(this).execute();
|
|
72
73
|
this.getAmuletRules = () => new get_amulet_rules_1.GetAmuletRules(this).execute();
|
|
73
74
|
this.getDsoPartyId = () => new get_dso_party_id_1.GetDsoPartyId(this).execute();
|
|
75
|
+
this.getMemberTrafficStatus = (params) => new get_member_traffic_status_1.GetMemberTrafficStatus(this).execute(params);
|
|
74
76
|
this.getMiningRoundDetails = (params) => new get_mining_round_details_1.GetMiningRoundDetails(this).execute(params);
|
|
75
77
|
this.getOpenAndIssuingMiningRounds = () => new get_open_and_issuing_mining_rounds_1.GetOpenAndIssuingMiningRounds(this).execute();
|
|
76
78
|
this.lookupFeaturedAppRight = (params) => new lookup_featured_app_right_1.LookupFeaturedAppRight(this).execute(params);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ValidatorApiClient.js","sourceRoot":"","sources":["../../../../src/clients/validator-api/ValidatorApiClient.ts"],"names":[],"mappings":";;;AAAA,yCAAyC;AACzC,mEAA+D;AAC/D,iGAA2F;AAC3F,mEAAkE;AAClE,6DAA4D;AAC5D,+EAAwE;AACxE,uEAA0E;AAC1E,yEAA4E;AAC5E,uDAA2D;AAC3D,kFAA6E;AAC7E,kFAA4E;AAC5E,kGAA4F;AAC5F,sHAA8G;AAC9G,oGAA8H;AAC9H,kIAA0H;AAC1H,8GAAwG;AACxG,0HAAmH;AACnH,iIAA4H;AAC5H,oIAA8H;AAC9H,wIAAkI;AAClI,wIAAkI;AAClI,mGAA+F;AAC/F,yGAAoG;AACpG,uGAAmG;AACnG,2HAAsH;AACtH,iKAA0J;AAC1J,iKAA0J;AAC1J,qKAA8J;AAC9J,+EAA6F;AAC7F,oEAAgE;AAChE,oEAAsE;AACtE,4EAAuE;AACvE,mFAAqG;AACrG,+EAAkG;AAClG,0EAAoF;AACpF,0EAAoF;AACpF,sEAAiF;AACjF,0EAAoF;AACpF,8EAAwF;AACxF,uCAAuC;AAEvC,qCAAsD;AAStD,yDAAyD;AACzD,MAAa,kBAAmB,SAAQ,iBAAU;
|
|
1
|
+
{"version":3,"file":"ValidatorApiClient.js","sourceRoot":"","sources":["../../../../src/clients/validator-api/ValidatorApiClient.ts"],"names":[],"mappings":";;;AAAA,yCAAyC;AACzC,mEAA+D;AAC/D,iGAA2F;AAC3F,mEAAkE;AAClE,6DAA4D;AAC5D,+EAAwE;AACxE,uEAA0E;AAC1E,yEAA4E;AAC5E,uDAA2D;AAC3D,kFAA6E;AAC7E,kFAA4E;AAC5E,kGAA4F;AAC5F,oGAA8F;AAC9F,sHAA8G;AAC9G,oGAA8H;AAC9H,kIAA0H;AAC1H,8GAAwG;AACxG,0HAAmH;AACnH,iIAA4H;AAC5H,oIAA8H;AAC9H,wIAAkI;AAClI,wIAAkI;AAClI,mGAA+F;AAC/F,yGAAoG;AACpG,uGAAmG;AACnG,2HAAsH;AACtH,iKAA0J;AAC1J,iKAA0J;AAC1J,qKAA8J;AAC9J,+EAA6F;AAC7F,oEAAgE;AAChE,oEAAsE;AACtE,4EAAuE;AACvE,mFAAqG;AACrG,+EAAkG;AAClG,0EAAoF;AACpF,0EAAoF;AACpF,sEAAiF;AACjF,0EAAoF;AACpF,8EAAwF;AACxF,uCAAuC;AAEvC,qCAAsD;AAStD,yDAAyD;AACzD,MAAa,kBAAmB,SAAQ,iBAAU;IAyChD,6BAA6B;IAE7B,YAAY,YAA0B;QACpC,KAAK,CAAC,eAAe,EAAE,YAAY,CAAC,CAAC;QACrC,IAAI,CAAC,iBAAiB,EAAE,CAAC;IAC3B,CAAC;IAED;;;;;;;;;OASG;IACK,iBAAiB;QACvB,8CAA8C;QAC9C,IAAI,CAAC,UAAU,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,wBAAU,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC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,CAAC,OAAO,EAAE,CAAC;QACnE,IAAI,CAAC,aAAa,GAAG,GAAG,EAAE,CAAC,IAAI,+BAAa,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,CAAC;QAC7D,IAAI,CAAC,2BAA2B,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,oCAA2B,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QACrG,IAAI,CAAC,0BAA0B,GAAG,GAAG,EAAE,CAAC,IAAI,iCAA0B,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,CAAC;QACvF,IAAI,CAAC,mBAAmB,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,4BAAmB,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QACrF,IAAI,CAAC,mBAAmB,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,4BAAmB,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QACrF,IAAI,CAAC,kBAAkB,GAAG,GAAG,EAAE,CAAC,IAAI,yBAAkB,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,CAAC;QACvE,IAAI,CAAC,mBAAmB,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,4BAAmB,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QACrF,IAAI,CAAC,qBAAqB,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,gCAAqB,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QACzF,4CAA4C;IAC9C,CAAC;CACF;AArGD,gDAqGC"}
|
package/build/src/clients/validator-api/operations/v0/scan-proxy/get-member-traffic-status.d.ts
CHANGED
|
@@ -1,33 +1,28 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ApiOperation } from '../../../../../core/operations/ApiOperation';
|
|
2
|
+
import { operations } from '../../../../../generated/apps/scan/src/main/openapi/scan';
|
|
3
|
+
import { GetMemberTrafficStatusParams } from '../../../schemas/operations';
|
|
2
4
|
/**
|
|
3
5
|
* @description Get a member's traffic status as reported by the sequencer
|
|
4
6
|
* @example
|
|
5
7
|
* ```typescript
|
|
8
|
+
* // Get traffic status for current party in current mining round domain
|
|
9
|
+
* const status = await client.getMemberTrafficStatus();
|
|
10
|
+
*
|
|
11
|
+
* // Get traffic status for specific member in current mining round domain
|
|
12
|
+
* const status = await client.getMemberTrafficStatus({
|
|
13
|
+
* memberId: 'PAR::id::fingerprint'
|
|
14
|
+
* });
|
|
15
|
+
*
|
|
16
|
+
* // Get traffic status for specific member in specific domain
|
|
6
17
|
* const status = await client.getMemberTrafficStatus({
|
|
7
18
|
* domainId: 'domain123',
|
|
8
19
|
* memberId: 'PAR::id::fingerprint'
|
|
9
20
|
* });
|
|
21
|
+
*
|
|
10
22
|
* console.log(`Total consumed: ${status.traffic_status.actual.total_consumed}`);
|
|
11
23
|
* ```
|
|
12
24
|
*/
|
|
13
|
-
export declare
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
domainId: string;
|
|
17
|
-
memberId: string;
|
|
18
|
-
}): Promise<{
|
|
19
|
-
traffic_status: import("../../../../../generated/apps/scan/src/main/openapi/scan").components["schemas"]["MemberTrafficStatus"];
|
|
20
|
-
}>;
|
|
21
|
-
client: import("../../../../../core").BaseClient;
|
|
22
|
-
validateParams<T>(params: T, schema: z.ZodSchema<T>): T;
|
|
23
|
-
makeGetRequest<T>(url: string, config?: import("../../../../../core").RequestConfig): Promise<T>;
|
|
24
|
-
makePostRequest<T>(url: string, data: unknown, config?: import("../../../../../core").RequestConfig): Promise<T>;
|
|
25
|
-
makeDeleteRequest<T>(url: string, config?: import("../../../../../core").RequestConfig): Promise<T>;
|
|
26
|
-
makePatchRequest<T>(url: string, data: unknown, config?: import("../../../../../core").RequestConfig): Promise<T>;
|
|
27
|
-
getManagedParties(): string[];
|
|
28
|
-
getPartyId(): string | undefined;
|
|
29
|
-
getApiUrl(): string;
|
|
30
|
-
buildPartyList(additionalParties?: string[]): string[];
|
|
31
|
-
};
|
|
32
|
-
};
|
|
25
|
+
export declare class GetMemberTrafficStatus extends ApiOperation<GetMemberTrafficStatusParams, operations['getMemberTrafficStatus']['responses']['200']['content']['application/json']> {
|
|
26
|
+
execute(params: GetMemberTrafficStatusParams): Promise<operations['getMemberTrafficStatus']['responses']['200']['content']['application/json']>;
|
|
27
|
+
}
|
|
33
28
|
//# sourceMappingURL=get-member-traffic-status.d.ts.map
|
package/build/src/clients/validator-api/operations/v0/scan-proxy/get-member-traffic-status.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-member-traffic-status.d.ts","sourceRoot":"","sources":["../../../../../../../src/clients/validator-api/operations/v0/scan-proxy/get-member-traffic-status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"get-member-traffic-status.d.ts","sourceRoot":"","sources":["../../../../../../../src/clients/validator-api/operations/v0/scan-proxy/get-member-traffic-status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,6CAA6C,CAAC;AAC3E,OAAO,EAAE,UAAU,EAAE,MAAM,0DAA0D,CAAC;AAEtF,OAAO,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAC;AAE3E;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,qBAAa,sBAAuB,SAAQ,YAAY,CACtD,4BAA4B,EAC5B,UAAU,CAAC,wBAAwB,CAAC,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC,kBAAkB,CAAC,CACxF;IACO,OAAO,CAAC,MAAM,EAAE,4BAA4B,GAAG,OAAO,CAAC,UAAU,CAAC,wBAAwB,CAAC,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC,kBAAkB,CAAC,CAAC;CAWtJ"}
|
package/build/src/clients/validator-api/operations/v0/scan-proxy/get-member-traffic-status.js
CHANGED
|
@@ -1,25 +1,38 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GetMemberTrafficStatus = void 0;
|
|
4
|
-
const
|
|
5
|
-
const
|
|
4
|
+
const ApiOperation_1 = require("../../../../../core/operations/ApiOperation");
|
|
5
|
+
const mining_rounds_1 = require("../../../../../utils/mining/mining-rounds");
|
|
6
6
|
/**
|
|
7
7
|
* @description Get a member's traffic status as reported by the sequencer
|
|
8
8
|
* @example
|
|
9
9
|
* ```typescript
|
|
10
|
+
* // Get traffic status for current party in current mining round domain
|
|
11
|
+
* const status = await client.getMemberTrafficStatus();
|
|
12
|
+
*
|
|
13
|
+
* // Get traffic status for specific member in current mining round domain
|
|
14
|
+
* const status = await client.getMemberTrafficStatus({
|
|
15
|
+
* memberId: 'PAR::id::fingerprint'
|
|
16
|
+
* });
|
|
17
|
+
*
|
|
18
|
+
* // Get traffic status for specific member in specific domain
|
|
10
19
|
* const status = await client.getMemberTrafficStatus({
|
|
11
20
|
* domainId: 'domain123',
|
|
12
21
|
* memberId: 'PAR::id::fingerprint'
|
|
13
22
|
* });
|
|
23
|
+
*
|
|
14
24
|
* console.log(`Total consumed: ${status.traffic_status.actual.total_consumed}`);
|
|
15
25
|
* ```
|
|
16
26
|
*/
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
domainId
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
27
|
+
class GetMemberTrafficStatus extends ApiOperation_1.ApiOperation {
|
|
28
|
+
async execute(params) {
|
|
29
|
+
// Auto-determine domainId if not provided
|
|
30
|
+
const domainId = params.domainId || await (0, mining_rounds_1.getCurrentMiningRoundDomainId)(this.client);
|
|
31
|
+
// Auto-determine memberId if not provided
|
|
32
|
+
const memberId = params.memberId || this.client.getPartyId();
|
|
33
|
+
const url = `${this.getApiUrl()}/api/validator/v0/scan-proxy/v0/domains/${encodeURIComponent(domainId)}/members/${encodeURIComponent(memberId)}/traffic-status`;
|
|
34
|
+
return this.makeGetRequest(url);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.GetMemberTrafficStatus = GetMemberTrafficStatus;
|
|
25
38
|
//# sourceMappingURL=get-member-traffic-status.js.map
|
package/build/src/clients/validator-api/operations/v0/scan-proxy/get-member-traffic-status.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-member-traffic-status.js","sourceRoot":"","sources":["../../../../../../../src/clients/validator-api/operations/v0/scan-proxy/get-member-traffic-status.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"get-member-traffic-status.js","sourceRoot":"","sources":["../../../../../../../src/clients/validator-api/operations/v0/scan-proxy/get-member-traffic-status.ts"],"names":[],"mappings":";;;AAAA,8EAA2E;AAE3E,6EAA0F;AAG1F;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAa,sBAAuB,SAAQ,2BAG3C;IACC,KAAK,CAAC,OAAO,CAAC,MAAoC;QAChD,0CAA0C;QAC1C,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,IAAI,MAAM,IAAA,6CAA6B,EAAC,IAAI,CAAC,MAAa,CAAC,CAAC;QAE5F,0CAA0C;QAC1C,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,IAAK,IAAI,CAAC,MAAc,CAAC,UAAU,EAAE,CAAC;QAEtE,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,SAAS,EAAE,2CAA2C,kBAAkB,CAAC,QAAQ,CAAC,YAAY,kBAAkB,CAAC,QAAQ,CAAC,iBAAiB,CAAC;QAEhK,OAAO,IAAI,CAAC,cAAc,CAA0F,GAAG,CAAC,CAAC;IAC3H,CAAC;CACF;AAfD,wDAeC"}
|
package/build/src/clients/validator-api/operations/v0/wallet/buy-traffic-requests/create.d.ts
CHANGED
|
@@ -3,11 +3,7 @@
|
|
|
3
3
|
* @example
|
|
4
4
|
* ```typescript
|
|
5
5
|
* const request = await client.createBuyTrafficRequest({
|
|
6
|
-
*
|
|
7
|
-
* domain_id: 'domain456',
|
|
8
|
-
* traffic_amount: 1000,
|
|
9
|
-
* tracking_id: 'unique-tracking-id',
|
|
10
|
-
* expires_at: Date.now() + 3600000 // 1 hour from now
|
|
6
|
+
* traffic_amount: 1000
|
|
11
7
|
* });
|
|
12
8
|
* console.log(`Request created: ${request.request_contract_id}`);
|
|
13
9
|
* ```
|
|
@@ -15,11 +11,7 @@
|
|
|
15
11
|
export declare const CreateBuyTrafficRequest: {
|
|
16
12
|
new (client: import("../../../../../../core").BaseClient): {
|
|
17
13
|
execute(params: {
|
|
18
|
-
receiving_validator_party_id: string;
|
|
19
|
-
domain_id: string;
|
|
20
14
|
traffic_amount: number;
|
|
21
|
-
tracking_id: string;
|
|
22
|
-
expires_at: number;
|
|
23
15
|
}): Promise<{
|
|
24
16
|
request_contract_id: string;
|
|
25
17
|
}>;
|
package/build/src/clients/validator-api/operations/v0/wallet/buy-traffic-requests/create.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../../../../../../src/clients/validator-api/operations/v0/wallet/buy-traffic-requests/create.ts"],"names":[],"mappings":"AAIA
|
|
1
|
+
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../../../../../../src/clients/validator-api/operations/v0/wallet/buy-traffic-requests/create.ts"],"names":[],"mappings":"AAIA;;;;;;;;;GASG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;CAoClC,CAAC"}
|