@helium/blockchain-api 0.3.4 → 0.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1662,6 +1662,14 @@ declare const apiContract: {
1662
1662
  status: number;
1663
1663
  message: string;
1664
1664
  };
1665
+ INSUFFICIENT_FUNDS: {
1666
+ readonly status: 400;
1667
+ readonly message: "Insufficient SOL balance to complete this transaction.";
1668
+ readonly data: zod.ZodObject<{
1669
+ required: zod.ZodNumber;
1670
+ available: zod.ZodNumber;
1671
+ }, zod_v4_core.$strip>;
1672
+ };
1665
1673
  }>>>, Record<never, never>>;
1666
1674
  };
1667
1675
  hotspots: {
@@ -1827,6 +1835,18 @@ declare const apiContract: {
1827
1835
  message: string;
1828
1836
  status: number;
1829
1837
  };
1838
+ INSUFFICIENT_FUNDS: {
1839
+ readonly status: 400;
1840
+ readonly message: "Insufficient SOL balance to complete this transaction.";
1841
+ readonly data: zod.ZodObject<{
1842
+ required: zod.ZodNumber;
1843
+ available: zod.ZodNumber;
1844
+ }, zod_v4_core.$strip>;
1845
+ };
1846
+ CONFLICT: {
1847
+ readonly status: 409;
1848
+ readonly message: "A resource with this identifier already exists.";
1849
+ };
1830
1850
  }>>>, Record<never, never>>;
1831
1851
  updateRewardsDestination: _orpc_contract.ContractProcedure<zod.ZodObject<{
1832
1852
  walletAddress: zod.ZodString;
@@ -1854,6 +1874,14 @@ declare const apiContract: {
1854
1874
  readonly status: 404;
1855
1875
  readonly message: "The requested resource was not found.";
1856
1876
  };
1877
+ INSUFFICIENT_FUNDS: {
1878
+ readonly status: 400;
1879
+ readonly message: "Insufficient SOL balance to complete this transaction.";
1880
+ readonly data: zod.ZodObject<{
1881
+ required: zod.ZodNumber;
1882
+ available: zod.ZodNumber;
1883
+ }, zod_v4_core.$strip>;
1884
+ };
1857
1885
  }>>>, Record<never, never>>;
1858
1886
  getSplit: _orpc_contract.ContractProcedure<zod.ZodObject<{
1859
1887
  walletAddress: zod.ZodString;
@@ -1961,6 +1989,14 @@ declare const apiContract: {
1961
1989
  readonly status: 404;
1962
1990
  readonly message: "The requested resource was not found.";
1963
1991
  };
1992
+ INSUFFICIENT_FUNDS: {
1993
+ readonly status: 400;
1994
+ readonly message: "Insufficient SOL balance to complete this transaction.";
1995
+ readonly data: zod.ZodObject<{
1996
+ required: zod.ZodNumber;
1997
+ available: zod.ZodNumber;
1998
+ }, zod_v4_core.$strip>;
1999
+ };
1964
2000
  }>>>, Record<never, never>>;
1965
2001
  closeAutomation: _orpc_contract.ContractProcedure<zod.ZodObject<{
1966
2002
  walletAddress: zod.ZodString;
@@ -1981,6 +2017,14 @@ declare const apiContract: {
1981
2017
  readonly status: 404;
1982
2018
  readonly message: "The requested resource was not found.";
1983
2019
  };
2020
+ INSUFFICIENT_FUNDS: {
2021
+ readonly status: 400;
2022
+ readonly message: "Insufficient SOL balance to complete this transaction.";
2023
+ readonly data: zod.ZodObject<{
2024
+ required: zod.ZodNumber;
2025
+ available: zod.ZodNumber;
2026
+ }, zod_v4_core.$strip>;
2027
+ };
1984
2028
  }>>>, Record<never, never>>;
