Martian Wallet Dev Docs
HomeChrome web store
  • Introduction
  • 🏗️Integration
    • Detecting the Provider
    • Establishing a Connection
    • Displaying Your App
  • ⚙️methods
    • Aptos
      • Generate Transaction
      • Sign Transaction
      • Submit Transaction
      • Sign and Submit Transaction
      • Sign Generic Transaction
      • Generate Sign and Submit Transaction
      • Create Collection
      • Create Token
      • Add Network
      • Change Network
      • Get Networks
      • Get Transaction
      • Get Transactions
      • Get Account Transactions
      • Get Account Resources
      • Get Account
      • Get Chain Id
      • Get Ledger Info
    • Sui
      • Sign Transaction Block
      • Sign and Execute Transaction
      • Get Public Key
      • Get Old Address
      • Get Accounts
    • Sign Message
    • Get Network
    • Get Current Blockchain
    • Cancel Submitted Transactions
    • Network Change Event
    • Account Change Event
Powered by GitBook
On this page
  1. methods
  2. Sui

Get Accounts

This method can be used to fetch all Sui accounts present in the wallet

Below is an example code describing the way to call getAccounts API.

// Fetch transaction details
const response = await window.martian.sui.connect(['viewAccount', 'suggestTransactions']);
const details = await window.martian.getAccounts();
console.log(details);
// above code output
[
  "e68a59b81e14ce084c91bad7726cc489e38b3940"
]
PreviousGet Old AddressNextSign Message

Last updated 2 years ago

⚙️