@mysten/sui 2.30.0 → 2.31.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 +34 -0
- package/dist/bcs/bcs.d.mts +6 -6
- package/dist/bcs/bcs.d.mts.map +1 -1
- package/dist/bcs/bcs.mjs +5 -1
- package/dist/bcs/bcs.mjs.map +1 -1
- package/dist/bcs/index.d.mts +103 -11
- package/dist/bcs/index.d.mts.map +1 -1
- package/dist/bcs/types.d.mts.map +1 -1
- package/dist/client/core-resolver.mjs +2 -1
- package/dist/client/core-resolver.mjs.map +1 -1
- package/dist/client/transaction-resolver.mjs +35 -8
- package/dist/client/transaction-resolver.mjs.map +1 -1
- package/dist/cryptography/signature.d.mts +6 -6
- package/dist/graphql/generated/tada-env.d.mts +74 -0
- package/dist/grpc/proto/sui/rpc/v2/input.d.mts +21 -1
- package/dist/grpc/proto/sui/rpc/v2/input.d.mts.map +1 -1
- package/dist/grpc/proto/sui/rpc/v2/input.mjs +21 -0
- package/dist/grpc/proto/sui/rpc/v2/input.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_execution_service.client.d.mts +4 -4
- package/dist/jsonRpc/core.mjs +1 -1
- package/dist/jsonRpc/core.mjs.map +1 -1
- package/dist/transactions/Transaction.d.mts +44 -39
- package/dist/transactions/Transaction.d.mts.map +1 -1
- package/dist/transactions/Transaction.mjs +65 -24
- package/dist/transactions/Transaction.mjs.map +1 -1
- package/dist/transactions/data/internal.d.mts +12 -0
- package/dist/transactions/data/internal.d.mts.map +1 -1
- package/dist/transactions/data/internal.mjs +5 -1
- package/dist/transactions/data/internal.mjs.map +1 -1
- package/dist/transactions/data/v2.d.mts +5 -0
- package/dist/transactions/data/v2.d.mts.map +1 -1
- package/dist/transactions/index.d.mts +3 -2
- package/dist/transactions/intents/AllowanceBalance.mjs +147 -0
- package/dist/transactions/intents/AllowanceBalance.mjs.map +1 -0
- package/dist/transactions/intents/BalanceIntentNames.mjs +7 -0
- package/dist/transactions/intents/BalanceIntentNames.mjs.map +1 -0
- package/dist/transactions/intents/BalanceOptions.d.mts +27 -0
- package/dist/transactions/intents/BalanceOptions.d.mts.map +1 -0
- package/dist/transactions/intents/BalanceOptions.mjs +12 -0
- package/dist/transactions/intents/BalanceOptions.mjs.map +1 -0
- package/dist/transactions/intents/CoinWithBalance.d.mts.map +1 -1
- package/dist/transactions/intents/CoinWithBalance.mjs +31 -10
- package/dist/transactions/intents/CoinWithBalance.mjs.map +1 -1
- package/dist/transactions/intents/ResolveBalances.mjs +16 -0
- package/dist/transactions/intents/ResolveBalances.mjs.map +1 -0
- package/dist/transactions/resolve.d.mts.map +1 -1
- package/dist/transactions/resolve.mjs +1 -1
- package/dist/transactions/resolve.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/llms-index.md +1 -0
- package/docs/transactions/allowances.md +176 -0
- package/docs/transactions/coins-and-balances.md +12 -9
- package/package.json +1 -1
- package/src/bcs/bcs.ts +4 -0
- package/src/bcs/types.ts +2 -1
- package/src/client/core-resolver.ts +6 -4
- package/src/client/transaction-resolver.ts +43 -9
- package/src/graphql/generated/schema.graphql +87 -42
- package/src/graphql/generated/tada-env.ts +84 -0
- package/src/grpc/proto/sui/rpc/v2/input.ts +22 -0
- package/src/jsonRpc/core.ts +3 -4
- package/src/transactions/Transaction.ts +70 -49
- package/src/transactions/data/internal.ts +4 -0
- package/src/transactions/index.ts +3 -0
- package/src/transactions/intents/AllowanceBalance.ts +204 -0
- package/src/transactions/intents/BalanceIntentNames.ts +5 -0
- package/src/transactions/intents/BalanceOptions.ts +45 -0
- package/src/transactions/intents/CoinWithBalance.ts +51 -8
- package/src/transactions/intents/ResolveBalances.ts +30 -0
- package/src/transactions/resolve.ts +6 -0
- package/src/version.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
1
|
# @mysten/sui.js
|
|
2
2
|
|
|
3
|
+
## 2.31.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 15eb25e: Add wire-level support for `SenderAllowance` funds withdrawals (`sui::allowance`,
|
|
8
|
+
protocol v137). `bcs.WithdrawFrom`, the transaction input schema, and `Inputs.FundsWithdrawal`
|
|
9
|
+
accept `{ $kind: 'SenderAllowance', SenderAllowance: { funder, allowance } }`, and the gRPC,
|
|
10
|
+
GraphQL, and JSON-RPC clients decode and encode the new source when reading, simulating, and
|
|
11
|
+
resolving transactions.
|
|
12
|
+
|
|
13
|
+
Add `tx.balance({ allowance, balance, type })` and `tx.coin({ allowance, balance, type })` to
|
|
14
|
+
resolve allowance IDs and redeem their withdrawals automatically. A known `{ objectId, funder }`
|
|
15
|
+
reference skips metadata lookup. Allowance spends never fall back to the sender's funds. A shared
|
|
16
|
+
resolver handles the separate allowance and coin intents, reserving allowance withdrawals before
|
|
17
|
+
ordinary coin selection. Both helpers accept decimal strings for `balance`. App-bound allowances
|
|
18
|
+
accept `{ objectId, app: { type, permit }, funder? }` with a `SpendPermit<A>` from an app
|
|
19
|
+
authorization call.
|
|
20
|
+
|
|
21
|
+
Account for allowance reservations when selecting ordinary coins and gas, including transactions
|
|
22
|
+
where the sender or gas sponsor is also the allowance's funder.
|
|
23
|
+
|
|
24
|
+
Resolve MVR coin and app types before allowance metadata checks. Require decimal digits in string
|
|
25
|
+
amounts, rejecting empty or whitespace-only values. Upgrade read-only allowance inputs to mutable
|
|
26
|
+
when spending, including with a known funder.
|
|
27
|
+
|
|
28
|
+
Add `tx.withdrawal({ amount, type, from: 'allowance', allowance, funder })` and `from: 'sponsor'`.
|
|
29
|
+
Omitting `from` defaults to the sender. Export `WithdrawalOptions` with required allowance and
|
|
30
|
+
funder fields only for allowance withdrawals.
|
|
31
|
+
|
|
32
|
+
### Patch Changes
|
|
33
|
+
|
|
34
|
+
- 15eb25e: `SuiJsonRpcClient` core transaction reads now report the genesis transaction's
|
|
35
|
+
placeholder signature, matching gRPC and GraphQL, instead of an empty signature list.
|
|
36
|
+
|
|
3
37
|
## 2.30.0
|
|
4
38
|
|
|
5
39
|
### Minor 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_bcs1241 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_bcs1241.BcsStruct<{
|
|
8
|
+
intent: _mysten_bcs1241.BcsStruct<{
|
|
9
|
+
scope: _mysten_bcs1241.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_bcs1241.BcsEnum<{
|
|
16
16
|
V0: null;
|
|
17
17
|
}, "IntentVersion">;
|
|
18
|
-
appId:
|
|
18
|
+
appId: _mysten_bcs1241.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":";;;;;
|
|
1
|
+
{"version":3,"file":"bcs.d.mts","names":[],"sources":["../../src/bcs/bcs.ts"],"mappings":";;;;;cAwIa,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
|
@@ -63,7 +63,11 @@ const Reservation = bcs.enum("Reservation", { MaxAmountU64: bcs.u64() });
|
|
|
63
63
|
const WithdrawalType = bcs.enum("WithdrawalType", { Balance: bcs.lazy(() => TypeTag) });
|
|
64
64
|
const WithdrawFrom = bcs.enum("WithdrawFrom", {
|
|
65
65
|
Sender: null,
|
|
66
|
-
Sponsor: null
|
|
66
|
+
Sponsor: null,
|
|
67
|
+
SenderAllowance: bcs.struct("SenderAllowance", {
|
|
68
|
+
funder: Address,
|
|
69
|
+
allowance: Address
|
|
70
|
+
})
|
|
67
71
|
});
|
|
68
72
|
const FundsWithdrawal = bcs.struct("FundsWithdrawal", {
|
|
69
73
|
reservation: Reservation,
|
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 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;EACJ,CAAC,CACD,UAAU;EACV,QAAQ,QAAyB;EACjC,SAAS,QAAQ,OAAO,IAAI;EAC5B,CAAC;;AAGJ,SAAS,WAAwC,MAAS;AACzD,QAAO,IAAI,KAAK,UAAU;EACzB,MAAM;EACN,MAAM;EACN,CAAC;;AAGH,MAAa,UAAU,IAAI,MAAM,mBAAmB,CAAC,UAAU;CAC9D,WAAW,QAAQ;EAClB,MAAM,UAAU,OAAO,QAAQ,WAAW,MAAM,MAAM,IAAI;AAC1D,MAAI,CAAC,WAAW,CAAC,kBAAkB,oBAAoB,QAAQ,CAAC,CAC/D,OAAM,IAAI,MAAM,uBAAuB,UAAU;;CAGnD,QAAQ,QACP,OAAO,QAAQ,WAAW,QAAQ,oBAAoB,IAAI,CAAC,GAAG;CAC/D,SAAS,QAAQ,oBAAoB,MAAM,IAAI,CAAC;CAChD,CAAC;AAEF,MAAa,eAAe,IAAI,YAAY,CAAC,UAAU;CACtD,MAAM;CACN,QAAQ,UAAkB,WAAW,MAAM;CAC3C,SAAS,UAAU,SAAS,IAAI,WAAW,MAAM,CAAC;CAClD,WAAW,UAAU;AACpB,MAAI,WAAW,MAAM,CAAC,WA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,iBAAiB,IAAI,KAAK;CAC1B,CAAC;AAGF,MAAa,cAAc,IAAI,OAAO,eAAe;CACpD,IAAI;CACJ,SAAS,IAAI,KAAK;CAClB,WAAW,IAAI,IAAI,IAAI,QAAQ,EAAE,IAAI,YAAY,CAAC;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\tSenderAllowance: bcs.struct('SenderAllowance', {\n\t\tfunder: Address,\n\t\tallowance: Address,\n\t}),\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;EACJ,CAAC,CACD,UAAU;EACV,QAAQ,QAAyB;EACjC,SAAS,QAAQ,OAAO,IAAI;EAC5B,CAAC;;AAGJ,SAAS,WAAwC,MAAS;AACzD,QAAO,IAAI,KAAK,UAAU;EACzB,MAAM;EACN,MAAM;EACN,CAAC;;AAGH,MAAa,UAAU,IAAI,MAAM,mBAAmB,CAAC,UAAU;CAC9D,WAAW,QAAQ;EAClB,MAAM,UAAU,OAAO,QAAQ,WAAW,MAAM,MAAM,IAAI;AAC1D,MAAI,CAAC,WAAW,CAAC,kBAAkB,oBAAoB,QAAQ,CAAC,CAC/D,OAAM,IAAI,MAAM,uBAAuB,UAAU;;CAGnD,QAAQ,QACP,OAAO,QAAQ,WAAW,QAAQ,oBAAoB,IAAI,CAAC,GAAG;CAC/D,SAAS,QAAQ,oBAAoB,MAAM,IAAI,CAAC;CAChD,CAAC;AAEF,MAAa,eAAe,IAAI,YAAY,CAAC,UAAU;CACtD,MAAM;CACN,QAAQ,UAAkB,WAAW,MAAM;CAC3C,SAAS,UAAU,SAAS,IAAI,WAAW,MAAM,CAAC;CAClD,WAAW,UAAU;AACpB,MAAI,WAAW,MAAM,CAAC,WAAW,GAChC,OAAM,IAAI,MAAM,gCAAgC;;CAGlD,CAAC;AAEF,MAAa,eAAe,IAAI,OAAO,gBAAgB;CACtD,UAAU;CACV,SAAS,IAAI,KAAK;CAClB,QAAQ;CACR,CAAC;AAEF,MAAa,kBAAkB,IAAI,OAAO,mBAAmB;CAC5D,UAAU;CACV,sBAAsB,IAAI,KAAK;CAC/B,SAAS,IAAI,MAAM;CACnB,CAAC;AAEF,MAA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C,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"}
|
package/dist/bcs/index.d.mts
CHANGED
|
@@ -57,6 +57,10 @@ declare const suiBcs: {
|
|
|
57
57
|
withdrawFrom: _mysten_bcs0.BcsEnum<{
|
|
58
58
|
Sender: null;
|
|
59
59
|
Sponsor: null;
|
|
60
|
+
SenderAllowance: _mysten_bcs0.BcsStruct<{
|
|
61
|
+
funder: _mysten_bcs0.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
62
|
+
allowance: _mysten_bcs0.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
63
|
+
}, string>;
|
|
60
64
|
}, "WithdrawFrom">;
|
|
61
65
|
}, string>;
|
|
62
66
|
}, "CallArg">;
|
|
@@ -558,7 +562,11 @@ declare const suiBcs: {
|
|
|
558
562
|
withdrawFrom: _mysten_bcs0.EnumOutputShapeWithKeys<{
|
|
559
563
|
Sender: true;
|
|
560
564
|
Sponsor: true;
|
|
561
|
-
|
|
565
|
+
SenderAllowance: {
|
|
566
|
+
funder: string;
|
|
567
|
+
allowance: string;
|
|
568
|
+
};
|
|
569
|
+
}, "Sender" | "Sponsor" | "SenderAllowance">;
|
|
562
570
|
};
|
|
563
571
|
}, "Object" | "Pure" | "FundsWithdrawal">[], Iterable<_mysten_bcs0.EnumInputShape<{
|
|
564
572
|
Pure: {
|
|
@@ -591,6 +599,10 @@ declare const suiBcs: {
|
|
|
591
599
|
withdrawFrom: _mysten_bcs0.EnumInputShape<{
|
|
592
600
|
Sender: boolean | object | null;
|
|
593
601
|
Sponsor: boolean | object | null;
|
|
602
|
+
SenderAllowance: {
|
|
603
|
+
funder: string | Uint8Array<ArrayBufferLike>;
|
|
604
|
+
allowance: string | Uint8Array<ArrayBufferLike>;
|
|
605
|
+
};
|
|
594
606
|
}>;
|
|
595
607
|
};
|
|
596
608
|
}>> & {
|
|
@@ -840,7 +852,11 @@ declare const suiBcs: {
|
|
|
840
852
|
withdrawFrom: _mysten_bcs0.EnumOutputShapeWithKeys<{
|
|
841
853
|
Sender: true;
|
|
842
854
|
Sponsor: true;
|
|
843
|
-
|
|
855
|
+
SenderAllowance: {
|
|
856
|
+
funder: string;
|
|
857
|
+
allowance: string;
|
|
858
|
+
};
|
|
859
|
+
}, "Sender" | "Sponsor" | "SenderAllowance">;
|
|
844
860
|
};
|
|
845
861
|
}, "Object" | "Pure" | "FundsWithdrawal">[];
|
|
846
862
|
commands: _mysten_bcs0.EnumOutputShapeWithKeys<{
|
|
@@ -1127,7 +1143,11 @@ declare const suiBcs: {
|
|
|
1127
1143
|
withdrawFrom: _mysten_bcs0.EnumOutputShapeWithKeys<{
|
|
1128
1144
|
Sender: true;
|
|
1129
1145
|
Sponsor: true;
|
|
1130
|
-
|
|
1146
|
+
SenderAllowance: {
|
|
1147
|
+
funder: string;
|
|
1148
|
+
allowance: string;
|
|
1149
|
+
};
|
|
1150
|
+
}, "Sender" | "Sponsor" | "SenderAllowance">;
|
|
1131
1151
|
};
|
|
1132
1152
|
}, "Object" | "Pure" | "FundsWithdrawal">[];
|
|
1133
1153
|
commands: _mysten_bcs0.EnumOutputShapeWithKeys<{
|
|
@@ -1303,6 +1323,10 @@ declare const suiBcs: {
|
|
|
1303
1323
|
withdrawFrom: _mysten_bcs0.EnumInputShape<{
|
|
1304
1324
|
Sender: boolean | object | null;
|
|
1305
1325
|
Sponsor: boolean | object | null;
|
|
1326
|
+
SenderAllowance: {
|
|
1327
|
+
funder: string | Uint8Array<ArrayBufferLike>;
|
|
1328
|
+
allowance: string | Uint8Array<ArrayBufferLike>;
|
|
1329
|
+
};
|
|
1306
1330
|
}>;
|
|
1307
1331
|
};
|
|
1308
1332
|
}>> & {
|
|
@@ -1654,6 +1678,10 @@ declare const suiBcs: {
|
|
|
1654
1678
|
withdrawFrom: _mysten_bcs0.EnumInputShape<{
|
|
1655
1679
|
Sender: boolean | object | null;
|
|
1656
1680
|
Sponsor: boolean | object | null;
|
|
1681
|
+
SenderAllowance: {
|
|
1682
|
+
funder: string | Uint8Array<ArrayBufferLike>;
|
|
1683
|
+
allowance: string | Uint8Array<ArrayBufferLike>;
|
|
1684
|
+
};
|
|
1657
1685
|
}>;
|
|
1658
1686
|
};
|
|
1659
1687
|
}>> & {
|
|
@@ -1862,7 +1890,11 @@ declare const suiBcs: {
|
|
|
1862
1890
|
withdrawFrom: _mysten_bcs0.EnumOutputShapeWithKeys<{
|
|
1863
1891
|
Sender: true;
|
|
1864
1892
|
Sponsor: true;
|
|
1865
|
-
|
|
1893
|
+
SenderAllowance: {
|
|
1894
|
+
funder: string;
|
|
1895
|
+
allowance: string;
|
|
1896
|
+
};
|
|
1897
|
+
}, "Sender" | "Sponsor" | "SenderAllowance">;
|
|
1866
1898
|
};
|
|
1867
1899
|
}, "Object" | "Pure" | "FundsWithdrawal">[], Iterable<_mysten_bcs0.EnumInputShape<{
|
|
1868
1900
|
Pure: {
|
|
@@ -1895,6 +1927,10 @@ declare const suiBcs: {
|
|
|
1895
1927
|
withdrawFrom: _mysten_bcs0.EnumInputShape<{
|
|
1896
1928
|
Sender: boolean | object | null;
|
|
1897
1929
|
Sponsor: boolean | object | null;
|
|
1930
|
+
SenderAllowance: {
|
|
1931
|
+
funder: string | Uint8Array<ArrayBufferLike>;
|
|
1932
|
+
allowance: string | Uint8Array<ArrayBufferLike>;
|
|
1933
|
+
};
|
|
1898
1934
|
}>;
|
|
1899
1935
|
};
|
|
1900
1936
|
}>> & {
|
|
@@ -2436,7 +2472,11 @@ declare const suiBcs: {
|
|
|
2436
2472
|
withdrawFrom: _mysten_bcs0.EnumOutputShapeWithKeys<{
|
|
2437
2473
|
Sender: true;
|
|
2438
2474
|
Sponsor: true;
|
|
2439
|
-
|
|
2475
|
+
SenderAllowance: {
|
|
2476
|
+
funder: string;
|
|
2477
|
+
allowance: string;
|
|
2478
|
+
};
|
|
2479
|
+
}, "Sender" | "Sponsor" | "SenderAllowance">;
|
|
2440
2480
|
};
|
|
2441
2481
|
}, "Object" | "Pure" | "FundsWithdrawal">[], Iterable<_mysten_bcs0.EnumInputShape<{
|
|
2442
2482
|
Pure: {
|
|
@@ -2469,6 +2509,10 @@ declare const suiBcs: {
|
|
|
2469
2509
|
withdrawFrom: _mysten_bcs0.EnumInputShape<{
|
|
2470
2510
|
Sender: boolean | object | null;
|
|
2471
2511
|
Sponsor: boolean | object | null;
|
|
2512
|
+
SenderAllowance: {
|
|
2513
|
+
funder: string | Uint8Array<ArrayBufferLike>;
|
|
2514
|
+
allowance: string | Uint8Array<ArrayBufferLike>;
|
|
2515
|
+
};
|
|
2472
2516
|
}>;
|
|
2473
2517
|
};
|
|
2474
2518
|
}>> & {
|
|
@@ -2763,7 +2807,11 @@ declare const suiBcs: {
|
|
|
2763
2807
|
withdrawFrom: _mysten_bcs0.EnumOutputShapeWithKeys<{
|
|
2764
2808
|
Sender: true;
|
|
2765
2809
|
Sponsor: true;
|
|
2766
|
-
|
|
2810
|
+
SenderAllowance: {
|
|
2811
|
+
funder: string;
|
|
2812
|
+
allowance: string;
|
|
2813
|
+
};
|
|
2814
|
+
}, "Sender" | "Sponsor" | "SenderAllowance">;
|
|
2767
2815
|
};
|
|
2768
2816
|
}, "Object" | "Pure" | "FundsWithdrawal">[], Iterable<_mysten_bcs0.EnumInputShape<{
|
|
2769
2817
|
Pure: {
|
|
@@ -2796,6 +2844,10 @@ declare const suiBcs: {
|
|
|
2796
2844
|
withdrawFrom: _mysten_bcs0.EnumInputShape<{
|
|
2797
2845
|
Sender: boolean | object | null;
|
|
2798
2846
|
Sponsor: boolean | object | null;
|
|
2847
|
+
SenderAllowance: {
|
|
2848
|
+
funder: string | Uint8Array<ArrayBufferLike>;
|
|
2849
|
+
allowance: string | Uint8Array<ArrayBufferLike>;
|
|
2850
|
+
};
|
|
2799
2851
|
}>;
|
|
2800
2852
|
};
|
|
2801
2853
|
}>> & {
|
|
@@ -3337,7 +3389,11 @@ declare const suiBcs: {
|
|
|
3337
3389
|
withdrawFrom: _mysten_bcs0.EnumOutputShapeWithKeys<{
|
|
3338
3390
|
Sender: true;
|
|
3339
3391
|
Sponsor: true;
|
|
3340
|
-
|
|
3392
|
+
SenderAllowance: {
|
|
3393
|
+
funder: string;
|
|
3394
|
+
allowance: string;
|
|
3395
|
+
};
|
|
3396
|
+
}, "Sender" | "Sponsor" | "SenderAllowance">;
|
|
3341
3397
|
};
|
|
3342
3398
|
}, "Object" | "Pure" | "FundsWithdrawal">[], Iterable<_mysten_bcs0.EnumInputShape<{
|
|
3343
3399
|
Pure: {
|
|
@@ -3370,6 +3426,10 @@ declare const suiBcs: {
|
|
|
3370
3426
|
withdrawFrom: _mysten_bcs0.EnumInputShape<{
|
|
3371
3427
|
Sender: boolean | object | null;
|
|
3372
3428
|
Sponsor: boolean | object | null;
|
|
3429
|
+
SenderAllowance: {
|
|
3430
|
+
funder: string | Uint8Array<ArrayBufferLike>;
|
|
3431
|
+
allowance: string | Uint8Array<ArrayBufferLike>;
|
|
3432
|
+
};
|
|
3373
3433
|
}>;
|
|
3374
3434
|
};
|
|
3375
3435
|
}>> & {
|
|
@@ -3640,7 +3700,11 @@ declare const suiBcs: {
|
|
|
3640
3700
|
withdrawFrom: _mysten_bcs0.EnumOutputShapeWithKeys<{
|
|
3641
3701
|
Sender: true;
|
|
3642
3702
|
Sponsor: true;
|
|
3643
|
-
|
|
3703
|
+
SenderAllowance: {
|
|
3704
|
+
funder: string;
|
|
3705
|
+
allowance: string;
|
|
3706
|
+
};
|
|
3707
|
+
}, "Sender" | "Sponsor" | "SenderAllowance">;
|
|
3644
3708
|
};
|
|
3645
3709
|
}, "Object" | "Pure" | "FundsWithdrawal">[], Iterable<_mysten_bcs0.EnumInputShape<{
|
|
3646
3710
|
Pure: {
|
|
@@ -3673,6 +3737,10 @@ declare const suiBcs: {
|
|
|
3673
3737
|
withdrawFrom: _mysten_bcs0.EnumInputShape<{
|
|
3674
3738
|
Sender: boolean | object | null;
|
|
3675
3739
|
Sponsor: boolean | object | null;
|
|
3740
|
+
SenderAllowance: {
|
|
3741
|
+
funder: string | Uint8Array<ArrayBufferLike>;
|
|
3742
|
+
allowance: string | Uint8Array<ArrayBufferLike>;
|
|
3743
|
+
};
|
|
3676
3744
|
}>;
|
|
3677
3745
|
};
|
|
3678
3746
|
}>> & {
|
|
@@ -4214,7 +4282,11 @@ declare const suiBcs: {
|
|
|
4214
4282
|
withdrawFrom: _mysten_bcs0.EnumOutputShapeWithKeys<{
|
|
4215
4283
|
Sender: true;
|
|
4216
4284
|
Sponsor: true;
|
|
4217
|
-
|
|
4285
|
+
SenderAllowance: {
|
|
4286
|
+
funder: string;
|
|
4287
|
+
allowance: string;
|
|
4288
|
+
};
|
|
4289
|
+
}, "Sender" | "Sponsor" | "SenderAllowance">;
|
|
4218
4290
|
};
|
|
4219
4291
|
}, "Object" | "Pure" | "FundsWithdrawal">[], Iterable<_mysten_bcs0.EnumInputShape<{
|
|
4220
4292
|
Pure: {
|
|
@@ -4247,6 +4319,10 @@ declare const suiBcs: {
|
|
|
4247
4319
|
withdrawFrom: _mysten_bcs0.EnumInputShape<{
|
|
4248
4320
|
Sender: boolean | object | null;
|
|
4249
4321
|
Sponsor: boolean | object | null;
|
|
4322
|
+
SenderAllowance: {
|
|
4323
|
+
funder: string | Uint8Array<ArrayBufferLike>;
|
|
4324
|
+
allowance: string | Uint8Array<ArrayBufferLike>;
|
|
4325
|
+
};
|
|
4250
4326
|
}>;
|
|
4251
4327
|
};
|
|
4252
4328
|
}>> & {
|
|
@@ -5195,7 +5271,11 @@ declare const suiBcs: {
|
|
|
5195
5271
|
withdrawFrom: _mysten_bcs0.EnumOutputShapeWithKeys<{
|
|
5196
5272
|
Sender: true;
|
|
5197
5273
|
Sponsor: true;
|
|
5198
|
-
|
|
5274
|
+
SenderAllowance: {
|
|
5275
|
+
funder: string;
|
|
5276
|
+
allowance: string;
|
|
5277
|
+
};
|
|
5278
|
+
}, "Sender" | "Sponsor" | "SenderAllowance">;
|
|
5199
5279
|
};
|
|
5200
5280
|
}, "Object" | "Pure" | "FundsWithdrawal">[], Iterable<_mysten_bcs0.EnumInputShape<{
|
|
5201
5281
|
Pure: {
|
|
@@ -5228,6 +5308,10 @@ declare const suiBcs: {
|
|
|
5228
5308
|
withdrawFrom: _mysten_bcs0.EnumInputShape<{
|
|
5229
5309
|
Sender: boolean | object | null;
|
|
5230
5310
|
Sponsor: boolean | object | null;
|
|
5311
|
+
SenderAllowance: {
|
|
5312
|
+
funder: string | Uint8Array<ArrayBufferLike>;
|
|
5313
|
+
allowance: string | Uint8Array<ArrayBufferLike>;
|
|
5314
|
+
};
|
|
5231
5315
|
}>;
|
|
5232
5316
|
};
|
|
5233
5317
|
}>> & {
|
|
@@ -5769,7 +5853,11 @@ declare const suiBcs: {
|
|
|
5769
5853
|
withdrawFrom: _mysten_bcs0.EnumOutputShapeWithKeys<{
|
|
5770
5854
|
Sender: true;
|
|
5771
5855
|
Sponsor: true;
|
|
5772
|
-
|
|
5856
|
+
SenderAllowance: {
|
|
5857
|
+
funder: string;
|
|
5858
|
+
allowance: string;
|
|
5859
|
+
};
|
|
5860
|
+
}, "Sender" | "Sponsor" | "SenderAllowance">;
|
|
5773
5861
|
};
|
|
5774
5862
|
}, "Object" | "Pure" | "FundsWithdrawal">[], Iterable<_mysten_bcs0.EnumInputShape<{
|
|
5775
5863
|
Pure: {
|
|
@@ -5802,6 +5890,10 @@ declare const suiBcs: {
|
|
|
5802
5890
|
withdrawFrom: _mysten_bcs0.EnumInputShape<{
|
|
5803
5891
|
Sender: boolean | object | null;
|
|
5804
5892
|
Sponsor: boolean | object | null;
|
|
5893
|
+
SenderAllowance: {
|
|
5894
|
+
funder: string | Uint8Array<ArrayBufferLike>;
|
|
5895
|
+
allowance: string | Uint8Array<ArrayBufferLike>;
|
|
5896
|
+
};
|
|
5805
5897
|
}>;
|
|
5806
5898
|
};
|
|
5807
5899
|
}>> & {
|
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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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mQAQs0J,YAAA,CAAA,cAAA,2BAAA,CAAA,GAAA,CAAA,CAAA,GAAA,UAAA,YAAA,CAAA,OAAA,mBAAA,GAAA,4BAAA,CAAA,GAAA,CAAA,CAAA,GAAA,UAAA,YAAA,CAAA,OAAA,mBAAA,GAAA,YAAA,IAAA,IAAA,YAAA,CAAA,QAAA,CAAA,CAAA,EAAA,IAAA;kCAAA,YAAA,CAAA,OAAA"}
|
package/dist/bcs/types.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.mts","names":[],"sources":["../../src/bcs/types.ts"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"types.d.mts","names":[],"sources":["../../src/bcs/types.ts"],"mappings":";;;;KAqFY,SAAA;EACX,OAAA;EACA,MAAA;EACA,IAAA;EACA,UAAA,EAAY,OAAA;AAAA;;;;KAMD,OAAA;EACP,IAAA;AAAA;EACA,EAAA;AAAA;EACA,GAAA;AAAA;EACA,IAAA;AAAA;EACA,OAAA;AAAA;EACA,MAAA;AAAA;EACA,MAAA,EAAQ,OAAA;AAAA;EACR,MAAA,EAAQ,SAAA;AAAA;EACR,GAAA;AAAA;EACA,GAAA;AAAA;EACA,IAAA;AAAA"}
|
|
@@ -33,7 +33,8 @@ async function coreClientResolveTransactionPlugin(transactionData, options, next
|
|
|
33
33
|
for (const input of transactionData.inputs) {
|
|
34
34
|
if (input.$kind !== "FundsWithdrawal" || !normalizedGasPayer) continue;
|
|
35
35
|
if (normalizeStructTag(input.FundsWithdrawal.typeArg.Balance) !== SUI_TYPE_ARG) continue;
|
|
36
|
-
const
|
|
36
|
+
const source = input.FundsWithdrawal.withdrawFrom;
|
|
37
|
+
const withdrawalOwner = source.SenderAllowance ? source.SenderAllowance.funder : source.Sender ? transactionData.sender : gasPayer;
|
|
37
38
|
if (withdrawalOwner && normalizeSuiAddress(withdrawalOwner) === normalizedGasPayer && input.FundsWithdrawal.reservation.$kind === "MaxAmountU64") withdrawals += BigInt(input.FundsWithdrawal.reservation.MaxAmountU64);
|
|
38
39
|
}
|
|
39
40
|
const needsSimulateExpiration = !options.onlyTransactionKind && !transactionData.expiration && !transactionData.gasData.budget;
|