@mysten/sui 2.5.1 → 2.7.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.
Files changed (84) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/dist/bcs/bcs.d.mts +6 -6
  3. package/dist/client/core-resolver.mjs +6 -3
  4. package/dist/client/core-resolver.mjs.map +1 -1
  5. package/dist/client/core.d.mts +8 -8
  6. package/dist/client/core.d.mts.map +1 -1
  7. package/dist/client/core.mjs +11 -5
  8. package/dist/client/core.mjs.map +1 -1
  9. package/dist/client/types.d.mts +73 -18
  10. package/dist/client/types.d.mts.map +1 -1
  11. package/dist/cryptography/signature.d.mts +6 -6
  12. package/dist/graphql/client.d.mts +16 -1
  13. package/dist/graphql/client.d.mts.map +1 -1
  14. package/dist/graphql/client.mjs +50 -2
  15. package/dist/graphql/client.mjs.map +1 -1
  16. package/dist/graphql/core.d.mts +5 -5
  17. package/dist/graphql/core.d.mts.map +1 -1
  18. package/dist/graphql/core.mjs +28 -49
  19. package/dist/graphql/core.mjs.map +1 -1
  20. package/dist/graphql/generated/queries.d.mts.map +1 -1
  21. package/dist/graphql/generated/queries.mjs +25 -7
  22. package/dist/graphql/generated/queries.mjs.map +1 -1
  23. package/dist/graphql/generated/tada-env.d.mts +706 -98
  24. package/dist/grpc/client.d.mts +16 -1
  25. package/dist/grpc/client.d.mts.map +1 -1
  26. package/dist/grpc/client.mjs +42 -2
  27. package/dist/grpc/client.mjs.map +1 -1
  28. package/dist/grpc/core.d.mts +5 -5
  29. package/dist/grpc/core.d.mts.map +1 -1
  30. package/dist/grpc/core.mjs +18 -35
  31. package/dist/grpc/core.mjs.map +1 -1
  32. package/dist/grpc/proto/sui/rpc/v2/ledger_service.client.d.mts +4 -4
  33. package/dist/grpc/proto/sui/rpc/v2/move_package_service.client.d.mts +4 -4
  34. package/dist/grpc/proto/sui/rpc/v2/object.d.mts +38 -1
  35. package/dist/grpc/proto/sui/rpc/v2/object.d.mts.map +1 -1
  36. package/dist/grpc/proto/sui/rpc/v2/object.mjs +26 -1
  37. package/dist/grpc/proto/sui/rpc/v2/object.mjs.map +1 -1
  38. package/dist/grpc/proto/sui/rpc/v2/state_service.client.d.mts +4 -4
  39. package/dist/grpc/proto/sui/rpc/v2/subscription_service.client.d.mts +4 -4
  40. package/dist/grpc/proto/sui/rpc/v2/transaction.d.mts.map +1 -1
  41. package/dist/grpc/proto/sui/rpc/v2/transaction_execution_service.d.mts +8 -0
  42. package/dist/grpc/proto/sui/rpc/v2/transaction_execution_service.d.mts.map +1 -1
  43. package/dist/grpc/proto/sui/rpc/v2/transaction_execution_service.mjs +23 -12
  44. package/dist/grpc/proto/sui/rpc/v2/transaction_execution_service.mjs.map +1 -1
  45. package/dist/grpc/proto/types.d.mts +2 -2
  46. package/dist/grpc/proto/types.mjs +2 -1
  47. package/dist/jsonRpc/core.d.mts +6 -6
  48. package/dist/jsonRpc/core.d.mts.map +1 -1
  49. package/dist/jsonRpc/core.mjs +14 -5
  50. package/dist/jsonRpc/core.mjs.map +1 -1
  51. package/dist/transactions/Transaction.d.mts +6 -6
  52. package/dist/transactions/Transaction.d.mts.map +1 -1
  53. package/dist/transactions/executor/caching.mjs.map +1 -1
  54. package/dist/transactions/executor/parallel.d.mts +1 -1
  55. package/dist/transactions/executor/parallel.d.mts.map +1 -1
  56. package/dist/transactions/executor/parallel.mjs.map +1 -1
  57. package/dist/transactions/executor/serial.d.mts +1 -1
  58. package/dist/transactions/executor/serial.d.mts.map +1 -1
  59. package/dist/transactions/executor/serial.mjs.map +1 -1
  60. package/dist/version.mjs +1 -1
  61. package/dist/version.mjs.map +1 -1
  62. package/dist/zklogin/bcs.d.mts +14 -14
  63. package/package.json +1 -1
  64. package/src/client/core-resolver.ts +9 -8
  65. package/src/client/core.ts +28 -18
  66. package/src/client/types.ts +73 -18
  67. package/src/graphql/client.ts +96 -4
  68. package/src/graphql/core.ts +43 -88
  69. package/src/graphql/generated/queries.ts +271 -44
  70. package/src/graphql/generated/schema.graphql +328 -25
  71. package/src/graphql/generated/tada-env.ts +779 -58
  72. package/src/graphql/queries/getDynamicFields.graphql +8 -1
  73. package/src/graphql/queries/objects.graphql +10 -0
  74. package/src/graphql/queries/transactions.graphql +1 -3
  75. package/src/graphql/queries/verifyZkLoginSignature.graphql +0 -1
  76. package/src/grpc/client.ts +62 -4
  77. package/src/grpc/core.ts +42 -39
  78. package/src/grpc/proto/sui/rpc/v2/object.ts +44 -0
  79. package/src/grpc/proto/sui/rpc/v2/transaction_execution_service.ts +16 -0
  80. package/src/jsonRpc/core.ts +18 -7
  81. package/src/transactions/executor/caching.ts +2 -2
  82. package/src/transactions/executor/parallel.ts +1 -1
  83. package/src/transactions/executor/serial.ts +1 -1
  84. package/src/version.ts +1 -1
