@helium/blockchain-api 0.16.0 → 0.17.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.
@@ -1,16 +1,14 @@
1
- import { INSUFFICIENT_FUNDS, INVALID_WALLET_ADDRESS, BAD_REQUEST, NOT_FOUND, UNAUTHORIZED, CONFLICT, ALL_POSITIONS_SKIPPED, RATE_LIMITED, SIMULATION_FAILED, BLOCKHASH_EXPIRED, UNAUTHENTICATED } from './chunk-XSASLENU.js';
2
- import { BridgeWebhookInputSchema, BridgeWebhookOutputSchema } from './chunk-7CTJX35S.js';
3
- import { MigrateInputSchema, MigrateOutputSchema, MigratableHotspotsInputSchema, MigratableHotspotsOutputSchema } from './chunk-DQFPYY7A.js';
1
+ import { INSUFFICIENT_FUNDS, INVALID_WALLET_ADDRESS, BAD_REQUEST, NOT_FOUND, UNAUTHORIZED, CONFLICT, ALL_POSITIONS_SKIPPED, RATE_LIMITED, SIMULATION_FAILED, BLOCKHASH_EXPIRED } from './chunk-XSASLENU.js';
4
2
  import { ClaimInviteRequestSchema, ClaimInviteResponseSchema, CreateInviteResponseSchema, DeleteRewardContractTransactionResponseSchema, CreateRewardContractTransactionInputSchema, CreateRewardContractTransactionResponseSchema, EstimateCostToCreateRewardContractResponseSchema, FindRewardContractResponseSchema } from './chunk-KZ3X5E6E.js';
3
+ import { GetInstructionsInputSchema, GetQuoteInputSchema, QuoteResponseSchema, GetTokensInputSchema, TokenListOutputSchema } from './chunk-V3MNHRVC.js';
5
4
  import { CreateHntAccountInputSchema, CreateHntAccountOutputSchema, MemoInputSchema, MemoOutputSchema, BurnInputSchema, BurnOutputSchema, MultiTransferInputSchema, MultiTransferOutputSchema, TransferInputSchema, TransferOutputSchema, GetBalancesInputSchema, TokenBalanceDataSchema } from './chunk-7KWTYKKU.js';
6
5
  import { GetHistoryInputSchema, HistoryOutputSchema, EstimateInputSchema, EstimateOutputSchema, GetByPayerAndTagInputSchema, PayerBatchesOutputSchema, GetByPayerInputSchema, ResubmitInputSchema, ResubmitOutputSchema, GetInputSchema, BatchStatusOutputSchema, SubmitInputSchema, SubmitOutputSchema } from './chunk-TGBSASKU.js';
7
6
  import { BurnDataCreditsInputSchema, DelegateDataCreditsInputSchema, MintDataCreditsInputSchema } from './chunk-7GK4VHJM.js';
8
- import { WelcomePackInviteInputSchema, WelcomePackInviteOutputSchema, WelcomePackClaimInputSchema, WelcomePackClaimOutputSchema, WelcomePackGetByAddressInputSchema, WelcomePackSchema, WelcomePackDeleteInputSchema, WelcomePackDeleteOutputSchema, WelcomePackGetInputSchema, WelcomePackCreateInputSchema, WelcomePackCreateOutputSchema, WelcomePackListInputSchema, WelcomePackListOutputSchema } from './chunk-QSXKOVO7.js';
9
- import { UpdateTransferInputSchema, UpdateTransferOutputSchema, SendFundsInputSchema, SendFundsOutputSchema, GetSendQuoteInputSchema, QuoteOutputSchema, DeleteBankAccountInputSchema, DeleteBankAccountOutputSchema, CreateBankAccountInputSchema, BankAccountSchema, BankAccountListOutputSchema, FeesOutputSchema, InitKycInputSchema, KycStatusOutputSchema } from './chunk-HHWYMUFM.js';
10
- import { GetInstructionsInputSchema, GetQuoteInputSchema, QuoteResponseSchema, GetTokensInputSchema, TokenListOutputSchema } from './chunk-V3MNHRVC.js';
7
+ import { WelcomePackInviteInputSchema, WelcomePackInviteOutputSchema, WelcomePackClaimInputSchema, WelcomePackClaimOutputSchema, WelcomePackGetByAddressInputSchema, WelcomePackSchema, WelcomePackDeleteInputSchema, WelcomePackDeleteOutputSchema, WelcomePackGetInputSchema, WelcomePackCreateInputSchema, WelcomePackCreateOutputSchema, WelcomePackListInputSchema, WelcomePackListOutputSchema } from './chunk-ORTJ2MHX.js';
11
8
  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, GetPositionsInputSchema, GetPositionsResponseSchema } from './chunk-PLSGT3ZU.js';
12
9
  import { HealthResponseSchema } from './chunk-4RVSLJOU.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-CYFH4NPE.js';
