# DApp Connection

## Install the App

#### Install Teleport Wallet extension from Google Chrome Web Store

{% embed url="<https://chrome.google.com/webstore/detail/teleport-wallet/gkeelndblnomfmjnophbhfhcjbcnemka>" %}

#### Acquire source code

Acquire source code from your dapp repository

#### Installation dependency

npm install

## Connect Plugin

### 1.window\.teleport

Teleport Wallet injected a teleport object which is similar to Metamask; You can refer to the method of connecting metamask for adaptation;

Teleport Wallet implements API of EIP-1193, including:

* "eth\_accounts",
* "eth\_requestAccounts",
* "personal\_sign",
* "wallet\_addEthereumChain",
* "wallet\_switchEthereumChain",
* "eth\_sendTransaction",
* "eth\_getBalance",
* "eth\_getCode",
* "eth\_call",
* "eth\_estimateGas",
* "eth\_getTransactionByHash",
* "eth\_blockNumber",
* "eth\_getTransactionReceipt",
* "net\_version",
* "eth\_chainId",
* "eth\_gasPrice",

And "accountsChanged", "chainChanged" events

### 2.window\.ethereum

Teleport Wallet will inject ethereum objects into the page when the user does not enable metamask or select Teleport Wallet as ‘Default Wallet’ as below:

![](https://1389147580-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FD6kdeDBzuh9bI4MqSOtx%2Fuploads%2FZEimf2f1JpgvyFz0Lh2J%2Fimage.png?alt=media\&token=459abe56-f9d4-4dc7-aa2f-4f9e2cb9fc1a)

The ‘Default Wallet’ setting will also set window\.ethereum.isMetamask when dapp loading the first time.
