@helium/blockchain-api 0.11.17 → 0.12.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.
Files changed (36) hide show
  1. package/README.md +3 -0
  2. package/dist/{chunk-U3ZF47XT.js → chunk-2XDXO5AZ.js} +1 -1
  3. package/dist/{chunk-QFW75K6Y.js → chunk-4ZGQ5PS4.js} +3 -3
  4. package/dist/{chunk-2LMIMVAQ.js → chunk-5HPVPAC2.js} +300 -38
  5. package/dist/{chunk-S46U7PBT.js → chunk-DB664YCA.js} +1 -1
  6. package/dist/{chunk-PPNXNULU.js → chunk-DE4MGYVZ.js} +1 -1
  7. package/dist/{chunk-EIDQ3E2M.js → chunk-GI4C45MR.js} +2 -2
  8. package/dist/{chunk-RT2UWP4I.js → chunk-LMKKZIF6.js} +2 -2
  9. package/dist/{chunk-EXCHVVEL.js → chunk-NFPQE2X2.js} +2 -2
  10. package/dist/{chunk-5G5SYHQP.js → chunk-O5LI7ILX.js} +7 -1
  11. package/dist/{chunk-IFZEDIKX.js → chunk-PNPUIF7P.js} +16 -4
  12. package/dist/{chunk-4UAUX7EJ.js → chunk-VCQCOERJ.js} +71 -7
  13. package/dist/chunk-Y5PUR7UV.js +64 -0
  14. package/dist/contracts.d.ts +2427 -115
  15. package/dist/contracts.js +12 -12
  16. package/dist/index.d.ts +4 -4
  17. package/dist/index.js +12 -12
  18. package/dist/schemas/common.d.ts +11 -1
  19. package/dist/schemas/common.js +1 -1
  20. package/dist/schemas/data-credits.d.ts +10 -2
  21. package/dist/schemas/data-credits.js +2 -2
  22. package/dist/schemas/fiat.js +3 -3
  23. package/dist/schemas/governance.js +2 -2
  24. package/dist/schemas/hotspots.d.ts +253 -4
  25. package/dist/schemas/hotspots.js +2 -2
  26. package/dist/schemas/migration.js +3 -3
  27. package/dist/schemas/reward-contract.js +2 -2
  28. package/dist/schemas/swap.js +2 -2
  29. package/dist/schemas/tokens.d.ts +96 -1
  30. package/dist/schemas/tokens.js +2 -2
  31. package/dist/schemas/transactions.js +2 -2
  32. package/dist/schemas/welcome-packs.js +3 -3
  33. package/dist/schemas.d.ts +4 -4
  34. package/dist/schemas.js +11 -11
  35. package/package.json +1 -1
  36. package/dist/chunk-7DAYLUKX.js +0 -36
package/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # @helium/blockchain-api-client
2
+
3
+ TypeScript client and Zod schemas for the [blockchain-api](../blockchain-api) service. Consumers import the typed client rather than hand-writing `fetch` calls, so request/response shapes stay in sync with the server.
@@ -1,4 +1,4 @@
1
- import { TokenAmountInputSchema, TokenAmountOutputSchema, WalletAddressSchema, TransactionDataSchema } from './chunk-5G5SYHQP.js';
1
+ import { TokenAmountInputSchema, TokenAmountOutputSchema, WalletAddressSchema, TransactionDataSchema } from './chunk-O5LI7ILX.js';
2
2
  import { z } from 'zod';
3
3
 
4
4
  var CRON_REGEX = /^(\*|[0-9,\-\/]+)\s+(\*|[0-9,\-\/]+)\s+(\*|[0-9,\-\/]+)\s+(\*|[0-9,\-\/]+)\s+(\*|[0-9,\-\/]+)$/;
@@ -1,4 +1,4 @@
1
- import { PublicKeySchema, TokenAmountInputSchema, WalletAddressSchema, createTypedTransactionResponse, createTransactionResponse, createPaginatedTransactionResponse, createTypedPaginatedTransactionResponse } from './chunk-5G5SYHQP.js';
1
+ import { PublicKeySchema, TokenAmountInputSchema, WalletAddressSchema, createTypedTransactionResponse, createTransactionResponse, createPaginatedTransactionResponse, createTypedPaginatedTransactionResponse } from './chunk-O5LI7ILX.js';
2
2
  import { z } from 'zod';
3
3
 
4
4
  var LockupKindSchema = z.enum(["cliff", "constant"]);
@@ -58,13 +58,13 @@ var SplitPositionInputSchema = z.object({
58
58
  });
59
59
  var TransferPositionInputSchema = z.object({
60
60
  walletAddress: WalletAddressSchema.describe(
61
- "Wallet address that owns both positions"
61
+ "Wallet address that owns the source position and pays transaction fees"
62
62
  ),
63
63
  positionMint: PublicKeySchema.describe(
64
64
  "Mint address of the source position NFT"
65
65
  ),
66
66
  targetPositionMint: PublicKeySchema.describe(
67
- "Mint address of the target position NFT"
67
+ "Mint address of the target position NFT. May be owned by a different wallet; its lockup must be equal-or-longer and equal-or-stricter than the source's."
68
68
  ),
69
69
  amount: z.string().regex(/^\d+$/, "Amount must be a whole number in smallest unit (bones)").describe("Raw token amount to transfer (in smallest unit)")
70
70
  });
@@ -1,17 +1,17 @@
1
- import { INSUFFICIENT_FUNDS, INVALID_WALLET_ADDRESS, BAD_REQUEST, UNAUTHORIZED, NOT_FOUND, CONFLICT, SIMULATION_FAILED, UNAUTHENTICATED } from './chunk-6EPXJJY5.js';
1
+ import { INSUFFICIENT_FUNDS, INVALID_WALLET_ADDRESS, BAD_REQUEST, NOT_FOUND, UNAUTHORIZED, CONFLICT, RATE_LIMITED, SIMULATION_FAILED, UNAUTHENTICATED } from './chunk-6EPXJJY5.js';
2
2
  import { BridgeWebhookInputSchema, BridgeWebhookOutputSchema } from './chunk-7CTJX35S.js';