10
+ import { MigrateInputSchema, MigrateOutputSchema, MigratableHotspotsInputSchema, MigratableHotspotsOutputSchema } from './chunk-O2GVB37L.js';
11
+ 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-U5EY5SM3.js';
14
12
  import { WalletAddressSchema, HeliumPublicKeySchema, TransactionDataSchema, PublicKeySchema } from './chunk-Z4E3I2B4.js';
15
13
  import { oc } from '@orpc/contract';
16
14
  import { z } from 'zod';
@@ -670,66 +668,6 @@ var welcomePacksContract = oc.tag("Welcome Packs").router({
670
668
  NOT_FOUND
671
669
  })
672
670
  });
673
- var fiatContract = oc.errors({
674
- UNAUTHENTICATED,
675
- UNAUTHORIZED
676
- }).tag("Fiat").router({
677
- getKycStatus: oc.route({ method: "GET", path: "/fiat/kyc/status" }).output(KycStatusOutputSchema).errors({
678
- EMAIL_NOT_LINKED: { status: 401, message: "Email not linked." }
679
- }),
680
- initKyc: oc.route({ method: "POST", path: "/fiat/kyc/init" }).input(InitKycInputSchema).output(KycStatusOutputSchema).errors({
681
- EMAIL_NOT_LINKED: { status: 401, message: "Email not linked." },
682
- BRIDGE_ERROR: {
683
- message: "Failed to create Bridge KYC link",
684
- status: 500
685
- }
686
- }),
687
- getFees: oc.route({ method: "GET", path: "/fiat/fees" }).output(FeesOutputSchema).errors({}),
688
- listBankAccounts: oc.route({ method: "GET", path: "/fiat/bank-accounts" }).output(BankAccountListOutputSchema).errors({
689
- NOT_FOUND: { message: "Bridge customer ID not found", status: 404 }
690
- }),
691
- createBankAccount: oc.route({ method: "POST", path: "/fiat/bank-accounts" }).input(CreateBankAccountInputSchema).output(BankAccountSchema).errors({
692
- NO_CUSTOMER: { message: "Bridge customer ID not found", status: 404 },
693
- BRIDGE_ERROR: {
694
- message: "Failed to create Bridge KYC link",
695
- status: 500
696
- }
697
- }),
698
- deleteBankAccount: oc.route({ method: "DELETE", path: "/fiat/bank-accounts/{id}" }).input(DeleteBankAccountInputSchema).output(DeleteBankAccountOutputSchema).errors({
699
- NO_CUSTOMER: { message: "Bridge customer ID not found", status: 404 },
700
- BRIDGE_ERROR: { message: "Failed to delete bank account", status: 500 }
701
- }),
702
- getSendQuote: oc.route({ method: "GET", path: "/fiat/quote/{id}" }).input(GetSendQuoteInputSchema).output(QuoteOutputSchema).errors({
703
- BAD_REQUEST,
704
- JUPITER_ERROR: {
705
- message: "Failed to get quote from Jupiter",
706
- status: 500
707
- },
708
- RATE_LIMITED
709
- }),
710
- sendFunds: oc.route({ method: "POST", path: "/fiat/send" }).input(SendFundsInputSchema).output(SendFundsOutputSchema).errors({
711
- NOT_FOUND,
712
- BRIDGE_ERROR: {
713
- message: "Failed to create Bridge transfer",
714
- status: 500
715
- },
716
- JUPITER_ERROR: {
717
- message: "Failed to get quote from Jupiter",
718
- status: 500
719
- },
720
- INSUFFICIENT_FUNDS,
721
- RATE_LIMITED
722
- }),
723
- updateTransfer: oc.route({ method: "PUT", path: "/fiat/transfer/{id}" }).input(UpdateTransferInputSchema).output(UpdateTransferOutputSchema).errors({
724
- NOT_FOUND: { message: "Transfer not found", status: 404 }
725
- })
726
- });
727
- var webhooksContract = oc.tag("Webhooks").router({
728
- bridge: oc.route({ method: "POST", path: "/webhooks/bridge" }).input(BridgeWebhookInputSchema).output(BridgeWebhookOutputSchema).errors({
729
- NOT_FOUND,
730
- INVALID_PAYLOAD: { message: "Invalid webhook payload", status: 400 }
731
- })
732
- });
733
671
  var migrationContract = oc.tag("Migration").router({
734
672
  getHotspots: oc.route({
735
673
  method: "GET",
@@ -864,10 +802,7 @@ var apiContract = oc.router({
864
802
  squads: squadsContract
865
803
  });
866
804
  var fullApiContract = oc.router({
867
- ...apiContract,
868
- fiat: fiatContract,
869
- webhooks: webhooksContract,
870
- migration: migrationContract
805
+ ...apiContract
871
806
  });
872
807
 
873
- export { apiContract, dataCreditsContract, fiatContract, fullApiContract, governanceContract, healthContract, hotspotsContract, migrationContract, rewardContract, squadsContract, swapContract, tokensContract, transactionsContract, webhooksContract, welcomePacksContract };
808
+ export { apiContract, dataCreditsContract, fullApiContract, governanceContract, healthContract, hotspotsContract, migrationContract, rewardContract, squadsContract, swapContract, tokensContract, transactionsContract, welcomePacksContract };
@@ -1,4 +1,4 @@
1
- import { HotspotSchema } from './chunk-CYFH4NPE.js';
1
+ import { HotspotSchema } from './chunk-U5EY5SM3.js';
2
2
  import { WalletAddressSchema, TokenAmountInputSchema, HeliumPublicKeySchema, TransactionMetadataSchema, TokenAmountOutputSchema } from './chunk-Z4E3I2B4.js';
3
3
  import { z } from 'zod';
4
4
 
@@ -1,4 +1,4 @@
1
- import { HotspotSchema } from './chunk-CYFH4NPE.js';
1
+ import { HotspotSchema } from './chunk-U5EY5SM3.js';
2
2
  import { WalletAddressSchema, ScheduleInputSchema, TokenAmountInputSchema, RewardSplitInputSchema, createTransactionResponse } from './chunk-Z4E3I2B4.js';
3
3
  import { z } from 'zod';
4
4
 
@@ -96,8 +96,11 @@ var FundAutomationInputSchema = z.object({
96
96
  });
97
97
  var GetFundingEstimateInputSchema = z.object({
98
98
  walletAddress: WalletAddressSchema,
99
- duration: z.coerce.number().int().min(1)
99
+ duration: z.coerce.number().int().min(1),
100
100
  // Number of claims to estimate funding for
101
+ // The schedule createAutomation will be given. Prices the cron job at its
102
+ // crontab length; without it the estimate assumes the longest preset.
103
+ schedule: SetupAutomationInputSchema.shape.schedule.optional()
101
104
  });
102
105
  var CloseAutomationInputSchema = z.object({
103
106
  walletAddress: WalletAddressSchema
@@ -238,9 +241,9 @@ var AutomationStatusOutputSchema = z.object({
238
241
  // ISO date string
239
242
  }).optional(),
240
243
  rentFee: z.number(),
241
- // Initial setup rent (cron accounts priced from the cluster Rent sysvar + TASK_RETURN_ACCOUNT_SIZE) if automation doesn't exist, 0 otherwise
244
+ // Initial setup cost in SOL if automation doesn't exist, 0 otherwise: rent (cluster Rent sysvar) for the accounts init_entity_claim_cron_v0 creates, including the task return account, plus the task queue's min crank reward its schedule task takes; the 0.01 SOL cron-job task-return top-up is in operationalSol
242
245
  recipientFee: z.number(),
243
- // SOL needed for recipient accounts (if any)
246
+ // Always 0: pdaWalletFunding (in operationalSol) already carries all recipient rent; kept for schema compatibility
244
247
  operationalSol: z.number(),
245
248
  // Total operational SOL needed for automation claims (cronJobFunding + pdaWalletFunding)
246
249
  remainingClaims: z.number().optional(),
@@ -258,17 +261,17 @@ var AutomationStatusOutputSchema = z.object({
258
261
  });
259
262
  var FundingEstimateOutputSchema = z.object({
260
263
  rentFee: z.number(),
261
- // Initial setup rent (cron accounts priced from the cluster Rent sysvar + TASK_RETURN_ACCOUNT_SIZE) if automation doesn't exist, 0 otherwise
264
+ // Initial setup cost in SOL if automation doesn't exist, 0 otherwise: rent (cluster Rent sysvar) for the accounts init_entity_claim_cron_v0 creates, including the task return account, plus the task queue's min crank reward its schedule task takes; the 0.01 SOL cron-job task-return top-up is in operationalSol
262
265
  cronJobFunding: z.number(),
263
266
  // SOL needed for cron job account operations
264
267
  pdaWalletFunding: z.number(),
265
268
  // SOL needed for PDA wallet operations
266
269
  recipientFee: z.number(),
267
- // SOL needed for recipient accounts (if any)
270
+ // Always 0: pdaWalletFunding (in operationalSol) already carries all recipient rent; kept for schema compatibility
268
271
  operationalSol: z.number(),
269
272
  // Total operational SOL needed for automation claims (cronJobFunding + pdaWalletFunding)
270
273
  totalSolNeeded: z.number(),
271
- // Total SOL needed including all fees (rentFee + operationalSol + recipientFee)
274
+ // Total SOL needed including all fees (rentFee + operationalSol; recipientFee is always 0)
272
275
  currentCronJobBalance: z.string(),
273
276
  // Current balance in cronJob (lamports as string)
274
277
  currentPdaWalletBalance: z.string()