diff --git a/sdk/apps/modal-example/package.json b/sdk/apps/modal-example/package.json index 4fcafa56..5cdc7cc6 100644 --- a/sdk/apps/modal-example/package.json +++ b/sdk/apps/modal-example/package.json @@ -19,8 +19,8 @@ "@mysten/wallet-adapter-wallet-standard": "^0.8.0", "@nightlylabs/wallet-selector-solana": "0.2.2", "@nightlylabs/nightly-connect-solana": "0.0.26", - "@nightlylabs/nightly-connect-sui": "0.0.25", - "@nightlylabs/wallet-selector-sui": "0.2.2", + "@nightlylabs/nightly-connect-sui": "0.0.26", + "@nightlylabs/wallet-selector-sui": "0.2.3", "@nightlylabs/nightly-connect-polkadot": "0.0.6", "@nightlylabs/wallet-selector-polkadot": "0.1.2", "@polkadot/extension-inject": "^0.46.5", @@ -38,4 +38,4 @@ "engines": { "node": ">=16.8" } -} +} \ No newline at end of file diff --git a/sdk/packages/selector-sui/package.json b/sdk/packages/selector-sui/package.json index c4206397..1abb94de 100644 --- a/sdk/packages/selector-sui/package.json +++ b/sdk/packages/selector-sui/package.json @@ -1,6 +1,6 @@ { "name": "@nightlylabs/wallet-selector-sui", - "version": "0.2.2", + "version": "0.2.3", "description": "", "type": "module", "exports": { @@ -28,7 +28,7 @@ "@mysten/wallet-adapter-wallet-standard": "^0.8.0", "@mysten/wallet-standard": "^0.8.0", "@mysten/wallet-adapter-base": "^0.9.0", - "@nightlylabs/nightly-connect-sui": "0.0.25", + "@nightlylabs/nightly-connect-sui": "0.0.26", "@nightlylabs/wallet-selector-base": "0.2.2", "@wallet-standard/core": "^1.0.3", "bs58": "^4.0.1", @@ -45,4 +45,4 @@ "tslib": "^2.5.3", "typescript": "^5.1.3" } -} +} \ No newline at end of file diff --git a/sdk/packages/selector-sui/rollup.config.js b/sdk/packages/selector-sui/rollup.config.js index 7ea46124..2fc0a7d3 100644 --- a/sdk/packages/selector-sui/rollup.config.js +++ b/sdk/packages/selector-sui/rollup.config.js @@ -27,11 +27,7 @@ export default [ ], external: [ '@mysten/sui.js', - '@mysten/sui.js/verify', - '@mysten/sui.js/dist/cjs/signers/types', - '@mysten/sui.js/client', '@mysten/wallet-adapter-wallet-standard', - '@mysten/wallet-adapter-wallet-standard/dist/StandardWalletAdapter', '@mysten/wallet-standard', '@nightlylabs/nightly-connect-sui', '@nightlylabs/wallet-selector-base', diff --git a/sdk/packages/selector-sui/src/adapter.ts b/sdk/packages/selector-sui/src/adapter.ts index db2b2e28..aa75796f 100644 --- a/sdk/packages/selector-sui/src/adapter.ts +++ b/sdk/packages/selector-sui/src/adapter.ts @@ -1,15 +1,13 @@ /* eslint-disable @typescript-eslint/no-empty-function */ import { publicKeyFromRawBytes } from '@mysten/sui.js/verify' -import { SignedTransaction } from '@mysten/sui.js/dist/cjs/signers/types' -import { SuiTransactionBlockResponse } from '@mysten/sui.js/client' -// import { WalletAdapter } from '@mysten/wallet-adapter-base' import { StandardWalletAdapter } from '@mysten/wallet-adapter-wallet-standard' import type { - SignedPersonalMessage, - SuiSignAndExecuteTransactionBlockInput, - SuiSignPersonalMessageInput, - SuiSignTransactionBlockInput + SuiSignAndExecuteTransactionBlockMethod, + SuiSignPersonalMessageMethod, + SuiSignTransactionBlockMethod } from '@mysten/wallet-standard' + +import { type StandardWalletAdapterConfig } from '@mysten/wallet-adapter-wallet-standard/dist/StandardWalletAdapter' import { SUI_CHAINS } from '@mysten/wallet-standard' import { AppSui, SUI_NETWORK } from '@nightlylabs/nightly-connect-sui' import { @@ -35,7 +33,6 @@ import { import type { StandardEventsOnMethod, WalletAccount } from '@wallet-standard/core' import bs58 from 'bs58' import { suiWalletsFilter } from './detection' -import { StandardWalletAdapterConfig } from '@mysten/wallet-adapter-wallet-standard/dist/StandardWalletAdapter' export const convertBase58toBase64 = (base58: string) => { const buffer = bs58.decode(base58) @@ -428,9 +425,7 @@ export class NightlyConnectSuiAdapter { this.connecting = false } - signPersonalMessage = async ( - messageInput: SuiSignPersonalMessageInput - ): Promise => { + signPersonalMessage: SuiSignPersonalMessageMethod = async (messageInput) => { if (!this._app || !this._connectionType) { throw new Error('Wallet not ready') } @@ -451,15 +446,15 @@ export class NightlyConnectSuiAdapter { } } - signTransactionBlock = async ( - transactionInput: SuiSignTransactionBlockInput - ): Promise => { + // + signTransactionBlock: SuiSignTransactionBlockMethod = async (transactionInput) => { if (!this._app || !this._connectionType) { throw new Error('Wallet not ready') } switch (this._connectionType) { case ConnectionType.Nightly: { return await this._app.signTransactionBlock(transactionInput) + // return { bytes: res.transactionBlockBytes, signature: res.signature } } case ConnectionType.WalletStandard: { if (!this._innerStandardAdapter) { @@ -471,9 +466,9 @@ export class NightlyConnectSuiAdapter { } } - signAndExecuteTransactionBlock = async ( - transactionInput: SuiSignAndExecuteTransactionBlockInput - ): Promise => { + signAndExecuteTransactionBlock: SuiSignAndExecuteTransactionBlockMethod = async ( + transactionInput + ) => { if (!this._app || !this._connectionType) { throw new Error('Wallet not ready') } diff --git a/sdk/packages/selector-sui/src/detection.ts b/sdk/packages/selector-sui/src/detection.ts index aba8eb36..7d456076 100644 --- a/sdk/packages/selector-sui/src/detection.ts +++ b/sdk/packages/selector-sui/src/detection.ts @@ -7,7 +7,5 @@ export const suiWalletsFilter = (wallet: Wallet) => { 'sui:signAndExecuteTransactionBlock', 'sui:signTransactionBlock' ]) - console.log(wallet) - console.log(is) return is }