diff --git a/sdk/docs/pages/dapp-kit/wallet-hooks/useSignTransaction.mdx b/sdk/docs/pages/dapp-kit/wallet-hooks/useSignTransaction.mdx index 19d65d2cd19a5..546968ebb1ab1 100644 --- a/sdk/docs/pages/dapp-kit/wallet-hooks/useSignTransaction.mdx +++ b/sdk/docs/pages/dapp-kit/wallet-hooks/useSignTransaction.mdx @@ -5,6 +5,7 @@ import { UseSignTransactionExample } from '../../../examples/wallet-hooks'; Use the `useSignTransaction` hook to prompt the user to sign a transaction with their wallet. ```ts +import { Transaction } from '@mysten/sui/transactions'; import { ConnectButton, useCurrentAccount, @@ -42,7 +43,7 @@ function MyComponent() { }); // Always report transaction effects to the wallet after execution - reportTransactionEffects(result.rawEffects!); + reportTransactionEffects(executeResult.rawEffects!); console.log(executeResult); }} diff --git a/sdk/docs/pages/typescript/executors.mdx b/sdk/docs/pages/typescript/executors.mdx index 05eeed173ea9c..bb5583b0ca965 100644 --- a/sdk/docs/pages/typescript/executors.mdx +++ b/sdk/docs/pages/typescript/executors.mdx @@ -47,8 +47,8 @@ const tx1 = new Transaction(); const [coin1] = tx1.splitCoins(tx1.gas, [1]); tx1.transferObjects([coin1], address1); const tx2 = new Transaction(); -const [coin2] = tx1.splitCoins(tx2.gas, [1]); -tx1.transferObjects([coin2], address2); +const [coin2] = tx2.splitCoins(tx2.gas, [1]); +tx2.transferObjects([coin2], address2); const [{ digest: digest1 }, { digest: digest2 }] = await Promise.all([ executor.executeTransaction(tx1), @@ -117,8 +117,8 @@ const tx1 = new Transaction(); const [coin1] = tx1.splitCoins(tx1.gas, [1]); tx1.transferObjects([coin1], address1); const tx2 = new Transaction(); -const [coin2] = tx1.splitCoins(tx2.gas, [1]); -tx1.transferObjects([coin2], address2); +const [coin2] = tx2.splitCoins(tx2.gas, [1]); +tx2.transferObjects([coin2], address2); const [{ digest: digest1 }, { digest: digest2 }] = await Promise.all([ executor.executeTransaction(tx1), diff --git a/sdk/docs/pages/typescript/sui-client.mdx b/sdk/docs/pages/typescript/sui-client.mdx index 95caae4da0407..0429aff6fd843 100644 --- a/sdk/docs/pages/typescript/sui-client.mdx +++ b/sdk/docs/pages/typescript/sui-client.mdx @@ -139,7 +139,8 @@ const result = await client.executeTransactionBlock({ - `transactionBlock` - either a Transaction or BCS serialized transaction data bytes as a Uint8Array or as a base-64 encoded string. -- `signer` - A `Keypair` instance to sign the transaction +- `signature` - A signature, or list of signatures committed to the intent message of the + transaction data, as a base-64 encoded string. - `requestType`: `WaitForEffectsCert` or `WaitForLocalExecution`. Determines when the RPC node should return the response. Default to be `WaitForLocalExecution` - `options`: @@ -170,8 +171,7 @@ const result = await client.signAndExecuteTransaction({ - `transaction` - BCS serialized transaction data bytes as a Uint8Array or as a base-64 encoded string. -- `signature` - A signature, or list of signatures committed to the intent message of the - transaction data, as a base-64 encoded string. +- `signer` - A `Keypair` instance to sign the transaction - `requestType`: `WaitForEffectsCert` or `WaitForLocalExecution`. Determines when the RPC node should return the response. Default to be `WaitForLocalExecution` - `options`: diff --git a/sdk/docs/pages/typescript/zklogin.mdx b/sdk/docs/pages/typescript/zklogin.mdx index 1a1891ec93e47..1ef30fbd48e36 100644 --- a/sdk/docs/pages/typescript/zklogin.mdx +++ b/sdk/docs/pages/typescript/zklogin.mdx @@ -12,7 +12,7 @@ signatures and compute zkLogin addresses. To parse a serialized zkLogin signature ```typescript -import { parseZkLoginSignature } '@mysten/sui/zklogin'; +import { parseZkLoginSignature } from '@mysten/sui/zklogin'; const parsedSignature = await parseZkLoginSignature('BQNNMTY4NjAxMzAyO....'); ``` @@ -20,7 +20,7 @@ const parsedSignature = await parseZkLoginSignature('BQNNMTY4NjAxMzAyO....'); Use `getZkLoginSignature` to serialize a zkLogin signature. ```typescript -import { getZkLoginSignature } '@mysten/sui/zklogin'; +import { getZkLoginSignature } from '@mysten/sui/zklogin'; const serializedSignature = await getZkLoginSignature({ inputs, maxEpoch, userSignature }); ``` @@ -28,7 +28,7 @@ const serializedSignature = await getZkLoginSignature({ inputs, maxEpoch, userSi To compute the address for a given address seed and iss you can use `computeZkLoginAddressFromSeed` ```typescript -import { computeZkLoginAddressFromSeed } '@mysten/sui/zklogin'; +import { computeZkLoginAddressFromSeed } from '@mysten/sui/zklogin'; const address = await computeZkLoginAddressFromSeed(0n, 'https://accounts.google.com'); ```