@mysten/sui 2.20.3 → 2.20.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 (76) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/bcs/bcs.d.mts +6 -6
  3. package/dist/bcs/index.d.mts +20 -20
  4. package/dist/client/core.d.mts.map +1 -1
  5. package/dist/client/core.mjs +4 -1
  6. package/dist/client/core.mjs.map +1 -1
  7. package/dist/client/mvr.d.mts.map +1 -1
  8. package/dist/client/mvr.mjs +29 -7
  9. package/dist/client/mvr.mjs.map +1 -1
  10. package/dist/cryptography/signature.d.mts +8 -8
  11. package/dist/grpc/client.d.mts.map +1 -1
  12. package/dist/grpc/client.mjs +1 -1
  13. package/dist/grpc/client.mjs.map +1 -1
  14. package/dist/grpc/core.d.mts +4 -4
  15. package/dist/grpc/core.d.mts.map +1 -1
  16. package/dist/grpc/core.mjs +44 -27
  17. package/dist/grpc/core.mjs.map +1 -1
  18. package/dist/grpc/proto/sui/forking/v1alpha/forking_service.client.d.mts +4 -4
  19. package/dist/grpc/proto/sui/rpc/v2/ledger_service.client.d.mts +4 -4
  20. package/dist/grpc/proto/sui/rpc/v2/move_package_service.client.d.mts +4 -4
  21. package/dist/grpc/proto/sui/rpc/v2/name_service.client.d.mts +4 -4
  22. package/dist/grpc/proto/sui/rpc/v2/transaction_execution_service.client.d.mts +4 -4
  23. package/dist/jsonRpc/client.d.mts +160 -0
  24. package/dist/jsonRpc/client.d.mts.map +1 -1
  25. package/dist/jsonRpc/client.mjs +142 -0
  26. package/dist/jsonRpc/client.mjs.map +1 -1
  27. package/dist/jsonRpc/core.d.mts +80 -0
  28. package/dist/jsonRpc/core.d.mts.map +1 -1
  29. package/dist/jsonRpc/core.mjs +80 -0
  30. package/dist/jsonRpc/core.mjs.map +1 -1
  31. package/dist/jsonRpc/errors.d.mts +12 -0
  32. package/dist/jsonRpc/errors.d.mts.map +1 -1
  33. package/dist/jsonRpc/errors.mjs +12 -0
  34. package/dist/jsonRpc/errors.mjs.map +1 -1
  35. package/dist/jsonRpc/http-transport.d.mts +30 -0
  36. package/dist/jsonRpc/http-transport.d.mts.map +1 -1
  37. package/dist/jsonRpc/http-transport.mjs +16 -0
  38. package/dist/jsonRpc/http-transport.mjs.map +1 -1
  39. package/dist/jsonRpc/network.d.mts +4 -0
  40. package/dist/jsonRpc/network.d.mts.map +1 -1
  41. package/dist/jsonRpc/network.mjs +4 -0
  42. package/dist/jsonRpc/network.mjs.map +1 -1
  43. package/dist/jsonRpc/types/chain.d.mts +68 -0
  44. package/dist/jsonRpc/types/chain.d.mts.map +1 -1
  45. package/dist/jsonRpc/types/changes.d.mts +24 -0
  46. package/dist/jsonRpc/types/changes.d.mts.map +1 -1
  47. package/dist/jsonRpc/types/coins.d.mts +4 -0
  48. package/dist/jsonRpc/types/coins.d.mts.map +1 -1
  49. package/dist/jsonRpc/types/common.d.mts +4 -0
  50. package/dist/jsonRpc/types/common.d.mts.map +1 -1
  51. package/dist/jsonRpc/types/generated.d.mts +497 -16
  52. package/dist/jsonRpc/types/generated.d.mts.map +1 -1
  53. package/dist/jsonRpc/types/params.d.mts +289 -41
  54. package/dist/jsonRpc/types/params.d.mts.map +1 -1
  55. package/dist/transactions/Transaction.d.mts +9 -9
  56. package/dist/version.mjs +1 -1
  57. package/dist/version.mjs.map +1 -1
  58. package/dist/zklogin/bcs.d.mts +14 -14
  59. package/dist/zklogin/bcs.d.mts.map +1 -1
  60. package/package.json +3 -3
  61. package/src/client/core.ts +1 -0
  62. package/src/client/mvr.ts +39 -6
  63. package/src/grpc/client.ts +10 -7
  64. package/src/grpc/core.ts +200 -134
  65. package/src/jsonRpc/client.ts +160 -0
  66. package/src/jsonRpc/core.ts +80 -0
  67. package/src/jsonRpc/errors.ts +12 -0
  68. package/src/jsonRpc/http-transport.ts +30 -0
  69. package/src/jsonRpc/network.ts +4 -0
  70. package/src/jsonRpc/types/chain.ts +68 -0
  71. package/src/jsonRpc/types/changes.ts +24 -0
  72. package/src/jsonRpc/types/coins.ts +4 -0
  73. package/src/jsonRpc/types/common.ts +4 -0
  74. package/src/jsonRpc/types/generated.ts +497 -16
  75. package/src/jsonRpc/types/params.ts +289 -41
  76. package/src/version.ts +1 -1
