@helium/blockchain-api 0.2.2 → 0.2.4

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 (3) hide show
  1. package/dist/index.d.ts +428 -64
  2. package/dist/index.js +144 -42
  3. package/package.json +2 -2
package/dist/index.d.ts CHANGED
@@ -277,8 +277,8 @@ declare const apiContract: {
277
277
  rewardsSplit: zod.ZodArray<zod.ZodObject<{
278
278
  address: zod.ZodString;
279
279
  type: zod.ZodEnum<{
280
- fixed: "fixed";
281
280
  percentage: "percentage";
281
+ fixed: "fixed";
282
282
  }>;
283
283
  amount: zod.ZodNumber;
284
284
  }, zod_v4_core.$strip>>;
@@ -345,6 +345,131 @@ declare const apiContract: {
345
345
  readonly message: "The requested resource was not found.";
346
346
  };
347
347
  }>>>, Record<never, never>>;
348
+ closeAutomation: _orpc_contract.ContractProcedure<zod.ZodObject<{
349
+ walletAddress: zod.ZodString;
350
+ }, zod_v4_core.$strip>, zod.ZodObject<{
351
+ transactionData: zod.ZodObject<{
352
+ transactions: zod.ZodArray<zod.ZodObject<{
353
+ serializedTransaction: zod.ZodString;
354
+ metadata: zod.ZodOptional<zod.ZodObject<{
355
+ type: zod.ZodString;
356
+ description: zod.ZodString;
357
+ }, zod_v4_core.$catchall<zod.ZodUnknown>>>;
358
+ }, zod_v4_core.$strip>>;
359
+ parallel: zod.ZodBoolean;
360
+ tag: zod.ZodOptional<zod.ZodString>;
361
+ }, zod_v4_core.$strip>;
362
+ }, zod_v4_core.$strip>, _orpc_contract.MergedErrorMap<Record<never, never>, _orpc_contract.MergedErrorMap<Record<never, never>, _orpc_contract.MergedErrorMap<Record<never, never>, {
363
+ NOT_FOUND: {
364
+ readonly status: 404;
365
+ readonly message: "The requested resource was not found.";
366
+ };
367
+ }>>>, Record<never, never>>;
368
+ getAutomationStatus: _orpc_contract.ContractProcedure<zod.ZodObject<{
369
+ walletAddress: zod.ZodString;
370
+ }, zod_v4_core.$strip>, zod.ZodObject<{
371
+ hasExistingAutomation: zod.ZodBoolean;
372
+ isOutOfSol: zod.ZodBoolean;
373
+ currentSchedule: zod.ZodOptional<zod.ZodObject<{
374
+ schedule: zod.ZodEnum<{
375
+ daily: "daily";
376
+ weekly: "weekly";
377
+ monthly: "monthly";
378
+ }>;
379
+ time: zod.ZodString;
380
+ nextRun: zod.ZodString;
381
+ }, zod_v4_core.$strip>>;
382
+ rentFee: zod.ZodNumber;
383
+ recipientFee: zod.ZodNumber;
384
+ operationalSol: zod.ZodNumber;
385
+ remainingClaims: zod.ZodOptional<zod.ZodNumber>;
386
+ fundingPeriodInfo: zod.ZodOptional<zod.ZodObject<{
387
+ periodLength: zod.ZodEnum<{
388
+ daily: "daily";
389
+ weekly: "weekly";
390
+ monthly: "monthly";
391
+ }>;
392
+ periodsRemaining: zod.ZodNumber;
393
+ cronJobPeriodsRemaining: zod.ZodNumber;
394
+ pdaWalletPeriodsRemaining: zod.ZodNumber;
395
+ }, zod_v4_core.$strip>>;
396
+ cronJobBalance: zod.ZodString;
397
+ pdaWalletBalance: zod.ZodString;
398
+ }, zod_v4_core.$strip>, _orpc_contract.MergedErrorMap<Record<never, never>, _orpc_contract.MergedErrorMap<Record<never, never>, _orpc_contract.MergedErrorMap<Record<never, never>, {
399
+ NOT_FOUND: {
400
+ readonly status: 404;
401
+ readonly message: "The requested resource was not found.";
402
+ };
403
+ }>>>, Record<never, never>>;
404
+ createAutomation: _orpc_contract.ContractProcedure<zod.ZodObject<{
405
+ walletAddress: zod.ZodString;
406
+ schedule: zod.ZodEnum<{
407
+ daily: "daily";
408
+ weekly: "weekly";
409
+ monthly: "monthly";
410
+ }>;
411
+ duration: zod.ZodNumber;
412
+ totalHotspots: zod.ZodNumber;
413
+ }, zod_v4_core.$strip>, zod.ZodObject<{
414
+ transactionData: zod.ZodObject<{
415
+ transactions: zod.ZodArray<zod.ZodObject<{
416
+ serializedTransaction: zod.ZodString;
417
+ metadata: zod.ZodOptional<zod.ZodObject<{
418
+ type: zod.ZodString;
419
+ description: zod.ZodString;
420
+ }, zod_v4_core.$catchall<zod.ZodUnknown>>>;
421
+ }, zod_v4_core.$strip>>;
422
+ parallel: zod.ZodBoolean;
423
+ tag: zod.ZodOptional<zod.ZodString>;
424
+ }, zod_v4_core.$strip>;
425
+ }, zod_v4_core.$strip>, _orpc_contract.MergedErrorMap<Record<never, never>, _orpc_contract.MergedErrorMap<Record<never, never>, _orpc_contract.MergedErrorMap<Record<never, never>, {
426
+ NOT_FOUND: {
427
+ readonly status: 404;
428
+ readonly message: "The requested resource was not found.";
429
+ };
430
+ }>>>, Record<never, never>>;
431
+ fundAutomation: _orpc_contract.ContractProcedure<zod.ZodObject<{
432
+ walletAddress: zod.ZodString;
433
+ additionalDuration: zod.ZodNumber;
434
+ }, zod_v4_core.$strip>, zod.ZodObject<{
435
+ transactionData: zod.ZodObject<{
436
+ transactions: zod.ZodArray<zod.ZodObject<{
437
+ serializedTransaction: zod.ZodString;
438
+ metadata: zod.ZodOptional<zod.ZodObject<{
439
+ type: zod.ZodString;
440
+ description: zod.ZodString;
441
+ }, zod_v4_core.$catchall<zod.ZodUnknown>>>;
442
+ }, zod_v4_core.$strip>>;
443
+ parallel: zod.ZodBoolean;
444
+ tag: zod.ZodOptional<zod.ZodString>;
445
+ }, zod_v4_core.$strip>;
446
+ }, zod_v4_core.$strip>, _orpc_contract.MergedErrorMap<Record<never, never>, _orpc_contract.MergedErrorMap<Record<never, never>, _orpc_contract.MergedErrorMap<Record<never, never>, {
447
+ NOT_FOUND: {
448
+ readonly status: 404;
449
+ readonly message: "The requested resource was not found.";
450
+ };
451
+ INSUFFICIENT_FUNDS: {
452
+ readonly status: 400;
453
+ readonly message: "Insufficient SOL balance to complete this transaction.";
454
+ readonly data: zod.ZodObject<{
455
+ required: zod.ZodNumber;
456
+ available: zod.ZodNumber;
457
+ }, zod_v4_core.$strip>;
458
+ };
459
+ }>>>, Record<never, never>>;
460
+ getFundingEstimate: _orpc_contract.ContractProcedure<zod.ZodObject<{
461
+ walletAddress: zod.ZodString;
462
+ duration: zod.ZodCoercedNumber<unknown>;
463
+ }, zod_v4_core.$strip>, zod.ZodObject<{
464
+ rentFee: zod.ZodNumber;
465
+ cronJobFunding: zod.ZodNumber;
466
+ pdaWalletFunding: zod.ZodNumber;
467
+ recipientFee: zod.ZodNumber;
468
+ operationalSol: zod.ZodNumber;
469
+ totalSolNeeded: zod.ZodNumber;
470
+ currentCronJobBalance: zod.ZodString;
471
+ currentPdaWalletBalance: zod.ZodString;
472
+ }, zod_v4_core.$strip>, _orpc_contract.MergedErrorMap<Record<never, never>, _orpc_contract.MergedErrorMap<Record<never, never>, Omit<Record<never, never>, keyof U>>>, Record<never, never>>;
348
473
  };