3
- import { MigrateInputSchema, MigrateOutputSchema, MigratableHotspotsInputSchema, MigratableHotspotsOutputSchema } from './chunk-EXCHVVEL.js';
4
- import { ClaimInviteRequestSchema, ClaimInviteResponseSchema, CreateInviteResponseSchema, DeleteRewardContractTransactionResponseSchema, CreateRewardContractTransactionInputSchema, CreateRewardContractTransactionResponseSchema, EstimateCostToCreateRewardContractResponseSchema, FindRewardContractResponseSchema } from './chunk-U3ZF47XT.js';
5
- import { CreateHntAccountInputSchema, CreateHntAccountOutputSchema, TransferInputSchema, TransferOutputSchema, GetBalancesInputSchema, TokenBalanceDataSchema } from './chunk-7DAYLUKX.js';
6
- import { GetHistoryInputSchema, HistoryOutputSchema, EstimateInputSchema, EstimateOutputSchema, GetByPayerAndTagInputSchema, PayerBatchesOutputSchema, GetByPayerInputSchema, ResubmitInputSchema, ResubmitOutputSchema, GetInputSchema, BatchStatusOutputSchema, SubmitInputSchema, SubmitOutputSchema } from './chunk-PPNXNULU.js';
7
- import { DelegateDataCreditsInputSchema, MintDataCreditsInputSchema } from './chunk-IFZEDIKX.js';
8
- import { WelcomePackInviteInputSchema, WelcomePackInviteOutputSchema, WelcomePackClaimInputSchema, WelcomePackClaimOutputSchema, WelcomePackGetByAddressInputSchema, WelcomePackSchema, WelcomePackDeleteInputSchema, WelcomePackDeleteOutputSchema, WelcomePackGetInputSchema, WelcomePackCreateInputSchema, WelcomePackCreateOutputSchema, WelcomePackListInputSchema, WelcomePackListOutputSchema } from './chunk-RT2UWP4I.js';
9
- import { UpdateTransferInputSchema, UpdateTransferOutputSchema, SendFundsInputSchema, SendFundsOutputSchema, GetSendQuoteInputSchema, QuoteOutputSchema, DeleteBankAccountInputSchema, DeleteBankAccountOutputSchema, CreateBankAccountInputSchema, BankAccountSchema, BankAccountListOutputSchema, FeesOutputSchema, InitKycInputSchema, KycStatusOutputSchema } from './chunk-EIDQ3E2M.js';
10
- import { GetInstructionsInputSchema, GetQuoteInputSchema, QuoteResponseSchema, GetTokensInputSchema, TokenListOutputSchema } from './chunk-S46U7PBT.js';
11
- import { UnassignProxiesInputSchema, UnassignProxiesResponseSchema, AssignProxiesInputSchema, AssignProxiesResponseSchema, RelinquishPositionVotesInputSchema, RelinquishPositionVotesResponseSchema, RelinquishVoteInputSchema, RelinquishVoteResponseSchema, VoteInputSchema, VoteResponseSchema, ExtendDelegationInputSchema, ExtendDelegationResponseSchema, UndelegateInputSchema, UndelegatePositionResponseSchema, ClaimDelegationRewardsInputSchema, ClaimDelegationRewardsResponseSchema, DelegatePositionInputSchema, DelegatePositionsResponseSchema, TransferPositionOwnershipInputSchema, TransferPositionOwnershipResponseSchema, TransferPositionInputSchema, TransferPositionResponseSchema, SplitPositionInputSchema, SplitPositionResponseSchema, ResetLockupInputSchema, ResetLockupResponseSchema, FlipLockupKindInputSchema, FlipLockupKindResponseSchema, ExtendPositionInputSchema, ExtendPositionResponseSchema, ClosePositionInputSchema, ClosePositionResponseSchema, CreatePositionInputSchema, CreatePositionResponseSchema } from './chunk-QFW75K6Y.js';
3
+ import { MigrateInputSchema, MigrateOutputSchema, MigratableHotspotsInputSchema, MigratableHotspotsOutputSchema } from './chunk-NFPQE2X2.js';
4
+ import { ClaimInviteRequestSchema, ClaimInviteResponseSchema, CreateInviteResponseSchema, DeleteRewardContractTransactionResponseSchema, CreateRewardContractTransactionInputSchema, CreateRewardContractTransactionResponseSchema, EstimateCostToCreateRewardContractResponseSchema, FindRewardContractResponseSchema } from './chunk-2XDXO5AZ.js';
5
+ import { CreateHntAccountInputSchema, CreateHntAccountOutputSchema, MemoInputSchema, MemoOutputSchema, BurnInputSchema, BurnOutputSchema, MultiTransferInputSchema, MultiTransferOutputSchema, TransferInputSchema, TransferOutputSchema, GetBalancesInputSchema, TokenBalanceDataSchema } from './chunk-Y5PUR7UV.js';
6
+ import { GetHistoryInputSchema, HistoryOutputSchema, EstimateInputSchema, EstimateOutputSchema, GetByPayerAndTagInputSchema, PayerBatchesOutputSchema, GetByPayerInputSchema, ResubmitInputSchema, ResubmitOutputSchema, GetInputSchema, BatchStatusOutputSchema, SubmitInputSchema, SubmitOutputSchema } from './chunk-DE4MGYVZ.js';
7
+ import { BurnDataCreditsInputSchema, DelegateDataCreditsInputSchema, MintDataCreditsInputSchema } from './chunk-PNPUIF7P.js';
8
+ import { WelcomePackInviteInputSchema, WelcomePackInviteOutputSchema, WelcomePackClaimInputSchema, WelcomePackClaimOutputSchema, WelcomePackGetByAddressInputSchema, WelcomePackSchema, WelcomePackDeleteInputSchema, WelcomePackDeleteOutputSchema, WelcomePackGetInputSchema, WelcomePackCreateInputSchema, WelcomePackCreateOutputSchema, WelcomePackListInputSchema, WelcomePackListOutputSchema } from './chunk-LMKKZIF6.js';
9
+ import { UpdateTransferInputSchema, UpdateTransferOutputSchema, SendFundsInputSchema, SendFundsOutputSchema, GetSendQuoteInputSchema, QuoteOutputSchema, DeleteBankAccountInputSchema, DeleteBankAccountOutputSchema, CreateBankAccountInputSchema, BankAccountSchema, BankAccountListOutputSchema, FeesOutputSchema, InitKycInputSchema, KycStatusOutputSchema } from './chunk-GI4C45MR.js';
10
+ import { GetInstructionsInputSchema, GetQuoteInputSchema, QuoteResponseSchema, GetTokensInputSchema, TokenListOutputSchema } from './chunk-DB664YCA.js';
11
+ import { UnassignProxiesInputSchema, UnassignProxiesResponseSchema, AssignProxiesInputSchema, AssignProxiesResponseSchema, RelinquishPositionVotesInputSchema, RelinquishPositionVotesResponseSchema, RelinquishVoteInputSchema, RelinquishVoteResponseSchema, VoteInputSchema, VoteResponseSchema, ExtendDelegationInputSchema, ExtendDelegationResponseSchema, UndelegateInputSchema, UndelegatePositionResponseSchema, ClaimDelegationRewardsInputSchema, ClaimDelegationRewardsResponseSchema, DelegatePositionInputSchema, DelegatePositionsResponseSchema, TransferPositionOwnershipInputSchema, TransferPositionOwnershipResponseSchema, TransferPositionInputSchema, TransferPositionResponseSchema, SplitPositionInputSchema, SplitPositionResponseSchema, ResetLockupInputSchema, ResetLockupResponseSchema, FlipLockupKindInputSchema, FlipLockupKindResponseSchema, ExtendPositionInputSchema, ExtendPositionResponseSchema, ClosePositionInputSchema, ClosePositionResponseSchema, CreatePositionInputSchema, CreatePositionResponseSchema } from './chunk-4ZGQ5PS4.js';
12
12
  import { HealthResponseSchema } from './chunk-4RVSLJOU.js';
