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
package/README.md
ADDED
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
# cantonjs-splice-validator
|
|
2
|
+
|
|
3
|
+
Validator-facing Splice clients layered on top of `cantonjs`.
|
|
4
|
+
|
|
5
|
+
This package ships three surfaces:
|
|
6
|
+
|
|
7
|
+
- `createAnsClient()` for the GA `ans-external` API.
|
|
8
|
+
- `createScanProxyClient()` for a carefully filtered GA subset of `scan-proxy` whose underlying Scan semantics are tagged `external` in the vendored Scan spec.
|
|
9
|
+
- `createLegacyWalletClient()` for `wallet-external` compatibility flows that remain useful for existing transfer-offer and buy-traffic integrations.
|
|
10
|
+
|
|
11
|
+
`validator-internal` is intentionally excluded from this package.
|
|
12
|
+
|
|
13
|
+
## Status
|
|
14
|
+
|
|
15
|
+
- **GA:** `createAnsClient()` and the filtered `createScanProxyClient()` surface on the Splice `0.5.x` line
|
|
16
|
+
- **Legacy compatibility:** `createLegacyWalletClient()` for existing `wallet-external` integrations only
|
|
17
|
+
- **Experimental:** `cantonjs-splice-validator/experimental`, pinned to `vendor/splice/0.5.17` and outside the GA promise
|
|
18
|
+
|
|
19
|
+
## Install
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npm install cantonjs cantonjs-splice-validator
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Package Policy
|
|
26
|
+
|
|
27
|
+
- Generated low-level types are committed in `src/generated/*.types.ts`.
|
|
28
|
+
- The GA validator surface is limited to ANS external plus the filtered Scan Proxy wrapper.
|
|
29
|
+
- Proxy operations backed by internal, deprecated, or pre-alpha Scan semantics are intentionally excluded from the main client.
|
|
30
|
+
- `legacyWallet` is a legacy compatibility surface. For new transfer flows, prefer Token Standard integrations instead of `wallet-external`.
|
|
31
|
+
- The package is documented against the Splice `0.5.x` line, with vendored inputs currently pinned to `0.5.17`.
|
|
32
|
+
|
|
33
|
+
## Experimental APIs
|
|
34
|
+
|
|
35
|
+
> [!WARNING]
|
|
36
|
+
> Experimental Validator imports are pinned to `vendor/splice/0.5.17`.
|
|
37
|
+
> They may break on any upstream release. Import them only from `cantonjs-splice-validator/experimental`.
|
|
38
|
+
|
|
39
|
+
The experimental subpath isolates two unstable upstream surfaces:
|
|
40
|
+
|
|
41
|
+
- `createExperimentalValidatorInternalClient()` for the vendored `validator-internal.yaml` surface.
|
|
42
|
+
- `createExperimentalScanProxyClient()` for `scan-proxy` routes whose backing Scan semantics are tagged `internal` in the vendored `scan.yaml`.
|
|
43
|
+
|
|
44
|
+
```ts
|
|
45
|
+
import {
|
|
46
|
+
createExperimentalScanProxyClient,
|
|
47
|
+
createExperimentalValidatorInternalClient,
|
|
48
|
+
} from 'cantonjs-splice-validator/experimental'
|
|
49
|
+
|
|
50
|
+
const validatorInternal = createExperimentalValidatorInternalClient({
|
|
51
|
+
url: 'https://example.com/api/validator',
|
|
52
|
+
token: process.env.SPLICE_VALIDATOR_JWT,
|
|
53
|
+
})
|
|
54
|
+
|
|
55
|
+
const experimentalScanProxy = createExperimentalScanProxyClient({
|
|
56
|
+
url: 'https://example.com/api/validator',
|
|
57
|
+
token: process.env.SPLICE_VALIDATOR_JWT,
|
|
58
|
+
})
|
|
59
|
+
|
|
60
|
+
const operator = await validatorInternal.getValidatorUserInfo()
|
|
61
|
+
const featured = await experimentalScanProxy.lookupFeaturedAppRight({
|
|
62
|
+
provider_party_id: 'Alice::validator',
|
|
63
|
+
})
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
The stable `cantonjs-splice-validator` entrypoint intentionally continues to omit these APIs.
|
|
67
|
+
|
|
68
|
+
## Quick Start
|
|
69
|
+
|
|
70
|
+
```ts
|
|
71
|
+
import {
|
|
72
|
+
createAnsClient,
|
|
73
|
+
createScanProxyClient,
|
|
74
|
+
} from 'cantonjs-splice-validator'
|
|
75
|
+
|
|
76
|
+
const ans = createAnsClient({
|
|
77
|
+
url: 'https://example.com/api/validator',
|
|
78
|
+
token: process.env.SPLICE_VALIDATOR_JWT,
|
|
79
|
+
})
|
|
80
|
+
|
|
81
|
+
const scanProxy = createScanProxyClient({
|
|
82
|
+
url: 'https://example.com/api/validator',
|
|
83
|
+
token: process.env.SPLICE_VALIDATOR_JWT,
|
|
84
|
+
})
|
|
85
|
+
|
|
86
|
+
const created = await ans.createAnsEntry({
|
|
87
|
+
name: 'app.unverified.ans',
|
|
88
|
+
url: 'https://app.example.com',
|
|
89
|
+
description: 'Validator app',
|
|
90
|
+
})
|
|
91
|
+
|
|
92
|
+
const entries = await ans.listAnsEntries()
|
|
93
|
+
const dso = await scanProxy.getDsoInfo()
|
|
94
|
+
const namedEntry = await scanProxy.lookupAnsEntryByName({ name: 'app.ans' })
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## GA Scan Proxy Surface
|
|
98
|
+
|
|
99
|
+
`createScanProxyClient()` exposes only the proxy operations whose underlying Scan operations are tagged `external` in the vendored `scan.yaml`:
|
|
100
|
+
|
|
101
|
+
- `getDsoPartyId`
|
|
102
|
+
- `getDsoInfo`
|
|
103
|
+
- `getOpenAndIssuingMiningRounds`
|
|
104
|
+
- `listAnsEntries`
|
|
105
|
+
- `lookupAnsEntryByParty`
|
|
106
|
+
- `lookupAnsEntryByName`
|
|
107
|
+
- `getHoldingsSummaryAt`
|
|
108
|
+
- `listUnclaimedDevelopmentFundCoupons`
|
|
109
|
+
|
|
110
|
+
Validator-local proxy methods backed by internal Scan semantics, such as featured-app lookups, amulet rules, ANS rules, and transfer-command proxying, are intentionally left out.
|
|
111
|
+
|
|
112
|
+
## Legacy Wallet Compatibility
|
|
113
|
+
|
|
114
|
+
`createLegacyWalletClient()` is a legacy/deprecated-oriented compatibility wrapper for `wallet-external`, especially the transfer-offer flow that predates Token Standard-first integration.
|
|
115
|
+
|
|
116
|
+
Use a clearly named `legacyWallet` client so the callsites stay obviously separate from the GA validator surface:
|
|
117
|
+
|
|
118
|
+
```ts
|
|
119
|
+
import { createLegacyWalletClient } from 'cantonjs-splice-validator'
|
|
120
|
+
|
|
121
|
+
const legacyWallet = createLegacyWalletClient({
|
|
122
|
+
url: 'https://example.com/api/validator',
|
|
123
|
+
token: process.env.SPLICE_VALIDATOR_JWT,
|
|
124
|
+
})
|
|
125
|
+
|
|
126
|
+
const offer = await legacyWallet.createTransferOffer({
|
|
127
|
+
receiver_party_id: 'Receiver::validator',
|
|
128
|
+
amount: '10.0',
|
|
129
|
+
description: 'Legacy transfer offer',
|
|
130
|
+
expires_at: 1_780_000_000_000_000,
|
|
131
|
+
tracking_id: 'offer-123',
|
|
132
|
+
})
|
|
133
|
+
|
|
134
|
+
const status = await legacyWallet.lookupTransferOfferStatus({
|
|
135
|
+
tracking_id: 'offer-123',
|
|
136
|
+
})
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
For new transfer flows, prefer Token Standard surfaces. Reach for `legacyWallet` only when you need compatibility with existing `wallet-external` workflows.
|
|
140
|
+
|
|
141
|
+
## License
|
|
142
|
+
|
|
143
|
+
[Apache-2.0](https://github.com/merged-one/cantonjs/blob/main/LICENSE)
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { type TransportConfig } from 'cantonjs';
|
|
2
|
+
import type { components, operations } from './generated/ans.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
|
+
export type AnsClientConfig = TransportConfig;
|
|
21
|
+
export type AnsRequestOptions = {
|
|
22
|
+
readonly signal?: AbortSignal;
|
|
23
|
+
};
|
|
24
|
+
export type AnsEntry = components['schemas']['AnsEntryResponse'];
|
|
25
|
+
export type AnsCreateEntryRequest = JsonRequestBody<'createAnsEntry'>;
|
|
26
|
+
export type AnsCreateEntryResponse = JsonResponse<'createAnsEntry'>;
|
|
27
|
+
export type AnsListEntriesResponse = JsonResponse<'listAnsEntries'>;
|
|
28
|
+
export type AnsClient = {
|
|
29
|
+
createAnsEntry: (request: AnsCreateEntryRequest, options?: AnsRequestOptions) => Promise<AnsCreateEntryResponse>;
|
|
30
|
+
listAnsEntries: (options?: AnsRequestOptions) => Promise<AnsListEntriesResponse>;
|
|
31
|
+
};
|
|
32
|
+
export declare function createAnsClient(config: AnsClientConfig): AnsClient;
|
|
33
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsonApi } from 'cantonjs';
|
|
2
|
+
export function createAnsClient(config) {
|
|
3
|
+
const transport = jsonApi(config);
|
|
4
|
+
return {
|
|
5
|
+
async createAnsEntry(request, options) {
|
|
6
|
+
return await transport.request({
|
|
7
|
+
method: 'POST',
|
|
8
|
+
path: '/v0/entry/create',
|
|
9
|
+
body: request,
|
|
10
|
+
signal: options?.signal,
|
|
11
|
+
});
|
|
12
|
+
},
|
|
13
|
+
async listAnsEntries(options) {
|
|
14
|
+
return await transport.request({
|
|
15
|
+
method: 'GET',
|
|
16
|
+
path: '/v0/entry/all',
|
|
17
|
+
signal: options?.signal,
|
|
18
|
+
});
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=createAnsClient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createAnsClient.js","sourceRoot":"","sources":["../src/createAnsClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAwB,MAAM,UAAU,CAAA;AAkCxD,MAAM,UAAU,eAAe,CAAC,MAAuB;IACrD,MAAM,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;IAEjC,OAAO;QACL,KAAK,CAAC,cAAc,CAAC,OAAO,EAAE,OAAO;YACnC,OAAO,MAAM,SAAS,CAAC,OAAO,CAAyB;gBACrD,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE,kBAAkB;gBACxB,IAAI,EAAE,OAAO;gBACb,MAAM,EAAE,OAAO,EAAE,MAAM;aACxB,CAAC,CAAA;QACJ,CAAC;QAED,KAAK,CAAC,cAAc,CAAC,OAAO;YAC1B,OAAO,MAAM,SAAS,CAAC,OAAO,CAAyB;gBACrD,MAAM,EAAE,KAAK;gBACb,IAAI,EAAE,eAAe;gBACrB,MAAM,EAAE,OAAO,EAAE,MAAM;aACxB,CAAC,CAAA;QACJ,CAAC;KACF,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { type TransportConfig } from 'cantonjs';
|
|
2
|
+
import type { components, operations } from './generated/walletExternal.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 PathParameters<TName extends OperationName> = operations[TName] extends {
|
|
21
|
+
parameters: {
|
|
22
|
+
path?: infer T;
|
|
23
|
+
};
|
|
24
|
+
} ? T : never;
|
|
25
|
+
export type LegacyWalletClientConfig = TransportConfig;
|
|
26
|
+
export type LegacyWalletRequestOptions = {
|
|
27
|
+
readonly signal?: AbortSignal;
|
|
28
|
+
};
|
|
29
|
+
export type LegacyWalletTransferOffer = components['schemas']['Contract'];
|
|
30
|
+
export type LegacyWalletCreateTransferOfferRequest = JsonRequestBody<'createTransferOffer'>;
|
|
31
|
+
export type LegacyWalletCreateTransferOfferResponse = JsonResponse<'createTransferOffer'>;
|
|
32
|
+
export type LegacyWalletListTransferOffersResponse = JsonResponse<'listTransferOffers'>;
|
|
33
|
+
export type LegacyWalletGetTransferOfferStatusRequest = PathParameters<'getTransferOfferStatus'>;
|
|
34
|
+
export type LegacyWalletTransferOfferStatusResponse = JsonResponse<'getTransferOfferStatus'>;
|
|
35
|
+
export type LegacyWalletTransferOfferStatus = LegacyWalletTransferOfferStatusResponse['status'];
|
|
36
|
+
export type LegacyWalletCreateBuyTrafficRequest = JsonRequestBody<'createBuyTrafficRequest'>;
|
|
37
|
+
export type LegacyWalletCreateBuyTrafficRequestResponse = JsonResponse<'createBuyTrafficRequest'>;
|
|
38
|
+
export type LegacyWalletGetBuyTrafficRequestStatusRequest = PathParameters<'getBuyTrafficRequestStatus'>;
|
|
39
|
+
export type LegacyWalletBuyTrafficRequestStatusResponse = JsonResponse<'getBuyTrafficRequestStatus'>;
|
|
40
|
+
export type LegacyWalletBuyTrafficRequestStatus = LegacyWalletBuyTrafficRequestStatusResponse['status'];
|
|
41
|
+
export type LegacyWalletClient = {
|
|
42
|
+
createTransferOffer: (request: LegacyWalletCreateTransferOfferRequest, options?: LegacyWalletRequestOptions) => Promise<LegacyWalletCreateTransferOfferResponse>;
|
|
43
|
+
listTransferOffers: (options?: LegacyWalletRequestOptions) => Promise<LegacyWalletListTransferOffersResponse>;
|
|
44
|
+
getTransferOfferStatus: (request: LegacyWalletGetTransferOfferStatusRequest, options?: LegacyWalletRequestOptions) => Promise<LegacyWalletTransferOfferStatusResponse>;
|
|
45
|
+
lookupTransferOfferStatus: (request: LegacyWalletGetTransferOfferStatusRequest, options?: LegacyWalletRequestOptions) => Promise<LegacyWalletTransferOfferStatusResponse | undefined>;
|
|
46
|
+
createBuyTrafficRequest: (request: LegacyWalletCreateBuyTrafficRequest, options?: LegacyWalletRequestOptions) => Promise<LegacyWalletCreateBuyTrafficRequestResponse>;
|
|
47
|
+
getBuyTrafficRequestStatus: (request: LegacyWalletGetBuyTrafficRequestStatusRequest, options?: LegacyWalletRequestOptions) => Promise<LegacyWalletBuyTrafficRequestStatusResponse>;
|
|
48
|
+
lookupBuyTrafficRequestStatus: (request: LegacyWalletGetBuyTrafficRequestStatusRequest, options?: LegacyWalletRequestOptions) => Promise<LegacyWalletBuyTrafficRequestStatusResponse | undefined>;
|
|
49
|
+
};
|
|
50
|
+
export declare function createLegacyWalletClient(config: LegacyWalletClientConfig): LegacyWalletClient;
|
|
51
|
+
export {};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { jsonApi } from 'cantonjs';
|
|
2
|
+
export function createLegacyWalletClient(config) {
|
|
3
|
+
const transport = jsonApi(config);
|
|
4
|
+
return {
|
|
5
|
+
async createTransferOffer(request, options) {
|
|
6
|
+
return await transport.request({
|
|
7
|
+
method: 'POST',
|
|
8
|
+
path: '/v0/wallet/transfer-offers',
|
|
9
|
+
body: request,
|
|
10
|
+
signal: options?.signal,
|
|
11
|
+
});
|
|
12
|
+
},
|
|
13
|
+
async listTransferOffers(options) {
|
|
14
|
+
return await transport.request({
|
|
15
|
+
method: 'GET',
|
|
16
|
+
path: '/v0/wallet/transfer-offers',
|
|
17
|
+
signal: options?.signal,
|
|
18
|
+
});
|
|
19
|
+
},
|
|
20
|
+
async getTransferOfferStatus(request, options) {
|
|
21
|
+
return await transport.request({
|
|
22
|
+
method: 'POST',
|
|
23
|
+
path: buildPath('/v0/wallet/transfer-offers/{tracking_id}/status', request),
|
|
24
|
+
signal: options?.signal,
|
|
25
|
+
});
|
|
26
|
+
},
|
|
27
|
+
async lookupTransferOfferStatus(request, options) {
|
|
28
|
+
try {
|
|
29
|
+
return await this.getTransferOfferStatus(request, options);
|
|
30
|
+
}
|
|
31
|
+
catch (error) {
|
|
32
|
+
if (isNotFoundHttpError(error)) {
|
|
33
|
+
return undefined;
|
|
34
|
+
}
|
|
35
|
+
throw error;
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
async createBuyTrafficRequest(request, options) {
|
|
39
|
+
return await transport.request({
|
|
40
|
+
method: 'POST',
|
|
41
|
+
path: '/v0/wallet/buy-traffic-requests',
|
|
42
|
+
body: request,
|
|
43
|
+
signal: options?.signal,
|
|
44
|
+
});
|
|
45
|
+
},
|
|
46
|
+
async getBuyTrafficRequestStatus(request, options) {
|
|
47
|
+
return await transport.request({
|
|
48
|
+
method: 'POST',
|
|
49
|
+
path: buildPath('/v0/wallet/buy-traffic-requests/{tracking_id}/status', request),
|
|
50
|
+
signal: options?.signal,
|
|
51
|
+
});
|
|
52
|
+
},
|
|
53
|
+
async lookupBuyTrafficRequestStatus(request, options) {
|
|
54
|
+
try {
|
|
55
|
+
return await this.getBuyTrafficRequestStatus(request, options);
|
|
56
|
+
}
|
|
57
|
+
catch (error) {
|
|
58
|
+
if (isNotFoundHttpError(error)) {
|
|
59
|
+
return undefined;
|
|
60
|
+
}
|
|
61
|
+
throw error;
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
function buildPath(pathTemplate, pathParams) {
|
|
67
|
+
return pathTemplate.replace(/\{([^}]+)\}/g, (_match, key) => {
|
|
68
|
+
const value = pathParams[key];
|
|
69
|
+
if (value === undefined) {
|
|
70
|
+
throw new Error(`Missing required legacy wallet path parameter: ${key}`);
|
|
71
|
+
}
|
|
72
|
+
return encodeURIComponent(String(value));
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
function isNotFoundHttpError(error) {
|
|
76
|
+
const candidate = typeof error === 'object' && error !== null
|
|
77
|
+
? error
|
|
78
|
+
: undefined;
|
|
79
|
+
return candidate?.name === 'HttpError' && candidate.status === 404;
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=createLegacyWalletClient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createLegacyWalletClient.js","sourceRoot":"","sources":["../src/createLegacyWalletClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAwB,MAAM,UAAU,CAAA;AAwExD,MAAM,UAAU,wBAAwB,CACtC,MAAgC;IAEhC,M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EAAE,IAAI,KAAK,WAAW,IAAI,SAAS,CAAC,MAAM,KAAK,GAAG,CAAA;AACpE,CAAC"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { type TransportConfig } from 'cantonjs';
|
|
2
|
+
import type { components, 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 ScanProxyClientConfig = TransportConfig;
|
|
31
|
+
export type ScanProxyRequestOptions = {
|
|
32
|
+
readonly signal?: AbortSignal;
|
|
33
|
+
};
|
|
34
|
+
export type ScanProxyAnsEntry = components['schemas']['AnsEntry'];
|
|
35
|
+
export type ScanProxyDsoPartyIdResponse = JsonResponse<'getDsoPartyId'>;
|
|
36
|
+
export type ScanProxyDsoInfoResponse = JsonResponse<'getDsoInfo'>;
|
|
37
|
+
export type ScanProxyOpenAndIssuingMiningRoundsResponse = JsonResponse<'getOpenAndIssuingMiningRounds'>;
|
|
38
|
+
export type ScanProxyListAnsEntriesRequest = QueryParameters<'listAnsEntries'>;
|
|
39
|
+
export type ScanProxyListAnsEntriesResponse = JsonResponse<'listAnsEntries'>;
|
|
40
|
+
export type ScanProxyLookupAnsEntryByPartyRequest = PathParameters<'lookupAnsEntryByParty'>;
|
|
41
|
+
export type ScanProxyLookupAnsEntryByPartyResponse = JsonResponse<'lookupAnsEntryByParty'>;
|
|
42
|
+
export type ScanProxyLookupAnsEntryByNameRequest = PathParameters<'lookupAnsEntryByName'>;
|
|
43
|
+
export type ScanProxyLookupAnsEntryByNameResponse = JsonResponse<'lookupAnsEntryByName'>;
|
|
44
|
+
export type ScanProxyHoldingsSummaryRequest = JsonRequestBody<'getHoldingsSummaryAt'>;
|
|
45
|
+
export type ScanProxyHoldingsSummaryResponse = JsonResponse<'getHoldingsSummaryAt'>;
|
|
46
|
+
export type ScanProxyUnclaimedDevelopmentFundCouponsResponse = JsonResponse<'listUnclaimedDevelopmentFundCoupons'>;
|
|
47
|
+
export declare const GA_SCAN_PROXY_OPERATIONS: readonly [{
|
|
48
|
+
readonly clientMethod: "getDsoPartyId";
|
|
49
|
+
readonly proxyOperationId: "getDsoPartyId";
|
|
50
|
+
readonly scanOperationId: "getDsoPartyId";
|
|
51
|
+
readonly method: "GET";
|
|
52
|
+
readonly path: "/v0/scan-proxy/dso-party-id";
|
|
53
|
+
}, {
|
|
54
|
+
readonly clientMethod: "getDsoInfo";
|
|
55
|
+
readonly proxyOperationId: "getDsoInfo";
|
|
56
|
+
readonly scanOperationId: "getDsoInfo";
|
|
57
|
+
readonly method: "GET";
|
|
58
|
+
readonly path: "/v0/scan-proxy/dso";
|
|
59
|
+
}, {
|
|
60
|
+
readonly clientMethod: "getOpenAndIssuingMiningRounds";
|
|
61
|
+
readonly proxyOperationId: "getOpenAndIssuingMiningRounds";
|
|
62
|
+
readonly scanOperationId: "getOpenAndIssuingMiningRounds";
|
|
63
|
+
readonly method: "GET";
|
|
64
|
+
readonly path: "/v0/scan-proxy/open-and-issuing-mining-rounds";
|
|
65
|
+
}, {
|
|
66
|
+
readonly clientMethod: "lookupAnsEntryByParty";
|
|
67
|
+
readonly proxyOperationId: "lookupAnsEntryByParty";
|
|
68
|
+
readonly scanOperationId: "lookupAnsEntryByParty";
|
|
69
|
+
readonly method: "GET";
|
|
70
|
+
readonly path: "/v0/scan-proxy/ans-entries/by-party/{party}";
|
|
71
|
+
}, {
|
|
72
|
+
readonly clientMethod: "listAnsEntries";
|
|
73
|
+
readonly proxyOperationId: "listAnsEntries";
|
|
74
|
+
readonly scanOperationId: "listAnsEntries";
|
|
75
|
+
readonly method: "GET";
|
|
76
|
+
readonly path: "/v0/scan-proxy/ans-entries";
|
|
77
|
+
}, {
|
|
78
|
+
readonly clientMethod: "lookupAnsEntryByName";
|
|
79
|
+
readonly proxyOperationId: "lookupAnsEntryByName";
|
|
80
|
+
readonly scanOperationId: "lookupAnsEntryByName";
|
|
81
|
+
readonly method: "GET";
|
|
82
|
+
readonly path: "/v0/scan-proxy/ans-entries/by-name/{name}";
|
|
83
|
+
}, {
|
|
84
|
+
readonly clientMethod: "getHoldingsSummaryAt";
|
|
85
|
+
readonly proxyOperationId: "getHoldingsSummaryAt";
|
|
86
|
+
readonly scanOperationId: "getHoldingsSummaryAt";
|
|
87
|
+
readonly method: "POST";
|
|
88
|
+
readonly path: "/v0/scan-proxy/holdings/summary";
|
|
89
|
+
}, {
|
|
90
|
+
readonly clientMethod: "listUnclaimedDevelopmentFundCoupons";
|
|
91
|
+
readonly proxyOperationId: "listUnclaimedDevelopmentFundCoupons";
|
|
92
|
+
readonly scanOperationId: "listUnclaimedDevelopmentFundCoupons";
|
|
93
|
+
readonly method: "GET";
|
|
94
|
+
readonly path: "/v0/scan-proxy/unclaimed-development-fund-coupons";
|
|
95
|
+
}];
|
|
96
|
+
export type GaScanProxyOperation = (typeof GA_SCAN_PROXY_OPERATIONS)[number];
|
|
97
|
+
export type ScanProxyClient = {
|
|
98
|
+
getDsoPartyId: (options?: ScanProxyRequestOptions) => Promise<ScanProxyDsoPartyIdResponse>;
|
|
99
|
+
getDsoInfo: (options?: ScanProxyRequestOptions) => Promise<ScanProxyDsoInfoResponse>;
|
|
100
|
+
getOpenAndIssuingMiningRounds: (options?: ScanProxyRequestOptions) => Promise<ScanProxyOpenAndIssuingMiningRoundsResponse>;
|
|
101
|
+
listAnsEntries: (request: ScanProxyListAnsEntriesRequest, options?: ScanProxyRequestOptions) => Promise<ScanProxyListAnsEntriesResponse>;
|
|
102
|
+
lookupAnsEntryByParty: (request: ScanProxyLookupAnsEntryByPartyRequest, options?: ScanProxyRequestOptions) => Promise<ScanProxyLookupAnsEntryByPartyResponse>;
|
|
103
|
+
lookupAnsEntryByName: (request: ScanProxyLookupAnsEntryByNameRequest, options?: ScanProxyRequestOptions) => Promise<ScanProxyLookupAnsEntryByNameResponse>;
|
|
104
|
+
getHoldingsSummaryAt: (request: ScanProxyHoldingsSummaryRequest, options?: ScanProxyRequestOptions) => Promise<ScanProxyHoldingsSummaryResponse>;
|
|
105
|
+
listUnclaimedDevelopmentFundCoupons: (options?: ScanProxyRequestOptions) => Promise<ScanProxyUnclaimedDevelopmentFundCouponsResponse>;
|
|
106
|
+
};
|
|
107
|
+
export declare function createScanProxyClient(config: ScanProxyClientConfig): ScanProxyClient;
|
|
108
|
+
export {};
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { jsonApi } from 'cantonjs';
|
|
2
|
+
export const GA_SCAN_PROXY_OPERATIONS = [
|
|
3
|
+
{
|
|
4
|
+
clientMethod: 'getDsoPartyId',
|
|
5
|
+
proxyOperationId: 'getDsoPartyId',
|
|
6
|
+
scanOperationId: 'getDsoPartyId',
|
|
7
|
+
method: 'GET',
|
|
8
|
+
path: '/v0/scan-proxy/dso-party-id',
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
clientMethod: 'getDsoInfo',
|
|
12
|
+
proxyOperationId: 'getDsoInfo',
|
|
13
|
+
scanOperationId: 'getDsoInfo',
|
|
14
|
+
method: 'GET',
|
|
15
|
+
path: '/v0/scan-proxy/dso',
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
clientMethod: 'getOpenAndIssuingMiningRounds',
|
|
19
|
+
proxyOperationId: 'getOpenAndIssuingMiningRounds',
|
|
20
|
+
scanOperationId: 'getOpenAndIssuingMiningRounds',
|
|
21
|
+
method: 'GET',
|
|
22
|
+
path: '/v0/scan-proxy/open-and-issuing-mining-rounds',
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
clientMethod: 'lookupAnsEntryByParty',
|
|
26
|
+
proxyOperationId: 'lookupAnsEntryByParty',
|
|
27
|
+
scanOperationId: 'lookupAnsEntryByParty',
|
|
28
|
+
method: 'GET',
|
|
29
|
+
path: '/v0/scan-proxy/ans-entries/by-party/{party}',
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
clientMethod: 'listAnsEntries',
|
|
33
|
+
proxyOperationId: 'listAnsEntries',
|
|
34
|
+
scanOperationId: 'listAnsEntries',
|
|
35
|
+
method: 'GET',
|
|
36
|
+
path: '/v0/scan-proxy/ans-entries',
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
clientMethod: 'lookupAnsEntryByName',
|
|
40
|
+
proxyOperationId: 'lookupAnsEntryByName',
|
|
41
|
+
scanOperationId: 'lookupAnsEntryByName',
|
|
42
|
+
method: 'GET',
|
|
43
|
+
path: '/v0/scan-proxy/ans-entries/by-name/{name}',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
clientMethod: 'getHoldingsSummaryAt',
|
|
47
|
+
proxyOperationId: 'getHoldingsSummaryAt',
|
|
48
|
+
scanOperationId: 'getHoldingsSummaryAt',
|
|
49
|
+
method: 'POST',
|
|
50
|
+
path: '/v0/scan-proxy/holdings/summary',
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
clientMethod: 'listUnclaimedDevelopmentFundCoupons',
|
|
54
|
+
proxyOperationId: 'listUnclaimedDevelopmentFundCoupons',
|
|
55
|
+
scanOperationId: 'listUnclaimedDevelopmentFundCoupons',
|
|
56
|
+
method: 'GET',
|
|
57
|
+
path: '/v0/scan-proxy/unclaimed-development-fund-coupons',
|
|
58
|
+
},
|
|
59
|
+
];
|
|
60
|
+
export function createScanProxyClient(config) {
|
|
61
|
+
const transport = jsonApi(config);
|
|
62
|
+
return {
|
|
63
|
+
async getDsoPartyId(options) {
|
|
64
|
+
return await transport.request({
|
|
65
|
+
method: 'GET',
|
|
66
|
+
path: '/v0/scan-proxy/dso-party-id',
|
|
67
|
+
signal: options?.signal,
|
|
68
|
+
});
|
|
69
|
+
},
|
|
70
|
+
async getDsoInfo(options) {
|
|
71
|
+
return await transport.request({
|
|
72
|
+
method: 'GET',
|
|
73
|
+
path: '/v0/scan-proxy/dso',
|
|
74
|
+
signal: options?.signal,
|
|
75
|
+
});
|
|
76
|
+
},
|
|
77
|
+
async getOpenAndIssuingMiningRounds(options) {
|
|
78
|
+
return await transport.request({
|
|
79
|
+
method: 'GET',
|
|
80
|
+
path: '/v0/scan-proxy/open-and-issuing-mining-rounds',
|
|
81
|
+
signal: options?.signal,
|
|
82
|
+
});
|
|
83
|
+
},
|
|
84
|
+
async listAnsEntries(request, options) {
|
|
85
|
+
return await transport.request({
|
|
86
|
+
method: 'GET',
|
|
87
|
+
path: buildRequestPath('/v0/scan-proxy/ans-entries', {
|
|
88
|
+
query: request,
|
|
89
|
+
}),
|
|
90
|
+
signal: options?.signal,
|
|
91
|
+
});
|
|
92
|
+
},
|
|
93
|
+
async lookupAnsEntryByParty(request, options) {
|
|
94
|
+
return await transport.request({
|
|
95
|
+
method: 'GET',
|
|
96
|
+
path: buildRequestPath('/v0/scan-proxy/ans-entries/by-party/{party}', {
|
|
97
|
+
pathParams: request,
|
|
98
|
+
}),
|
|
99
|
+
signal: options?.signal,
|
|
100
|
+
});
|
|
101
|
+
},
|
|
102
|
+
async lookupAnsEntryByName(request, options) {
|
|
103
|
+
return await transport.request({
|
|
104
|
+
method: 'GET',
|
|
105
|
+
path: buildRequestPath('/v0/scan-proxy/ans-entries/by-name/{name}', {
|
|
106
|
+
pathParams: request,
|
|
107
|
+
}),
|
|
108
|
+
signal: options?.signal,
|
|
109
|
+
});
|
|
110
|
+
},
|
|
111
|
+
async getHoldingsSummaryAt(request, options) {
|
|
112
|
+
return await transport.request({
|
|
113
|
+
method: 'POST',
|
|
114
|
+
path: '/v0/scan-proxy/holdings/summary',
|
|
115
|
+
body: request,
|
|
116
|
+
signal: options?.signal,
|
|
117
|
+
});
|
|
118
|
+
},
|
|
119
|
+
async listUnclaimedDevelopmentFundCoupons(options) {
|
|
120
|
+
return await transport.request({
|
|
121
|
+
method: 'GET',
|
|
122
|
+
path: '/v0/scan-proxy/unclaimed-development-fund-coupons',
|
|
123
|
+
signal: options?.signal,
|
|
124
|
+
});
|
|
125
|
+
},
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
function buildRequestPath(pathTemplate, options) {
|
|
129
|
+
const path = interpolatePathParams(pathTemplate, options?.pathParams);
|
|
130
|
+
const queryString = buildQueryString(options?.query);
|
|
131
|
+
return queryString.length === 0 ? path : `${path}?${queryString}`;
|
|
132
|
+
}
|
|
133
|
+
function interpolatePathParams(pathTemplate, pathParams) {
|
|
134
|
+
return pathTemplate.replace(/\{([^}]+)\}/g, (_match, key) => {
|
|
135
|
+
const value = pathParams?.[key];
|
|
136
|
+
if (value === undefined) {
|
|
137
|
+
throw new Error(`Missing required Scan Proxy path parameter: ${key}`);
|
|
138
|
+
}
|
|
139
|
+
return encodeURIComponent(String(value));
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
function buildQueryString(query) {
|
|
143
|
+
if (query === undefined) {
|
|
144
|
+
return '';
|
|
145
|
+
}
|
|
146
|
+
const params = new URLSearchParams();
|
|
147
|
+
for (const [key, value] of Object.entries(query)) {
|
|
148
|
+
if (value === undefined || value === null) {
|
|
149
|
+
continue;
|
|
150
|
+
}
|
|
151
|
+
if (Array.isArray(value)) {
|
|
152
|
+
for (const item of value) {
|
|
153
|
+
params.append(key, String(item));
|
|
154
|
+
}
|
|
155
|
+
continue;
|
|
156
|
+
}
|
|
157
|
+
params.append(key, String(value));
|
|
158
|
+
}
|
|
159
|
+
return params.toString();
|
|
160
|
+
}
|
|
161
|
+
//# sourceMappingURL=createScanProxyClient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createScanProxyClient.js","sourceRoot":"","sources":["../src/createScanProxyClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAwB,MAAM,UAAU,CAAA;AAgDxD,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC;QACE,YAAY,EAAE,eAAe;QAC7B,gBAAgB,EAAE,eAAe;QACjC,eAAe,EAAE,eAAe;QAChC,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,6BAA6B;KACpC;IACD;QACE,YAAY,EAAE,YAAY;QAC1B,gBAAgB,EAAE,YAAY;QAC9B,eAAe,EAAE,YAAY;QAC7B,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,oBAAoB;KAC3B;IACD;QACE,YAAY,EAAE,+BAA+B;QAC7C,gBAAgB,EAAE,+BAA+B;QACjD,eAAe,EAAE,+BAA+B;QAChD,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,+CAA+C;KACtD;IACD;QACE,YAAY,EAAE,uBAAuB;QACrC,gBAAgB,EAAE,uBAAuB;QACzC,eAAe,EAAE,uBAAuB;QACxC,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,6CAA6C;KACpD;IACD;QACE,YAAY,EAAE,gBAAgB;QAC9B,gBAAgB,EAAE,gBAAgB;QAClC,eAAe,EAAE,gBAAgB;QACjC,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,4BAA4B;KACnC;IACD;QACE,YAAY,EAAE,sBAAsB;QACpC,gBAAgB,EAAE,sBAAsB;QACxC,eAAe,EAAE,sBAAsB;QACvC,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,2CAA2C;KAClD;IACD;QACE,YAAY,EAAE,sBAAsB;QACpC,gB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