sui-effect 0.1.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 (115) hide show
  1. package/AGENTS.md +209 -0
  2. package/LICENSE +21 -0
  3. package/LLMS.md +6707 -0
  4. package/README.md +300 -0
  5. package/dist/domain/bcs.d.ts +101 -0
  6. package/dist/domain/bcs.d.ts.map +1 -0
  7. package/dist/domain/bcs.js +183 -0
  8. package/dist/domain/bcs.js.map +1 -0
  9. package/dist/domain/errors.d.ts +595 -0
  10. package/dist/domain/errors.d.ts.map +1 -0
  11. package/dist/domain/errors.js +476 -0
  12. package/dist/domain/errors.js.map +1 -0
  13. package/dist/domain/executed.d.ts +325 -0
  14. package/dist/domain/executed.d.ts.map +1 -0
  15. package/dist/domain/executed.js +253 -0
  16. package/dist/domain/executed.js.map +1 -0
  17. package/dist/domain/journal-entry.d.ts +468 -0
  18. package/dist/domain/journal-entry.d.ts.map +1 -0
  19. package/dist/domain/journal-entry.js +63 -0
  20. package/dist/domain/journal-entry.js.map +1 -0
  21. package/dist/domain/schemas.d.ts +950 -0
  22. package/dist/domain/schemas.d.ts.map +1 -0
  23. package/dist/domain/schemas.js +571 -0
  24. package/dist/domain/schemas.js.map +1 -0
  25. package/dist/domain/sui-schema.d.ts +12 -0
  26. package/dist/domain/sui-schema.d.ts.map +1 -0
  27. package/dist/domain/sui-schema.js +12 -0
  28. package/dist/domain/sui-schema.js.map +1 -0
  29. package/dist/extension.d.ts +7 -0
  30. package/dist/extension.d.ts.map +1 -0
  31. package/dist/extension.js +7 -0
  32. package/dist/extension.js.map +1 -0
  33. package/dist/index.d.ts +31 -0
  34. package/dist/index.d.ts.map +1 -0
  35. package/dist/index.js +31 -0
  36. package/dist/index.js.map +1 -0
  37. package/dist/internal.d.ts +18 -0
  38. package/dist/internal.d.ts.map +1 -0
  39. package/dist/internal.js +18 -0
  40. package/dist/internal.js.map +1 -0
  41. package/dist/journal.d.ts +51 -0
  42. package/dist/journal.d.ts.map +1 -0
  43. package/dist/journal.js +18 -0
  44. package/dist/journal.js.map +1 -0
  45. package/dist/script.d.ts +7 -0
  46. package/dist/script.d.ts.map +1 -0
  47. package/dist/script.js +7 -0
  48. package/dist/script.js.map +1 -0
  49. package/dist/services/Journal.d.ts +76 -0
  50. package/dist/services/Journal.d.ts.map +1 -0
  51. package/dist/services/Journal.js +70 -0
  52. package/dist/services/Journal.js.map +1 -0
  53. package/dist/services/JournalKeyValueStore.d.ts +73 -0
  54. package/dist/services/JournalKeyValueStore.d.ts.map +1 -0
  55. package/dist/services/JournalKeyValueStore.js +155 -0
  56. package/dist/services/JournalKeyValueStore.js.map +1 -0
  57. package/dist/services/Script.d.ts +210 -0
  58. package/dist/services/Script.d.ts.map +1 -0
  59. package/dist/services/Script.js +441 -0
  60. package/dist/services/Script.js.map +1 -0
  61. package/dist/services/Signer.d.ts +132 -0
  62. package/dist/services/Signer.d.ts.map +1 -0
  63. package/dist/services/Signer.js +158 -0
  64. package/dist/services/Signer.js.map +1 -0
  65. package/dist/services/SubmitConfig.d.ts +175 -0
  66. package/dist/services/SubmitConfig.d.ts.map +1 -0
  67. package/dist/services/SubmitConfig.js +52 -0
  68. package/dist/services/SubmitConfig.js.map +1 -0
  69. package/dist/services/Sui.d.ts +295 -0
  70. package/dist/services/Sui.d.ts.map +1 -0
  71. package/dist/services/Sui.js +414 -0
  72. package/dist/services/Sui.js.map +1 -0
  73. package/dist/services/SuiCore.d.ts +227 -0
  74. package/dist/services/SuiCore.d.ts.map +1 -0
  75. package/dist/services/SuiCore.js +400 -0
  76. package/dist/services/SuiCore.js.map +1 -0
  77. package/dist/services/SuiCoreFake.d.ts +278 -0
  78. package/dist/services/SuiCoreFake.d.ts.map +1 -0
  79. package/dist/services/SuiCoreFake.js +1003 -0
  80. package/dist/services/SuiCoreFake.js.map +1 -0
  81. package/dist/services/SuiExtension.d.ts +208 -0
  82. package/dist/services/SuiExtension.d.ts.map +1 -0
  83. package/dist/services/SuiExtension.js +355 -0
  84. package/dist/services/SuiExtension.js.map +1 -0
  85. package/dist/services/SuiGraphQL.d.ts +98 -0
  86. package/dist/services/SuiGraphQL.d.ts.map +1 -0
  87. package/dist/services/SuiGraphQL.js +118 -0
  88. package/dist/services/SuiGraphQL.js.map +1 -0
  89. package/dist/services/Tx.d.ts +687 -0
  90. package/dist/services/Tx.d.ts.map +1 -0
  91. package/dist/services/Tx.js +1224 -0
  92. package/dist/services/Tx.js.map +1 -0
  93. package/dist/testing.d.ts +88 -0
  94. package/dist/testing.d.ts.map +1 -0
  95. package/dist/testing.js +163 -0
  96. package/dist/testing.js.map +1 -0
  97. package/dist/tx.d.ts +24 -0
  98. package/dist/tx.d.ts.map +1 -0
  99. package/dist/tx.js +24 -0
  100. package/dist/tx.js.map +1 -0
  101. package/docs/extensions.md +1685 -0
  102. package/examples/extension-template/README.md +170 -0
  103. package/examples/extension-template/package.json +44 -0
  104. package/examples/extension-template/scripts/check-package.ts +145 -0
  105. package/examples/extension-template/src/Escrow.ts +445 -0
  106. package/examples/extension-template/src/Platform.ts +136 -0
  107. package/examples/extension-template/src/errors.ts +61 -0
  108. package/examples/extension-template/src/extension.ts +63 -0
  109. package/examples/extension-template/src/index.ts +34 -0
  110. package/examples/extension-template/src/schema.ts +158 -0
  111. package/examples/extension-template/src/upstream.ts +66 -0
  112. package/examples/extension-template/test/escrow.test.ts +559 -0
  113. package/examples/extension-template/tsconfig.build.json +26 -0
  114. package/examples/extension-template/tsconfig.json +35 -0
  115. package/package.json +87 -0