1985
2029
  getAutomationStatus: _orpc_contract.ContractProcedure<zod.ZodObject<{
1986
2030
  walletAddress: zod.ZodString;
@@ -2044,6 +2088,14 @@ declare const apiContract: {
2044
2088
  readonly status: 404;
2045
2089
  readonly message: "The requested resource was not found.";
2046
2090
  };
2091
+ INSUFFICIENT_FUNDS: {
2092
+ readonly status: 400;
2093
+ readonly message: "Insufficient SOL balance to complete this transaction.";
2094
+ readonly data: zod.ZodObject<{
2095
+ required: zod.ZodNumber;
2096
+ available: zod.ZodNumber;
2097
+ }, zod_v4_core.$strip>;
2098
+ };
2047
2099
  }>>>, Record<never, never>>;
2048
2100
  fundAutomation: _orpc_contract.ContractProcedure<zod.ZodObject<{
2049
2101
  walletAddress: zod.ZodString;
@@ -2345,6 +2397,14 @@ declare const apiContract: {
2345
2397
  readonly status: 403;
2346
2398
  readonly message: "You do not have permission to access this resource.";
2347
2399
  };
2400
+ INSUFFICIENT_FUNDS: {
2401
+ readonly status: 400;
2402
+ readonly message: "Insufficient SOL balance to complete this transaction.";
2403
+ readonly data: zod.ZodObject<{
2404
+ required: zod.ZodNumber;
2405
+ available: zod.ZodNumber;
2406
+ }, zod_v4_core.$strip>;
2407
+ };
2348
2408
  }>>>, Record<never, never>>;
2349
2409
  invite: _orpc_contract.ContractProcedure<zod.ZodObject<{
2350
2410
  entityPubKey: zod.ZodString;
@@ -2499,6 +2559,14 @@ declare const apiContract: {
2499
2559
  JUPITER_ERROR: {
2500
2560
  message: string;
2501
2561
  };
2562
+ INSUFFICIENT_FUNDS: {
2563
+ readonly status: 400;
2564
+ readonly message: "Insufficient SOL balance to complete this transaction.";
2565
+ readonly data: zod.ZodObject<{
2566
+ required: zod.ZodNumber;
2567
+ available: zod.ZodNumber;
2568
+ }, zod_v4_core.$strip>;
2569
+ };
2502
2570
  }>>>, Record<never, never>>;
2503
2571
  };
2504
2572
  transactions: {
@@ -2836,6 +2904,14 @@ declare const apiContract: {
2836
2904
  readonly status: 409;
2837
2905
  readonly message: "A resource with this identifier already exists.";
2838
2906
  };
2907
+ INSUFFICIENT_FUNDS: {
2908
+ readonly status: 400;
2909
+ readonly message: "Insufficient SOL balance to complete this transaction.";
2910
+ readonly data: zod.ZodObject<{
2911
+ required: zod.ZodNumber;
2912
+ available: zod.ZodNumber;
2913
+ }, zod_v4_core.$strip>;
2914
+ };
2839
2915
  }>>>, Record<never, never>>;
2840
2916
  get: _orpc_contract.ContractProcedure<zod.ZodObject<{
2841
2917
  walletAddress: zod.ZodString;
@@ -2931,6 +3007,14 @@ declare const apiContract: {
2931
3007
  status: number;
2932
3008
  message: string;
2933
3009
  };
3010
+ INSUFFICIENT_FUNDS: {
3011
+ readonly status: 400;
3012
+ readonly message: "Insufficient SOL balance to complete this transaction.";
3013
+ readonly data: zod.ZodObject<{
3014
+ required: zod.ZodNumber;
3015
+ available: zod.ZodNumber;
3016
+ }, zod_v4_core.$strip>;
3017
+ };
2934
3018
  }>>>, Record<never, never>>;
2935
3019
  getByAddress: _orpc_contract.ContractProcedure<zod.ZodObject<{
2936
3020
  packAddress: zod.ZodString;
@@ -3317,6 +3401,14 @@ declare const fullApiContract: {
3317
3401
  message: string;
3318
3402
  status: number;
3319
3403
  };
3404
+ INSUFFICIENT_FUNDS: {
3405
+ readonly status: 400;
3406
+ readonly message: "Insufficient SOL balance to complete this transaction.";
3407
+ readonly data: zod.ZodObject<{
3408
+ required: zod.ZodNumber;
3409
+ available: zod.ZodNumber;
3410
+ }, zod_v4_core.$strip>;
3411
+ };
3320
3412
  }>>>, Record<never, never>>;
