@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.js CHANGED
@@ -781,6 +781,28 @@ var Apps = class extends HeyApiClient {
781
781
  });
782
782
  }
783
783
  /**
784
+ * Accept x402 on a chain, or stop
785
+ *
786
+ * Turning x402 on answers 403 when the app isn't enabled for x402 or the chain isn't in its allowed list
787
+ */
788
+ updateChain(options) {
789
+ return (options.client ?? this.client).patch({
790
+ security: [{
791
+ name: "x-kite-signature",
792
+ type: "apiKey"
793
+ }, {
794
+ name: "x-kite-root-key",
795
+ type: "apiKey"
796
+ }],
797
+ url: "/api/apps/chains/{chainId}",
798
+ ...options,
799
+ headers: {
800
+ "Content-Type": "application/json",
801
+ ...options.headers
802
+ }
803
+ });
804
+ }
805
+ /**
784
806
  * Take payments on a chain, paid to an address there
785
807
  */
786
808
  setChain(options) {
@@ -800,6 +822,55 @@ var Apps = class extends HeyApiClient {
800
822
  }
801
823
  });
802
824
  }
825
+ /**
826
+ * Let an app use x402, or stop
827
+ *
828
+ * Let's the root key give (or stop) an app access to x402
829
+ */
830
+ setX402(options) {
831
+ return (options.client ?? this.client).patch({
832
+ security: [{
833
+ name: "x-kite-root-key",
834
+ type: "apiKey"
835
+ }],
836
+ url: "/api/apps/{appId}/x402",
837
+ ...options,
838
+ headers: {
839
+ "Content-Type": "application/json",
840
+ ...options.headers
841
+ }
842
+ });
843
+ }
844
+ /**
845
+ * Stop allowing an app to accept x402 on a chain
846
+ *
847
+ * Idempotent.
848
+ */
849
+ disallowX402Chain(options) {
850
+ return (options.client ?? this.client).delete({
851
+ security: [{
852
+ name: "x-kite-root-key",
853
+ type: "apiKey"
854
+ }],
855
+ url: "/api/apps/{appId}/x402/chains/{chainId}",
856
+ ...options
857
+ });
858
+ }
859
+ /**
860
+ * Allow an app to accept x402 on a chain
861
+ *
862
+ * Idempotent. The chain doesn't have to be one of the app's chains yet.
863
+ */
864
+ allowX402Chain(options) {
865
+ return (options.client ?? this.client).put({
866
+ security: [{
867
+ name: "x-kite-root-key",
868
+ type: "apiKey"
869
+ }],
870
+ url: "/api/apps/{appId}/x402/chains/{chainId}",
871
+ ...options
872
+ });
873
+ }
803
874
  };
804
875
  var ApiKeys = class extends HeyApiClient {
805
876
  /**
@@ -981,7 +1052,7 @@ var Chains = class extends HeyApiClient {
981
1052
  });
982
1053
  }
983
1054
  /**
984
- * Update chain active status
1055
+ * Turn a chain on or off, or its x402
985
1056
  */
986
1057
  update(options) {
987
1058
  return (options.client ?? this.client).patch({
@@ -1033,22 +1104,6 @@ var Tokens = class extends HeyApiClient {
1033
1104
  });
1034
1105
  }
1035
1106
  /**
1036
- * Tokens an app can be paid out in through NEAR Intents
1037
- */
1038
- listPayouts(options) {
1039
- return (options?.client ?? this.client).get({
1040
- security: [{
1041
- name: "x-kite-signature",
1042
- type: "apiKey"
1043
- }, {
1044
- name: "x-kite-root-key",
1045
- type: "apiKey"
1046
- }],
1047
- url: "/api/tokens/payouts",
1048
- ...options
1049
- });
1050
- }
1051
- /**
1052
1107
  * List tokens
1053
1108
  */
1054
1109
  list(options) {
@@ -1392,6 +1447,19 @@ var Overview = class extends HeyApiClient {
1392
1447
  });
1393
1448
  }
1394
1449
  /**
1450
+ * The operator's gas on each chain
1451
+ */
1452
+ gas(options) {
1453
+ return (options?.client ?? this.client).get({
1454
+ security: [{
1455
+ name: "x-kite-root-key",
1456
+ type: "apiKey"
1457
+ }],
1458
+ url: "/api/overview/gas",
1459
+ ...options
1460
+ });
1461
+ }
1462
+ /**
1395
1463
  * Basic dashboard statistics
1396
1464
  */
1397
1465
  stats(options) {
@@ -1731,6 +1799,19 @@ var Transfers = class extends HeyApiClient {
1731
1799
  });
1732
1800
  }