@@ -0,0 +1,950 @@
1
+ /**
2
+ * Branded schemas and the transport-neutral object model.
3
+ *
4
+ * Every schema here decodes from the shape `@mysten/sui` returns, so a raw SDK
5
+ * response can be validated at the boundary with one `Schema.decodeUnknownEffect`
6
+ * call. Names mirror the SDK names they model.
7
+ *
8
+ * @since 0.1.0
9
+ */
10
+ import type { SuiClientTypes } from "@mysten/sui/client";
11
+ import { Schema } from "effect";
12
+ /**
13
+ * A 32-byte Sui account address, normalized to the padded lowercase `0x` form on
14
+ * decode. Rejects anything `isValidSuiAddress` rejects with a `SchemaError`.
15
+ */
16
+ export declare const SuiAddress: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "SuiAddress">;
17
+ export type SuiAddress = typeof SuiAddress.Type;
18
+ /**
19
+ * A 32-byte object id. Same encoding rules as {@link SuiAddress}; the brand is
20
+ * separate so an address cannot be passed where an object id is expected.
21
+ */
22
+ export declare const ObjectId: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "ObjectId">;
23
+ export type ObjectId = typeof ObjectId.Type;
24
+ /** A base58 transaction digest. Not normalized; rejected when not 32 bytes. */
25
+ export declare const Digest: Schema.brand<Schema.String, "Digest">;
26
+ export type Digest = typeof Digest.Type;
27
+ /**
28
+ * A fully qualified Move struct tag, normalized with `normalizeStructTag` on
29
+ * decode so `0x2::sui::SUI` and its padded form compare equal.
30
+ */
31
+ export declare const StructTag: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "StructTag">;
32
+ export type StructTag = typeof StructTag.Type;
33
+ /** A coin type: a struct tag used as the type argument of `0x2::coin::Coin`. */
34
+ export declare const CoinType: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "CoinType">;
35
+ export type CoinType = typeof CoinType.Type;
36
+ /**
37
+ * The `type` field of an object envelope. Almost always a struct tag, but gRPC
38
+ * reports the literal `package` for a Move package object (`grpc/core.mjs`
39
+ * leaves `objectType` untouched when it has no `::`), and a package is a
40
+ * readable object like any other.
41
+ */
42
+ export declare const ObjectType: Schema.Union<readonly [Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "StructTag">, Schema.Literal<"package">]>;
43
+ export type ObjectType = typeof ObjectType.Type;
44
+ /** An amount in MIST. Encoded as the decimal string every SDK response uses. */
45
+ export declare const Mist: Schema.brand<Schema.BigIntFromString, "Mist">;
46
+ export type Mist = typeof Mist.Type;
47
+ /** A Move object version. Encoded as the decimal string the SDK returns. */
48
+ export declare const Version: Schema.brand<Schema.BigIntFromString, "Version">;
49
+ export type Version = typeof Version.Type;
50
+ /** The network a client is pointed at. Mirrors `SuiClientTypes.Network`. */
51
+ export declare const Network: Schema.brand<Schema.String, "Network">;
52
+ export type Network = typeof Network.Type;
53
+ /** The four networks with a built-in default gRPC endpoint. */
54
+ export declare const KnownNetwork: Schema.Literals<readonly ["mainnet", "testnet", "devnet", "localnet"]>;
55
+ export type KnownNetwork = typeof KnownNetwork.Type;
56
+ /**
57
+ * The genesis checkpoint digest of each public network whose chain identifier
58
+ * is fixed and known. These are the digests observed on the live networks
59
+ * (`getChainIdentifier` returns the genesis checkpoint digest); the SDK ships
60
+ * no such table. `devnet` and `localnet` are regenerated, so they are absent
61
+ * and `Sui.layerNoDeps` records whatever the node reports instead of asserting.
62
+ */
63
+ export declare const KNOWN_CHAIN_IDS: Readonly<Record<string, string>>;
64
+ /**
65
+ * An object owner. Mirrors `SuiClientTypes.ObjectOwner` exactly, including its
66
+ * `$kind` discriminant, so `Owner.match` and the SDK's own narrowing agree.
67
+ */
68
+ export declare const Owner: Schema.toTaggedUnion<"$kind", readonly [Schema.Struct<{
69
+ readonly $kind: Schema.Literal<"AddressOwner">;
70
+ readonly AddressOwner: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "SuiAddress">;
71
+ }>, Schema.Struct<{
72
+ readonly $kind: Schema.Literal<"ObjectOwner">;
73
+ readonly ObjectOwner: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "ObjectId">;
74
+ }>, Schema.Struct<{
75
+ readonly $kind: Schema.Literal<"Shared">;
76
+ readonly Shared: Schema.Struct<{
77
+ readonly initialSharedVersion: Schema.brand<Schema.BigIntFromString, "Version">;
78
+ }>;
79
+ }>, Schema.Struct<{
80
+ readonly $kind: Schema.Literal<"Immutable">;
81
+ readonly Immutable: Schema.Literal<true>;
82
+ }>, Schema.Struct<{
83
+ readonly $kind: Schema.Literal<"ConsensusAddressOwner">;
84
+ readonly ConsensusAddressOwner: Schema.Struct<{
85
+ readonly startVersion: Schema.brand<Schema.BigIntFromString, "Version">;
86
+ readonly owner: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "SuiAddress">;
87
+ }>;
88
+ }>, Schema.Struct<{
89
+ readonly $kind: Schema.Literal<"Unknown">;
90
+ }>]>;
91
+ export type Owner = typeof Owner.Type;
92
+ /**
93
+ * Everything the transaction builder needs to consume an object again, plus the
94
+ * type and owner so a caller can tell a shared object from an owned one.
95
+ */
96
+ export declare const ObjectRef: Schema.Struct<{
97
+ readonly id: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "ObjectId">;
98
+ readonly type: Schema.Union<readonly [Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "StructTag">, Schema.Literal<"package">]>;
99
+ readonly version: Schema.brand<Schema.BigIntFromString, "Version">;
100
+ readonly digest: Schema.String;
101
+ readonly owner: Schema.toTaggedUnion<"$kind", readonly [Schema.Struct<{
102
+ readonly $kind: Schema.Literal<"AddressOwner">;
103
+ readonly AddressOwner: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "SuiAddress">;
104
+ }>, Schema.Struct<{
105
+ readonly $kind: Schema.Literal<"ObjectOwner">;
106
+ readonly ObjectOwner: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "ObjectId">;
107
+ }>, Schema.Struct<{
108
+ readonly $kind: Schema.Literal<"Shared">;
109
+ readonly Shared: Schema.Struct<{
110
+ readonly initialSharedVersion: Schema.brand<Schema.BigIntFromString, "Version">;
111
+ }>;
112
+ }>, Schema.Struct<{
113
+ readonly $kind: Schema.Literal<"Immutable">;
114
+ readonly Immutable: Schema.Literal<true>;
115
+ }>, Schema.Struct<{
116
+ readonly $kind: Schema.Literal<"ConsensusAddressOwner">;
117
+ readonly ConsensusAddressOwner: Schema.Struct<{
118
+ readonly startVersion: Schema.brand<Schema.BigIntFromString, "Version">;
119
+ readonly owner: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "SuiAddress">;
120
+ }>;
121
+ }>, Schema.Struct<{
122
+ readonly $kind: Schema.Literal<"Unknown">;
123
+ }>]>;
124
+ }>;
125
+ export type ObjectRef = typeof ObjectRef.Type;
126
+ /** A coin balance for one coin type. Mirrors `SuiClientTypes.Balance`. */
127
+ export declare const Balance: Schema.Struct<{
128
+ readonly coinType: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "CoinType">;
129
+ readonly balance: Schema.brand<Schema.BigIntFromString, "Mist">;
130
+ readonly coinBalance: Schema.brand<Schema.BigIntFromString, "Mist">;
131
+ readonly addressBalance: Schema.brand<Schema.BigIntFromString, "Mist">;
132
+ }>;
133
+ export type Balance = typeof Balance.Type;
134
+ /** The BCS-encoded name of a dynamic field. Mirrors `SuiClientTypes.DynamicFieldName`. */
135
+ export declare const DynamicFieldName: Schema.Struct<{
136
+ readonly type: Schema.String;
137
+ readonly bcs: Schema.Uint8Array;
138
+ }>;
139
+ export type DynamicFieldName = typeof DynamicFieldName.Type;
140
+ /** One entry of a dynamic-field listing. Mirrors `SuiClientTypes.DynamicFieldEntry`. */
141
+ export declare const DynamicFieldEntry: Schema.Struct<{
142
+ readonly fieldId: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "ObjectId">;
143
+ readonly type: Schema.String;
144
+ readonly name: Schema.Struct<{
145
+ readonly type: Schema.String;
146
+ readonly bcs: Schema.Uint8Array;
147
+ }>;
148
+ readonly valueType: Schema.String;
149
+ readonly $kind: Schema.Literals<readonly ["DynamicField", "DynamicObject"]>;
150
+ readonly childId: Schema.optional<Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "ObjectId">>;
151
+ }>;
152
+ export type DynamicFieldEntry = typeof DynamicFieldEntry.Type;
153
+ /** A dynamic field with its value. Mirrors `SuiClientTypes.DynamicField`. */
154
+ export declare const DynamicField: Schema.Struct<{
155
+ readonly fieldId: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "ObjectId">;
156
+ readonly type: Schema.String;
157
+ readonly name: Schema.Struct<{
158
+ readonly type: Schema.String;
159
+ readonly bcs: Schema.Uint8Array;
160
+ }>;
161
+ readonly valueType: Schema.String;
162
+ readonly $kind: Schema.Literals<readonly ["DynamicField", "DynamicObject"]>;
163
+ readonly childId: Schema.optional<Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "ObjectId">>;
164
+ readonly value: Schema.Struct<{
165
+ readonly type: Schema.String;
166
+ readonly bcs: Schema.Uint8Array;
167
+ }>;
168
+ readonly version: Schema.brand<Schema.BigIntFromString, "Version">;
169
+ readonly digest: Schema.String;
170
+ }>;
171
+ export type DynamicField = typeof DynamicField.Type;
172
+ /** Gas cost breakdown. Mirrors `SuiClientTypes.GasCostSummary`. */
173
+ export declare const GasCostSummary: Schema.Struct<{
174
+ readonly computationCost: Schema.brand<Schema.BigIntFromString, "Mist">;
175
+ readonly storageCost: Schema.brand<Schema.BigIntFromString, "Mist">;
176
+ readonly storageRebate: Schema.brand<Schema.BigIntFromString, "Mist">;
177
+ readonly nonRefundableStorageFee: Schema.brand<Schema.BigIntFromString, "Mist">;
178
+ }>;
179
+ export type GasCostSummary = typeof GasCostSummary.Type;
180
+ /** One object touched by a transaction. Mirrors `SuiClientTypes.ChangedObject`. */
181
+ export declare const ChangedObject: Schema.Struct<{
182
+ readonly objectId: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "ObjectId">;
183
+ readonly inputState: Schema.Literals<readonly ["Unknown", "DoesNotExist", "Exists"]>;
184
+ readonly inputVersion: Schema.NullOr<Schema.brand<Schema.BigIntFromString, "Version">>;
185
+ readonly inputDigest: Schema.NullOr<Schema.String>;
186
+ readonly inputOwner: Schema.NullOr<Schema.toTaggedUnion<"$kind", readonly [Schema.Struct<{
187
+ readonly $kind: Schema.Literal<"AddressOwner">;
188
+ readonly AddressOwner: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "SuiAddress">;
189
+ }>, Schema.Struct<{
190
+ readonly $kind: Schema.Literal<"ObjectOwner">;
191
+ readonly ObjectOwner: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "ObjectId">;
192
+ }>, Schema.Struct<{
193
+ readonly $kind: Schema.Literal<"Shared">;
194
+ readonly Shared: Schema.Struct<{
195
+ readonly initialSharedVersion: Schema.brand<Schema.BigIntFromString, "Version">;
196
+ }>;
197
+ }>, Schema.Struct<{
198
+ readonly $kind: Schema.Literal<"Immutable">;
199
+ readonly Immutable: Schema.Literal<true>;
200
+ }>, Schema.Struct<{
201
+ readonly $kind: Schema.Literal<"ConsensusAddressOwner">;
202
+ readonly ConsensusAddressOwner: Schema.Struct<{
203
+ readonly startVersion: Schema.brand<Schema.BigIntFromString, "Version">;
204
+ readonly owner: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "SuiAddress">;
205
+ }>;
206
+ }>, Schema.Struct<{
207
+ readonly $kind: Schema.Literal<"Unknown">;
208
+ }>]>>;
209
+ readonly outputState: Schema.Literals<readonly ["Unknown", "DoesNotExist", "ObjectWrite", "PackageWrite", "AccumulatorWriteV1"]>;
210
+ readonly outputVersion: Schema.NullOr<Schema.brand<Schema.BigIntFromString, "Version">>;
211
+ readonly outputDigest: Schema.NullOr<Schema.String>;
212
+ readonly outputOwner: Schema.NullOr<Schema.toTaggedUnion<"$kind", readonly [Schema.Struct<{
213
+ readonly $kind: Schema.Literal<"AddressOwner">;
214
+ readonly AddressOwner: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "SuiAddress">;
215
+ }>, Schema.Struct<{
216
+ readonly $kind: Schema.Literal<"ObjectOwner">;
217
+ readonly ObjectOwner: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "ObjectId">;
218
+ }>, Schema.Struct<{
219
+ readonly $kind: Schema.Literal<"Shared">;
220
+ readonly Shared: Schema.Struct<{
221
+ readonly initialSharedVersion: Schema.brand<Schema.BigIntFromString, "Version">;
222
+ }>;
223
+ }>, Schema.Struct<{
224
+ readonly $kind: Schema.Literal<"Immutable">;
225
+ readonly Immutable: Schema.Literal<true>;
226
+ }>, Schema.Struct<{
227
+ readonly $kind: Schema.Literal<"ConsensusAddressOwner">;
228
+ readonly ConsensusAddressOwner: Schema.Struct<{
229
+ readonly startVersion: Schema.brand<Schema.BigIntFromString, "Version">;
230
+ readonly owner: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "SuiAddress">;
231
+ }>;
232
+ }>, Schema.Struct<{
233
+ readonly $kind: Schema.Literal<"Unknown">;
234
+ }>]>>;
235
+ readonly idOperation: Schema.Literals<readonly ["Unknown", "None", "Created", "Deleted"]>;
236
+ }>;
237
+ export type ChangedObject = typeof ChangedObject.Type;
238
+ /** Mirrors `SuiClientTypes.UnchangedConsensusObject`. */
239
+ export declare const UnchangedConsensusObject: Schema.Struct<{
240
+ readonly kind: Schema.Literals<readonly ["Unknown", "ReadOnlyRoot", "MutateConsensusStreamEnded", "ReadConsensusStreamEnded", "Cancelled", "PerEpochConfig"]>;
241
+ readonly objectId: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "ObjectId">;
242
+ readonly version: Schema.NullOr<Schema.brand<Schema.BigIntFromString, "Version">>;
243
+ readonly digest: Schema.NullOr<Schema.String>;
244
+ }>;
245
+ export type UnchangedConsensusObject = typeof UnchangedConsensusObject.Type;
246
+ /** A balance delta produced by a transaction. Mirrors `SuiClientTypes.BalanceChange`. */
247
+ export declare const BalanceChange: Schema.Struct<{
248
+ readonly coinType: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "CoinType">;
249
+ readonly address: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "SuiAddress">;
250
+ readonly amount: Schema.BigIntFromString;
251
+ }>;
252
+ export type BalanceChange = typeof BalanceChange.Type;
253
+ /** An emitted Move event. Mirrors `SuiClientTypes.Event`; `json` is dropped on purpose. */
254
+ export declare const Event: Schema.Struct<{
255
+ readonly packageId: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "ObjectId">;
256
+ readonly module: Schema.String;
257
+ readonly sender: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "SuiAddress">;
258
+ readonly eventType: Schema.String;
259
+ readonly bcs: Schema.Uint8Array;
260
+ }>;
261
+ export type Event = typeof Event.Type;
262
+ /**
263
+ * Where a Move abort happened. Mirrors `SuiClientTypes.MoveLocation`.
264
+ *
265
+ * `package` stays a plain string because the node may report a location for a
266
+ * package that no longer parses as an object id.
267
+ */
268
+ export declare const MoveLocation: Schema.Struct<{
269
+ readonly package: Schema.optional<Schema.String>;
270
+ readonly module: Schema.optional<Schema.String>;
271
+ readonly function: Schema.optional<Schema.Number>;
272
+ readonly functionName: Schema.optional<Schema.String>;
273
+ readonly instruction: Schema.optional<Schema.Number>;
274
+ }>;
275
+ export type MoveLocation = typeof MoveLocation.Type;
276
+ /** A decoded `#[error]` constant. Mirrors `SuiClientTypes.CleverError`. */
277
+ export declare const CleverError: Schema.Struct<{
278
+ readonly errorCode: Schema.optional<Schema.Number>;
279
+ readonly lineNumber: Schema.optional<Schema.Number>;
280
+ readonly constantName: Schema.optional<Schema.String>;
281
+ readonly constantType: Schema.optional<Schema.String>;
282
+ readonly value: Schema.optional<Schema.String>;
283
+ }>;
284
+ export type CleverError = typeof CleverError.Type;
285
+ /**
286
+ * Why a transaction failed on chain or in simulation. Mirrors
287
+ * `SuiClientTypes.ExecutionError` variant for variant, including its `$kind`
288
+ * discriminant, with two differences: `abortCode` is decoded to `bigint`, and
289
+ * the shared `message` and `command` fields live on the error class that
290
+ * carries the reason rather than being repeated in every variant.
291
+ */
292
+ export declare const ExecutionReason: Schema.toTaggedUnion<"$kind", readonly [Schema.Struct<{
293
+ readonly $kind: Schema.Literal<"MoveAbort">;
294
+ readonly MoveAbort: Schema.Struct<{
295
+ readonly abortCode: Schema.BigIntFromString;
296
+ readonly location: Schema.optional<Schema.Struct<{
297
+ readonly package: Schema.optional<Schema.String>;
298
+ readonly module: Schema.optional<Schema.String>;
299
+ readonly function: Schema.optional<Schema.Number>;
300
+ readonly functionName: Schema.optional<Schema.String>;
301
+ readonly instruction: Schema.optional<Schema.Number>;
302
+ }>>;
303
+ readonly cleverError: Schema.optional<Schema.Struct<{
304
+ readonly errorCode: Schema.optional<Schema.Number>;
305
+ readonly lineNumber: Schema.optional<Schema.Number>;
306
+ readonly constantName: Schema.optional<Schema.String>;
307
+ readonly constantType: Schema.optional<Schema.String>;
308
+ readonly value: Schema.optional<Schema.String>;
309
+ }>>;
310
+ }>;
311
+ }>, Schema.Struct<{
312
+ readonly $kind: Schema.Literal<"SizeError">;
313
+ readonly SizeError: Schema.Struct<{
314
+ readonly name: Schema.String;
315
+ readonly size: Schema.Number;
316
+ readonly maxSize: Schema.Number;
317
+ }>;
318
+ }>, Schema.Struct<{
319
+ readonly $kind: Schema.Literal<"CommandArgumentError">;
320
+ readonly CommandArgumentError: Schema.Struct<{
321
+ readonly argument: Schema.Number;
322
+ readonly name: Schema.String;
323
+ }>;
324
+ }>, Schema.Struct<{
325
+ readonly $kind: Schema.Literal<"TypeArgumentError">;
326
+ readonly TypeArgumentError: Schema.Struct<{
327
+ readonly typeArgument: Schema.Number;
328
+ readonly name: Schema.String;
329
+ }>;
330
+ }>, Schema.Struct<{
331
+ readonly $kind: Schema.Literal<"PackageUpgradeError">;
332
+ readonly PackageUpgradeError: Schema.Struct<{
333
+ readonly name: Schema.String;
334
+ readonly packageId: Schema.optional<Schema.String>;
335
+ readonly digest: Schema.optional<Schema.String>;
336
+ }>;
337
+ }>, Schema.Struct<{
338
+ readonly $kind: Schema.Literal<"IndexError">;
339
+ readonly IndexError: Schema.Struct<{
340
+ readonly index: Schema.optional<Schema.Number>;
341
+ readonly subresult: Schema.optional<Schema.Number>;
342
+ }>;
343
+ }>, Schema.Struct<{
344
+ readonly $kind: Schema.Literal<"CoinDenyListError">;
345
+ readonly CoinDenyListError: Schema.Struct<{
346
+ readonly name: Schema.String;
347
+ readonly coinType: Schema.String;
348
+ readonly address: Schema.optional<Schema.String>;
349
+ }>;
350
+ }>, Schema.Struct<{
351
+ readonly $kind: Schema.Literal<"CongestedObjects">;
352
+ readonly CongestedObjects: Schema.Struct<{
353
+ readonly name: Schema.String;
354
+ readonly objects: Schema.$Array<Schema.String>;
355
+ }>;
356
+ }>, Schema.Struct<{
357
+ readonly $kind: Schema.Literal<"ObjectIdError">;
358
+ readonly ObjectIdError: Schema.Struct<{
359
+ readonly name: Schema.optional<Schema.String>;
360
+ readonly objectId: Schema.String;
361
+ }>;
362
+ }>, Schema.Struct<{
363
+ readonly $kind: Schema.Literal<"Unknown">;
364
+ }>]>;
365
+ export type ExecutionReason = typeof ExecutionReason.Type;
366
+ /**
367
+ * Whether a transaction succeeded. Mirrors `SuiClientTypes.ExecutionStatus`
368
+ * minus its `error` payload: the failure detail is carried by `ExecutionFailed`
369
+ * and `SimulationFailed` as an {@link ExecutionReason}, so there is exactly one
370
+ * representation of an on-chain failure.
371
+ */
372
+ export declare const ExecutionStatus: Schema.Struct<{
373
+ readonly success: Schema.Boolean;
374
+ }>;
375
+ export type ExecutionStatus = typeof ExecutionStatus.Type;
376
+ /** Transaction effects. Mirrors `SuiClientTypes.TransactionEffects`. */
377
+ export declare const TransactionEffects: Schema.Struct<{
378
+ readonly version: Schema.Number;
379
+ readonly status: Schema.Struct<{
380
+ readonly success: Schema.Boolean;
381
+ }>;
382
+ readonly gasUsed: Schema.Struct<{
383
+ readonly computationCost: Schema.brand<Schema.BigIntFromString, "Mist">;
384
+ readonly storageCost: Schema.brand<Schema.BigIntFromString, "Mist">;
385
+ readonly storageRebate: Schema.brand<Schema.BigIntFromString, "Mist">;
386
+ readonly nonRefundableStorageFee: Schema.brand<Schema.BigIntFromString, "Mist">;
387
+ }>;
388
+ readonly transactionDigest: Schema.brand<Schema.String, "Digest">;
389
+ readonly gasObject: Schema.NullOr<Schema.Struct<{
390
+ readonly objectId: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "ObjectId">;
391
+ readonly inputState: Schema.Literals<readonly ["Unknown", "DoesNotExist", "Exists"]>;
392
+ readonly inputVersion: Schema.NullOr<Schema.brand<Schema.BigIntFromString, "Version">>;
393
+ readonly inputDigest: Schema.NullOr<Schema.String>;
394
+ readonly inputOwner: Schema.NullOr<Schema.toTaggedUnion<"$kind", readonly [Schema.Struct<{
395
+ readonly $kind: Schema.Literal<"AddressOwner">;
396
+ readonly AddressOwner: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "SuiAddress">;
397
+ }>, Schema.Struct<{
398
+ readonly $kind: Schema.Literal<"ObjectOwner">;
399
+ readonly ObjectOwner: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "ObjectId">;
400
+ }>, Schema.Struct<{
401
+ readonly $kind: Schema.Literal<"Shared">;
402
+ readonly Shared: Schema.Struct<{
403
+ readonly initialSharedVersion: Schema.brand<Schema.BigIntFromString, "Version">;
404
+ }>;
405
+ }>, Schema.Struct<{
406
+ readonly $kind: Schema.Literal<"Immutable">;
407
+ readonly Immutable: Schema.Literal<true>;
408
+ }>, Schema.Struct<{
409
+ readonly $kind: Schema.Literal<"ConsensusAddressOwner">;
410
+ readonly ConsensusAddressOwner: Schema.Struct<{
411
+ readonly startVersion: Schema.brand<Schema.BigIntFromString, "Version">;
412
+ readonly owner: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "SuiAddress">;
413
+ }>;
414
+ }>, Schema.Struct<{
415
+ readonly $kind: Schema.Literal<"Unknown">;
416
+ }>]>>;
417
+ readonly outputState: Schema.Literals<readonly ["Unknown", "DoesNotExist", "ObjectWrite", "PackageWrite", "AccumulatorWriteV1"]>;
418
+ readonly outputVersion: Schema.NullOr<Schema.brand<Schema.BigIntFromString, "Version">>;
419
+ readonly outputDigest: Schema.NullOr<Schema.String>;
420
+ readonly outputOwner: Schema.NullOr<Schema.toTaggedUnion<"$kind", readonly [Schema.Struct<{
421
+ readonly $kind: Schema.Literal<"AddressOwner">;
422
+ readonly AddressOwner: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "SuiAddress">;
423
+ }>, Schema.Struct<{
424
+ readonly $kind: Schema.Literal<"ObjectOwner">;
425
+ readonly ObjectOwner: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "ObjectId">;
426
+ }>, Schema.Struct<{
427
+ readonly $kind: Schema.Literal<"Shared">;
428
+ readonly Shared: Schema.Struct<{
429
+ readonly initialSharedVersion: Schema.brand<Schema.BigIntFromString, "Version">;
430
+ }>;
431
+ }>, Schema.Struct<{
432
+ readonly $kind: Schema.Literal<"Immutable">;
433
+ readonly Immutable: Schema.Literal<true>;
434
+ }>, Schema.Struct<{
435
+ readonly $kind: Schema.Literal<"ConsensusAddressOwner">;
436
+ readonly ConsensusAddressOwner: Schema.Struct<{
437
+ readonly startVersion: Schema.brand<Schema.BigIntFromString, "Version">;
438
+ readonly owner: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "SuiAddress">;
439
+ }>;
440
+ }>, Schema.Struct<{
441
+ readonly $kind: Schema.Literal<"Unknown">;
442
+ }>]>>;
443
+ readonly idOperation: Schema.Literals<readonly ["Unknown", "None", "Created", "Deleted"]>;
444
+ }>>;
445
+ readonly eventsDigest: Schema.NullOr<Schema.String>;
446
+ readonly dependencies: Schema.$Array<Schema.String>;
447
+ readonly lamportVersion: Schema.NullOr<Schema.brand<Schema.BigIntFromString, "Version">>;
448
+ readonly changedObjects: Schema.$Array<Schema.Struct<{
449
+ readonly objectId: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "ObjectId">;
450
+ readonly inputState: Schema.Literals<readonly ["Unknown", "DoesNotExist", "Exists"]>;
451
+ readonly inputVersion: Schema.NullOr<Schema.brand<Schema.BigIntFromString, "Version">>;
452
+ readonly inputDigest: Schema.NullOr<Schema.String>;
453
+ readonly inputOwner: Schema.NullOr<Schema.toTaggedUnion<"$kind", readonly [Schema.Struct<{
454
+ readonly $kind: Schema.Literal<"AddressOwner">;
455
+ readonly AddressOwner: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "SuiAddress">;
456
+ }>, Schema.Struct<{
457
+ readonly $kind: Schema.Literal<"ObjectOwner">;
458
+ readonly ObjectOwner: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "ObjectId">;
459
+ }>, Schema.Struct<{
460
+ readonly $kind: Schema.Literal<"Shared">;
461
+ readonly Shared: Schema.Struct<{
462
+ readonly initialSharedVersion: Schema.brand<Schema.BigIntFromString, "Version">;
463
+ }>;
464
+ }>, Schema.Struct<{
465
+ readonly $kind: Schema.Literal<"Immutable">;
466
+ readonly Immutable: Schema.Literal<true>;
467
+ }>, Schema.Struct<{
468
+ readonly $kind: Schema.Literal<"ConsensusAddressOwner">;
469
+ readonly ConsensusAddressOwner: Schema.Struct<{
470
+ readonly startVersion: Schema.brand<Schema.BigIntFromString, "Version">;
471
+ readonly owner: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "SuiAddress">;
472
+ }>;
473
+ }>, Schema.Struct<{
474
+ readonly $kind: Schema.Literal<"Unknown">;
475
+ }>]>>;
476
+ readonly outputState: Schema.Literals<readonly ["Unknown", "DoesNotExist", "ObjectWrite", "PackageWrite", "AccumulatorWriteV1"]>;
477
+ readonly outputVersion: Schema.NullOr<Schema.brand<Schema.BigIntFromString, "Version">>;
478
+ readonly outputDigest: Schema.NullOr<Schema.String>;
479
+ readonly outputOwner: Schema.NullOr<Schema.toTaggedUnion<"$kind", readonly [Schema.Struct<{
480
+ readonly $kind: Schema.Literal<"AddressOwner">;
481
+ readonly AddressOwner: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "SuiAddress">;
482
+ }>, Schema.Struct<{
483
+ readonly $kind: Schema.Literal<"ObjectOwner">;
484
+ readonly ObjectOwner: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "ObjectId">;
485
+ }>, Schema.Struct<{
486
+ readonly $kind: Schema.Literal<"Shared">;
487
+ readonly Shared: Schema.Struct<{
488
+ readonly initialSharedVersion: Schema.brand<Schema.BigIntFromString, "Version">;
489
+ }>;
490
+ }>, Schema.Struct<{
491
+ readonly $kind: Schema.Literal<"Immutable">;
492
+ readonly Immutable: Schema.Literal<true>;
493
+ }>, Schema.Struct<{
494
+ readonly $kind: Schema.Literal<"ConsensusAddressOwner">;
495
+ readonly ConsensusAddressOwner: Schema.Struct<{
496
+ readonly startVersion: Schema.brand<Schema.BigIntFromString, "Version">;
497
+ readonly owner: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "SuiAddress">;
498
+ }>;
499
+ }>, Schema.Struct<{
500
+ readonly $kind: Schema.Literal<"Unknown">;
501
+ }>]>>;
502
+ readonly idOperation: Schema.Literals<readonly ["Unknown", "None", "Created", "Deleted"]>;
503
+ }>>;
504
+ readonly unchangedConsensusObjects: Schema.$Array<Schema.Struct<{
505
+ readonly kind: Schema.Literals<readonly ["Unknown", "ReadOnlyRoot", "MutateConsensusStreamEnded", "ReadConsensusStreamEnded", "Cancelled", "PerEpochConfig"]>;
506
+ readonly objectId: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "ObjectId">;
507
+ readonly version: Schema.NullOr<Schema.brand<Schema.BigIntFromString, "Version">>;
508
+ readonly digest: Schema.NullOr<Schema.String>;
509
+ }>>;
510
+ readonly auxiliaryDataDigest: Schema.NullOr<Schema.String>;
511
+ }>;
512
+ export type TransactionEffects = typeof TransactionEffects.Type;
513
+ /**
514
+ * A serialized signature, as every SDK signer returns it: the base64 of the
515
+ * flag, signature and public key bytes. Branded so a signature cannot be passed
516
+ * where a digest or an address is expected.
517
+ */
518
+ export declare const Signature: Schema.brand<Schema.String, "Signature">;
519
+ export type Signature = typeof Signature.Type;
520
+ /** The largest value a Move `u64` can hold. */
521
+ export declare const U64_MAX = 18446744073709551615n;
522
+ /** The largest value a Move `u32` can hold, which is the nonce's range. */
523
+ export declare const U32_MAX = 4294967295;
524
+ /**
525
+ * When a transaction stops being valid. Mirrors the SDK's
526
+ * `TransactionExpiration` enum variant for variant, including its `$kind`
527
+ * discriminant, so our narrowing and `TransactionDataBuilder`'s agree.
528
+ *
529
+ * `ValidDuring` is what `Tx.build` sets by default, bounded by **epochs**:
530
+ * `maxTimestamp` is `null` unless `SubmitConfig.validFor` asks for one, because
531
+ * no Sui network accepts a timestamp expiration yet. Its `chain` is a replay
532
+ * guard, so bytes signed for testnet cannot land on mainnet.
533
+ */
534
+ export declare const TransactionExpiration: Schema.toTaggedUnion<"$kind", readonly [Schema.Struct<{
535
+ readonly $kind: Schema.Literal<"None">;
536
+ readonly None: Schema.Literal<true>;
537
+ }>, Schema.Struct<{
538
+ readonly $kind: Schema.Literal<"Epoch">;
539
+ readonly Epoch: Schema.decodeTo<Schema.BigInt, Schema.Union<readonly [Schema.String, Schema.Number]>, never, never>;
540
+ }>, Schema.Struct<{
541
+ readonly $kind: Schema.Literal<"ValidDuring">;
542
+ readonly ValidDuring: Schema.Struct<{
543
+ readonly minEpoch: Schema.NullOr<Schema.decodeTo<Schema.BigInt, Schema.Union<readonly [Schema.String, Schema.Number]>, never, never>>;
544
+ readonly maxEpoch: Schema.NullOr<Schema.decodeTo<Schema.BigInt, Schema.Union<readonly [Schema.String, Schema.Number]>, never, never>>;
545
+ readonly minTimestamp: Schema.NullOr<Schema.decodeTo<Schema.BigInt, Schema.Union<readonly [Schema.String, Schema.Number]>, never, never>>;
546
+ readonly maxTimestamp: Schema.NullOr<Schema.decodeTo<Schema.BigInt, Schema.Union<readonly [Schema.String, Schema.Number]>, never, never>>;
547
+ readonly chain: Schema.String;
548
+ readonly nonce: Schema.Number;
549
+ }>;
550
+ }>, Schema.Struct<{
551
+ readonly $kind: Schema.Literal<"Validity">;
552
+ readonly Validity: Schema.Struct<{
553
+ readonly allowedProposers: Schema.NullOr<Schema.Struct<{
554
+ readonly epoch: Schema.decodeTo<Schema.BigInt, Schema.Union<readonly [Schema.String, Schema.Number]>, never, never>;
555
+ readonly proposers: Schema.$Array<Schema.Number>;
556
+ }>>;
557
+ readonly minEpoch: Schema.NullOr<Schema.decodeTo<Schema.BigInt, Schema.Union<readonly [Schema.String, Schema.Number]>, never, never>>;
558
+ readonly maxEpoch: Schema.NullOr<Schema.decodeTo<Schema.BigInt, Schema.Union<readonly [Schema.String, Schema.Number]>, never, never>>;
559
+ readonly minTimestamp: Schema.NullOr<Schema.decodeTo<Schema.BigInt, Schema.Union<readonly [Schema.String, Schema.Number]>, never, never>>;
560
+ readonly maxTimestamp: Schema.NullOr<Schema.decodeTo<Schema.BigInt, Schema.Union<readonly [Schema.String, Schema.Number]>, never, never>>;
561
+ readonly chain: Schema.String;
562
+ readonly nonce: Schema.Number;
563
+ }>;
564
+ }>]>;
565
+ export type TransactionExpiration = typeof TransactionExpiration.Type;
566
+ /**
567
+ * The signed bytes of a transaction, kept so an uncertain submission can be
568
+ * reconciled or re-submitted later without rebuilding.
569
+ *
570
+ * The expiration the transaction was built with rides along, because it is what
571
+ * `Tx.reconcile` needs to decide that a transaction can no longer land.
572
+ *
573
+ * `bytes` encodes as base64, not as a numeric object, so `SuiError.toJson` of a
574
+ * `SubmissionUnknown` is JSON the operator who has to reconcile it can read.
575
+ */
576
+ export declare const SignedTransaction: Schema.Struct<{
577
+ readonly digest: Schema.brand<Schema.String, "Digest">;
578
+ readonly bytes: Schema.Uint8ArrayFromBase64;
579
+ readonly signatures: Schema.$Array<Schema.brand<Schema.String, "Signature">>;
580
+ readonly sender: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "SuiAddress">;
581
+ readonly expiration: Schema.optional<Schema.toTaggedUnion<"$kind", readonly [Schema.Struct<{
582
+ readonly $kind: Schema.Literal<"None">;
583
+ readonly None: Schema.Literal<true>;
584
+ }>, Schema.Struct<{
585
+ readonly $kind: Schema.Literal<"Epoch">;
586
+ readonly Epoch: Schema.decodeTo<Schema.BigInt, Schema.Union<readonly [Schema.String, Schema.Number]>, never, never>;
587
+ }>, Schema.Struct<{
588
+ readonly $kind: Schema.Literal<"ValidDuring">;
589
+ readonly ValidDuring: Schema.Struct<{
590
+ readonly minEpoch: Schema.NullOr<Schema.decodeTo<Schema.BigInt, Schema.Union<readonly [Schema.String, Schema.Number]>, never, never>>;
591
+ readonly maxEpoch: Schema.NullOr<Schema.decodeTo<Schema.BigInt, Schema.Union<readonly [Schema.String, Schema.Number]>, never, never>>;
592
+ readonly minTimestamp: Schema.NullOr<Schema.decodeTo<Schema.BigInt, Schema.Union<readonly [Schema.String, Schema.Number]>, never, never>>;
593
+ readonly maxTimestamp: Schema.NullOr<Schema.decodeTo<Schema.BigInt, Schema.Union<readonly [Schema.String, Schema.Number]>, never, never>>;
594
+ readonly chain: Schema.String;
595
+ readonly nonce: Schema.Number;
596
+ }>;
597
+ }>, Schema.Struct<{
598
+ readonly $kind: Schema.Literal<"Validity">;
599
+ readonly Validity: Schema.Struct<{
600
+ readonly allowedProposers: Schema.NullOr<Schema.Struct<{
601
+ readonly epoch: Schema.decodeTo<Schema.BigInt, Schema.Union<readonly [Schema.String, Schema.Number]>, never, never>;
602
+ readonly proposers: Schema.$Array<Schema.Number>;
603
+ }>>;
604
+ readonly minEpoch: Schema.NullOr<Schema.decodeTo<Schema.BigInt, Schema.Union<readonly [Schema.String, Schema.Number]>, never, never>>;
605
+ readonly maxEpoch: Schema.NullOr<Schema.decodeTo<Schema.BigInt, Schema.Union<readonly [Schema.String, Schema.Number]>, never, never>>;
606
+ readonly minTimestamp: Schema.NullOr<Schema.decodeTo<Schema.BigInt, Schema.Union<readonly [Schema.String, Schema.Number]>, never, never>>;
607
+ readonly maxTimestamp: Schema.NullOr<Schema.decodeTo<Schema.BigInt, Schema.Union<readonly [Schema.String, Schema.Number]>, never, never>>;
608
+ readonly chain: Schema.String;
609
+ readonly nonce: Schema.Number;
610
+ }>;
611
+ }>]>>;
612
+ /**
613
+ * The chain identifier the bytes were built against, recorded by `Tx.build`
614
+ * so `Tx.reconcile` can refuse to reason about a transaction with a node on
615
+ * another chain.
616
+ *
617
+ * A `ValidDuring` or `Validity` expiration already names its chain, and that
618
+ * is what is compared when it is there. This field is what an `Epoch` or
619
+ * `None` expiration — which name no chain at all — leaves behind instead, so
620
+ * a process-wide journal holding submissions from two networks cannot settle
621
+ * one of them against the other's epoch.
622
+ */
623
+ readonly chain: Schema.optional<Schema.String>;
624
+ }>;
625
+ export type SignedTransaction = typeof SignedTransaction.Type;
626
+ /**
627
+ * Why a transaction provably never applied, and never will.
628
+ *
629
+ * `"expired"`: the expiration window was observed closed — the current epoch
630
+ * past the recorded `maxEpoch`, or `chainTime` past a recorded `maxTimestamp`
631
+ * by more than `SubmitConfig.expiryMargin` — around a `getTransaction` miss,
632
+ * twice. `"inputConsumed"`: a **different** transaction's own effects report
633
+ * that it took an object these bytes pinned at exactly the version they pinned.
634
+ *
635
+ * Shared by `NotApplied` and by the journal entry that records it, so the two
636
+ * cannot drift.
637
+ */
638
+ export declare const NotAppliedEvidence: Schema.Literals<readonly ["expired", "inputConsumed"]>;
639
+ export type NotAppliedEvidence = typeof NotAppliedEvidence.Type;
640
+ /**
641
+ * A transaction built into bytes and ready to sign, with the expiration the
642
+ * builder settled on recorded so `Tx.reconcile` can decide, later and without
643
+ * the builder, whether the transaction can still land.
644
+ */
645
+ export declare const Built: Schema.Struct<{
646
+ readonly digest: Schema.brand<Schema.String, "Digest">;
647
+ readonly bytes: Schema.Uint8ArrayFromBase64;
648
+ readonly sender: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "SuiAddress">;
649
+ readonly gasOwner: Schema.optional<Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "SuiAddress">>;
650
+ readonly expiration: Schema.optional<Schema.toTaggedUnion<"$kind", readonly [Schema.Struct<{
651
+ readonly $kind: Schema.Literal<"None">;
652
+ readonly None: Schema.Literal<true>;
653
+ }>, Schema.Struct<{
654
+ readonly $kind: Schema.Literal<"Epoch">;
655
+ readonly Epoch: Schema.decodeTo<Schema.BigInt, Schema.Union<readonly [Schema.String, Schema.Number]>, never, never>;
656
+ }>, Schema.Struct<{
657
+ readonly $kind: Schema.Literal<"ValidDuring">;
658
+ readonly ValidDuring: Schema.Struct<{
659
+ readonly minEpoch: Schema.NullOr<Schema.decodeTo<Schema.BigInt, Schema.Union<readonly [Schema.String, Schema.Number]>, never, never>>;
660
+ readonly maxEpoch: Schema.NullOr<Schema.decodeTo<Schema.BigInt, Schema.Union<readonly [Schema.String, Schema.Number]>, never, never>>;
661
+ readonly minTimestamp: Schema.NullOr<Schema.decodeTo<Schema.BigInt, Schema.Union<readonly [Schema.String, Schema.Number]>, never, never>>;
662
+ readonly maxTimestamp: Schema.NullOr<Schema.decodeTo<Schema.BigInt, Schema.Union<readonly [Schema.String, Schema.Number]>, never, never>>;
663
+ readonly chain: Schema.String;
664
+ readonly nonce: Schema.Number;
665
+ }>;
666
+ }>, Schema.Struct<{
667
+ readonly $kind: Schema.Literal<"Validity">;
668
+ readonly Validity: Schema.Struct<{
669
+ readonly allowedProposers: Schema.NullOr<Schema.Struct<{
670
+ readonly epoch: Schema.decodeTo<Schema.BigInt, Schema.Union<readonly [Schema.String, Schema.Number]>, never, never>;
671
+ readonly proposers: Schema.$Array<Schema.Number>;
672
+ }>>;
673
+ readonly minEpoch: Schema.NullOr<Schema.decodeTo<Schema.BigInt, Schema.Union<readonly [Schema.String, Schema.Number]>, never, never>>;
674
+ readonly maxEpoch: Schema.NullOr<Schema.decodeTo<Schema.BigInt, Schema.Union<readonly [Schema.String, Schema.Number]>, never, never>>;
675
+ readonly minTimestamp: Schema.NullOr<Schema.decodeTo<Schema.BigInt, Schema.Union<readonly [Schema.String, Schema.Number]>, never, never>>;
676
+ readonly maxTimestamp: Schema.NullOr<Schema.decodeTo<Schema.BigInt, Schema.Union<readonly [Schema.String, Schema.Number]>, never, never>>;
677
+ readonly chain: Schema.String;
678
+ readonly nonce: Schema.Number;
679
+ }>;
680
+ }>]>>;
681
+ /** The chain identifier `Tx.build` was run against. See `SignedTransaction.chain`. */
682
+ readonly chain: Schema.optional<Schema.String>;
683
+ }>;
684
+ export type Built = typeof Built.Type;
685
+ /**
686
+ * The last epoch in which a transaction can still be applied, or `undefined`
687
+ * when its expiration sets no such bound (`None`, or a `ValidDuring` with no
688
+ * `maxEpoch`).
689
+ *
690
+ * An `Epoch` expiration is that epoch: the SDK's `Epoch` variant means "valid
691
+ * until the end of this epoch", so it is its own upper bound.
692
+ *
693
+ * This is the bound that matters in practice. Epochs are what the default
694
+ * expiration carries and what the validator rule is written in, and unlike a
695
+ * wall clock an epoch is a consensus fact, so `Tx.reconcile` needs no skew
696
+ * margin to reason about it. Never fails.
697
+ */
698
+ export declare const maxEpochOf: (expiration: TransactionExpiration | undefined) => bigint | undefined;
699
+ /**
700
+ * The wall-clock bound after which a transaction can no longer be applied, in
701
+ * milliseconds, or `undefined` when its expiration sets no such bound — which
702
+ * is `None`, `Epoch`, and the default `ValidDuring`, whose `maxTimestamp` is
703
+ * `null` unless `SubmitConfig.validFor` asks for one.
704
+ *
705
+ * `Tx.reconcile` compares it against `chainTime` with
706
+ * `SubmitConfig.expiryMargin` for skew, which the epoch bound needs none of.
707
+ * Never fails.
708
+ */
709
+ export declare const maxTimestampMsOf: (expiration: TransactionExpiration | undefined) => bigint | undefined;
710
+ /**
711
+ * The chain identifier an expiration names, or `undefined` for the variants
712
+ * that name none (`None`, `Epoch`).
713
+ *
714
+ * This is the first half of the chain-identity guard `Tx.reconcile` applies
715
+ * before it asks a node anything: bytes built for one chain must not be
716
+ * declared expired by another chain's epoch. The second half is
717
+ * `SignedTransaction.chain`, which `Tx.build` records for the variants that
718
+ * carry no chain of their own. Never fails.
719
+ */
720
+ export declare const chainOf: (expiration: TransactionExpiration | undefined) => string | undefined;
721
+ /**
722
+ * The fixed set of object fields sui-effect always requests: `content`, plus
723
+ * the owner, type, version and digest the SDK returns unconditionally.
724
+ */
725
+ export declare const ObjectEnvelope: Schema.Struct<{
726
+ readonly objectId: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "ObjectId">;
727
+ readonly version: Schema.brand<Schema.BigIntFromString, "Version">;
728
+ readonly digest: Schema.String;
729
+ readonly owner: Schema.toTaggedUnion<"$kind", readonly [Schema.Struct<{
730
+ readonly $kind: Schema.Literal<"AddressOwner">;
731
+ readonly AddressOwner: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "SuiAddress">;
732
+ }>, Schema.Struct<{
733
+ readonly $kind: Schema.Literal<"ObjectOwner">;
734
+ readonly ObjectOwner: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "ObjectId">;
735
+ }>, Schema.Struct<{
736
+ readonly $kind: Schema.Literal<"Shared">;
737
+ readonly Shared: Schema.Struct<{
738
+ readonly initialSharedVersion: Schema.brand<Schema.BigIntFromString, "Version">;
739
+ }>;
740
+ }>, Schema.Struct<{
741
+ readonly $kind: Schema.Literal<"Immutable">;
742
+ readonly Immutable: Schema.Literal<true>;
743
+ }>, Schema.Struct<{
744
+ readonly $kind: Schema.Literal<"ConsensusAddressOwner">;
745
+ readonly ConsensusAddressOwner: Schema.Struct<{
746
+ readonly startVersion: Schema.brand<Schema.BigIntFromString, "Version">;
747
+ readonly owner: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "SuiAddress">;
748
+ }>;
749
+ }>, Schema.Struct<{
750
+ readonly $kind: Schema.Literal<"Unknown">;
751
+ }>]>;
752
+ readonly type: Schema.Union<readonly [Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "StructTag">, Schema.Literal<"package">]>;
753
+ }>;
754
+ export type ObjectEnvelope = typeof ObjectEnvelope.Type;
755
+ /**
756
+ * An object read through `Sui`, with its BCS content already decoded to `S` and
757
+ * a `ref` ready to feed straight back into the transaction builder.
758
+ */
759
+ export interface SuiObject<S> {
760
+ readonly id: ObjectId;
761
+ readonly version: Version;
762
+ readonly digest: string;
763
+ readonly type: ObjectType;
764
+ readonly owner: Owner;
765
+ readonly content: S;
766
+ readonly ref: ObjectRef;
767
+ }
768
+ /** Builds a {@link SuiObject} from a decoded envelope and its decoded content. */
769
+ export declare const makeSuiObject: <S>(envelope: ObjectEnvelope, content: S) => SuiObject<S>;
770
+ /** The return values and mutated references of one command. Mirrors `SuiClientTypes.CommandResult`. */
771
+ export declare const CommandResult: Schema.Struct<{
772
+ readonly returnValues: Schema.$Array<Schema.Struct<{
773
+ readonly bcs: Schema.Uint8Array;
774
+ }>>;
775
+ readonly mutatedReferences: Schema.$Array<Schema.Struct<{
776
+ readonly bcs: Schema.Uint8Array;
777
+ }>>;
778
+ }>;
779
+ export type CommandResult = typeof CommandResult.Type;
780
+ /**
781
+ * The result of a successful simulation, with the fixed include set `Sui` asks
782
+ * for: effects, events, balance changes, object types and command results.
783
+ */
784
+ export declare const Simulation: Schema.Struct<{
785
+ readonly digest: Schema.brand<Schema.String, "Digest">;
786
+ readonly effects: Schema.Struct<{
787
+ readonly version: Schema.Number;
788
+ readonly status: Schema.Struct<{
789
+ readonly success: Schema.Boolean;
790
+ }>;
791
+ readonly gasUsed: Schema.Struct<{
792
+ readonly computationCost: Schema.brand<Schema.BigIntFromString, "Mist">;
793
+ readonly storageCost: Schema.brand<Schema.BigIntFromString, "Mist">;
794
+ readonly storageRebate: Schema.brand<Schema.BigIntFromString, "Mist">;
795
+ readonly nonRefundableStorageFee: Schema.brand<Schema.BigIntFromString, "Mist">;
796
+ }>;
797
+ readonly transactionDigest: Schema.brand<Schema.String, "Digest">;
798
+ readonly gasObject: Schema.NullOr<Schema.Struct<{
799
+ readonly objectId: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "ObjectId">;
800
+ readonly inputState: Schema.Literals<readonly ["Unknown", "DoesNotExist", "Exists"]>;
801
+ readonly inputVersion: Schema.NullOr<Schema.brand<Schema.BigIntFromString, "Version">>;
802
+ readonly inputDigest: Schema.NullOr<Schema.String>;
803
+ readonly inputOwner: Schema.NullOr<Schema.toTaggedUnion<"$kind", readonly [Schema.Struct<{
804
+ readonly $kind: Schema.Literal<"AddressOwner">;
805
+ readonly AddressOwner: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "SuiAddress">;
806
+ }>, Schema.Struct<{
807
+ readonly $kind: Schema.Literal<"ObjectOwner">;
808
+ readonly ObjectOwner: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "ObjectId">;
809
+ }>, Schema.Struct<{
810
+ readonly $kind: Schema.Literal<"Shared">;
811
+ readonly Shared: Schema.Struct<{
812
+ readonly initialSharedVersion: Schema.brand<Schema.BigIntFromString, "Version">;
813
+ }>;
814
+ }>, Schema.Struct<{
815
+ readonly $kind: Schema.Literal<"Immutable">;
816
+ readonly Immutable: Schema.Literal<true>;
817
+ }>, Schema.Struct<{
818
+ readonly $kind: Schema.Literal<"ConsensusAddressOwner">;
819
+ readonly ConsensusAddressOwner: Schema.Struct<{
820
+ readonly startVersion: Schema.brand<Schema.BigIntFromString, "Version">;
821
+ readonly owner: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "SuiAddress">;
822
+ }>;
823
+ }>, Schema.Struct<{
824
+ readonly $kind: Schema.Literal<"Unknown">;
825
+ }>]>>;
826
+ readonly outputState: Schema.Literals<readonly ["Unknown", "DoesNotExist", "ObjectWrite", "PackageWrite", "AccumulatorWriteV1"]>;
827
+ readonly outputVersion: Schema.NullOr<Schema.brand<Schema.BigIntFromString, "Version">>;
828
+ readonly outputDigest: Schema.NullOr<Schema.String>;
829
+ readonly outputOwner: Schema.NullOr<Schema.toTaggedUnion<"$kind", readonly [Schema.Struct<{
830
+ readonly $kind: Schema.Literal<"AddressOwner">;
831
+ readonly AddressOwner: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "SuiAddress">;
832
+ }>, Schema.Struct<{
833
+ readonly $kind: Schema.Literal<"ObjectOwner">;
834
+ readonly ObjectOwner: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "ObjectId">;
835
+ }>, Schema.Struct<{
836
+ readonly $kind: Schema.Literal<"Shared">;
837
+ readonly Shared: Schema.Struct<{
838
+ readonly initialSharedVersion: Schema.brand<Schema.BigIntFromString, "Version">;
839
+ }>;
840
+ }>, Schema.Struct<{
841
+ readonly $kind: Schema.Literal<"Immutable">;
842
+ readonly Immutable: Schema.Literal<true>;
843
+ }>, Schema.Struct<{
844
+ readonly $kind: Schema.Literal<"ConsensusAddressOwner">;
845
+ readonly ConsensusAddressOwner: Schema.Struct<{
846
+ readonly startVersion: Schema.brand<Schema.BigIntFromString, "Version">;
847
+ readonly owner: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "SuiAddress">;
848
+ }>;
849
+ }>, Schema.Struct<{
850
+ readonly $kind: Schema.Literal<"Unknown">;
851
+ }>]>>;
852
+ readonly idOperation: Schema.Literals<readonly ["Unknown", "None", "Created", "Deleted"]>;
853
+ }>>;
854
+ readonly eventsDigest: Schema.NullOr<Schema.String>;
855
+ readonly dependencies: Schema.$Array<Schema.String>;
856
+ readonly lamportVersion: Schema.NullOr<Schema.brand<Schema.BigIntFromString, "Version">>;
857
+ readonly changedObjects: Schema.$Array<Schema.Struct<{
858
+ readonly objectId: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "ObjectId">;
859
+ readonly inputState: Schema.Literals<readonly ["Unknown", "DoesNotExist", "Exists"]>;
860
+ readonly inputVersion: Schema.NullOr<Schema.brand<Schema.BigIntFromString, "Version">>;
861
+ readonly inputDigest: Schema.NullOr<Schema.String>;
862
+ readonly inputOwner: Schema.NullOr<Schema.toTaggedUnion<"$kind", readonly [Schema.Struct<{
863
+ readonly $kind: Schema.Literal<"AddressOwner">;
864
+ readonly AddressOwner: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "SuiAddress">;
865
+ }>, Schema.Struct<{
866
+ readonly $kind: Schema.Literal<"ObjectOwner">;
867
+ readonly ObjectOwner: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "ObjectId">;
868
+ }>, Schema.Struct<{
869
+ readonly $kind: Schema.Literal<"Shared">;
870
+ readonly Shared: Schema.Struct<{
871
+ readonly initialSharedVersion: Schema.brand<Schema.BigIntFromString, "Version">;
872
+ }>;
873
+ }>, Schema.Struct<{
874
+ readonly $kind: Schema.Literal<"Immutable">;
875
+ readonly Immutable: Schema.Literal<true>;
876
+ }>, Schema.Struct<{
877
+ readonly $kind: Schema.Literal<"ConsensusAddressOwner">;
878
+ readonly ConsensusAddressOwner: Schema.Struct<{
879
+ readonly startVersion: Schema.brand<Schema.BigIntFromString, "Version">;
880
+ readonly owner: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "SuiAddress">;
881
+ }>;
882
+ }>, Schema.Struct<{
883
+ readonly $kind: Schema.Literal<"Unknown">;
884
+ }>]>>;
885
+ readonly outputState: Schema.Literals<readonly ["Unknown", "DoesNotExist", "ObjectWrite", "PackageWrite", "AccumulatorWriteV1"]>;
886
+ readonly outputVersion: Schema.NullOr<Schema.brand<Schema.BigIntFromString, "Version">>;
887
+ readonly outputDigest: Schema.NullOr<Schema.String>;
888
+ readonly outputOwner: Schema.NullOr<Schema.toTaggedUnion<"$kind", readonly [Schema.Struct<{
889
+ readonly $kind: Schema.Literal<"AddressOwner">;
890
+ readonly AddressOwner: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "SuiAddress">;
891
+ }>, Schema.Struct<{
892
+ readonly $kind: Schema.Literal<"ObjectOwner">;
893
+ readonly ObjectOwner: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "ObjectId">;
894
+ }>, Schema.Struct<{
895
+ readonly $kind: Schema.Literal<"Shared">;
896
+ readonly Shared: Schema.Struct<{
897
+ readonly initialSharedVersion: Schema.brand<Schema.BigIntFromString, "Version">;
898
+ }>;
899
+ }>, Schema.Struct<{
900
+ readonly $kind: Schema.Literal<"Immutable">;
901
+ readonly Immutable: Schema.Literal<true>;
902
+ }>, Schema.Struct<{
903
+ readonly $kind: Schema.Literal<"ConsensusAddressOwner">;
904
+ readonly ConsensusAddressOwner: Schema.Struct<{
905
+ readonly startVersion: Schema.brand<Schema.BigIntFromString, "Version">;
906
+ readonly owner: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "SuiAddress">;
907
+ }>;
908
+ }>, Schema.Struct<{
909
+ readonly $kind: Schema.Literal<"Unknown">;
910
+ }>]>>;
911
+ readonly idOperation: Schema.Literals<readonly ["Unknown", "None", "Created", "Deleted"]>;
912
+ }>>;
913
+ readonly unchangedConsensusObjects: Schema.$Array<Schema.Struct<{
914
+ readonly kind: Schema.Literals<readonly ["Unknown", "ReadOnlyRoot", "MutateConsensusStreamEnded", "ReadConsensusStreamEnded", "Cancelled", "PerEpochConfig"]>;
915
+ readonly objectId: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "ObjectId">;
916
+ readonly version: Schema.NullOr<Schema.brand<Schema.BigIntFromString, "Version">>;
917
+ readonly digest: Schema.NullOr<Schema.String>;
918
+ }>>;
919
+ readonly auxiliaryDataDigest: Schema.NullOr<Schema.String>;
920
+ }>;
921
+ readonly events: Schema.$Array<Schema.Struct<{
922
+ readonly packageId: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "ObjectId">;
923
+ readonly module: Schema.String;
924
+ readonly sender: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "SuiAddress">;
925
+ readonly eventType: Schema.String;
926
+ readonly bcs: Schema.Uint8Array;
927
+ }>>;
928
+ readonly balanceChanges: Schema.$Array<Schema.Struct<{
929
+ readonly coinType: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "CoinType">;
930
+ readonly address: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "SuiAddress">;
931
+ readonly amount: Schema.BigIntFromString;
932
+ }>>;
933
+ readonly objectTypes: Schema.$Record<Schema.String, Schema.String>;
934
+ readonly commandResults: Schema.$Array<Schema.Struct<{
935
+ readonly returnValues: Schema.$Array<Schema.Struct<{
936
+ readonly bcs: Schema.Uint8Array;
937
+ }>>;
938
+ readonly mutatedReferences: Schema.$Array<Schema.Struct<{
939
+ readonly bcs: Schema.Uint8Array;
940
+ }>>;
941
+ }>>;
942
+ }>;
943
+ export type Simulation = typeof Simulation.Type;
944
+ /**
945
+ * Decodes the SDK's `ExecutionError` into an {@link ExecutionReason}, falling
946
+ * back to `Unknown` when the node reports a variant this version does not
947
+ * model. Never fails.
948
+ */
949
+ export declare const executionReasonOf: (error: SuiClientTypes.ExecutionError) => ExecutionReason;
950
+ //# sourceMappingURL=schemas.d.ts.map