@@ -103,9 +103,17 @@ function parseJsonRpcExecutionStatus(
103
103
  };
104
104
  }
105
105
 
106
+ /**
107
+ * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient`
108
+ * from `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
109
+ */
106
110
  export class JSONRpcCoreClient extends CoreClient {
107
111
  #jsonRpcClient: SuiJsonRpcClient;
108
112
 
113
+ /**
114
+ * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient`
115
+ * from `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
116
+ */
109
117
  constructor({
110
118
  jsonRpcClient,
111
119
  mvr,
@@ -117,6 +125,10 @@ export class JSONRpcCoreClient extends CoreClient {
117
125
  this.#jsonRpcClient = jsonRpcClient;
118
126
  }
119
127
 
128
+ /**
129
+ * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient`
130
+ * from `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
131
+ */
120
132
  async getObjects<Include extends SuiClientTypes.ObjectInclude = {}>(
121
133
  options: SuiClientTypes.GetObjectsOptions<Include>,
122
134
  ) {
@@ -151,6 +163,10 @@ export class JSONRpcCoreClient extends CoreClient {
151
163
  objects: results,
152
164
  };
153
165
  }
166
+ /**
167
+ * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient`
168
+ * from `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
169
+ */
154
170
  async listOwnedObjects<Include extends SuiClientTypes.ObjectInclude = {}>(
155
171
  options: SuiClientTypes.ListOwnedObjectsOptions<Include>,
156
172
  ) {
@@ -197,6 +213,10 @@ export class JSONRpcCoreClient extends CoreClient {
197
213
  };
198
214
  }
199
215
 
216
+ /**
217
+ * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient`
218
+ * from `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
219
+ */
200
220
  async listCoins(options: SuiClientTypes.ListCoinsOptions) {
201
221
  const coins = await this.#jsonRpcClient.getCoins({
202
222
  owner: options.owner,
@@ -225,6 +245,10 @@ export class JSONRpcCoreClient extends CoreClient {
225
245
  };
226
246
  }
227
247
 
248
+ /**
249
+ * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient`
250
+ * from `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
251
+ */
228
252
  async getBalance(options: SuiClientTypes.GetBalanceOptions) {
229
253
  const balance = await this.#jsonRpcClient.getBalance({
230
254
  owner: options.owner,
@@ -244,6 +268,10 @@ export class JSONRpcCoreClient extends CoreClient {
244
268
  },
245
269
  };
246
270
  }
271
+ /**
272
+ * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient`
273
+ * from `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
274
+ */
247
275
  async getCoinMetadata(
248
276
  options: SuiClientTypes.GetCoinMetadataOptions,
249
277
  ): Promise<SuiClientTypes.GetCoinMetadataResponse> {
@@ -270,6 +298,10 @@ export class JSONRpcCoreClient extends CoreClient {
270
298
  };
271
299
  }
272
300
 
301
+ /**
302
+ * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient`
303
+ * from `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
304
+ */
273
305
  async listBalances(options: SuiClientTypes.ListBalancesOptions) {
274
306
  const balances = await this.#jsonRpcClient.getAllBalances({
275
307
  owner: options.owner,
@@ -291,6 +323,10 @@ export class JSONRpcCoreClient extends CoreClient {
291
323
  cursor: null,
292
324
  };
293
325
  }
326
+ /**
327
+ * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient`
328
+ * from `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
329
+ */
294
330
  async getTransaction<Include extends SuiClientTypes.TransactionInclude = {}>(
295
331
  options: SuiClientTypes.GetTransactionOptions<Include>,
296
332
  ): Promise<SuiClientTypes.TransactionResult<Include>> {
@@ -311,6 +347,10 @@ export class JSONRpcCoreClient extends CoreClient {
311
347
 
312
348
  return parseTransaction(transaction, options.include);
313
349
  }
350
+ /**
351
+ * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient`
352
+ * from `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
353
+ */
314
354
  async executeTransaction<Include extends SuiClientTypes.TransactionInclude = {}>(
315
355
  options: SuiClientTypes.ExecuteTransactionOptions<Include>,
316
356
  ): Promise<SuiClientTypes.TransactionResult<Include>> {
@@ -332,6 +372,10 @@ export class JSONRpcCoreClient extends CoreClient {
332
372
 
333
373
  return parseTransaction(transaction, options.include);
334
374
  }
375
+ /**
376
+ * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient`
377
+ * from `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
378
+ */
335
379
  async simulateTransaction<Include extends SuiClientTypes.SimulateTransactionInclude = {}>(
336
380
  options: SuiClientTypes.SimulateTransactionOptions<Include>,
337
381
  ): Promise<SuiClientTypes.SimulateTransactionResult<Include>> {
@@ -469,6 +513,10 @@ export class JSONRpcCoreClient extends CoreClient {
469
513
  commandResults as SuiClientTypes.SimulateTransactionResult<Include>['commandResults'],
470
514
  };
471
515
  }
516
+ /**
517
+ * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient`
518
+ * from `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
519
+ */
472
520
  async getReferenceGasPrice(options?: SuiClientTypes.GetReferenceGasPriceOptions) {
473
521
  const referenceGasPrice = await this.#jsonRpcClient.getReferenceGasPrice({
474
522
  signal: options?.signal,
@@ -479,6 +527,10 @@ export class JSONRpcCoreClient extends CoreClient {
479
527
  };
480
528
  }
481
529
 
530
+ /**
531
+ * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient`
532
+ * from `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
533
+ */
482
534
  async getProtocolConfig(
483
535
  options?: SuiClientTypes.GetProtocolConfigOptions,
484
536
  ): Promise<SuiClientTypes.GetProtocolConfigResponse> {
@@ -513,6 +565,10 @@ export class JSONRpcCoreClient extends CoreClient {
513
565
  };
514
566
  }
515
567
 
568
+ /**
569
+ * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient`
570
+ * from `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
571
+ */
516
572
  async getCurrentSystemState(
517
573
  options?: SuiClientTypes.GetCurrentSystemStateOptions,
518
574
  ): Promise<SuiClientTypes.GetCurrentSystemStateResponse> {
@@ -555,6 +611,10 @@ export class JSONRpcCoreClient extends CoreClient {
555
611
  };
556
612
  }
557
613
 
614
+ /**
615
+ * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient`
616
+ * from `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
617
+ */
558
618
  async listDynamicFields(options: SuiClientTypes.ListDynamicFieldsOptions) {
559
619
  const dynamicFields = await this.#jsonRpcClient.getDynamicFields({
560
620
  parentId: options.parentId,
@@ -590,6 +650,10 @@ export class JSONRpcCoreClient extends CoreClient {
590
650
  };
591
651
  }
592
652
 
653
+ /**
654
+ * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient`
655
+ * from `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
656
+ */
593
657
  async verifyZkLoginSignature(options: SuiClientTypes.VerifyZkLoginSignatureOptions) {
594
658
  const result = await this.#jsonRpcClient.verifyZkLoginSignature({
595
659
  bytes: options.bytes,
@@ -604,6 +668,10 @@ export class JSONRpcCoreClient extends CoreClient {
604
668
  };
605
669
  }
606
670
 
671
+ /**
672
+ * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient`
673
+ * from `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
674
+ */
607
675
  async defaultNameServiceName(
608
676
  options: SuiClientTypes.DefaultNameServiceNameOptions,
609
677
  ): Promise<SuiClientTypes.DefaultNameServiceNameResponse> {
@@ -615,10 +683,18 @@ export class JSONRpcCoreClient extends CoreClient {
615
683
  };
616
684
  }
617
685
 
686
+ /**
687
+ * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient`
688
+ * from `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
689
+ */
618
690
  resolveTransactionPlugin() {
619
691
  return coreClientResolveTransactionPlugin;
620
692
  }
621
693
 
694
+ /**
695
+ * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient`
696
+ * from `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
697
+ */
622
698
  async getMoveFunction(
623
699
  options: SuiClientTypes.GetMoveFunctionOptions,
624
700
  ): Promise<SuiClientTypes.GetMoveFunctionResponse> {
@@ -647,6 +723,10 @@ export class JSONRpcCoreClient extends CoreClient {
647
723
  };
648
724
  }
649
725
 
726
+ /**
727
+ * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient`
728
+ * from `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
729
+ */
650
730
  async getChainIdentifier(
651
731
  _options?: SuiClientTypes.GetChainIdentifierOptions,
652
732
  ): Promise<SuiClientTypes.GetChainIdentifierResponse> {
@@ -20,8 +20,16 @@ const CODE_TO_ERROR_TYPE: Record<number, string> = {
20
20
  '-32002': 'TransactionExecutionClientError',
21
21
  };
22
22
 
23
+ /**
24
+ * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient`
25
+ * from `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
26
+ */
23
27
  export class SuiHTTPTransportError extends Error {}
24
28
 
29
+ /**
30
+ * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient`
31
+ * from `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
32
+ */
25
33
  export class JsonRpcError extends SuiHTTPTransportError {
26
34
  code: number;
27
35
  type: string;
@@ -33,6 +41,10 @@ export class JsonRpcError extends SuiHTTPTransportError {
33
41
  }
34
42
  }
35
43
 
44
+ /**
45
+ * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient`
46
+ * from `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
47
+ */
36
48
  export class SuiHTTPStatusError extends SuiHTTPTransportError {
37
49
  status: number;
38
50
  statusText: string;
@@ -6,9 +6,15 @@ import { JsonRpcError, SuiHTTPStatusError } from './errors.js';
6
6
 
7
7
  /**
8
8
  * An object defining headers to be passed to the RPC server
9
+ * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient`
10
+ * from `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
9
11
  */
10
12
  export type HttpHeaders = { [header: string]: string };
11
13
 
14
+ /**
15
+ * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient`
16
+ * from `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
17
+ */
12
18
  export interface JsonRpcHTTPTransportOptions {
13
19
  fetch?: typeof fetch;
14
20
  url: string;
@@ -18,24 +24,44 @@ export interface JsonRpcHTTPTransportOptions {
18
24
  };
19
25
  }
20
26
 
27
+ /**
28
+ * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient`
29
+ * from `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
30
+ */
21
31
  export interface JsonRpcTransportRequestOptions {
22
32
  method: string;
23
33
  params: unknown[];
24
34
  signal?: AbortSignal;
25
35
  }
26
36
 
37
+ /**
38
+ * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient`
39
+ * from `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
40
+ */
27
41
  export interface JsonRpcTransport {
28
42
  request<T = unknown>(input: JsonRpcTransportRequestOptions): Promise<T>;
29
43
  }
30
44
 
45
+ /**
46
+ * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient`
47
+ * from `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
48
+ */
31
49
  export class JsonRpcHTTPTransport implements JsonRpcTransport {
32
50
  #requestId = 0;
33
51
  #options: JsonRpcHTTPTransportOptions;
34
52
 
53
+ /**
54
+ * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient`
55
+ * from `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
56
+ */
35
57
  constructor(options: JsonRpcHTTPTransportOptions) {
36
58
  this.#options = options;
37
59
  }
38
60
 
61
+ /**
62
+ * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient`
63
+ * from `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
64
+ */
39
65
  fetch(input: RequestInfo, init?: RequestInit): Promise<Response> {
40
66
  const fetchFn = this.#options.fetch ?? fetch;
41
67
 
@@ -48,6 +74,10 @@ export class JsonRpcHTTPTransport implements JsonRpcTransport {
48
74
  return fetchFn(input, init);
49
75
  }
50
76
 
77
+ /**
78
+ * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient`
79
+ * from `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
80
+ */
51
81
  async request<T>(input: JsonRpcTransportRequestOptions): Promise<T> {
52
82
  this.#requestId += 1;
53
83
 
@@ -1,6 +1,10 @@
1
1
  // Copyright (c) Mysten Labs, Inc.
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
+ /**
5
+ * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient`
6
+ * from `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
7
+ */
4
8
  export function getJsonRpcFullnodeUrl(network: 'mainnet' | 'testnet' | 'devnet' | 'localnet') {
5
9
  switch (network) {
6
10
  case 'mainnet':
@@ -11,12 +11,20 @@ import type {
11
11
  SuiValidatorSummary,
12
12
  } from './generated.js';
13
13
 
14
+ /**
15
+ * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient`
16
+ * from `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
17
+ */
14
18
  export type ResolvedNameServiceNames = {
15
19
  data: string[];
16
20
  hasNextPage: boolean;
17
21
  nextCursor: string | null;
18
22
  };
19
23
 
24
+ /**
25
+ * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient`
26
+ * from `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
27
+ */
20
28
  export type EpochInfo = {
21
29
  epoch: string;
22
30
  validators: SuiValidatorSummary[];
@@ -27,6 +35,10 @@ export type EpochInfo = {
27
35
  referenceGasPrice: number | null;
28
36
  };
29
37
 
38
+ /**
39
+ * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient`
40
+ * from `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
41
+ */
30
42
  export type EpochMetrics = {
31
43
  epoch: string;
32
44
  epochTotalTransactions: string;
@@ -35,18 +47,30 @@ export type EpochMetrics = {
35
47
  endOfEpochInfo: EndOfEpochInfo | null;
36
48
  };
37
49
 
50
+ /**
51
+ * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient`
52
+ * from `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
53
+ */
38
54
  export type EpochPage = {
39
55
  data: EpochInfo[];
40
56
  nextCursor: string | null;
41
57
  hasNextPage: boolean;
42
58
  };
43
59
 
60
+ /**
61
+ * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient`
62
+ * from `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
63
+ */
44
64
  export type EpochMetricsPage = {
45
65
  data: EpochMetrics[];
46
66
  nextCursor: string | null;
47
67
  hasNextPage: boolean;
48
68
  };
49
69
 
70
+ /**
71
+ * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient`
72
+ * from `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
73
+ */
50
74
  export type EndOfEpochInfo = {
51
75
  lastCheckpointId: string;
52
76
  epochEndTimestamp: string;
@@ -63,12 +87,20 @@ export type EndOfEpochInfo = {
63
87
  leftoverStorageFundInflow: string;
64
88
  };
65
89
 
90
+ /**
91
+ * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient`
92
+ * from `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
93
+ */
66
94
  export type CheckpointPage = {
67
95
  data: Checkpoint[];
68
96
  nextCursor: string | null;
69
97
  hasNextPage: boolean;
70
98
  };
71
99
 
100
+ /**
101
+ * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient`
102
+ * from `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
103
+ */
72
104
  export type NetworkMetrics = {
73
105
  currentTps: number;
74
106
  tps30Days: number;
@@ -79,6 +111,10 @@ export type NetworkMetrics = {
79
111
  totalPackages: string;
80
112
  };
81
113
 
114
+ /**
115
+ * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient`
116
+ * from `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
117
+ */
82
118
  export type AddressMetrics = {
83
119
  checkpoint: number;
84
120
  epoch: number;
@@ -88,14 +124,26 @@ export type AddressMetrics = {
88
124
  dailyActiveAddresses: number;
89
125
  };
90
126
 
127
+ /**
128
+ * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient`
129
+ * from `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
130
+ */
91
131
  export type AllEpochsAddressMetrics = AddressMetrics[];
92
132
 
133
+ /**
134
+ * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient`
135
+ * from `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
136
+ */
93
137
  export type MoveCallMetrics = {
94
138
  rank3Days: MoveCallMetric[];
95
139
  rank7Days: MoveCallMetric[];
96
140
  rank30Days: MoveCallMetric[];
97
141
  };
98
142
 
143
+ /**
144
+ * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient`
145
+ * from `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
146
+ */
99
147
  export type MoveCallMetric = [
100
148
  {
101
149
  module: string;
@@ -105,17 +153,37 @@ export type MoveCallMetric = [
105
153
  string,
106
154
  ];
107
155
 
156
+ /**
157
+ * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient`
158
+ * from `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
159
+ */
108
160
  export type DynamicFieldPage = {
109
161
  data: DynamicFieldInfo[];
110
162
  nextCursor: string | null;
111
163
  hasNextPage: boolean;
112
164
  };
113
165
 
166
+ /**
167
+ * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient`
168
+ * from `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
169
+ */
114
170
  export type SuiMoveNormalizedModules = Record<string, SuiMoveNormalizedModule>;
115
171
 
172
+ /**
173
+ * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient`
174
+ * from `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
175
+ */
116
176
  export type SuiMoveObject = Extract<SuiParsedData, { dataType: 'moveObject' }>;
177
+ /**
178
+ * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient`
179
+ * from `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
180
+ */
117
181
  export type SuiMovePackage = Extract<SuiParsedData, { dataType: 'package' }>;
118
182
 
183
+ /**
184
+ * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient`
185
+ * from `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
186
+ */
119
187
  export type ProgrammableTransaction = {
120
188
  transactions: SuiTransaction[];
121
189
  inputs: SuiCallArg[];
@@ -3,9 +3,33 @@
3
3
 
4
4
  import type { SuiObjectChange } from './generated.js';
5
5
 
6
+ /**
7
+ * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient`
8
+ * from `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
9
+ */
6
10
  export type SuiObjectChangePublished = Extract<SuiObjectChange, { type: 'published' }>;
11
+ /**
12
+ * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient`
13
+ * from `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
14
+ */
7
15
  export type SuiObjectChangeTransferred = Extract<SuiObjectChange, { type: 'transferred' }>;
16
+ /**
17
+ * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient`
18
+ * from `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
19
+ */
8
20
  export type SuiObjectChangeMutated = Extract<SuiObjectChange, { type: 'mutated' }>;
21
+ /**
22
+ * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient`
23
+ * from `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
24
+ */
9
25
  export type SuiObjectChangeDeleted = Extract<SuiObjectChange, { type: 'deleted' }>;
26
+ /**
27
+ * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient`
28
+ * from `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
29
+ */
10
30
  export type SuiObjectChangeWrapped = Extract<SuiObjectChange, { type: 'wrapped' }>;
31
+ /**
32
+ * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient`
33
+ * from `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
34
+ */
11
35
  export type SuiObjectChangeCreated = Extract<SuiObjectChange, { type: 'created' }>;
@@ -1,6 +1,10 @@
1
1
  // Copyright (c) Mysten Labs, Inc.
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
+ /**
5
+ * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient`
6
+ * from `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
7
+ */
4
8
  export type CoinBalance = {
5
9
  coinType: string;
6
10
  coinObjectCount: number;
@@ -1,4 +1,8 @@
1
1
  // Copyright (c) Mysten Labs, Inc.
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
+ /**
5
+ * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient`
6
+ * from `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
7
+ */
4
8
  export type Order = 'ascending' | 'descending';