TS SDK v1.0.0 Migration Guide
This migration guide covers changes and new features for the Sui TS SDK, and well as related changes
to @mysten/bcs
and @mysten/dapp-kit
.
@mysten/sui
Ad part of the 1.0 release the @mysten/sui.js
package has been renamed to @mysten/sui
/bcs
Types
SuiObjectRef
: removing bigint fromversion
should we remove this completelyObjectArg
:ImmOrOwned
->ImmOrOwnedObject
andShared
->SharedObject
- Added
ObjectCallArg
PureArg
Changed ArrayLike to Array not sure if this is correct
Bcs Types
CallArg
removedObjVec
Argument
enumKind to enum, Removed nested structs to align with Rust definitionsProgrammableMoveCall
Split target intopackage
,module
andfunction
, typeArguments now TypeTag instead of StringTransaction
enumKind to enum, replaced nested structs with tuples to align with Rust definitions- Removed some type exports
- Use typeof bcs.XYZ.$inferType instead
/transactions
Types
TransactionObjectArgument
shape changedTransactionResult
shape changedTransactionObjectInput
shape changedTransactionArgument
shape changedTransactionBlockInput
->TransactionInput
and shape changed
Transaction
- renamed
TransactionBlock
toTransaction
blockData
is deprecated, returns snapshot of v1 blockData, should this be removed?- added getBlockData that returns new v2 blockData
- removed tx.pure(rawValue)
- Added support for (tx) => input as transaction arguments
- renamed packageId -> package in Upgrade command
- makeMoveVec
objects
->elements
exports
- getPureSerializationType removed
- added getPureBcsSchema, normalizedTypeToMoveTypeSignature
/utils
Removed is
and assert
helpers
/multisig
- publicKeyFromSuiBytes moved to /verify
/verify
- verifyTransactionBlock -> verifyTransactionBlockSignature
- verifyPersonalMessage -> verifyPersonalMessageSignature
/cryptography
- Removed intent enum exports (use bcs instead)
@mysten/bcs
- removed registry
- default maxSize of writer = Infinity
- renamed
size
toinitialSize
in writer - signPersonalMessage fix returned bytes to not be wrapped
dapp-kit
- changed useSignAndExecuteTransactionBlock
- transactions are now executed in wallets rather than in dapps by default
TODO:
- rename transactions to commands?