anchor-sdk 0.1.41-internal.6 → 0.1.42-beta.1

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.
Files changed (58) hide show
  1. package/dist/AnchorApiClientV2.d.ts +3 -2
  2. package/dist/AnchorApiClientV2.d.ts.map +1 -0
  3. package/dist/AnchorERC1155Client.d.ts +1 -0
  4. package/dist/AnchorERC1155Client.d.ts.map +1 -0
  5. package/dist/AnchorPayClient.d.ts +1 -0
  6. package/dist/AnchorPayClient.d.ts.map +1 -0
  7. package/dist/abi/AnchorERC1155.d.ts +1 -0
  8. package/dist/abi/AnchorERC1155.d.ts.map +1 -0
  9. package/dist/constants.d.ts +2 -1
  10. package/dist/constants.d.ts.map +1 -0
  11. package/dist/generated/Api.d.ts +1 -0
  12. package/dist/generated/Api.d.ts.map +1 -0
  13. package/dist/index.d.ts +7 -7
  14. package/dist/index.d.ts.map +1 -0
  15. package/dist/index.js +3 -1379
  16. package/dist/index.js.map +18 -0
  17. package/dist/typechain/AnchorERC1155.d.ts +3 -2
  18. package/dist/typechain/AnchorERC1155.d.ts.map +1 -0
  19. package/dist/typechain/AnchorPay.d.ts +3 -2
  20. package/dist/typechain/AnchorPay.d.ts.map +1 -0
  21. package/dist/typechain/common.d.ts +2 -1
  22. package/dist/typechain/common.d.ts.map +1 -0
  23. package/dist/typechain/factories/AnchorERC1155__factory.d.ts +1 -0
  24. package/dist/typechain/factories/AnchorERC1155__factory.d.ts.map +1 -0
  25. package/dist/typechain/factories/AnchorPay__factory.d.ts +1 -0
  26. package/dist/typechain/factories/AnchorPay__factory.d.ts.map +1 -0
  27. package/dist/typechain/factories/index.d.ts +1 -0
  28. package/dist/typechain/factories/index.d.ts.map +1 -0
  29. package/dist/typechain/index.d.ts +1 -0
  30. package/dist/typechain/index.d.ts.map +1 -0
  31. package/dist/types.d.ts +1 -0
  32. package/dist/types.d.ts.map +1 -0
  33. package/package.json +83 -85
  34. package/dist/AnchorApiClient.d.ts +0 -203
  35. package/dist/AnchorApiClient.js +0 -279
  36. package/dist/AnchorApiClientV2.js +0 -316
  37. package/dist/AnchorERC1155Client.js +0 -301
  38. package/dist/AnchorPayClient.js +0 -908
  39. package/dist/abi/AnchorERC1155.js +0 -1122
  40. package/dist/abi/AnchorPay.json +0 -578
  41. package/dist/api/AnchorApiHttpClient.d.ts +0 -210
  42. package/dist/api/AnchorApiHttpClient.js +0 -411
  43. package/dist/api/types.d.ts +0 -764
  44. package/dist/api/types.js +0 -2
  45. package/dist/constants.js +0 -367
  46. package/dist/generated/Api.js +0 -763
  47. package/dist/react/AnchorReactSDK.d.ts +0 -59
  48. package/dist/react/AnchorReactSDK.js +0 -192
  49. package/dist/react/index.d.ts +0 -1
  50. package/dist/react/index.js +0 -8
  51. package/dist/typechain/AnchorERC1155.js +0 -2
  52. package/dist/typechain/AnchorPay.js +0 -2
  53. package/dist/typechain/common.js +0 -2
  54. package/dist/typechain/factories/AnchorERC1155__factory.js +0 -1766
  55. package/dist/typechain/factories/AnchorPay__factory.js +0 -469
  56. package/dist/typechain/factories/index.js +0 -10
  57. package/dist/typechain/index.js +0 -41
  58. package/dist/types.js +0 -2
