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 Old Address

This method can be used to fetch old Sui address from a public key

Below is an example code describing the way to call getOldAddress API in Martian Wallet for the Sui network.

// Fetch transaction details
await window.martian.sui.connect(['viewAccount', 'suggestTransactions']);
const publicKey = "0xf73458a59ba9ba623e093835603954fd3efebed2c73797d8221b974579def32c"
const { oldAddress } = await window.martian.sui.getOldAddress(publicKey);
console.log(oldAddress);
// above code output
6dcd3d1023b975f68e6a8f9a854498bda9720b59
PreviousGet Public KeyNextGet Accounts

Last updated 2 years ago

⚙️