cantonjs-splice-validator 0.3.0
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 +143 -0
- package/dist/createAnsClient.d.ts +33 -0
- package/dist/createAnsClient.js +22 -0
- package/dist/createAnsClient.js.map +1 -0
- package/dist/createLegacyWalletClient.d.ts +51 -0
- package/dist/createLegacyWalletClient.js +81 -0
- package/dist/createLegacyWalletClient.js.map +1 -0
- package/dist/createScanProxyClient.d.ts +108 -0
- package/dist/createScanProxyClient.js +161 -0
- package/dist/createScanProxyClient.js.map +1 -0
- package/dist/experimental/createExperimentalScanProxyClient.d.ts +81 -0
- package/dist/experimental/createExperimentalScanProxyClient.js +135 -0
- package/dist/experimental/createExperimentalScanProxyClient.js.map +1 -0
- package/dist/experimental/createExperimentalValidatorInternalClient.d.ts +183 -0
- package/dist/experimental/createExperimentalValidatorInternalClient.js +327 -0
- package/dist/experimental/createExperimentalValidatorInternalClient.js.map +1 -0
- package/dist/experimental/index.d.ts +2 -0
- package/dist/experimental/index.js +3 -0
- package/dist/experimental/index.js.map +1 -0
- package/dist/generated/ans.types.d.ts +194 -0
- package/dist/generated/ans.types.js +6 -0
- package/dist/generated/ans.types.js.map +1 -0
- package/dist/generated/scanProxy.types.d.ts +836 -0
- package/dist/generated/scanProxy.types.js +6 -0
- package/dist/generated/scanProxy.types.js.map +1 -0
- package/dist/generated/validatorInternal.types.d.ts +1297 -0
- package/dist/generated/validatorInternal.types.js +6 -0
- package/dist/generated/validatorInternal.types.js.map +1 -0
- package/dist/generated/walletExternal.types.d.ts +544 -0
- package/dist/generated/walletExternal.types.js +6 -0
- package/dist/generated/walletExternal.types.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -0
- package/package.json +67 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { type TransportConfig } from 'cantonjs';
|
|
2
|
+
import type { operations } from '../generated/scanProxy.types.js';
|
|
3
|
+
type OperationName = keyof operations;
|
|
4
|
+
type JsonResponse<TName extends OperationName> = operations[TName] extends {
|
|
5
|
+
responses: {
|
|
6
|
+
200: {
|
|
7
|
+
content: {
|
|
8
|
+
'application/json': infer T;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
} ? T : never;
|
|
13
|
+
type JsonRequestBody<TName extends OperationName> = operations[TName] extends {
|
|
14
|
+
requestBody: {
|
|
15
|
+
content: {
|
|
16
|
+
'application/json': infer T;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
} ? T : never;
|
|
20
|
+
type QueryParameters<TName extends OperationName> = operations[TName] extends {
|
|
21
|
+
parameters: {
|
|
22
|
+
query?: infer T;
|
|
23
|
+
};
|
|
24
|
+
} ? T : never;
|
|
25
|
+
type PathParameters<TName extends OperationName> = operations[TName] extends {
|
|
26
|
+
parameters: {
|
|
27
|
+
path?: infer T;
|
|
28
|
+
};
|
|
29
|
+
} ? T : never;
|
|
30
|
+
export type ExperimentalScanProxyClientConfig = TransportConfig;
|
|
31
|
+
export type ExperimentalScanProxyRequestOptions = {
|
|
32
|
+
readonly signal?: AbortSignal;
|
|
33
|
+
};
|
|
34
|
+
export declare const EXPERIMENTAL_SCAN_PROXY_OPERATIONS: readonly [{
|
|
35
|
+
readonly clientMethod: "lookupFeaturedAppRight";
|
|
36
|
+
readonly proxyOperationId: "lookupFeaturedAppRight";
|
|
37
|
+
readonly scanOperationId: "lookupFeaturedAppRight";
|
|
38
|
+
readonly method: "GET";
|
|
39
|
+
readonly path: "/v0/scan-proxy/featured-apps/{provider_party_id}";
|
|
40
|
+
}, {
|
|
41
|
+
readonly clientMethod: "getAmuletRules";
|
|
42
|
+
readonly proxyOperationId: "getAmuletRules";
|
|
43
|
+
readonly scanOperationId: "getAmuletRules";
|
|
44
|
+
readonly method: "GET";
|
|
45
|
+
readonly path: "/v0/scan-proxy/amulet-rules";
|
|
46
|
+
}, {
|
|
47
|
+
readonly clientMethod: "getAnsRules";
|
|
48
|
+
readonly proxyOperationId: "getAnsRules";
|
|
49
|
+
readonly scanOperationId: "getAnsRules";
|
|
50
|
+
readonly method: "POST";
|
|
51
|
+
readonly path: "/v0/scan-proxy/ans-rules";
|
|
52
|
+
}, {
|
|
53
|
+
readonly clientMethod: "lookupTransferPreapprovalByParty";
|
|
54
|
+
readonly proxyOperationId: "lookupTransferPreapprovalByParty";
|
|
55
|
+
readonly scanOperationId: "lookupTransferPreapprovalByParty";
|
|
56
|
+
readonly method: "GET";
|
|
57
|
+
readonly path: "/v0/scan-proxy/transfer-preapprovals/by-party/{party}";
|
|
58
|
+
}, {
|
|
59
|
+
readonly clientMethod: "lookupTransferCommandCounterByParty";
|
|
60
|
+
readonly proxyOperationId: "lookupTransferCommandCounterByParty";
|
|
61
|
+
readonly scanOperationId: "lookupTransferCommandCounterByParty";
|
|
62
|
+
readonly method: "GET";
|
|
63
|
+
readonly path: "/v0/scan-proxy/transfer-command-counter/{party}";
|
|
64
|
+
}, {
|
|
65
|
+
readonly clientMethod: "lookupTransferCommandStatus";
|
|
66
|
+
readonly proxyOperationId: "lookupTransferCommandStatus";
|
|
67
|
+
readonly scanOperationId: "lookupTransferCommandStatus";
|
|
68
|
+
readonly method: "GET";
|
|
69
|
+
readonly path: "/v0/scan-proxy/transfer-command/status";
|
|
70
|
+
}];
|
|
71
|
+
export type ExperimentalScanProxyOperation = (typeof EXPERIMENTAL_SCAN_PROXY_OPERATIONS)[number];
|
|
72
|
+
export type ExperimentalScanProxyClient = {
|
|
73
|
+
lookupFeaturedAppRight: (request: PathParameters<'lookupFeaturedAppRight'>, options?: ExperimentalScanProxyRequestOptions) => Promise<JsonResponse<'lookupFeaturedAppRight'>>;
|
|
74
|
+
getAmuletRules: (options?: ExperimentalScanProxyRequestOptions) => Promise<JsonResponse<'getAmuletRules'>>;
|
|
75
|
+
getAnsRules: (request: JsonRequestBody<'getAnsRules'>, options?: ExperimentalScanProxyRequestOptions) => Promise<JsonResponse<'getAnsRules'>>;
|
|
76
|
+
lookupTransferPreapprovalByParty: (request: PathParameters<'lookupTransferPreapprovalByParty'>, options?: ExperimentalScanProxyRequestOptions) => Promise<JsonResponse<'lookupTransferPreapprovalByParty'>>;
|
|
77
|
+
lookupTransferCommandCounterByParty: (request: PathParameters<'lookupTransferCommandCounterByParty'>, options?: ExperimentalScanProxyRequestOptions) => Promise<JsonResponse<'lookupTransferCommandCounterByParty'>>;
|
|
78
|
+
lookupTransferCommandStatus: (request: QueryParameters<'lookupTransferCommandStatus'>, options?: ExperimentalScanProxyRequestOptions) => Promise<JsonResponse<'lookupTransferCommandStatus'>>;
|
|
79
|
+
};
|
|
80
|
+
export declare function createExperimentalScanProxyClient(config: ExperimentalScanProxyClientConfig): ExperimentalScanProxyClient;
|
|
81
|
+
export {};
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { jsonApi } from 'cantonjs';
|
|
2
|
+
export const EXPERIMENTAL_SCAN_PROXY_OPERATIONS = [
|
|
3
|
+
{
|
|
4
|
+
clientMethod: 'lookupFeaturedAppRight',
|
|
5
|
+
proxyOperationId: 'lookupFeaturedAppRight',
|
|
6
|
+
scanOperationId: 'lookupFeaturedAppRight',
|
|
7
|
+
method: 'GET',
|
|
8
|
+
path: '/v0/scan-proxy/featured-apps/{provider_party_id}',
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
clientMethod: 'getAmuletRules',
|
|
12
|
+
proxyOperationId: 'getAmuletRules',
|
|
13
|
+
scanOperationId: 'getAmuletRules',
|
|
14
|
+
method: 'GET',
|
|
15
|
+
path: '/v0/scan-proxy/amulet-rules',
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
clientMethod: 'getAnsRules',
|
|
19
|
+
proxyOperationId: 'getAnsRules',
|
|
20
|
+
scanOperationId: 'getAnsRules',
|
|
21
|
+
method: 'POST',
|
|
22
|
+
path: '/v0/scan-proxy/ans-rules',
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
clientMethod: 'lookupTransferPreapprovalByParty',
|
|
26
|
+
proxyOperationId: 'lookupTransferPreapprovalByParty',
|
|
27
|
+
scanOperationId: 'lookupTransferPreapprovalByParty',
|
|
28
|
+
method: 'GET',
|
|
29
|
+
path: '/v0/scan-proxy/transfer-preapprovals/by-party/{party}',
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
clientMethod: 'lookupTransferCommandCounterByParty',
|
|
33
|
+
proxyOperationId: 'lookupTransferCommandCounterByParty',
|
|
34
|
+
scanOperationId: 'lookupTransferCommandCounterByParty',
|
|
35
|
+
method: 'GET',
|
|
36
|
+
path: '/v0/scan-proxy/transfer-command-counter/{party}',
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
clientMethod: 'lookupTransferCommandStatus',
|
|
40
|
+
proxyOperationId: 'lookupTransferCommandStatus',
|
|
41
|
+
scanOperationId: 'lookupTransferCommandStatus',
|
|
42
|
+
method: 'GET',
|
|
43
|
+
path: '/v0/scan-proxy/transfer-command/status',
|
|
44
|
+
},
|
|
45
|
+
];
|
|
46
|
+
export function createExperimentalScanProxyClient(config) {
|
|
47
|
+
const transport = jsonApi(config);
|
|
48
|
+
return {
|
|
49
|
+
async lookupFeaturedAppRight(request, options) {
|
|
50
|
+
return await transport.request({
|
|
51
|
+
method: 'GET',
|
|
52
|
+
path: buildRequestPath('/v0/scan-proxy/featured-apps/{provider_party_id}', {
|
|
53
|
+
pathParams: request,
|
|
54
|
+
}),
|
|
55
|
+
signal: options?.signal,
|
|
56
|
+
});
|
|
57
|
+
},
|
|
58
|
+
async getAmuletRules(options) {
|
|
59
|
+
return await transport.request({
|
|
60
|
+
method: 'GET',
|
|
61
|
+
path: '/v0/scan-proxy/amulet-rules',
|
|
62
|
+
signal: options?.signal,
|
|
63
|
+
});
|
|
64
|
+
},
|
|
65
|
+
async getAnsRules(request, options) {
|
|
66
|
+
return await transport.request({
|
|
67
|
+
method: 'POST',
|
|
68
|
+
path: '/v0/scan-proxy/ans-rules',
|
|
69
|
+
body: request,
|
|
70
|
+
signal: options?.signal,
|
|
71
|
+
});
|
|
72
|
+
},
|
|
73
|
+
async lookupTransferPreapprovalByParty(request, options) {
|
|
74
|
+
return await transport.request({
|
|
75
|
+
method: 'GET',
|
|
76
|
+
path: buildRequestPath('/v0/scan-proxy/transfer-preapprovals/by-party/{party}', {
|
|
77
|
+
pathParams: request,
|
|
78
|
+
}),
|
|
79
|
+
signal: options?.signal,
|
|
80
|
+
});
|
|
81
|
+
},
|
|
82
|
+
async lookupTransferCommandCounterByParty(request, options) {
|
|
83
|
+
return await transport.request({
|
|
84
|
+
method: 'GET',
|
|
85
|
+
path: buildRequestPath('/v0/scan-proxy/transfer-command-counter/{party}', {
|
|
86
|
+
pathParams: request,
|
|
87
|
+
}),
|
|
88
|
+
signal: options?.signal,
|
|
89
|
+
});
|
|
90
|
+
},
|
|
91
|
+
async lookupTransferCommandStatus(request, options) {
|
|
92
|
+
return await transport.request({
|
|
93
|
+
method: 'GET',
|
|
94
|
+
path: buildRequestPath('/v0/scan-proxy/transfer-command/status', {
|
|
95
|
+
query: request,
|
|
96
|
+
}),
|
|
97
|
+
signal: options?.signal,
|
|
98
|
+
});
|
|
99
|
+
},
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
function buildRequestPath(pathTemplate, options) {
|
|
103
|
+
const path = interpolatePathParams(pathTemplate, options?.pathParams);
|
|
104
|
+
const queryString = buildQueryString(options?.query);
|
|
105
|
+
return queryString.length === 0 ? path : `${path}?${queryString}`;
|
|
106
|
+
}
|
|
107
|
+
function interpolatePathParams(pathTemplate, pathParams) {
|
|
108
|
+
return pathTemplate.replace(/\{([^}]+)\}/g, (_match, key) => {
|
|
109
|
+
const value = pathParams?.[key];
|
|
110
|
+
if (value === undefined) {
|
|
111
|
+
throw new Error(`Missing required experimental Scan Proxy path parameter: ${key}`);
|
|
112
|
+
}
|
|
113
|
+
return encodeURIComponent(String(value));
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
function buildQueryString(query) {
|
|
117
|
+
if (query === undefined) {
|
|
118
|
+
return '';
|
|
119
|
+
}
|
|
120
|
+
const params = new URLSearchParams();
|
|
121
|
+
for (const [key, value] of Object.entries(query)) {
|
|
122
|
+
if (value === undefined || value === null) {
|
|
123
|
+
continue;
|
|
124
|
+
}
|
|
125
|
+
if (Array.isArray(value)) {
|
|
126
|
+
for (const item of value) {
|
|
127
|
+
params.append(key, String(item));
|
|
128
|
+
}
|
|
129
|
+
continue;
|
|
130
|
+
}
|
|
131
|
+
params.append(key, String(value));
|
|
132
|
+
}
|
|
133
|
+
return params.toString();
|
|
134
|
+
}
|
|
135
|
+
//# sourceMappingURL=createExperimentalScanProxyClient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createExperimentalScanProxyClient.js","sourceRoot":"","sources":["../../src/experimental/createExperimentalScanProxyClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAwB,MAAM,UAAU,CAAA;AAgCxD,MAAM,CAAC,MAAM,kCAAkC,GAAG;IAChD;QACE,YAAY,EAAE,wBAAwB;QACtC,gBAAgB,EAAE,wBAAwB;QAC1C,eAAe,EAAE,wBAAwB;QACzC,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,kDAAkD;KACzD;IACD;QACE,YAAY,EAAE,gBAAgB;QAC9B,gBAAgB,EAAE,gBAAgB;QAClC,eAAe,EAAE,gBAAgB;QACjC,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,6BAA6B;KACpC;IACD;QACE,YAAY,EAAE,aAAa;QAC3B,gBAAgB,EAAE,aAAa;QAC/B,eAAe,EAAE,aAAa;QAC9B,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,0BAA0B;KACjC;IACD;QACE,YAAY,EAAE,kCAAkC;QAChD,gBAAgB,EAAE,kCAAkC;QACpD,eAAe,EAAE,kCAAkC;QACnD,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,uDAAuD;KAC9D;IACD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CAAA;QAC/B,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACxB,MAAM,IAAI,KAAK,CAAC,4DAA4D,GAAG,EAAE,CAAC,CAAA;QACpF,CAAC;QACD,OAAO,kBAAkB,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAA;IAC1C,CAAC,CAAC,CAAA;AACJ,CAAC;AAED,SAAS,gBAAgB,CAAC,KAA6B;IACrD,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACxB,OAAO,EAAE,CAAA;IACX,CAAC;IAED,MAAM,MAAM,GAAG,IAAI,eAAe,EAAE,CAAA;IAEpC,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACjD,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;YAC1C,SAAQ;QACV,CAAC;QAED,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YACzB,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;gBACzB,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAA;YAClC,CAAC;YACD,SAAQ;QACV,CAAC;QAED,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAA;IACnC,CAAC;IAED,OAAO,MAAM,CAAC,QAAQ,EAAE,CAAA;AAC1B,CAAC"}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import { type TransportConfig } from 'cantonjs';
|
|
2
|
+
import type { operations } from '../generated/validatorInternal.types.js';
|
|
3
|
+
type OperationName = keyof operations;
|
|
4
|
+
type JsonResponse<TName extends OperationName> = operations[TName] extends {
|
|
5
|
+
responses: {
|
|
6
|
+
200: {
|
|
7
|
+
content: {
|
|
8
|
+
'application/json': infer T;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
} ? T : never;
|
|
13
|
+
type TextResponse<TName extends OperationName> = operations[TName] extends {
|
|
14
|
+
responses: {
|
|
15
|
+
200: {
|
|
16
|
+
content: {
|
|
17
|
+
'text/plain': infer T;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
} ? T : never;
|
|
22
|
+
type SuccessResponse<TName extends OperationName> = [
|
|
23
|
+
JsonResponse<TName>
|
|
24
|
+
] extends [never] ? [TextResponse<TName>] extends [never] ? Record<string, never> : TextResponse<TName> : JsonResponse<TName>;
|
|
25
|
+
type JsonRequestBody<TName extends OperationName> = operations[TName] extends {
|
|
26
|
+
requestBody: {
|
|
27
|
+
content: {
|
|
28
|
+
'application/json': infer T;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
} ? T : never;
|
|
32
|
+
type QueryParameters<TName extends OperationName> = operations[TName] extends {
|
|
33
|
+
parameters: {
|
|
34
|
+
query?: infer T;
|
|
35
|
+
};
|
|
36
|
+
} ? T : never;
|
|
37
|
+
type PathParameters<TName extends OperationName> = operations[TName] extends {
|
|
38
|
+
parameters: {
|
|
39
|
+
path?: infer T;
|
|
40
|
+
};
|
|
41
|
+
} ? T : never;
|
|
42
|
+
export type ExperimentalValidatorInternalClientConfig = TransportConfig;
|
|
43
|
+
export type ExperimentalValidatorInternalRequestOptions = {
|
|
44
|
+
readonly signal?: AbortSignal;
|
|
45
|
+
};
|
|
46
|
+
export declare const VALIDATOR_INTERNAL_OPERATIONS: readonly [{
|
|
47
|
+
readonly clientMethod: "ready";
|
|
48
|
+
readonly operationId: "isReady";
|
|
49
|
+
readonly method: "GET";
|
|
50
|
+
readonly path: "/readyz";
|
|
51
|
+
}, {
|
|
52
|
+
readonly clientMethod: "live";
|
|
53
|
+
readonly operationId: "isLive";
|
|
54
|
+
readonly method: "GET";
|
|
55
|
+
readonly path: "/livez";
|
|
56
|
+
}, {
|
|
57
|
+
readonly clientMethod: "getValidatorUserInfo";
|
|
58
|
+
readonly operationId: "getValidatorUserInfo";
|
|
59
|
+
readonly method: "GET";
|
|
60
|
+
readonly path: "/v0/validator-user";
|
|
61
|
+
}, {
|
|
62
|
+
readonly clientMethod: "register";
|
|
63
|
+
readonly operationId: "register";
|
|
64
|
+
readonly method: "POST";
|
|
65
|
+
readonly path: "/v0/register";
|
|
66
|
+
}, {
|
|
67
|
+
readonly clientMethod: "onboardUser";
|
|
68
|
+
readonly operationId: "onboardUser";
|
|
69
|
+
readonly method: "POST";
|
|
70
|
+
readonly path: "/v0/admin/users";
|
|
71
|
+
}, {
|
|
72
|
+
readonly clientMethod: "listUsers";
|
|
73
|
+
readonly operationId: "listUsers";
|
|
74
|
+
readonly method: "GET";
|
|
75
|
+
readonly path: "/v0/admin/users";
|
|
76
|
+
}, {
|
|
77
|
+
readonly clientMethod: "offboardUser";
|
|
78
|
+
readonly operationId: "offboardUser";
|
|
79
|
+
readonly method: "POST";
|
|
80
|
+
readonly path: "/v0/admin/users/offboard";
|
|
81
|
+
}, {
|
|
82
|
+
readonly clientMethod: "dumpParticipantIdentities";
|
|
83
|
+
readonly operationId: "dumpParticipantIdentities";
|
|
84
|
+
readonly method: "GET";
|
|
85
|
+
readonly path: "/v0/admin/participant/identities";
|
|
86
|
+
}, {
|
|
87
|
+
readonly clientMethod: "getDecentralizedSynchronizerConnectionConfig";
|
|
88
|
+
readonly operationId: "getDecentralizedSynchronizerConnectionConfig";
|
|
89
|
+
readonly method: "GET";
|
|
90
|
+
readonly path: "/v0/admin/participant/global-domain-connection-config";
|
|
91
|
+
}, {
|
|
92
|
+
readonly clientMethod: "getValidatorDomainDataSnapshot";
|
|
93
|
+
readonly operationId: "getValidatorDomainDataSnapshot";
|
|
94
|
+
readonly method: "GET";
|
|
95
|
+
readonly path: "/v0/admin/domain/data-snapshot";
|
|
96
|
+
}, {
|
|
97
|
+
readonly clientMethod: "lookupTransferPreapprovalByParty";
|
|
98
|
+
readonly operationId: "lookupTransferPreapprovalByParty";
|
|
99
|
+
readonly method: "GET";
|
|
100
|
+
readonly path: "/v0/admin/transfer-preapprovals/by-party/{receiver-party}";
|
|
101
|
+
}, {
|
|
102
|
+
readonly clientMethod: "cancelTransferPreapprovalByParty";
|
|
103
|
+
readonly operationId: "cancelTransferPreapprovalByParty";
|
|
104
|
+
readonly method: "DELETE";
|
|
105
|
+
readonly path: "/v0/admin/transfer-preapprovals/by-party/{receiver-party}";
|
|
106
|
+
}, {
|
|
107
|
+
readonly clientMethod: "listTransferPreapprovals";
|
|
108
|
+
readonly operationId: "listTransferPreapprovals";
|
|
109
|
+
readonly method: "GET";
|
|
110
|
+
readonly path: "/v0/admin/transfer-preapprovals";
|
|
111
|
+
}, {
|
|
112
|
+
readonly clientMethod: "prepareTransferPreapprovalSend";
|
|
113
|
+
readonly operationId: "prepareTransferPreapprovalSend";
|
|
114
|
+
readonly method: "POST";
|
|
115
|
+
readonly path: "/v0/admin/external-party/transfer-preapproval/prepare-send";
|
|
116
|
+
}, {
|
|
117
|
+
readonly clientMethod: "submitTransferPreapprovalSend";
|
|
118
|
+
readonly operationId: "submitTransferPreapprovalSend";
|
|
119
|
+
readonly method: "POST";
|
|
120
|
+
readonly path: "/v0/admin/external-party/transfer-preapproval/submit-send";
|
|
121
|
+
}, {
|
|
122
|
+
readonly clientMethod: "generateExternalPartyTopology";
|
|
123
|
+
readonly operationId: "generateExternalPartyTopology";
|
|
124
|
+
readonly method: "POST";
|
|
125
|
+
readonly path: "/v0/admin/external-party/topology/generate";
|
|
126
|
+
}, {
|
|
127
|
+
readonly clientMethod: "submitExternalPartyTopology";
|
|
128
|
+
readonly operationId: "submitExternalPartyTopology";
|
|
129
|
+
readonly method: "POST";
|
|
130
|
+
readonly path: "/v0/admin/external-party/topology/submit";
|
|
131
|
+
}, {
|
|
132
|
+
readonly clientMethod: "createExternalPartySetupProposal";
|
|
133
|
+
readonly operationId: "createExternalPartySetupProposal";
|
|
134
|
+
readonly method: "POST";
|
|
135
|
+
readonly path: "/v0/admin/external-party/setup-proposal";
|
|
136
|
+
}, {
|
|
137
|
+
readonly clientMethod: "listExternalPartySetupProposals";
|
|
138
|
+
readonly operationId: "listExternalPartySetupProposals";
|
|
139
|
+
readonly method: "GET";
|
|
140
|
+
readonly path: "/v0/admin/external-party/setup-proposal";
|
|
141
|
+
}, {
|
|
142
|
+
readonly clientMethod: "prepareAcceptExternalPartySetupProposal";
|
|
143
|
+
readonly operationId: "prepareAcceptExternalPartySetupProposal";
|
|
144
|
+
readonly method: "POST";
|
|
145
|
+
readonly path: "/v0/admin/external-party/setup-proposal/prepare-accept";
|
|
146
|
+
}, {
|
|
147
|
+
readonly clientMethod: "submitAcceptExternalPartySetupProposal";
|
|
148
|
+
readonly operationId: "submitAcceptExternalPartySetupProposal";
|
|
149
|
+
readonly method: "POST";
|
|
150
|
+
readonly path: "/v0/admin/external-party/setup-proposal/submit-accept";
|
|
151
|
+
}, {
|
|
152
|
+
readonly clientMethod: "getExternalPartyBalance";
|
|
153
|
+
readonly operationId: "getExternalPartyBalance";
|
|
154
|
+
readonly method: "GET";
|
|
155
|
+
readonly path: "/v0/admin/external-party/balance";
|
|
156
|
+
}];
|
|
157
|
+
export type ValidatorInternalOperation = (typeof VALIDATOR_INTERNAL_OPERATIONS)[number];
|
|
158
|
+
export type ExperimentalValidatorInternalClient = {
|
|
159
|
+
ready: (options?: ExperimentalValidatorInternalRequestOptions) => Promise<SuccessResponse<'isReady'>>;
|
|
160
|
+
live: (options?: ExperimentalValidatorInternalRequestOptions) => Promise<SuccessResponse<'isLive'>>;
|
|
161
|
+
getValidatorUserInfo: (options?: ExperimentalValidatorInternalRequestOptions) => Promise<SuccessResponse<'getValidatorUserInfo'>>;
|
|
162
|
+
register: (request: JsonRequestBody<'register'>, options?: ExperimentalValidatorInternalRequestOptions) => Promise<SuccessResponse<'register'>>;
|
|
163
|
+
onboardUser: (request: JsonRequestBody<'onboardUser'>, options?: ExperimentalValidatorInternalRequestOptions) => Promise<SuccessResponse<'onboardUser'>>;
|
|
164
|
+
listUsers: (options?: ExperimentalValidatorInternalRequestOptions) => Promise<SuccessResponse<'listUsers'>>;
|
|
165
|
+
offboardUser: (request: QueryParameters<'offboardUser'>, options?: ExperimentalValidatorInternalRequestOptions) => Promise<SuccessResponse<'offboardUser'>>;
|
|
166
|
+
dumpParticipantIdentities: (options?: ExperimentalValidatorInternalRequestOptions) => Promise<SuccessResponse<'dumpParticipantIdentities'>>;
|
|
167
|
+
getDecentralizedSynchronizerConnectionConfig: (options?: ExperimentalValidatorInternalRequestOptions) => Promise<SuccessResponse<'getDecentralizedSynchronizerConnectionConfig'>>;
|
|
168
|
+
getValidatorDomainDataSnapshot: (request: QueryParameters<'getValidatorDomainDataSnapshot'>, options?: ExperimentalValidatorInternalRequestOptions) => Promise<SuccessResponse<'getValidatorDomainDataSnapshot'>>;
|
|
169
|
+
lookupTransferPreapprovalByParty: (request: PathParameters<'lookupTransferPreapprovalByParty'>, options?: ExperimentalValidatorInternalRequestOptions) => Promise<SuccessResponse<'lookupTransferPreapprovalByParty'>>;
|
|
170
|
+
cancelTransferPreapprovalByParty: (request: PathParameters<'cancelTransferPreapprovalByParty'>, options?: ExperimentalValidatorInternalRequestOptions) => Promise<SuccessResponse<'cancelTransferPreapprovalByParty'>>;
|
|
171
|
+
listTransferPreapprovals: (options?: ExperimentalValidatorInternalRequestOptions) => Promise<SuccessResponse<'listTransferPreapprovals'>>;
|
|
172
|
+
prepareTransferPreapprovalSend: (request: JsonRequestBody<'prepareTransferPreapprovalSend'>, options?: ExperimentalValidatorInternalRequestOptions) => Promise<SuccessResponse<'prepareTransferPreapprovalSend'>>;
|
|
173
|
+
submitTransferPreapprovalSend: (request: JsonRequestBody<'submitTransferPreapprovalSend'>, options?: ExperimentalValidatorInternalRequestOptions) => Promise<SuccessResponse<'submitTransferPreapprovalSend'>>;
|
|
174
|
+
generateExternalPartyTopology: (request: JsonRequestBody<'generateExternalPartyTopology'>, options?: ExperimentalValidatorInternalRequestOptions) => Promise<SuccessResponse<'generateExternalPartyTopology'>>;
|
|
175
|
+
submitExternalPartyTopology: (request: JsonRequestBody<'submitExternalPartyTopology'>, options?: ExperimentalValidatorInternalRequestOptions) => Promise<SuccessResponse<'submitExternalPartyTopology'>>;
|
|
176
|
+
createExternalPartySetupProposal: (request: JsonRequestBody<'createExternalPartySetupProposal'>, options?: ExperimentalValidatorInternalRequestOptions) => Promise<SuccessResponse<'createExternalPartySetupProposal'>>;
|
|
177
|
+
listExternalPartySetupProposals: (options?: ExperimentalValidatorInternalRequestOptions) => Promise<SuccessResponse<'listExternalPartySetupProposals'>>;
|
|
178
|
+
prepareAcceptExternalPartySetupProposal: (request: JsonRequestBody<'prepareAcceptExternalPartySetupProposal'>, options?: ExperimentalValidatorInternalRequestOptions) => Promise<SuccessResponse<'prepareAcceptExternalPartySetupProposal'>>;
|
|
179
|
+
submitAcceptExternalPartySetupProposal: (request: JsonRequestBody<'submitAcceptExternalPartySetupProposal'>, options?: ExperimentalValidatorInternalRequestOptions) => Promise<SuccessResponse<'submitAcceptExternalPartySetupProposal'>>;
|
|
180
|
+
getExternalPartyBalance: (request: QueryParameters<'getExternalPartyBalance'>, options?: ExperimentalValidatorInternalRequestOptions) => Promise<SuccessResponse<'getExternalPartyBalance'>>;
|
|
181
|
+
};
|
|
182
|
+
export declare function createExperimentalValidatorInternalClient(config: ExperimentalValidatorInternalClientConfig): ExperimentalValidatorInternalClient;
|
|
183
|
+
export {};
|