1733
1801
  /**
1802
+ * Retry a failed payout's attestation or mint
1803
+ */
1804
+ retryPayout(options) {
1805
+ return (options.client ?? this.client).post({
1806
+ security: [{
1807
+ name: "x-kite-root-key",
1808
+ type: "apiKey"
1809
+ }],
1810
+ url: "/api/transfers/{id}/payout/retry",
1811
+ ...options
1812
+ });
1813
+ }
1814
+ /**
1734
1815
  * Refund a transfer
1735
1816
  */
1736
1817
  refund(options) {
@@ -1829,6 +1910,81 @@ var Webhooks = class extends HeyApiClient {
1829
1910
  });
1830
1911
  }
1831
1912
  /**
1913
+ * List system webhooks
1914
+ *
1915
+ * System webhooks belong to no app and hear about the whole server, such as Chain events. They only take system categories.
1916
+ */
1917
+ listSystem(options) {
1918
+ return (options?.client ?? this.client).get({
1919
+ security: [{
1920
+ name: "x-kite-root-key",
1921
+ type: "apiKey"
1922
+ }],
1923
+ url: "/api/webhooks/system",
1924
+ ...options
1925
+ });
1926
+ }
1927
+ /**
1928
+ * Create a system webhook
1929
+ */
1930
+ createSystem(options) {
1931
+ return (options.client ?? this.client).post({
1932
+ security: [{
1933
+ name: "x-kite-root-key",
1934
+ type: "apiKey"
1935
+ }],
1936
+ url: "/api/webhooks/system",
1937
+ ...options,
1938
+ headers: {
1939
+ "Content-Type": "application/json",
1940
+ ...options.headers
1941
+ }
1942
+ });
1943
+ }
1944
+ /**
1945
+ * Delete a system webhook
1946
+ */
1947
+ deleteSystem(options) {
1948
+ return (options.client ?? this.client).delete({
1949
+ security: [{
1950
+ name: "x-kite-root-key",
1951
+ type: "apiKey"
1952
+ }],
1953
+ url: "/api/webhooks/system/{id}",
1954
+ ...options
1955
+ });
1956
+ }
1957
+ /**
1958
+ * Update a system webhook
1959
+ */
1960
+ updateSystem(options) {
1961
+ return (options.client ?? this.client).patch({
1962
+ security: [{
1963
+ name: "x-kite-root-key",
1964
+ type: "apiKey"
1965
+ }],
1966
+ url: "/api/webhooks/system/{id}",
1967
+ ...options,
1968
+ headers: {
1969
+ "Content-Type": "application/json",
1970
+ ...options.headers
1971
+ }
1972
+ });
1973
+ }
1974
+ /**
1975
+ * List a system webhook's delivery attempts
1976
+ */
1977
+ listSystemDeliveries(options) {
1978
+ return (options.client ?? this.client).get({
1979
+ security: [{
1980
+ name: "x-kite-root-key",
1981
+ type: "apiKey"
1982
+ }],
1983
+ url: "/api/webhooks/system/{id}/deliveries",
1984
+ ...options
1985
+ });
1986
+ }
1987
+ /**
1832
1988
  * List a webhook's delivery attempts
1833
1989
  */
1834
1990
  listDeliveries(options) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kite-01/sdk",
3
- "version": "2.5.0",
3
+ "version": "3.0.0",
4
4
  "description": "Server-side client for the Kite payments API",
5
5
  "license": "MIT",
6
6
  "repository": {