3321
3413
  updateTransfer: _orpc_contract.ContractProcedure<zod.ZodObject<{
3322
3414
  id: zod.ZodString;
@@ -3450,6 +3542,14 @@ declare const fullApiContract: {
3450
3542
  status: number;
3451
3543
  message: string;
3452
3544
  };
3545
+ INSUFFICIENT_FUNDS: {
3546
+ readonly status: 400;
3547
+ readonly message: "Insufficient SOL balance to complete this transaction.";
3548
+ readonly data: zod.ZodObject<{
3549
+ required: zod.ZodNumber;
3550
+ available: zod.ZodNumber;
3551
+ }, zod_v4_core.$strip>;
3552
+ };
3453
3553
  }>>>>, Record<never, never>>;
3454
3554
  };
3455
3555
  hotspots: {
@@ -3615,6 +3715,18 @@ declare const fullApiContract: {
3615
3715
  message: string;
3616
3716
  status: number;
3617
3717
  };
3718
+ INSUFFICIENT_FUNDS: {
3719
+ readonly status: 400;
3720
+ readonly message: "Insufficient SOL balance to complete this transaction.";
3721
+ readonly data: zod.ZodObject<{
3722
+ required: zod.ZodNumber;
3723
+ available: zod.ZodNumber;
3724
+ }, zod_v4_core.$strip>;
3725
+ };
3726
+ CONFLICT: {
3727
+ readonly status: 409;
3728
+ readonly message: "A resource with this identifier already exists.";
3729
+ };
3618
3730
  }>>>>, Record<never, never>>;
3619
3731
  updateRewardsDestination: _orpc_contract.ContractProcedure<zod.ZodObject<{
3620
3732
  walletAddress: zod.ZodString;
@@ -3642,6 +3754,14 @@ declare const fullApiContract: {
3642
3754
  readonly status: 404;
3643
3755
  readonly message: "The requested resource was not found.";
3644
3756
  };
3757
+ INSUFFICIENT_FUNDS: {
3758
+ readonly status: 400;
3759
+ readonly message: "Insufficient SOL balance to complete this transaction.";
3760
+ readonly data: zod.ZodObject<{
3761
+ required: zod.ZodNumber;
3762
+ available: zod.ZodNumber;
3763
+ }, zod_v4_core.$strip>;
3764
+ };
3645
3765
  }>>>>, Record<never, never>>;
3646
3766
  getSplit: _orpc_contract.ContractProcedure<zod.ZodObject<{
3647
3767
  walletAddress: zod.ZodString;
@@ -3749,6 +3869,14 @@ declare const fullApiContract: {
3749
3869
  readonly status: 404;
3750
3870
  readonly message: "The requested resource was not found.";
3751
3871
  };
3872
+ INSUFFICIENT_FUNDS: {
3873
+ readonly status: 400;
3874
+ readonly message: "Insufficient SOL balance to complete this transaction.";
3875
+ readonly data: zod.ZodObject<{
3876
+ required: zod.ZodNumber;
3877
+ available: zod.ZodNumber;
3878
+ }, zod_v4_core.$strip>;
3879
+ };
3752
3880
  }>>>>, Record<never, never>>;
3753
3881
  closeAutomation: _orpc_contract.ContractProcedure<zod.ZodObject<{
3754
3882
  walletAddress: zod.ZodString;
@@ -3769,6 +3897,14 @@ declare const fullApiContract: {
3769
3897
  readonly status: 404;
3770
3898
  readonly message: "The requested resource was not found.";
3771
3899
  };
3900
+ INSUFFICIENT_FUNDS: {
3901
+ readonly status: 400;
3902
+ readonly message: "Insufficient SOL balance to complete this transaction.";
3903
+ readonly data: zod.ZodObject<{
3904
+ required: zod.ZodNumber;
3905
+ available: zod.ZodNumber;
3906
+ }, zod_v4_core.$strip>;
3907
+ };
3772
3908
  }>>>>, Record<never, never>>;