13
- import { UpdateHotspotInfoInputSchema, UpdateHotspotInfoOutputSchema, GetFundingEstimateInputSchema, FundingEstimateOutputSchema, FundAutomationInputSchema, FundAutomationOutputSchema, SetupAutomationInputSchema, SetupAutomationOutputSchema, GetAutomationStatusInputSchema, AutomationStatusOutputSchema, CloseAutomationInputSchema, CloseAutomationOutputSchema, DeleteSplitInputSchema, DeleteSplitOutputSchema, CreateSplitInputSchema, CreateSplitOutputSchema, GetSplitInputSchema, SplitResponseSchema, UpdateRewardsDestinationInputSchema, UpdateRewardsDestinationOutputSchema, TransferHotspotInputSchema, TransferHotspotOutputSchema, GetPendingRewardsInputSchema, GetPendingRewardsOutputSchema, ClaimRewardsInputSchema, ClaimRewardsOutputSchema, GetHotspotsInputSchema, HotspotsDataSchema } from './chunk-4UAUX7EJ.js';
14
- import { WalletAddressSchema, HeliumPublicKeySchema, TransactionDataSchema } from './chunk-5G5SYHQP.js';
13
+ import { UpdateHotspotInfoInputSchema, UpdateHotspotInfoOutputSchema, TopUpAutomationInputSchema, TopUpAutomationOutputSchema, OnboardDataOnlyHotspotInputSchema, OnboardDataOnlyHotspotOutputSchema, IssueDataOnlyHotspotInputSchema, IssueDataOnlyHotspotOutputSchema, RemoveEntityFromAutomationInputSchema, RemoveEntityFromAutomationOutputSchema, AddEntityToAutomationInputSchema, AddEntityToAutomationOutputSchema, AddWalletToAutomationInputSchema, AddWalletToAutomationOutputSchema, RequeueAutomationInputSchema, RequeueAutomationOutputSchema, GetFundingEstimateInputSchema, FundingEstimateOutputSchema, FundAutomationInputSchema, FundAutomationOutputSchema, SetupAutomationInputSchema, SetupAutomationOutputSchema, GetAutomationStatusInputSchema, AutomationStatusOutputSchema, CloseAutomationInputSchema, CloseAutomationOutputSchema, DeleteSplitInputSchema, DeleteSplitOutputSchema, CreateSplitInputSchema, CreateSplitOutputSchema, GetSplitInputSchema, SplitResponseSchema, UpdateRewardsDestinationInputSchema, UpdateRewardsDestinationOutputSchema, TransferHotspotInputSchema, TransferHotspotOutputSchema, GetPendingRewardsInputSchema, GetPendingRewardsOutputSchema, HotspotBurnInputSchema, HotspotBurnOutputSchema, ClaimHotspotRewardsInputSchema, ClaimHotspotRewardsOutputSchema, ClaimRewardsInputSchema, ClaimRewardsOutputSchema, GetHotspotsInputSchema, HotspotsDataSchema } from './chunk-VCQCOERJ.js';
14
+ import { WalletAddressSchema, HeliumPublicKeySchema, TransactionDataSchema, PublicKeySchema } from './chunk-O5LI7ILX.js';
15
15
  import { oc } from '@orpc/contract';
16
16
  import { z } from 'zod';
17
17
 
@@ -25,36 +25,106 @@ var healthContract = oc.tag("Health").router({
25
25
  });
