Ethcode docs
  • Introduction
  • Installation
    • How to install?
  • Configurations
    • Extension Settings
    • Set transaction gas strategy
  • How to Use?
    • Account
    • Initialize Ethcode
    • Compiling contracts
    • Add ABI into Ethcode
    • Deploy contract to network
    • Calling contracts
    • Create rental NFT
  • API Documentation
    • Getting started with extension API
    • wallet
    • contract
    • provider
    • events
    • status
  • Help and support
    • Support
Powered by GitBook
On this page
  • wallet.get(account: string) => Promise<Wallet>
  • wallet.list() => Promise<string[]>
  1. API Documentation

wallet

Ethcode exports a wallet API for developers to securely access user accounts within the vscode environment.

PreviousGetting started with extension APINextcontract

Last updated 2 years ago

Ethcode wallet API exports an . If any web3js user finds the signer or provider incompatiable, they might want to use Eip1193Bridge from ethersproject - .

wallet.get(account: string) => Promise<Wallet>

```
/**
* Returns Wallet object of ethers.js for the given account.
*
* @param account - The account to retrieve information for.
* @returns A Promise that resolves to a Wallet object of ethers.js.
*/
get: (account: string) => Promise<Wallet>
```

wallet.list() => Promise<string[]>

```
/**
* Returns a list of all accounts present in ethcode.
*
* @returns A Promise that resolves to an array of account addresses.
*/
list: () => Promise<string[]>
```
ethersjs Signer
https://docs.ethers.org/v5/api/experimental/#experimental-eip1193bridge