Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dcspark/cardano-caniuse
Up-to-date wallet support tables for cip30 (dApp connector) support
https://github.com/dcspark/cardano-caniuse
Last synced: about 1 month ago
JSON representation
Up-to-date wallet support tables for cip30 (dApp connector) support
- Host: GitHub
- URL: https://github.com/dcspark/cardano-caniuse
- Owner: dcSpark
- Created: 2022-01-25T08:23:10.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-10-04T18:39:26.000Z (about 1 year ago)
- Last Synced: 2024-04-16T08:55:24.747Z (9 months ago)
- Language: TypeScript
- Size: 5.68 MB
- Stars: 14
- Watchers: 4
- Forks: 11
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
![CARDANOCANIUSE](https://github.com/dcSpark/cardano-caniuse/blob/main/static/img/caniuse_new.png?raw=true)
# Access the website [here](https://www.cardano-caniuse.io)
# Adding a new wallet
Go to the directory `src/wallets/` you should see something like this:
```
src/wallets
├── Cv.ts
├── Flint.ts
├── Gero.ts
└── Nami.ts
```Add a new wallet definition like so:
```ts
// CardanoWallet.tsimport { Api, SupportLevel } from "../system/Types";
export default {
name: 'CardanoWallet',
logo: 'data:image/svg+xml',
Apis: {
[Api.GetUsedAddresses]: SupportLevel.Supported,
[Api.GetUtxos]: SupportLevel.Unsupported,
[Api.IsEnabled]: SupportLevel.Experimental
}
}
```Add the new definition to `src/Wallets.ts`:
```ts
import Flint from "./wallets/Flint";
import Gero from "./wallets/Gero";
import Nami from "./wallets/Nami";
import Cv from "./wallets/Cv";
// import your wallet definition
import CardanoWallet from "./wallets/CardanoWallet";export const Wallets = [
Flint,
Nami,
Cv,
// Add your wallet definition
CardanoWallet
];
```# Adding a new API
## Adding API Type
Open `src/system/Types.ts` you should see something like this:```ts
export enum Api {
Enable,
IsEnabled,
ApiVersion,
Name,
Icon,
GetNetworkId,
GetUtxos,
GetBalance,
GetUsedAddresses,
GetUnusedAddresses,
GetChangeAddress,
GetRewardAddress,
GetRewardAddresses,
SignTx,
SignData,
SubmitTx,
// Add your new api here
NewAPI
}
```## Adding API definition
Open `docs/partials/` you should see something like this:
```
docs/partials
├── _apiVersion.mdx
├── _enable.mdx
├── _getBalance.mdx
├── _getChangeAddress.mdx
├── _getNetworkId.mdx
├── _getRewardAddress.mdx
├── _getUnusedAddresses.mdx
├── _getUsedAddresses.mdx
├── _getUtxos.mdx
├── _icon.mdx
├── _isEnabled.mdx
├── _name.mdx
├── _signData.mdx
├── _signTx.mdx
└── _submitTx.mdx
```Add a new API definition like so `_newApi.mdx`:
```md
import CaniuseTable from '@site/src/components/CaniuseTable';
import { Api } from '@site/src/system/Types';## `cardano.{walletName}.apiVersion: String`
The version number of the API that the wallet supports.
```
Make sure to pass in your API type `` in the `CaniuseTable` element.
# Website
This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.
### Installation
```
$ yarn
```### Local Development
```
$ yarn start
```This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
### Build
```
$ yarn build
```This command generates static content into the `build` directory and can be served using any static contents hosting service.
### Deployment
Using SSH:
```
$ USE_SSH=true yarn deploy
```Not using SSH:
```
$ GIT_USER= yarn deploy
```If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.