@@ -567,6 +567,27 @@ input CheckpointFilter {
567
567
  beforeCheckpoint: UInt53
568
568
  }
569
569
 
570
+ """
571
+ A G1 elliptic curve point with 3 base10-encoded Bn254 field elements.
572
+ """
573
+ type CircomG1 {
574
+ e0: String
575
+ e1: String
576
+ e2: String
577
+ }
578
+
579
+ """
580
+ A G2 elliptic curve point with 6 base10-encoded Bn254 field elements.
581
+ """
582
+ type CircomG2 {
583
+ e00: String
584
+ e01: String
585
+ e10: String
586
+ e11: String
587
+ e20: String
588
+ e21: String
589
+ }
590
+
570
591
  """
571
592
  System transaction for creating the coin deny list state.
572
593
  """
@@ -1140,6 +1161,30 @@ The value of a dynamic field (`MoveValue`) or dynamic object field (`MoveObject`
1140
1161
  """
1141
1162
  union DynamicFieldValue = MoveObject | MoveValue
1142
1163
 
1164
+ """
1165
+ An Ed25519 public key.
1166
+ """
1167
+ type Ed25519PublicKey {
1168
+ """
1169
+ The raw public key bytes.
1170
+ """
1171
+ bytes: Base64
1172
+ }
1173
+
1174
+ """
1175
+ An Ed25519 signature.
1176
+ """
1177
+ type Ed25519Signature {
1178
+ """
1179
+ The public key bytes.
1180
+ """
1181
+ publicKey: Base64
1182
+ """
1183
+ The raw signature bytes.
1184
+ """
1185
+ signature: Base64
1186
+ }
1187
+
1143
1188
  """
1144
1189
  System transaction that supersedes `ChangeEpochTransaction` as the new way to run transactions at the end of an epoch. Behaves similarly to `ChangeEpochTransaction` but can accommodate other optional transactions to run at the end of the epoch.
1145
1190
  """
@@ -1465,18 +1510,13 @@ type ExecutionError {
1465
1510
  }
1466
1511
 
1467
1512
  """
1468
- The execution result of a transaction, including the transaction effects and any potential errors due to signing or quorum-driving.
1513
+ The execution result of a transaction, including the transaction effects.
1469
1514
  """
1470
1515
  type ExecutionResult {
1471
1516
  """
1472
- The effects of the transaction execution, if successful.
1517
+ The effects of the transaction execution.
1473
1518
  """
1474
1519
  effects: TransactionEffects
1475
- """
1476
- Errors that occurred during execution (e.g., network errors, validation failures).
1477
- These are distinct from execution failures within the transaction itself.
1478
- """
1479
- errors: [String!]
1480
1520
  }
1481
1521
 
1482
1522
  """
@@ -2660,6 +2700,12 @@ type MoveValue {
2660
2700
  """
2661
2701
  asAddress: Address
2662
2702
  """
2703
+ Attempts to treat this value as a `vector<T>` and paginate over its elements.
2704
+
2705
+ Values of other types cannot be interpreted as vectors, and `null` is returned.
2706
+ """
2707
+ asVector(first: Int, after: String, last: Int, before: String): MoveValueConnection
2708
+ """
2663
2709
  The BCS representation of this value, Base64-encoded.
2664
2710
  """
2665
2711
  bcs: Base64
@@ -2701,6 +2747,35 @@ type MoveValue {
2701
2747
  type: MoveType
2702
2748
  }
2703
2749
 
2750
+ type MoveValueConnection {
2751
+ """
2752
+ A list of edges.
2753
+ """
2754
+ edges: [MoveValueEdge!]!
2755
+ """
2756
+ A list of nodes.
2757
+ """
2758
+ nodes: [MoveValue!]!
2759
+ """
2760
+ Information to aid in pagination.
2761
+ """
2762
+ pageInfo: PageInfo!
2763
+ }
2764
+
2765
+ """
2766
+ An edge in a connection.
2767
+ """
2768
+ type MoveValueEdge {
2769
+ """
2770
+ A cursor for use in pagination
2771
+ """
2772
+ cursor: String!
2773
+ """
2774
+ The item at the end of the edge
2775
+ """
2776
+ node: MoveValue!
2777
+ }
2778
+
2704
2779
  """
2705
2780
  The visibility modifier describes which modules can access this module member.
2706
2781
 
@@ -2721,6 +2796,59 @@ enum MoveVisibility {
2721
2796
  FRIEND
2722
2797
  }
2723
2798
 
2799
+ """
2800
+ The multisig committee definition.
2801
+ """
2802
+ type MultisigCommittee {
2803
+ """
2804
+ The committee members (public key + weight).
2805
+ """
2806
+ members: [MultisigMember!]
2807
+ """
2808
+ The threshold number of weight needed for a valid multisig.
2809
+ """
2810
+ threshold: Int
2811
+ }
2812
+
2813
+ """
2814
+ A single member of a multisig committee.
2815
+ """
2816
+ type MultisigMember {
2817
+ """
2818
+ The member's public key.
2819
+ """
2820
+ publicKey: MultisigMemberPublicKey
2821
+ """
2822
+ The member's weight in the committee.
2823
+ """
2824
+ weight: Int
2825
+ }
2826
+
2827
+ """
2828
+ A multisig member's public key, varying by scheme.
2829
+ """
2830
+ union MultisigMemberPublicKey = Ed25519PublicKey | Secp256K1PublicKey | Secp256R1PublicKey | PasskeyPublicKey | ZkLoginPublicIdentifier
2831
+
2832
+ """
2833
+ An aggregated multisig signature.
2834
+ """
2835
+ type MultisigSignature {
2836
+ """
2837
+ A bitmap indicating which members of the committee signed.
2838
+ """
2839
+ bitmap: Int
2840
+ """
2841
+ The multisig committee (public keys + weights + threshold).
2842
+ """
2843
+ committee: MultisigCommittee
2844
+ """
2845
+ The individual member signatures, one per signer who participated.
2846
+ Compressed signatures within a multisig do not include the signer's public key,
2847
+ so `publicKey` will be `null` for simple signature schemes (Ed25519, Secp256k1, Secp256r1).
2848
+ """
2849
+ signatures: [SignatureScheme!]
2850
+ }
2851
+
2724
2852
  """
2725
2853
  A transaction that wanted to mutate a consensus-managed object but couldn't because it became not-consensus-managed before the transaction executed (for example, it was deleted, turned into an owned object, or wrapped).
2726
2854
  """
@@ -3214,6 +3342,31 @@ type PageInfo {
3214
3342
  startCursor: String
3215
3343
  }
3216
3344
 
3345
+ """
3346
+ A Passkey public key.
3347
+ """
3348
+ type PasskeyPublicKey {
3349
+ """
3350
+ The raw public key bytes.
3351
+ """
3352
+ bytes: Base64
3353
+ }
3354
+
3355
+ type PasskeySignature {
3356
+ """
3357
+ The authenticator data returned by the passkey device.
3358
+ """
3359
+ authenticatorData: Base64
3360
+ """
3361
+ The client data JSON string passed to the authenticator.
3362
+ """
3363
+ clientDataJson: String
3364
+ """
3365
+ The inner user signature (secp256r1).
3366
+ """
3367
+ signature: SignatureScheme
3368
+ }
3369
+
3217
3370
  type PerEpochConfig {
3218
3371
  """
3219
3372
  The per-epoch configuration object as of when the transaction was executed.
@@ -3329,7 +3482,7 @@ type Query {
3329
3482
  """
3330
3483
  address(address: SuiAddress, name: String, rootVersion: UInt53, atCheckpoint: UInt53): Address
3331
3484
  """
3332
- First four bytes of the network's genesis checkpoint digest (uniquely identifies the network), hex-encoded.
3485
+ The network's genesis checkpoint digest (uniquely identifies the network), Base58-encoded.
3333
3486
  """
3334
3487
  chainIdentifier: String!
3335
3488
  """
@@ -3528,16 +3681,16 @@ type Query {
3528
3681
  """
3529
3682
  type(type: String!): MoveType
3530
3683
  """
3531
- Verify a zkLogin signature os from the given `author`.
3684
+ Verify a zkLogin signature is from the given `author`.
3532
3685
 
3533
- Returns a `ZkLoginVerifyResult` where `success` is `true` and `error` is empty if the signature is valid. If the signature is invalid, `success` is `false` and `error` contains the relevant error message.
3686
+ Returns successfully if the signature is valid. If the signature is invalid, returns an error with the reason for the failure.
3534
3687
 
3535
3688
  - `bytes` are either the bytes of a serialized personal message, or `TransactionData`, Base64-encoded.
3536
3689
  - `signature` is a serialized zkLogin signature, also Base64-encoded.
3537
3690
  - `intentScope` indicates whether `bytes` are to be parsed as a personal message or `TransactionData`.
3538
3691
  - `author` is the signer's address.
3539
3692
  """
3540
- verifyZkLoginSignature(bytes: Base64!, signature: Base64!, intentScope: ZkLoginIntentScope!, author: SuiAddress!): ZkLoginVerifyResult!
3693
+ verifyZkLoginSignature(bytes: Base64!, signature: Base64!, intentScope: ZkLoginIntentScope!, author: SuiAddress!): ZkLoginVerifyResult
3541
3694
  }
3542
3695
 
3543
3696
  """
@@ -3607,6 +3760,54 @@ enum RegulatedState {
3607
3760
  UNREGULATED
3608
3761
  }
3609
3762
 
3763
+ """
3764
+ A Secp256k1 public key.
3765
+ """
3766
+ type Secp256K1PublicKey {
3767
+ """
3768
+ The raw public key bytes.
3769
+ """
3770
+ bytes: Base64
3771
+ }
3772
+
3773
+ """
3774
+ A Secp256k1 signature.
3775
+ """
3776
+ type Secp256K1Signature {
3777
+ """
3778
+ The public key bytes.
3779
+ """
3780
+ publicKey: Base64
3781
+ """
3782
+ The raw signature bytes.
3783
+ """
3784
+ signature: Base64
3785
+ }
3786
+
3787
+ """
3788
+ A Secp256r1 public key.
3789
+ """
3790
+ type Secp256R1PublicKey {
3791
+ """
3792
+ The raw public key bytes.
3793
+ """
3794
+ bytes: Base64
3795
+ }
3796
+
3797
+ """
3798
+ A Secp256r1 signature.
3799
+ """
3800
+ type Secp256R1Signature {
3801
+ """
3802
+ The public key bytes.
3803
+ """
3804
+ publicKey: Base64
3805
+ """
3806
+ The raw signature bytes.
3807
+ """
3808
+ signature: Base64
3809
+ }
3810
+
3610
3811
  type ServiceConfig {
3611
3812
  """
3612
3813
  Range of checkpoints for which data is available for a query type, field and optional filter. If filter is not provided, the strictest retention range for the query and type is returned.
@@ -3771,22 +3972,19 @@ type SharedInput {
3771
3972
  }
3772
3973
 
3773
3974
  """
3774
- The result of simulating a transaction, including the predicted effects and any errors.
3975
+ The structured details of a signature, varying by scheme.
3976
+ """
3977
+ union SignatureScheme = Ed25519Signature | Secp256K1Signature | Secp256R1Signature | MultisigSignature | ZkLoginSignature | PasskeySignature
3978
+
3979
+ """
3980
+ The result of simulating a transaction, including the predicted effects.
3775
3981
  """
3776
3982
  type SimulationResult {
3777
3983
  """
3778
3984
  The predicted effects of the transaction if it were executed.
3779
-
3780
- `None` if the simulation failed due to an error.
3781
3985
  """
3782
3986
  effects: TransactionEffects
3783
3987
  """
3784
- Error message if the simulation failed.
3785
-
3786
- `None` if the simulation was successful.
3787
- """
3788
- error: String
3789
- """
3790
3988
  The intermediate outputs for each command of the transaction simulation, including contents of mutated references and return values.
3791
3989
  """
3792
3990
  outputs: [CommandResult!]
@@ -4198,6 +4396,10 @@ type UpgradeCommand {
4198
4396
  }
4199
4397
 
4200
4398
  type UserSignature {
4399
+ """
4400
+ The structured signature details, parsed by scheme.
4401
+ """
4402
+ scheme: SignatureScheme
4201
4403
  """
4202
4404
  The signature bytes, Base64-encoded.
4203
4405
  For simple signatures: flag || signature || pubkey
@@ -4326,6 +4528,42 @@ type WriteAccumulatorStorageCostTransaction {
4326
4528
  _: Boolean
4327
4529
  }
4328
4530
 
4531
+ """
4532
+ A Base64-encoded claim from the JWT used in zkLogin.
4533
+ """
4534
+ type ZkLoginClaim {
4535
+ """
4536
+ The index mod 4 used for Base64 decoding alignment.
4537
+ """
4538
+ indexMod4: Int
4539
+ """
4540
+ The Base64url-unpadded encoded claim value.
4541
+ """
4542
+ value: String
4543
+ }
4544
+
4545
+ """
4546
+ The zkLogin inputs including proof, claim details, and JWT header.
4547
+ """
4548
+ type ZkLoginInputs {
4549
+ """
4550
+ The address seed as a base10-encoded string.
4551
+ """
4552
+ addressSeed: String
4553
+ """
4554
+ The Base64-encoded JWT header.
4555
+ """
4556
+ headerBase64: String
4557
+ """
4558
+ The Base64-encoded issuer claim details.
4559
+ """
4560
+ issBase64Details: ZkLoginClaim
4561
+ """
4562
+ The zero-knowledge proof points.
4563
+ """
4564
+ proofPoints: ZkLoginProof
4565
+ }
4566
+
4329
4567
  """
4330
4568
  An enum that specifies the intent scope to be used to parse the bytes for signature verification.
4331
4569
  """
@@ -4341,15 +4579,80 @@ enum ZkLoginIntentScope {
4341
4579
  }
4342
4580
 
4343
4581
  """
4344
- The result of the zkLogin signature verification.
4582
+ A JWK (JSON Web Key) identifier.
4345
4583
  """
4346
- type ZkLoginVerifyResult {
4584
+ type ZkLoginJwkId {
4585
+ """
4586
+ The OIDC provider issuer string.
4587
+ """
4588
+ iss: String
4589
+ """
4590
+ The key ID that identifies the JWK.
4591
+ """
4592
+ kid: String
4593
+ }
4594
+
4595
+ """
4596
+ The zero-knowledge proof consisting of three elliptic curve points.
4597
+ """
4598
+ type ZkLoginProof {
4599
+ """
4600
+ G1 point 'a'.
4601
+ """
4602
+ a: CircomG1
4603
+ """
4604
+ G2 point 'b'.
4605
+ """
4606
+ b: CircomG2
4607
+ """
4608
+ G1 point 'c'.
4609
+ """
4610
+ c: CircomG1
4611
+ }
4612
+
4613
+ """
4614
+ A zkLogin public identifier, containing the OAuth issuer and address seed.
4615
+ """
4616
+ type ZkLoginPublicIdentifier {
4617
+ """
4618
+ The address seed as a decimal string.
4619
+ """
4620
+ addressSeed: String
4621
+ """
4622
+ The OAuth provider issuer string (e.g. "https://accounts.google.com").
4623
+ """
4624
+ iss: String
4625
+ }
4626
+
4627
+ type ZkLoginSignature {
4628
+ """
4629
+ The zkLogin inputs including proof, claim details, and JWT header.
4630
+ """
4631
+ inputs: ZkLoginInputs
4347
4632
  """
4348
- The error field capture reasons why the signature could not be verified, assuming the inputs are valid and there are no internal errors.
4633
+ The JWK identifier used to verify the zkLogin proof.
4349
4634
  """
4350
- error: String
4635
+ jwkId: ZkLoginJwkId
4636
+ """
4637
+ The maximum epoch for which this signature is valid.
4638
+ """
4639
+ maxEpoch: UInt53
4640
+ """
4641
+ The public identifier (issuer + address seed) for this zkLogin authenticator.
4642
+ """
4643
+ publicIdentifier: ZkLoginPublicIdentifier
4644
+ """
4645
+ The inner user signature (ed25519/secp256k1/secp256r1).
4646
+ """
4647
+ signature: SignatureScheme
4648
+ }
4649
+
4650
+ """
4651
+ The result of the zkLogin signature verification.
4652
+ """
4653
+ type ZkLoginVerifyResult {
4351
4654
  """
4352
- The boolean result of the verification. If true, errors should be empty.
4655
+ Whether the signature was verified successfully.
4353
4656
  """
4354
4657
  success: Boolean
4355
4658
  }