@kite-01/sdk 2.5.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/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) {
@@ -1732,6 +1800,19 @@ var Transfers = class extends HeyApiClient {
1732
1800
  });
1733
1801
  }
1734
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
+ /**
1735
1816
  * Refund a transfer
1736
1817
  */
1737
1818
  refund(options) {
@@ -1830,6 +1911,81 @@ var Webhooks = class extends HeyApiClient {
1830
1911
  });
1831
1912
  }
1832
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
+ /**
1833
1989
  * List a webhook's delivery attempts
1834
1990
  */
1835
1991
  listDeliveries(options) {