@mysten/sui 1.11.0 → 1.13.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 (55) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +21 -21
  3. package/dist/cjs/bcs/effects.d.ts +50 -2
  4. package/dist/cjs/bcs/effects.js +13 -1
  5. package/dist/cjs/bcs/effects.js.map +2 -2
  6. package/dist/cjs/bcs/index.d.ts +50 -2
  7. package/dist/cjs/graphql/generated/2024.1/tada-env.d.js.map +1 -1
  8. package/dist/cjs/graphql/generated/2024.4/tada-env.d.js.map +1 -1
  9. package/dist/cjs/graphql/schemas/2024.1/index.d.ts +32 -0
  10. package/dist/cjs/graphql/schemas/2024.4/index.d.ts +63 -1
  11. package/dist/cjs/transactions/json-rpc-resolver.js +1 -1
  12. package/dist/cjs/transactions/json-rpc-resolver.js.map +1 -1
  13. package/dist/cjs/utils/dynamic-fields.d.ts +2 -0
  14. package/dist/cjs/utils/dynamic-fields.js +41 -0
  15. package/dist/cjs/utils/dynamic-fields.js.map +7 -0
  16. package/dist/cjs/utils/index.d.ts +1 -0
  17. package/dist/cjs/utils/index.js +2 -0
  18. package/dist/cjs/utils/index.js.map +2 -2
  19. package/dist/cjs/version.d.ts +2 -2
  20. package/dist/cjs/version.js +2 -2
  21. package/dist/cjs/version.js.map +1 -1
  22. package/dist/esm/bcs/effects.d.ts +50 -2
  23. package/dist/esm/bcs/effects.js +13 -1
  24. package/dist/esm/bcs/effects.js.map +2 -2
  25. package/dist/esm/bcs/index.d.ts +50 -2
  26. package/dist/esm/graphql/schemas/2024.1/index.d.ts +32 -0
  27. package/dist/esm/graphql/schemas/2024.4/index.d.ts +63 -1
  28. package/dist/esm/transactions/json-rpc-resolver.js +1 -1
  29. package/dist/esm/transactions/json-rpc-resolver.js.map +1 -1
  30. package/dist/esm/utils/dynamic-fields.d.ts +2 -0
  31. package/dist/esm/utils/dynamic-fields.js +21 -0
  32. package/dist/esm/utils/dynamic-fields.js.map +7 -0
  33. package/dist/esm/utils/index.d.ts +1 -0
  34. package/dist/esm/utils/index.js +2 -0
  35. package/dist/esm/utils/index.js.map +2 -2
  36. package/dist/esm/version.d.ts +2 -2
  37. package/dist/esm/version.js +2 -2
  38. package/dist/esm/version.js.map +1 -1
  39. package/dist/tsconfig.esm.tsbuildinfo +1 -1
  40. package/dist/tsconfig.tsbuildinfo +1 -1
  41. package/package.json +1 -1
  42. package/src/bcs/effects.ts +12 -0
  43. package/src/graphql/generated/2024.1/schema.graphql +18 -4
  44. package/src/graphql/generated/2024.1/tada-env.d.ts +1 -1
  45. package/src/graphql/generated/2024.4/schema.graphql +33 -5
  46. package/src/graphql/generated/2024.4/tada-env.d.ts +3 -2
  47. package/src/transactions/json-rpc-resolver.ts +1 -1
  48. package/src/utils/dynamic-fields.ts +30 -0
  49. package/src/utils/index.ts +2 -0
  50. package/src/version.ts +2 -2
  51. package/dist/cjs/graphql/generated/2024-01/tada-env.d.js +0 -17
  52. package/dist/cjs/graphql/generated/2024-01/tada-env.d.js.map +0 -7
  53. package/dist/esm/graphql/generated/2024-01/tada-env.d.js +0 -1
  54. package/dist/esm/graphql/generated/2024-01/tada-env.d.js.map +0 -7
  55. package/src/graphql/generated/2024-01/tada-env.d.ts +0 -202
