@kite-01/sdk 2.4.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Kite 01
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/dist/index.cjs CHANGED
@@ -782,6 +782,28 @@ var Apps = class extends HeyApiClient {
782
782
  });
783
783
  }
784
784
  /**
785
+ * Accept x402 on a chain, or stop
786
+ *
787
+ * Turning x402 on answers 403 when the app isn't enabled for x402 or the chain isn't in its allowed list
788
+ */
789
+ updateChain(options) {
790
+ return (options.client ?? this.client).patch({
791
+ security: [{
792
+ name: "x-kite-signature",
793
+ type: "apiKey"
794
+ }, {
795
+ name: "x-kite-root-key",
796
+ type: "apiKey"
797
+ }],
798
+ url: "/api/apps/chains/{chainId}",
799
+ ...options,
800
+ headers: {
801
+ "Content-Type": "application/json",
802
+ ...options.headers
803
+ }
804
+ });
805
+ }
806
+ /**
785
807
  * Take payments on a chain, paid to an address there
786
808
  */
787
809
  setChain(options) {
@@ -801,6 +823,55 @@ var Apps = class extends HeyApiClient {
801
823
  }
802
824
  });
803
825
  }
826
+ /**
827
+ * Let an app use x402, or stop
828
+ *
829
+ * Let's the root key give (or stop) an app access to x402
830
+ */
831
+ setX402(options) {
832
+ return (options.client ?? this.client).patch({
833
+ security: [{
834
+ name: "x-kite-root-key",
835
+ type: "apiKey"
836
+ }],
837
+ url: "/api/apps/{appId}/x402",
838
+ ...options,
839
+ headers: {
840
+ "Content-Type": "application/json",
841
+ ...options.headers
842
+ }
843
+ });
844
+ }
845
+ /**
846
+ * Stop allowing an app to accept x402 on a chain
847
+ *
848
+ * Idempotent.
849
+ */
850
+ disallowX402Chain(options) {
851
+ return (options.client ?? this.client).delete({
852
+ security: [{
853
+ name: "x-kite-root-key",
854
+ type: "apiKey"
855
+ }],
856
+ url: "/api/apps/{appId}/x402/chains/{chainId}",
857
+ ...options
858
+ });
859
+ }
860
+ /**
861
+ * Allow an app to accept x402 on a chain
862
+ *
863
+ * Idempotent. The chain doesn't have to be one of the app's chains yet.
864
+ */
865
+ allowX402Chain(options) {
866
+ return (options.client ?? this.client).put({
867
+ security: [{
868
+ name: "x-kite-root-key",
869
+ type: "apiKey"
870
+ }],
871
+ url: "/api/apps/{appId}/x402/chains/{chainId}",
872
+ ...options
873
+ });
874
+ }
804
875
  };
805
876
  var ApiKeys = class extends HeyApiClient {
806
877
  /**
@@ -982,7 +1053,7 @@ var Chains = class extends HeyApiClient {
982
1053
  });
983
1054
  }
984
1055
  /**
985
- * Update chain active status
1056
+ * Turn a chain on or off, or its x402
986
1057
  */
987
1058
  update(options) {
988
1059
  return (options.client ?? this.client).patch({
@@ -1034,22 +1105,6 @@ var Tokens = class extends HeyApiClient {
1034
1105
  });
1035
1106
  }
1036
1107
  /**
1037
- * Tokens an app can be paid out in through NEAR Intents
1038
- */
1039
- listPayouts(options) {
1040
- return (options?.client ?? this.client).get({
1041
- security: [{
1042
- name: "x-kite-signature",
1043
- type: "apiKey"
1044
- }, {
1045
- name: "x-kite-root-key",
1046
- type: "apiKey"
1047
- }],
1048
- url: "/api/tokens/payouts",
1049
- ...options
1050
- });
1051
- }
1052
- /**
1053
1108
  * List tokens
1054
1109
  */
1055
1110
  list(options) {
@@ -1393,6 +1448,19 @@ var Overview = class extends HeyApiClient {
1393
1448
  });
1394
1449
  }
1395
1450
  /**
1451
+ * The operator's gas on each chain
1452
+ */
1453
+ gas(options) {
1454
+ return (options?.client ?? this.client).get({
1455
+ security: [{
1456
+ name: "x-kite-root-key",
1457
+ type: "apiKey"
1458
+ }],
1459
+ url: "/api/overview/gas",
1460
+ ...options
1461
+ });
1462
+ }
1463
+ /**
1396
1464
  * Basic dashboard statistics
1397
1465
  */
1398
1466
  stats(options) {
@@ -1626,7 +1694,7 @@ var Quotes = class extends HeyApiClient {
1626
1694
  });
1627
1695
  }