@@ -1,279 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AnchorApiClient = void 0;
4
- const AnchorApiHttpClient_1 = require("./api/AnchorApiHttpClient");
5
- /**
6
- * Anchor API 客户端
7
- * 用于与 Anchor API 服务进行交互
8
- */
9
- class AnchorApiClient {
10
- /**
11
- * 创建 Anchor API 客户端
12
- * @param config 客户端配置
13
- */
14
- constructor(config) {
15
- this.network = config.network;
16
- this.apiHttpClient = new AnchorApiHttpClient_1.AnchorApiHttpClient({
17
- baseUrl: config.apiBaseUrl,
18
- authToken: config.authToken,
19
- projectId: config.projectId,
20
- chainId: config.network.id.toString(),
21
- onTokenExpired: config.onTokenExpired,
22
- });
23
- }
24
- /**
25
- * 设置认证令牌
26
- * @param token 认证令牌
27
- */
28
- setAuthToken(token) {
29
- this.apiHttpClient.setAuthToken(token);
30
- }
31
- /**
32
- * 设置 Token 过期回调
33
- * @param callback Token 过期回调函数
34
- */
35
- setTokenExpiredCallback(callback) {
36
- this.apiHttpClient.setTokenExpiredCallback(callback);
37
- }
38
- /**
39
- * 设置项目 ID
40
- * @param projectId 项目 ID
41
- */
42
- setProjectId(projectId) {
43
- this.apiHttpClient.setProjectId(projectId);
44
- }
45
- /**
46
- * 设置链 ID
47
- * @param chainId 链 ID
48
- */
49
- setChainId(chainId) {
50
- this.apiHttpClient.setChainId(chainId);
51
- }
52
- // ==================== V2 API Methods ====================
53
- /**
54
- * 获取徽章系列列表
55
- * @param status 系列状态过滤器
56
- * @param group 系列组过滤器
57
- * @param limit 每页项目数
58
- * @param nextToken 分页令牌
59
- * @returns 徽章系列响应
60
- */
61
- async getBadgeSeries(status, group, limit, nextToken) {
62
- return this.apiHttpClient.getBadgeSeries(status, group, limit, nextToken);
63
- }
64
- /**
65
- * 获取徽章系列详情
66
- * @param seriesId 系列标识符
67
- * @returns 徽章系列详情响应
68
- */
69
- async getBadgeSeriesDetail(seriesId) {
70
- return this.apiHttpClient.getBadgeSeriesDetail(seriesId);
71
- }
72
- /**
73
- * 获取用户徽章
74
- * @param status 徽章状态过滤器
75
- * @param strategy 返回策略
76
- * @param series 徽章系列过滤器
77
- * @param limit 每页项目数
78
- * @param nextToken 分页令牌
79
- * @returns 徽章响应
80
- */
81
- async getBadges(status, strategy, series, limit, nextToken) {
82
- return this.apiHttpClient.getBadges(status, strategy, series, limit, nextToken);
83
- }
84
- /**
85
- * 获取徽章详情
86
- * @param badgeId 徽章标识符
87
- * @returns 徽章详情响应
88
- */
89
- async getBadgeDetail(badgeId) {
90
- return this.apiHttpClient.getBadgeDetail(badgeId);
91
- }
92
- /**
93
- * 检查单个徽章可领取状态
94
- * @param badgeId 徽章标识符
95
- * @returns 徽章可领取响应
96
- */
97
- async checkSingleBadgeClaimable(badgeId) {
98
- return this.apiHttpClient.checkSingleBadgeClaimable(badgeId);
99
- }
100
- /**
101
- * 获取用户徽章资产
102
- * @param status 徽章状态过滤器
103
- * @param strategy 返回策略
104
- * @param series 徽章系列过滤器
105
- * @param limit 每页项目数
106
- * @param nextToken 分页令牌
107
- * @returns 徽章资产响应
108
- */
109
- async getUserBadgeAssets(status, strategy, series, limit, nextToken) {
110
- return this.apiHttpClient.getUserBadgeAssets(status, strategy, series, limit, nextToken);
111
- }
112
- /**
113
- * 检查用户可领取徽章
114
- * @param data 徽章检查请求
115
- * @returns 徽章检查响应
116
- */
117
- async checkUserClaimableBadges(data) {
118
- return this.apiHttpClient.checkUserClaimableBadges(data);
119
- }
120
- /**
121
- * 获取用户可领取徽章
122
- * @param series 徽章系列过滤器
123
- * @param limit 每页项目数
124
- * @param nextToken 分页令牌
125
- * @returns 徽章可领取列表响应
126
- */
127
- async getUserClaimableBadges(series, limit, nextToken) {
128
- return this.apiHttpClient.getUserClaimableBadges(series, limit, nextToken);
129
- }
130
- /**
131
- * 获取徽章领取签名
132
- * @param customerAddress 客户钱包地址
133
- * @param badgeIds 要领取的徽章 ID 列表
134
- * @returns 徽章领取签名响应
135
- */
136
- async getBadgeClaimSignatures(customerAddress, badgeIds) {
137
- const data = {
138
- customerAddress,
139
- badgeIds,
140
- };
141
- return this.apiHttpClient.getBadgeClaimSignatures(data);
142
- }
143
- /**
144
- * 查询资产
145
- * @param customerIds 用户 ID 列表
146
- * @param status 资产状态
147
- * @param strategy 返回策略
148
- * @param limit 返回数量限制
149
- * @returns 资产徽章响应
150
- */
151
- async getUserAssets(customerIds, status = "claimable", strategy = "all", limit = 100) {
152
- return this.apiHttpClient.getUserAssets(customerIds, status, strategy, limit);
153
- }
154
- // ==================== Legacy V1 API Methods (Deprecated) ====================
155
- /**
156
- * 授予徽章 (Legacy)
157
- * @param data 授予徽章请求数据
158
- * @returns 授予徽章响应
159
- */
160
- async grantBadge(data) {
161
- return this.apiHttpClient.grantBadge(data);
162
- }
163
- /**
164
- * 查询用户可领取或已领取的徽章 (Legacy)
165
- * @param customerId 客户 ID
166
- * @param status NFT 状态,值(claimable、claimed)
167
- * @param strategy 返回数据的策略(all:返回所有徽章, max:仅返回同系列等级最高的徽章)
168
- * @returns 徽章响应
169
- */
170
- async getBadgeAssets(customerId, status, strategy) {
171
- return this.apiHttpClient.badgeAssets(customerId, status, strategy);
172
- }
173
- /**
174
- * 获取 NFT 系列 (Legacy)
175
- * @returns NFT 系列响应
176
- */
177
- async getNftSeries() {
178
- return this.apiHttpClient.nftSeries("badge");
179
- }
180
- /**
181
- * 通过 ID 获取 NFT 系列 (Legacy)
182
- * @param series NFT 系列
183
- * @param customerId 用户 ID
184
- * @returns NFT 系列详情响应
185
- */
186
- async getNftSeriesById(series, customerId) {
187
- return this.apiHttpClient.getNftSeriesById("badge", series, customerId);
188
- }
189
- /**
190
- * 检查徽章 (Legacy)
191
- * @returns 检查响应
192
- */
193
- async checkBadge() {
194
- return this.apiHttpClient.check("badge");
195
- }
196
- /**
197
- * 获取徽章检查结果 (Legacy)
198
- * @returns 检查结果响应
199
- */
200
- async getBadgeCheckResult() {
201
- return this.apiHttpClient.getCheckResult("badge");
202
- }
203
- /**
204
- * 处理用户操作哈希 (Legacy)
205
- * @param userOperationHash 用户操作哈希
206
- * @param processType 处理类型,默认为 ERC20_TRANSFER
207
- * @returns 处理响应
208
- */
209
- async processUserOpHash(userOperationHash, processType = "ERC20_TRANSFER") {
210
- const data = {
211
- userOperationHash,
212
- processType,
213
- };
214
- return this.apiHttpClient.processUserOpHash(data);
215
- }
216
- /**
217
- * 加快交易处理 (Legacy)
218
- * @param txHash 交易哈希
219
- * @returns 处理响应
220
- */
221
- async processTransactionHash(txHash) {
222
- return this.apiHttpClient.processTransactionHash(txHash);
223
- }
224
- // ==================== Deprecated Methods (Will be removed) ====================
225
- /**
226
- * @deprecated 使用 getBadgeClaimSignatures 替代
227
- * 铸造徽章
228
- * @param customerAddress 客户地址
229
- * @param contractAddress NFT 地址
230
- * @param claimableIds 可领取 ID 列表
231
- * @returns NFT 铸造响应
232
- */
233
- async mintBadge(customerAddress, contractAddress, claimableIds) {
234
- console.warn("mintBadge method is deprecated, use getBadgeClaimSignatures instead");
235
- const mintRequest = {
236
- customerAddress,
237
- nftType: "badge",
238
- contractAddress,
239
- claimableIds,
240
- };
241
- return this.apiHttpClient.mint("badge", mintRequest);
242
- }
243
- /**
244
- * @deprecated 使用 getBadgeClaimSignatures 替代
245
- * 使用 V2 API 铸造徽章
246
- * @param customerAddress 客户地址
247
- * @param contractAddress NFT 地址
248
- * @param claimableIds 可领取 ID 列表
249
- * @returns 铸造响应
250
- */
251
- async mintBadgeV2(customerAddress, contractAddress, claimableIds) {
252
- console.warn("mintBadgeV2 method is deprecated, use getBadgeClaimSignatures instead");
253
- const mintRequest = {
254
- customerAddress,
255
- nftType: "badge",
256
- contractAddress,
257
- claimableIds,
258
- };
259
- return this.apiHttpClient.mintV2("badge", mintRequest);
260
- }
261
- /**
262
- * @deprecated 使用 checkUserClaimableBadges 替代
263
- * 批量铸造徽章(V2)
264
- * @param customerAddress 客户地址
265
- * @param contractAddress NFT 合约地址
266
- * @param tokenIds 代币 ID 列表
267
- * @returns 批量铸造响应
268
- */
269
- async batchMintBadge(customerAddress, contractAddress, tokenIds) {
270
- console.warn("batchMintBadge method is deprecated, use checkUserClaimableBadges instead");
271
- const batchMintRequest = {
272
- customerAddress,
273
- contractAddress,
274
- tokenIds,
275
- };
276
- return this.apiHttpClient.batchMint("badge", batchMintRequest);
277
- }
278
- }
279
- exports.AnchorApiClient = AnchorApiClient;
@@ -1,316 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AnchorApiClientV2 = void 0;
4
- const Api_1 = require("./generated/Api");
5
- /**
6
- * Anchor API V2 客户端
7
- * 基于生成的 API 类型和端点,提供完整的 Anchor API 功能
8
- *
9
- * 这个客户端使用生成的 API 类型和端点,同时提供
10
- * 自动 header 注入和配置管理功能。
11
- */
12
- class AnchorApiClientV2 {
13
- /**
14
- * 创建 Anchor API V2 客户端
15
- * @param config 客户端配置
16
- */
17
- constructor(config) {
18
- this.network = config.network;
19
- this.authToken = config.authToken;
20
- this.projectId = config.projectId;
21
- this.chainId = config.network.id.toString();
22
- this.onTokenExpired = config.onTokenExpired;
23
- // 初始化生成的 API
24
- this.generatedApi = new Api_1.Api({
25
- baseUrl: config.apiBaseUrl.endsWith("/")
26
- ? config.apiBaseUrl.slice(0, -1)
27
- : config.apiBaseUrl,
28
- });
29
- }
30
- /**
31
- * 设置认证令牌
32
- * @param token 认证令牌
33
- */
34
- setAuthToken(token) {
35
- this.authToken = token;
36
- }
37
- /**
38
- * 设置 Token 过期回调
39
- * @param callback Token 过期回调函数
40
- */
41
- setTokenExpiredCallback(callback) {
42
- this.onTokenExpired = callback;
43
- }
44
- /**
45
- * 设置项目 ID
46
- * @param projectId 项目 ID
47
- */
48
- setProjectId(projectId) {
49
- this.projectId = projectId;
50
- }
51
- /**
52
- * 设置链 ID
53
- * @param chainId 链 ID
54
- */
55
- setChainId(chainId) {
56
- this.chainId = chainId;
57
- }
58
- /**
59
- * 创建请求头
60
- * @returns 请求头对象
61
- */
62
- createHeaders() {
63
- const headers = {
64
- "Content-Type": "application/json",
65
- };
66
- // 添加标准化的请求头
67
- if (this.authToken) {
68
- headers["Authorization"] = `Bearer ${this.authToken}`;
69
- headers["jwt_token"] = `${this.authToken}`;
70
- }
71
- if (this.projectId) {
72
- headers["X-Project-Id"] = this.projectId;
73
- headers["saas_id"] = this.projectId;
74
- }
75
- if (this.chainId) {
76
- headers["X-Chain-Id"] = this.chainId;
77
- headers["chain_id"] = this.chainId;
78
- }
79
- return headers;
80
- }
81
- /**
82
- * 获取请求参数(包含 headers)
83
- * @returns 请求参数对象
84
- */
85
- getRequestParams() {
86
- return {
87
- headers: this.createHeaders(),
88
- };
89
- }
90
- /**
91
- * 处理 API 调用的错误和 token 过期
92
- * @param apiCall API 调用函数
93
- * @returns API 调用结果
94
- */
95
- async handleApiCall(apiCall) {
96
- try {
97
- const result = await apiCall();
98
- // 检查响应体中的 token 过期信息
99
- if (this.isTokenExpiredResponse(result)) {
100
- console.log("Token expired: JWT token is invalid or expired");
101
- const error = new Error("Token expired: JWT token is invalid or expired");
102
- if (this.onTokenExpired) {
103
- this.onTokenExpired(error);
104
- }
105
- throw error;
106
- }
107
- return result;
108
- }
109
- catch (error) {
110
- // 检查 HTTP 401 状态码的 token 过期
111
- if (error?.status === 401) {
112
- if (this.onTokenExpired) {
113
- this.onTokenExpired(error);
114
- }
115
- }
116
- throw error;
117
- }
118
- }
119
- /**
120
- * 检查响应是否为 token 过期错误
121
- * @param response API 响应
122
- * @returns 是否为 token 过期错误
123
- */
124
- isTokenExpiredResponse(response) {
125
- // 检查响应体中的 token 过期标识
126
- // 优先检查:success 为 false 且 code 为 9101(标准 token 过期错误码)
127
- if (response?.success === false && response?.code === "9101") {
128
- return true;
129
- }
130
- // 检查 msgKey 是否为特定的 JWT 错误
131
- if (response?.success === false &&
132
- response?.msgKey === "params.jwt.check.invalid") {
133
- return true;
134
- }
135
- return false;
136
- }
137
- // ==================== V2 API Methods ====================
138
- /**
139
- * 获取徽章验证器
140
- * @route GET /v2/badges/verifiers
141
- * @param platform 平台标识符
142
- * @param type 条件类型
143
- * @returns 徽章验证器响应
144
- */
145
- async getBadgeVerifiers(platform, type) {
146
- return this.handleApiCall(async () => {
147
- const query = { platform, type };
148
- const response = await this.generatedApi.v2.getBadgeVerifiers(query, this.getRequestParams());
149
- return response.data;
150
- });
151
- }
152
- /**
153
- * 获取用户可领取徽章
154
- * @route GET /v2/badges/claimable
155
- * @param params 查询参数
156
- * @param params.series 徽章系列过滤器
157
- * @param params.limit 每页项目数
158
- * @param params.nextToken 分页令牌
159
- * @returns 徽章可领取列表响应
160
- */
161
- async getUserClaimableBadges(params) {
162
- return this.handleApiCall(async () => {
163
- const response = await this.generatedApi.v2.getUserClaimableBadges(params, this.getRequestParams());
164
- return response.data;
165
- });
166
- }
167
- /**
168
- * 获取用户徽章资产
169
- * @route GET /v2/badges/assets
170
- * @param params 查询参数
171
- * @param params.includeClaimable 徽章状态是否包含可领取
172
- * @param params.strategy 返回策略 BADGE_ALL/BADGE_MAX/BADGE_REWARD
173
- * @param params.series 徽章系列过滤器
174
- * @param params.limit 每页项目数
175
- * @param params.nextToken 分页令牌
176
- * @returns 徽章资产响应
177
- */
178
- async getUserBadgeAssets(params) {
179
- return this.handleApiCall(async () => {
180
- const response = await this.generatedApi.v2.getUserBadgeAssets(params, this.getRequestParams());
181
- return response.data;
182
- });
183
- }
184
- /**
185
- * 获取徽章系列详情
186
- * @route GET /v2/badges/series/{seriesId}
187
- * @param seriesId 系列标识符
188
- * @param params 查询参数
189
- * @param params.status 状态过滤器
190
- * @param params.businessType 业务类型过滤器
191
- * @returns 徽章系列详情响应
192
- */
193
- async getBadgeSeriesDetail(seriesId, params) {
194
- return this.handleApiCall(async () => {
195
- const response = await this.generatedApi.v2.getBadgeSeriesDetail(seriesId, params, this.getRequestParams());
196
- return response.data;
197
- });
198
- }
199
- /**
200
- * 获取徽章详情
201
- * @route GET /v2/badges/{badgeId}
202
- * @param badgeId 徽章标识符
203
- * @returns 徽章详情响应
204
- */
205
- async getBadgeDetail(badgeId) {
206
- return this.handleApiCall(async () => {
207
- const response = await this.generatedApi.v2.getBadgeDetail(badgeId, this.getRequestParams());
208
- return response.data;
209
- });
210
- }
211
- /**
212
- * 检查单个徽章可领取状态
213
- * @route POST /v2/badges/{badgeId}
214
- * @param badgeId 徽章标识符
215
- * @param data 徽章检查请求数据
216
- * @returns 徽章可领取响应
217
- */
218
- async checkSingleBadgeClaimable(badgeId, data) {
219
- return this.handleApiCall(async () => {
220
- const response = await this.generatedApi.v2.checkSingleBadgeClaimable(badgeId, data, this.getRequestParams());
221
- return response.data;
222
- });
223
- }
224
- /**
225
- * 检查用户可领取徽章
226
- * @route POST /v2/badges
227
- * @param data 徽章检查请求
228
- * @returns 徽章检查响应
229
- */
230
- async checkUserClaimableBadges(data) {
231
- return this.handleApiCall(async () => {
232
- const response = await this.generatedApi.v2.checkUserClaimableBadges(data, this.getRequestParams());
233
- return response.data;
234
- });
235
- }
236
- /**
237
- * 获取徽章领取签名
238
- * @route POST /v2/badges/signatures
239
- * @param data 徽章领取签名请求
240
- * @returns 徽章领取签名响应
241
- */
242
- async getBadgeClaimSignatures(data) {
243
- return this.handleApiCall(async () => {
244
- const response = await this.generatedApi.v2.getBadgeClaimSignatures(data, this.getRequestParams());
245
- return response.data;
246
- });
247
- }
248
- /**
249
- * 获取徽章系列列表
250
- * @route GET /v2/badges/series
251
- * @param params 查询参数
252
- * @param params.includeBadges 是否包含徽章
253
- * @param params.status 状态过滤器
254
- * @param params.businessType 业务类型过滤器
255
- * @param params.limit 每页数量
256
- * @returns 徽章系列响应
257
- */
258
- async getBadgeSeries(params) {
259
- return this.handleApiCall(async () => {
260
- const response = await this.generatedApi.v2.getBadgeSeries(params, this.getRequestParams());
261
- return response.data;
262
- });
263
- }
264
- /**
265
- * Anchor 铸造
266
- * @route POST /v2/mint/{type}
267
- * @param type 铸造类型
268
- * @param data 铸造请求数据
269
- * @returns 铸造响应
270
- */
271
- async mint(type, data) {
272
- return this.handleApiCall(async () => {
273
- const response = await this.generatedApi.v2.mint(type, data, this.getRequestParams());
274
- return response.data;
275
- });
276
- }
277
- /**
278
- * Anchor 批量铸造
279
- * @route POST /v2/batch/mint/{type}
280
- * @param type 铸造类型
281
- * @param data 批量铸造请求数据
282
- * @returns 批量铸造响应
283
- */
284
- async batchMint(type, data) {
285
- return this.handleApiCall(async () => {
286
- const response = await this.generatedApi.v2.batchMint(type, data, this.getRequestParams());
287
- return response.data;
288
- });
289
- }
290
- // ==================== Transaction Methods ====================
291
- /**
292
- * 处理交易哈希(加速交易处理)
293
- * @route POST /v1/transaction/process/{txHash}
294
- * @param txHash 交易哈希
295
- * @returns 交易哈希处理响应
296
- */
297
- async transactionHashProcess(txHash) {
298
- return this.handleApiCall(async () => {
299
- const response = await this.generatedApi.v1.transactionHashProcess(txHash, this.getRequestParams());
300
- return response.data;
301
- });
302
- }
303
- /**
304
- * 处理用户操作哈希
305
- * @route POST /v1/transaction/process/userOpHash
306
- * @param data 用户操作哈希处理请求
307
- * @returns 用户操作哈希处理响应
308
- */
309
- async userOpHashProcess(data) {
310
- return this.handleApiCall(async () => {
311
- const response = await this.generatedApi.v1.userOpHashProcess(data, this.getRequestParams());
312
- return response.data;
313
- });
314
- }
315
- }
316
- exports.AnchorApiClientV2 = AnchorApiClientV2;