349
474
  swap: {
350
475
  getTokens: _orpc_contract.ContractProcedure<zod.ZodObject<{
@@ -612,8 +737,8 @@ declare const apiContract: {
612
737
  rewardsSplit: zod.ZodArray<zod.ZodObject<{
613
738
  address: zod.ZodString;
614
739
  type: zod.ZodEnum<{
615
- fixed: "fixed";
616
740
  percentage: "percentage";
741
+ fixed: "fixed";
617
742
  }>;
618
743
  amount: zod.ZodNumber;
619
744
  }, zod_v4_core.$strip>>;
@@ -665,8 +790,8 @@ declare const apiContract: {
665
790
  rewardsSplit: zod.ZodArray<zod.ZodObject<{
666
791
  address: zod.ZodString;
667
792
  type: zod.ZodEnum<{
668
- fixed: "fixed";
669
793
  percentage: "percentage";
794
+ fixed: "fixed";
670
795
  }>;
671
796
  amount: zod.ZodNumber;
672
797
  }, zod_v4_core.$strip>>;
@@ -695,8 +820,8 @@ declare const apiContract: {
695
820
  rewardsSplit: zod.ZodArray<zod.ZodObject<{
696
821
  address: zod.ZodString;
697
822
  type: zod.ZodEnum<{
698
- fixed: "fixed";
699
823
  percentage: "percentage";
824
+ fixed: "fixed";
700
825
  }>;
701
826
  amount: zod.ZodNumber;
702
827
  }, zod_v4_core.$strip>>;
@@ -769,8 +894,8 @@ declare const apiContract: {
769
894
  rewardsSplit: zod.ZodArray<zod.ZodObject<{
770
895
  address: zod.ZodString;
771
896
  type: zod.ZodEnum<{
772
- fixed: "fixed";
773
897
  percentage: "percentage";
898
+ fixed: "fixed";
774
899
  }>;
775
900
  amount: zod.ZodNumber;
776
901
  }, zod_v4_core.$strip>>;
@@ -859,8 +984,8 @@ declare const apiContract: {
859
984
  rewardsSplit: zod.ZodArray<zod.ZodObject<{
860
985
  address: zod.ZodString;
861
986
  type: zod.ZodEnum<{
862
- fixed: "fixed";
863
987
  percentage: "percentage";
988
+ fixed: "fixed";
864
989
  }>;
865
990
  amount: zod.ZodNumber;
866
991
  }, zod_v4_core.$strip>>;
@@ -1528,8 +1653,8 @@ declare const fullApiContract: {
1528
1653
  rewardsSplit: zod.ZodArray<zod.ZodObject<{
1529
1654
  address: zod.ZodString;
1530
1655
  type: zod.ZodEnum<{
1531
- fixed: "fixed";
1532
1656
  percentage: "percentage";
1657
+ fixed: "fixed";
1533
1658
  }>;
1534
1659
  amount: zod.ZodNumber;
1535
1660
  }, zod_v4_core.$strip>>;
@@ -1596,6 +1721,131 @@ declare const fullApiContract: {
1596
1721
  readonly message: "The requested resource was not found.";
1597
1722
  };
1598
1723
  }>>>>, Record<never, never>>;
1724
+ closeAutomation: _orpc_contract.ContractProcedure<zod.ZodObject<{
1725
+ walletAddress: zod.ZodString;
1726
+ }, zod_v4_core.$strip>, zod.ZodObject<{
1727
+ transactionData: zod.ZodObject<{
1728
+ transactions: zod.ZodArray<zod.ZodObject<{
1729
+ serializedTransaction: zod.ZodString;
1730
+ metadata: zod.ZodOptional<zod.ZodObject<{
1731
+ type: zod.ZodString;
1732
+ description: zod.ZodString;
1733
+ }, zod_v4_core.$catchall<zod.ZodUnknown>>>;
1734
+ }, zod_v4_core.$strip>>;
1735
+ parallel: zod.ZodBoolean;
1736
+ tag: zod.ZodOptional<zod.ZodString>;
1737
+ }, zod_v4_core.$strip>;
1738
+ }, zod_v4_core.$strip>, _orpc_contract.MergedErrorMap<Record<never, never>, _orpc_contract.MergedErrorMap<Record<never, never>, _orpc_contract.MergedErrorMap<Record<never, never>, _orpc_contract.MergedErrorMap<Record<never, never>, {
1739
+ NOT_FOUND: {
1740
+ readonly status: 404;
1741
+ readonly message: "The requested resource was not found.";
1742
+ };
1743
+ }>>>>, Record<never, never>>;
1744
+ getAutomationStatus: _orpc_contract.ContractProcedure<zod.ZodObject<{
1745
+ walletAddress: zod.ZodString;
1746
+ }, zod_v4_core.$strip>, zod.ZodObject<{
1747
+ hasExistingAutomation: zod.ZodBoolean;
1748
+ isOutOfSol: zod.ZodBoolean;
1749
+ currentSchedule: zod.ZodOptional<zod.ZodObject<{
1750
+ schedule: zod.ZodEnum<{
1751
+ daily: "daily";
1752
+ weekly: "weekly";
1753
+ monthly: "monthly";
1754
+ }>;
1755
+ time: zod.ZodString;
1756
+ nextRun: zod.ZodString;
1757
+ }, zod_v4_core.$strip>>;
1758
+ rentFee: zod.ZodNumber;
1759
+ recipientFee: zod.ZodNumber;
1760
+ operationalSol: zod.ZodNumber;
1761
+ remainingClaims: zod.ZodOptional<zod.ZodNumber>;
1762
+ fundingPeriodInfo: zod.ZodOptional<zod.ZodObject<{
1763
+ periodLength: zod.ZodEnum<{
1764
+ daily: "daily";
1765
+ weekly: "weekly";
1766
+ monthly: "monthly";
1767
+ }>;
1768
+ periodsRemaining: zod.ZodNumber;
1769
+ cronJobPeriodsRemaining: zod.ZodNumber;
1770
+ pdaWalletPeriodsRemaining: zod.ZodNumber;
1771
+ }, zod_v4_core.$strip>>;
1772
+ cronJobBalance: zod.ZodString;
1773
+ pdaWalletBalance: zod.ZodString;
1774
+ }, zod_v4_core.$strip>, _orpc_contract.MergedErrorMap<Record<never, never>, _orpc_contract.MergedErrorMap<Record<never, never>, _orpc_contract.MergedErrorMap<Record<never, never>, _orpc_contract.MergedErrorMap<Record<never, never>, {
1775
+ NOT_FOUND: {
1776
+ readonly status: 404;
1777
+ readonly message: "The requested resource was not found.";
1778
+ };
1779
+ }>>>>, Record<never, never>>;
1780
+ createAutomation: _orpc_contract.ContractProcedure<zod.ZodObject<{
1781
+ walletAddress: zod.ZodString;
1782
+ schedule: zod.ZodEnum<{
1783
+ daily: "daily";
1784
+ weekly: "weekly";
1785
+ monthly: "monthly";
1786
+ }>;
1787
+ duration: zod.ZodNumber;
1788
+ totalHotspots: zod.ZodNumber;
1789
+ }, zod_v4_core.$strip>, zod.ZodObject<{
1790
+ transactionData: zod.ZodObject<{
1791
+ transactions: zod.ZodArray<zod.ZodObject<{
1792
+ serializedTransaction: zod.ZodString;
1793
+ metadata: zod.ZodOptional<zod.ZodObject<{
1794
+ type: zod.ZodString;
1795
+ description: zod.ZodString;
1796
+ }, zod_v4_core.$catchall<zod.ZodUnknown>>>;
1797
+ }, zod_v4_core.$strip>>;
1798
+ parallel: zod.ZodBoolean;
1799
+ tag: zod.ZodOptional<zod.ZodString>;
1800
+ }, zod_v4_core.$strip>;
1801
+ }, zod_v4_core.$strip>, _orpc_contract.MergedErrorMap<Record<never, never>, _orpc_contract.MergedErrorMap<Record<never, never>, _orpc_contract.MergedErrorMap<Record<never, never>, _orpc_contract.MergedErrorMap<Record<never, never>, {
1802
+ NOT_FOUND: {
1803
+ readonly status: 404;
1804
+ readonly message: "The requested resource was not found.";
1805
+ };
1806
+ }>>>>, Record<never, never>>;
1807
+ fundAutomation: _orpc_contract.ContractProcedure<zod.ZodObject<{
1808
+ walletAddress: zod.ZodString;
1809
+ additionalDuration: zod.ZodNumber;
1810
+ }, zod_v4_core.$strip>, zod.ZodObject<{
1811
+ transactionData: zod.ZodObject<{
1812
+ transactions: zod.ZodArray<zod.ZodObject<{
1813
+ serializedTransaction: zod.ZodString;
1814
+ metadata: zod.ZodOptional<zod.ZodObject<{
1815
+ type: zod.ZodString;
1816
+ description: zod.ZodString;
1817
+ }, zod_v4_core.$catchall<zod.ZodUnknown>>>;
1818
+ }, zod_v4_core.$strip>>;
1819
+ parallel: zod.ZodBoolean;
1820
+ tag: zod.ZodOptional<zod.ZodString>;
1821
+ }, zod_v4_core.$strip>;
1822
+ }, zod_v4_core.$strip>, _orpc_contract.MergedErrorMap<Record<never, never>, _orpc_contract.MergedErrorMap<Record<never, never>, _orpc_contract.MergedErrorMap<Record<never, never>, _orpc_contract.MergedErrorMap<Record<never, never>, {
1823
+ NOT_FOUND: {
1824
+ readonly status: 404;
1825
+ readonly message: "The requested resource was not found.";
1826
+ };
1827
+ INSUFFICIENT_FUNDS: {
1828
+ readonly status: 400;
1829
+ readonly message: "Insufficient SOL balance to complete this transaction.";
1830
+ readonly data: zod.ZodObject<{
1831
+ required: zod.ZodNumber;
1832
+ available: zod.ZodNumber;
1833
+ }, zod_v4_core.$strip>;
1834
+ };
1835
+ }>>>>, Record<never, never>>;
1836
+ getFundingEstimate: _orpc_contract.ContractProcedure<zod.ZodObject<{
1837
+ walletAddress: zod.ZodString;
1838
+ duration: zod.ZodCoercedNumber<unknown>;
1839
+ }, zod_v4_core.$strip>, zod.ZodObject<{
1840
+ rentFee: zod.ZodNumber;
1841
+ cronJobFunding: zod.ZodNumber;
1842
+ pdaWalletFunding: zod.ZodNumber;
1843
+ recipientFee: zod.ZodNumber;
1844
+ operationalSol: zod.ZodNumber;
1845
+ totalSolNeeded: zod.ZodNumber;
1846
+ currentCronJobBalance: zod.ZodString;
1847
+ currentPdaWalletBalance: zod.ZodString;
1848
+ }, zod_v4_core.$strip>, _orpc_contract.MergedErrorMap<Record<never, never>, _orpc_contract.MergedErrorMap<Record<never, never>, _orpc_contract.MergedErrorMap<Record<never, never>, Omit<Record<never, never>, keyof U_1>>>>, Record<never, never>>;
1599
1849
  };
1600
1850
  swap: {
1601
1851
  getTokens: _orpc_contract.ContractProcedure<zod.ZodObject<{
@@ -1863,8 +2113,8 @@ declare const fullApiContract: {
1863
2113
  rewardsSplit: zod.ZodArray<zod.ZodObject<{
1864
2114
  address: zod.ZodString;
1865
2115
  type: zod.ZodEnum<{
1866
- fixed: "fixed";
1867
2116
  percentage: "percentage";
2117
+ fixed: "fixed";
1868
2118
  }>;
1869
2119
  amount: zod.ZodNumber;
1870
2120
  }, zod_v4_core.$strip>>;
@@ -1916,8 +2166,8 @@ declare const fullApiContract: {
1916
2166
  rewardsSplit: zod.ZodArray<zod.ZodObject<{
1917
2167
  address: zod.ZodString;
1918
2168
  type: zod.ZodEnum<{
1919
- fixed: "fixed";
1920
2169
  percentage: "percentage";
2170
+ fixed: "fixed";
1921
2171
  }>;
1922
2172
  amount: zod.ZodNumber;
1923
2173
  }, zod_v4_core.$strip>>;
@@ -1946,8 +2196,8 @@ declare const fullApiContract: {
1946
2196
  rewardsSplit: zod.ZodArray<zod.ZodObject<{
1947
2197
  address: zod.ZodString;
1948
2198
  type: zod.ZodEnum<{
1949
- fixed: "fixed";
1950
2199
  percentage: "percentage";
2200
+ fixed: "fixed";
1951
2201
  }>;
1952
2202
  amount: zod.ZodNumber;
1953
2203
  }, zod_v4_core.$strip>>;
@@ -2020,8 +2270,8 @@ declare const fullApiContract: {
2020
2270
  rewardsSplit: zod.ZodArray<zod.ZodObject<{
2021
2271
  address: zod.ZodString;
2022
2272
  type: zod.ZodEnum<{
2023
- fixed: "fixed";
2024
2273
  percentage: "percentage";
2274
+ fixed: "fixed";
2025
2275
  }>;
2026
2276
  amount: zod.ZodNumber;
2027
2277
  }, zod_v4_core.$strip>>;
@@ -2110,8 +2360,8 @@ declare const fullApiContract: {
2110
2360
  rewardsSplit: zod.ZodArray<zod.ZodObject<{
2111
2361
  address: zod.ZodString;
2112
2362
  type: zod.ZodEnum<{
2113
- fixed: "fixed";
2114
2363
  percentage: "percentage";
2364
+ fixed: "fixed";
2115
2365
  }>;
2116
2366
  amount: zod.ZodNumber;
2117
2367
  }, zod_v4_core.$strip>>;
@@ -2464,51 +2714,6 @@ declare const HotspotTypeSchema: z.ZodEnum<{
2464
2714
  mobile: "mobile";
2465
2715
  all: "all";
2466
2716
  }>;
2467
- declare const DeviceTypeSchema: z.ZodEnum<{
2468
- "iot-gateway": "iot-gateway";
2469
- wifiIndoor: "wifiIndoor";
2470
- wifiOutdoor: "wifiOutdoor";
2471
- wifiDataOnly: "wifiDataOnly";
2472
- cbrs: "cbrs";
2473
- }>;
2474
- declare const OwnershipTypeSchema: z.ZodEnum<{
2475
- all: "all";
2476
- owner: "owner";
2477
- direct: "direct";
2478
- fanout: "fanout";
2479
- }>;
2480
- declare const HotspotSharesSchema: z.ZodObject<{
2481
- fixed: z.ZodOptional<z.ZodString>;
2482
- percentage: z.ZodOptional<z.ZodNumber>;
2483
- }, z.core.$strip>;
2484
- declare const HotspotSchema: z.ZodObject<{
2485
- address: z.ZodString;
2486
- entityKey: z.ZodString;
2487
- name: z.ZodString;
2488
- type: z.ZodEnum<{
2489
- iot: "iot";
2490
- mobile: "mobile";
2491
- all: "all";
2492
- }>;
2493
- deviceType: z.ZodEnum<{
2494
- "iot-gateway": "iot-gateway";
2495
- wifiIndoor: "wifiIndoor";
2496
- wifiOutdoor: "wifiOutdoor";
2497
- wifiDataOnly: "wifiDataOnly";
2498
- cbrs: "cbrs";
2499
- }>;
2500
- city: z.ZodOptional<z.ZodString>;
2501
- state: z.ZodOptional<z.ZodString>;
2502
- country: z.ZodOptional<z.ZodString>;
2503
- asset: z.ZodString;
2504
- isOnline: z.ZodOptional<z.ZodBoolean>;
2505
- owner: z.ZodOptional<z.ZodString>;
2506
- shares: z.ZodOptional<z.ZodObject<{
2507
- fixed: z.ZodOptional<z.ZodString>;
2508
- percentage: z.ZodOptional<z.ZodNumber>;
2509
- }, z.core.$strip>>;
2510
- ownershipType: z.ZodString;
2511
- }, z.core.$strip>;
2512
2717
  declare const GetHotspotsInputSchema: z.ZodObject<{
2513
2718
  walletAddress: z.ZodString;
2514
2719
  type: z.ZodOptional<z.ZodEnum<{
@@ -2543,8 +2748,8 @@ declare const GetSplitInputSchema: z.ZodObject<{
2543
2748
  declare const RewardSplitInputSchema: z.ZodObject<{
2544
2749
  address: z.ZodString;
2545
2750
  type: z.ZodEnum<{
2546
- fixed: "fixed";
2547
2751
  percentage: "percentage";
2752
+ fixed: "fixed";
2548
2753
  }>;
2549
2754
  amount: z.ZodNumber;
2550
2755
  }, z.core.$strip>;
@@ -2565,8 +2770,8 @@ declare const CreateSplitInputSchema: z.ZodObject<{
2565
2770
  rewardsSplit: z.ZodArray<z.ZodObject<{
2566
2771
  address: z.ZodString;
2567
2772
  type: z.ZodEnum<{
2568
- fixed: "fixed";
2569
2773
  percentage: "percentage";
2774
+ fixed: "fixed";
2570
2775
  }>;
2571
2776
  amount: z.ZodNumber;
2572
2777
  }, z.core.$strip>>;
@@ -2587,6 +2792,80 @@ declare const DeleteSplitInputSchema: z.ZodObject<{
2587
2792
  walletAddress: z.ZodString;
2588
2793
  hotspotPubkey: z.ZodString;
2589
2794
  }, z.core.$strip>;
2795
+ declare const GetAutomationStatusInputSchema: z.ZodObject<{
2796
+ walletAddress: z.ZodString;
2797
+ }, z.core.$strip>;
2798
+ declare const AutomationScheduleSchema: z.ZodEnum<{
2799
+ daily: "daily";
2800
+ weekly: "weekly";
2801
+ monthly: "monthly";
2802
+ }>;
2803
+ declare const SetupAutomationInputSchema: z.ZodObject<{
2804
+ walletAddress: z.ZodString;
2805
+ schedule: z.ZodEnum<{
2806
+ daily: "daily";
2807
+ weekly: "weekly";
2808
+ monthly: "monthly";
2809
+ }>;
2810
+ duration: z.ZodNumber;
2811
+ totalHotspots: z.ZodNumber;
2812
+ }, z.core.$strip>;
2813
+ declare const FundAutomationInputSchema: z.ZodObject<{
2814
+ walletAddress: z.ZodString;
2815
+ additionalDuration: z.ZodNumber;
2816
+ }, z.core.$strip>;
2817
+ declare const GetFundingEstimateInputSchema: z.ZodObject<{
2818
+ walletAddress: z.ZodString;
2819
+ duration: z.ZodCoercedNumber<unknown>;
2820
+ }, z.core.$strip>;
2821
+ declare const CloseAutomationInputSchema: z.ZodObject<{
2822
+ walletAddress: z.ZodString;
2823
+ }, z.core.$strip>;
2824
+ declare const DeviceTypeSchema: z.ZodEnum<{
2825
+ "iot-gateway": "iot-gateway";
2826
+ wifiIndoor: "wifiIndoor";
2827
+ wifiOutdoor: "wifiOutdoor";
2828
+ wifiDataOnly: "wifiDataOnly";
2829
+ cbrs: "cbrs";
2830
+ }>;
2831
+ declare const OwnershipTypeSchema: z.ZodEnum<{
2832
+ all: "all";
2833
+ owner: "owner";
2834
+ direct: "direct";
2835
+ fanout: "fanout";
2836
+ }>;
2837
+ declare const HotspotSharesSchema: z.ZodObject<{
2838
+ fixed: z.ZodOptional<z.ZodString>;
2839
+ percentage: z.ZodOptional<z.ZodNumber>;
2840
+ }, z.core.$strip>;
2841
+ declare const HotspotSchema: z.ZodObject<{
2842
+ address: z.ZodString;
2843
+ entityKey: z.ZodString;
2844
+ name: z.ZodString;
2845
+ type: z.ZodEnum<{
2846
+ iot: "iot";
2847
+ mobile: "mobile";
2848
+ all: "all";
2849
+ }>;
2850
+ deviceType: z.ZodEnum<{
2851
+ "iot-gateway": "iot-gateway";
2852
+ wifiIndoor: "wifiIndoor";
2853
+ wifiOutdoor: "wifiOutdoor";
2854
+ wifiDataOnly: "wifiDataOnly";
2855
+ cbrs: "cbrs";
2856
+ }>;
2857
+ city: z.ZodOptional<z.ZodString>;
2858
+ state: z.ZodOptional<z.ZodString>;
2859
+ country: z.ZodOptional<z.ZodString>;
2860
+ asset: z.ZodString;
2861
+ isOnline: z.ZodOptional<z.ZodBoolean>;
2862
+ owner: z.ZodOptional<z.ZodString>;
2863
+ shares: z.ZodOptional<z.ZodObject<{
2864
+ fixed: z.ZodOptional<z.ZodString>;
2865
+ percentage: z.ZodOptional<z.ZodNumber>;
2866
+ }, z.core.$strip>>;
2867
+ ownershipType: z.ZodString;
2868
+ }, z.core.$strip>;
2590
2869
  declare const HotspotsDataSchema: z.ZodObject<{
2591
2870
  hotspots: z.ZodArray<z.ZodObject<{
2592
2871
  address: z.ZodString;
@@ -2705,6 +2984,84 @@ declare const DeleteSplitOutputSchema: z.ZodObject<{
2705
2984
  declare const PendingRewardsOutputSchema: z.ZodObject<{
2706
2985
  pending: z.ZodString;
2707
2986
  }, z.core.$strip>;
2987
+ declare const AutomationStatusOutputSchema: z.ZodObject<{
2988
+ hasExistingAutomation: z.ZodBoolean;
2989
+ isOutOfSol: z.ZodBoolean;
2990
+ currentSchedule: z.ZodOptional<z.ZodObject<{
2991
+ schedule: z.ZodEnum<{
2992
+ daily: "daily";
2993
+ weekly: "weekly";
2994
+ monthly: "monthly";
2995
+ }>;
2996
+ time: z.ZodString;
2997
+ nextRun: z.ZodString;
2998
+ }, z.core.$strip>>;
2999
+ rentFee: z.ZodNumber;
3000
+ recipientFee: z.ZodNumber;
3001
+ operationalSol: z.ZodNumber;
3002
+ remainingClaims: z.ZodOptional<z.ZodNumber>;
3003
+ fundingPeriodInfo: z.ZodOptional<z.ZodObject<{
3004
+ periodLength: z.ZodEnum<{
3005
+ daily: "daily";
3006
+ weekly: "weekly";
3007
+ monthly: "monthly";
3008
+ }>;
3009
+ periodsRemaining: z.ZodNumber;
3010
+ cronJobPeriodsRemaining: z.ZodNumber;
3011
+ pdaWalletPeriodsRemaining: z.ZodNumber;
3012
+ }, z.core.$strip>>;
3013
+ cronJobBalance: z.ZodString;
3014
+ pdaWalletBalance: z.ZodString;
3015
+ }, z.core.$strip>;
3016
+ declare const SetupAutomationOutputSchema: z.ZodObject<{
3017
+ transactionData: z.ZodObject<{
3018
+ transactions: z.ZodArray<z.ZodObject<{
3019
+ serializedTransaction: z.ZodString;
3020
+ metadata: z.ZodOptional<z.ZodObject<{
3021
+ type: z.ZodString;
3022
+ description: z.ZodString;
3023
+ }, z.core.$catchall<z.ZodUnknown>>>;
3024
+ }, z.core.$strip>>;
3025
+ parallel: z.ZodBoolean;
3026
+ tag: z.ZodOptional<z.ZodString>;
3027
+ }, z.core.$strip>;
3028
+ }, z.core.$strip>;
3029
+ declare const FundAutomationOutputSchema: z.ZodObject<{
3030
+ transactionData: z.ZodObject<{
3031
+ transactions: z.ZodArray<z.ZodObject<{
3032
+ serializedTransaction: z.ZodString;
3033
+ metadata: z.ZodOptional<z.ZodObject<{
3034
+ type: z.ZodString;
3035
+ description: z.ZodString;
3036
+ }, z.core.$catchall<z.ZodUnknown>>>;
3037
+ }, z.core.$strip>>;
3038
+ parallel: z.ZodBoolean;
3039
+ tag: z.ZodOptional<z.ZodString>;
3040
+ }, z.core.$strip>;
3041
+ }, z.core.$strip>;
3042
+ declare const CloseAutomationOutputSchema: z.ZodObject<{
3043
+ transactionData: z.ZodObject<{
3044
+ transactions: z.ZodArray<z.ZodObject<{
3045
+ serializedTransaction: z.ZodString;
3046
+ metadata: z.ZodOptional<z.ZodObject<{
3047
+ type: z.ZodString;
3048
+ description: z.ZodString;
3049
+ }, z.core.$catchall<z.ZodUnknown>>>;
3050
+ }, z.core.$strip>>;
3051
+ parallel: z.ZodBoolean;
3052
+ tag: z.ZodOptional<z.ZodString>;
3053
+ }, z.core.$strip>;
3054
+ }, z.core.$strip>;
3055
+ declare const FundingEstimateOutputSchema: z.ZodObject<{
3056
+ rentFee: z.ZodNumber;
3057
+ cronJobFunding: z.ZodNumber;
3058
+ pdaWalletFunding: z.ZodNumber;
3059
+ recipientFee: z.ZodNumber;
3060
+ operationalSol: z.ZodNumber;
3061
+ totalSolNeeded: z.ZodNumber;
3062
+ currentCronJobBalance: z.ZodString;
3063
+ currentPdaWalletBalance: z.ZodString;
3064
+ }, z.core.$strip>;
2708
3065
  declare const ReassertLocationRequestSchema: z.ZodObject<{
2709
3066
  entityPubKey: z.ZodString;
2710
3067
  walletAddress: z.ZodString;
@@ -2744,6 +3101,13 @@ type RewardSplitInput = z.infer<typeof RewardSplitInputSchema>;
2744
3101
  type ScheduleInput = z.infer<typeof ScheduleInputSchema>;
2745
3102
  type SplitShare = z.infer<typeof SplitShareSchema>;
2746
3103
  type SplitResponse = z.infer<typeof SplitResponseSchema>;
3104
+ type GetAutomationStatusInput = z.infer<typeof GetAutomationStatusInputSchema>;
3105
+ type AutomationStatus = z.infer<typeof AutomationStatusOutputSchema>;
3106
+ type SetupAutomationInput = z.infer<typeof SetupAutomationInputSchema>;
3107
+ type FundAutomationInput = z.infer<typeof FundAutomationInputSchema>;
3108
+ type CloseAutomationInput = z.infer<typeof CloseAutomationInputSchema>;
3109
+ type GetFundingEstimateInput = z.infer<typeof GetFundingEstimateInputSchema>;
3110
+ type FundingEstimate = z.infer<typeof FundingEstimateOutputSchema>;
2747
3111
  type PendingRewardsOutput = z.infer<typeof PendingRewardsOutputSchema>;
2748
3112
 
2749
3113
  declare const GetTokensInputSchema: z.ZodObject<{
@@ -2963,8 +3327,8 @@ declare const WelcomePackCreateInputSchema: z.ZodObject<{
2963
3327
  rewardsSplit: z.ZodArray<z.ZodObject<{
2964
3328
  address: z.ZodString;
2965
3329
  type: z.ZodEnum<{
2966
- fixed: "fixed";
2967
3330
  percentage: "percentage";
3331
+ fixed: "fixed";
2968
3332
  }>;
2969
3333
  amount: z.ZodNumber;
2970
3334
  }, z.core.$strip>>;
@@ -3015,8 +3379,8 @@ declare const WelcomePackSchema: z.ZodObject<{
3015
3379
  rewardsSplit: z.ZodArray<z.ZodObject<{
3016
3380
  address: z.ZodString;
3017
3381
  type: z.ZodEnum<{
3018
- fixed: "fixed";
3019
3382
  percentage: "percentage";
3383
+ fixed: "fixed";
3020
3384
  }>;
3021
3385
  amount: z.ZodNumber;
3022
3386
  }, z.core.$strip>>;
@@ -3066,8 +3430,8 @@ declare const WelcomePackListOutputSchema: z.ZodArray<z.ZodObject<{
3066
3430
  rewardsSplit: z.ZodArray<z.ZodObject<{
3067
3431
  address: z.ZodString;
3068
3432
  type: z.ZodEnum<{
3069
- fixed: "fixed";
3070
3433
  percentage: "percentage";
3434
+ fixed: "fixed";
3071
3435
  }>;
3072
3436
  amount: z.ZodNumber;
3073
3437
  }, z.core.$strip>>;
@@ -3118,8 +3482,8 @@ declare const WelcomePackCreateOutputSchema: z.ZodObject<{
3118
3482
  rewardsSplit: z.ZodArray<z.ZodObject<{
3119
3483
  address: z.ZodString;
3120
3484
  type: z.ZodEnum<{
3121
- fixed: "fixed";
3122
3485
  percentage: "percentage";
3486
+ fixed: "fixed";
3123
3487
  }>;
3124
3488
  amount: z.ZodNumber;
3125
3489
  }, z.core.$strip>>;
@@ -3279,4 +3643,4 @@ declare const SIMULATION_FAILED: {
3279
3643
  }, z.core.$strip>;
3280
3644
  };
3281
3645
 
3282
- export { type APIContract, type APIRouter, BAD_REQUEST, type BatchStatusOutput, BatchStatusOutputSchema, CONFLICT, type ClaimRewardsInput, ClaimRewardsInputSchema, ClaimRewardsOutputSchema, type ClientOptions, type CreateHntAccountInput, CreateHntAccountInputSchema, type CreateHntAccountOutput, CreateHntAccountOutputSchema, type CreateSplitInput, CreateSplitInputSchema, CreateSplitOutputSchema, type DeleteSplitInput, DeleteSplitInputSchema, DeleteSplitOutputSchema, type DeviceType, DeviceTypeSchema, type ErrorResponse, ErrorResponseSchema, type FullAPIContract, type GetBalancesInput, GetBalancesInputSchema, type GetByPayerAndTagInput, GetByPayerAndTagInputSchema, type GetByPayerInput, GetByPayerInputSchema, type GetHotspotsInput, GetHotspotsInputSchema, type GetInput, GetInputSchema, type GetInstructionsInput, GetInstructionsInputSchema, type GetPendingRewardsInput, GetPendingRewardsInputSchema, type GetQuoteInput, GetQuoteInputSchema, type GetSplitInput, GetSplitInputSchema, type GetTokensInput, GetTokensInputSchema, type HealthResponse, HealthResponseSchema, HeliumPublicKeySchema, type Hotspot, HotspotSchema, HotspotSharesSchema, type HotspotType, HotspotTypeSchema, type HotspotsData, HotspotsDataSchema, INSUFFICIENT_FUNDS, INVALID_WALLET_ADDRESS, type MockImplementation, NOT_FOUND, type OwnershipType, OwnershipTypeSchema, PaginationInputSchema, PaginationOutputSchema, type PayerBatchSummary, PayerBatchSummarySchema, type PayerBatchesOutput, PayerBatchesOutputSchema, type PendingRewardsOutput, PendingRewardsOutputSchema, PublicKeySchema, type QuoteResponse, QuoteResponseSchema, RATE_LIMITED, ReassertLocationRequestSchema, ReassertLocationResponseSchema, type ResubmitInput, ResubmitInputSchema, type ResubmitOutput, ResubmitOutputSchema, type RewardSplitInput, RewardSplitInputSchema, SIMULATION_FAILED, type ScheduleInput, ScheduleInputSchema, type SplitResponse, SplitResponseSchema, type SplitShare, SplitShareSchema, type SubmitInput, SubmitInputSchema, type SubmitOutput, SubmitOutputSchema, SwapTransactionDataSchema, TRANSACTION_FAILED, type Token, type TokenAccount, TokenAccountSchema, type TokenBalanceData, TokenBalanceDataSchema, type TokenListOutput, TokenListOutputSchema, TokenSchema, type TransactionBatchRequest, TransactionBatchRequestSchema, type TransactionBatchResponse, TransactionBatchResponseSchema, type TransactionData, TransactionDataSchema, type TransactionItem, TransactionItemSchema, type TransactionMetadata, TransactionMetadataSchema, type TransactionStatus, TransactionStatusSchema, type TransferHotspotInput, TransferHotspotInputSchema, TransferHotspotOutputSchema, type TransferInput, TransferInputSchema, type TransferOutput, TransferOutputSchema, UNAUTHENTICATED, UNAUTHORIZED, type UpdateRewardsDestinationInput, UpdateRewardsDestinationInputSchema, UpdateRewardsDestinationOutputSchema, WalletAddressSchema, 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, apiContract, createClient, createMockClient, fullApiContract };
3646
+ export { type APIContract, type APIRouter, AutomationScheduleSchema, type AutomationStatus, AutomationStatusOutputSchema, BAD_REQUEST, type BatchStatusOutput, BatchStatusOutputSchema, CONFLICT, type ClaimRewardsInput, ClaimRewardsInputSchema, ClaimRewardsOutputSchema, type ClientOptions, type CloseAutomationInput, CloseAutomationInputSchema, CloseAutomationOutputSchema, type CreateHntAccountInput, CreateHntAccountInputSchema, type CreateHntAccountOutput, CreateHntAccountOutputSchema, type CreateSplitInput, CreateSplitInputSchema, CreateSplitOutputSchema, type DeleteSplitInput, DeleteSplitInputSchema, DeleteSplitOutputSchema, type DeviceType, DeviceTypeSchema, type ErrorResponse, ErrorResponseSchema, type FullAPIContract, type FundAutomationInput, FundAutomationInputSchema, FundAutomationOutputSchema, type FundingEstimate, FundingEstimateOutputSchema, type GetAutomationStatusInput, GetAutomationStatusInputSchema, type GetBalancesInput, GetBalancesInputSchema, type GetByPayerAndTagInput, GetByPayerAndTagInputSchema, type GetByPayerInput, GetByPayerInputSchema, type GetFundingEstimateInput, GetFundingEstimateInputSchema, type GetHotspotsInput, GetHotspotsInputSchema, type GetInput, GetInputSchema, type GetInstructionsInput, GetInstructionsInputSchema, type GetPendingRewardsInput, GetPendingRewardsInputSchema, type GetQuoteInput, GetQuoteInputSchema, type GetSplitInput, GetSplitInputSchema, type GetTokensInput, GetTokensInputSchema, type HealthResponse, HealthResponseSchema, HeliumPublicKeySchema, type Hotspot, HotspotSchema, HotspotSharesSchema, type HotspotType, HotspotTypeSchema, type HotspotsData, HotspotsDataSchema, INSUFFICIENT_FUNDS, INVALID_WALLET_ADDRESS, type MockImplementation, NOT_FOUND, type OwnershipType, OwnershipTypeSchema, PaginationInputSchema, PaginationOutputSchema, type PayerBatchSummary, PayerBatchSummarySchema, type PayerBatchesOutput, PayerBatchesOutputSchema, type PendingRewardsOutput, PendingRewardsOutputSchema, PublicKeySchema, type QuoteResponse, QuoteResponseSchema, RATE_LIMITED, ReassertLocationRequestSchema, ReassertLocationResponseSchema, type ResubmitInput, ResubmitInputSchema, type ResubmitOutput, ResubmitOutputSchema, type RewardSplitInput, RewardSplitInputSchema, SIMULATION_FAILED, type ScheduleInput, ScheduleInputSchema, type SetupAutomationInput, SetupAutomationInputSchema, SetupAutomationOutputSchema, type SplitResponse, SplitResponseSchema, type SplitShare, SplitShareSchema, type SubmitInput, SubmitInputSchema, type SubmitOutput, SubmitOutputSchema, SwapTransactionDataSchema, TRANSACTION_FAILED, type Token, type TokenAccount, TokenAccountSchema, type TokenBalanceData, TokenBalanceDataSchema, type TokenListOutput, TokenListOutputSchema, TokenSchema, type TransactionBatchRequest, TransactionBatchRequestSchema, type TransactionBatchResponse, TransactionBatchResponseSchema, type TransactionData, TransactionDataSchema, type TransactionItem, TransactionItemSchema, type TransactionMetadata, TransactionMetadataSchema, type TransactionStatus, TransactionStatusSchema, type TransferHotspotInput, TransferHotspotInputSchema, TransferHotspotOutputSchema, type TransferInput, TransferInputSchema, type TransferOutput, TransferOutputSchema, UNAUTHENTICATED, UNAUTHORIZED, type UpdateRewardsDestinationInput, UpdateRewardsDestinationInputSchema, UpdateRewardsDestinationOutputSchema, WalletAddressSchema, 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, apiContract, createClient, createMockClient, fullApiContract };
package/dist/index.js CHANGED
@@ -144,59 +144,32 @@ var CreateHntAccountOutputSchema = z.object({
144
144
  transactionData: TransactionDataSchema
145
145
  });
146
146
  var HotspotTypeSchema = z.enum(["iot", "mobile", "all"]);
147
- var DeviceTypeSchema = z.enum([
148
- "iot-gateway",
149
- "wifiIndoor",
150
- "wifiOutdoor",
151
- "wifiDataOnly",
152
- "cbrs"
153
- ]);
154
- var OwnershipTypeSchema = z.enum(["owner", "direct", "fanout", "all"]);
155
- var HotspotSharesSchema = z.object({
156
- fixed: z.string().optional(),
157
- percentage: z.number().optional()
158
- });
159
- var HotspotSchema = z.object({
160
- address: z.string(),
161
- entityKey: z.string(),
162
- name: z.string(),
163
- type: HotspotTypeSchema,
164
- deviceType: DeviceTypeSchema,
165
- city: z.string().optional(),
166
- state: z.string().optional(),
167
- country: z.string().optional(),
168
- asset: z.string(),
169
- isOnline: z.boolean().optional(),
170
- owner: z.string().optional(),
171
- shares: HotspotSharesSchema.optional(),
172
- ownershipType: z.string()
173
- });
174
147
  var GetHotspotsInputSchema = z.object({
175
- walletAddress: WalletAddressSchema,
148
+ walletAddress: z.string().min(32),
176
149
  type: HotspotTypeSchema.optional(),
177
150
  page: z.coerce.number().int().min(1).default(1),
178
151
  limit: z.coerce.number().int().min(1).max(100).default(10)
179
152
  });
180
153
  var ClaimRewardsInputSchema = z.object({
181
- walletAddress: WalletAddressSchema
154
+ walletAddress: z.string().min(32)
182
155
  });
183
156
  var GetPendingRewardsInputSchema = z.object({
184
- walletAddress: WalletAddressSchema
157
+ walletAddress: z.string().min(32)
185
158
  });
186
159
  var TransferHotspotInputSchema = z.object({
187
- walletAddress: WalletAddressSchema,
188
- hotspotPubkey: HeliumPublicKeySchema,
160
+ walletAddress: z.string().min(32),
161
+ hotspotPubkey: z.string().min(1),
189
162
  recipient: z.string().min(32)
190
163
  });
191
164
  var UpdateRewardsDestinationInputSchema = z.object({
192
- walletAddress: WalletAddressSchema,
193
- hotspotPubkey: HeliumPublicKeySchema,
165
+ walletAddress: z.string().min(32),
166
+ hotspotPubkey: z.string().min(1),
194
167
  destination: z.string().min(32),
195
168
  lazyDistributors: z.array(z.string().min(32)).min(1)
196
169
  });
197
170
  var GetSplitInputSchema = z.object({
198
- walletAddress: WalletAddressSchema,
199
- hotspotPubkey: HeliumPublicKeySchema
171
+ walletAddress: z.string().min(32),
172
+ hotspotPubkey: z.string().min(1)
200
173
  });
201
174
  var RewardSplitInputSchema = z.object({
202
175
  address: z.string().min(32),
@@ -211,15 +184,66 @@ var ScheduleInputSchema = z.object({
211
184
  dayOfMonth: z.string().optional()
212
185
  });
213
186
  var CreateSplitInputSchema = z.object({
214
- walletAddress: WalletAddressSchema,
215
- hotspotPubkey: HeliumPublicKeySchema,
187
+ walletAddress: z.string().min(32),
188
+ hotspotPubkey: z.string().min(1),
216
189
  rewardsSplit: z.array(RewardSplitInputSchema),
217
190
  schedule: ScheduleInputSchema,
218
191
  lazyDistributor: z.string().min(32)
219
192
  });
220
193
  var DeleteSplitInputSchema = z.object({
221
- walletAddress: WalletAddressSchema,
222
- hotspotPubkey: HeliumPublicKeySchema
194
+ walletAddress: z.string().min(32),
195
+ hotspotPubkey: z.string().min(1)
196
+ });
197
+ var GetAutomationStatusInputSchema = z.object({
198
+ walletAddress: z.string().min(32)
199
+ });
200
+ var AutomationScheduleSchema = z.enum(["daily", "weekly", "monthly"]);
201
+ var SetupAutomationInputSchema = z.object({
202
+ walletAddress: z.string().min(32),
203
+ schedule: AutomationScheduleSchema,
204
+ duration: z.number().int().min(1),
205
+ // Number of claims
206
+ totalHotspots: z.number().int().min(1)
207
+ });
208
+ var FundAutomationInputSchema = z.object({
209
+ walletAddress: z.string().min(32),
210
+ additionalDuration: z.number().int().min(1)
211
+ // Additional number of claims
212
+ });
213
+ var GetFundingEstimateInputSchema = z.object({
214
+ walletAddress: z.string().min(32),
215
+ duration: z.coerce.number().int().min(1)
216
+ // Number of claims to estimate funding for
217
+ });
218
+ var CloseAutomationInputSchema = z.object({
219
+ walletAddress: z.string().min(32)
220
+ });
221
+ var DeviceTypeSchema = z.enum([
222
+ "iot-gateway",
223
+ "wifiIndoor",
224
+ "wifiOutdoor",
225
+ "wifiDataOnly",
226
+ "cbrs"
227
+ ]);
228
+ var OwnershipTypeSchema = z.enum(["owner", "direct", "fanout", "all"]);
229
+ var HotspotSharesSchema = z.object({
230
+ fixed: z.string().optional(),
231
+ percentage: z.number().optional()
232
+ });
233
+ var HotspotSchema = z.object({
234
+ address: z.string(),
235
+ entityKey: z.string(),
236
+ name: z.string(),
237
+ type: HotspotTypeSchema,
238
+ deviceType: DeviceTypeSchema,
239
+ city: z.string().optional(),
240
+ state: z.string().optional(),
241
+ country: z.string().optional(),
242
+ asset: z.string(),
243
+ isOnline: z.boolean().optional(),
244
+ owner: z.string().optional(),
245
+ shares: HotspotSharesSchema.optional(),
246
+ ownershipType: z.string()
223
247
  });
224
248
  var HotspotsDataSchema = z.object({
225
249
  hotspots: z.array(HotspotSchema),
@@ -257,6 +281,61 @@ var DeleteSplitOutputSchema = z.object({
257
281
  var PendingRewardsOutputSchema = z.object({
258
282
  pending: z.string()
259
283
  });
284
+ var AutomationStatusOutputSchema = z.object({
285
+ hasExistingAutomation: z.boolean(),
286
+ isOutOfSol: z.boolean(),
287
+ currentSchedule: z.object({
288
+ schedule: AutomationScheduleSchema,
289
+ time: z.string(),
290
+ nextRun: z.string()
291
+ // ISO date string
292
+ }).optional(),
293
+ rentFee: z.number(),
294
+ // Initial setup rent (BASE_AUTOMATION_RENT + TASK_RETURN_ACCOUNT_SIZE) if automation doesn't exist, 0 otherwise
295
+ recipientFee: z.number(),
296
+ // SOL needed for recipient accounts (if any)
297
+ operationalSol: z.number(),
298
+ // Total operational SOL needed for automation claims (cronJobFunding + pdaWalletFunding)
299
+ remainingClaims: z.number().optional(),
300
+ fundingPeriodInfo: z.object({
301
+ periodLength: AutomationScheduleSchema,
302
+ periodsRemaining: z.number(),
303
+ // Minimum of both pools
304
+ cronJobPeriodsRemaining: z.number(),
305
+ pdaWalletPeriodsRemaining: z.number()
306
+ }).optional(),
307
+ cronJobBalance: z.string(),
308
+ // lamports as string
309
+ pdaWalletBalance: z.string()
310
+ // lamports as string
311
+ });
312
+ var SetupAutomationOutputSchema = z.object({
313
+ transactionData: TransactionDataSchema
314
+ });
315
+ var FundAutomationOutputSchema = z.object({
316
+ transactionData: TransactionDataSchema
317
+ });
318
+ var CloseAutomationOutputSchema = z.object({
319
+ transactionData: TransactionDataSchema
320
+ });
321
+ var FundingEstimateOutputSchema = z.object({
322
+ rentFee: z.number(),
323
+ // Initial setup rent (BASE_AUTOMATION_RENT + TASK_RETURN_ACCOUNT_SIZE) if automation doesn't exist, 0 otherwise
324
+ cronJobFunding: z.number(),
325
+ // SOL needed for cron job account operations
326
+ pdaWalletFunding: z.number(),
327
+ // SOL needed for PDA wallet operations
328
+ recipientFee: z.number(),
329
+ // SOL needed for recipient accounts (if any)
330
+ operationalSol: z.number(),
331
+ // Total operational SOL needed for automation claims (cronJobFunding + pdaWalletFunding)
332
+ totalSolNeeded: z.number(),
333
+ // Total SOL needed including all fees (rentFee + operationalSol + recipientFee)
334
+ currentCronJobBalance: z.string(),
335
+ // Current balance in cronJob (lamports as string)
336
+ currentPdaWalletBalance: z.string()
337
+ // Current balance in pdaWallet (lamports as string)
338
+ });
260
339
  var ReassertLocationRequestSchema = z.object({
261
340
  entityPubKey: HeliumPublicKeySchema,
262
341
  walletAddress: WalletAddressSchema,
@@ -581,7 +660,30 @@ var hotspotsContract = oc.tag("Hotspot").prefix("/hotspots").router({
581
660
  /** Protected: Delete a split configuration */
582
661
  deleteSplit: oc.route({ method: "DELETE", path: "/split", summary: "Delete a reward split" }).input(DeleteSplitInputSchema).output(DeleteSplitOutputSchema).errors({
583
662
  NOT_FOUND
584
- })
663
+ }),
664
+ /** Protected: Close automation */
665
+ closeAutomation: oc.route({ method: "POST", path: "/hotspots/wallet/{walletAddress}/automation/close", summary: "Close automation" }).input(CloseAutomationInputSchema).output(CloseAutomationOutputSchema).errors({
666
+ NOT_FOUND
667
+ }),
668
+ /** Protected: Get automation status */
669
+ getAutomationStatus: oc.route({ method: "GET", path: "/hotspots/wallet/{walletAddress}/automation/status", summary: "Get automation status" }).input(GetAutomationStatusInputSchema).output(AutomationStatusOutputSchema).errors({
670
+ NOT_FOUND
671
+ }),
672
+ /** Protected: Create automation */
673
+ createAutomation: oc.route({
674
+ method: "POST",
675
+ path: "/hotspots/wallet/{walletAddress}/automation",
676
+ summary: "Setup automation"
677
+ }).input(SetupAutomationInputSchema).output(SetupAutomationOutputSchema).errors({
678
+ NOT_FOUND
679
+ }),
680
+ /** Protected: Fund automation */
681
+ fundAutomation: oc.route({ method: "POST", path: "/hotspots/wallet/{walletAddress}/automation/fund", summary: "Fund automation" }).input(FundAutomationInputSchema).output(FundAutomationOutputSchema).errors({
682
+ NOT_FOUND,
683
+ INSUFFICIENT_FUNDS
684
+ }),
685
+ /** Protected: Get funding estimate */
686
+ getFundingEstimate: oc.route({ method: "GET", path: "/hotspots/wallet/{walletAddress}/automation/funding-estimate", summary: "Get funding estimate" }).input(GetFundingEstimateInputSchema).output(FundingEstimateOutputSchema).errors({})
585
687
  });
586
688
  var swapContract = oc.tag("Swap").router({
587
689
  getTokens: oc.route({ method: "GET", path: "/swap/tokens" }).input(GetTokensInputSchema).output(TokenListOutputSchema).errors({
@@ -811,4 +913,4 @@ var fullApiContract = oc.router({
811
913
  webhooks: webhooksContract
812
914
  });
813
915
 
814
- export { BAD_REQUEST, BatchStatusOutputSchema, CONFLICT, ClaimRewardsInputSchema, ClaimRewardsOutputSchema, CreateHntAccountInputSchema, CreateHntAccountOutputSchema, CreateSplitInputSchema, CreateSplitOutputSchema, DeleteSplitInputSchema, DeleteSplitOutputSchema, DeviceTypeSchema, ErrorResponseSchema, GetBalancesInputSchema, GetByPayerAndTagInputSchema, GetByPayerInputSchema, GetHotspotsInputSchema, GetInputSchema, GetInstructionsInputSchema, GetPendingRewardsInputSchema, GetQuoteInputSchema, GetSplitInputSchema, GetTokensInputSchema, HealthResponseSchema, HeliumPublicKeySchema, HotspotSchema, HotspotSharesSchema, HotspotTypeSchema, HotspotsDataSchema, INSUFFICIENT_FUNDS, INVALID_WALLET_ADDRESS, NOT_FOUND, OwnershipTypeSchema, PaginationInputSchema, PaginationOutputSchema, PayerBatchSummarySchema, PayerBatchesOutputSchema, PendingRewardsOutputSchema, PublicKeySchema, QuoteResponseSchema, RATE_LIMITED, ReassertLocationRequestSchema, ReassertLocationResponseSchema, ResubmitInputSchema, ResubmitOutputSchema, RewardSplitInputSchema, SIMULATION_FAILED, ScheduleInputSchema, SplitResponseSchema, SplitShareSchema, SubmitInputSchema, SubmitOutputSchema, SwapTransactionDataSchema, TRANSACTION_FAILED, TokenAccountSchema, TokenBalanceDataSchema, TokenListOutputSchema, TokenSchema, TransactionBatchRequestSchema, TransactionBatchResponseSchema, TransactionDataSchema, TransactionItemSchema, TransactionMetadataSchema, TransactionStatusSchema, TransferHotspotInputSchema, TransferHotspotOutputSchema, TransferInputSchema, TransferOutputSchema, UNAUTHENTICATED, UNAUTHORIZED, UpdateRewardsDestinationInputSchema, UpdateRewardsDestinationOutputSchema, WalletAddressSchema, WelcomePackClaimInputSchema, WelcomePackClaimOutputSchema, WelcomePackCreateInputSchema, WelcomePackCreateOutputSchema, WelcomePackDeleteInputSchema, WelcomePackDeleteOutputSchema, WelcomePackGetByAddressInputSchema, WelcomePackGetInputSchema, WelcomePackInviteInputSchema, WelcomePackInviteOutputSchema, WelcomePackListInputSchema, WelcomePackListOutputSchema, WelcomePackSchema, apiContract, createClient, createMockClient, fullApiContract };
916
+ export { AutomationScheduleSchema, AutomationStatusOutputSchema, BAD_REQUEST, BatchStatusOutputSchema, CONFLICT, ClaimRewardsInputSchema, ClaimRewardsOutputSchema, CloseAutomationInputSchema, CloseAutomationOutputSchema, CreateHntAccountInputSchema, CreateHntAccountOutputSchema, CreateSplitInputSchema, CreateSplitOutputSchema, DeleteSplitInputSchema, DeleteSplitOutputSchema, DeviceTypeSchema, ErrorResponseSchema, FundAutomationInputSchema, FundAutomationOutputSchema, FundingEstimateOutputSchema, GetAutomationStatusInputSchema, GetBalancesInputSchema, GetByPayerAndTagInputSchema, GetByPayerInputSchema, GetFundingEstimateInputSchema, GetHotspotsInputSchema, GetInputSchema, GetInstructionsInputSchema, GetPendingRewardsInputSchema, GetQuoteInputSchema, GetSplitInputSchema, GetTokensInputSchema, HealthResponseSchema, HeliumPublicKeySchema, HotspotSchema, HotspotSharesSchema, HotspotTypeSchema, HotspotsDataSchema, INSUFFICIENT_FUNDS, INVALID_WALLET_ADDRESS, NOT_FOUND, OwnershipTypeSchema, PaginationInputSchema, PaginationOutputSchema, PayerBatchSummarySchema, PayerBatchesOutputSchema, PendingRewardsOutputSchema, PublicKeySchema, QuoteResponseSchema, RATE_LIMITED, ReassertLocationRequestSchema, ReassertLocationResponseSchema, ResubmitInputSchema, ResubmitOutputSchema, RewardSplitInputSchema, SIMULATION_FAILED, ScheduleInputSchema, SetupAutomationInputSchema, SetupAutomationOutputSchema, SplitResponseSchema, SplitShareSchema, SubmitInputSchema, SubmitOutputSchema, SwapTransactionDataSchema, TRANSACTION_FAILED, TokenAccountSchema, TokenBalanceDataSchema, TokenListOutputSchema, TokenSchema, TransactionBatchRequestSchema, TransactionBatchResponseSchema, TransactionDataSchema, TransactionItemSchema, TransactionMetadataSchema, TransactionStatusSchema, TransferHotspotInputSchema, TransferHotspotOutputSchema, TransferInputSchema, TransferOutputSchema, UNAUTHENTICATED, UNAUTHORIZED, UpdateRewardsDestinationInputSchema, UpdateRewardsDestinationOutputSchema, WalletAddressSchema, WelcomePackClaimInputSchema, WelcomePackClaimOutputSchema, WelcomePackCreateInputSchema, WelcomePackCreateOutputSchema, WelcomePackDeleteInputSchema, WelcomePackDeleteOutputSchema, WelcomePackGetByAddressInputSchema, WelcomePackGetInputSchema, WelcomePackInviteInputSchema, WelcomePackInviteOutputSchema, WelcomePackListInputSchema, WelcomePackListOutputSchema, WelcomePackSchema, apiContract, createClient, createMockClient, fullApiContract };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@helium/blockchain-api",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
4
4
  "description": "TypeScript client and schemas for the Helium Blockchain API",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -42,4 +42,4 @@
42
42
  "tsup": "^8.0.0",
43
43
  "typescript": "^5.0.0"
44
44
  }
45
- }
45
+ }