1628
1696
  /**
1629
- * Quote a payment of an exact amount in a token
1697
+ * Quote a payment of an exact amount in a token, or of a price in a currency
1630
1698
  */
1631
1699
  create(options) {
1632
1700
  return (options.client ?? this.client).post({
@@ -1700,6 +1768,22 @@ var Transfers = class extends HeyApiClient {
1700
1768
  });
1701
1769
  }
1702
1770
  /**
1771
+ * Get a transfer by its pay-in address
1772
+ */
1773
+ getByPayinAddress(options) {
1774
+ return (options.client ?? this.client).get({
1775
+ security: [{
1776
+ name: "x-kite-signature",
1777
+ type: "apiKey"
1778
+ }, {
1779
+ name: "x-kite-root-key",
1780
+ type: "apiKey"
1781
+ }],
1782
+ url: "/api/transfers/payin/{address}",
1783
+ ...options
1784
+ });
1785
+ }
1786
+ /**
1703
1787
  * Get a transfer
1704
1788
  */
1705
1789
  get(options) {
@@ -1716,6 +1800,19 @@ var Transfers = class extends HeyApiClient {
1716
1800
  });
1717
1801
  }
1718
1802
  /**
1803
+ * Retry a failed payout's attestation or mint
1804
+ */
1805
+ retryPayout(options) {
1806
+ return (options.client ?? this.client).post({
1807
+ security: [{
1808
+ name: "x-kite-root-key",
1809
+ type: "apiKey"
1810
+ }],
1811
+ url: "/api/transfers/{id}/payout/retry",
1812
+ ...options
1813
+ });
1814
+ }
1815
+ /**
1719
1816
  * Refund a transfer
1720
1817
  */
1721
1818
  refund(options) {
@@ -1814,6 +1911,81 @@ var Webhooks = class extends HeyApiClient {
1814
1911
  });
1815
1912
  }
1816
1913
  /**
1914
+ * List system webhooks
1915
+ *
1916
+ * System webhooks belong to no app and hear about the whole server, such as Chain events. They only take system categories.
1917
+ */
1918
+ listSystem(options) {
1919
+ return (options?.client ?? this.client).get({
1920
+ security: [{
1921
+ name: "x-kite-root-key",
1922
+ type: "apiKey"
1923
+ }],
1924
+ url: "/api/webhooks/system",
1925
+ ...options
1926
+ });
1927
+ }
1928
+ /**
1929
+ * Create a system webhook
1930
+ */
1931
+ createSystem(options) {
1932
+ return (options.client ?? this.client).post({
1933
+ security: [{
1934
+ name: "x-kite-root-key",
1935
+ type: "apiKey"
1936
+ }],
1937
+ url: "/api/webhooks/system",
1938
+ ...options,
1939
+ headers: {
1940
+ "Content-Type": "application/json",
1941
+ ...options.headers
1942
+ }
1943
+ });
1944
+ }
1945
+ /**
1946
+ * Delete a system webhook
1947
+ */
1948
+ deleteSystem(options) {
1949
+ return (options.client ?? this.client).delete({
1950
+ security: [{
1951
+ name: "x-kite-root-key",
1952
+ type: "apiKey"
1953
+ }],
1954
+ url: "/api/webhooks/system/{id}",
1955
+ ...options
1956
+ });
1957
+ }
1958
+ /**
1959
+ * Update a system webhook
1960
+ */
1961
+ updateSystem(options) {
1962
+ return (options.client ?? this.client).patch({
1963
+ security: [{
1964
+ name: "x-kite-root-key",
1965
+ type: "apiKey"
1966
+ }],
1967
+ url: "/api/webhooks/system/{id}",
1968
+ ...options,
1969
+ headers: {
1970
+ "Content-Type": "application/json",
1971
+ ...options.headers
1972
+ }
1973
+ });
1974
+ }
1975
+ /**
1976
+ * List a system webhook's delivery attempts
1977
+ */
1978
+ listSystemDeliveries(options) {
1979
+ return (options.client ?? this.client).get({
1980
+ security: [{
1981
+ name: "x-kite-root-key",
1982
+ type: "apiKey"
1983
+ }],
1984
+ url: "/api/webhooks/system/{id}/deliveries",
1985
+ ...options
1986
+ });
1987
+ }
1988
+ /**
1817
1989
  * List a webhook's delivery attempts
1818
1990
  */
1819
1991
  listDeliveries(options) {