3773
3909
  getAutomationStatus: _orpc_contract.ContractProcedure<zod.ZodObject<{
3774
3910
  walletAddress: zod.ZodString;
@@ -3832,6 +3968,14 @@ declare const fullApiContract: {
3832
3968
  readonly status: 404;
3833
3969
  readonly message: "The requested resource was not found.";
3834
3970
  };
3971
+ INSUFFICIENT_FUNDS: {
3972
+ readonly status: 400;
3973
+ readonly message: "Insufficient SOL balance to complete this transaction.";
3974
+ readonly data: zod.ZodObject<{
3975
+ required: zod.ZodNumber;
3976
+ available: zod.ZodNumber;
3977
+ }, zod_v4_core.$strip>;
3978
+ };
3835
3979
  }>>>>, Record<never, never>>;
3836
3980
  fundAutomation: _orpc_contract.ContractProcedure<zod.ZodObject<{
3837
3981
  walletAddress: zod.ZodString;
@@ -4133,6 +4277,14 @@ declare const fullApiContract: {
4133
4277
  readonly status: 403;
4134
4278
  readonly message: "You do not have permission to access this resource.";
4135
4279
  };
4280
+ INSUFFICIENT_FUNDS: {
4281
+ readonly status: 400;
4282
+ readonly message: "Insufficient SOL balance to complete this transaction.";
4283
+ readonly data: zod.ZodObject<{
4284
+ required: zod.ZodNumber;
4285
+ available: zod.ZodNumber;
4286
+ }, zod_v4_core.$strip>;
4287
+ };
4136
4288
  }>>>>, Record<never, never>>;
4137
4289
  invite: _orpc_contract.ContractProcedure<zod.ZodObject<{
4138
4290
  entityPubKey: zod.ZodString;
@@ -4287,6 +4439,14 @@ declare const fullApiContract: {
4287
4439
  JUPITER_ERROR: {
4288
4440
  message: string;
4289
4441
  };
4442
+ INSUFFICIENT_FUNDS: {
4443
+ readonly status: 400;
4444
+ readonly message: "Insufficient SOL balance to complete this transaction.";
4445
+ readonly data: zod.ZodObject<{
4446
+ required: zod.ZodNumber;
4447
+ available: zod.ZodNumber;
4448
+ }, zod_v4_core.$strip>;
4449
+ };
4290
4450
  }>>>>, Record<never, never>>;
4291
4451
  };
4292
4452
  transactions: {
@@ -4624,6 +4784,14 @@ declare const fullApiContract: {
4624
4784
  readonly status: 409;
4625
4785
  readonly message: "A resource with this identifier already exists.";
4626
4786
  };
4787
+ INSUFFICIENT_FUNDS: {
4788
+ readonly status: 400;
4789
+ readonly message: "Insufficient SOL balance to complete this transaction.";
4790
+ readonly data: zod.ZodObject<{
4791
+ required: zod.ZodNumber;
4792
+ available: zod.ZodNumber;
4793
+ }, zod_v4_core.$strip>;
4794
+ };
4627
4795
  }>>>>, Record<never, never>>;
4628
4796
  get: _orpc_contract.ContractProcedure<zod.ZodObject<{
4629
4797
  walletAddress: zod.ZodString;
@@ -4719,6 +4887,14 @@ declare const fullApiContract: {
4719
4887
  status: number;
4720
4888
  message: string;
4721
4889
  };
4890
+ INSUFFICIENT_FUNDS: {
4891
+ readonly status: 400;
4892
+ readonly message: "Insufficient SOL balance to complete this transaction.";
4893
+ readonly data: zod.ZodObject<{
4894
+ required: zod.ZodNumber;
4895
+ available: zod.ZodNumber;
4896
+ }, zod_v4_core.$strip>;
4897
+ };
4722
4898
  }>>>>, Record<never, never>>;
4723
4899
  getByAddress: _orpc_contract.ContractProcedure<zod.ZodObject<{
4724
4900
  packAddress: zod.ZodString;
package/dist/index.js CHANGED
@@ -886,7 +886,8 @@ var tokensContract = oc.tag("Tokens").router({
886
886
  }),
887
887
  /** Protected: Create HNT account */
888
888
  createHntAccount: oc.route({ method: "POST", path: "/tokens/hnt-account", summary: "Create HNT account" }).input(CreateHntAccountInputSchema).output(CreateHntAccountOutputSchema).errors({
889
- INVALID_WALLET_ADDRESS
889
+ INVALID_WALLET_ADDRESS,
890
+ INSUFFICIENT_FUNDS
890
891
  })
891
892
  });
