# DApp连接Nabox钱包（EVM兼容链）

### 连接插件

#### 1.window\.NaboxWallet

Nabox Wallet向页面内注入了window\.NaboxWallet对象；类似于MetaMask注入的ethereum对象；可参照适配MetaMask的方式进行适配。

Nabox Wallet实现了MetaMask部分API，包括：

"eth\_accounts",

"eth\_requestAccounts",

"eth\_sign",

"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",

&#x20;"eth\_gasPrice"，

以及"accountsChanged","chainChanged"事件

#### 2.window\.ethereum

在用户未安装或启用MetaMask的情况下向页面注入window\.ethereum对象, 可参照适配MetaMask的方式进行适配。