26
26
  var tokensContract = oc.tag("Tokens").router({
27
27
  /** Public: Get token balances for a wallet */
28
- getBalances: oc.route({ method: "GET", path: "/tokens/{walletAddress}", summary: "Get token balances for a wallet" }).input(GetBalancesInputSchema).output(TokenBalanceDataSchema).errors({
28
+ getBalances: oc.route({
29
+ method: "GET",
30
+ path: "/tokens/{walletAddress}",
31
+ summary: "Get token balances for a wallet"
32
+ }).input(GetBalancesInputSchema).output(TokenBalanceDataSchema).errors({
29
33
  INVALID_WALLET_ADDRESS
30
34
  }),
31
35
  /** Protected: Transfer tokens */
32
- transfer: oc.route({ method: "POST", path: "/tokens/transfer", summary: "Transfer tokens" }).input(TransferInputSchema).output(TransferOutputSchema).errors({
36
+ transfer: oc.route({
37
+ method: "POST",
38
+ path: "/tokens/transfer",
39
+ summary: "Transfer tokens"
40
+ }).input(TransferInputSchema).output(TransferOutputSchema).errors({
41
+ BAD_REQUEST,
42
+ INSUFFICIENT_FUNDS,
43
+ NOT_FOUND
44
+ }),
45
+ /** Protected: Transfer the same token mint to multiple recipients, packed into as few txs as possible */
46
+ multiTransfer: oc.route({
47
+ method: "POST",
48
+ path: "/tokens/multi-transfer",
49
+ summary: "Transfer the same token to multiple recipients"
50
+ }).input(MultiTransferInputSchema).output(MultiTransferOutputSchema).errors({
51
+ BAD_REQUEST,
52
+ INSUFFICIENT_FUNDS
53
+ }),
54
+ /** Protected: Burn tokens */
55
+ burn: oc.route({ method: "POST", path: "/tokens/burn", summary: "Burn tokens" }).input(BurnInputSchema).output(BurnOutputSchema).errors({
56
+ BAD_REQUEST,
57
+ INSUFFICIENT_FUNDS,
58
+ NOT_FOUND
59
+ }),
60
+ /** Protected: Emit a memo transaction */
61
+ memo: oc.route({
62
+ method: "POST",
63
+ path: "/tokens/memo",
64
+ summary: "Emit a memo transaction"
65
+ }).input(MemoInputSchema).output(MemoOutputSchema).errors({
33
66
  BAD_REQUEST,
34
67
  INSUFFICIENT_FUNDS
35
68
  }),
36
69
  /** Protected: Create HNT account */
37
- createHntAccount: oc.route({ method: "POST", path: "/tokens/hnt-account", summary: "Create HNT account" }).input(CreateHntAccountInputSchema).output(CreateHntAccountOutputSchema).errors({
70
+ createHntAccount: oc.route({
71
+ method: "POST",
72
+ path: "/tokens/hnt-account",
73
+ summary: "Create HNT account"
74
+ }).input(CreateHntAccountInputSchema).output(CreateHntAccountOutputSchema).errors({
38
75
  INVALID_WALLET_ADDRESS,
39
76
  INSUFFICIENT_FUNDS
40
77
  })
41
78
  });
42
79
  var hotspotsContract = oc.tag("Hotspot").prefix("/hotspots").router({
43
80
  /** Public: Get hotspots for a wallet */
44
- getHotspots: oc.route({ method: "GET", path: "/wallet/{walletAddress}", summary: "Get hotspots for a wallet" }).input(GetHotspotsInputSchema).output(HotspotsDataSchema).errors({
81
+ getHotspots: oc.route({
82
+ method: "GET",
83
+ path: "/wallet/{walletAddress}",
84
+ summary: "Get hotspots for a wallet"
85
+ }).input(GetHotspotsInputSchema).output(HotspotsDataSchema).errors({
45
86
  INVALID_WALLET_ADDRESS
46
87
  }),
47
88
  /** Protected: Claim rewards for hotspots */
48
- claimRewards: oc.route({ method: "POST", path: "/claim-rewards", summary: "Claim all hotspot rewards" }).input(ClaimRewardsInputSchema).output(ClaimRewardsOutputSchema).errors({
89
+ claimRewards: oc.route({
90
+ method: "POST",
91
+ path: "/claim-rewards",
92
+ summary: "Claim all hotspot rewards"
93
+ }).input(ClaimRewardsInputSchema).output(ClaimRewardsOutputSchema).errors({
94
+ INSUFFICIENT_FUNDS
95
+ }),
96
+ /** Protected: Claim rewards for a single hotspot */
97
+ claimHotspotRewards: oc.route({
98
+ method: "POST",
99
+ path: "/{entityPubKey}/claim-rewards",
100
+ summary: "Claim rewards for one hotspot"
101
+ }).input(ClaimHotspotRewardsInputSchema).output(ClaimHotspotRewardsOutputSchema).errors({
102
+ NOT_FOUND,
49
103
  INSUFFICIENT_FUNDS
50
104
  }),
105
+ /** Protected: Burn (permanently destroy) a hotspot */
106
+ burnHotspot: oc.route({ method: "POST", path: "/burn", summary: "Burn a hotspot" }).input(HotspotBurnInputSchema).output(HotspotBurnOutputSchema).errors({
107
+ NOT_FOUND,
108
+ UNAUTHORIZED,
109
+ BAD_REQUEST: { message: "Invalid parameters", status: 400 },
110
+ INSUFFICIENT_FUNDS,
111
+ CONFLICT
112
+ }),
51
113
  /** Public: Get pending rewards for a wallet */
52
- getPendingRewards: oc.route({ method: "GET", path: "/pending-rewards/{walletAddress}", summary: "Get pending rewards" }).input(GetPendingRewardsInputSchema).output(GetPendingRewardsOutputSchema).errors({
114
+ getPendingRewards: oc.route({
115
+ method: "GET",
116
+ path: "/pending-rewards/{walletAddress}",
117
+ summary: "Get pending rewards"
118
+ }).input(GetPendingRewardsInputSchema).output(GetPendingRewardsOutputSchema).errors({
53
119
  BAD_REQUEST: { message: "Invalid wallet address", status: 400 },
54
120
  INVALID_WALLET_ADDRESS
55
121
  }),
56
122
  /** Protected: Transfer hotspot ownership */
57
- transferHotspot: oc.route({ method: "POST", path: "/transfer", summary: "Transfer ownership" }).input(TransferHotspotInputSchema).output(TransferHotspotOutputSchema).errors({
123
+ transferHotspot: oc.route({
124
+ method: "POST",
125
+ path: "/transfer",
126
+ summary: "Transfer ownership"
127
+ }).input(TransferHotspotInputSchema).output(TransferHotspotOutputSchema).errors({
58
128
  UNAUTHORIZED,
59
129
  NOT_FOUND,
60
130
  BAD_REQUEST: { message: "Invalid transfer parameters", status: 400 },
@@ -62,34 +132,58 @@ var hotspotsContract = oc.tag("Hotspot").prefix("/hotspots").router({
62
132
  CONFLICT
63
133
  }),
64
134
  /** Protected: Update rewards destination */
65
- updateRewardsDestination: oc.route({ method: "POST", path: "/update-rewards-destination", summary: "Update rewards destination" }).input(UpdateRewardsDestinationInputSchema).output(UpdateRewardsDestinationOutputSchema).errors({
135
+ updateRewardsDestination: oc.route({
136
+ method: "POST",
137
+ path: "/update-rewards-destination",
138
+ summary: "Update rewards destination"
139
+ }).input(UpdateRewardsDestinationInputSchema).output(UpdateRewardsDestinationOutputSchema).errors({
66
140
  BAD_REQUEST: { message: "Invalid parameters", status: 400 },
67
141
  NOT_FOUND,
68
142
  INSUFFICIENT_FUNDS
69
143
  }),
70
144
  /** Public: Get split configuration for a hotspot */
71
- getSplit: oc.route({ method: "GET", path: "/split/{walletAddress}/{hotspotPubkey}", summary: "Get reward split" }).input(GetSplitInputSchema).output(SplitResponseSchema).errors({
145
+ getSplit: oc.route({
146
+ method: "GET",
147
+ path: "/split/{walletAddress}/{hotspotPubkey}",
148
+ summary: "Get reward split"
149
+ }).input(GetSplitInputSchema).output(SplitResponseSchema).errors({
72
150
  NOT_FOUND: { message: "Split not found", status: 404 },
73
151
  INVALID_WALLET_ADDRESS
74
152
  }),
75
153
  /** Protected: Create a split configuration */
76
- createSplit: oc.route({ method: "POST", path: "/split", summary: "Create a reward split" }).input(CreateSplitInputSchema).output(CreateSplitOutputSchema).errors({
154
+ createSplit: oc.route({
155
+ method: "POST",
156
+ path: "/split",
157
+ summary: "Create a reward split"
158
+ }).input(CreateSplitInputSchema).output(CreateSplitOutputSchema).errors({
77
159
  NOT_FOUND,
78
160
  BAD_REQUEST: { message: "Invalid split configuration", status: 400 },
79
161
  INSUFFICIENT_FUNDS
80
162
  }),
81
163
  /** Protected: Delete a split configuration */
82
- deleteSplit: oc.route({ method: "DELETE", path: "/split", summary: "Delete a reward split" }).input(DeleteSplitInputSchema).output(DeleteSplitOutputSchema).errors({
164
+ deleteSplit: oc.route({
165
+ method: "DELETE",
166
+ path: "/split",
167
+ summary: "Delete a reward split"
168
+ }).input(DeleteSplitInputSchema).output(DeleteSplitOutputSchema).errors({
83
169
  NOT_FOUND,
84
170
  INSUFFICIENT_FUNDS
85
171
  }),
86
172
  /** Protected: Close automation */
87
- closeAutomation: oc.route({ method: "POST", path: "/wallet/{walletAddress}/automation/close", summary: "Close automation" }).input(CloseAutomationInputSchema).output(CloseAutomationOutputSchema).errors({
173
+ closeAutomation: oc.route({
174
+ method: "POST",
175
+ path: "/wallet/{walletAddress}/automation/close",
176
+ summary: "Close automation"
177
+ }).input(CloseAutomationInputSchema).output(CloseAutomationOutputSchema).errors({
88
178
  NOT_FOUND,
89
179
  INSUFFICIENT_FUNDS
90
180
  }),
91
181
  /** Protected: Get automation status */
92
- getAutomationStatus: oc.route({ method: "GET", path: "/wallet/{walletAddress}/automation/status", summary: "Get automation status" }).input(GetAutomationStatusInputSchema).output(AutomationStatusOutputSchema).errors({
182
+ getAutomationStatus: oc.route({
183
+ method: "GET",
184
+ path: "/wallet/{walletAddress}/automation/status",
185
+ summary: "Get automation status"
186
+ }).input(GetAutomationStatusInputSchema).output(AutomationStatusOutputSchema).errors({
93
187
  NOT_FOUND
94
188
  }),
95
189
  /** Protected: Create automation */
@@ -102,13 +196,94 @@ var hotspotsContract = oc.tag("Hotspot").prefix("/hotspots").router({
102
196
  INSUFFICIENT_FUNDS
103
197
  }),
104
198
  /** Protected: Fund automation */
105
- fundAutomation: oc.route({ method: "POST", path: "/wallet/{walletAddress}/automation/fund", summary: "Fund automation" }).input(FundAutomationInputSchema).output(FundAutomationOutputSchema).errors({
199
+ fundAutomation: oc.route({
200
+ method: "POST",
201
+ path: "/wallet/{walletAddress}/automation/fund",
202
+ summary: "Fund automation"
203
+ }).input(FundAutomationInputSchema).output(FundAutomationOutputSchema).errors({
106
204
  NOT_FOUND,
107
205
  INSUFFICIENT_FUNDS
108
206
  }),
109
207
  /** Protected: Get funding estimate */
110
- getFundingEstimate: oc.route({ method: "GET", path: "/wallet/{walletAddress}/automation/funding-estimate", summary: "Get funding estimate" }).input(GetFundingEstimateInputSchema).output(FundingEstimateOutputSchema).errors({}),
111
- updateHotspotInfo: oc.route({ method: "POST", path: "/update-info", summary: "Update hotspot info", description: "Creates an unsigned transaction to update hotspot configuration. Requires deviceType discriminant (iot or mobile) to select the correct update path and validate against on-chain network." }).input(UpdateHotspotInfoInputSchema).output(UpdateHotspotInfoOutputSchema).errors({
208
+ getFundingEstimate: oc.route({
209
+ method: "GET",
210
+ path: "/wallet/{walletAddress}/automation/funding-estimate",
211
+ summary: "Get funding estimate"
212
+ }).input(GetFundingEstimateInputSchema).output(FundingEstimateOutputSchema).errors({}),
213
+ /** Protected: Requeue an automation that ran out of SOL */
214
+ requeueAutomation: oc.route({
215
+ method: "POST",
216
+ path: "/wallet/{walletAddress}/automation/requeue",
217
+ summary: "Requeue automation"
218
+ }).input(RequeueAutomationInputSchema).output(RequeueAutomationOutputSchema).errors({
219
+ NOT_FOUND,
220
+ INSUFFICIENT_FUNDS
221
+ }),
222
+ /** Protected: Add a whole-wallet claim to an automation */
223
+ addWalletToAutomation: oc.route({
224
+ method: "POST",
225
+ path: "/wallet/{walletAddress}/automation/add-wallet",
226
+ summary: "Add wallet claim to automation"
227
+ }).input(AddWalletToAutomationInputSchema).output(AddWalletToAutomationOutputSchema).errors({
228
+ NOT_FOUND,
229
+ INSUFFICIENT_FUNDS
230
+ }),
231
+ /** Protected: Add a single hotspot claim to an automation */
232
+ addEntityToAutomation: oc.route({
233
+ method: "POST",
234
+ path: "/wallet/{walletAddress}/automation/add-entity",
235
+ summary: "Add hotspot claim to automation"
236
+ }).input(AddEntityToAutomationInputSchema).output(AddEntityToAutomationOutputSchema).errors({
237
+ NOT_FOUND,
238
+ INSUFFICIENT_FUNDS
239
+ }),
240
+ /** Protected: Remove a claim entry from an automation */
241
+ removeEntityFromAutomation: oc.route({
242
+ method: "POST",
243
+ path: "/wallet/{walletAddress}/automation/remove-entity",
244
+ summary: "Remove claim from automation"
245
+ }).input(RemoveEntityFromAutomationInputSchema).output(RemoveEntityFromAutomationOutputSchema).errors({
246
+ NOT_FOUND,
247
+ INSUFFICIENT_FUNDS
248
+ }),
249
+ /** Protected: Issue a data-only hotspot */
250
+ issueDataOnlyHotspot: oc.route({
251
+ method: "POST",
252
+ path: "/data-only/issue",
253
+ summary: "Issue a data-only hotspot"
254
+ }).input(IssueDataOnlyHotspotInputSchema).output(IssueDataOnlyHotspotOutputSchema).errors({
255
+ NOT_FOUND,
256
+ INSUFFICIENT_FUNDS,
257
+ BAD_REQUEST: {
258
+ message: "Invalid add-gateway transaction",
259
+ status: 400
260
+ }
261
+ }),
262
+ /** Protected: Onboard a data-only hotspot */
263
+ onboardDataOnlyHotspot: oc.route({
264
+ method: "POST",
265
+ path: "/data-only/onboard",
266
+ summary: "Onboard a data-only hotspot"
267
+ }).input(OnboardDataOnlyHotspotInputSchema).output(OnboardDataOnlyHotspotOutputSchema).errors({
268
+ NOT_FOUND,
269
+ INSUFFICIENT_FUNDS,
270
+ BAD_REQUEST: { message: "Invalid onboard parameters", status: 400 }
271
+ }),
272
+ /** Protected: Operator floor top-up for a batch of automations */
273
+ topUpAutomation: oc.route({
274
+ method: "POST",
275
+ path: "/automation/top-up",
276
+ summary: "Operator floor top-up of automation funding"
277
+ }).input(TopUpAutomationInputSchema).output(TopUpAutomationOutputSchema).errors({
278
+ NOT_FOUND,
279
+ INSUFFICIENT_FUNDS
280
+ }),
281
+ updateHotspotInfo: oc.route({
282
+ method: "POST",
283
+ path: "/update-info",
284
+ summary: "Update hotspot info",
285
+ description: "Creates an unsigned transaction to update hotspot configuration. Requires deviceType discriminant (iot or mobile) to select the correct update path and validate against on-chain network."
286
+ }).input(UpdateHotspotInfoInputSchema).output(UpdateHotspotInfoOutputSchema).errors({
112
287
  NOT_FOUND,
113
288
  UNAUTHORIZED,
114
289
  BAD_REQUEST: { message: "Device type mismatch", status: 400 },
@@ -156,13 +331,13 @@ var governanceContract = oc.tag("Governance").prefix("/governance").router({
156
331
  method: "POST",
157
332
  path: "/positions/{positionMint}/transfer",
158
333
  summary: "Transfer between positions",
159
- description: "Transfer tokens from one position to another. Both positions must have no active votes."
334
+ description: "Transfer tokens from one position to another. Both positions must have no active votes. The target position may be owned by a different wallet, enabling veHNT transfer between wallets."
160
335
  }).input(TransferPositionInputSchema).errors({ BAD_REQUEST, NOT_FOUND, INSUFFICIENT_FUNDS }).output(TransferPositionResponseSchema),
161
336
  transferPositionOwnership: oc.route({
162
337
  method: "POST",
163
338
  path: "/positions/{positionMint}/transfer-ownership",
164
339
  summary: "Transfer position ownership",
165
- description: "Transfer ownership of a position NFT to another wallet. Both the current owner and new owner must sign the transaction."
340
+ description: "Transfer ownership of a position NFT to another wallet. Only the current owner must sign the transaction; the recipient does not."
166
341
  }).input(TransferPositionOwnershipInputSchema).errors({ BAD_REQUEST, NOT_FOUND, INSUFFICIENT_FUNDS }).output(TransferPositionOwnershipResponseSchema),
167
342
  delegatePositions: oc.route({
168
343
  method: "POST",
@@ -317,16 +492,19 @@ var rewardContract = oc.tag("Reward Contract").prefix("/hotspots").router({
317
492
  });
318
493
  var swapContract = oc.tag("Swap").router({
319
494
  getTokens: oc.route({ method: "GET", path: "/swap/tokens" }).input(GetTokensInputSchema).output(TokenListOutputSchema).errors({
320
- JUPITER_ERROR: { message: "Failed to fetch tokens from Jupiter" }
495
+ JUPITER_ERROR: { message: "Failed to fetch tokens from Jupiter" },
496
+ RATE_LIMITED
321
497
  }),
322
498
  getQuote: oc.route({ method: "GET", path: "/swap/quote" }).input(GetQuoteInputSchema).output(QuoteResponseSchema).errors({
323
499
  BAD_REQUEST: { message: "Invalid quote parameters", status: 400 },
324
- JUPITER_ERROR: { message: "Failed to get quote from Jupiter" }
500
+ JUPITER_ERROR: { message: "Failed to get quote from Jupiter" },
501
+ RATE_LIMITED
325
502
  }),
326
503
  getInstructions: oc.route({ method: "POST", path: "/swap/instructions" }).input(GetInstructionsInputSchema).output(TransactionDataSchema).errors({
327
504
  BAD_REQUEST: { message: "Invalid instruction parameters", status: 400 },
328
505
  JUPITER_ERROR: { message: "Failed to get swap instructions from Jupiter" },
329
- INSUFFICIENT_FUNDS
506
+ INSUFFICIENT_FUNDS,
507
+ RATE_LIMITED
330
508
  })
331
509
  });
332
510
  var transactionsContract = oc.tag("Transactions").router({
@@ -418,13 +596,15 @@ var fiatContract = oc.errors({
418
596
  }),
419
597
  getSendQuote: oc.route({ method: "GET", path: "/fiat/quote/{id}" }).input(GetSendQuoteInputSchema).output(QuoteOutputSchema).errors({
420
598
  BAD_REQUEST,
421
- JUPITER_ERROR: { message: "Failed to get quote from Jupiter", status: 500 }
599
+ JUPITER_ERROR: { message: "Failed to get quote from Jupiter", status: 500 },
600
+ RATE_LIMITED
422
601
  }),
423
602
  sendFunds: oc.route({ method: "POST", path: "/fiat/send" }).input(SendFundsInputSchema).output(SendFundsOutputSchema).errors({
424
603
  NOT_FOUND,
425
604
  BRIDGE_ERROR: { message: "Failed to create Bridge transfer", status: 500 },
426
605
  JUPITER_ERROR: { message: "Failed to get quote from Jupiter", status: 500 },
427
- INSUFFICIENT_FUNDS
606
+ INSUFFICIENT_FUNDS,
607
+ RATE_LIMITED
428
608
  }),
429
609
  updateTransfer: oc.route({ method: "PUT", path: "/fiat/transfer/{id}" }).input(UpdateTransferInputSchema).output(UpdateTransferOutputSchema).errors({
430
610
  NOT_FOUND: { message: "Transfer not found", status: 404 }
@@ -471,9 +651,90 @@ var dataCreditsContract = oc.tag("Data Credits").router({
471
651
  summary: "Delegate data credits to a router key"
472
652
  }).input(DelegateDataCreditsInputSchema).output(TransactionDataSchema).errors({
473
653
  BAD_REQUEST,
474
- INSUFFICIENT_FUNDS
654
+ INSUFFICIENT_FUNDS,
655
+ NOT_FOUND
656
+ }),
657
+ burn: oc.route({
658
+ method: "POST",
659
+ path: "/data-credits/burn",
660
+ summary: "Burn data credits"
661
+ }).input(BurnDataCreditsInputSchema).output(TransactionDataSchema).errors({
662
+ BAD_REQUEST,
663
+ INSUFFICIENT_FUNDS,
664
+ NOT_FOUND
475
665
  })
476
666
  });
667
+ var TransactionIndexSchema = z.string().regex(/^\d+$/, "transactionIndex must be a whole number").describe("Squads transaction index of the target proposal (u64 as string)");
668
+ var SquadsProposalVoteInputSchema = z.object({
669
+ member: PublicKeySchema.describe(
670
+ "Wallet address of the multisig member casting the vote (signer and fee payer)"
671
+ ),
672
+ multisig: PublicKeySchema.describe("Multisig account PDA"),
673
+ transactionIndex: TransactionIndexSchema,
674
+ memo: z.string().optional().describe("Optional memo recorded on the vote")
675
+ });
676
+ var SquadsExecuteProposalInputSchema = z.object({
677
+ member: PublicKeySchema.describe(
678
+ "Wallet address of the multisig member executing the proposal (signer and fee payer)"
679
+ ),
680
+ multisig: PublicKeySchema.describe("Multisig account PDA"),
681
+ transactionIndex: TransactionIndexSchema
682
+ });
683
+ var SquadsPermissionSchema = z.enum(["initiate", "vote", "execute"]);
684
+ var SquadsConfigActionSchema = z.discriminatedUnion("type", [
685
+ z.object({
686
+ type: z.literal("addMember"),
687
+ newMember: PublicKeySchema.describe("Pubkey of the member to add"),
688
+ permissions: z.array(SquadsPermissionSchema).nonempty().optional().describe(
689
+ "Permissions granted to the new member. Defaults to all three (initiate, vote, execute)."
690
+ )
691
+ }),
692
+ z.object({
693
+ type: z.literal("removeMember"),
694
+ oldMember: PublicKeySchema.describe("Pubkey of the member to remove")
695
+ }),
696
+ z.object({
697
+ type: z.literal("changeThreshold"),
698
+ newThreshold: z.number().int().min(1).describe("New approval threshold for the multisig")
699
+ })
700
+ ]);
701
+ var SquadsProposeConfigChangeInputSchema = z.object({
702
+ member: PublicKeySchema.describe(
703
+ "Wallet address of the multisig member creating the proposal (signer and fee payer)"
704
+ ),
705
+ multisig: PublicKeySchema.describe("Multisig account PDA"),
706
+ actions: z.array(SquadsConfigActionSchema).nonempty().describe("One or more config changes to apply when the proposal executes"),
707
+ memo: z.string().optional().describe("Optional memo recorded on the proposal")
708
+ });
709
+
710
+ // src/contracts/squads.ts
711
+ var squadsContract = oc.tag("Squads").router({
712
+ approveProposal: oc.route({
713
+ method: "POST",
714
+ path: "/squads/proposals/approve",
715
+ summary: "Approve a Squads v4 proposal"
716
+ }).input(SquadsProposalVoteInputSchema).output(TransactionDataSchema).errors({ BAD_REQUEST, NOT_FOUND, INSUFFICIENT_FUNDS }),
717
+ rejectProposal: oc.route({
718
+ method: "POST",
719
+ path: "/squads/proposals/reject",
720
+ summary: "Reject a Squads v4 proposal"
721
+ }).input(SquadsProposalVoteInputSchema).output(TransactionDataSchema).errors({ BAD_REQUEST, NOT_FOUND, INSUFFICIENT_FUNDS }),
722
+ cancelProposal: oc.route({
723
+ method: "POST",
724
+ path: "/squads/proposals/cancel",
725
+ summary: "Cancel an approved Squads v4 proposal"
726
+ }).input(SquadsProposalVoteInputSchema).output(TransactionDataSchema).errors({ BAD_REQUEST, NOT_FOUND, INSUFFICIENT_FUNDS }),
727
+ executeProposal: oc.route({
728
+ method: "POST",
729
+ path: "/squads/proposals/execute",
730
+ summary: "Execute an approved Squads v4 proposal (vault or config)"
731
+ }).input(SquadsExecuteProposalInputSchema).output(TransactionDataSchema).errors({ BAD_REQUEST, NOT_FOUND, INSUFFICIENT_FUNDS }),
732
+ proposeConfigChange: oc.route({
733
+ method: "POST",
734
+ path: "/squads/proposals/config",
735
+ summary: "Propose a Squads v4 config change (add/remove member, change threshold)"
736
+ }).input(SquadsProposeConfigChangeInputSchema).output(TransactionDataSchema).errors({ BAD_REQUEST, NOT_FOUND, INSUFFICIENT_FUNDS })
737
+ });
477
738
  var apiContract = oc.router({
478
739
  governance: governanceContract,
479
740
  health: healthContract,
@@ -484,7 +745,8 @@ var apiContract = oc.router({
484
745
  transactions: transactionsContract,
485
746
  welcomePacks: welcomePacksContract,
486
747
  migration: migrationContract,
487
- dataCredits: dataCreditsContract
748
+ dataCredits: dataCreditsContract,
749
+ squads: squadsContract
488
750
  });
489
751
  var fullApiContract = oc.router({
490
752
  ...apiContract,
@@ -493,4 +755,4 @@ var fullApiContract = oc.router({
493
755
  migration: migrationContract
494
756
  });
495
757
 
496
- export { apiContract, dataCreditsContract, fiatContract, fullApiContract, governanceContract, healthContract, hotspotsContract, migrationContract, rewardContract, swapContract, tokensContract, transactionsContract, webhooksContract, welcomePacksContract };
758
+ export { apiContract, dataCreditsContract, fiatContract, fullApiContract, governanceContract, healthContract, hotspotsContract, migrationContract, rewardContract, squadsContract, swapContract, tokensContract, transactionsContract, webhooksContract, welcomePacksContract };
@@ -1,4 +1,4 @@
1
- import { TransactionDataSchema } from './chunk-5G5SYHQP.js';
1
+ import { TransactionDataSchema } from './chunk-O5LI7ILX.js';
2
2
  import { z } from 'zod';
3
3
 
4
4
  var GetTokensInputSchema = z.object({
@@ -1,4 +1,4 @@
1
- import { TransactionItemSchema, TransactionMetadataSchema, TokenAmountOutputSchema } from './chunk-5G5SYHQP.js';
1
+ import { TransactionItemSchema, TransactionMetadataSchema, TokenAmountOutputSchema } from './chunk-O5LI7ILX.js';
2
2
  import { z } from 'zod';
3
3
 
4
4
  var SubmitInputSchema = z.object({
@@ -1,5 +1,5 @@
1
- import { QuoteResponseSchema } from './chunk-S46U7PBT.js';
2
- import { createTransactionResponse } from './chunk-5G5SYHQP.js';
1
+ import { QuoteResponseSchema } from './chunk-DB664YCA.js';
2
+ import { createTransactionResponse } from './chunk-O5LI7ILX.js';
3
3
  import { z } from 'zod';
4
4
 
5
5
  var InitKycInputSchema = z.object({
@@ -1,5 +1,5 @@
1
- import { HotspotSchema } from './chunk-4UAUX7EJ.js';
2
- import { WalletAddressSchema, ScheduleInputSchema, TokenAmountInputSchema, RewardSplitInputSchema, createTransactionResponse } from './chunk-5G5SYHQP.js';
1
+ import { HotspotSchema } from './chunk-VCQCOERJ.js';
2
+ import { WalletAddressSchema, ScheduleInputSchema, TokenAmountInputSchema, RewardSplitInputSchema, createTransactionResponse } from './chunk-O5LI7ILX.js';
3
3
  import { z } from 'zod';
4
4
 
5
5
  var WelcomePackListInputSchema = z.object({
@@ -1,5 +1,5 @@
1
- import { HotspotSchema } from './chunk-4UAUX7EJ.js';
2
- import { WalletAddressSchema, TransactionMetadataSchema, TokenAmountOutputSchema } from './chunk-5G5SYHQP.js';
1
+ import { HotspotSchema } from './chunk-VCQCOERJ.js';
2
+ import { WalletAddressSchema, TransactionMetadataSchema, TokenAmountOutputSchema } from './chunk-O5LI7ILX.js';
3
3
  import { z } from 'zod';
4
4
 
5
5
  var MigrateInputSchema = z.object({
@@ -31,6 +31,12 @@ var ErrorResponseSchema = z.object({
31
31
  var WalletAddressSchema = z.string().regex(/^[1-9A-HJ-NP-Za-km-z]{32,44}$/, "Invalid Solana wallet address");
32
32
  var PublicKeySchema = z.string().regex(/^[1-9A-HJ-NP-Za-km-z]{32,44}$/, "Invalid Solana public key");
33
33
  var HeliumPublicKeySchema = z.string().min(32).max(400);
34
+ var squadsProposeFields = {
35
+ multisig: PublicKeySchema.optional().describe(
36
+ "If set, build the action as a Squads v4 proposal from this multisig's vault instead of a direct transaction. The action's signer is the proposing member and outer fee payer."
37
+ ),
38
+ memo: z.string().optional().describe("Optional memo recorded on the Squads proposal (multisig mode)")
39
+ };
34
40
  var PaginationInputSchema = z.object({
35
41
  page: z.coerce.number().int().min(1).default(1),
36
42
  limit: z.coerce.number().int().min(1).max(100).default(10)
@@ -118,4 +124,4 @@ function createTypedPaginatedTransactionResponse(metadataSchema) {
118
124
  });
119
125
  }
120
126
 
121
- export { ErrorResponseSchema, HeliumPublicKeySchema, PaginationInputSchema, PaginationOutputSchema, PublicKeySchema, RewardSplitInputSchema, ScheduleInputSchema, TokenAmountInputSchema, TokenAmountOutputSchema, TransactionBatchRequestSchema, TransactionBatchResponseSchema, TransactionDataSchema, TransactionItemSchema, TransactionMetadataSchema, WalletAddressSchema, createPaginatedTransactionResponse, createTransactionResponse, createTypedPaginatedTransactionResponse, createTypedTransactionResponse, typedTransactionData };
127
+ export { ErrorResponseSchema, HeliumPublicKeySchema, PaginationInputSchema, PaginationOutputSchema, PublicKeySchema, RewardSplitInputSchema, ScheduleInputSchema, TokenAmountInputSchema, TokenAmountOutputSchema, TransactionBatchRequestSchema, TransactionBatchResponseSchema, TransactionDataSchema, TransactionItemSchema, TransactionMetadataSchema, WalletAddressSchema, createPaginatedTransactionResponse, createTransactionResponse, createTypedPaginatedTransactionResponse, createTypedTransactionResponse, squadsProposeFields, typedTransactionData };
@@ -1,17 +1,22 @@
1
- import { PublicKeySchema } from './chunk-5G5SYHQP.js';
1
+ import { PublicKeySchema, squadsProposeFields } from './chunk-O5LI7ILX.js';
2
2
  import { z } from 'zod';
3
3
 
4
4
  var MintDataCreditsInputSchema = z.object({
5
5
  owner: PublicKeySchema.describe(
6
6
  "Wallet address of the user minting data credits (used as fee payer and HNT source)"
7
7
  ),
8
- dcAmount: z.string().regex(/^\d+$/, "Amount must be a whole number").optional().describe("Amount of DC to mint (in smallest unit). Provide either dcAmount or hntAmount."),
8
+ dcAmount: z.string().regex(/^\d+$/, "Amount must be a whole number").optional().describe(
9
+ "Amount of DC to mint (in smallest unit). Provide either dcAmount or hntAmount."
10
+ ),
9
11
  hntAmount: z.string().regex(/^\d+$/, "Amount must be a whole number in bones").optional().describe(
10
12
  "Amount of HNT to burn (in bones, 1 HNT = 100000000 bones). Provide either dcAmount or hntAmount."
11
13
  ),
12
14
  recipient: PublicKeySchema.optional().describe(
13
15
  "Recipient wallet for the minted DC. Defaults to the owner."
14
16
  )
17
+ // No Squads propose mode: minting requires a fresh Pyth price in the same
18
+ // transaction, which a deferred proposal can't satisfy (see the mint
19
+ // procedure). Delegation and burns are proposable.
15
20
  });
16
21
  var DelegateDataCreditsInputSchema = z.object({
17
22
  owner: PublicKeySchema.describe(
@@ -22,7 +27,14 @@ var DelegateDataCreditsInputSchema = z.object({
22
27
  mint: PublicKeySchema.describe(
23
28
  "SubDAO token mint (e.g. MOBILE or IOT mint) to determine which subDAO to delegate to"
24
29
  ),
25
- memo: z.string().optional().describe("Optional memo to include in the transaction")
30
+ ...squadsProposeFields
31
+ });
32
+ var BurnDataCreditsInputSchema = z.object({
33
+ owner: PublicKeySchema.describe(
34
+ "Wallet address burning the data credits (signer and fee payer)"
35
+ ),
36
+ amount: z.string().regex(/^\d+$/, "Amount must be a whole number").describe("Amount of DC to burn (smallest unit, DC has 0 decimals)"),
37
+ ...squadsProposeFields
26
38
  });
27
39
 
28
- export { DelegateDataCreditsInputSchema, MintDataCreditsInputSchema };
40
+ export { BurnDataCreditsInputSchema, DelegateDataCreditsInputSchema, MintDataCreditsInputSchema };