@chainlink/ccip-sdk 0.93.0 → 0.95.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/dist/api/index.d.ts +80 -4
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +262 -6
- package/dist/api/index.js.map +1 -1
- package/dist/api/types.d.ts +138 -13
- package/dist/api/types.d.ts.map +1 -1
- package/dist/aptos/index.d.ts +5 -9
- package/dist/aptos/index.d.ts.map +1 -1
- package/dist/aptos/index.js +26 -25
- package/dist/aptos/index.js.map +1 -1
- package/dist/aptos/logs.js +3 -3
- package/dist/aptos/logs.js.map +1 -1
- package/dist/aptos/send.js +1 -1
- package/dist/aptos/send.js.map +1 -1
- package/dist/chain.d.ts +96 -10
- package/dist/chain.d.ts.map +1 -1
- package/dist/chain.js +77 -2
- package/dist/chain.js.map +1 -1
- package/dist/errors/codes.d.ts +7 -3
- package/dist/errors/codes.d.ts.map +1 -1
- package/dist/errors/codes.js +8 -3
- package/dist/errors/codes.js.map +1 -1
- package/dist/errors/index.d.ts +7 -7
- package/dist/errors/index.d.ts.map +1 -1
- package/dist/errors/index.js +7 -7
- package/dist/errors/index.js.map +1 -1
- package/dist/errors/recovery.d.ts.map +1 -1
- package/dist/errors/recovery.js +8 -4
- package/dist/errors/recovery.js.map +1 -1
- package/dist/errors/specialized.d.ts +53 -18
- package/dist/errors/specialized.d.ts.map +1 -1
- package/dist/errors/specialized.js +112 -37
- package/dist/errors/specialized.js.map +1 -1
- package/dist/evm/gas.d.ts +14 -0
- package/dist/evm/gas.d.ts.map +1 -0
- package/dist/evm/gas.js +97 -0
- package/dist/evm/gas.js.map +1 -0
- package/dist/evm/index.d.ts +6 -8
- package/dist/evm/index.d.ts.map +1 -1
- package/dist/evm/index.js +36 -23
- package/dist/evm/index.js.map +1 -1
- package/dist/evm/offchain.d.ts.map +1 -1
- package/dist/evm/offchain.js +8 -8
- package/dist/evm/offchain.js.map +1 -1
- package/dist/execution.d.ts.map +1 -1
- package/dist/execution.js +8 -1
- package/dist/execution.js.map +1 -1
- package/dist/gas.d.ts +43 -19
- package/dist/gas.d.ts.map +1 -1
- package/dist/gas.js +48 -68
- package/dist/gas.js.map +1 -1
- package/dist/index.d.ts +15 -13
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/dist/offchain.d.ts +5 -4
- package/dist/offchain.d.ts.map +1 -1
- package/dist/offchain.js +7 -6
- package/dist/offchain.js.map +1 -1
- package/dist/requests.d.ts +21 -13
- package/dist/requests.d.ts.map +1 -1
- package/dist/requests.js +79 -47
- package/dist/requests.js.map +1 -1
- package/dist/selectors.d.ts +2 -1
- package/dist/selectors.d.ts.map +1 -1
- package/dist/selectors.js +629 -274
- package/dist/selectors.js.map +1 -1
- package/dist/solana/exec.d.ts.map +1 -1
- package/dist/solana/exec.js +2 -1
- package/dist/solana/exec.js.map +1 -1
- package/dist/solana/index.d.ts +10 -10
- package/dist/solana/index.d.ts.map +1 -1
- package/dist/solana/index.js +82 -18
- package/dist/solana/index.js.map +1 -1
- package/dist/solana/offchain.js +2 -2
- package/dist/solana/offchain.js.map +1 -1
- package/dist/solana/send.d.ts.map +1 -1
- package/dist/solana/send.js +6 -9
- package/dist/solana/send.js.map +1 -1
- package/dist/solana/utils.d.ts +29 -1
- package/dist/solana/utils.d.ts.map +1 -1
- package/dist/solana/utils.js +39 -1
- package/dist/solana/utils.js.map +1 -1
- package/dist/sui/discovery.d.ts +7 -4
- package/dist/sui/discovery.d.ts.map +1 -1
- package/dist/sui/discovery.js +66 -19
- package/dist/sui/discovery.js.map +1 -1
- package/dist/sui/events.d.ts +23 -12
- package/dist/sui/events.d.ts.map +1 -1
- package/dist/sui/events.js +267 -128
- package/dist/sui/events.js.map +1 -1
- package/dist/sui/index.d.ts +32 -39
- package/dist/sui/index.d.ts.map +1 -1
- package/dist/sui/index.js +289 -163
- package/dist/sui/index.js.map +1 -1
- package/dist/sui/manuallyExec/encoder.d.ts.map +1 -1
- package/dist/sui/manuallyExec/encoder.js +1 -0
- package/dist/sui/manuallyExec/encoder.js.map +1 -1
- package/dist/sui/manuallyExec/index.d.ts.map +1 -1
- package/dist/sui/manuallyExec/index.js +1 -0
- package/dist/sui/manuallyExec/index.js.map +1 -1
- package/dist/sui/objects.d.ts +14 -4
- package/dist/sui/objects.d.ts.map +1 -1
- package/dist/sui/objects.js +63 -69
- package/dist/sui/objects.js.map +1 -1
- package/dist/sui/types.d.ts +33 -0
- package/dist/sui/types.d.ts.map +1 -1
- package/dist/sui/types.js.map +1 -1
- package/dist/ton/hasher.d.ts.map +1 -1
- package/dist/ton/hasher.js +1 -0
- package/dist/ton/hasher.js.map +1 -1
- package/dist/ton/index.d.ts +4 -4
- package/dist/ton/index.d.ts.map +1 -1
- package/dist/ton/index.js +8 -8
- package/dist/ton/index.js.map +1 -1
- package/dist/ton/utils.d.ts +3 -3
- package/dist/ton/utils.d.ts.map +1 -1
- package/dist/ton/utils.js +6 -5
- package/dist/ton/utils.js.map +1 -1
- package/dist/types.d.ts +34 -10
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +19 -5
- package/dist/types.js.map +1 -1
- package/dist/utils.d.ts +53 -1
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +109 -12
- package/dist/utils.js.map +1 -1
- package/package.json +17 -11
- package/src/api/index.ts +343 -9
- package/src/api/types.ts +165 -13
- package/src/aptos/index.ts +32 -32
- package/src/aptos/logs.ts +3 -3
- package/src/aptos/send.ts +1 -1
- package/src/chain.ts +165 -12
- package/src/errors/codes.ts +8 -3
- package/src/errors/index.ts +7 -4
- package/src/errors/recovery.ts +16 -5
- package/src/errors/specialized.ts +147 -45
- package/src/evm/gas.ts +149 -0
- package/src/evm/index.ts +66 -33
- package/src/evm/offchain.ts +15 -9
- package/src/execution.ts +8 -1
- package/src/gas.ts +95 -116
- package/src/index.ts +16 -6
- package/src/offchain.ts +12 -6
- package/src/requests.ts +113 -59
- package/src/selectors.ts +636 -276
- package/src/solana/exec.ts +3 -1
- package/src/solana/index.ts +119 -23
- package/src/solana/offchain.ts +2 -2
- package/src/solana/send.ts +5 -23
- package/src/solana/utils.ts +66 -0
- package/src/sui/discovery.ts +92 -31
- package/src/sui/events.ts +346 -239
- package/src/sui/index.ts +381 -224
- package/src/sui/manuallyExec/encoder.ts +2 -0
- package/src/sui/manuallyExec/index.ts +2 -0
- package/src/sui/objects.ts +77 -99
- package/src/sui/types.ts +35 -0
- package/src/ton/hasher.ts +2 -0
- package/src/ton/index.ts +12 -11
- package/src/ton/utils.ts +7 -6
- package/src/types.ts +36 -10
- package/src/utils.ts +153 -16
package/dist/api/index.d.ts
CHANGED
|
@@ -1,14 +1,18 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type {
|
|
3
|
-
export type { APIErrorResponse, LaneLatencyResponse } from './types.ts';
|
|
1
|
+
import { type Logger, type WithLogger } from '../types.ts';
|
|
2
|
+
import type { APICCIPRequest, LaneLatencyResponse } from './types.ts';
|
|
3
|
+
export type { APICCIPRequest, APICCIPRequestMetadata, APIErrorResponse, LaneLatencyResponse, } from './types.ts';
|
|
4
4
|
/** Default CCIP API base URL */
|
|
5
|
-
export declare const DEFAULT_API_BASE_URL = "https://api.ccip.
|
|
5
|
+
export declare const DEFAULT_API_BASE_URL = "https://api.ccip.cldev.cloud";
|
|
6
|
+
/** Default timeout for API requests in milliseconds */
|
|
7
|
+
export declare const DEFAULT_TIMEOUT_MS = 30000;
|
|
6
8
|
/**
|
|
7
9
|
* Context for CCIPAPIClient initialization.
|
|
8
10
|
*/
|
|
9
11
|
export type CCIPAPIClientContext = WithLogger & {
|
|
10
12
|
/** Custom fetch function (defaults to globalThis.fetch) */
|
|
11
13
|
fetch?: typeof fetch;
|
|
14
|
+
/** Request timeout in milliseconds (defaults to 30000ms) */
|
|
15
|
+
timeoutMs?: number;
|
|
12
16
|
};
|
|
13
17
|
/**
|
|
14
18
|
* Client for interacting with the CCIP REST API.
|
|
@@ -49,6 +53,8 @@ export declare class CCIPAPIClient {
|
|
|
49
53
|
readonly baseUrl: string;
|
|
50
54
|
/** Logger instance */
|
|
51
55
|
readonly logger: Logger;
|
|
56
|
+
/** Request timeout in milliseconds */
|
|
57
|
+
readonly timeoutMs: number;
|
|
52
58
|
/** Fetch function used for HTTP requests */
|
|
53
59
|
private readonly _fetch;
|
|
54
60
|
/**
|
|
@@ -65,6 +71,15 @@ export declare class CCIPAPIClient {
|
|
|
65
71
|
* @returns New CCIPAPIClient instance
|
|
66
72
|
*/
|
|
67
73
|
static fromUrl(baseUrl?: string, ctx?: CCIPAPIClientContext): Promise<CCIPAPIClient>;
|
|
74
|
+
/**
|
|
75
|
+
* Performs a fetch request with timeout protection.
|
|
76
|
+
* @param url - URL to fetch
|
|
77
|
+
* @param operation - Operation name for error context
|
|
78
|
+
* @returns Promise resolving to Response
|
|
79
|
+
* @throws CCIPTimeoutError if request times out
|
|
80
|
+
* @internal
|
|
81
|
+
*/
|
|
82
|
+
private _fetchWithTimeout;
|
|
68
83
|
/**
|
|
69
84
|
* Fetches estimated lane latency between source and destination chains.
|
|
70
85
|
*
|
|
@@ -99,5 +114,66 @@ export declare class CCIPAPIClient {
|
|
|
99
114
|
* ```
|
|
100
115
|
*/
|
|
101
116
|
getLaneLatency(sourceChainSelector: bigint, destChainSelector: bigint): Promise<LaneLatencyResponse>;
|
|
117
|
+
/**
|
|
118
|
+
* Fetches a CCIP message by its unique message ID.
|
|
119
|
+
*
|
|
120
|
+
* @param messageId - The message ID (0x prefix + 64 hex characters, e.g., "0x1234...abcd")
|
|
121
|
+
* @returns Promise resolving to {@link APICCIPRequest} with message details
|
|
122
|
+
*
|
|
123
|
+
* @throws {@link CCIPMessageIdValidationError} when messageId format is invalid
|
|
124
|
+
* @throws {@link CCIPMessageIdNotFoundError} when message not found (404)
|
|
125
|
+
* @throws {@link CCIPHttpError} on HTTP errors with context:
|
|
126
|
+
* - `status` - HTTP status code
|
|
127
|
+
* - `statusText` - HTTP status message
|
|
128
|
+
* - `apiErrorCode` - API error code (e.g., "INVALID_MESSAGE_ID")
|
|
129
|
+
* - `apiErrorMessage` - Human-readable error message
|
|
130
|
+
*
|
|
131
|
+
* @example Basic usage
|
|
132
|
+
* ```typescript
|
|
133
|
+
* const request = await api.getMessageById(
|
|
134
|
+
* '0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef'
|
|
135
|
+
* )
|
|
136
|
+
* console.log(`Status: ${request.status}`)
|
|
137
|
+
* console.log(`From: ${request.message?.sender}`)
|
|
138
|
+
* ```
|
|
139
|
+
*
|
|
140
|
+
* @example Handling not found
|
|
141
|
+
* ```typescript
|
|
142
|
+
* try {
|
|
143
|
+
* const request = await api.getMessageById(messageId)
|
|
144
|
+
* } catch (err) {
|
|
145
|
+
* if (err instanceof CCIPMessageIdNotFoundError) {
|
|
146
|
+
* console.error('Message not found, it may still be in transit')
|
|
147
|
+
* }
|
|
148
|
+
* }
|
|
149
|
+
* ```
|
|
150
|
+
*/
|
|
151
|
+
getMessageById(messageId: string): Promise<APICCIPRequest>;
|
|
152
|
+
/**
|
|
153
|
+
* Fetches message IDs from a source transaction hash.
|
|
154
|
+
*
|
|
155
|
+
* @param txHash - Source transaction hash (EVM hex or Solana Base58)
|
|
156
|
+
* @returns Promise resolving to array of message IDs
|
|
157
|
+
*
|
|
158
|
+
* @throws {@link CCIPArgumentInvalidError} when txHash format is invalid
|
|
159
|
+
* @throws {@link CCIPMessageNotFoundInTxError} when no messages found (404 or empty)
|
|
160
|
+
* @throws {@link CCIPUnexpectedPaginationError} when hasNextPage is true
|
|
161
|
+
* @throws {@link CCIPHttpError} on HTTP errors
|
|
162
|
+
*
|
|
163
|
+
* @example Basic usage
|
|
164
|
+
* ```typescript
|
|
165
|
+
* const messageIds = await api.getMessageIdsInTx(
|
|
166
|
+
* '0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef'
|
|
167
|
+
* )
|
|
168
|
+
* console.log(`Found ${messageIds.length} messages`)
|
|
169
|
+
* ```
|
|
170
|
+
*/
|
|
171
|
+
getMessageIdsInTx(txHash: string): Promise<string[]>;
|
|
172
|
+
/**
|
|
173
|
+
* Transforms raw API response to APICCIPRequest.
|
|
174
|
+
* Populates all derivable CCIPRequest fields from API data.
|
|
175
|
+
* @internal
|
|
176
|
+
*/
|
|
177
|
+
private _transformMessageResponse;
|
|
102
178
|
}
|
|
103
179
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/api/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAUA,OAAO,EAIL,KAAK,MAAM,EAEX,KAAK,UAAU,EAKhB,MAAM,aAAa,CAAA;AAEpB,OAAO,KAAK,EACV,cAAc,EAEd,mBAAmB,EAKpB,MAAM,YAAY,CAAA;AAEnB,YAAY,EACV,cAAc,EACd,sBAAsB,EACtB,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,YAAY,CAAA;AAEnB,gCAAgC;AAChC,eAAO,MAAM,oBAAoB,iCAAiC,CAAA;AAElE,uDAAuD;AACvD,eAAO,MAAM,kBAAkB,QAAQ,CAAA;AAEvC;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,UAAU,GAAG;IAC9C,2DAA2D;IAC3D,KAAK,CAAC,EAAE,OAAO,KAAK,CAAA;IACpB,4DAA4D;IAC5D,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AA2BD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,qBAAa,aAAa;IACxB,gCAAgC;IAChC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,sBAAsB;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,sCAAsC;IACtC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,4CAA4C;IAC5C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAc;IAErC;;;;OAIG;gBACS,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,oBAAoB;IAOxD;;;;;;OAMG;IACH,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,aAAa,CAAC;IAIpF;;;;;;;OAOG;YACW,iBAAiB;IAgB/B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgCG;IACG,cAAc,CAClB,mBAAmB,EAAE,MAAM,EAC3B,iBAAiB,EAAE,MAAM,GACxB,OAAO,CAAC,mBAAmB,CAAC;IAiD/B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiCG;IACG,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IA4ChE;;;;;;;;;;;;;;;;;;OAkBG;IACG,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IA0D1D;;;;OAIG;IACH,OAAO,CAAC,yBAAyB;CAmFlC"}
|
package/dist/api/index.js
CHANGED
|
@@ -1,7 +1,34 @@
|
|
|
1
|
-
import { CCIPHttpError, CCIPLaneNotFoundError } from "../errors/index.js";
|
|
1
|
+
import { CCIPHttpError, CCIPLaneNotFoundError, CCIPMessageIdNotFoundError, CCIPMessageNotFoundInTxError, CCIPTimeoutError, CCIPUnexpectedPaginationError, } from "../errors/index.js";
|
|
2
2
|
import { HttpStatus } from "../http-status.js";
|
|
3
|
+
import { decodeMessage } from "../requests.js";
|
|
4
|
+
import { CCIPVersion, ChainFamily, MessageStatus, NetworkType, } from "../types.js";
|
|
5
|
+
import { bigIntReviver, parseJson } from "../utils.js";
|
|
3
6
|
/** Default CCIP API base URL */
|
|
4
|
-
export const DEFAULT_API_BASE_URL = 'https://api.ccip.
|
|
7
|
+
export const DEFAULT_API_BASE_URL = 'https://api.ccip.cldev.cloud';
|
|
8
|
+
/** Default timeout for API requests in milliseconds */
|
|
9
|
+
export const DEFAULT_TIMEOUT_MS = 30000;
|
|
10
|
+
const validateChainFamily = (value, logger) => {
|
|
11
|
+
const validFamilies = Object.values(ChainFamily);
|
|
12
|
+
if (validFamilies.includes(value)) {
|
|
13
|
+
return value;
|
|
14
|
+
}
|
|
15
|
+
logger.warn(`Unexpected chainFamily value from API: "${value}", using UNKNOWN`);
|
|
16
|
+
return ChainFamily.Unknown;
|
|
17
|
+
};
|
|
18
|
+
const validateMessageStatus = (value, logger) => {
|
|
19
|
+
const validStatuses = Object.values(MessageStatus);
|
|
20
|
+
if (validStatuses.includes(value)) {
|
|
21
|
+
return value;
|
|
22
|
+
}
|
|
23
|
+
logger.warn(`Unexpected message status from API: "${value}", using UNKNOWN`);
|
|
24
|
+
return MessageStatus.Unknown;
|
|
25
|
+
};
|
|
26
|
+
const ensureNetworkInfo = (o, logger) => {
|
|
27
|
+
return Object.assign(o, {
|
|
28
|
+
networkType: o.name.includes('-mainnet') ? NetworkType.Mainnet : NetworkType.Testnet,
|
|
29
|
+
...(!('family' in o) && { family: validateChainFamily(o.chainFamily, logger) }),
|
|
30
|
+
});
|
|
31
|
+
};
|
|
5
32
|
/**
|
|
6
33
|
* Client for interacting with the CCIP REST API.
|
|
7
34
|
*
|
|
@@ -41,6 +68,8 @@ export class CCIPAPIClient {
|
|
|
41
68
|
baseUrl;
|
|
42
69
|
/** Logger instance */
|
|
43
70
|
logger;
|
|
71
|
+
/** Request timeout in milliseconds */
|
|
72
|
+
timeoutMs;
|
|
44
73
|
/** Fetch function used for HTTP requests */
|
|
45
74
|
_fetch;
|
|
46
75
|
/**
|
|
@@ -51,6 +80,7 @@ export class CCIPAPIClient {
|
|
|
51
80
|
constructor(baseUrl, ctx) {
|
|
52
81
|
this.baseUrl = baseUrl ?? DEFAULT_API_BASE_URL;
|
|
53
82
|
this.logger = ctx?.logger ?? console;
|
|
83
|
+
this.timeoutMs = ctx?.timeoutMs ?? DEFAULT_TIMEOUT_MS;
|
|
54
84
|
this._fetch = ctx?.fetch ?? globalThis.fetch;
|
|
55
85
|
}
|
|
56
86
|
/**
|
|
@@ -63,6 +93,30 @@ export class CCIPAPIClient {
|
|
|
63
93
|
static fromUrl(baseUrl, ctx) {
|
|
64
94
|
return Promise.resolve(new CCIPAPIClient(baseUrl, ctx));
|
|
65
95
|
}
|
|
96
|
+
/**
|
|
97
|
+
* Performs a fetch request with timeout protection.
|
|
98
|
+
* @param url - URL to fetch
|
|
99
|
+
* @param operation - Operation name for error context
|
|
100
|
+
* @returns Promise resolving to Response
|
|
101
|
+
* @throws CCIPTimeoutError if request times out
|
|
102
|
+
* @internal
|
|
103
|
+
*/
|
|
104
|
+
async _fetchWithTimeout(url, operation) {
|
|
105
|
+
const controller = new AbortController();
|
|
106
|
+
const timeoutId = setTimeout(() => controller.abort(), this.timeoutMs);
|
|
107
|
+
try {
|
|
108
|
+
return await this._fetch(url, { signal: controller.signal });
|
|
109
|
+
}
|
|
110
|
+
catch (error) {
|
|
111
|
+
if (error instanceof Error && error.name === 'AbortError') {
|
|
112
|
+
throw new CCIPTimeoutError(operation, this.timeoutMs);
|
|
113
|
+
}
|
|
114
|
+
throw error;
|
|
115
|
+
}
|
|
116
|
+
finally {
|
|
117
|
+
clearTimeout(timeoutId);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
66
120
|
/**
|
|
67
121
|
* Fetches estimated lane latency between source and destination chains.
|
|
68
122
|
*
|
|
@@ -97,16 +151,16 @@ export class CCIPAPIClient {
|
|
|
97
151
|
* ```
|
|
98
152
|
*/
|
|
99
153
|
async getLaneLatency(sourceChainSelector, destChainSelector) {
|
|
100
|
-
const url = new URL(`${this.baseUrl}/
|
|
154
|
+
const url = new URL(`${this.baseUrl}/v2/lanes/latency`);
|
|
101
155
|
url.searchParams.set('sourceChainSelector', sourceChainSelector.toString());
|
|
102
156
|
url.searchParams.set('destChainSelector', destChainSelector.toString());
|
|
103
157
|
this.logger.debug(`CCIPAPIClient: GET ${url.toString()}`);
|
|
104
|
-
const response = await this.
|
|
158
|
+
const response = await this._fetchWithTimeout(url.toString(), 'getLaneLatency');
|
|
105
159
|
if (!response.ok) {
|
|
106
160
|
// Try to parse structured error response from API
|
|
107
161
|
let apiError;
|
|
108
162
|
try {
|
|
109
|
-
apiError = (await response.
|
|
163
|
+
apiError = parseJson(await response.text());
|
|
110
164
|
}
|
|
111
165
|
catch {
|
|
112
166
|
// Response body not JSON, use HTTP status only
|
|
@@ -132,10 +186,212 @@ export class CCIPAPIClient {
|
|
|
132
186
|
: undefined,
|
|
133
187
|
});
|
|
134
188
|
}
|
|
135
|
-
const raw = (await response.
|
|
189
|
+
const raw = JSON.parse(await response.text(), bigIntReviver);
|
|
136
190
|
// Log full raw response for debugging
|
|
137
191
|
this.logger.debug('getLaneLatency raw response:', raw);
|
|
138
192
|
return { totalMs: raw.totalMs };
|
|
139
193
|
}
|
|
194
|
+
/**
|
|
195
|
+
* Fetches a CCIP message by its unique message ID.
|
|
196
|
+
*
|
|
197
|
+
* @param messageId - The message ID (0x prefix + 64 hex characters, e.g., "0x1234...abcd")
|
|
198
|
+
* @returns Promise resolving to {@link APICCIPRequest} with message details
|
|
199
|
+
*
|
|
200
|
+
* @throws {@link CCIPMessageIdValidationError} when messageId format is invalid
|
|
201
|
+
* @throws {@link CCIPMessageIdNotFoundError} when message not found (404)
|
|
202
|
+
* @throws {@link CCIPHttpError} on HTTP errors with context:
|
|
203
|
+
* - `status` - HTTP status code
|
|
204
|
+
* - `statusText` - HTTP status message
|
|
205
|
+
* - `apiErrorCode` - API error code (e.g., "INVALID_MESSAGE_ID")
|
|
206
|
+
* - `apiErrorMessage` - Human-readable error message
|
|
207
|
+
*
|
|
208
|
+
* @example Basic usage
|
|
209
|
+
* ```typescript
|
|
210
|
+
* const request = await api.getMessageById(
|
|
211
|
+
* '0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef'
|
|
212
|
+
* )
|
|
213
|
+
* console.log(`Status: ${request.status}`)
|
|
214
|
+
* console.log(`From: ${request.message?.sender}`)
|
|
215
|
+
* ```
|
|
216
|
+
*
|
|
217
|
+
* @example Handling not found
|
|
218
|
+
* ```typescript
|
|
219
|
+
* try {
|
|
220
|
+
* const request = await api.getMessageById(messageId)
|
|
221
|
+
* } catch (err) {
|
|
222
|
+
* if (err instanceof CCIPMessageIdNotFoundError) {
|
|
223
|
+
* console.error('Message not found, it may still be in transit')
|
|
224
|
+
* }
|
|
225
|
+
* }
|
|
226
|
+
* ```
|
|
227
|
+
*/
|
|
228
|
+
async getMessageById(messageId) {
|
|
229
|
+
const url = `${this.baseUrl}/v2/messages/${encodeURIComponent(messageId)}`;
|
|
230
|
+
this.logger.debug(`CCIPAPIClient: GET ${url}`);
|
|
231
|
+
const response = await this._fetchWithTimeout(url, 'getMessageById');
|
|
232
|
+
if (!response.ok) {
|
|
233
|
+
// Try to parse structured error response from API
|
|
234
|
+
let apiError;
|
|
235
|
+
try {
|
|
236
|
+
apiError = parseJson(await response.text());
|
|
237
|
+
}
|
|
238
|
+
catch {
|
|
239
|
+
// Response body not JSON, use HTTP status only
|
|
240
|
+
}
|
|
241
|
+
// 404 - Message not found
|
|
242
|
+
if (response.status === HttpStatus.NOT_FOUND) {
|
|
243
|
+
throw new CCIPMessageIdNotFoundError(messageId, {
|
|
244
|
+
context: apiError
|
|
245
|
+
? {
|
|
246
|
+
apiErrorCode: apiError.error,
|
|
247
|
+
apiErrorMessage: apiError.message,
|
|
248
|
+
}
|
|
249
|
+
: undefined,
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
// Generic HTTP error for other cases
|
|
253
|
+
throw new CCIPHttpError(response.status, response.statusText, {
|
|
254
|
+
context: apiError
|
|
255
|
+
? {
|
|
256
|
+
apiErrorCode: apiError.error,
|
|
257
|
+
apiErrorMessage: apiError.message,
|
|
258
|
+
}
|
|
259
|
+
: undefined,
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
const raw = await response.text();
|
|
263
|
+
this.logger.debug('getMessageById raw response:', raw);
|
|
264
|
+
return this._transformMessageResponse(raw);
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* Fetches message IDs from a source transaction hash.
|
|
268
|
+
*
|
|
269
|
+
* @param txHash - Source transaction hash (EVM hex or Solana Base58)
|
|
270
|
+
* @returns Promise resolving to array of message IDs
|
|
271
|
+
*
|
|
272
|
+
* @throws {@link CCIPArgumentInvalidError} when txHash format is invalid
|
|
273
|
+
* @throws {@link CCIPMessageNotFoundInTxError} when no messages found (404 or empty)
|
|
274
|
+
* @throws {@link CCIPUnexpectedPaginationError} when hasNextPage is true
|
|
275
|
+
* @throws {@link CCIPHttpError} on HTTP errors
|
|
276
|
+
*
|
|
277
|
+
* @example Basic usage
|
|
278
|
+
* ```typescript
|
|
279
|
+
* const messageIds = await api.getMessageIdsInTx(
|
|
280
|
+
* '0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef'
|
|
281
|
+
* )
|
|
282
|
+
* console.log(`Found ${messageIds.length} messages`)
|
|
283
|
+
* ```
|
|
284
|
+
*/
|
|
285
|
+
async getMessageIdsInTx(txHash) {
|
|
286
|
+
const url = new URL(`${this.baseUrl}/v2/messages`);
|
|
287
|
+
url.searchParams.set('sourceTransactionHash', txHash);
|
|
288
|
+
url.searchParams.set('limit', '100');
|
|
289
|
+
this.logger.debug(`CCIPAPIClient: GET ${url.toString()}`);
|
|
290
|
+
const response = await this._fetchWithTimeout(url.toString(), 'getMessageIdsInTx');
|
|
291
|
+
if (!response.ok) {
|
|
292
|
+
// Try to parse structured error response from API
|
|
293
|
+
let apiError;
|
|
294
|
+
try {
|
|
295
|
+
apiError = parseJson(await response.text());
|
|
296
|
+
}
|
|
297
|
+
catch {
|
|
298
|
+
// Response body not JSON, use HTTP status only
|
|
299
|
+
}
|
|
300
|
+
// 404 - No messages found
|
|
301
|
+
if (response.status === HttpStatus.NOT_FOUND) {
|
|
302
|
+
throw new CCIPMessageNotFoundInTxError(txHash, {
|
|
303
|
+
context: apiError
|
|
304
|
+
? {
|
|
305
|
+
apiErrorCode: apiError.error,
|
|
306
|
+
apiErrorMessage: apiError.message,
|
|
307
|
+
}
|
|
308
|
+
: undefined,
|
|
309
|
+
});
|
|
310
|
+
}
|
|
311
|
+
// Generic HTTP error for other cases
|
|
312
|
+
throw new CCIPHttpError(response.status, response.statusText, {
|
|
313
|
+
context: apiError
|
|
314
|
+
? {
|
|
315
|
+
apiErrorCode: apiError.error,
|
|
316
|
+
apiErrorMessage: apiError.message,
|
|
317
|
+
}
|
|
318
|
+
: undefined,
|
|
319
|
+
});
|
|
320
|
+
}
|
|
321
|
+
const raw = parseJson(await response.text());
|
|
322
|
+
this.logger.debug('getMessageIdsInTx raw response:', raw);
|
|
323
|
+
// Handle empty results
|
|
324
|
+
if (raw.data.length === 0) {
|
|
325
|
+
throw new CCIPMessageNotFoundInTxError(txHash);
|
|
326
|
+
}
|
|
327
|
+
// Handle unexpected pagination (more than 100 messages)
|
|
328
|
+
if (raw.pagination.hasNextPage) {
|
|
329
|
+
throw new CCIPUnexpectedPaginationError(txHash, raw.data.length);
|
|
330
|
+
}
|
|
331
|
+
return raw.data.map((msg) => msg.messageId);
|
|
332
|
+
}
|
|
333
|
+
/**
|
|
334
|
+
* Transforms raw API response to APICCIPRequest.
|
|
335
|
+
* Populates all derivable CCIPRequest fields from API data.
|
|
336
|
+
* @internal
|
|
337
|
+
*/
|
|
338
|
+
_transformMessageResponse(text) {
|
|
339
|
+
// Build message with extraArgs spread and tokenAmounts included
|
|
340
|
+
const raw = decodeMessage(text);
|
|
341
|
+
const { sourceNetworkInfo, destNetworkInfo, status, origin, onramp, version, readyForManualExecution, finality, sendTransactionHash, receiptTransactionHash, sendTimestamp, receiptTimestamp, deliveryTime, sendBlockNumber, sendLogIndex, ...message } = raw;
|
|
342
|
+
const sendDate = new Date(sendTimestamp);
|
|
343
|
+
const sendTimestamp_ = isNaN(sendDate.getTime()) ? 0 : Math.floor(sendDate.getTime() / 1000);
|
|
344
|
+
const receiptDate = receiptTimestamp && new Date(receiptTimestamp);
|
|
345
|
+
const receiptTimestamp_ = receiptDate && !isNaN(receiptDate.getTime())
|
|
346
|
+
? Math.floor(receiptDate.getTime() / 1000)
|
|
347
|
+
: undefined;
|
|
348
|
+
// Build lane - all fields available from API
|
|
349
|
+
const source = ensureNetworkInfo(sourceNetworkInfo, this.logger);
|
|
350
|
+
const dest = ensureNetworkInfo(destNetworkInfo, this.logger);
|
|
351
|
+
const lane = {
|
|
352
|
+
source,
|
|
353
|
+
sourceChainSelector: source.chainSelector,
|
|
354
|
+
dest,
|
|
355
|
+
destChainSelector: dest.chainSelector,
|
|
356
|
+
onRamp: onramp,
|
|
357
|
+
version: (version?.replace(/-dev$/, '') ?? CCIPVersion.V1_6),
|
|
358
|
+
};
|
|
359
|
+
// Build log from API data
|
|
360
|
+
const log = {
|
|
361
|
+
transactionHash: sendTransactionHash,
|
|
362
|
+
address: raw.onramp,
|
|
363
|
+
data: { message: parseJson(text) },
|
|
364
|
+
topics: [lane.version < CCIPVersion.V1_6 ? 'CCIPSendRequested' : 'CCIPMessageSent'],
|
|
365
|
+
index: Number(sendLogIndex),
|
|
366
|
+
blockNumber: Number(sendBlockNumber),
|
|
367
|
+
};
|
|
368
|
+
// Build tx from API data
|
|
369
|
+
const tx = {
|
|
370
|
+
hash: log.transactionHash,
|
|
371
|
+
timestamp: sendTimestamp_,
|
|
372
|
+
from: origin,
|
|
373
|
+
logs: [log],
|
|
374
|
+
blockNumber: Number(sendBlockNumber),
|
|
375
|
+
};
|
|
376
|
+
log.tx = tx;
|
|
377
|
+
// Note: We use type assertions for partial nested objects since Partial<CCIPRequest>
|
|
378
|
+
// requires complete types when provided. These are intentionally partial.
|
|
379
|
+
return {
|
|
380
|
+
// CCIPRequest fields (Partial) - cast partial objects
|
|
381
|
+
lane,
|
|
382
|
+
message,
|
|
383
|
+
log,
|
|
384
|
+
tx,
|
|
385
|
+
// API-specific fields
|
|
386
|
+
status: validateMessageStatus(status, this.logger),
|
|
387
|
+
readyForManualExecution,
|
|
388
|
+
finality,
|
|
389
|
+
receiptTransactionHash,
|
|
390
|
+
receiptTimestamp: receiptTimestamp_,
|
|
391
|
+
deliveryTime,
|
|
392
|
+
sourceNetworkInfo: ensureNetworkInfo(sourceNetworkInfo, this.logger),
|
|
393
|
+
destNetworkInfo: ensureNetworkInfo(destNetworkInfo, this.logger),
|
|
394
|
+
};
|
|
395
|
+
}
|
|
140
396
|
}
|
|
141
397
|
//# sourceMappingURL=index.js.map
|
package/dist/api/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,qBAAqB,EACrB,0BAA0B,EAC1B,4BAA4B,EAC5B,gBAAgB,EAChB,6BAA6B,GAC9B,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAC9C,OAAO,EAOL,WAAW,EACX,WAAW,EACX,aAAa,EACb,WAAW,GACZ,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAkBtD,gCAAgC;AAChC,MAAM,CAAC,MAAM,oBAAoB,GAAG,8BAA8B,CAAA;AAElE,uDAAuD;AACvD,MAAM,CAAC,MAAM,kBAAkB,GAAG,KAAK,CAAA;AAYvC,MAAM,mBAAmB,GAAG,CAAC,KAAa,EAAE,MAAc,EAAe,EAAE;IACzE,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC,WAAW,CAAa,CAAA;IAC5D,IAAI,aAA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equest, MessageStatus, NetworkInfo } from '../types.ts';
|
|
1
2
|
/**
|
|
2
|
-
* Response from GET /
|
|
3
|
+
* Response from GET /v2/lanes/latency endpoint.
|
|
3
4
|
* Returns only the latency value - caller already knows source/dest chains.
|
|
4
5
|
*/
|
|
5
6
|
export type LaneLatencyResponse = {
|
|
@@ -9,18 +10,8 @@ export type LaneLatencyResponse = {
|
|
|
9
10
|
/** Raw API response (string selectors, before conversion) */
|
|
10
11
|
export type RawLaneLatencyResponse = {
|
|
11
12
|
lane: {
|
|
12
|
-
sourceNetworkInfo:
|
|
13
|
-
|
|
14
|
-
chainSelector: string;
|
|
15
|
-
chainId: string;
|
|
16
|
-
chainFamily: string;
|
|
17
|
-
};
|
|
18
|
-
destNetworkInfo: {
|
|
19
|
-
name: string;
|
|
20
|
-
chainSelector: string;
|
|
21
|
-
chainId: string;
|
|
22
|
-
chainFamily: string;
|
|
23
|
-
};
|
|
13
|
+
sourceNetworkInfo: RawNetworkInfo;
|
|
14
|
+
destNetworkInfo: RawNetworkInfo;
|
|
24
15
|
routerAddress: string;
|
|
25
16
|
};
|
|
26
17
|
totalMs: number;
|
|
@@ -35,4 +26,138 @@ export type APIErrorResponse = {
|
|
|
35
26
|
/** Human-readable error message with details */
|
|
36
27
|
message: string;
|
|
37
28
|
};
|
|
29
|
+
/** Network info from API response */
|
|
30
|
+
export type RawNetworkInfo = {
|
|
31
|
+
name: string;
|
|
32
|
+
chainSelector: string;
|
|
33
|
+
chainId: string;
|
|
34
|
+
chainFamily: string;
|
|
35
|
+
};
|
|
36
|
+
/** Token amount from API response */
|
|
37
|
+
export type RawTokenAmount = {
|
|
38
|
+
sourceTokenAddress: string;
|
|
39
|
+
destTokenAddress: string;
|
|
40
|
+
sourcePoolAddress: string;
|
|
41
|
+
amount: string;
|
|
42
|
+
extraData?: string | null;
|
|
43
|
+
destGasAmount?: string | null;
|
|
44
|
+
};
|
|
45
|
+
/** EVM extra args from API (GenericExtraArgsV2) */
|
|
46
|
+
export type RawEVMExtraArgs = {
|
|
47
|
+
gasLimit: string;
|
|
48
|
+
allowOutOfOrderExecution: boolean;
|
|
49
|
+
};
|
|
50
|
+
/** SVM extra args from API (SVMExtraArgsV1) */
|
|
51
|
+
export type RawSVMExtraArgs = {
|
|
52
|
+
computeUnits: bigint;
|
|
53
|
+
accountIsWritableBitmap: string;
|
|
54
|
+
allowOutOfOrderExecution: boolean;
|
|
55
|
+
tokenReceiver: string;
|
|
56
|
+
accounts: string[];
|
|
57
|
+
};
|
|
58
|
+
/** Fixed fee detail from API */
|
|
59
|
+
export type RawFixedFee = {
|
|
60
|
+
contractAddress: string;
|
|
61
|
+
feeType: string;
|
|
62
|
+
amount: string;
|
|
63
|
+
};
|
|
64
|
+
/** Fixed fees details wrapper from API response */
|
|
65
|
+
export type RawFixedFeesDetails = {
|
|
66
|
+
tokenAddress: string;
|
|
67
|
+
totalAmount: string;
|
|
68
|
+
items?: RawFixedFee[];
|
|
69
|
+
};
|
|
70
|
+
/** Fees from API response */
|
|
71
|
+
export type RawFees = {
|
|
72
|
+
fixedFeesDetails: RawFixedFeesDetails;
|
|
73
|
+
};
|
|
74
|
+
/** Raw API response from GET /v2/messages/:messageId */
|
|
75
|
+
export type RawMessageResponse = {
|
|
76
|
+
messageId: string;
|
|
77
|
+
sender: string;
|
|
78
|
+
receiver: string;
|
|
79
|
+
status: string;
|
|
80
|
+
sourceNetworkInfo: RawNetworkInfo;
|
|
81
|
+
destNetworkInfo: RawNetworkInfo;
|
|
82
|
+
sendTransactionHash: string;
|
|
83
|
+
sendTimestamp: string;
|
|
84
|
+
tokenAmounts: RawTokenAmount[];
|
|
85
|
+
extraArgs: RawEVMExtraArgs | RawSVMExtraArgs;
|
|
86
|
+
readyForManualExecution: boolean;
|
|
87
|
+
finality: bigint;
|
|
88
|
+
fees: RawFees;
|
|
89
|
+
origin: string;
|
|
90
|
+
sequenceNumber: string;
|
|
91
|
+
onramp: string;
|
|
92
|
+
sendBlockNumber: bigint;
|
|
93
|
+
sendLogIndex: bigint;
|
|
94
|
+
nonce?: string | null;
|
|
95
|
+
routerAddress?: string | null;
|
|
96
|
+
version?: string | null;
|
|
97
|
+
receiptTransactionHash?: string;
|
|
98
|
+
receiptTimestamp?: string;
|
|
99
|
+
deliveryTime?: bigint;
|
|
100
|
+
data?: string | null;
|
|
101
|
+
};
|
|
102
|
+
/** Message search result from /v2/messages search endpoint */
|
|
103
|
+
export type RawMessageSearchResult = {
|
|
104
|
+
messageId: string;
|
|
105
|
+
origin: string;
|
|
106
|
+
sender: string;
|
|
107
|
+
receiver: string;
|
|
108
|
+
status: string;
|
|
109
|
+
sourceNetworkInfo: RawNetworkInfo;
|
|
110
|
+
destNetworkInfo: RawNetworkInfo;
|
|
111
|
+
sendTransactionHash: string;
|
|
112
|
+
sendTimestamp: string;
|
|
113
|
+
};
|
|
114
|
+
/** Paginated response from /v2/messages search endpoint */
|
|
115
|
+
export type RawMessagesResponse = {
|
|
116
|
+
data: RawMessageSearchResult[];
|
|
117
|
+
pagination: {
|
|
118
|
+
limit: number;
|
|
119
|
+
hasNextPage: boolean;
|
|
120
|
+
cursor?: string | null;
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
/**
|
|
124
|
+
* API-specific metadata fields not present in CCIPRequest.
|
|
125
|
+
* These fields are only available when fetching message details from the CCIP API.
|
|
126
|
+
*/
|
|
127
|
+
export type APICCIPRequestMetadata = {
|
|
128
|
+
/** Message lifecycle status from API */
|
|
129
|
+
status: MessageStatus;
|
|
130
|
+
/** Whether message is ready for manual execution */
|
|
131
|
+
readyForManualExecution: boolean;
|
|
132
|
+
/** Finality block confirmations */
|
|
133
|
+
finality: bigint;
|
|
134
|
+
/** Receipt transaction hash if executed */
|
|
135
|
+
receiptTransactionHash?: string;
|
|
136
|
+
/** Receipt timestamp (Unix) if executed */
|
|
137
|
+
receiptTimestamp?: number;
|
|
138
|
+
/** End-to-end delivery time in ms if completed */
|
|
139
|
+
deliveryTime?: bigint;
|
|
140
|
+
/** Source network info */
|
|
141
|
+
sourceNetworkInfo: NetworkInfo;
|
|
142
|
+
/** Destination network info */
|
|
143
|
+
destNetworkInfo: NetworkInfo;
|
|
144
|
+
};
|
|
145
|
+
/**
|
|
146
|
+
* CCIP request information retrieved from API.
|
|
147
|
+
*
|
|
148
|
+
* Combines standard {@link CCIPRequest} fields with API-specific metadata.
|
|
149
|
+
*
|
|
150
|
+
* **Complete fields:**
|
|
151
|
+
* - `lane`: All fields available (sourceChainSelector, destChainSelector, onRamp, version)
|
|
152
|
+
* - `message`: All core fields (messageId, sender, receiver, data, sequenceNumber, nonce,
|
|
153
|
+
* tokenAmounts, feeToken, feeTokenAmount) plus extraArgs (EVM or SVM depending on chain)
|
|
154
|
+
* - `log`: transactionHash, address, index, blockNumber, topics, data
|
|
155
|
+
* - `tx`: hash, timestamp, from, logs, blockNumber
|
|
156
|
+
*
|
|
157
|
+
* **API-only fields** (in {@link APICCIPRequestMetadata}):
|
|
158
|
+
* - `status`, `readyForManualExecution`, `finality`
|
|
159
|
+
* - `receiptTransactionHash`, `receiptTimestamp`, `deliveryTime`
|
|
160
|
+
* - `sourceNetworkInfo`, `destNetworkInfo`
|
|
161
|
+
*/
|
|
162
|
+
export type APICCIPRequest = CCIPRequest & APICCIPRequestMetadata;
|
|
38
163
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/api/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/api/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,8CAA8C;IAC9C,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,6DAA6D;AAC7D,MAAM,MAAM,sBAAsB,GAAG;IACnC,IAAI,EAAE;QACJ,iBAAiB,EAAE;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/api/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,E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