@helium/blockchain-api 0.11.18 → 0.13.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/{chunk-U3ZF47XT.js → chunk-2XDXO5AZ.js} +1 -1
- package/dist/{chunk-S46U7PBT.js → chunk-DB664YCA.js} +1 -1
- package/dist/{chunk-PPNXNULU.js → chunk-DE4MGYVZ.js} +1 -1
- package/dist/{chunk-QFW75K6Y.js → chunk-G4JOXPKN.js} +24 -6
- package/dist/{chunk-EIDQ3E2M.js → chunk-GI4C45MR.js} +2 -2
- package/dist/{chunk-PIN7ISM4.js → chunk-JEN5LTKF.js} +288 -35
- package/dist/{chunk-RT2UWP4I.js → chunk-LMKKZIF6.js} +2 -2
- package/dist/{chunk-EXCHVVEL.js → chunk-NFPQE2X2.js} +2 -2
- package/dist/{chunk-5G5SYHQP.js → chunk-O5LI7ILX.js} +7 -1
- package/dist/{chunk-IFZEDIKX.js → chunk-PNPUIF7P.js} +16 -4
- package/dist/{chunk-4UAUX7EJ.js → chunk-VCQCOERJ.js} +71 -7
- package/dist/{chunk-6EPXJJY5.js → chunk-VK2MYCMM.js} +9 -2
- package/dist/{chunk-NUTFHSNG.js → chunk-Y5PUR7UV.js} +18 -4
- package/dist/contracts.d.ts +3384 -1196
- package/dist/contracts.js +13 -13
- package/dist/errors.d.ts +20 -1
- package/dist/errors.js +4 -2
- package/dist/index.d.ts +6 -6
- package/dist/index.js +14 -14
- package/dist/schemas/common.d.ts +11 -1
- package/dist/schemas/common.js +1 -1
- package/dist/schemas/data-credits.d.ts +10 -2
- package/dist/schemas/data-credits.js +2 -2
- package/dist/schemas/fiat.js +3 -3
- package/dist/schemas/governance.d.ts +21 -1
- package/dist/schemas/governance.js +2 -2
- package/dist/schemas/hotspots.d.ts +253 -4
- package/dist/schemas/hotspots.js +2 -2
- package/dist/schemas/migration.js +3 -3
- package/dist/schemas/reward-contract.js +2 -2
- package/dist/schemas/swap.js +2 -2
- package/dist/schemas/tokens.d.ts +60 -1
- package/dist/schemas/tokens.js +2 -2
- package/dist/schemas/transactions.js +2 -2
- package/dist/schemas/welcome-packs.js +3 -3
- package/dist/schemas.d.ts +5 -5
- package/dist/schemas.js +11 -11
- package/package.json +1 -1
- /package/dist/{chunk-KTADG6LO.js → chunk-DQYAIQQ5.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { WalletAddressSchema, TokenAmountOutputSchema, HeliumPublicKeySchema, ScheduleInputSchema, RewardSplitInputSchema, createPaginatedTransactionResponse, createTransactionResponse } from './chunk-
|
|
1
|
+
import { WalletAddressSchema, TokenAmountOutputSchema, HeliumPublicKeySchema, squadsProposeFields, ScheduleInputSchema, RewardSplitInputSchema, createPaginatedTransactionResponse, createTransactionResponse } from './chunk-O5LI7ILX.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
var RewardNetworkSchema = z.enum(["hnt", "iot", "mobile"]).default("hnt");
|
|
@@ -15,6 +15,13 @@ var ClaimRewardsInputSchema = z.object({
|
|
|
15
15
|
tuktuk: z.boolean().optional(),
|
|
16
16
|
estimatedPendingRewards: TokenAmountOutputSchema.optional()
|
|
17
17
|
});
|
|
18
|
+
var ClaimHotspotRewardsInputSchema = z.object({
|
|
19
|
+
entityPubKey: HeliumPublicKeySchema.describe(
|
|
20
|
+
"The hotspot to claim rewards for."
|
|
21
|
+
),
|
|
22
|
+
walletAddress: WalletAddressSchema,
|
|
23
|
+
network: RewardNetworkSchema
|
|
24
|
+
});
|
|
18
25
|
var GetPendingRewardsInputSchema = z.object({
|
|
19
26
|
walletAddress: WalletAddressSchema,
|
|
20
27
|
network: RewardNetworkSchema
|
|
@@ -44,7 +51,8 @@ var GetPendingRewardsOutputSchema = z.object({
|
|
|
44
51
|
var TransferHotspotInputSchema = z.object({
|
|
45
52
|
walletAddress: WalletAddressSchema,
|
|
46
53
|
hotspotPubkey: HeliumPublicKeySchema,
|
|
47
|
-
recipient: WalletAddressSchema
|
|
54
|
+
recipient: WalletAddressSchema,
|
|
55
|
+
...squadsProposeFields
|
|
48
56
|
});
|
|
49
57
|
var UpdateRewardsDestinationInputSchema = z.object({
|
|
50
58
|
walletAddress: WalletAddressSchema,
|
|
@@ -73,10 +81,13 @@ var GetAutomationStatusInputSchema = z.object({
|
|
|
73
81
|
var AutomationScheduleSchema = z.enum(["daily", "weekly", "monthly"]);
|
|
74
82
|
var SetupAutomationInputSchema = z.object({
|
|
75
83
|
walletAddress: WalletAddressSchema,
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
84
|
+
// How often the cron fires: a preset cadence (daily/weekly/monthly) or a raw
|
|
85
|
+
// clockwork crontab string. Presets are resolved to a crontab server-side.
|
|
86
|
+
schedule: z.union([AutomationScheduleSchema, z.string().min(1)]).describe(
|
|
87
|
+
"A preset cadence (daily/weekly/monthly) or a raw clockwork crontab string."
|
|
88
|
+
),
|
|
89
|
+
duration: z.number().int().min(1)
|
|
90
|
+
// Number of claims to pre-fund
|
|
80
91
|
});
|
|
81
92
|
var FundAutomationInputSchema = z.object({
|
|
82
93
|
walletAddress: WalletAddressSchema,
|
|
@@ -91,6 +102,42 @@ var GetFundingEstimateInputSchema = z.object({
|
|
|
91
102
|
var CloseAutomationInputSchema = z.object({
|
|
92
103
|
walletAddress: WalletAddressSchema
|
|
93
104
|
});
|
|
105
|
+
var RequeueAutomationInputSchema = z.object({
|
|
106
|
+
walletAddress: WalletAddressSchema
|
|
107
|
+
});
|
|
108
|
+
var AddWalletToAutomationInputSchema = z.object({
|
|
109
|
+
walletAddress: WalletAddressSchema
|
|
110
|
+
});
|
|
111
|
+
var AddEntityToAutomationInputSchema = z.object({
|
|
112
|
+
walletAddress: WalletAddressSchema,
|
|
113
|
+
entityKey: HeliumPublicKeySchema
|
|
114
|
+
});
|
|
115
|
+
var RemoveEntityFromAutomationInputSchema = z.object({
|
|
116
|
+
walletAddress: WalletAddressSchema,
|
|
117
|
+
index: z.number().int().min(0)
|
|
118
|
+
});
|
|
119
|
+
var IssueDataOnlyHotspotInputSchema = z.object({
|
|
120
|
+
walletAddress: WalletAddressSchema,
|
|
121
|
+
// Base64 add-gateway token (BlockchainTxnAddGatewayV1 envelope) from the hotspot.
|
|
122
|
+
addGatewayTxn: z.string().min(1)
|
|
123
|
+
});
|
|
124
|
+
var OnboardDataOnlyHotspotInputSchema = z.object({
|
|
125
|
+
walletAddress: WalletAddressSchema,
|
|
126
|
+
network: z.enum(["iot", "mobile"]),
|
|
127
|
+
hotspotAddress: HeliumPublicKeySchema,
|
|
128
|
+
lat: z.number().min(-90).max(90).optional(),
|
|
129
|
+
lng: z.number().min(-180).max(180).optional(),
|
|
130
|
+
elevation: z.number().optional(),
|
|
131
|
+
// IoT only
|
|
132
|
+
gain: z.number().optional()
|
|
133
|
+
// IoT only
|
|
134
|
+
});
|
|
135
|
+
var TopUpAutomationInputSchema = z.object({
|
|
136
|
+
operatorAddress: WalletAddressSchema,
|
|
137
|
+
floorLamports: z.coerce.number().int().min(0),
|
|
138
|
+
fundLamports: z.coerce.number().int().min(1),
|
|
139
|
+
targets: z.array(WalletAddressSchema).min(1).max(50)
|
|
140
|
+
});
|
|
94
141
|
var DeviceTypeSchema = z.enum([
|
|
95
142
|
"iot-gateway",
|
|
96
143
|
"wifiIndoor",
|
|
@@ -145,6 +192,13 @@ var ClaimRewardsOutputSchema = createPaginatedTransactionResponse().extend({
|
|
|
145
192
|
actionMetadata: ClaimRewardsActionMetadataSchema.optional()
|
|
146
193
|
})
|
|
147
194
|
});
|
|
195
|
+
var ClaimHotspotRewardsOutputSchema = createTransactionResponse();
|
|
196
|
+
var HotspotBurnInputSchema = z.object({
|
|
197
|
+
walletAddress: WalletAddressSchema,
|
|
198
|
+
hotspotPubkey: HeliumPublicKeySchema,
|
|
199
|
+
...squadsProposeFields
|
|
200
|
+
});
|
|
201
|
+
var HotspotBurnOutputSchema = createTransactionResponse();
|
|
148
202
|
var TransferHotspotOutputSchema = createTransactionResponse();
|
|
149
203
|
var UpdateRewardsDestinationOutputSchema = createTransactionResponse();
|
|
150
204
|
var CreateSplitOutputSchema = createTransactionResponse();
|
|
@@ -152,6 +206,13 @@ var DeleteSplitOutputSchema = createTransactionResponse();
|
|
|
152
206
|
var SetupAutomationOutputSchema = createTransactionResponse();
|
|
153
207
|
var FundAutomationOutputSchema = createTransactionResponse();
|
|
154
208
|
var CloseAutomationOutputSchema = createTransactionResponse();
|
|
209
|
+
var RequeueAutomationOutputSchema = createTransactionResponse();
|
|
210
|
+
var IssueDataOnlyHotspotOutputSchema = createTransactionResponse();
|
|
211
|
+
var OnboardDataOnlyHotspotOutputSchema = createTransactionResponse();
|
|
212
|
+
var AddWalletToAutomationOutputSchema = createTransactionResponse();
|
|
213
|
+
var AddEntityToAutomationOutputSchema = createTransactionResponse();
|
|
214
|
+
var RemoveEntityFromAutomationOutputSchema = createTransactionResponse();
|
|
215
|
+
var TopUpAutomationOutputSchema = createTransactionResponse();
|
|
155
216
|
var SplitShareSchema = z.object({
|
|
156
217
|
wallet: z.string(),
|
|
157
218
|
delegate: z.string(),
|
|
@@ -168,7 +229,10 @@ var AutomationStatusOutputSchema = z.object({
|
|
|
168
229
|
hasExistingAutomation: z.boolean(),
|
|
169
230
|
isOutOfSol: z.boolean(),
|
|
170
231
|
currentSchedule: z.object({
|
|
232
|
+
cron: z.string(),
|
|
233
|
+
// raw crontab string the cron fires on
|
|
171
234
|
schedule: AutomationScheduleSchema,
|
|
235
|
+
// best-effort classification (display only)
|
|
172
236
|
time: z.string(),
|
|
173
237
|
nextRun: z.string()
|
|
174
238
|
// ISO date string
|
|
@@ -264,4 +328,4 @@ var UpdateHotspotInfoOutputSchema = createTransactionResponse().extend(
|
|
|
264
328
|
}
|
|
265
329
|
);
|
|
266
330
|
|
|
267
|
-
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, RewardNetworkSchema, SetupAutomationInputSchema, SetupAutomationOutputSchema, SplitResponseSchema, SplitShareSchema, TransferHotspotInputSchema, TransferHotspotOutputSchema, UpdateHotspotInfoInputSchema, UpdateHotspotInfoOutputSchema, UpdateRewardsDestinationInputSchema, UpdateRewardsDestinationOutputSchema };
|
|
331
|
+
export { AddEntityToAutomationInputSchema, AddEntityToAutomationOutputSchema, AddWalletToAutomationInputSchema, AddWalletToAutomationOutputSchema, AutomationScheduleSchema, AutomationStatusOutputSchema, ClaimHotspotRewardsInputSchema, ClaimHotspotRewardsOutputSchema, ClaimRewardsInputSchema, ClaimRewardsOutputSchema, CloseAutomationInputSchema, CloseAutomationOutputSchema, CreateSplitInputSchema, CreateSplitOutputSchema, DeleteSplitInputSchema, DeleteSplitOutputSchema, DeviceTypeSchema, FundAutomationInputSchema, FundAutomationOutputSchema, FundingEstimateOutputSchema, GetAutomationStatusInputSchema, GetFundingEstimateInputSchema, GetHotspotsInputSchema, GetPendingRewardsInputSchema, GetPendingRewardsOutputSchema, GetSplitInputSchema, HotspotBurnInputSchema, HotspotBurnOutputSchema, HotspotSchema, HotspotSharesSchema, HotspotTypeSchema, HotspotsDataSchema, IssueDataOnlyHotspotInputSchema, IssueDataOnlyHotspotOutputSchema, OnboardDataOnlyHotspotInputSchema, OnboardDataOnlyHotspotOutputSchema, OwnershipTypeSchema, RemoveEntityFromAutomationInputSchema, RemoveEntityFromAutomationOutputSchema, RequeueAutomationInputSchema, RequeueAutomationOutputSchema, RewardNetworkSchema, SetupAutomationInputSchema, SetupAutomationOutputSchema, SplitResponseSchema, SplitShareSchema, TopUpAutomationInputSchema, TopUpAutomationOutputSchema, TransferHotspotInputSchema, TransferHotspotOutputSchema, UpdateHotspotInfoInputSchema, UpdateHotspotInfoOutputSchema, UpdateRewardsDestinationInputSchema, UpdateRewardsDestinationOutputSchema };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { SkippedPositionSchema } from './chunk-G4JOXPKN.js';
|
|
1
2
|
import { z } from 'zod';
|
|
2
3
|
|
|
3
|
-
// src/errors/common.ts
|
|
4
4
|
var UNAUTHENTICATED = {
|
|
5
5
|
status: 401,
|
|
6
6
|
message: "Authentication required. Please sign in to continue."
|
|
@@ -32,6 +32,13 @@ var CONFLICT = {
|
|
|
32
32
|
status: 409,
|
|
33
33
|
message: "A resource with this identifier already exists."
|
|
34
34
|
};
|
|
35
|
+
var ALL_POSITIONS_SKIPPED = {
|
|
36
|
+
status: 400,
|
|
37
|
+
message: "No votes to cast \u2014 all positions were skipped.",
|
|
38
|
+
data: z.object({
|
|
39
|
+
skipped: z.array(SkippedPositionSchema)
|
|
40
|
+
})
|
|
41
|
+
};
|
|
35
42
|
var INSUFFICIENT_FUNDS = {
|
|
36
43
|
status: 400,
|
|
37
44
|
message: "Insufficient SOL balance to complete this transaction.",
|
|
@@ -57,4 +64,4 @@ var SIMULATION_FAILED = {
|
|
|
57
64
|
})
|
|
58
65
|
};
|
|
59
66
|
|
|
60
|
-
export { BAD_REQUEST, CONFLICT, INSUFFICIENT_FUNDS, INVALID_WALLET_ADDRESS, NOT_FOUND, RATE_LIMITED, SIMULATION_FAILED, TRANSACTION_FAILED, UNAUTHENTICATED, UNAUTHORIZED };
|
|
67
|
+
export { ALL_POSITIONS_SKIPPED, BAD_REQUEST, CONFLICT, INSUFFICIENT_FUNDS, INVALID_WALLET_ADDRESS, NOT_FOUND, RATE_LIMITED, SIMULATION_FAILED, TRANSACTION_FAILED, UNAUTHENTICATED, UNAUTHORIZED };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { WalletAddressSchema, TokenAmountInputSchema, PublicKeySchema, createTransactionResponse } from './chunk-
|
|
1
|
+
import { WalletAddressSchema, squadsProposeFields, TokenAmountInputSchema, PublicKeySchema, createTransactionResponse } from './chunk-O5LI7ILX.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
var GetBalancesInputSchema = z.object({
|
|
@@ -7,7 +7,8 @@ var GetBalancesInputSchema = z.object({
|
|
|
7
7
|
var TransferInputSchema = z.object({
|
|
8
8
|
walletAddress: WalletAddressSchema,
|
|
9
9
|
destination: z.string().min(32),
|
|
10
|
-
tokenAmount: TokenAmountInputSchema
|
|
10
|
+
tokenAmount: TokenAmountInputSchema,
|
|
11
|
+
...squadsProposeFields
|
|
11
12
|
});
|
|
12
13
|
var MultiTransferRecipientSchema = z.object({
|
|
13
14
|
destination: WalletAddressSchema,
|
|
@@ -20,7 +21,18 @@ var MultiTransferInputSchema = z.object({
|
|
|
20
21
|
mint: PublicKeySchema.describe(
|
|
21
22
|
"Mint address of the token to transfer to all recipients"
|
|
22
23
|
),
|
|
23
|
-
recipients: z.array(MultiTransferRecipientSchema).min(1).describe(
|
|
24
|
+
recipients: z.array(MultiTransferRecipientSchema).min(1).describe(
|
|
25
|
+
"Recipients receiving the same mint, packed into as few txs as possible"
|
|
26
|
+
)
|
|
27
|
+
});
|
|
28
|
+
var BurnInputSchema = z.object({
|
|
29
|
+
walletAddress: WalletAddressSchema,
|
|
30
|
+
tokenAmount: TokenAmountInputSchema,
|
|
31
|
+
...squadsProposeFields
|
|
32
|
+
});
|
|
33
|
+
var MemoInputSchema = z.object({
|
|
34
|
+
walletAddress: WalletAddressSchema,
|
|
35
|
+
memo: z.string().min(1).max(500).describe("UTF-8 memo text")
|
|
24
36
|
});
|
|
25
37
|
var CreateHntAccountInputSchema = z.object({
|
|
26
38
|
walletAddress: WalletAddressSchema
|
|
@@ -45,6 +57,8 @@ var TokenBalanceDataSchema = z.object({
|
|
|
45
57
|
});
|
|
46
58
|
var TransferOutputSchema = createTransactionResponse();
|
|
47
59
|
var MultiTransferOutputSchema = createTransactionResponse();
|
|
60
|
+
var BurnOutputSchema = createTransactionResponse();
|
|
61
|
+
var MemoOutputSchema = createTransactionResponse();
|
|
48
62
|
var CreateHntAccountOutputSchema = createTransactionResponse();
|
|
49
63
|
|
|
50
|
-
export { CreateHntAccountInputSchema, CreateHntAccountOutputSchema, GetBalancesInputSchema, MultiTransferInputSchema, MultiTransferOutputSchema, MultiTransferRecipientSchema, TokenAccountSchema, TokenBalanceDataSchema, TransferInputSchema, TransferOutputSchema };
|
|
64
|
+
export { BurnInputSchema, BurnOutputSchema, CreateHntAccountInputSchema, CreateHntAccountOutputSchema, GetBalancesInputSchema, MemoInputSchema, MemoOutputSchema, MultiTransferInputSchema, MultiTransferOutputSchema, MultiTransferRecipientSchema, TokenAccountSchema, TokenBalanceDataSchema, TransferInputSchema, TransferOutputSchema };
|