@mysten/sui 2.27.1 → 2.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +32 -0
- package/dist/bcs/bcs.d.mts +6 -6
- package/dist/bcs/bcs.d.mts.map +1 -1
- package/dist/bcs/bcs.mjs +29 -2
- package/dist/bcs/bcs.mjs.map +1 -1
- package/dist/bcs/effects.mjs +2 -1
- package/dist/bcs/effects.mjs.map +1 -1
- package/dist/bcs/index.d.mts +102 -6
- package/dist/bcs/index.d.mts.map +1 -1
- package/dist/bcs/transactions.mjs +2 -1
- package/dist/bcs/transactions.mjs.map +1 -1
- package/dist/client/transaction-resolver.mjs +45 -9
- package/dist/client/transaction-resolver.mjs.map +1 -1
- package/dist/cryptography/signature.d.mts +14 -14
- package/dist/grpc/client.d.mts +1 -1
- package/dist/grpc/client.d.mts.map +1 -1
- package/dist/grpc/client.mjs +3 -5
- package/dist/grpc/client.mjs.map +1 -1
- package/dist/grpc/core.d.mts.map +1 -1
- package/dist/grpc/core.mjs +10 -10
- package/dist/grpc/core.mjs.map +1 -1
- package/dist/grpc/index.d.mts +4 -3
- package/dist/grpc/index.mjs +4 -2
- package/dist/grpc/proto/sui/forking/v1alpha/forking_service.client.d.mts +4 -4
- package/dist/grpc/proto/sui/rpc/v2/execution_status.d.mts +9 -1
- package/dist/grpc/proto/sui/rpc/v2/execution_status.d.mts.map +1 -1
- package/dist/grpc/proto/sui/rpc/v2/execution_status.mjs +8 -0
- package/dist/grpc/proto/sui/rpc/v2/execution_status.mjs.map +1 -1
- package/dist/grpc/proto/sui/rpc/v2/ledger_service.client.d.mts +4 -4
- package/dist/grpc/proto/sui/rpc/v2/move_package_service.client.d.mts +4 -4
- package/dist/grpc/proto/sui/rpc/v2/name_service.client.d.mts +4 -4
- package/dist/grpc/proto/sui/rpc/v2/signature_verification_service.client.d.mts +4 -4
- package/dist/grpc/proto/sui/rpc/v2/state_service.client.d.mts +4 -4
- package/dist/grpc/proto/sui/rpc/v2/subscription_service.client.d.mts +4 -4
- package/dist/grpc/proto/sui/rpc/v2/transaction.d.mts +50 -2
- package/dist/grpc/proto/sui/rpc/v2/transaction.d.mts.map +1 -1
- package/dist/grpc/proto/sui/rpc/v2/transaction.mjs +36 -1
- package/dist/grpc/proto/sui/rpc/v2/transaction.mjs.map +1 -1
- package/dist/grpc/proto/sui/rpc/v2/transaction_execution_service.client.d.mts +4 -4
- package/dist/grpc/proto/types.d.mts +2 -2
- package/dist/grpc/proto/types.mjs +2 -1
- package/dist/grpc/transport.d.mts +18 -0
- package/dist/grpc/transport.d.mts.map +1 -0
- package/dist/grpc/transport.mjs +97 -0
- package/dist/grpc/transport.mjs.map +1 -0
- package/dist/transactions/Transaction.d.mts +19 -7
- package/dist/transactions/Transaction.d.mts.map +1 -1
- package/dist/transactions/data/internal.d.mts +133 -109
- package/dist/transactions/data/internal.d.mts.map +1 -1
- package/dist/transactions/data/internal.mjs +11 -2
- package/dist/transactions/data/internal.mjs.map +1 -1
- package/dist/transactions/data/v1.d.mts +22 -0
- package/dist/transactions/data/v1.d.mts.map +1 -1
- package/dist/transactions/data/v1.mjs +27 -4
- package/dist/transactions/data/v1.mjs.map +1 -1
- package/dist/transactions/data/v2.d.mts +12 -0
- package/dist/transactions/data/v2.d.mts.map +1 -1
- package/dist/transactions/data/v2.mjs +3 -2
- package/dist/transactions/data/v2.mjs.map +1 -1
- package/dist/version.mjs +1 -1
- package/dist/version.mjs.map +1 -1
- package/dist/zklogin/bcs.d.mts +14 -14
- package/docs/clients/grpc.md +31 -7
- package/package.json +1 -1
- package/src/bcs/bcs.ts +45 -0
- package/src/bcs/effects.ts +3 -0
- package/src/bcs/transactions.ts +1 -0
- package/src/bcs/types.ts +10 -1
- package/src/client/transaction-resolver.ts +79 -9
- package/src/grpc/client.ts +12 -4
- package/src/grpc/core.ts +18 -14
- package/src/grpc/index.ts +7 -3
- package/src/grpc/proto/sui/rpc/v2/execution_status.ts +8 -0
- package/src/grpc/proto/sui/rpc/v2/transaction.ts +68 -0
- package/src/grpc/transport.ts +160 -0
- package/src/transactions/data/internal.ts +19 -0
- package/src/transactions/data/v1.ts +51 -12
- package/src/transactions/data/v2.ts +2 -0
- package/src/version.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
# @mysten/sui.js
|
|
2
2
|
|
|
3
|
+
## 2.29.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- ee96ca4: `GrpcWebFetchTransport` exported from `@mysten/sui/grpc` is now a subclass of the
|
|
8
|
+
transport of the same name from `@protobuf-ts/grpcweb-transport`, fixing two defects in it. Status
|
|
9
|
+
messages are decoded instead of arriving percent-encoded as `Object%20not%20found:%200x1`. A call
|
|
10
|
+
ended by an abort takes its status from the reason: `DEADLINE_EXCEEDED` for an
|
|
11
|
+
`AbortSignal.timeout`, the status a reason carrying one gives, and `CANCELLED` for anything else,
|
|
12
|
+
where upstream reports all but a standard `AbortError` as `INTERNAL`.
|
|
13
|
+
|
|
14
|
+
`@mysten/sui/grpc` also exports the `RpcError` class and the `GrpcStatusCode` enum, so the errors
|
|
15
|
+
gRPC calls produce can be narrowed and coded without a direct `@protobuf-ts/*` dependency.
|
|
16
|
+
|
|
17
|
+
`SuiGrpcClient` builds one of these by default and now forwards the rest of `GrpcWebOptions`
|
|
18
|
+
(`fetch`, `format`, `meta`, `timeout`, `interceptors`, `jsonOptions`, `binaryOptions`) to it,
|
|
19
|
+
which were previously accepted and ignored. A transport passed in by the caller is used as given.
|
|
20
|
+
|
|
21
|
+
## 2.28.0
|
|
22
|
+
|
|
23
|
+
### Minor Changes
|
|
24
|
+
|
|
25
|
+
- 5c16cf4: Add BCS, transaction schema, and gRPC support for `Validity` transaction expirations and
|
|
26
|
+
allowed proposers. Also synchronize recently added transaction and execution error variants.
|
|
27
|
+
|
|
28
|
+
The deprecated v1 JSON transaction format now represents `ValidDuring` and `Validity` expirations
|
|
29
|
+
instead of collapsing them to `{ None: true }`. Previously a `Transaction.serialize()` ->
|
|
30
|
+
`Transaction.from()` round trip silently discarded the expiration — and, for `Validity`, the set
|
|
31
|
+
of validators allowed to propose the transaction — so the rebuilt transaction signed materially
|
|
32
|
+
broader bytes. An expiration the v1 reader does not recognize is now an error rather than a silent
|
|
33
|
+
downgrade.
|
|
34
|
+
|
|
3
35
|
## 2.27.1
|
|
4
36
|
|
|
5
37
|
### Patch Changes
|
package/dist/bcs/bcs.d.mts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { TypeTag as TypeTag$1 } from "./types.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as _mysten_bcs1238 from "@mysten/bcs";
|
|
3
3
|
import { BcsType } from "@mysten/bcs";
|
|
4
4
|
|
|
5
5
|
//#region src/bcs/bcs.d.ts
|
|
6
6
|
declare const TypeTag: BcsType<string, string | TypeTag$1, string>;
|
|
7
|
-
declare function IntentMessage<T extends BcsType<any>>(T: T):
|
|
8
|
-
intent:
|
|
9
|
-
scope:
|
|
7
|
+
declare function IntentMessage<T extends BcsType<any>>(T: T): _mysten_bcs1238.BcsStruct<{
|
|
8
|
+
intent: _mysten_bcs1238.BcsStruct<{
|
|
9
|
+
scope: _mysten_bcs1238.BcsEnum<{
|
|
10
10
|
TransactionData: null;
|
|
11
11
|
TransactionEffects: null;
|
|
12
12
|
CheckpointSummary: null;
|
|
13
13
|
PersonalMessage: null;
|
|
14
14
|
}, "IntentScope">;
|
|
15
|
-
version:
|
|
15
|
+
version: _mysten_bcs1238.BcsEnum<{
|
|
16
16
|
V0: null;
|
|
17
17
|
}, "IntentVersion">;
|
|
18
|
-
appId:
|
|
18
|
+
appId: _mysten_bcs1238.BcsEnum<{
|
|
19
19
|
Sui: null;
|
|
20
20
|
}, "AppId">;
|
|
21
21
|
}, string>;
|
package/dist/bcs/bcs.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bcs.d.mts","names":[],"sources":["../../src/bcs/bcs.ts"],"mappings":";;;;;cAoIa,OAAA,EAAO,OAAA,kBAAA,SAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"bcs.d.mts","names":[],"sources":["../../src/bcs/bcs.ts"],"mappings":";;;;;cAoIa,OAAA,EAAO,OAAA,kBAAA,SAAA;AAAA,iBAkMJ,aAAA,WAAwB,OAAA,MAAA,CAAc,CAAA,EAAG,CAAA,mBAAC,SAAA;;WAAA,eAAA,CAAA,OAAA"}
|
package/dist/bcs/bcs.mjs
CHANGED
|
@@ -158,10 +158,37 @@ const ValidDuring = bcs.struct("ValidDuring", {
|
|
|
158
158
|
chain: ObjectDigest,
|
|
159
159
|
nonce: bcs.u32()
|
|
160
160
|
});
|
|
161
|
+
function assertAllowedProposersNotEmpty(proposers) {
|
|
162
|
+
if (proposers.length === 0) throw new Error("Allowed proposers must not be empty");
|
|
163
|
+
return proposers;
|
|
164
|
+
}
|
|
165
|
+
function assertAllowedProposersStrictlyIncreasing(proposers) {
|
|
166
|
+
assertAllowedProposersNotEmpty(proposers);
|
|
167
|
+
for (let i = 1; i < proposers.length; i++) if (proposers[i] <= proposers[i - 1]) throw new Error("Allowed proposers must be strictly increasing");
|
|
168
|
+
return proposers;
|
|
169
|
+
}
|
|
170
|
+
const AllowedProposerIndices = bcs.vector(bcs.u32()).transform({
|
|
171
|
+
input: assertAllowedProposersStrictlyIncreasing,
|
|
172
|
+
output: assertAllowedProposersNotEmpty
|
|
173
|
+
});
|
|
174
|
+
const AllowedProposers = bcs.struct("AllowedProposers", {
|
|
175
|
+
epoch: bcs.u64(),
|
|
176
|
+
proposers: AllowedProposerIndices
|
|
177
|
+
});
|
|
178
|
+
const Validity = bcs.struct("Validity", {
|
|
179
|
+
minEpoch: bcs.option(bcs.u64()),
|
|
180
|
+
maxEpoch: bcs.option(bcs.u64()),
|
|
181
|
+
minTimestamp: bcs.option(bcs.u64()),
|
|
182
|
+
maxTimestamp: bcs.option(bcs.u64()),
|
|
183
|
+
chain: ObjectDigest,
|
|
184
|
+
nonce: bcs.u32(),
|
|
185
|
+
allowedProposers: bcs.option(AllowedProposers)
|
|
186
|
+
});
|
|
161
187
|
const TransactionExpiration = bcs.enum("TransactionExpiration", {
|
|
162
188
|
None: null,
|
|
163
189
|
Epoch: unsafe_u64(),
|
|
164
|
-
ValidDuring
|
|
190
|
+
ValidDuring,
|
|
191
|
+
Validity
|
|
165
192
|
});
|
|
166
193
|
const StructTag = bcs.struct("StructTag", {
|
|
167
194
|
address: Address,
|
|
@@ -271,5 +298,5 @@ const ObjectInner = bcs.struct("ObjectInner", {
|
|
|
271
298
|
});
|
|
272
299
|
|
|
273
300
|
//#endregion
|
|
274
|
-
export { Address, AppId, Argument, CallArg, Command, CompressedSignature, Data, GasData, Intent, IntentMessage, IntentScope, IntentVersion, MoveObject, MoveObjectType, MovePackage, MultiSig, MultiSigPkMap, MultiSigPublicKey, ObjectArg, ObjectDigest, ObjectInner, Owner, PasskeyAuthenticator, ProgrammableMoveCall, ProgrammableTransaction, PublicKey, SharedObjectRef, StructTag, SuiObjectRef, TransactionExpiration, TypeOrigin, TypeTag, UpgradeInfo, base64String };
|
|
301
|
+
export { Address, AppId, Argument, CallArg, Command, CompressedSignature, Data, GasData, Intent, IntentMessage, IntentScope, IntentVersion, MoveObject, MoveObjectType, MovePackage, MultiSig, MultiSigPkMap, MultiSigPublicKey, ObjectArg, ObjectDigest, ObjectInner, Owner, PasskeyAuthenticator, ProgrammableMoveCall, ProgrammableTransaction, PublicKey, SharedObjectRef, StructTag, SuiObjectRef, TransactionExpiration, TypeOrigin, TypeTag, UpgradeInfo, assertAllowedProposersNotEmpty, assertAllowedProposersStrictlyIncreasing, base64String };
|
|
275
302
|
//# sourceMappingURL=bcs.mjs.map
|
package/dist/bcs/bcs.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bcs.mjs","names":[],"sources":["../../src/bcs/bcs.ts"],"sourcesContent":["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { BcsType, BcsTypeOptions } from '@mysten/bcs';\nimport { bcs, fromBase58, fromBase64, fromHex, toBase58, toBase64, toHex } from '@mysten/bcs';\n\nimport { isValidSuiAddress, normalizeSuiAddress, SUI_ADDRESS_LENGTH } from '../utils/sui-types.js';\nimport { TypeTagSerializer } from './type-tag-serializer.js';\nimport type { TypeTag as TypeTagType } from './types.js';\n\nfunction unsafe_u64(options?: BcsTypeOptions<number>) {\n\treturn bcs\n\t\t.u64({\n\t\t\tname: 'unsafe_u64',\n\t\t\t...(options as object),\n\t\t})\n\t\t.transform({\n\t\t\tinput: (val: number | string) => val,\n\t\t\toutput: (val) => Number(val),\n\t\t});\n}\n\nfunction optionEnum<T extends BcsType<any, any>>(type: T) {\n\treturn bcs.enum('Option', {\n\t\tNone: null,\n\t\tSome: type,\n\t});\n}\n\nexport const Address = bcs.bytes(SUI_ADDRESS_LENGTH).transform({\n\tvalidate: (val) => {\n\t\tconst address = typeof val === 'string' ? val : toHex(val);\n\t\tif (!address || !isValidSuiAddress(normalizeSuiAddress(address))) {\n\t\t\tthrow new Error(`Invalid Sui address ${address}`);\n\t\t}\n\t},\n\tinput: (val: string | Uint8Array) =>\n\t\ttypeof val === 'string' ? fromHex(normalizeSuiAddress(val)) : val,\n\toutput: (val) => normalizeSuiAddress(toHex(val)),\n});\n\nexport const ObjectDigest = bcs.byteVector().transform({\n\tname: 'ObjectDigest',\n\tinput: (value: string) => fromBase58(value),\n\toutput: (value) => toBase58(new Uint8Array(value)),\n\tvalidate: (value) => {\n\t\tif (fromBase58(value).length !== 32) {\n\t\t\tthrow new Error('ObjectDigest must be 32 bytes');\n\t\t}\n\t},\n});\n\nexport const SuiObjectRef = bcs.struct('SuiObjectRef', {\n\tobjectId: Address,\n\tversion: bcs.u64(),\n\tdigest: ObjectDigest,\n});\n\nexport const SharedObjectRef = bcs.struct('SharedObjectRef', {\n\tobjectId: Address,\n\tinitialSharedVersion: bcs.u64(),\n\tmutable: bcs.bool(),\n});\n\nexport const ObjectArg = bcs.enum('ObjectArg', {\n\tImmOrOwnedObject: SuiObjectRef,\n\tSharedObject: SharedObjectRef,\n\tReceiving: SuiObjectRef,\n});\n\n// Rust: crates/sui-types/src/object.rs\nexport const Owner = bcs.enum('Owner', {\n\tAddressOwner: Address,\n\tObjectOwner: Address,\n\tShared: bcs.struct('Shared', {\n\t\tinitialSharedVersion: bcs.u64(),\n\t}),\n\tImmutable: null,\n\tConsensusAddressOwner: bcs.struct('ConsensusAddressOwner', {\n\t\tstartVersion: bcs.u64(),\n\t\towner: Address,\n\t}),\n});\n\n// Rust: crates/sui-types/src/transaction.rs\nexport const Reservation = bcs.enum('Reservation', {\n\tMaxAmountU64: bcs.u64(),\n});\n\n// Rust: crates/sui-types/src/transaction.rs\nexport const WithdrawalType = bcs.enum('WithdrawalType', {\n\tBalance: bcs.lazy(() => TypeTag),\n});\n\n// Rust: crates/sui-types/src/transaction.rs\nexport const WithdrawFrom = bcs.enum('WithdrawFrom', {\n\tSender: null,\n\tSponsor: null,\n});\n\n// Rust: crates/sui-types/src/transaction.rs\nexport const FundsWithdrawal = bcs.struct('FundsWithdrawal', {\n\treservation: Reservation,\n\ttypeArg: WithdrawalType,\n\twithdrawFrom: WithdrawFrom,\n});\n\nexport const CallArg = bcs.enum('CallArg', {\n\tPure: bcs.struct('Pure', {\n\t\tbytes: bcs.byteVector().transform({\n\t\t\tinput: (val: string | Uint8Array) => (typeof val === 'string' ? fromBase64(val) : val),\n\t\t\toutput: (val) => toBase64(new Uint8Array(val)),\n\t\t}),\n\t}),\n\tObject: ObjectArg,\n\tFundsWithdrawal: FundsWithdrawal,\n});\n\nconst InnerTypeTag: BcsType<TypeTagType, TypeTagType> = bcs.enum('TypeTag', {\n\tbool: null,\n\tu8: null,\n\tu64: null,\n\tu128: null,\n\taddress: null,\n\tsigner: null,\n\tvector: bcs.lazy(() => InnerTypeTag),\n\tstruct: bcs.lazy(() => StructTag),\n\tu16: null,\n\tu32: null,\n\tu256: null,\n}) as BcsType<TypeTagType>;\n\nexport const TypeTag = InnerTypeTag.transform({\n\tinput: (typeTag: string | TypeTagType) =>\n\t\ttypeof typeTag === 'string' ? TypeTagSerializer.parseFromStr(typeTag, true) : typeTag,\n\toutput: (typeTag: TypeTagType) => TypeTagSerializer.tagToString(typeTag),\n});\n\nexport const Argument = bcs.enum('Argument', {\n\tGasCoin: null,\n\tInput: bcs.u16(),\n\tResult: bcs.u16(),\n\tNestedResult: bcs.tuple([bcs.u16(), bcs.u16()]),\n});\n\nexport const ProgrammableMoveCall = bcs.struct('ProgrammableMoveCall', {\n\tpackage: Address,\n\tmodule: bcs.string(),\n\tfunction: bcs.string(),\n\ttypeArguments: bcs.vector(TypeTag),\n\targuments: bcs.vector(Argument),\n});\n\nexport const Command = bcs.enum('Command', {\n\t/**\n\t * A Move Call - any public Move function can be called via\n\t * this transaction. The results can be used that instant to pass\n\t * into the next transaction.\n\t */\n\tMoveCall: ProgrammableMoveCall,\n\t/**\n\t * Transfer vector of objects to a receiver.\n\t */\n\tTransferObjects: bcs.struct('TransferObjects', {\n\t\tobjects: bcs.vector(Argument),\n\t\taddress: Argument,\n\t}),\n\t// /**\n\t// * Split `amount` from a `coin`.\n\t// */\n\tSplitCoins: bcs.struct('SplitCoins', {\n\t\tcoin: Argument,\n\t\tamounts: bcs.vector(Argument),\n\t}),\n\t// /**\n\t// * Merge Vector of Coins (`sources`) into a `destination`.\n\t// */\n\tMergeCoins: bcs.struct('MergeCoins', {\n\t\tdestination: Argument,\n\t\tsources: bcs.vector(Argument),\n\t}),\n\t// /**\n\t// * Publish a Move module.\n\t// */\n\tPublish: bcs.struct('Publish', {\n\t\tmodules: bcs.vector(\n\t\t\tbcs.byteVector().transform({\n\t\t\t\tinput: (val: string | Uint8Array) => (typeof val === 'string' ? fromBase64(val) : val),\n\t\t\t\toutput: (val) => toBase64(new Uint8Array(val)),\n\t\t\t}),\n\t\t),\n\t\tdependencies: bcs.vector(Address),\n\t}),\n\t// /**\n\t// * Build a vector of objects using the input arguments.\n\t// * It is impossible to export construct a `vector<T: key>` otherwise,\n\t// * so this call serves a utility function.\n\t// */\n\tMakeMoveVec: bcs.struct('MakeMoveVec', {\n\t\ttype: optionEnum(TypeTag).transform({\n\t\t\tinput: (val: string | null) =>\n\t\t\t\tval === null\n\t\t\t\t\t? {\n\t\t\t\t\t\t\tNone: true,\n\t\t\t\t\t\t}\n\t\t\t\t\t: {\n\t\t\t\t\t\t\tSome: val,\n\t\t\t\t\t\t},\n\t\t\toutput: (val) => val.Some ?? null,\n\t\t}),\n\t\telements: bcs.vector(Argument),\n\t}),\n\tUpgrade: bcs.struct('Upgrade', {\n\t\tmodules: bcs.vector(\n\t\t\tbcs.byteVector().transform({\n\t\t\t\tinput: (val: string | Uint8Array) => (typeof val === 'string' ? fromBase64(val) : val),\n\t\t\t\toutput: (val) => toBase64(new Uint8Array(val)),\n\t\t\t}),\n\t\t),\n\t\tdependencies: bcs.vector(Address),\n\t\tpackage: Address,\n\t\tticket: Argument,\n\t}),\n});\n\nexport const ProgrammableTransaction = bcs.struct('ProgrammableTransaction', {\n\tinputs: bcs.vector(CallArg),\n\tcommands: bcs.vector(Command),\n});\n\n// Rust: crates/sui-types/src/transaction.rs\nexport const ValidDuring = bcs.struct('ValidDuring', {\n\tminEpoch: bcs.option(bcs.u64()),\n\tmaxEpoch: bcs.option(bcs.u64()),\n\tminTimestamp: bcs.option(bcs.u64()),\n\tmaxTimestamp: bcs.option(bcs.u64()),\n\tchain: ObjectDigest,\n\tnonce: bcs.u32(),\n});\n\nexport const TransactionExpiration = bcs.enum('TransactionExpiration', {\n\tNone: null,\n\tEpoch: unsafe_u64(),\n\tValidDuring: ValidDuring,\n});\n\nexport const StructTag = bcs.struct('StructTag', {\n\taddress: Address,\n\tmodule: bcs.string(),\n\tname: bcs.string(),\n\ttypeParams: bcs.vector(InnerTypeTag),\n});\n\nexport const GasData = bcs.struct('GasData', {\n\tpayment: bcs.vector(SuiObjectRef),\n\towner: Address,\n\tprice: bcs.u64(),\n\tbudget: bcs.u64(),\n});\n\nexport const IntentScope = bcs.enum('IntentScope', {\n\tTransactionData: null,\n\tTransactionEffects: null,\n\tCheckpointSummary: null,\n\tPersonalMessage: null,\n});\n\nexport const IntentVersion = bcs.enum('IntentVersion', {\n\tV0: null,\n});\n\nexport const AppId = bcs.enum('AppId', {\n\tSui: null,\n});\n\nexport const Intent = bcs.struct('Intent', {\n\tscope: IntentScope,\n\tversion: IntentVersion,\n\tappId: AppId,\n});\n\nexport function IntentMessage<T extends BcsType<any>>(T: T) {\n\treturn bcs.struct(`IntentMessage<${T.name}>`, {\n\t\tintent: Intent,\n\t\tvalue: T,\n\t});\n}\n\nexport const CompressedSignature = bcs.enum('CompressedSignature', {\n\tED25519: bcs.bytes(64),\n\tSecp256k1: bcs.bytes(64),\n\tSecp256r1: bcs.bytes(64),\n\tZkLogin: bcs.byteVector(),\n\tPasskey: bcs.byteVector(),\n});\n\nexport const PublicKey = bcs.enum('PublicKey', {\n\tED25519: bcs.bytes(32),\n\tSecp256k1: bcs.bytes(33),\n\tSecp256r1: bcs.bytes(33),\n\tZkLogin: bcs.byteVector(),\n\tPasskey: bcs.bytes(33),\n});\n\nexport const MultiSigPkMap = bcs.struct('MultiSigPkMap', {\n\tpubKey: PublicKey,\n\tweight: bcs.u8(),\n});\n\nexport const MultiSigPublicKey = bcs.struct('MultiSigPublicKey', {\n\tpk_map: bcs.vector(MultiSigPkMap),\n\tthreshold: bcs.u16(),\n});\n\nexport const MultiSig = bcs.struct('MultiSig', {\n\tsigs: bcs.vector(CompressedSignature),\n\tbitmap: bcs.u16(),\n\tmultisig_pk: MultiSigPublicKey,\n});\n\nexport const base64String = bcs.byteVector().transform({\n\tinput: (val: string | Uint8Array) => (typeof val === 'string' ? fromBase64(val) : val),\n\toutput: (val) => toBase64(new Uint8Array(val)),\n});\n\nexport const PasskeyAuthenticator = bcs.struct('PasskeyAuthenticator', {\n\tauthenticatorData: bcs.byteVector(),\n\tclientDataJson: bcs.string(),\n\tuserSignature: bcs.byteVector(),\n});\n\n// Rust: crates/sui-types/src/object.rs\nexport const MoveObjectType = bcs.enum('MoveObjectType', {\n\tOther: StructTag,\n\tGasCoin: null,\n\tStakedSui: null,\n\tCoin: TypeTag,\n\tAccumulatorBalanceWrapper: null,\n});\n\n// Rust: crates/sui-types/src/object.rs\nexport const TypeOrigin = bcs.struct('TypeOrigin', {\n\tmoduleName: bcs.string(),\n\tdatatypeName: bcs.string(),\n\tpackage: Address,\n});\n\n// Rust: crates/sui-types/src/object.rs\nexport const UpgradeInfo = bcs.struct('UpgradeInfo', {\n\tupgradedId: Address,\n\tupgradedVersion: bcs.u64(),\n});\n\n// Rust: crates/sui-types/src/object.rs\nexport const MovePackage = bcs.struct('MovePackage', {\n\tid: Address,\n\tversion: bcs.u64(),\n\tmoduleMap: bcs.map(bcs.string(), bcs.byteVector()),\n\ttypeOriginTable: bcs.vector(TypeOrigin),\n\tlinkageTable: bcs.map(Address, UpgradeInfo),\n});\n\n// Rust: crates/sui-types/src/object.rs\nexport const MoveObject = bcs.struct('MoveObject', {\n\ttype: MoveObjectType,\n\thasPublicTransfer: bcs.bool(),\n\tversion: bcs.u64(),\n\tcontents: bcs.byteVector(),\n});\n\n// Rust: crates/sui-types/src/object.rs\nexport const Data = bcs.enum('Data', {\n\tMove: MoveObject,\n\tPackage: MovePackage,\n});\n\n// Rust: crates/sui-types/src/object.rs\nexport const ObjectInner = bcs.struct('ObjectInner', {\n\tdata: Data,\n\towner: Owner,\n\tpreviousTransaction: ObjectDigest,\n\tstorageRebate: bcs.u64(),\n});\n"],"mappings":";;;;;AAUA,SAAS,WAAW,SAAkC;AACrD,QAAO,IACL,IAAI;EACJ,MAAM;EACN,GAAI;EACJ,CAAC,CACD,UAAU;EACV,QAAQ,QAAyB;EACjC,SAAS,QAAQ,OAAO,IAAI;EAC5B,CAAC;;AAGJ,SAAS,WAAwC,MAAS;AACzD,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AAC;CAClD,iBAAiB,IAAI,OAAO,WAAW;CACvC,cAAc,IAAI,IAAI,SAAS,YAAY;CAC3C,CAAC;AAGF,MAAa,aAAa,IAAI,OAAO,cAAc;CAClD,MAAM;CACN,mBAAmB,IAAI,MAAM;CAC7B,SAAS,IAAI,KAAK;CAClB,UAAU,IAAI,YAAY;CAC1B,CAAC;AAGF,MAAa,OAAO,IAAI,KAAK,QAAQ;CACpC,MAAM;CACN,SAAS;CACT,CAAC;AAGF,MAAa,cAAc,IAAI,OAAO,eAAe;CACpD,MAAM;CACN,OAAO;CACP,qBAAqB;CACrB,eAAe,IAAI,KAAK;CACxB,CAAC"}
|
|
1
|
+
{"version":3,"file":"bcs.mjs","names":[],"sources":["../../src/bcs/bcs.ts"],"sourcesContent":["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { BcsType, BcsTypeOptions } from '@mysten/bcs';\nimport { bcs, fromBase58, fromBase64, fromHex, toBase58, toBase64, toHex } from '@mysten/bcs';\n\nimport { isValidSuiAddress, normalizeSuiAddress, SUI_ADDRESS_LENGTH } from '../utils/sui-types.js';\nimport { TypeTagSerializer } from './type-tag-serializer.js';\nimport type { TypeTag as TypeTagType } from './types.js';\n\nfunction unsafe_u64(options?: BcsTypeOptions<number>) {\n\treturn bcs\n\t\t.u64({\n\t\t\tname: 'unsafe_u64',\n\t\t\t...(options as object),\n\t\t})\n\t\t.transform({\n\t\t\tinput: (val: number | string) => val,\n\t\t\toutput: (val) => Number(val),\n\t\t});\n}\n\nfunction optionEnum<T extends BcsType<any, any>>(type: T) {\n\treturn bcs.enum('Option', {\n\t\tNone: null,\n\t\tSome: type,\n\t});\n}\n\nexport const Address = bcs.bytes(SUI_ADDRESS_LENGTH).transform({\n\tvalidate: (val) => {\n\t\tconst address = typeof val === 'string' ? val : toHex(val);\n\t\tif (!address || !isValidSuiAddress(normalizeSuiAddress(address))) {\n\t\t\tthrow new Error(`Invalid Sui address ${address}`);\n\t\t}\n\t},\n\tinput: (val: string | Uint8Array) =>\n\t\ttypeof val === 'string' ? fromHex(normalizeSuiAddress(val)) : val,\n\toutput: (val) => normalizeSuiAddress(toHex(val)),\n});\n\nexport const ObjectDigest = bcs.byteVector().transform({\n\tname: 'ObjectDigest',\n\tinput: (value: string) => fromBase58(value),\n\toutput: (value) => toBase58(new Uint8Array(value)),\n\tvalidate: (value) => {\n\t\tif (fromBase58(value).length !== 32) {\n\t\t\tthrow new Error('ObjectDigest must be 32 bytes');\n\t\t}\n\t},\n});\n\nexport const SuiObjectRef = bcs.struct('SuiObjectRef', {\n\tobjectId: Address,\n\tversion: bcs.u64(),\n\tdigest: ObjectDigest,\n});\n\nexport const SharedObjectRef = bcs.struct('SharedObjectRef', {\n\tobjectId: Address,\n\tinitialSharedVersion: bcs.u64(),\n\tmutable: bcs.bool(),\n});\n\nexport const ObjectArg = bcs.enum('ObjectArg', {\n\tImmOrOwnedObject: SuiObjectRef,\n\tSharedObject: SharedObjectRef,\n\tReceiving: SuiObjectRef,\n});\n\n// Rust: crates/sui-types/src/object.rs\nexport const Owner = bcs.enum('Owner', {\n\tAddressOwner: Address,\n\tObjectOwner: Address,\n\tShared: bcs.struct('Shared', {\n\t\tinitialSharedVersion: bcs.u64(),\n\t}),\n\tImmutable: null,\n\tConsensusAddressOwner: bcs.struct('ConsensusAddressOwner', {\n\t\tstartVersion: bcs.u64(),\n\t\towner: Address,\n\t}),\n});\n\n// Rust: crates/sui-types/src/transaction.rs\nexport const Reservation = bcs.enum('Reservation', {\n\tMaxAmountU64: bcs.u64(),\n});\n\n// Rust: crates/sui-types/src/transaction.rs\nexport const WithdrawalType = bcs.enum('WithdrawalType', {\n\tBalance: bcs.lazy(() => TypeTag),\n});\n\n// Rust: crates/sui-types/src/transaction.rs\nexport const WithdrawFrom = bcs.enum('WithdrawFrom', {\n\tSender: null,\n\tSponsor: null,\n});\n\n// Rust: crates/sui-types/src/transaction.rs\nexport const FundsWithdrawal = bcs.struct('FundsWithdrawal', {\n\treservation: Reservation,\n\ttypeArg: WithdrawalType,\n\twithdrawFrom: WithdrawFrom,\n});\n\nexport const CallArg = bcs.enum('CallArg', {\n\tPure: bcs.struct('Pure', {\n\t\tbytes: bcs.byteVector().transform({\n\t\t\tinput: (val: string | Uint8Array) => (typeof val === 'string' ? fromBase64(val) : val),\n\t\t\toutput: (val) => toBase64(new Uint8Array(val)),\n\t\t}),\n\t}),\n\tObject: ObjectArg,\n\tFundsWithdrawal: FundsWithdrawal,\n});\n\nconst InnerTypeTag: BcsType<TypeTagType, TypeTagType> = bcs.enum('TypeTag', {\n\tbool: null,\n\tu8: null,\n\tu64: null,\n\tu128: null,\n\taddress: null,\n\tsigner: null,\n\tvector: bcs.lazy(() => InnerTypeTag),\n\tstruct: bcs.lazy(() => StructTag),\n\tu16: null,\n\tu32: null,\n\tu256: null,\n}) as BcsType<TypeTagType>;\n\nexport const TypeTag = InnerTypeTag.transform({\n\tinput: (typeTag: string | TypeTagType) =>\n\t\ttypeof typeTag === 'string' ? TypeTagSerializer.parseFromStr(typeTag, true) : typeTag,\n\toutput: (typeTag: TypeTagType) => TypeTagSerializer.tagToString(typeTag),\n});\n\nexport const Argument = bcs.enum('Argument', {\n\tGasCoin: null,\n\tInput: bcs.u16(),\n\tResult: bcs.u16(),\n\tNestedResult: bcs.tuple([bcs.u16(), bcs.u16()]),\n});\n\nexport const ProgrammableMoveCall = bcs.struct('ProgrammableMoveCall', {\n\tpackage: Address,\n\tmodule: bcs.string(),\n\tfunction: bcs.string(),\n\ttypeArguments: bcs.vector(TypeTag),\n\targuments: bcs.vector(Argument),\n});\n\nexport const Command = bcs.enum('Command', {\n\t/**\n\t * A Move Call - any public Move function can be called via\n\t * this transaction. The results can be used that instant to pass\n\t * into the next transaction.\n\t */\n\tMoveCall: ProgrammableMoveCall,\n\t/**\n\t * Transfer vector of objects to a receiver.\n\t */\n\tTransferObjects: bcs.struct('TransferObjects', {\n\t\tobjects: bcs.vector(Argument),\n\t\taddress: Argument,\n\t}),\n\t// /**\n\t// * Split `amount` from a `coin`.\n\t// */\n\tSplitCoins: bcs.struct('SplitCoins', {\n\t\tcoin: Argument,\n\t\tamounts: bcs.vector(Argument),\n\t}),\n\t// /**\n\t// * Merge Vector of Coins (`sources`) into a `destination`.\n\t// */\n\tMergeCoins: bcs.struct('MergeCoins', {\n\t\tdestination: Argument,\n\t\tsources: bcs.vector(Argument),\n\t}),\n\t// /**\n\t// * Publish a Move module.\n\t// */\n\tPublish: bcs.struct('Publish', {\n\t\tmodules: bcs.vector(\n\t\t\tbcs.byteVector().transform({\n\t\t\t\tinput: (val: string | Uint8Array) => (typeof val === 'string' ? fromBase64(val) : val),\n\t\t\t\toutput: (val) => toBase64(new Uint8Array(val)),\n\t\t\t}),\n\t\t),\n\t\tdependencies: bcs.vector(Address),\n\t}),\n\t// /**\n\t// * Build a vector of objects using the input arguments.\n\t// * It is impossible to export construct a `vector<T: key>` otherwise,\n\t// * so this call serves a utility function.\n\t// */\n\tMakeMoveVec: bcs.struct('MakeMoveVec', {\n\t\ttype: optionEnum(TypeTag).transform({\n\t\t\tinput: (val: string | null) =>\n\t\t\t\tval === null\n\t\t\t\t\t? {\n\t\t\t\t\t\t\tNone: true,\n\t\t\t\t\t\t}\n\t\t\t\t\t: {\n\t\t\t\t\t\t\tSome: val,\n\t\t\t\t\t\t},\n\t\t\toutput: (val) => val.Some ?? null,\n\t\t}),\n\t\telements: bcs.vector(Argument),\n\t}),\n\tUpgrade: bcs.struct('Upgrade', {\n\t\tmodules: bcs.vector(\n\t\t\tbcs.byteVector().transform({\n\t\t\t\tinput: (val: string | Uint8Array) => (typeof val === 'string' ? fromBase64(val) : val),\n\t\t\t\toutput: (val) => toBase64(new Uint8Array(val)),\n\t\t\t}),\n\t\t),\n\t\tdependencies: bcs.vector(Address),\n\t\tpackage: Address,\n\t\tticket: Argument,\n\t}),\n});\n\nexport const ProgrammableTransaction = bcs.struct('ProgrammableTransaction', {\n\tinputs: bcs.vector(CallArg),\n\tcommands: bcs.vector(Command),\n});\n\n// Rust: crates/sui-types/src/transaction.rs\nexport const ValidDuring = bcs.struct('ValidDuring', {\n\tminEpoch: bcs.option(bcs.u64()),\n\tmaxEpoch: bcs.option(bcs.u64()),\n\tminTimestamp: bcs.option(bcs.u64()),\n\tmaxTimestamp: bcs.option(bcs.u64()),\n\tchain: ObjectDigest,\n\tnonce: bcs.u32(),\n});\n\nexport function assertAllowedProposersNotEmpty(proposers: number[]) {\n\tif (proposers.length === 0) {\n\t\tthrow new Error('Allowed proposers must not be empty');\n\t}\n\n\treturn proposers;\n}\n\nexport function assertAllowedProposersStrictlyIncreasing(proposers: number[]) {\n\tassertAllowedProposersNotEmpty(proposers);\n\n\tfor (let i = 1; i < proposers.length; i++) {\n\t\tif (proposers[i] <= proposers[i - 1]) {\n\t\t\tthrow new Error('Allowed proposers must be strictly increasing');\n\t\t}\n\t}\n\n\treturn proposers;\n}\n\n// Upstream only checks sortedness in `validity_check`, on submission, so decoding an unsorted\n// set must succeed. Empty is a deserialization error there, and here.\nconst AllowedProposerIndices = bcs.vector(bcs.u32()).transform({\n\tinput: assertAllowedProposersStrictlyIncreasing,\n\toutput: assertAllowedProposersNotEmpty,\n});\n\n// Rust: crates/sui-types/src/transaction.rs\nexport const AllowedProposers = bcs.struct('AllowedProposers', {\n\tepoch: bcs.u64(),\n\tproposers: AllowedProposerIndices,\n});\n\n// Rust: crates/sui-types/src/transaction.rs\nexport const Validity = bcs.struct('Validity', {\n\tminEpoch: bcs.option(bcs.u64()),\n\tmaxEpoch: bcs.option(bcs.u64()),\n\tminTimestamp: bcs.option(bcs.u64()),\n\tmaxTimestamp: bcs.option(bcs.u64()),\n\tchain: ObjectDigest,\n\tnonce: bcs.u32(),\n\tallowedProposers: bcs.option(AllowedProposers),\n});\n\nexport const TransactionExpiration = bcs.enum('TransactionExpiration', {\n\tNone: null,\n\tEpoch: unsafe_u64(),\n\tValidDuring: ValidDuring,\n\tValidity,\n});\n\nexport const StructTag = bcs.struct('StructTag', {\n\taddress: Address,\n\tmodule: bcs.string(),\n\tname: bcs.string(),\n\ttypeParams: bcs.vector(InnerTypeTag),\n});\n\nexport const GasData = bcs.struct('GasData', {\n\tpayment: bcs.vector(SuiObjectRef),\n\towner: Address,\n\tprice: bcs.u64(),\n\tbudget: bcs.u64(),\n});\n\nexport const IntentScope = bcs.enum('IntentScope', {\n\tTransactionData: null,\n\tTransactionEffects: null,\n\tCheckpointSummary: null,\n\tPersonalMessage: null,\n});\n\nexport const IntentVersion = bcs.enum('IntentVersion', {\n\tV0: null,\n});\n\nexport const AppId = bcs.enum('AppId', {\n\tSui: null,\n});\n\nexport const Intent = bcs.struct('Intent', {\n\tscope: IntentScope,\n\tversion: IntentVersion,\n\tappId: AppId,\n});\n\nexport function IntentMessage<T extends BcsType<any>>(T: T) {\n\treturn bcs.struct(`IntentMessage<${T.name}>`, {\n\t\tintent: Intent,\n\t\tvalue: T,\n\t});\n}\n\nexport const CompressedSignature = bcs.enum('CompressedSignature', {\n\tED25519: bcs.bytes(64),\n\tSecp256k1: bcs.bytes(64),\n\tSecp256r1: bcs.bytes(64),\n\tZkLogin: bcs.byteVector(),\n\tPasskey: bcs.byteVector(),\n});\n\nexport const PublicKey = bcs.enum('PublicKey', {\n\tED25519: bcs.bytes(32),\n\tSecp256k1: bcs.bytes(33),\n\tSecp256r1: bcs.bytes(33),\n\tZkLogin: bcs.byteVector(),\n\tPasskey: bcs.bytes(33),\n});\n\nexport const MultiSigPkMap = bcs.struct('MultiSigPkMap', {\n\tpubKey: PublicKey,\n\tweight: bcs.u8(),\n});\n\nexport const MultiSigPublicKey = bcs.struct('MultiSigPublicKey', {\n\tpk_map: bcs.vector(MultiSigPkMap),\n\tthreshold: bcs.u16(),\n});\n\nexport const MultiSig = bcs.struct('MultiSig', {\n\tsigs: bcs.vector(CompressedSignature),\n\tbitmap: bcs.u16(),\n\tmultisig_pk: MultiSigPublicKey,\n});\n\nexport const base64String = bcs.byteVector().transform({\n\tinput: (val: string | Uint8Array) => (typeof val === 'string' ? fromBase64(val) : val),\n\toutput: (val) => toBase64(new Uint8Array(val)),\n});\n\nexport const PasskeyAuthenticator = bcs.struct('PasskeyAuthenticator', {\n\tauthenticatorData: bcs.byteVector(),\n\tclientDataJson: bcs.string(),\n\tuserSignature: bcs.byteVector(),\n});\n\n// Rust: crates/sui-types/src/object.rs\nexport const MoveObjectType = bcs.enum('MoveObjectType', {\n\tOther: StructTag,\n\tGasCoin: null,\n\tStakedSui: null,\n\tCoin: TypeTag,\n\tAccumulatorBalanceWrapper: null,\n});\n\n// Rust: crates/sui-types/src/object.rs\nexport const TypeOrigin = bcs.struct('TypeOrigin', {\n\tmoduleName: bcs.string(),\n\tdatatypeName: bcs.string(),\n\tpackage: Address,\n});\n\n// Rust: crates/sui-types/src/object.rs\nexport const UpgradeInfo = bcs.struct('UpgradeInfo', {\n\tupgradedId: Address,\n\tupgradedVersion: bcs.u64(),\n});\n\n// Rust: crates/sui-types/src/object.rs\nexport const MovePackage = bcs.struct('MovePackage', {\n\tid: Address,\n\tversion: bcs.u64(),\n\tmoduleMap: bcs.map(bcs.string(), bcs.byteVector()),\n\ttypeOriginTable: bcs.vector(TypeOrigin),\n\tlinkageTable: bcs.map(Address, UpgradeInfo),\n});\n\n// Rust: crates/sui-types/src/object.rs\nexport const MoveObject = bcs.struct('MoveObject', {\n\ttype: MoveObjectType,\n\thasPublicTransfer: bcs.bool(),\n\tversion: bcs.u64(),\n\tcontents: bcs.byteVector(),\n});\n\n// Rust: crates/sui-types/src/object.rs\nexport const Data = bcs.enum('Data', {\n\tMove: MoveObject,\n\tPackage: MovePackage,\n});\n\n// Rust: crates/sui-types/src/object.rs\nexport const ObjectInner = bcs.struct('ObjectInner', {\n\tdata: Data,\n\towner: Owner,\n\tpreviousTransaction: ObjectDigest,\n\tstorageRebate: bcs.u64(),\n});\n"],"mappings":";;;;;AAUA,SAAS,WAAW,SAAkC;AACrD,QAAO,IACL,IAAI;EACJ,MAAM;EACN,GAAI;EAC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OAAO;CACP,qBAAqB;CACrB,eAAe,IAAI,KAAK;CACxB,CAAC"}
|
package/dist/bcs/effects.mjs
CHANGED
|
@@ -45,7 +45,8 @@ const CommandArgumentError = bcs.enum("CommandArgumentError", {
|
|
|
45
45
|
ArgumentWithoutValue: null,
|
|
46
46
|
CannotMoveBorrowedValue: null,
|
|
47
47
|
CannotWriteToExtendedReference: null,
|
|
48
|
-
InvalidReferenceArgument: null
|
|
48
|
+
InvalidReferenceArgument: null,
|
|
49
|
+
InvalidTxContext: null
|
|
49
50
|
});
|
|
50
51
|
const TypeArgumentError = bcs.enum("TypeArgumentError", {
|
|
51
52
|
TypeNotFound: null,
|
package/dist/bcs/effects.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"effects.mjs","names":[],"sources":["../../src/bcs/effects.ts"],"sourcesContent":["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { bcs } from '@mysten/bcs';\n\nimport { Address, ObjectDigest, Owner, SuiObjectRef, TypeTag } from './bcs.js';\n\n// Rust: crates/sui-types/src/execution_status.rs (PackageUpgradeError enum)\nconst PackageUpgradeError = bcs.enum('PackageUpgradeError', {\n\tUnableToFetchPackage: bcs.struct('UnableToFetchPackage', { packageId: Address }),\n\tNotAPackage: bcs.struct('NotAPackage', { objectId: Address }),\n\tIncompatibleUpgrade: null,\n\tDigestDoesNotMatch: bcs.struct('DigestDoesNotMatch', { digest: bcs.byteVector() }),\n\tUnknownUpgradePolicy: bcs.struct('UnknownUpgradePolicy', { policy: bcs.u8() }),\n\tPackageIDDoesNotMatch: bcs.struct('PackageIDDoesNotMatch', {\n\t\tpackageId: Address,\n\t\tticketId: Address,\n\t}),\n});\n\n// Rust: move-core-types/src/language_storage.rs\nconst ModuleId = bcs.struct('ModuleId', {\n\taddress: Address,\n\tname: bcs.string(),\n});\n// Rust: crates/sui-types/src/execution_status.rs\nconst MoveLocation = bcs.struct('MoveLocation', {\n\tmodule: ModuleId,\n\tfunction: bcs.u16(),\n\tinstruction: bcs.u16(),\n\tfunctionName: bcs.option(bcs.string()),\n});\n\n// Rust: crates/sui-types/src/execution_status.rs\nconst CommandArgumentError = bcs.enum('CommandArgumentError', {\n\tTypeMismatch: null,\n\tInvalidBCSBytes: null,\n\tInvalidUsageOfPureArg: null,\n\tInvalidArgumentToPrivateEntryFunction: null,\n\tIndexOutOfBounds: bcs.struct('IndexOutOfBounds', { idx: bcs.u16() }),\n\tSecondaryIndexOutOfBounds: bcs.struct('SecondaryIndexOutOfBounds', {\n\t\tresultIdx: bcs.u16(),\n\t\tsecondaryIdx: bcs.u16(),\n\t}),\n\tInvalidResultArity: bcs.struct('InvalidResultArity', { resultIdx: bcs.u16() }),\n\tInvalidGasCoinUsage: null,\n\tInvalidValueUsage: null,\n\tInvalidObjectByValue: null,\n\tInvalidObjectByMutRef: null,\n\tSharedObjectOperationNotAllowed: null,\n\tInvalidArgumentArity: null,\n\tInvalidTransferObject: null,\n\tInvalidMakeMoveVecNonObjectArgument: null,\n\tArgumentWithoutValue: null,\n\tCannotMoveBorrowedValue: null,\n\tCannotWriteToExtendedReference: null,\n\tInvalidReferenceArgument: null,\n});\n\n// Rust: crates/sui-types/src/execution_status.rs\nconst TypeArgumentError = bcs.enum('TypeArgumentError', {\n\tTypeNotFound: null,\n\tConstraintNotSatisfied: null,\n});\n\n// Rust: crates/sui-types/src/execution_status.rs\nconst ExecutionFailureStatus = bcs.enum('ExecutionFailureStatus', {\n\tInsufficientGas: null,\n\tInvalidGasObject: null,\n\tInvariantViolation: null,\n\tFeatureNotYetSupported: null,\n\tMoveObjectTooBig: bcs.struct('MoveObjectTooBig', {\n\t\tobjectSize: bcs.u64(),\n\t\tmaxObjectSize: bcs.u64(),\n\t}),\n\tMovePackageTooBig: bcs.struct('MovePackageTooBig', {\n\t\tobjectSize: bcs.u64(),\n\t\tmaxObjectSize: bcs.u64(),\n\t}),\n\tCircularObjectOwnership: bcs.struct('CircularObjectOwnership', { object: Address }),\n\tInsufficientCoinBalance: null,\n\tCoinBalanceOverflow: null,\n\tPublishErrorNonZeroAddress: null,\n\tSuiMoveVerificationError: null,\n\tMovePrimitiveRuntimeError: bcs.option(MoveLocation),\n\tMoveAbort: bcs.tuple([MoveLocation, bcs.u64()]),\n\tVMVerificationOrDeserializationError: null,\n\tVMInvariantViolation: null,\n\tFunctionNotFound: null,\n\tArityMismatch: null,\n\tTypeArityMismatch: null,\n\tNonEntryFunctionInvoked: null,\n\tCommandArgumentError: bcs.struct('CommandArgumentError', {\n\t\targIdx: bcs.u16(),\n\t\tkind: CommandArgumentError,\n\t}),\n\tTypeArgumentError: bcs.struct('TypeArgumentError', {\n\t\targumentIdx: bcs.u16(),\n\t\tkind: TypeArgumentError,\n\t}),\n\tUnusedValueWithoutDrop: bcs.struct('UnusedValueWithoutDrop', {\n\t\tresultIdx: bcs.u16(),\n\t\tsecondaryIdx: bcs.u16(),\n\t}),\n\tInvalidPublicFunctionReturnType: bcs.struct('InvalidPublicFunctionReturnType', {\n\t\tidx: bcs.u16(),\n\t}),\n\tInvalidTransferObject: null,\n\tEffectsTooLarge: bcs.struct('EffectsTooLarge', { currentSize: bcs.u64(), maxSize: bcs.u64() }),\n\tPublishUpgradeMissingDependency: null,\n\tPublishUpgradeDependencyDowngrade: null,\n\tPackageUpgradeError: bcs.struct('PackageUpgradeError', { upgradeError: PackageUpgradeError }),\n\tWrittenObjectsTooLarge: bcs.struct('WrittenObjectsTooLarge', {\n\t\tcurrentSize: bcs.u64(),\n\t\tmaxSize: bcs.u64(),\n\t}),\n\tCertificateDenied: null,\n\tSuiMoveVerificationTimedout: null,\n\tSharedObjectOperationNotAllowed: null,\n\tInputObjectDeleted: null,\n\tExecutionCancelledDueToSharedObjectCongestion: bcs.struct(\n\t\t'ExecutionCancelledDueToSharedObjectCongestion',\n\t\t{\n\t\t\tcongested_objects: bcs.vector(Address),\n\t\t},\n\t),\n\tAddressDeniedForCoin: bcs.struct('AddressDeniedForCoin', {\n\t\taddress: Address,\n\t\tcoinType: bcs.string(),\n\t}),\n\tCoinTypeGlobalPause: bcs.struct('CoinTypeGlobalPause', { coinType: bcs.string() }),\n\tExecutionCancelledDueToRandomnessUnavailable: null,\n\tMoveVectorElemTooBig: bcs.struct('MoveVectorElemTooBig', {\n\t\tvalueSize: bcs.u64(),\n\t\tmaxScaledSize: bcs.u64(),\n\t}),\n\tMoveRawValueTooBig: bcs.struct('MoveRawValueTooBig', {\n\t\tvalueSize: bcs.u64(),\n\t\tmaxScaledSize: bcs.u64(),\n\t}),\n\tInvalidLinkage: null,\n\tInsufficientBalanceForWithdraw: null,\n\tNonExclusiveWriteInputObjectModified: bcs.struct('NonExclusiveWriteInputObjectModified', {\n\t\tid: Address,\n\t}),\n});\n\n// Rust: crates/sui-types/src/execution_status.rs\nexport const ExecutionStatus = bcs.enum('ExecutionStatus', {\n\tSuccess: null,\n\tFailure: bcs.struct('Failure', {\n\t\terror: ExecutionFailureStatus,\n\t\tcommand: bcs.option(bcs.u64()),\n\t}),\n});\n\n// Rust: crates/sui-types/src/gas.rs\nconst GasCostSummary = bcs.struct('GasCostSummary', {\n\tcomputationCost: bcs.u64(),\n\tstorageCost: bcs.u64(),\n\tstorageRebate: bcs.u64(),\n\tnonRefundableStorageFee: bcs.u64(),\n});\n\n// Rust: crates/sui-types/src/effects/effects_v1.rs\nconst TransactionEffectsV1 = bcs.struct('TransactionEffectsV1', {\n\tstatus: ExecutionStatus,\n\texecutedEpoch: bcs.u64(),\n\tgasUsed: GasCostSummary,\n\tmodifiedAtVersions: bcs.vector(bcs.tuple([Address, bcs.u64()])),\n\tsharedObjects: bcs.vector(SuiObjectRef),\n\ttransactionDigest: ObjectDigest,\n\tcreated: bcs.vector(bcs.tuple([SuiObjectRef, Owner])),\n\tmutated: bcs.vector(bcs.tuple([SuiObjectRef, Owner])),\n\tunwrapped: bcs.vector(bcs.tuple([SuiObjectRef, Owner])),\n\tdeleted: bcs.vector(SuiObjectRef),\n\tunwrappedThenDeleted: bcs.vector(SuiObjectRef),\n\twrapped: bcs.vector(SuiObjectRef),\n\tgasObject: bcs.tuple([SuiObjectRef, Owner]),\n\teventsDigest: bcs.option(ObjectDigest),\n\tdependencies: bcs.vector(ObjectDigest),\n});\n\n// Rust: crates/sui-types/src/base_types.rs\nconst VersionDigest = bcs.tuple([bcs.u64(), ObjectDigest]);\n\n// Rust: crates/sui-types/src/effects/object_change.rs\nconst ObjectIn = bcs.enum('ObjectIn', {\n\tNotExist: null,\n\tExist: bcs.tuple([VersionDigest, Owner]),\n});\n\n// Rust: crates/sui-types/src/effects/object_change.rs\nconst AccumulatorAddress = bcs.struct('AccumulatorAddress', {\n\taddress: Address,\n\t// TODO: ask why this is the name\n\tty: TypeTag,\n});\n\n// Rust: crates/sui-types/src/effects/object_change.rs\nconst AccumulatorOperation = bcs.enum('AccumulatorOperation', {\n\tMerge: null,\n\tSplit: null,\n});\n\n// Rust: crates/sui-types/src/effects/object_change.rs\nconst AccumulatorValue = bcs.enum('AccumulatorValue', {\n\tInteger: bcs.u64(),\n\tIntegerTuple: bcs.tuple([bcs.u64(), bcs.u64()]),\n\t// NonEmpty<(u64, Digest)> in Rust - vector must have at least one element\n\tEventDigest: bcs.vector(bcs.tuple([bcs.u64(), ObjectDigest])),\n});\n\n// Rust: crates/sui-types/src/effects/object_change.rs\nconst AccumulatorWriteV1 = bcs.struct('AccumulatorWriteV1', {\n\taddress: AccumulatorAddress,\n\toperation: AccumulatorOperation,\n\tvalue: AccumulatorValue,\n});\n\n// Rust: crates/sui-types/src/effects/object_change.rs\nconst ObjectOut = bcs.enum('ObjectOut', {\n\tNotExist: null,\n\tObjectWrite: bcs.tuple([ObjectDigest, Owner]),\n\tPackageWrite: VersionDigest,\n\tAccumulatorWriteV1: AccumulatorWriteV1,\n});\n\n// Rust: crates/sui-types/src/effects/mod.rs\nconst IDOperation = bcs.enum('IDOperation', {\n\tNone: null,\n\tCreated: null,\n\tDeleted: null,\n});\n\n// Rust: crates/sui-types/src/effects/object_change.rs\nconst EffectsObjectChange = bcs.struct('EffectsObjectChange', {\n\tinputState: ObjectIn,\n\toutputState: ObjectOut,\n\tidOperation: IDOperation,\n});\n\n// Rust: crates/sui-types/src/effects/effects_v2.rs\nconst UnchangedConsensusKind = bcs.enum('UnchangedConsensusKind', {\n\tReadOnlyRoot: VersionDigest,\n\tMutateConsensusStreamEnded: bcs.u64(),\n\tReadConsensusStreamEnded: bcs.u64(),\n\tCancelled: bcs.u64(),\n\tPerEpochConfig: null,\n});\n\n// Rust: crates/sui-types/src/effects/effects_v2.rs\nconst TransactionEffectsV2 = bcs.struct('TransactionEffectsV2', {\n\tstatus: ExecutionStatus,\n\texecutedEpoch: bcs.u64(),\n\tgasUsed: GasCostSummary,\n\ttransactionDigest: ObjectDigest,\n\tgasObjectIndex: bcs.option(bcs.u32()),\n\teventsDigest: bcs.option(ObjectDigest),\n\tdependencies: bcs.vector(ObjectDigest),\n\tlamportVersion: bcs.u64(),\n\tchangedObjects: bcs.vector(bcs.tuple([Address, EffectsObjectChange])),\n\tunchangedConsensusObjects: bcs.vector(bcs.tuple([Address, UnchangedConsensusKind])),\n\tauxDataDigest: bcs.option(ObjectDigest),\n});\n\n// Rust: crates/sui-types/src/effects/mod.rs\nexport const TransactionEffects = bcs.enum('TransactionEffects', {\n\tV1: TransactionEffectsV1,\n\tV2: TransactionEffectsV2,\n});\n"],"mappings":";;;;AAQA,MAAM,sBAAsB,IAAI,KAAK,uBAAuB;CAC3D,sBAAsB,IAAI,OAAO,wBAAwB,EAAE,WAAW,SAAS,CAAC;CAChF,aAAa,IAAI,OAAO,eAAe,EAAE,UAAU,SAAS,CAAC;CAC7D,qBAAqB;CACrB,oBAAoB,IAAI,OAAO,sBAAsB,EAAE,QAAQ,IAAI,YAAY,EAAE,CAAC;CAClF,sBAAsB,IAAI,OAAO,wBAAwB,EAAE,QAAQ,IAAI,IAAI,EAAE,CAAC;CAC9E,uBAAuB,IAAI,OAAO,yBAAyB;EAC1D,WAAW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AgB,IAAI,KAAK;CACzB,gBAAgB,IAAI,OAAO,IAAI,MAAM,CAAC,SAAS,oBAAoB,CAAC,CAAC;CACrE,2BAA2B,IAAI,OAAO,IAAI,MAAM,CAAC,SAAS,uBAAuB,CAAC,CAAC;CACnF,eAAe,IAAI,OAAO,aAAa;CACvC,CAAC;AAGF,MAAa,qBAAqB,IAAI,KAAK,sBAAsB;CAChE,IAAI;CACJ,IAAI;CACJ,CAAC"}
|
|
1
|
+
{"version":3,"file":"effects.mjs","names":[],"sources":["../../src/bcs/effects.ts"],"sourcesContent":["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { bcs } from '@mysten/bcs';\n\nimport { Address, ObjectDigest, Owner, SuiObjectRef, TypeTag } from './bcs.js';\n\n// Rust: crates/sui-types/src/execution_status.rs (PackageUpgradeError enum)\nconst PackageUpgradeError = bcs.enum('PackageUpgradeError', {\n\tUnableToFetchPackage: bcs.struct('UnableToFetchPackage', { packageId: Address }),\n\tNotAPackage: bcs.struct('NotAPackage', { objectId: Address }),\n\tIncompatibleUpgrade: null,\n\tDigestDoesNotMatch: bcs.struct('DigestDoesNotMatch', { digest: bcs.byteVector() }),\n\tUnknownUpgradePolicy: bcs.struct('UnknownUpgradePolicy', { policy: bcs.u8() }),\n\tPackageIDDoesNotMatch: bcs.struct('PackageIDDoesNotMatch', {\n\t\tpackageId: Address,\n\t\tticketId: Address,\n\t}),\n});\n\n// Rust: move-core-types/src/language_storage.rs\nconst ModuleId = bcs.struct('ModuleId', {\n\taddress: Address,\n\tname: bcs.string(),\n});\n// Rust: crates/sui-types/src/execution_status.rs\nconst MoveLocation = bcs.struct('MoveLocation', {\n\tmodule: ModuleId,\n\tfunction: bcs.u16(),\n\tinstruction: bcs.u16(),\n\tfunctionName: bcs.option(bcs.string()),\n});\n\n// Rust: crates/sui-types/src/execution_status.rs\nconst CommandArgumentError = bcs.enum('CommandArgumentError', {\n\tTypeMismatch: null,\n\tInvalidBCSBytes: null,\n\tInvalidUsageOfPureArg: null,\n\tInvalidArgumentToPrivateEntryFunction: null,\n\tIndexOutOfBounds: bcs.struct('IndexOutOfBounds', { idx: bcs.u16() }),\n\tSecondaryIndexOutOfBounds: bcs.struct('SecondaryIndexOutOfBounds', {\n\t\tresultIdx: bcs.u16(),\n\t\tsecondaryIdx: bcs.u16(),\n\t}),\n\tInvalidResultArity: bcs.struct('InvalidResultArity', { resultIdx: bcs.u16() }),\n\tInvalidGasCoinUsage: null,\n\tInvalidValueUsage: null,\n\tInvalidObjectByValue: null,\n\tInvalidObjectByMutRef: null,\n\tSharedObjectOperationNotAllowed: null,\n\tInvalidArgumentArity: null,\n\tInvalidTransferObject: null,\n\tInvalidMakeMoveVecNonObjectArgument: null,\n\tArgumentWithoutValue: null,\n\tCannotMoveBorrowedValue: null,\n\tCannotWriteToExtendedReference: null,\n\tInvalidReferenceArgument: null,\n\tInvalidTxContext: null,\n});\n\n// Rust: crates/sui-types/src/execution_status.rs\nconst TypeArgumentError = bcs.enum('TypeArgumentError', {\n\tTypeNotFound: null,\n\tConstraintNotSatisfied: null,\n});\n\n// Rust: crates/sui-types/src/execution_status.rs\nconst ExecutionFailureStatus = bcs.enum('ExecutionFailureStatus', {\n\tInsufficientGas: null,\n\tInvalidGasObject: null,\n\tInvariantViolation: null,\n\tFeatureNotYetSupported: null,\n\tMoveObjectTooBig: bcs.struct('MoveObjectTooBig', {\n\t\tobjectSize: bcs.u64(),\n\t\tmaxObjectSize: bcs.u64(),\n\t}),\n\tMovePackageTooBig: bcs.struct('MovePackageTooBig', {\n\t\tobjectSize: bcs.u64(),\n\t\tmaxObjectSize: bcs.u64(),\n\t}),\n\tCircularObjectOwnership: bcs.struct('CircularObjectOwnership', { object: Address }),\n\tInsufficientCoinBalance: null,\n\tCoinBalanceOverflow: null,\n\tPublishErrorNonZeroAddress: null,\n\tSuiMoveVerificationError: null,\n\tMovePrimitiveRuntimeError: bcs.option(MoveLocation),\n\tMoveAbort: bcs.tuple([MoveLocation, bcs.u64()]),\n\tVMVerificationOrDeserializationError: null,\n\tVMInvariantViolation: null,\n\tFunctionNotFound: null,\n\tArityMismatch: null,\n\tTypeArityMismatch: null,\n\tNonEntryFunctionInvoked: null,\n\tCommandArgumentError: bcs.struct('CommandArgumentError', {\n\t\targIdx: bcs.u16(),\n\t\tkind: CommandArgumentError,\n\t}),\n\tTypeArgumentError: bcs.struct('TypeArgumentError', {\n\t\targumentIdx: bcs.u16(),\n\t\tkind: TypeArgumentError,\n\t}),\n\tUnusedValueWithoutDrop: bcs.struct('UnusedValueWithoutDrop', {\n\t\tresultIdx: bcs.u16(),\n\t\tsecondaryIdx: bcs.u16(),\n\t}),\n\tInvalidPublicFunctionReturnType: bcs.struct('InvalidPublicFunctionReturnType', {\n\t\tidx: bcs.u16(),\n\t}),\n\tInvalidTransferObject: null,\n\tEffectsTooLarge: bcs.struct('EffectsTooLarge', { currentSize: bcs.u64(), maxSize: bcs.u64() }),\n\tPublishUpgradeMissingDependency: null,\n\tPublishUpgradeDependencyDowngrade: null,\n\tPackageUpgradeError: bcs.struct('PackageUpgradeError', { upgradeError: PackageUpgradeError }),\n\tWrittenObjectsTooLarge: bcs.struct('WrittenObjectsTooLarge', {\n\t\tcurrentSize: bcs.u64(),\n\t\tmaxSize: bcs.u64(),\n\t}),\n\tCertificateDenied: null,\n\tSuiMoveVerificationTimedout: null,\n\tSharedObjectOperationNotAllowed: null,\n\tInputObjectDeleted: null,\n\tExecutionCancelledDueToSharedObjectCongestion: bcs.struct(\n\t\t'ExecutionCancelledDueToSharedObjectCongestion',\n\t\t{\n\t\t\tcongested_objects: bcs.vector(Address),\n\t\t},\n\t),\n\tAddressDeniedForCoin: bcs.struct('AddressDeniedForCoin', {\n\t\taddress: Address,\n\t\tcoinType: bcs.string(),\n\t}),\n\tCoinTypeGlobalPause: bcs.struct('CoinTypeGlobalPause', { coinType: bcs.string() }),\n\tExecutionCancelledDueToRandomnessUnavailable: null,\n\tMoveVectorElemTooBig: bcs.struct('MoveVectorElemTooBig', {\n\t\tvalueSize: bcs.u64(),\n\t\tmaxScaledSize: bcs.u64(),\n\t}),\n\tMoveRawValueTooBig: bcs.struct('MoveRawValueTooBig', {\n\t\tvalueSize: bcs.u64(),\n\t\tmaxScaledSize: bcs.u64(),\n\t}),\n\tInvalidLinkage: null,\n\t// Upstream renamed this to `InsufficientFundsForWithdraw`; renaming the parsed `$kind` would\n\t// break the public API, and the wire representation is unchanged either way.\n\tInsufficientBalanceForWithdraw: null,\n\tNonExclusiveWriteInputObjectModified: bcs.struct('NonExclusiveWriteInputObjectModified', {\n\t\tid: Address,\n\t}),\n});\n\n// Rust: crates/sui-types/src/execution_status.rs\nexport const ExecutionStatus = bcs.enum('ExecutionStatus', {\n\tSuccess: null,\n\tFailure: bcs.struct('Failure', {\n\t\terror: ExecutionFailureStatus,\n\t\tcommand: bcs.option(bcs.u64()),\n\t}),\n});\n\n// Rust: crates/sui-types/src/gas.rs\nconst GasCostSummary = bcs.struct('GasCostSummary', {\n\tcomputationCost: bcs.u64(),\n\tstorageCost: bcs.u64(),\n\tstorageRebate: bcs.u64(),\n\tnonRefundableStorageFee: bcs.u64(),\n});\n\n// Rust: crates/sui-types/src/effects/effects_v1.rs\nconst TransactionEffectsV1 = bcs.struct('TransactionEffectsV1', {\n\tstatus: ExecutionStatus,\n\texecutedEpoch: bcs.u64(),\n\tgasUsed: GasCostSummary,\n\tmodifiedAtVersions: bcs.vector(bcs.tuple([Address, bcs.u64()])),\n\tsharedObjects: bcs.vector(SuiObjectRef),\n\ttransactionDigest: ObjectDigest,\n\tcreated: bcs.vector(bcs.tuple([SuiObjectRef, Owner])),\n\tmutated: bcs.vector(bcs.tuple([SuiObjectRef, Owner])),\n\tunwrapped: bcs.vector(bcs.tuple([SuiObjectRef, Owner])),\n\tdeleted: bcs.vector(SuiObjectRef),\n\tunwrappedThenDeleted: bcs.vector(SuiObjectRef),\n\twrapped: bcs.vector(SuiObjectRef),\n\tgasObject: bcs.tuple([SuiObjectRef, Owner]),\n\teventsDigest: bcs.option(ObjectDigest),\n\tdependencies: bcs.vector(ObjectDigest),\n});\n\n// Rust: crates/sui-types/src/base_types.rs\nconst VersionDigest = bcs.tuple([bcs.u64(), ObjectDigest]);\n\n// Rust: crates/sui-types/src/effects/object_change.rs\nconst ObjectIn = bcs.enum('ObjectIn', {\n\tNotExist: null,\n\tExist: bcs.tuple([VersionDigest, Owner]),\n});\n\n// Rust: crates/sui-types/src/effects/object_change.rs\nconst AccumulatorAddress = bcs.struct('AccumulatorAddress', {\n\taddress: Address,\n\t// TODO: ask why this is the name\n\tty: TypeTag,\n});\n\n// Rust: crates/sui-types/src/effects/object_change.rs\nconst AccumulatorOperation = bcs.enum('AccumulatorOperation', {\n\tMerge: null,\n\tSplit: null,\n});\n\n// Rust: crates/sui-types/src/effects/object_change.rs\nconst AccumulatorValue = bcs.enum('AccumulatorValue', {\n\tInteger: bcs.u64(),\n\tIntegerTuple: bcs.tuple([bcs.u64(), bcs.u64()]),\n\t// NonEmpty<(u64, Digest)> in Rust - vector must have at least one element\n\tEventDigest: bcs.vector(bcs.tuple([bcs.u64(), ObjectDigest])),\n});\n\n// Rust: crates/sui-types/src/effects/object_change.rs\nconst AccumulatorWriteV1 = bcs.struct('AccumulatorWriteV1', {\n\taddress: AccumulatorAddress,\n\toperation: AccumulatorOperation,\n\tvalue: AccumulatorValue,\n});\n\n// Rust: crates/sui-types/src/effects/object_change.rs\nconst ObjectOut = bcs.enum('ObjectOut', {\n\tNotExist: null,\n\tObjectWrite: bcs.tuple([ObjectDigest, Owner]),\n\tPackageWrite: VersionDigest,\n\tAccumulatorWriteV1: AccumulatorWriteV1,\n});\n\n// Rust: crates/sui-types/src/effects/mod.rs\nconst IDOperation = bcs.enum('IDOperation', {\n\tNone: null,\n\tCreated: null,\n\tDeleted: null,\n});\n\n// Rust: crates/sui-types/src/effects/object_change.rs\nconst EffectsObjectChange = bcs.struct('EffectsObjectChange', {\n\tinputState: ObjectIn,\n\toutputState: ObjectOut,\n\tidOperation: IDOperation,\n});\n\n// Rust: crates/sui-types/src/effects/effects_v2.rs\nconst UnchangedConsensusKind = bcs.enum('UnchangedConsensusKind', {\n\tReadOnlyRoot: VersionDigest,\n\tMutateConsensusStreamEnded: bcs.u64(),\n\tReadConsensusStreamEnded: bcs.u64(),\n\tCancelled: bcs.u64(),\n\tPerEpochConfig: null,\n});\n\n// Rust: crates/sui-types/src/effects/effects_v2.rs\nconst TransactionEffectsV2 = bcs.struct('TransactionEffectsV2', {\n\tstatus: ExecutionStatus,\n\texecutedEpoch: bcs.u64(),\n\tgasUsed: GasCostSummary,\n\ttransactionDigest: ObjectDigest,\n\tgasObjectIndex: bcs.option(bcs.u32()),\n\teventsDigest: bcs.option(ObjectDigest),\n\tdependencies: bcs.vector(ObjectDigest),\n\tlamportVersion: bcs.u64(),\n\tchangedObjects: bcs.vector(bcs.tuple([Address, EffectsObjectChange])),\n\tunchangedConsensusObjects: bcs.vector(bcs.tuple([Address, UnchangedConsensusKind])),\n\tauxDataDigest: bcs.option(ObjectDigest),\n});\n\n// Rust: crates/sui-types/src/effects/mod.rs\nexport const TransactionEffects = bcs.enum('TransactionEffects', {\n\tV1: TransactionEffectsV1,\n\tV2: TransactionEffectsV2,\n});\n"],"mappings":";;;;AAQA,MAAM,sBAAsB,IAAI,KAAK,uBAAuB;CAC3D,sBAAsB,IAAI,OAAO,wBAAwB,EAAE,WAAW,SAAS,CAAC;CAChF,aAAa,IAAI,OAAO,eAAe,EAAE,UAAU,SAAS,CAAC;CAC7D,qBAAqB;CACrB,oBAAoB,IAAI,OAAO,sBAAsB,EAAE,QAAQ,IAAI,YAAY,EAAE,CAAC;CAClF,sBAAsB,IAAI,OAAO,wBAAwB,EAAE,QAAQ,IAAI,IAAI,EAAE,CAAC;CAC9E,uBAAuB,IAAI,OAAO,yBAAyB;EAC1D,WAAW;EACX,UAAU;EACV,CAAC;CACF,CAAC;AAGF,MAAM,WAAW,IAAI,OAAO,YAAY;CACvC,SAA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AS,oBAAoB,CAAC,CAAC;CACrE,2BAA2B,IAAI,OAAO,IAAI,MAAM,CAAC,SAAS,uBAAuB,CAAC,CAAC;CACnF,eAAe,IAAI,OAAO,aAAa;CACvC,CAAC;AAGF,MAAa,qBAAqB,IAAI,KAAK,sBAAsB;CAChE,IAAI;CACJ,IAAI;CACJ,CAAC"}
|
package/dist/bcs/index.d.mts
CHANGED
|
@@ -1056,7 +1056,8 @@ declare const suiBcs: {
|
|
|
1056
1056
|
WriteAccumulatorStorageCost: {
|
|
1057
1057
|
storageCost: string;
|
|
1058
1058
|
};
|
|
1059
|
-
|
|
1059
|
+
ForwardingAddressRegistryCreate: true;
|
|
1060
|
+
}, "ChangeEpoch" | "AuthenticatorStateCreate" | "AuthenticatorStateExpire" | "RandomnessStateCreate" | "DenyListStateCreate" | "BridgeStateCreate" | "BridgeCommitteeInit" | "StoreExecutionTimeObservations" | "AccumulatorRootCreate" | "CoinRegistryCreate" | "DisplayRegistryCreate" | "AddressAliasStateCreate" | "WriteAccumulatorStorageCost" | "ForwardingAddressRegistryCreate">[];
|
|
1060
1061
|
RandomnessStateUpdate: {
|
|
1061
1062
|
epoch: string;
|
|
1062
1063
|
randomnessRound: string;
|
|
@@ -1233,7 +1234,19 @@ declare const suiBcs: {
|
|
|
1233
1234
|
chain: string;
|
|
1234
1235
|
nonce: number;
|
|
1235
1236
|
};
|
|
1236
|
-
|
|
1237
|
+
Validity: {
|
|
1238
|
+
minEpoch: string | null;
|
|
1239
|
+
maxEpoch: string | null;
|
|
1240
|
+
minTimestamp: string | null;
|
|
1241
|
+
maxTimestamp: string | null;
|
|
1242
|
+
chain: string;
|
|
1243
|
+
nonce: number;
|
|
1244
|
+
allowedProposers: {
|
|
1245
|
+
epoch: string;
|
|
1246
|
+
proposers: number[];
|
|
1247
|
+
} | null;
|
|
1248
|
+
};
|
|
1249
|
+
}, "None" | "Epoch" | "ValidDuring" | "Validity">;
|
|
1237
1250
|
};
|
|
1238
1251
|
$kind: "V1";
|
|
1239
1252
|
};
|
|
@@ -1554,6 +1567,7 @@ declare const suiBcs: {
|
|
|
1554
1567
|
WriteAccumulatorStorageCost: {
|
|
1555
1568
|
storageCost: string | number | bigint;
|
|
1556
1569
|
};
|
|
1570
|
+
ForwardingAddressRegistryCreate: boolean | object | null;
|
|
1557
1571
|
}>> & {
|
|
1558
1572
|
length: number;
|
|
1559
1573
|
};
|
|
@@ -1773,6 +1787,18 @@ declare const suiBcs: {
|
|
|
1773
1787
|
chain: string;
|
|
1774
1788
|
nonce: number;
|
|
1775
1789
|
};
|
|
1790
|
+
Validity: {
|
|
1791
|
+
minEpoch: string | number | bigint | null | undefined;
|
|
1792
|
+
maxEpoch: string | number | bigint | null | undefined;
|
|
1793
|
+
minTimestamp: string | number | bigint | null | undefined;
|
|
1794
|
+
maxTimestamp: string | number | bigint | null | undefined;
|
|
1795
|
+
chain: string;
|
|
1796
|
+
nonce: number;
|
|
1797
|
+
allowedProposers: {
|
|
1798
|
+
epoch: string | number | bigint;
|
|
1799
|
+
proposers: number[];
|
|
1800
|
+
} | null | undefined;
|
|
1801
|
+
};
|
|
1776
1802
|
}>;
|
|
1777
1803
|
};
|
|
1778
1804
|
};
|
|
@@ -2262,7 +2288,8 @@ declare const suiBcs: {
|
|
|
2262
2288
|
WriteAccumulatorStorageCost: {
|
|
2263
2289
|
storageCost: string;
|
|
2264
2290
|
};
|
|
2265
|
-
|
|
2291
|
+
ForwardingAddressRegistryCreate: true;
|
|
2292
|
+
}, "ChangeEpoch" | "AuthenticatorStateCreate" | "AuthenticatorStateExpire" | "RandomnessStateCreate" | "DenyListStateCreate" | "BridgeStateCreate" | "BridgeCommitteeInit" | "StoreExecutionTimeObservations" | "AccumulatorRootCreate" | "CoinRegistryCreate" | "DisplayRegistryCreate" | "AddressAliasStateCreate" | "WriteAccumulatorStorageCost" | "ForwardingAddressRegistryCreate">[], Iterable<_mysten_bcs0.EnumInputShape<{
|
|
2266
2293
|
ChangeEpoch: {
|
|
2267
2294
|
epoch: string | number | bigint;
|
|
2268
2295
|
protocolVersion: string | number | bigint;
|
|
@@ -2320,6 +2347,7 @@ declare const suiBcs: {
|
|
|
2320
2347
|
WriteAccumulatorStorageCost: {
|
|
2321
2348
|
storageCost: string | number | bigint;
|
|
2322
2349
|
};
|
|
2350
|
+
ForwardingAddressRegistryCreate: boolean | object | null;
|
|
2323
2351
|
}>> & {
|
|
2324
2352
|
length: number;
|
|
2325
2353
|
}, string>;
|
|
@@ -2657,6 +2685,21 @@ declare const suiBcs: {
|
|
|
2657
2685
|
chain: _mysten_bcs0.BcsType<string, string, "ObjectDigest">;
|
|
2658
2686
|
nonce: _mysten_bcs0.BcsType<number, number, "u32">;
|
|
2659
2687
|
}, string>;
|
|
2688
|
+
Validity: _mysten_bcs0.BcsStruct<{
|
|
2689
|
+
minEpoch: _mysten_bcs0.BcsType<string | null, string | number | bigint | null | undefined, "Option<u64>">;
|
|
2690
|
+
maxEpoch: _mysten_bcs0.BcsType<string | null, string | number | bigint | null | undefined, "Option<u64>">;
|
|
2691
|
+
minTimestamp: _mysten_bcs0.BcsType<string | null, string | number | bigint | null | undefined, "Option<u64>">;
|
|
2692
|
+
maxTimestamp: _mysten_bcs0.BcsType<string | null, string | number | bigint | null | undefined, "Option<u64>">;
|
|
2693
|
+
chain: _mysten_bcs0.BcsType<string, string, "ObjectDigest">;
|
|
2694
|
+
nonce: _mysten_bcs0.BcsType<number, number, "u32">;
|
|
2695
|
+
allowedProposers: _mysten_bcs0.BcsType<{
|
|
2696
|
+
epoch: string;
|
|
2697
|
+
proposers: number[];
|
|
2698
|
+
} | null, {
|
|
2699
|
+
epoch: string | number | bigint;
|
|
2700
|
+
proposers: number[];
|
|
2701
|
+
} | null | undefined, `Option<${string}>`>;
|
|
2702
|
+
}, string>;
|
|
2660
2703
|
}, "TransactionExpiration">;
|
|
2661
2704
|
}, string>;
|
|
2662
2705
|
}, "TransactionData">;
|
|
@@ -3146,7 +3189,8 @@ declare const suiBcs: {
|
|
|
3146
3189
|
WriteAccumulatorStorageCost: {
|
|
3147
3190
|
storageCost: string;
|
|
3148
3191
|
};
|
|
3149
|
-
|
|
3192
|
+
ForwardingAddressRegistryCreate: true;
|
|
3193
|
+
}, "ChangeEpoch" | "AuthenticatorStateCreate" | "AuthenticatorStateExpire" | "RandomnessStateCreate" | "DenyListStateCreate" | "BridgeStateCreate" | "BridgeCommitteeInit" | "StoreExecutionTimeObservations" | "AccumulatorRootCreate" | "CoinRegistryCreate" | "DisplayRegistryCreate" | "AddressAliasStateCreate" | "WriteAccumulatorStorageCost" | "ForwardingAddressRegistryCreate">[], Iterable<_mysten_bcs0.EnumInputShape<{
|
|
3150
3194
|
ChangeEpoch: {
|
|
3151
3195
|
epoch: string | number | bigint;
|
|
3152
3196
|
protocolVersion: string | number | bigint;
|
|
@@ -3204,6 +3248,7 @@ declare const suiBcs: {
|
|
|
3204
3248
|
WriteAccumulatorStorageCost: {
|
|
3205
3249
|
storageCost: string | number | bigint;
|
|
3206
3250
|
};
|
|
3251
|
+
ForwardingAddressRegistryCreate: boolean | object | null;
|
|
3207
3252
|
}>> & {
|
|
3208
3253
|
length: number;
|
|
3209
3254
|
}, string>;
|
|
@@ -3541,6 +3586,21 @@ declare const suiBcs: {
|
|
|
3541
3586
|
chain: _mysten_bcs0.BcsType<string, string, "ObjectDigest">;
|
|
3542
3587
|
nonce: _mysten_bcs0.BcsType<number, number, "u32">;
|
|
3543
3588
|
}, string>;
|
|
3589
|
+
Validity: _mysten_bcs0.BcsStruct<{
|
|
3590
|
+
minEpoch: _mysten_bcs0.BcsType<string | null, string | number | bigint | null | undefined, "Option<u64>">;
|
|
3591
|
+
maxEpoch: _mysten_bcs0.BcsType<string | null, string | number | bigint | null | undefined, "Option<u64>">;
|
|
3592
|
+
minTimestamp: _mysten_bcs0.BcsType<string | null, string | number | bigint | null | undefined, "Option<u64>">;
|
|
3593
|
+
maxTimestamp: _mysten_bcs0.BcsType<string | null, string | number | bigint | null | undefined, "Option<u64>">;
|
|
3594
|
+
chain: _mysten_bcs0.BcsType<string, string, "ObjectDigest">;
|
|
3595
|
+
nonce: _mysten_bcs0.BcsType<number, number, "u32">;
|
|
3596
|
+
allowedProposers: _mysten_bcs0.BcsType<{
|
|
3597
|
+
epoch: string;
|
|
3598
|
+
proposers: number[];
|
|
3599
|
+
} | null, {
|
|
3600
|
+
epoch: string | number | bigint;
|
|
3601
|
+
proposers: number[];
|
|
3602
|
+
} | null | undefined, `Option<${string}>`>;
|
|
3603
|
+
}, string>;
|
|
3544
3604
|
}, "TransactionExpiration">;
|
|
3545
3605
|
}, string>;
|
|
3546
3606
|
}, "TransactionData">;
|
|
@@ -4006,7 +4066,8 @@ declare const suiBcs: {
|
|
|
4006
4066
|
WriteAccumulatorStorageCost: {
|
|
4007
4067
|
storageCost: string;
|
|
4008
4068
|
};
|
|
4009
|
-
|
|
4069
|
+
ForwardingAddressRegistryCreate: true;
|
|
4070
|
+
}, "ChangeEpoch" | "AuthenticatorStateCreate" | "AuthenticatorStateExpire" | "RandomnessStateCreate" | "DenyListStateCreate" | "BridgeStateCreate" | "BridgeCommitteeInit" | "StoreExecutionTimeObservations" | "AccumulatorRootCreate" | "CoinRegistryCreate" | "DisplayRegistryCreate" | "AddressAliasStateCreate" | "WriteAccumulatorStorageCost" | "ForwardingAddressRegistryCreate">[], Iterable<_mysten_bcs0.EnumInputShape<{
|
|
4010
4071
|
ChangeEpoch: {
|
|
4011
4072
|
epoch: string | number | bigint;
|
|
4012
4073
|
protocolVersion: string | number | bigint;
|
|
@@ -4064,6 +4125,7 @@ declare const suiBcs: {
|
|
|
4064
4125
|
WriteAccumulatorStorageCost: {
|
|
4065
4126
|
storageCost: string | number | bigint;
|
|
4066
4127
|
};
|
|
4128
|
+
ForwardingAddressRegistryCreate: boolean | object | null;
|
|
4067
4129
|
}>> & {
|
|
4068
4130
|
length: number;
|
|
4069
4131
|
}, string>;
|
|
@@ -4401,6 +4463,21 @@ declare const suiBcs: {
|
|
|
4401
4463
|
chain: _mysten_bcs0.BcsType<string, string, "ObjectDigest">;
|
|
4402
4464
|
nonce: _mysten_bcs0.BcsType<number, number, "u32">;
|
|
4403
4465
|
}, string>;
|
|
4466
|
+
Validity: _mysten_bcs0.BcsStruct<{
|
|
4467
|
+
minEpoch: _mysten_bcs0.BcsType<string | null, string | number | bigint | null | undefined, "Option<u64>">;
|
|
4468
|
+
maxEpoch: _mysten_bcs0.BcsType<string | null, string | number | bigint | null | undefined, "Option<u64>">;
|
|
4469
|
+
minTimestamp: _mysten_bcs0.BcsType<string | null, string | number | bigint | null | undefined, "Option<u64>">;
|
|
4470
|
+
maxTimestamp: _mysten_bcs0.BcsType<string | null, string | number | bigint | null | undefined, "Option<u64>">;
|
|
4471
|
+
chain: _mysten_bcs0.BcsType<string, string, "ObjectDigest">;
|
|
4472
|
+
nonce: _mysten_bcs0.BcsType<number, number, "u32">;
|
|
4473
|
+
allowedProposers: _mysten_bcs0.BcsType<{
|
|
4474
|
+
epoch: string;
|
|
4475
|
+
proposers: number[];
|
|
4476
|
+
} | null, {
|
|
4477
|
+
epoch: string | number | bigint;
|
|
4478
|
+
proposers: number[];
|
|
4479
|
+
} | null | undefined, `Option<${string}>`>;
|
|
4480
|
+
}, string>;
|
|
4404
4481
|
}, "TransactionExpiration">;
|
|
4405
4482
|
}, string>;
|
|
4406
4483
|
TransactionEffects: _mysten_bcs0.BcsEnum<{
|
|
@@ -4489,6 +4566,7 @@ declare const suiBcs: {
|
|
|
4489
4566
|
CannotMoveBorrowedValue: null;
|
|
4490
4567
|
CannotWriteToExtendedReference: null;
|
|
4491
4568
|
InvalidReferenceArgument: null;
|
|
4569
|
+
InvalidTxContext: null;
|
|
4492
4570
|
}, "CommandArgumentError">;
|
|
4493
4571
|
}, string>;
|
|
4494
4572
|
TypeArgumentError: _mysten_bcs0.BcsStruct<{
|
|
@@ -4831,6 +4909,7 @@ declare const suiBcs: {
|
|
|
4831
4909
|
CannotMoveBorrowedValue: null;
|
|
4832
4910
|
CannotWriteToExtendedReference: null;
|
|
4833
4911
|
InvalidReferenceArgument: null;
|
|
4912
|
+
InvalidTxContext: null;
|
|
4834
4913
|
}, "CommandArgumentError">;
|
|
4835
4914
|
}, string>;
|
|
4836
4915
|
TypeArgumentError: _mysten_bcs0.BcsStruct<{
|
|
@@ -5065,6 +5144,21 @@ declare const suiBcs: {
|
|
|
5065
5144
|
chain: _mysten_bcs0.BcsType<string, string, "ObjectDigest">;
|
|
5066
5145
|
nonce: _mysten_bcs0.BcsType<number, number, "u32">;
|
|
5067
5146
|
}, string>;
|
|
5147
|
+
Validity: _mysten_bcs0.BcsStruct<{
|
|
5148
|
+
minEpoch: _mysten_bcs0.BcsType<string | null, string | number | bigint | null | undefined, "Option<u64>">;
|
|
5149
|
+
maxEpoch: _mysten_bcs0.BcsType<string | null, string | number | bigint | null | undefined, "Option<u64>">;
|
|
5150
|
+
minTimestamp: _mysten_bcs0.BcsType<string | null, string | number | bigint | null | undefined, "Option<u64>">;
|
|
5151
|
+
maxTimestamp: _mysten_bcs0.BcsType<string | null, string | number | bigint | null | undefined, "Option<u64>">;
|
|
5152
|
+
chain: _mysten_bcs0.BcsType<string, string, "ObjectDigest">;
|
|
5153
|
+
nonce: _mysten_bcs0.BcsType<number, number, "u32">;
|
|
5154
|
+
allowedProposers: _mysten_bcs0.BcsType<{
|
|
5155
|
+
epoch: string;
|
|
5156
|
+
proposers: number[];
|
|
5157
|
+
} | null, {
|
|
5158
|
+
epoch: string | number | bigint;
|
|
5159
|
+
proposers: number[];
|
|
5160
|
+
} | null | undefined, `Option<${string}>`>;
|
|
5161
|
+
}, string>;
|
|
5068
5162
|
}, "TransactionExpiration">;
|
|
5069
5163
|
TransactionKind: _mysten_bcs0.BcsEnum<{
|
|
5070
5164
|
ProgrammableTransaction: _mysten_bcs0.BcsStruct<{
|
|
@@ -5527,7 +5621,8 @@ declare const suiBcs: {
|
|
|
5527
5621
|
WriteAccumulatorStorageCost: {
|
|
5528
5622
|
storageCost: string;
|
|
5529
5623
|
};
|
|
5530
|
-
|
|
5624
|
+
ForwardingAddressRegistryCreate: true;
|
|
5625
|
+
}, "ChangeEpoch" | "AuthenticatorStateCreate" | "AuthenticatorStateExpire" | "RandomnessStateCreate" | "DenyListStateCreate" | "BridgeStateCreate" | "BridgeCommitteeInit" | "StoreExecutionTimeObservations" | "AccumulatorRootCreate" | "CoinRegistryCreate" | "DisplayRegistryCreate" | "AddressAliasStateCreate" | "WriteAccumulatorStorageCost" | "ForwardingAddressRegistryCreate">[], Iterable<_mysten_bcs0.EnumInputShape<{
|
|
5531
5626
|
ChangeEpoch: {
|
|
5532
5627
|
epoch: string | number | bigint;
|
|
5533
5628
|
protocolVersion: string | number | bigint;
|
|
@@ -5585,6 +5680,7 @@ declare const suiBcs: {
|
|
|
5585
5680
|
WriteAccumulatorStorageCost: {
|
|
5586
5681
|
storageCost: string | number | bigint;
|
|
5587
5682
|
};
|
|
5683
|
+
ForwardingAddressRegistryCreate: boolean | object | null;
|
|
5588
5684
|
}>> & {
|
|
5589
5685
|
length: number;
|
|
5590
5686
|
}, string>;
|
package/dist/bcs/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/bcs/index.ts"],"mappings":";;;;;;;;cA6DM,MAAA;MAkDL,YAAA,CAAA,OAAA
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/bcs/index.ts"],"mappings":";;;;;;;;cA6DM,MAAA;MAkDL,YAAA,CAAA,OAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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|
117
|
-
WriteAccumulatorStorageCost
|
|
117
|
+
WriteAccumulatorStorageCost,
|
|
118
|
+
ForwardingAddressRegistryCreate: null
|
|
118
119
|
});
|
|
119
120
|
const TransactionKind = bcs.enum("TransactionKind", {
|
|
120
121
|
ProgrammableTransaction,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transactions.mjs","names":[],"sources":["../../src/bcs/transactions.ts"],"sourcesContent":["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { bcs } from '@mysten/bcs';\n\nimport {\n\tAddress,\n\tbase64String,\n\tData,\n\tGasData,\n\tIntentMessage,\n\tObjectDigest,\n\tOwner,\n\tProgrammableTransaction,\n\tTransactionExpiration,\n\tTypeTag,\n} from './bcs.js';\n\n// Rust: crates/sui-types/src/transaction.rs\nexport const ChangeEpoch = bcs.struct('ChangeEpoch', {\n\tepoch: bcs.u64(),\n\tprotocolVersion: bcs.u64(),\n\tstorageCharge: bcs.u64(),\n\tcomputationCharge: bcs.u64(),\n\tstorageRebate: bcs.u64(),\n\tnonRefundableStorageFee: bcs.u64(),\n\tepochStartTimestampMs: bcs.u64(),\n\tsystemPackages: bcs.vector(\n\t\tbcs.tuple([bcs.u64(), bcs.vector(bcs.byteVector()), bcs.vector(Address)]),\n\t),\n});\n\n// Rust: crates/sui-types/src/transaction.rs\nexport const GenesisObject = bcs.enum('GenesisObject', {\n\tRawObject: bcs.struct('RawObject', {\n\t\tdata: Data,\n\t\towner: Owner,\n\t}),\n});\n\n// Rust: crates/sui-types/src/transaction.rs\nexport const GenesisTransaction = bcs.struct('GenesisTransaction', {\n\tobjects: bcs.vector(GenesisObject),\n});\n\n// Rust: crates/sui-types/src/messages_consensus.rs\nexport const ConsensusCommitPrologue = bcs.struct('ConsensusCommitPrologue', {\n\tepoch: bcs.u64(),\n\tround: bcs.u64(),\n\tcommitTimestampMs: bcs.u64(),\n});\n\n// Rust: crates/sui-types/src/messages_consensus.rs\nexport const ConsensusCommitPrologueV2 = bcs.struct('ConsensusCommitPrologueV2', {\n\tepoch: bcs.u64(),\n\tround: bcs.u64(),\n\tcommitTimestampMs: bcs.u64(),\n\tconsensusCommitDigest: ObjectDigest,\n});\n\n// Rust: crates/sui-types/src/messages_consensus.rs\nexport const ConsensusDeterminedVersionAssignments = bcs.enum(\n\t'ConsensusDeterminedVersionAssignments',\n\t{\n\t\tCancelledTransactions: bcs.vector(\n\t\t\tbcs.tuple([ObjectDigest, bcs.vector(bcs.tuple([Address, bcs.u64()]))]),\n\t\t),\n\t\tCancelledTransactionsV2: bcs.vector(\n\t\t\tbcs.tuple([\n\t\t\t\tObjectDigest,\n\t\t\t\tbcs.vector(bcs.tuple([bcs.tuple([Address, bcs.u64()]), bcs.u64()])),\n\t\t\t]),\n\t\t),\n\t},\n);\n\n// Rust: crates/sui-types/src/messages_consensus.rs\nexport const ConsensusCommitPrologueV3 = bcs.struct('ConsensusCommitPrologueV3', {\n\tepoch: bcs.u64(),\n\tround: bcs.u64(),\n\tsubDagIndex: bcs.option(bcs.u64()),\n\tcommitTimestampMs: bcs.u64(),\n\tconsensusCommitDigest: ObjectDigest,\n\tconsensusDeterminedVersionAssignments: ConsensusDeterminedVersionAssignments,\n});\n\n// Rust: crates/sui-types/src/messages_consensus.rs\nexport const ConsensusCommitPrologueV4 = bcs.struct('ConsensusCommitPrologueV4', {\n\tepoch: bcs.u64(),\n\tround: bcs.u64(),\n\tsubDagIndex: bcs.option(bcs.u64()),\n\tcommitTimestampMs: bcs.u64(),\n\tconsensusCommitDigest: ObjectDigest,\n\tconsensusDeterminedVersionAssignments: ConsensusDeterminedVersionAssignments,\n\tadditionalStateDigest: ObjectDigest,\n});\n\n// Rust: crates/sui-types/src/authenticator_state.rs\nexport const ActiveJwk = bcs.struct('ActiveJwk', {\n\tjwkId: bcs.struct('JwkId', {\n\t\tiss: bcs.string(),\n\t\tkid: bcs.string(),\n\t}),\n\tjwk: bcs.struct('JWK', {\n\t\tkty: bcs.string(),\n\t\te: bcs.string(),\n\t\tn: bcs.string(),\n\t\talg: bcs.string(),\n\t}),\n\tepoch: bcs.u64(),\n});\n\n// Rust: crates/sui-types/src/transaction.rs\nexport const AuthenticatorStateUpdate = bcs.struct('AuthenticatorStateUpdate', {\n\tepoch: bcs.u64(),\n\tround: bcs.u64(),\n\tnewActiveJwks: bcs.vector(ActiveJwk),\n\tauthenticatorObjInitialSharedVersion: bcs.u64(),\n});\n\n// Rust: crates/sui-types/src/transaction.rs\nexport const RandomnessStateUpdate = bcs.struct('RandomnessStateUpdate', {\n\tepoch: bcs.u64(),\n\trandomnessRound: bcs.u64(),\n\trandomBytes: bcs.byteVector(),\n\trandomnessObjInitialSharedVersion: bcs.u64(),\n});\n\n// Rust: crates/sui-types/src/transaction.rs\nexport const AuthenticatorStateExpire = bcs.struct('AuthenticatorStateExpire', {\n\tminEpoch: bcs.u64(),\n\tauthenticatorObjInitialSharedVersion: bcs.u64(),\n});\n\n// Rust: crates/sui-types/src/execution.rs\nexport const ExecutionTimeObservationKey = bcs.enum('ExecutionTimeObservationKey', {\n\tMoveEntryPoint: bcs.struct('MoveEntryPoint', {\n\t\tpackage: Address,\n\t\tmodule: bcs.string(),\n\t\tfunction: bcs.string(),\n\t\ttypeArguments: bcs.vector(TypeTag),\n\t}),\n\tTransferObjects: null,\n\tSplitCoins: null,\n\tMergeCoins: null,\n\tPublish: null,\n\tMakeMoveVec: null,\n\tUpgrade: null,\n});\n\n// Rust: crates/sui-types/src/transaction.rs\nexport const StoredExecutionTimeObservations = bcs.enum('StoredExecutionTimeObservations', {\n\tV1: bcs.vector(\n\t\tbcs.tuple([\n\t\t\tExecutionTimeObservationKey,\n\t\t\tbcs.vector(\n\t\t\t\tbcs.tuple([\n\t\t\t\t\t// AuthorityName (BLS public key bytes)\n\t\t\t\t\tbcs.byteVector(),\n\t\t\t\t\tbcs.struct('Duration', {\n\t\t\t\t\t\tsecs: bcs.u64(),\n\t\t\t\t\t\tnanos: bcs.u32(),\n\t\t\t\t\t}),\n\t\t\t\t]),\n\t\t\t),\n\t\t]),\n\t),\n});\n\n// Rust: crates/sui-types/src/transaction.rs\nexport const WriteAccumulatorStorageCost = bcs.struct('WriteAccumulatorStorageCost', {\n\tstorageCost: bcs.u64(),\n});\n\n// Rust: crates/sui-types/src/transaction.rs\nexport const EndOfEpochTransactionKind = bcs.enum('EndOfEpochTransactionKind', {\n\tChangeEpoch: ChangeEpoch,\n\tAuthenticatorStateCreate: null,\n\tAuthenticatorStateExpire: AuthenticatorStateExpire,\n\tRandomnessStateCreate: null,\n\tDenyListStateCreate: null,\n\t// ChainIdentifier (the genesis checkpoint digest)\n\tBridgeStateCreate: ObjectDigest,\n\tBridgeCommitteeInit: bcs.u64(),\n\tStoreExecutionTimeObservations: StoredExecutionTimeObservations,\n\tAccumulatorRootCreate: null,\n\tCoinRegistryCreate: null,\n\tDisplayRegistryCreate: null,\n\tAddressAliasStateCreate: null,\n\tWriteAccumulatorStorageCost: WriteAccumulatorStorageCost,\n});\n\n// Rust: crates/sui-types/src/transaction.rs\nexport const TransactionKind = bcs.enum('TransactionKind', {\n\tProgrammableTransaction: ProgrammableTransaction,\n\tChangeEpoch: ChangeEpoch,\n\tGenesis: GenesisTransaction,\n\tConsensusCommitPrologue: ConsensusCommitPrologue,\n\tAuthenticatorStateUpdate: AuthenticatorStateUpdate,\n\tEndOfEpochTransaction: bcs.vector(EndOfEpochTransactionKind),\n\tRandomnessStateUpdate: RandomnessStateUpdate,\n\tConsensusCommitPrologueV2: ConsensusCommitPrologueV2,\n\tConsensusCommitPrologueV3: ConsensusCommitPrologueV3,\n\tConsensusCommitPrologueV4: ConsensusCommitPrologueV4,\n\tProgrammableSystemTransaction: ProgrammableTransaction,\n});\n\nexport const TransactionDataV1 = bcs.struct('TransactionDataV1', {\n\tkind: TransactionKind,\n\tsender: Address,\n\tgasData: GasData,\n\texpiration: TransactionExpiration,\n});\n\nexport const TransactionData = bcs.enum('TransactionData', {\n\tV1: TransactionDataV1,\n});\n\nexport const SenderSignedTransaction = bcs.struct('SenderSignedTransaction', {\n\tintentMessage: IntentMessage(TransactionData),\n\ttxSignatures: bcs.vector(base64String),\n});\n\nexport const SenderSignedData = bcs.vector(SenderSignedTransaction, {\n\tname: 'SenderSignedData',\n});\n"],"mappings":";;;;AAmBA,MAAa,cAAc,IAAI,OAAO,eAAe;CACpD,OAAO,IAAI,KAAK;CAChB,iBAAiB,IAAI,KAAK;CAC1B,eAAe,IAAI,KAAK;CACxB,mBAAmB,IAAI,KAAK;CAC5B,eAAe,IAAI,KAAK;CACxB,yBAAyB,IAAI,KAAK;CAClC,uBAAuB,IAAI,KAAK;CAChC,gBAAgB,IAAI,OACnB,IAAI,MAAM;EAAC,IAAI,KAAK;EAAE,IAAI,OAAO,IAAI,YAAY,CAAC;EAAE,IAAI,OAAO,QAAQ;EAAC,CAAC,CACzE;CACD,CAAC;AAGF,MAAa,gBAAgB,IAAI,KAAK,iBAAiB,EACtD,WAAW,IAAI,OAAO,aAAa;CAClC,MAAM;CACN,OAAO;CACP,CAAC,EACF,CAAC;AAGF,MAAa,qBAAqB,IAAI,OAAO,sBAAsB,EAClE,SAAS,IAAI,OAAO,cAAc,EAClC,CAAC;AAGF,MAAa,0BAA0B,IAAI,OAAO,2BAA2B;CAC5E,OAAO,IAAI,KAAK;CAChB,OAAO,IAAI,KAAK;CAChB,mBAAmB,IAAI,KAAK;CAC5B,CAAC;AAGF,MAAa,4BAA4B,IAAI,OAAO,6BAA6B;CAChF,OAAO,IAAI,KAAK;CAChB,OAAO,IAAI,KAAK;CAChB,mBAAmB,IAAI,KAAK;CAC5B,uBAAuB;CACvB,CAAC;AAGF,MAAa,wCAAwC,IAAI,KACxD,yCACA;CACC,uBAAuB,IAAI,OAC1B,IAAI,MAAM,CAAC,cAAc,IAAI,OAAO,IAAI,MAAM,CAAC,SAAS,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CACtE;CACD,yBAAyB,IAAI,OAC5B,IAAI,MAAM,C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,OAAO,2BAA2B;CAC5E,eAAe,cAAc,gBAAgB;CAC7C,cAAc,IAAI,OAAO,aAAa;CACtC,CAAC;AAEF,MAAa,mBAAmB,IAAI,OAAO,yBAAyB,EACnE,MAAM,oBACN,CAAC"}
|
|
1
|
+
{"version":3,"file":"transactions.mjs","names":[],"sources":["../../src/bcs/transactions.ts"],"sourcesContent":["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { bcs } from '@mysten/bcs';\n\nimport {\n\tAddress,\n\tbase64String,\n\tData,\n\tGasData,\n\tIntentMessage,\n\tObjectDigest,\n\tOwner,\n\tProgrammableTransaction,\n\tTransactionExpiration,\n\tTypeTag,\n} from './bcs.js';\n\n// Rust: crates/sui-types/src/transaction.rs\nexport const ChangeEpoch = bcs.struct('ChangeEpoch', {\n\tepoch: bcs.u64(),\n\tprotocolVersion: bcs.u64(),\n\tstorageCharge: bcs.u64(),\n\tcomputationCharge: bcs.u64(),\n\tstorageRebate: bcs.u64(),\n\tnonRefundableStorageFee: bcs.u64(),\n\tepochStartTimestampMs: bcs.u64(),\n\tsystemPackages: bcs.vector(\n\t\tbcs.tuple([bcs.u64(), bcs.vector(bcs.byteVector()), bcs.vector(Address)]),\n\t),\n});\n\n// Rust: crates/sui-types/src/transaction.rs\nexport const GenesisObject = bcs.enum('GenesisObject', {\n\tRawObject: bcs.struct('RawObject', {\n\t\tdata: Data,\n\t\towner: Owner,\n\t}),\n});\n\n// Rust: crates/sui-types/src/transaction.rs\nexport const GenesisTransaction = bcs.struct('GenesisTransaction', {\n\tobjects: bcs.vector(GenesisObject),\n});\n\n// Rust: crates/sui-types/src/messages_consensus.rs\nexport const ConsensusCommitPrologue = bcs.struct('ConsensusCommitPrologue', {\n\tepoch: bcs.u64(),\n\tround: bcs.u64(),\n\tcommitTimestampMs: bcs.u64(),\n});\n\n// Rust: crates/sui-types/src/messages_consensus.rs\nexport const ConsensusCommitPrologueV2 = bcs.struct('ConsensusCommitPrologueV2', {\n\tepoch: bcs.u64(),\n\tround: bcs.u64(),\n\tcommitTimestampMs: bcs.u64(),\n\tconsensusCommitDigest: ObjectDigest,\n});\n\n// Rust: crates/sui-types/src/messages_consensus.rs\nexport const ConsensusDeterminedVersionAssignments = bcs.enum(\n\t'ConsensusDeterminedVersionAssignments',\n\t{\n\t\tCancelledTransactions: bcs.vector(\n\t\t\tbcs.tuple([ObjectDigest, bcs.vector(bcs.tuple([Address, bcs.u64()]))]),\n\t\t),\n\t\tCancelledTransactionsV2: bcs.vector(\n\t\t\tbcs.tuple([\n\t\t\t\tObjectDigest,\n\t\t\t\tbcs.vector(bcs.tuple([bcs.tuple([Address, bcs.u64()]), bcs.u64()])),\n\t\t\t]),\n\t\t),\n\t},\n);\n\n// Rust: crates/sui-types/src/messages_consensus.rs\nexport const ConsensusCommitPrologueV3 = bcs.struct('ConsensusCommitPrologueV3', {\n\tepoch: bcs.u64(),\n\tround: bcs.u64(),\n\tsubDagIndex: bcs.option(bcs.u64()),\n\tcommitTimestampMs: bcs.u64(),\n\tconsensusCommitDigest: ObjectDigest,\n\tconsensusDeterminedVersionAssignments: ConsensusDeterminedVersionAssignments,\n});\n\n// Rust: crates/sui-types/src/messages_consensus.rs\nexport const ConsensusCommitPrologueV4 = bcs.struct('ConsensusCommitPrologueV4', {\n\tepoch: bcs.u64(),\n\tround: bcs.u64(),\n\tsubDagIndex: bcs.option(bcs.u64()),\n\tcommitTimestampMs: bcs.u64(),\n\tconsensusCommitDigest: ObjectDigest,\n\tconsensusDeterminedVersionAssignments: ConsensusDeterminedVersionAssignments,\n\tadditionalStateDigest: ObjectDigest,\n});\n\n// Rust: crates/sui-types/src/authenticator_state.rs\nexport const ActiveJwk = bcs.struct('ActiveJwk', {\n\tjwkId: bcs.struct('JwkId', {\n\t\tiss: bcs.string(),\n\t\tkid: bcs.string(),\n\t}),\n\tjwk: bcs.struct('JWK', {\n\t\tkty: bcs.string(),\n\t\te: bcs.string(),\n\t\tn: bcs.string(),\n\t\talg: bcs.string(),\n\t}),\n\tepoch: bcs.u64(),\n});\n\n// Rust: crates/sui-types/src/transaction.rs\nexport const AuthenticatorStateUpdate = bcs.struct('AuthenticatorStateUpdate', {\n\tepoch: bcs.u64(),\n\tround: bcs.u64(),\n\tnewActiveJwks: bcs.vector(ActiveJwk),\n\tauthenticatorObjInitialSharedVersion: bcs.u64(),\n});\n\n// Rust: crates/sui-types/src/transaction.rs\nexport const RandomnessStateUpdate = bcs.struct('RandomnessStateUpdate', {\n\tepoch: bcs.u64(),\n\trandomnessRound: bcs.u64(),\n\trandomBytes: bcs.byteVector(),\n\trandomnessObjInitialSharedVersion: bcs.u64(),\n});\n\n// Rust: crates/sui-types/src/transaction.rs\nexport const AuthenticatorStateExpire = bcs.struct('AuthenticatorStateExpire', {\n\tminEpoch: bcs.u64(),\n\tauthenticatorObjInitialSharedVersion: bcs.u64(),\n});\n\n// Rust: crates/sui-types/src/execution.rs\nexport const ExecutionTimeObservationKey = bcs.enum('ExecutionTimeObservationKey', {\n\tMoveEntryPoint: bcs.struct('MoveEntryPoint', {\n\t\tpackage: Address,\n\t\tmodule: bcs.string(),\n\t\tfunction: bcs.string(),\n\t\ttypeArguments: bcs.vector(TypeTag),\n\t}),\n\tTransferObjects: null,\n\tSplitCoins: null,\n\tMergeCoins: null,\n\tPublish: null,\n\tMakeMoveVec: null,\n\tUpgrade: null,\n});\n\n// Rust: crates/sui-types/src/transaction.rs\nexport const StoredExecutionTimeObservations = bcs.enum('StoredExecutionTimeObservations', {\n\tV1: bcs.vector(\n\t\tbcs.tuple([\n\t\t\tExecutionTimeObservationKey,\n\t\t\tbcs.vector(\n\t\t\t\tbcs.tuple([\n\t\t\t\t\t// AuthorityName (BLS public key bytes)\n\t\t\t\t\tbcs.byteVector(),\n\t\t\t\t\tbcs.struct('Duration', {\n\t\t\t\t\t\tsecs: bcs.u64(),\n\t\t\t\t\t\tnanos: bcs.u32(),\n\t\t\t\t\t}),\n\t\t\t\t]),\n\t\t\t),\n\t\t]),\n\t),\n});\n\n// Rust: crates/sui-types/src/transaction.rs\nexport const WriteAccumulatorStorageCost = bcs.struct('WriteAccumulatorStorageCost', {\n\tstorageCost: bcs.u64(),\n});\n\n// Rust: crates/sui-types/src/transaction.rs\nexport const EndOfEpochTransactionKind = bcs.enum('EndOfEpochTransactionKind', {\n\tChangeEpoch: ChangeEpoch,\n\tAuthenticatorStateCreate: null,\n\tAuthenticatorStateExpire: AuthenticatorStateExpire,\n\tRandomnessStateCreate: null,\n\tDenyListStateCreate: null,\n\t// ChainIdentifier (the genesis checkpoint digest)\n\tBridgeStateCreate: ObjectDigest,\n\tBridgeCommitteeInit: bcs.u64(),\n\tStoreExecutionTimeObservations: StoredExecutionTimeObservations,\n\tAccumulatorRootCreate: null,\n\tCoinRegistryCreate: null,\n\tDisplayRegistryCreate: null,\n\tAddressAliasStateCreate: null,\n\tWriteAccumulatorStorageCost: WriteAccumulatorStorageCost,\n\tForwardingAddressRegistryCreate: null,\n});\n\n// Rust: crates/sui-types/src/transaction.rs\nexport const TransactionKind = bcs.enum('TransactionKind', {\n\tProgrammableTransaction: ProgrammableTransaction,\n\tChangeEpoch: ChangeEpoch,\n\tGenesis: GenesisTransaction,\n\tConsensusCommitPrologue: ConsensusCommitPrologue,\n\tAuthenticatorStateUpdate: AuthenticatorStateUpdate,\n\tEndOfEpochTransaction: bcs.vector(EndOfEpochTransactionKind),\n\tRandomnessStateUpdate: RandomnessStateUpdate,\n\tConsensusCommitPrologueV2: ConsensusCommitPrologueV2,\n\tConsensusCommitPrologueV3: ConsensusCommitPrologueV3,\n\tConsensusCommitPrologueV4: ConsensusCommitPrologueV4,\n\tProgrammableSystemTransaction: ProgrammableTransaction,\n});\n\nexport const TransactionDataV1 = bcs.struct('TransactionDataV1', {\n\tkind: TransactionKind,\n\tsender: Address,\n\tgasData: GasData,\n\texpiration: TransactionExpiration,\n});\n\nexport const TransactionData = bcs.enum('TransactionData', {\n\tV1: TransactionDataV1,\n});\n\nexport const SenderSignedTransaction = bcs.struct('SenderSignedTransaction', {\n\tintentMessage: IntentMessage(TransactionData),\n\ttxSignatures: bcs.vector(base64String),\n});\n\nexport const SenderSignedData = bcs.vector(SenderSignedTransaction, {\n\tname: 'SenderSignedData',\n});\n"],"mappings":";;;;AAmBA,MAAa,cAAc,IAAI,OAAO,eAAe;CACpD,OAAO,IAAI,KAAK;CAChB,iBAAiB,IAAI,KAAK;CAC1B,eAAe,IAAI,KAAK;CACxB,mBAAmB,IAAI,KAAK;CAC5B,eAAe,IAAI,KAAK;CACxB,yBAAyB,IAAI,KAAK;CAClC,uBAAuB,IAAI,KAAK;CAChC,gBAAgB,IAAI,OACnB,IAAI,MAAM;EAAC,IAAI,KAAK;EAAE,IAAI,OAAO,IAAI,YAAY,CAAC;EAAE,IAAI,OAAO,QAAQ;EAAC,CAAC,CACzE;CACD,CAAC;AAGF,MAAa,gBAAgB,IAAI,KAAK,iBAAiB,EACtD,WAAW,IAAI,OAAO,aAAa;CAClC,MAAM;CACN,OAAO;CACP,CAAC,EACF,CAAC;AAGF,MAAa,qBAAqB,IAAI,OAAO,sBAAsB,EAClE,SAAS,IAAI,OAAO,cAAc,EAClC,CAAC;AAGF,MAAa,0BAA0B,IAAI,OAAO,2BAA2B;CAC5E,OAAO,IAAI,KAAK;CAChB,OAAO,IAAI,KAAK;CAChB,mBAAmB,IAAI,KAAK;CAC5B,CAAC;AAGF,MAAa,4BAA4B,IAAI,OAAO,6BAA6B;CAChF,OAAO,IAAI,KAAK;CAChB,OAAO,IAAI,KAAK;CAChB,mBAAmB,IAAI,KAAK;CAC5B,uBAAuB;CACvB,CAAC;AAGF,MAAa,wCAAwC,IAAI,KACxD,yCACA;CACC,uBAAuB,IAAI,OAC1B,IAAI,MAAM,CAAC,cAAc,IAAI,OAAO,IAAI,MAAM,CAAC,SAAS,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CACtE;CACD,yBAAyB,IAAI,OAC5B,IAAI,MAAM,CACT,cACA,IAAI,OA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