Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/klaytn/kaikas-web3-provider
https://github.com/klaytn/kaikas-web3-provider
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/klaytn/kaikas-web3-provider
- Owner: klaytn
- Created: 2022-08-02T01:51:27.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-11-08T02:19:30.000Z (almost 2 years ago)
- Last Synced: 2024-07-08T06:05:51.575Z (4 months ago)
- Language: TypeScript
- Homepage:
- Size: 124 KB
- Stars: 2
- Watchers: 9
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-klaytn - GitHub - web3-provider) Integrates Kaikas Web extension wallet into Dapps that utilize ethereum based APIs. (Useful Packages)
README
# Kaikas Web3 Provider
To integrate Kaikas Web extension wallet into Dapps that utilize ethereum based APIs, this package provides functions that handle `eth` namespace APIs using the corresponding `klay` namespace APIs.
## Installation
```bash
npm install --save @klaytn/kaikas-web3-provider
# OR
yarn add @klaytn/kaikas-web3-provider
```## Example (Web3Modal)
Using this Provider with the [Web3Modal](https://github.com/WalletConnect/web3modal) library, users can easily integrate Kaikas as like other wallets.
```typescript
import Web3 from "web3";
import Web3Modal from "web3modal";
import { KaikasWeb3Provider } from "@klaytn/kaikas-web3-provider"const providerOptions = {
kaikas: {
package: KaikasWeb3Provider // required
}
};web3Modal = new Web3Modal({
providerOptions: providerOptions //required
});const provider = await web3Modal.connect();
const web3 = new Web3(provider);
```