[OLD] Instadapp Docs
  • Introduction
  • DeFi Smart Account (DSA)
  • DSA SDK
    • Running Instadapp SDK
  • πŸ’»Instadapp GUI
    • Integrated Protocols
      • Aave
      • Compound Finance
      • MakerDAO
    • Strategies
    • Multi-Protocol Refinancing
    • Authorities
    • Debt Collateral Ratio
  • πŸ‘©β€πŸ’» DSA SDK
    • Casting Spells
    • Build a Connector
    • Connectors
      • Basic
      • Authority
      • Instapool
      • MakerDAO
      • Compound
      • Comp
      • Aave
      • dYdX
      • 1Inch
      • Uniswap
      • OasisDEX
      • Kyber
      • Curve sBTC
      • Curve sUSD
      • Curve yUSD
    • Resolvers
      • Accounts
      • Balances
      • Instapool
      • MakerDAO
      • Compound
      • Aave
      • dYdX
      • 1inch
      • Uniswap
      • OasisDex
      • Kyber
      • Curve sBTC
      • Curve sUSD
      • Curve yUSD
    • getId/setId
    • Example Use Cases
      • Long ETH
      • Short DAI
      • Debt Swap
      • Lending Bridge
      • Lending Swap
      • Debt Bridge
  • πŸ‘©β€πŸ« Tutorials
    • Getting Started
    • Moving Assets into DSA
    • In-App Swaps
  • Additional Info
    • Contract Infomation
    • FAQs
    • Security Audits
    • Release History
  • 🌏Links
    • Homepage
    • DApp
    • Discord
    • Contact Us
Powered by GitBook
On this page
  • Get Accounts
  • Returns
  • Get Auth by Address
  • Returns
  • Get Auth by ID
  • Returns
  • Get Count
  • Returns
  1. πŸ‘©β€πŸ’» DSA SDK
  2. Resolvers

Accounts

Resolver for Accounts

Get Accounts

Get all accounts for addresses owned by address.Copy

dsa.getAccounts(authority) // an ethereum address
  .then(data => {
    return data
  })
  .catch(error => {
    return error
  })

Returns

Array of Object with all the DSA where address is authorised.Copy

[
  {
      id: 52, // DSA ID
      address: "0x...", // DSA Address
      version: 1 // DSA version
  },
  ...
]

Get Auth by Address

Get all the authorised address(es) of a DSA by address.Copy

dsa.getAuthByAddress(address) // an ethereum address
  .then(data => {
    return data
  })
  .catch(error => {
    return error
  })

Returns

Array of address(es) authorised to make calls to the DSA.Copy

[
  "0x...",
  "0x...",
  "0x...",
  ...
]

Get Auth by ID

Get all the authorised address(es) of a DSA by ID.Copy

dsa.getAuthById(dsaID) // the DSA ID
  .then(data => {
    return data
  })
  .catch(error => {
    return error
  })

Returns

Array of address(es) authorised to make calls to the DSA.Copy

[
  "0x...",
  "0x...",
  "0x...",
  ...
]

Get Count

Get global number of DSAs.Copy

dsa.count()
  .then(data => {
    return data
  })
  .catch(error => {
    return error
  })

Returns

Number of DSA accounts created globally.

PreviousResolversNextBalances

Last updated 4 years ago