@helium/blockchain-api 0.3.13 → 0.11.12
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/chunk-2SBYC2AH.js +466 -0
- package/dist/chunk-4CY5D37F.js +176 -0
- package/dist/chunk-4RVSLJOU.js +9 -0
- package/dist/chunk-5ZPW3MRC.js +53 -0
- package/dist/chunk-6EPXJJY5.js +60 -0
- package/dist/chunk-6LMSAIIW.js +230 -0
- package/dist/chunk-7CTJX35S.js +16 -0
- package/dist/chunk-7R4XQ5SN.js +116 -0
- package/dist/chunk-KTADG6LO.js +1 -0
- package/dist/chunk-LHKDTWB2.js +177 -0
- package/dist/chunk-MSIA3ZUI.js +36 -0
- package/dist/chunk-NBOSJXWK.js +50 -0
- package/dist/chunk-RD5LUTM5.js +97 -0
- package/dist/chunk-T7OKPHTD.js +68 -0
- package/dist/chunk-TEWZC6CW.js +1 -0
- package/dist/chunk-YVB4ENKX.js +119 -0
- package/dist/contracts.d.ts +8671 -0
- package/dist/contracts.js +14 -0
- package/dist/errors.d.ts +69 -0
- package/dist/errors.js +2 -0
- package/dist/index.d.ts +16 -8128
- package/dist/index.js +16 -1597
- package/dist/schemas/common.d.ts +219 -0
- package/dist/schemas/common.js +1 -0
- package/dist/schemas/fiat.d.ts +175 -0
- package/dist/schemas/fiat.js +3 -0
- package/dist/schemas/governance.d.ts +470 -0
- package/dist/schemas/governance.js +2 -0
- package/dist/schemas/health.d.ts +9 -0
- package/dist/schemas/health.js +1 -0
- package/dist/schemas/hotspots.d.ts +540 -0
- package/dist/schemas/hotspots.js +2 -0
- package/dist/schemas/migration.d.ts +145 -0
- package/dist/schemas/migration.js +3 -0
- package/dist/schemas/reward-contract.d.ts +209 -0
- package/dist/schemas/reward-contract.js +2 -0
- package/dist/schemas/swap.d.ts +95 -0
- package/dist/schemas/swap.js +2 -0
- package/dist/schemas/tokens.d.ts +94 -0
- package/dist/schemas/tokens.js +2 -0
- package/dist/schemas/transactions.d.ts +200 -0
- package/dist/schemas/transactions.js +2 -0
- package/dist/schemas/webhooks.d.ts +17 -0
- package/dist/schemas/webhooks.js +1 -0
- package/dist/schemas/welcome-packs.d.ts +305 -0
- package/dist/schemas/welcome-packs.js +3 -0
- package/dist/schemas.d.ts +12 -0
- package/dist/schemas.js +12 -0
- package/package.json +31 -9
- package/README.md +0 -78
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
declare const WelcomePackListInputSchema: z.ZodObject<{
|
|
4
|
+
walletAddress: z.ZodString;
|
|
5
|
+
}, z.core.$strip>;
|
|
6
|
+
declare const WelcomePackCreateInputSchema: z.ZodObject<{
|
|
7
|
+
walletAddress: z.ZodString;
|
|
8
|
+
assetId: z.ZodString;
|
|
9
|
+
solAmount: z.ZodObject<{
|
|
10
|
+
amount: z.ZodString;
|
|
11
|
+
mint: z.ZodString;
|
|
12
|
+
}, z.core.$strip>;
|
|
13
|
+
rentRefund: z.ZodString;
|
|
14
|
+
assetReturnAddress: z.ZodString;
|
|
15
|
+
rewardsSplit: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
16
|
+
address: z.ZodString;
|
|
17
|
+
type: z.ZodLiteral<"percentage">;
|
|
18
|
+
amount: z.ZodNumber;
|
|
19
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
20
|
+
address: z.ZodString;
|
|
21
|
+
type: z.ZodLiteral<"fixed">;
|
|
22
|
+
tokenAmount: z.ZodObject<{
|
|
23
|
+
amount: z.ZodString;
|
|
24
|
+
mint: z.ZodString;
|
|
25
|
+
}, z.core.$strip>;
|
|
26
|
+
}, z.core.$strip>], "type">>;
|
|
27
|
+
schedule: z.ZodObject<{
|
|
28
|
+
frequency: z.ZodEnum<{
|
|
29
|
+
daily: "daily";
|
|
30
|
+
weekly: "weekly";
|
|
31
|
+
monthly: "monthly";
|
|
32
|
+
}>;
|
|
33
|
+
time: z.ZodString;
|
|
34
|
+
timezone: z.ZodString;
|
|
35
|
+
dayOfWeek: z.ZodOptional<z.ZodString>;
|
|
36
|
+
dayOfMonth: z.ZodOptional<z.ZodString>;
|
|
37
|
+
}, z.core.$strip>;
|
|
38
|
+
lazyDistributor: z.ZodString;
|
|
39
|
+
}, z.core.$strip>;
|
|
40
|
+
declare const WelcomePackGetInputSchema: z.ZodObject<{
|
|
41
|
+
walletAddress: z.ZodString;
|
|
42
|
+
packId: z.ZodNumber;
|
|
43
|
+
}, z.core.$strip>;
|
|
44
|
+
declare const WelcomePackDeleteInputSchema: z.ZodObject<{
|
|
45
|
+
walletAddress: z.ZodString;
|
|
46
|
+
packId: z.ZodNumber;
|
|
47
|
+
}, z.core.$strip>;
|
|
48
|
+
declare const WelcomePackGetByAddressInputSchema: z.ZodObject<{
|
|
49
|
+
packAddress: z.ZodString;
|
|
50
|
+
}, z.core.$strip>;
|
|
51
|
+
declare const WelcomePackClaimInputSchema: z.ZodObject<{
|
|
52
|
+
packAddress: z.ZodString;
|
|
53
|
+
walletAddress: z.ZodString;
|
|
54
|
+
signature: z.ZodString;
|
|
55
|
+
expirationTs: z.ZodString;
|
|
56
|
+
}, z.core.$strip>;
|
|
57
|
+
declare const WelcomePackInviteInputSchema: z.ZodObject<{
|
|
58
|
+
packAddress: z.ZodString;
|
|
59
|
+
walletAddress: z.ZodString;
|
|
60
|
+
expirationDays: z.ZodDefault<z.ZodNumber>;
|
|
61
|
+
}, z.core.$strip>;
|
|
62
|
+
declare const WelcomePackSchema: z.ZodObject<{
|
|
63
|
+
address: z.ZodString;
|
|
64
|
+
id: z.ZodNumber;
|
|
65
|
+
owner: z.ZodString;
|
|
66
|
+
asset: z.ZodString;
|
|
67
|
+
lazyDistributor: z.ZodString;
|
|
68
|
+
rewardsMint: z.ZodString;
|
|
69
|
+
rentRefund: z.ZodString;
|
|
70
|
+
solAmount: z.ZodString;
|
|
71
|
+
rewardsSplit: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
72
|
+
address: z.ZodString;
|
|
73
|
+
type: z.ZodLiteral<"percentage">;
|
|
74
|
+
amount: z.ZodNumber;
|
|
75
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
76
|
+
address: z.ZodString;
|
|
77
|
+
type: z.ZodLiteral<"fixed">;
|
|
78
|
+
tokenAmount: z.ZodObject<{
|
|
79
|
+
amount: z.ZodString;
|
|
80
|
+
mint: z.ZodString;
|
|
81
|
+
}, z.core.$strip>;
|
|
82
|
+
}, z.core.$strip>], "type">>;
|
|
83
|
+
rewardsSchedule: z.ZodString;
|
|
84
|
+
assetReturnAddress: z.ZodString;
|
|
85
|
+
bumpSeed: z.ZodNumber;
|
|
86
|
+
uniqueId: z.ZodString;
|
|
87
|
+
loading: z.ZodOptional<z.ZodBoolean>;
|
|
88
|
+
hotspot: z.ZodNullable<z.ZodObject<{
|
|
89
|
+
address: z.ZodString;
|
|
90
|
+
entityKey: z.ZodString;
|
|
91
|
+
name: z.ZodString;
|
|
92
|
+
type: z.ZodEnum<{
|
|
93
|
+
iot: "iot";
|
|
94
|
+
mobile: "mobile";
|
|
95
|
+
all: "all";
|
|
96
|
+
}>;
|
|
97
|
+
deviceType: z.ZodEnum<{
|
|
98
|
+
"iot-gateway": "iot-gateway";
|
|
99
|
+
wifiIndoor: "wifiIndoor";
|
|
100
|
+
wifiOutdoor: "wifiOutdoor";
|
|
101
|
+
wifiDataOnly: "wifiDataOnly";
|
|
102
|
+
cbrs: "cbrs";
|
|
103
|
+
}>;
|
|
104
|
+
city: z.ZodOptional<z.ZodString>;
|
|
105
|
+
state: z.ZodOptional<z.ZodString>;
|
|
106
|
+
country: z.ZodOptional<z.ZodString>;
|
|
107
|
+
asset: z.ZodString;
|
|
108
|
+
isOnline: z.ZodOptional<z.ZodBoolean>;
|
|
109
|
+
owner: z.ZodOptional<z.ZodString>;
|
|
110
|
+
shares: z.ZodOptional<z.ZodObject<{
|
|
111
|
+
fixed: z.ZodOptional<z.ZodString>;
|
|
112
|
+
percentage: z.ZodOptional<z.ZodNumber>;
|
|
113
|
+
}, z.core.$strip>>;
|
|
114
|
+
ownershipType: z.ZodString;
|
|
115
|
+
}, z.core.$strip>>;
|
|
116
|
+
}, z.core.$strip>;
|
|
117
|
+
declare const WelcomePackListOutputSchema: z.ZodArray<z.ZodObject<{
|
|
118
|
+
address: z.ZodString;
|
|
119
|
+
id: z.ZodNumber;
|
|
120
|
+
owner: z.ZodString;
|
|
121
|
+
asset: z.ZodString;
|
|
122
|
+
lazyDistributor: z.ZodString;
|
|
123
|
+
rewardsMint: z.ZodString;
|
|
124
|
+
rentRefund: z.ZodString;
|
|
125
|
+
solAmount: z.ZodString;
|
|
126
|
+
rewardsSplit: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
127
|
+
address: z.ZodString;
|
|
128
|
+
type: z.ZodLiteral<"percentage">;
|
|
129
|
+
amount: z.ZodNumber;
|
|
130
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
131
|
+
address: z.ZodString;
|
|
132
|
+
type: z.ZodLiteral<"fixed">;
|
|
133
|
+
tokenAmount: z.ZodObject<{
|
|
134
|
+
amount: z.ZodString;
|
|
135
|
+
mint: z.ZodString;
|
|
136
|
+
}, z.core.$strip>;
|
|
137
|
+
}, z.core.$strip>], "type">>;
|
|
138
|
+
rewardsSchedule: z.ZodString;
|
|
139
|
+
assetReturnAddress: z.ZodString;
|
|
140
|
+
bumpSeed: z.ZodNumber;
|
|
141
|
+
uniqueId: z.ZodString;
|
|
142
|
+
loading: z.ZodOptional<z.ZodBoolean>;
|
|
143
|
+
hotspot: z.ZodNullable<z.ZodObject<{
|
|
144
|
+
address: z.ZodString;
|
|
145
|
+
entityKey: z.ZodString;
|
|
146
|
+
name: z.ZodString;
|
|
147
|
+
type: z.ZodEnum<{
|
|
148
|
+
iot: "iot";
|
|
149
|
+
mobile: "mobile";
|
|
150
|
+
all: "all";
|
|
151
|
+
}>;
|
|
152
|
+
deviceType: z.ZodEnum<{
|
|
153
|
+
"iot-gateway": "iot-gateway";
|
|
154
|
+
wifiIndoor: "wifiIndoor";
|
|
155
|
+
wifiOutdoor: "wifiOutdoor";
|
|
156
|
+
wifiDataOnly: "wifiDataOnly";
|
|
157
|
+
cbrs: "cbrs";
|
|
158
|
+
}>;
|
|
159
|
+
city: z.ZodOptional<z.ZodString>;
|
|
160
|
+
state: z.ZodOptional<z.ZodString>;
|
|
161
|
+
country: z.ZodOptional<z.ZodString>;
|
|
162
|
+
asset: z.ZodString;
|
|
163
|
+
isOnline: z.ZodOptional<z.ZodBoolean>;
|
|
164
|
+
owner: z.ZodOptional<z.ZodString>;
|
|
165
|
+
shares: z.ZodOptional<z.ZodObject<{
|
|
166
|
+
fixed: z.ZodOptional<z.ZodString>;
|
|
167
|
+
percentage: z.ZodOptional<z.ZodNumber>;
|
|
168
|
+
}, z.core.$strip>>;
|
|
169
|
+
ownershipType: z.ZodString;
|
|
170
|
+
}, z.core.$strip>>;
|
|
171
|
+
}, z.core.$strip>>;
|
|
172
|
+
declare const WelcomePackCreateOutputSchema: z.ZodObject<{
|
|
173
|
+
transactionData: z.ZodObject<{
|
|
174
|
+
transactions: z.ZodArray<z.ZodObject<{
|
|
175
|
+
serializedTransaction: z.ZodString;
|
|
176
|
+
metadata: z.ZodOptional<z.ZodObject<{
|
|
177
|
+
type: z.ZodString;
|
|
178
|
+
description: z.ZodString;
|
|
179
|
+
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
180
|
+
}, z.core.$strip>>;
|
|
181
|
+
parallel: z.ZodBoolean;
|
|
182
|
+
tag: z.ZodOptional<z.ZodString>;
|
|
183
|
+
}, z.core.$strip>;
|
|
184
|
+
estimatedSolFee: z.ZodObject<{
|
|
185
|
+
amount: z.ZodString;
|
|
186
|
+
decimals: z.ZodNumber;
|
|
187
|
+
uiAmount: z.ZodNullable<z.ZodNumber>;
|
|
188
|
+
uiAmountString: z.ZodString;
|
|
189
|
+
mint: z.ZodString;
|
|
190
|
+
}, z.core.$strip>;
|
|
191
|
+
welcomePack: z.ZodObject<{
|
|
192
|
+
address: z.ZodString;
|
|
193
|
+
id: z.ZodNumber;
|
|
194
|
+
owner: z.ZodString;
|
|
195
|
+
asset: z.ZodString;
|
|
196
|
+
lazyDistributor: z.ZodString;
|
|
197
|
+
rewardsMint: z.ZodString;
|
|
198
|
+
rentRefund: z.ZodString;
|
|
199
|
+
solAmount: z.ZodString;
|
|
200
|
+
rewardsSplit: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
201
|
+
address: z.ZodString;
|
|
202
|
+
type: z.ZodLiteral<"percentage">;
|
|
203
|
+
amount: z.ZodNumber;
|
|
204
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
205
|
+
address: z.ZodString;
|
|
206
|
+
type: z.ZodLiteral<"fixed">;
|
|
207
|
+
tokenAmount: z.ZodObject<{
|
|
208
|
+
amount: z.ZodString;
|
|
209
|
+
mint: z.ZodString;
|
|
210
|
+
}, z.core.$strip>;
|
|
211
|
+
}, z.core.$strip>], "type">>;
|
|
212
|
+
rewardsSchedule: z.ZodString;
|
|
213
|
+
assetReturnAddress: z.ZodString;
|
|
214
|
+
bumpSeed: z.ZodNumber;
|
|
215
|
+
uniqueId: z.ZodString;
|
|
216
|
+
loading: z.ZodOptional<z.ZodBoolean>;
|
|
217
|
+
hotspot: z.ZodNullable<z.ZodObject<{
|
|
218
|
+
address: z.ZodString;
|
|
219
|
+
entityKey: z.ZodString;
|
|
220
|
+
name: z.ZodString;
|
|
221
|
+
type: z.ZodEnum<{
|
|
222
|
+
iot: "iot";
|
|
223
|
+
mobile: "mobile";
|
|
224
|
+
all: "all";
|
|
225
|
+
}>;
|
|
226
|
+
deviceType: z.ZodEnum<{
|
|
227
|
+
"iot-gateway": "iot-gateway";
|
|
228
|
+
wifiIndoor: "wifiIndoor";
|
|
229
|
+
wifiOutdoor: "wifiOutdoor";
|
|
230
|
+
wifiDataOnly: "wifiDataOnly";
|
|
231
|
+
cbrs: "cbrs";
|
|
232
|
+
}>;
|
|
233
|
+
city: z.ZodOptional<z.ZodString>;
|
|
234
|
+
state: z.ZodOptional<z.ZodString>;
|
|
235
|
+
country: z.ZodOptional<z.ZodString>;
|
|
236
|
+
asset: z.ZodString;
|
|
237
|
+
isOnline: z.ZodOptional<z.ZodBoolean>;
|
|
238
|
+
owner: z.ZodOptional<z.ZodString>;
|
|
239
|
+
shares: z.ZodOptional<z.ZodObject<{
|
|
240
|
+
fixed: z.ZodOptional<z.ZodString>;
|
|
241
|
+
percentage: z.ZodOptional<z.ZodNumber>;
|
|
242
|
+
}, z.core.$strip>>;
|
|
243
|
+
ownershipType: z.ZodString;
|
|
244
|
+
}, z.core.$strip>>;
|
|
245
|
+
}, z.core.$strip>;
|
|
246
|
+
}, z.core.$strip>;
|
|
247
|
+
declare const WelcomePackDeleteOutputSchema: z.ZodObject<{
|
|
248
|
+
transactionData: z.ZodObject<{
|
|
249
|
+
transactions: z.ZodArray<z.ZodObject<{
|
|
250
|
+
serializedTransaction: z.ZodString;
|
|
251
|
+
metadata: z.ZodOptional<z.ZodObject<{
|
|
252
|
+
type: z.ZodString;
|
|
253
|
+
description: z.ZodString;
|
|
254
|
+
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
255
|
+
}, z.core.$strip>>;
|
|
256
|
+
parallel: z.ZodBoolean;
|
|
257
|
+
tag: z.ZodOptional<z.ZodString>;
|
|
258
|
+
}, z.core.$strip>;
|
|
259
|
+
estimatedSolFee: z.ZodObject<{
|
|
260
|
+
amount: z.ZodString;
|
|
261
|
+
decimals: z.ZodNumber;
|
|
262
|
+
uiAmount: z.ZodNullable<z.ZodNumber>;
|
|
263
|
+
uiAmountString: z.ZodString;
|
|
264
|
+
mint: z.ZodString;
|
|
265
|
+
}, z.core.$strip>;
|
|
266
|
+
}, z.core.$strip>;
|
|
267
|
+
declare const WelcomePackClaimOutputSchema: z.ZodObject<{
|
|
268
|
+
transactionData: z.ZodObject<{
|
|
269
|
+
transactions: z.ZodArray<z.ZodObject<{
|
|
270
|
+
serializedTransaction: z.ZodString;
|
|
271
|
+
metadata: z.ZodOptional<z.ZodObject<{
|
|
272
|
+
type: z.ZodString;
|
|
273
|
+
description: z.ZodString;
|
|
274
|
+
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
275
|
+
}, z.core.$strip>>;
|
|
276
|
+
parallel: z.ZodBoolean;
|
|
277
|
+
tag: z.ZodOptional<z.ZodString>;
|
|
278
|
+
}, z.core.$strip>;
|
|
279
|
+
estimatedSolFee: z.ZodObject<{
|
|
280
|
+
amount: z.ZodString;
|
|
281
|
+
decimals: z.ZodNumber;
|
|
282
|
+
uiAmount: z.ZodNullable<z.ZodNumber>;
|
|
283
|
+
uiAmountString: z.ZodString;
|
|
284
|
+
mint: z.ZodString;
|
|
285
|
+
}, z.core.$strip>;
|
|
286
|
+
}, z.core.$strip>;
|
|
287
|
+
declare const WelcomePackInviteOutputSchema: z.ZodObject<{
|
|
288
|
+
message: z.ZodString;
|
|
289
|
+
expirationTs: z.ZodNumber;
|
|
290
|
+
}, z.core.$strip>;
|
|
291
|
+
type WelcomePackListInput = z.infer<typeof WelcomePackListInputSchema>;
|
|
292
|
+
type WelcomePackCreateInput = z.infer<typeof WelcomePackCreateInputSchema>;
|
|
293
|
+
type WelcomePackGetInput = z.infer<typeof WelcomePackGetInputSchema>;
|
|
294
|
+
type WelcomePackDeleteInput = z.infer<typeof WelcomePackDeleteInputSchema>;
|
|
295
|
+
type WelcomePackGetByAddressInput = z.infer<typeof WelcomePackGetByAddressInputSchema>;
|
|
296
|
+
type WelcomePackClaimInput = z.infer<typeof WelcomePackClaimInputSchema>;
|
|
297
|
+
type WelcomePackInviteInput = z.infer<typeof WelcomePackInviteInputSchema>;
|
|
298
|
+
type WelcomePack = z.infer<typeof WelcomePackSchema>;
|
|
299
|
+
type WelcomePackListOutput = z.infer<typeof WelcomePackListOutputSchema>;
|
|
300
|
+
type WelcomePackCreateOutput = z.infer<typeof WelcomePackCreateOutputSchema>;
|
|
301
|
+
type WelcomePackDeleteOutput = z.infer<typeof WelcomePackDeleteOutputSchema>;
|
|
302
|
+
type WelcomePackClaimOutput = z.infer<typeof WelcomePackClaimOutputSchema>;
|
|
303
|
+
type WelcomePackInviteOutput = z.infer<typeof WelcomePackInviteOutputSchema>;
|
|
304
|
+
|
|
305
|
+
export { type WelcomePack, type WelcomePackClaimInput, WelcomePackClaimInputSchema, type WelcomePackClaimOutput, WelcomePackClaimOutputSchema, type WelcomePackCreateInput, WelcomePackCreateInputSchema, type WelcomePackCreateOutput, WelcomePackCreateOutputSchema, type WelcomePackDeleteInput, WelcomePackDeleteInputSchema, type WelcomePackDeleteOutput, WelcomePackDeleteOutputSchema, type WelcomePackGetByAddressInput, WelcomePackGetByAddressInputSchema, type WelcomePackGetInput, WelcomePackGetInputSchema, type WelcomePackInviteInput, WelcomePackInviteInputSchema, type WelcomePackInviteOutput, WelcomePackInviteOutputSchema, type WelcomePackListInput, WelcomePackListInputSchema, type WelcomePackListOutput, WelcomePackListOutputSchema, WelcomePackSchema };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { WelcomePackClaimInputSchema, WelcomePackClaimOutputSchema, WelcomePackCreateInputSchema, WelcomePackCreateOutputSchema, WelcomePackDeleteInputSchema, WelcomePackDeleteOutputSchema, WelcomePackGetByAddressInputSchema, WelcomePackGetInputSchema, WelcomePackInviteInputSchema, WelcomePackInviteOutputSchema, WelcomePackListInputSchema, WelcomePackListOutputSchema, WelcomePackSchema } from '../chunk-T7OKPHTD.js';
|
|
2
|
+
import '../chunk-6LMSAIIW.js';
|
|
3
|
+
import '../chunk-YVB4ENKX.js';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { ErrorResponse, ErrorResponseSchema, HeliumPublicKeySchema, PaginationInputSchema, PaginationOutputSchema, PublicKeySchema, RewardSplitInput, RewardSplitInputSchema, ScheduleInput, ScheduleInputSchema, TokenAmountInput, TokenAmountInputSchema, TokenAmountOutput, TokenAmountOutputSchema, TransactionBatchRequest, TransactionBatchRequestSchema, TransactionBatchResponse, TransactionBatchResponseSchema, TransactionData, TransactionDataSchema, TransactionItem, TransactionItemSchema, TransactionMetadata, TransactionMetadataSchema, WalletAddressSchema, createPaginatedTransactionResponse, createTransactionResponse, createTypedPaginatedTransactionResponse, createTypedTransactionResponse, typedTransactionData } from './schemas/common.js';
|
|
2
|
+
export { BankAccount, BankAccountListOutput, BankAccountListOutputSchema, BankAccountSchema, BridgeTransfer, BridgeTransferSchema, CreateBankAccountInput, CreateBankAccountInputSchema, DeleteBankAccountInput, DeleteBankAccountInputSchema, DeleteBankAccountOutput, DeleteBankAccountOutputSchema, FeesOutput, FeesOutputSchema, GetBankAccountInput, GetBankAccountInputSchema, GetSendQuoteInput, GetSendQuoteInputSchema, GetTransferInput, GetTransferInputSchema, InitKycInput, InitKycInputSchema, KycStatusOutput, KycStatusOutputSchema, QuoteOutputSchema, SendFundsInput, SendFundsInputSchema, SendFundsOutput, SendFundsOutputSchema, UpdateTransferInput, UpdateTransferInputSchema, UpdateTransferOutput, UpdateTransferOutputSchema } from './schemas/fiat.js';
|
|
3
|
+
export { AssignProxiesInput, AssignProxiesInputSchema, AssignProxiesResponse, AssignProxiesResponseSchema, ClaimDelegationRewardsInput, ClaimDelegationRewardsInputSchema, ClaimDelegationRewardsResponse, ClaimDelegationRewardsResponseSchema, ClosePositionInput, ClosePositionInputSchema, ClosePositionResponse, ClosePositionResponseSchema, CreatePositionInput, CreatePositionInputSchema, CreatePositionResponse, CreatePositionResponseSchema, DelegatePositionInput, DelegatePositionInputSchema, DelegatePositionsResponse, DelegatePositionsResponseSchema, ExtendDelegationInput, ExtendDelegationInputSchema, ExtendDelegationResponse, ExtendDelegationResponseSchema, ExtendPositionInput, ExtendPositionInputSchema, ExtendPositionResponse, ExtendPositionResponseSchema, FlipLockupKindInput, FlipLockupKindInputSchema, FlipLockupKindResponse, FlipLockupKindResponseSchema, LockupKind, LockupKindSchema, RelinquishPositionVotesInput, RelinquishPositionVotesInputSchema, RelinquishPositionVotesResponse, RelinquishPositionVotesResponseSchema, RelinquishVoteInput, RelinquishVoteInputSchema, RelinquishVoteResponse, RelinquishVoteResponseSchema, ResetLockupInput, ResetLockupInputSchema, ResetLockupResponse, ResetLockupResponseSchema, SplitPositionInput, SplitPositionInputSchema, SplitPositionResponse, SplitPositionResponseSchema, TransferPositionInput, TransferPositionInputSchema, TransferPositionResponse, TransferPositionResponseSchema, UnassignProxiesInput, UnassignProxiesInputSchema, UnassignProxiesResponse, UnassignProxiesResponseSchema, UndelegateInput, UndelegateInputSchema, UndelegatePositionResponse, UndelegatePositionResponseSchema, VoteInput, VoteInputSchema, VoteResponse, VoteResponseSchema } from './schemas/governance.js';
|
|
4
|
+
export { HealthResponse, HealthResponseSchema } from './schemas/health.js';
|
|
5
|
+
export { CreateHntAccountInput, CreateHntAccountInputSchema, CreateHntAccountOutput, CreateHntAccountOutputSchema, GetBalancesInput, GetBalancesInputSchema, TokenAccount, TokenAccountSchema, TokenBalanceData, TokenBalanceDataSchema, TransferInput, TransferInputSchema, TransferOutput, TransferOutputSchema } from './schemas/tokens.js';
|
|
6
|
+
export { AutomationScheduleSchema, AutomationStatus, AutomationStatusOutputSchema, ClaimRewardsInput, ClaimRewardsInputSchema, ClaimRewardsOutputSchema, CloseAutomationInput, CloseAutomationInputSchema, CloseAutomationOutputSchema, CreateSplitInput, CreateSplitInputSchema, CreateSplitOutputSchema, DeleteSplitInput, DeleteSplitInputSchema, DeleteSplitOutputSchema, DeviceType, DeviceTypeSchema, FundAutomationInput, FundAutomationInputSchema, FundAutomationOutputSchema, FundingEstimate, FundingEstimateOutputSchema, GetAutomationStatusInput, GetAutomationStatusInputSchema, GetFundingEstimateInput, GetFundingEstimateInputSchema, GetHotspotsInput, GetHotspotsInputSchema, GetPendingRewardsInput, GetPendingRewardsInputSchema, GetPendingRewardsOutput, GetPendingRewardsOutputSchema, GetSplitInput, GetSplitInputSchema, Hotspot, HotspotSchema, HotspotSharesSchema, HotspotType, HotspotTypeSchema, HotspotsData, HotspotsDataSchema, OwnershipType, OwnershipTypeSchema, SetupAutomationInput, SetupAutomationInputSchema, SetupAutomationOutputSchema, SplitResponse, SplitResponseSchema, SplitShare, SplitShareSchema, TransferHotspotInput, TransferHotspotInputSchema, TransferHotspotOutputSchema, UpdateHotspotInfoInputSchema, UpdateHotspotInfoOutputSchema, UpdateRewardsDestinationInput, UpdateRewardsDestinationInputSchema, UpdateRewardsDestinationOutputSchema } from './schemas/hotspots.js';
|
|
7
|
+
export { ClaimInviteRequestSchema, ClaimInviteResponseSchema, CreateInviteResponseSchema, CreateRewardContractTransactionInputSchema, CreateRewardContractTransactionResponseSchema, DeleteRewardContractTransactionResponseSchema, EstimateCostToCreateRewardContractResponseSchema, FindRewardContractResponseSchema } from './schemas/reward-contract.js';
|
|
8
|
+
export { GetInstructionsInput, GetInstructionsInputSchema, GetQuoteInput, GetQuoteInputSchema, GetTokensInput, GetTokensInputSchema, QuoteResponse, QuoteResponseSchema, SwapTransactionDataSchema, Token, TokenListOutput, TokenListOutputSchema, TokenSchema } from './schemas/swap.js';
|
|
9
|
+
export { BatchStatusOutput, BatchStatusOutputSchema, EstimateInput, EstimateInputSchema, EstimateOutput, EstimateOutputSchema, GetByPayerAndTagInput, GetByPayerAndTagInputSchema, GetByPayerInput, GetByPayerInputSchema, GetInput, GetInputSchema, PayerBatchSummary, PayerBatchSummarySchema, PayerBatchesOutput, PayerBatchesOutputSchema, ResubmitInput, ResubmitInputSchema, ResubmitOutput, ResubmitOutputSchema, SubmitInput, SubmitInputSchema, SubmitOutput, SubmitOutputSchema, TransactionStatus, TransactionStatusSchema } from './schemas/transactions.js';
|
|
10
|
+
export { WelcomePack, WelcomePackClaimInput, WelcomePackClaimInputSchema, WelcomePackClaimOutput, WelcomePackClaimOutputSchema, WelcomePackCreateInput, WelcomePackCreateInputSchema, WelcomePackCreateOutput, WelcomePackCreateOutputSchema, WelcomePackDeleteInput, WelcomePackDeleteInputSchema, WelcomePackDeleteOutput, WelcomePackDeleteOutputSchema, WelcomePackGetByAddressInput, WelcomePackGetByAddressInputSchema, WelcomePackGetInput, WelcomePackGetInputSchema, WelcomePackInviteInput, WelcomePackInviteInputSchema, WelcomePackInviteOutput, WelcomePackInviteOutputSchema, WelcomePackListInput, WelcomePackListInputSchema, WelcomePackListOutput, WelcomePackListOutputSchema, WelcomePackSchema } from './schemas/welcome-packs.js';
|
|
11
|
+
export { MigratableHotspotSchema, MigratableHotspotsInput, MigratableHotspotsInputSchema, MigratableHotspotsOutput, MigratableHotspotsOutputSchema, MigrateInput, MigrateInputSchema, MigrateOutput, MigrateOutputSchema, MigrateTransactionDataSchema, MigrateTransactionItemSchema } from './schemas/migration.js';
|
|
12
|
+
import 'zod';
|
package/dist/schemas.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import './chunk-TEWZC6CW.js';
|
|
2
|
+
export { MigratableHotspotSchema, MigratableHotspotsInputSchema, MigratableHotspotsOutputSchema, MigrateInputSchema, MigrateOutputSchema, MigrateTransactionDataSchema, MigrateTransactionItemSchema } from './chunk-NBOSJXWK.js';
|
|
3
|
+
export { ClaimInviteRequestSchema, ClaimInviteResponseSchema, CreateInviteResponseSchema, CreateRewardContractTransactionInputSchema, CreateRewardContractTransactionResponseSchema, DeleteRewardContractTransactionResponseSchema, EstimateCostToCreateRewardContractResponseSchema, FindRewardContractResponseSchema } from './chunk-4CY5D37F.js';
|
|
4
|
+
export { CreateHntAccountInputSchema, CreateHntAccountOutputSchema, GetBalancesInputSchema, TokenAccountSchema, TokenBalanceDataSchema, TransferInputSchema, TransferOutputSchema } from './chunk-MSIA3ZUI.js';
|
|
5
|
+
export { BatchStatusOutputSchema, EstimateInputSchema, EstimateOutputSchema, GetByPayerAndTagInputSchema, GetByPayerInputSchema, GetInputSchema, PayerBatchSummarySchema, PayerBatchesOutputSchema, ResubmitInputSchema, ResubmitOutputSchema, SubmitInputSchema, SubmitOutputSchema, TransactionStatusSchema } from './chunk-7R4XQ5SN.js';
|
|
6
|
+
export { WelcomePackClaimInputSchema, WelcomePackClaimOutputSchema, WelcomePackCreateInputSchema, WelcomePackCreateOutputSchema, WelcomePackDeleteInputSchema, WelcomePackDeleteOutputSchema, WelcomePackGetByAddressInputSchema, WelcomePackGetInputSchema, WelcomePackInviteInputSchema, WelcomePackInviteOutputSchema, WelcomePackListInputSchema, WelcomePackListOutputSchema, WelcomePackSchema } from './chunk-T7OKPHTD.js';
|
|
7
|
+
export { BankAccountListOutputSchema, BankAccountSchema, BridgeTransferSchema, CreateBankAccountInputSchema, DeleteBankAccountInputSchema, DeleteBankAccountOutputSchema, FeesOutputSchema, GetBankAccountInputSchema, GetSendQuoteInputSchema, GetTransferInputSchema, InitKycInputSchema, KycStatusOutputSchema, QuoteOutputSchema, SendFundsInputSchema, SendFundsOutputSchema, UpdateTransferInputSchema, UpdateTransferOutputSchema } from './chunk-RD5LUTM5.js';
|
|
8
|
+
export { GetInstructionsInputSchema, GetQuoteInputSchema, GetTokensInputSchema, QuoteResponseSchema, SwapTransactionDataSchema, TokenListOutputSchema, TokenSchema } from './chunk-5ZPW3MRC.js';
|
|
9
|
+
export { AssignProxiesInputSchema, AssignProxiesResponseSchema, ClaimDelegationRewardsInputSchema, ClaimDelegationRewardsResponseSchema, ClosePositionInputSchema, ClosePositionResponseSchema, CreatePositionInputSchema, CreatePositionResponseSchema, DelegatePositionInputSchema, DelegatePositionsResponseSchema, ExtendDelegationInputSchema, ExtendDelegationResponseSchema, ExtendPositionInputSchema, ExtendPositionResponseSchema, FlipLockupKindInputSchema, FlipLockupKindResponseSchema, LockupKindSchema, RelinquishPositionVotesInputSchema, RelinquishPositionVotesResponseSchema, RelinquishVoteInputSchema, RelinquishVoteResponseSchema, ResetLockupInputSchema, ResetLockupResponseSchema, SplitPositionInputSchema, SplitPositionResponseSchema, TransferPositionInputSchema, TransferPositionResponseSchema, UnassignProxiesInputSchema, UnassignProxiesResponseSchema, UndelegateInputSchema, UndelegatePositionResponseSchema, VoteInputSchema, VoteResponseSchema } from './chunk-LHKDTWB2.js';
|
|
10
|
+
export { HealthResponseSchema } from './chunk-4RVSLJOU.js';
|
|
11
|
+
export { AutomationScheduleSchema, AutomationStatusOutputSchema, ClaimRewardsInputSchema, ClaimRewardsOutputSchema, CloseAutomationInputSchema, CloseAutomationOutputSchema, CreateSplitInputSchema, CreateSplitOutputSchema, DeleteSplitInputSchema, DeleteSplitOutputSchema, DeviceTypeSchema, FundAutomationInputSchema, FundAutomationOutputSchema, FundingEstimateOutputSchema, GetAutomationStatusInputSchema, GetFundingEstimateInputSchema, GetHotspotsInputSchema, GetPendingRewardsInputSchema, GetPendingRewardsOutputSchema, GetSplitInputSchema, HotspotSchema, HotspotSharesSchema, HotspotTypeSchema, HotspotsDataSchema, OwnershipTypeSchema, SetupAutomationInputSchema, SetupAutomationOutputSchema, SplitResponseSchema, SplitShareSchema, TransferHotspotInputSchema, TransferHotspotOutputSchema, UpdateHotspotInfoInputSchema, UpdateHotspotInfoOutputSchema, UpdateRewardsDestinationInputSchema, UpdateRewardsDestinationOutputSchema } from './chunk-6LMSAIIW.js';
|
|
12
|
+
export { ErrorResponseSchema, HeliumPublicKeySchema, PaginationInputSchema, PaginationOutputSchema, PublicKeySchema, RewardSplitInputSchema, ScheduleInputSchema, TokenAmountInputSchema, TokenAmountOutputSchema, TransactionBatchRequestSchema, TransactionBatchResponseSchema, TransactionDataSchema, TransactionItemSchema, TransactionMetadataSchema, WalletAddressSchema, createPaginatedTransactionResponse, createTransactionResponse, createTypedPaginatedTransactionResponse, createTypedTransactionResponse, typedTransactionData } from './chunk-YVB4ENKX.js';
|
package/package.json
CHANGED
|
@@ -1,29 +1,51 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@helium/blockchain-api",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.12",
|
|
4
|
+
"type": "module",
|
|
4
5
|
"description": "TypeScript client and schemas for the Helium Blockchain API",
|
|
5
6
|
"license": "Apache-2.0",
|
|
6
7
|
"repository": {
|
|
7
8
|
"type": "git",
|
|
8
|
-
"url": "git+https://github.com/helium/
|
|
9
|
-
"directory": "packages/api"
|
|
9
|
+
"url": "git+https://github.com/helium/helium-program-library.git",
|
|
10
|
+
"directory": "packages/blockchain-api-client"
|
|
11
|
+
},
|
|
12
|
+
"publishConfig": {
|
|
13
|
+
"access": "public"
|
|
10
14
|
},
|
|
11
|
-
"type": "module",
|
|
12
15
|
"main": "./dist/index.js",
|
|
16
|
+
"module": "./dist/index.js",
|
|
13
17
|
"types": "./dist/index.d.ts",
|
|
18
|
+
"sideEffects": false,
|
|
19
|
+
"files": [
|
|
20
|
+
"dist"
|
|
21
|
+
],
|
|
14
22
|
"exports": {
|
|
15
23
|
".": {
|
|
16
|
-
"
|
|
17
|
-
"
|
|
24
|
+
"import": "./dist/index.js",
|
|
25
|
+
"types": "./dist/index.d.ts"
|
|
26
|
+
},
|
|
27
|
+
"./contracts": {
|
|
28
|
+
"import": "./dist/contracts.js",
|
|
29
|
+
"types": "./dist/contracts.d.ts"
|
|
30
|
+
},
|
|
31
|
+
"./schemas": {
|
|
32
|
+
"import": "./dist/schemas.js",
|
|
33
|
+
"types": "./dist/schemas.d.ts"
|
|
34
|
+
},
|
|
35
|
+
"./schemas/*": {
|
|
36
|
+
"import": "./dist/schemas/*.js",
|
|
37
|
+
"types": "./dist/schemas/*.d.ts"
|
|
38
|
+
},
|
|
39
|
+
"./errors": {
|
|
40
|
+
"import": "./dist/errors.js",
|
|
41
|
+
"types": "./dist/errors.d.ts"
|
|
18
42
|
}
|
|
19
43
|
},
|
|
20
|
-
"files": [
|
|
21
|
-
"dist"
|
|
22
|
-
],
|
|
23
44
|
"scripts": {
|
|
24
45
|
"build": "tsup",
|
|
25
46
|
"dev": "tsup --watch",
|
|
26
47
|
"clean": "rm -rf dist",
|
|
48
|
+
"format": "prettier --write \"src/**/*.{ts,tsx}\"",
|
|
27
49
|
"prepublishOnly": "npm run build"
|
|
28
50
|
},
|
|
29
51
|
"dependencies": {
|
package/README.md
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
# @helium/blockchain-api
|
|
2
|
-
|
|
3
|
-
TypeScript client and schemas for the Helium Blockchain API.
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npm install @helium/blockchain-api
|
|
9
|
-
# or
|
|
10
|
-
yarn add @helium/blockchain-api
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
## Quick Start
|
|
14
|
-
|
|
15
|
-
```typescript
|
|
16
|
-
import { apiContract } from "@helium/blockchain-api";
|
|
17
|
-
import { createORPCClient, onError } from "@orpc/client";
|
|
18
|
-
import { RPCLink } from "@orpc/client/fetch";
|
|
19
|
-
import { ContractRouterClient } from "@orpc/contract";
|
|
20
|
-
|
|
21
|
-
const link = new RPCLink({
|
|
22
|
-
url: "<RPC_URL>",
|
|
23
|
-
headers: () => ({
|
|
24
|
-
//...
|
|
25
|
-
}),
|
|
26
|
-
// fetch: <-- provide fetch polyfill fetch if needed
|
|
27
|
-
interceptors: [
|
|
28
|
-
onError((error) => {
|
|
29
|
-
console.error(error);
|
|
30
|
-
}),
|
|
31
|
-
],
|
|
32
|
-
});
|
|
33
|
-
// Create a client using an imported contract
|
|
34
|
-
const client: ContractRouterClient<typeof apiContract> = createORPCClient(link);
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
## Schema Validation
|
|
38
|
-
|
|
39
|
-
All Zod schemas are exported for direct use:
|
|
40
|
-
|
|
41
|
-
```typescript
|
|
42
|
-
import {
|
|
43
|
-
GetBalancesInputSchema,
|
|
44
|
-
TokenBalanceDataSchema,
|
|
45
|
-
} from "@helium/blockchain-api";
|
|
46
|
-
|
|
47
|
-
// Validate input
|
|
48
|
-
const input = GetBalancesInputSchema.parse({
|
|
49
|
-
walletAddress: userInput,
|
|
50
|
-
});
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
## Error Handling
|
|
54
|
-
|
|
55
|
-
See https://orpc.dev/docs/client/error-handling
|
|
56
|
-
|
|
57
|
-
Typed error definitions are available:
|
|
58
|
-
|
|
59
|
-
```typescript
|
|
60
|
-
import { INSUFFICIENT_FUNDS } from "@helium/blockchain-api";
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
## API Reference
|
|
64
|
-
|
|
65
|
-
### Routers
|
|
66
|
-
|
|
67
|
-
- `health` - Health check
|
|
68
|
-
- `tokens` - Token balances and transfers
|
|
69
|
-
- `hotspots` - Hotspot management and rewards
|
|
70
|
-
- `swap` - Token swaps via Jupiter
|
|
71
|
-
- `transactions` - Transaction submission and tracking
|
|
72
|
-
- `welcomePacks` - Welcome pack management
|
|
73
|
-
- `fiat` - Fiat offramp and bank accounts
|
|
74
|
-
- `webhooks` - Webhook handlers
|
|
75
|
-
|
|
76
|
-
## License
|
|
77
|
-
|
|
78
|
-
Apache-2.0
|