Extension Wallet
Integration
SUI Network
Connect & Get Accounts

Connect And Get Accounts

connect and get Account via Cosmostation Extension

const response = await window.cosmostation.sui.connect();
 
// or
 
const response = await window.cosmostation.sui.connect([
  "viewAccount",
  "suggestTransactions",
]);

Response

Model
export type SuiConnectResponse = boolean;
Example
true

Get Accounts

Vanilla Code

const response = await window.cosmostation.sui.connect();
 
const accounts = await window.cosmostation.sui.getAccounts();
 
const publicKey = await window.cosmostation.sui.getPublicKey();

Response

Model
export type SuiAccountResponse = string[];
Example
["0xd2d030d4339531d9cb442caf4be7bb954fddedb4"]