892
893
  var hotspotsContract = oc.tag("Hotspot").prefix("/hotspots").router({
@@ -907,12 +908,15 @@ var hotspotsContract = oc.tag("Hotspot").prefix("/hotspots").router({
907
908
  transferHotspot: oc.route({ method: "POST", path: "/transfer", summary: "Transfer ownership" }).input(TransferHotspotInputSchema).output(TransferHotspotOutputSchema).errors({
908
909
  UNAUTHORIZED,
909
910
  NOT_FOUND,
910
- BAD_REQUEST: { message: "Invalid transfer parameters", status: 400 }
911
+ BAD_REQUEST: { message: "Invalid transfer parameters", status: 400 },
912
+ INSUFFICIENT_FUNDS,
913
+ CONFLICT
911
914
  }),
912
915
  /** Protected: Update rewards destination */
913
916
  updateRewardsDestination: oc.route({ method: "POST", path: "/update-rewards-destination", summary: "Update rewards destination" }).input(UpdateRewardsDestinationInputSchema).output(UpdateRewardsDestinationOutputSchema).errors({
914
917
  BAD_REQUEST: { message: "Invalid parameters", status: 400 },
915
- NOT_FOUND
918
+ NOT_FOUND,
919
+ INSUFFICIENT_FUNDS
916
920
  }),
917
921
  /** Public: Get split configuration for a hotspot */
918
922
  getSplit: oc.route({ method: "GET", path: "/split/{walletAddress}/{hotspotPubkey}", summary: "Get reward split" }).input(GetSplitInputSchema).output(SplitResponseSchema).errors({
@@ -927,11 +931,13 @@ var hotspotsContract = oc.tag("Hotspot").prefix("/hotspots").router({
927
931
  }),
928
932
  /** Protected: Delete a split configuration */
929
933
  deleteSplit: oc.route({ method: "DELETE", path: "/split", summary: "Delete a reward split" }).input(DeleteSplitInputSchema).output(DeleteSplitOutputSchema).errors({
930
- NOT_FOUND
934
+ NOT_FOUND,
935
+ INSUFFICIENT_FUNDS
931
936
  }),
932
937
  /** Protected: Close automation */
933
938
  closeAutomation: oc.route({ method: "POST", path: "/wallet/{walletAddress}/automation/close", summary: "Close automation" }).input(CloseAutomationInputSchema).output(CloseAutomationOutputSchema).errors({
934
- NOT_FOUND
939
+ NOT_FOUND,
940
+ INSUFFICIENT_FUNDS
935
941
  }),
936
942
  /** Protected: Get automation status */
937
943
  getAutomationStatus: oc.route({ method: "GET", path: "/wallet/{walletAddress}/automation/status", summary: "Get automation status" }).input(GetAutomationStatusInputSchema).output(AutomationStatusOutputSchema).errors({
@@ -943,7 +949,8 @@ var hotspotsContract = oc.tag("Hotspot").prefix("/hotspots").router({
943
949
  path: "/wallet/{walletAddress}/automation",
944
950
  summary: "Setup automation"
945
951
  }).input(SetupAutomationInputSchema).output(SetupAutomationOutputSchema).errors({
946
- NOT_FOUND
952
+ NOT_FOUND,
953
+ INSUFFICIENT_FUNDS
947
954
  }),
948
955
  /** Protected: Fund automation */
949
956
  fundAutomation: oc.route({ method: "POST", path: "/wallet/{walletAddress}/automation/fund", summary: "Fund automation" }).input(FundAutomationInputSchema).output(FundAutomationOutputSchema).errors({
@@ -1002,7 +1009,8 @@ var rewardContract = oc.tag("Reward Contract").prefix("/hotspots").router({
1002
1009
  BAD_REQUEST,
1003
1010
  NOT_FOUND,
1004
1011
  // if wallet is not the delegate
1005
- UNAUTHORIZED
1012
+ UNAUTHORIZED,
1013
+ INSUFFICIENT_FUNDS
1006
1014
  }).output(DeleteRewardContractTransactionResponseSchema),
1007
1015
  invite: oc.route({
1008
1016
  method: "POST",
@@ -1052,7 +1060,8 @@ var swapContract = oc.tag("Swap").router({
1052
1060
  }),
1053
1061
  getInstructions: oc.route({ method: "POST", path: "/swap/instructions" }).input(GetInstructionsInputSchema).output(TransactionDataSchema).errors({
1054
1062
  BAD_REQUEST: { message: "Invalid instruction parameters", status: 400 },
1055
- JUPITER_ERROR: { message: "Failed to get swap instructions from Jupiter" }
1063
+ JUPITER_ERROR: { message: "Failed to get swap instructions from Jupiter" },
1064
+ INSUFFICIENT_FUNDS
1056
1065
  })
1057
1066
  });
1058
1067
  var transactionsContract = oc.tag("Transactions").router({
@@ -1083,7 +1092,8 @@ var welcomePacksContract = oc.tag("Welcome Packs").router({
1083
1092
  /** Protected: Create a new welcome pack */
1084
1093
  create: oc.route({ method: "POST", path: "/welcome-packs", summary: "Create a new welcome pack" }).input(WelcomePackCreateInputSchema).output(WelcomePackCreateOutputSchema).errors({
1085
1094
  BAD_REQUEST,
1086
- CONFLICT
1095
+ CONFLICT,
1096
+ INSUFFICIENT_FUNDS
1087
1097
  }),
1088
1098
  /** Public: Get a specific welcome pack */
1089
1099
  get: oc.route({ method: "GET", path: "/welcome-packs/{walletAddress}/{packId}", summary: "Get a specific welcome pack" }).input(WelcomePackGetInputSchema).output(WelcomePackSchema).errors({
@@ -1093,7 +1103,8 @@ var welcomePacksContract = oc.tag("Welcome Packs").router({
1093
1103
  /** Protected: Delete a welcome pack */
1094
1104
  delete: oc.route({ method: "DELETE", path: "/welcome-packs/{walletAddress}/{packId}", summary: "Delete a welcome pack" }).input(WelcomePackDeleteInputSchema).output(WelcomePackDeleteOutputSchema).errors({
1095
1105
  BAD_REQUEST,
1096
- INVALID_WALLET_ADDRESS
1106
+ INVALID_WALLET_ADDRESS,
1107
+ INSUFFICIENT_FUNDS
1097
1108
  }),
1098
1109
  /** Public: Get welcome pack by pack address */
1099
1110
  getByAddress: oc.route({ method: "GET", path: "/welcome-packs/address/{packAddress}", summary: "Get welcome pack by pack address" }).input(WelcomePackGetByAddressInputSchema).output(WelcomePackSchema).errors({
@@ -1140,7 +1151,8 @@ var fiatContract = oc.errors({
1140
1151
  sendFunds: oc.route({ method: "POST", path: "/fiat/send" }).input(SendFundsInputSchema).output(SendFundsOutputSchema).errors({
1141
1152
  NOT_FOUND,
1142
1153
  BRIDGE_ERROR: { message: "Failed to create Bridge transfer", status: 500 },
1143
- JUPITER_ERROR: { message: "Failed to get quote from Jupiter", status: 500 }
1154
+ JUPITER_ERROR: { message: "Failed to get quote from Jupiter", status: 500 },
1155
+ INSUFFICIENT_FUNDS
1144
1156
  }),
1145
1157
  updateTransfer: oc.route({ method: "PUT", path: "/fiat/transfer/{id}" }).input(UpdateTransferInputSchema).output(UpdateTransferOutputSchema).errors({
1146
1158
  NOT_FOUND: { message: "Transfer not found", status: 404 }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@helium/blockchain-api",
3
- "version": "0.3.4",
3
+ "version": "0.3.5",
4
4
  "description": "TypeScript client and schemas for the Helium Blockchain API",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -34,4 +34,4 @@
34
34
  "tsup": "^8.0.0",
35
35
  "typescript": "^5.0.0"
36
36
  }
37
- }
37
+ }