Skip to content
This repository was archived by the owner on Sep 24, 2025. It is now read-only.
This repository was archived by the owner on Sep 24, 2025. It is now read-only.

Update sui.ts examples to reflect "@mysten/sui" 1.0 changes #4

@sagorahmed

Description

@sagorahmed

Description:

As part of the 1.0 release, the @mysten/sui.js package has been migrated to @mysten/sui.
Also, the TransactionBlock class has been renamed to Transaction and suiClient.signAndExecuteTransactionBlock renamed to suiClient.signAndExecuteTransaction
Here is the source of the migrated version: https://sdk.mystenlabs.com/typescript/migrations/sui-1.0

However, many dwallet examples still use the old imports:

import { SuiClient } from '@mysten/sui.js/client'

import { TransactionBlock as TransactionBlockSUI } from '@mysten/sui.js/transactions'

These should now be updated to:

import { SuiClient } from '@mysten/sui/client';
import { Transaction as TransactionBlockSUI } from '@mysten/sui/transactions';

Some of the classes need to be updated also:

const createCapInSuiRes = await suiClient.signAndExecuteTransactionBlock({

let approveMsgRes = await suiClient.signAndExecuteTransactionBlock({

To this latest class:
suiClient.signAndExecuteTransactionBlock ----->>>>> suiClient.signAndExecuteTransaction

Update official documentation and code samples to reflect the new package name and renamed classes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions