Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/likecoin/likecoin-wallet-connector
Easily connect LikerLand, Keplr and Cosmostation to your dApp
https://github.com/likecoin/likecoin-wallet-connector
Last synced: 2 days ago
JSON representation
Easily connect LikerLand, Keplr and Cosmostation to your dApp
- Host: GitHub
- URL: https://github.com/likecoin/likecoin-wallet-connector
- Owner: likecoin
- License: gpl-3.0
- Created: 2022-07-04T06:16:32.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-13T16:45:42.000Z (about 2 months ago)
- Last Synced: 2024-10-14T02:18:49.056Z (25 days ago)
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/@likecoin/wallet-connector
- Size: 1.93 MB
- Stars: 0
- Watchers: 5
- Forks: 5
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# LikeCoin Wallet Connector
This is a useful frontend library for integrating various wallet connections, including:
- [Keplr Extension](https://www.keplr.app/#starters)
- [Keplr Mobile](https://www.keplr.app/app)
- [Cosmostation Web Extension](https://www.cosmostation.io/wallet/#extension)
- [Liker Land App](https://github.com/likecoin/likecoin-app)## Usage
```bash
npm i react react-dom @likecoin/wallet-connector
```Please refer to the [example](example/) for detailed integration in Nuxt.js.
> NOTE: `@likecoin/wallet-connector/dist/style.css` must be imported for styling.
## Commands
The recommended workflow is to run TSDX in one terminal:
```bash
yarn start
```This builds to `/dist` and runs the project in watch mode so any edits you save inside `src` causes a rebuild to `/dist`.
Then run either the example or Storybook playground:
### Example
Run the example inside another terminal:
```bash
cd example
yarn # To install dependencies
yarn dev
```### Storybook
Run inside another terminal:
```bash
yarn storybook
```This loads the stories from `./stories`.
> NOTE: Stories should reference the components as if using the library, similar to the example playground. This means importing from the root project directory. This has been aliased in the tsconfig and the storybook webpack config as a helper.
## Configuration
Code quality is set up for you with `prettier`, `husky`, and `lint-staged`. Adjust the respective fields in `package.json` accordingly.
### Jest
Jest tests are set up to run with `npm test` or `yarn test`.
### Bundle analysis
Calculates the real cost of your library using [size-limit](https://github.com/ai/size-limit) with `npm run size` and visulize it with `npm run analyze`.
### Rollup
TSDX uses [Rollup](https://rollupjs.org) as a bundler and generates multiple rollup configs for various module formats and build settings. See [Optimizations](#optimizations) for details.
### TypeScript
`tsconfig.json` is set up to interpret `dom` and `esnext` types, as well as `react` for `jsx`. Adjust according to your needs.
## Continuous Integration
### GitHub Actions
Two actions are added by default:
- `main` which installs deps w/ cache, lints, tests, and builds on all pushes against a Node and OS matrix
- `size` which comments cost comparison of your library on every pull request using [size-limit](https://github.com/ai/size-limit)## Optimizations
Please see the main `tsdx` [optimizations docs](https://github.com/palmerhq/tsdx#optimizations). In particular, know that you can take advantage of development-only optimizations:
```js
// ./types/index.d.ts
declare var __DEV__: boolean;// inside your code...
if (__DEV__) {
console.log('foo');
}
```You can also choose to install and use [invariant](https://github.com/palmerhq/tsdx#invariant) and [warning](https://github.com/palmerhq/tsdx#warning) functions.
## Module Formats
CJS, ESModules, and UMD module formats are supported.
The appropriate paths are configured in `package.json` and `dist/index.js` accordingly. Please report if any issues are found.
## Named Exports
Per Palmer Group guidelines, [always use named exports.](https://github.com/palmerhq/typescript#exports) Code split inside your React app instead of your React library.