@@ -876,9 +876,10 @@ type DynamicField {
876
876
  """
877
877
  name: MoveValue
878
878
  """
879
- The actual data stored in the dynamic field.
880
- The returned dynamic field is an object if its return type is MoveObject,
881
- in which case it is also accessible off-chain via its address.
879
+ The returned dynamic field is an object if its return type is `MoveObject`,
880
+ in which case it is also accessible off-chain via its address. Its contents
881
+ will be from the latest version that is at most equal to its parent object's
882
+ version
882
883
  """
883
884
  value: DynamicFieldValue
884
885
  }
@@ -3008,6 +3009,10 @@ type ServiceConfig {
3008
3009
  """
3009
3010
  isEnabled(feature: Feature!): Boolean!
3010
3011
  """
3012
+ List the available versions for this GraphQL service.
3013
+ """
3014
+ availableVersions: [String!]!
3015
+ """
3011
3016
  List of all features that are enabled on this GraphQL service.
3012
3017
  """
3013
3018
  enabledFeatures: [Feature!]!
@@ -3046,7 +3051,14 @@ type ServiceConfig {
3046
3051
  """
3047
3052
  maxPageSize: Int!
3048
3053
  """
3049
- Maximum time in milliseconds that will be spent to serve one request.
3054
+ Maximum time in milliseconds spent waiting for a response from fullnode after issuing a
3055
+ a transaction to execute. Note that the transaction may still succeed even in the case of a
3056
+ timeout. Transactions are idempotent, so a transaction that times out should be resubmitted
3057
+ until the network returns a definite response (success or failure, not timeout).
3058
+ """
3059
+ mutationTimeoutMs: Int!
3060
+ """
3061
+ Maximum time in milliseconds that will be spent to serve one query request.
3050
3062
  """
3051
3063
  requestTimeoutMs: Int!
3052
3064
  """
@@ -3700,6 +3712,8 @@ type TransactionBlockEffects {
3700
3712
  lamportVersion: Int!
3701
3713
  """
3702
3714
  The reason for a transaction failure, if it did fail.
3715
+ If the error is a Move abort, the error message will be resolved to a human-readable form if
3716
+ possible, otherwise it will fall back to displaying the abort code and location.
3703
3717
  """
3704
3718
  errors: String
3705
3719
  """
@@ -146,7 +146,7 @@ export type introspection = {
146
146
  'Receiving': { kind: 'OBJECT'; name: 'Receiving'; fields: { 'address': { name: 'address'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'SuiAddress'; ofType: null; }; } }; 'digest': { name: 'digest'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'object': { name: 'object'; type: { kind: 'OBJECT'; name: 'Object'; ofType: null; } }; 'version': { name: 'version'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; }; };
147
147
  'Result': { kind: 'OBJECT'; name: 'Result'; fields: { 'cmd': { name: 'cmd'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'ix': { name: 'ix'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; }; };
148
148
  'SafeMode': { kind: 'OBJECT'; name: 'SafeMode'; fields: { 'enabled': { name: 'enabled'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; } }; 'gasSummary': { name: 'gasSummary'; type: { kind: 'OBJECT'; name: 'GasCostSummary'; ofType: null; } }; }; };
149
- 'ServiceConfig': { kind: 'OBJECT'; name: 'ServiceConfig'; fields: { 'defaultPageSize': { name: 'defaultPageSize'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'enabledFeatures': { name: 'enabledFeatures'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'ENUM'; name: 'Feature'; ofType: null; }; }; }; } }; 'isEnabled': { name: 'isEnabled'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'maxDbQueryCost': { name: 'maxDbQueryCost'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; } }; 'maxMoveValueDepth': { name: 'maxMoveValueDepth'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'maxOutputNodes': { name: 'maxOutputNodes'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'maxPageSize': { name: 'maxPageSize'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'maxQueryDepth': { name: 'maxQueryDepth'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'maxQueryNodes': { name: 'maxQueryNodes'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'maxQueryPayloadSize': { name: 'maxQueryPayloadSize'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'maxTypeArgumentDepth': { name: 'maxTypeArgumentDepth'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'maxTypeArgumentWidth': { name: 'maxTypeArgumentWidth'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'maxTypeNodes': { name: 'maxTypeNodes'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'requestTimeoutMs': { name: 'requestTimeoutMs'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; }; };
149
+ 'ServiceConfig': { kind: 'OBJECT'; name: 'ServiceConfig'; fields: { 'availableVersions': { name: 'availableVersions'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; }; } }; 'defaultPageSize': { name: 'defaultPageSize'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'enabledFeatures': { name: 'enabledFeatures'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'ENUM'; name: 'Feature'; ofType: null; }; }; }; } }; 'isEnabled': { name: 'isEnabled'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'maxDbQueryCost': { name: 'maxDbQueryCost'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; } }; 'maxMoveValueDepth': { name: 'maxMoveValueDepth'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'maxOutputNodes': { name: 'maxOutputNodes'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'maxPageSize': { name: 'maxPageSize'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'maxQueryDepth': { name: 'maxQueryDepth'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'maxQueryNodes': { name: 'maxQueryNodes'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'maxQueryPayloadSize': { name: 'maxQueryPayloadSize'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'maxTypeArgumentDepth': { name: 'maxTypeArgumentDepth'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'maxTypeArgumentWidth': { name: 'maxTypeArgumentWidth'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'maxTypeNodes': { name: 'maxTypeNodes'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'mutationTimeoutMs': { name: 'mutationTimeoutMs'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'requestTimeoutMs': { name: 'requestTimeoutMs'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; }; };
150
150
  'Shared': { kind: 'OBJECT'; name: 'Shared'; fields: { 'initialSharedVersion': { name: 'initialSharedVersion'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; }; };
151
151
  'SharedInput': { kind: 'OBJECT'; name: 'SharedInput'; fields: { 'address': { name: 'address'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'SuiAddress'; ofType: null; }; } }; 'initialSharedVersion': { name: 'initialSharedVersion'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'mutable': { name: 'mutable'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; }; };
152
152
  'SharedObjectDelete': { kind: 'OBJECT'; name: 'SharedObjectDelete'; fields: { 'address': { name: 'address'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'SuiAddress'; ofType: null; }; } }; 'mutable': { name: 'mutable'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'version': { name: 'version'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; }; };
@@ -881,9 +881,10 @@ type DynamicField {
881
881
  """
882
882
  name: MoveValue
883
883
  """
884
- The actual data stored in the dynamic field.
885
- The returned dynamic field is an object if its return type is MoveObject,
886
- in which case it is also accessible off-chain via its address.
884
+ The returned dynamic field is an object if its return type is `MoveObject`,
885
+ in which case it is also accessible off-chain via its address. Its contents
886
+ will be from the latest version that is at most equal to its parent object's
887
+ version
887
888
  """
888
889
  value: DynamicFieldValue
889
890
  }
@@ -3013,6 +3014,10 @@ type ServiceConfig {
3013
3014
  """
3014
3015
  isEnabled(feature: Feature!): Boolean!
3015
3016
  """
3017
+ List the available versions for this GraphQL service.
3018
+ """
3019
+ availableVersions: [String!]!
3020
+ """
3016
3021
  List of all features that are enabled on this GraphQL service.
3017
3022
  """
3018
3023
  enabledFeatures: [Feature!]!
@@ -3051,7 +3056,14 @@ type ServiceConfig {
3051
3056
  """
3052
3057
  maxPageSize: Int!
3053
3058
  """
3054
- Maximum time in milliseconds that will be spent to serve one request.
3059
+ Maximum time in milliseconds spent waiting for a response from fullnode after issuing a
3060
+ a transaction to execute. Note that the transaction may still succeed even in the case of a
3061
+ timeout. Transactions are idempotent, so a transaction that times out should be resubmitted
3062
+ until the network returns a definite response (success or failure, not timeout).
3063
+ """
3064
+ mutationTimeoutMs: Int!
3065
+ """
3066
+ Maximum time in milliseconds that will be spent to serve one query request.
3055
3067
  """
3056
3068
  requestTimeoutMs: Int!
3057
3069
  """
@@ -3105,6 +3117,20 @@ type SharedInput {
3105
3117
  mutable: Boolean!
3106
3118
  }
3107
3119
 
3120
+ """
3121
+ The transaction accpeted a shared object as input, but its execution was cancelled.
3122
+ """
3123
+ type SharedObjectCancelled {
3124
+ """
3125
+ ID of the shared object.
3126
+ """
3127
+ address: SuiAddress!
3128
+ """
3129
+ The assigned shared object version. It is a special version indicating transaction cancellation reason.
3130
+ """
3131
+ version: Int!
3132
+ }
3133
+
3108
3134
  """
3109
3135
  The transaction accepted a shared object as input, but it was deleted before the transaction
3110
3136
  executed.
@@ -3705,6 +3731,8 @@ type TransactionBlockEffects {
3705
3731
  lamportVersion: Int!
3706
3732
  """
3707
3733
  The reason for a transaction failure, if it did fail.
3734
+ If the error is a Move abort, the error message will be resolved to a human-readable form if
3735
+ possible, otherwise it will fall back to displaying the abort code and location.
3708
3736
  """
3709
3737
  errors: String
3710
3738
  """
@@ -3871,7 +3899,7 @@ This information is considered part of the effects, because although the transac
3871
3899
  the shared object as input, consensus must schedule it and pick the version that is actually
3872
3900
  used.
3873
3901
  """
3874
- union UnchangedSharedObject = SharedObjectRead | SharedObjectDelete
3902
+ union UnchangedSharedObject = SharedObjectRead | SharedObjectDelete | SharedObjectCancelled
3875
3903
 
3876
3904
  type UnchangedSharedObjectConnection {
3877
3905
  """
@@ -147,9 +147,10 @@ export type introspection = {
147
147
  'Receiving': { kind: 'OBJECT'; name: 'Receiving'; fields: { 'address': { name: 'address'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'SuiAddress'; ofType: null; }; } }; 'digest': { name: 'digest'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'object': { name: 'object'; type: { kind: 'OBJECT'; name: 'Object'; ofType: null; } }; 'version': { name: 'version'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; }; };
148
148
  'Result': { kind: 'OBJECT'; name: 'Result'; fields: { 'cmd': { name: 'cmd'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'ix': { name: 'ix'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; }; };
149
149
  'SafeMode': { kind: 'OBJECT'; name: 'SafeMode'; fields: { 'enabled': { name: 'enabled'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; } }; 'gasSummary': { name: 'gasSummary'; type: { kind: 'OBJECT'; name: 'GasCostSummary'; ofType: null; } }; }; };
150
- 'ServiceConfig': { kind: 'OBJECT'; name: 'ServiceConfig'; fields: { 'defaultPageSize': { name: 'defaultPageSize'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'enabledFeatures': { name: 'enabledFeatures'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'ENUM'; name: 'Feature'; ofType: null; }; }; }; } }; 'isEnabled': { name: 'isEnabled'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'maxDbQueryCost': { name: 'maxDbQueryCost'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; } }; 'maxMoveValueDepth': { name: 'maxMoveValueDepth'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'maxOutputNodes': { name: 'maxOutputNodes'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'maxPageSize': { name: 'maxPageSize'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'maxQueryDepth': { name: 'maxQueryDepth'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'maxQueryNodes': { name: 'maxQueryNodes'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'maxQueryPayloadSize': { name: 'maxQueryPayloadSize'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'maxTypeArgumentDepth': { name: 'maxTypeArgumentDepth'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'maxTypeArgumentWidth': { name: 'maxTypeArgumentWidth'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'maxTypeNodes': { name: 'maxTypeNodes'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'requestTimeoutMs': { name: 'requestTimeoutMs'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; }; };
150
+ 'ServiceConfig': { kind: 'OBJECT'; name: 'ServiceConfig'; fields: { 'availableVersions': { name: 'availableVersions'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; }; } }; 'defaultPageSize': { name: 'defaultPageSize'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'enabledFeatures': { name: 'enabledFeatures'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'ENUM'; name: 'Feature'; ofType: null; }; }; }; } }; 'isEnabled': { name: 'isEnabled'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'maxDbQueryCost': { name: 'maxDbQueryCost'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; } }; 'maxMoveValueDepth': { name: 'maxMoveValueDepth'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'maxOutputNodes': { name: 'maxOutputNodes'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'maxPageSize': { name: 'maxPageSize'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'maxQueryDepth': { name: 'maxQueryDepth'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'maxQueryNodes': { name: 'maxQueryNodes'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'maxQueryPayloadSize': { name: 'maxQueryPayloadSize'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'maxTypeArgumentDepth': { name: 'maxTypeArgumentDepth'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'maxTypeArgumentWidth': { name: 'maxTypeArgumentWidth'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'maxTypeNodes': { name: 'maxTypeNodes'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'mutationTimeoutMs': { name: 'mutationTimeoutMs'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'requestTimeoutMs': { name: 'requestTimeoutMs'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; }; };
151
151
  'Shared': { kind: 'OBJECT'; name: 'Shared'; fields: { 'initialSharedVersion': { name: 'initialSharedVersion'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; }; };
152
152
  'SharedInput': { kind: 'OBJECT'; name: 'SharedInput'; fields: { 'address': { name: 'address'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'SuiAddress'; ofType: null; }; } }; 'initialSharedVersion': { name: 'initialSharedVersion'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'mutable': { name: 'mutable'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; }; };
153
+ 'SharedObjectCancelled': { kind: 'OBJECT'; name: 'SharedObjectCancelled'; fields: { 'address': { name: 'address'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'SuiAddress'; ofType: null; }; } }; 'version': { name: 'version'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; }; };
153
154
  'SharedObjectDelete': { kind: 'OBJECT'; name: 'SharedObjectDelete'; fields: { 'address': { name: 'address'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'SuiAddress'; ofType: null; }; } }; 'mutable': { name: 'mutable'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'version': { name: 'version'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; }; };
154
155
  'SharedObjectRead': { kind: 'OBJECT'; name: 'SharedObjectRead'; fields: { 'address': { name: 'address'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'SuiAddress'; ofType: null; }; } }; 'digest': { name: 'digest'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'object': { name: 'object'; type: { kind: 'OBJECT'; name: 'Object'; ofType: null; } }; 'version': { name: 'version'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; }; };
155
156
  'SplitCoinsTransaction': { kind: 'OBJECT'; name: 'SplitCoinsTransaction'; fields: { 'amounts': { name: 'amounts'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'TransactionArgument'; ofType: null; }; }; }; } }; 'coin': { name: 'coin'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'TransactionArgument'; ofType: null; }; } }; }; };
@@ -179,7 +180,7 @@ export type introspection = {
179
180
  'TransactionMetadata': { kind: 'INPUT_OBJECT'; name: 'TransactionMetadata'; isOneOf: false; inputFields: [{ name: 'sender'; type: { kind: 'SCALAR'; name: 'SuiAddress'; ofType: null; }; defaultValue: null }, { name: 'gasPrice'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'gasObjects'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'ObjectRef'; ofType: null; }; }; }; defaultValue: null }, { name: 'gasBudget'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'gasSponsor'; type: { kind: 'SCALAR'; name: 'SuiAddress'; ofType: null; }; defaultValue: null }]; };
180
181
  'TransferObjectsTransaction': { kind: 'OBJECT'; name: 'TransferObjectsTransaction'; fields: { 'address': { name: 'address'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'TransactionArgument'; ofType: null; }; } }; 'inputs': { name: 'inputs'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'TransactionArgument'; ofType: null; }; }; }; } }; }; };
181
182
  'TypeOrigin': { kind: 'OBJECT'; name: 'TypeOrigin'; fields: { 'definingId': { name: 'definingId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'SuiAddress'; ofType: null; }; } }; 'module': { name: 'module'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'struct': { name: 'struct'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; }; };
182
- 'UnchangedSharedObject': { kind: 'UNION'; name: 'UnchangedSharedObject'; fields: {}; possibleTypes: 'SharedObjectDelete' | 'SharedObjectRead'; };
183
+ 'UnchangedSharedObject': { kind: 'UNION'; name: 'UnchangedSharedObject'; fields: {}; possibleTypes: 'SharedObjectCancelled' | 'SharedObjectDelete' | 'SharedObjectRead'; };
183
184
  'UnchangedSharedObjectConnection': { kind: 'OBJECT'; name: 'UnchangedSharedObjectConnection'; fields: { 'edges': { name: 'edges'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'UnchangedSharedObjectEdge'; ofType: null; }; }; }; } }; 'nodes': { name: 'nodes'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'UnchangedSharedObject'; ofType: null; }; }; }; } }; 'pageInfo': { name: 'pageInfo'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PageInfo'; ofType: null; }; } }; }; };
184
185
  'UnchangedSharedObjectEdge': { kind: 'OBJECT'; name: 'UnchangedSharedObjectEdge'; fields: { 'cursor': { name: 'cursor'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'node': { name: 'node'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'UnchangedSharedObject'; ofType: null; }; } }; }; };
185
186
  'UpgradeTransaction': { kind: 'OBJECT'; name: 'UpgradeTransaction'; fields: { 'currentPackage': { name: 'currentPackage'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'SuiAddress'; ofType: null; }; } }; 'dependencies': { name: 'dependencies'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'SuiAddress'; ofType: null; }; }; }; } }; 'modules': { name: 'modules'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Base64'; ofType: null; }; }; }; } }; 'upgradeTicket': { name: 'upgradeTicket'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'TransactionArgument'; ofType: null; }; } }; }; };
@@ -473,7 +473,7 @@ function isReceivingType(type: OpenMoveTypeSignature): boolean {
473
473
  export function getClient(options: BuildTransactionOptions): SuiClient {
474
474
  if (!options.client) {
475
475
  throw new Error(
476
- `No provider passed to Transaction#build, but transaction data was not sufficient to build offline.`,
476
+ `No sui client passed to Transaction#build, but transaction data was not sufficient to build offline.`,
477
477
  );
478
478
  }
479
479
 
@@ -0,0 +1,30 @@
1
+ // Copyright (c) Mysten Labs, Inc.
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
4
+ import { toHex } from '@mysten/bcs';
5
+ import { blake2b } from '@noble/hashes/blake2b';
6
+
7
+ import type { TypeTag } from '../bcs/bcs.js';
8
+ import { bcs } from '../bcs/index.js';
9
+
10
+ export function deriveDynamicFieldID(
11
+ parentId: string,
12
+ typeTag: typeof TypeTag.$inferInput,
13
+ key: Uint8Array,
14
+ ) {
15
+ const address = bcs.Address.serialize(parentId).toBytes();
16
+ const tag = bcs.TypeTag.serialize(typeTag).toBytes();
17
+ const keyLength = bcs.u64().serialize(key.length).toBytes();
18
+
19
+ const hash = blake2b.create({
20
+ dkLen: 32,
21
+ });
22
+
23
+ hash.update(new Uint8Array([0xf0]));
24
+ hash.update(address);
25
+ hash.update(keyLength);
26
+ hash.update(key);
27
+ hash.update(tag);
28
+
29
+ return `0x${toHex(hash.digest().slice(0, 32))}`;
30
+ }
@@ -40,3 +40,5 @@ export {
40
40
  } from './constants.js';
41
41
 
42
42
  export { isValidNamedPackage, isValidNamedType } from './move-registry.js';
43
+
44
+ export { deriveDynamicFieldID } from './dynamic-fields.js';
package/src/version.ts CHANGED
@@ -3,5 +3,5 @@
3
3
 
4
4
  // This file is generated by genversion.mjs. Do not edit it directly.
5
5
 
6
- export const PACKAGE_VERSION = '1.11.0';
7
- export const TARGETED_RPC_VERSION = '1.35.0';
6
+ export const PACKAGE_VERSION = '1.13.0';
7
+ export const TARGETED_RPC_VERSION = '1.36.0';
@@ -1,17 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __copyProps = (to, from, except, desc) => {
7
- if (from && typeof from === "object" || typeof from === "function") {
8
- for (let key of __getOwnPropNames(from))
9
- if (!__hasOwnProp.call(to, key) && key !== except)
10
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
- }
12
- return to;
13
- };
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
- var tada_env_d_exports = {};
16
- module.exports = __toCommonJS(tada_env_d_exports);
17
- //# sourceMappingURL=tada-env.d.js.map