@dscvr-one/canvas-wallet-adapter
v1.0.2
Published
Custom canvas wallet that provides a bridge between the canvas client sdk and the managed host wallets
Downloads
37
Readme
@dscvr-one/canvas-wallet-adapter
Custom canvas wallet that provides a bridge between the canvas client sdk and the managed host wallets.
Current features include:
- register a custom canvas wallet into the standard wallet discovery process.
Installation
Install with your favorite package manager:
npm install @dscvr-one/canvas-wallet-adapter
yarn
yarn add @dscvr-one/canvas-wallet-adapter
Usage
To use the SDK:
- Import
registerCanvasWallet
function into your typescript project:
import { registerCanvasWallet } from '@dscvr-one/canvas-wallet-adapter';
- Apply function tp the
CanvasClient
instance:
const canvasClient = new CanvasClient();
registerCanvasWallet(canvasClient);
- Use a package of your chose to access the installed wallets: e.g (for Vue):
import { useWallet } from 'solana-wallets-vue';
const { wallets } = useWallet();
onMounted(() => {
// you should be able to see `Dscvr Canvas` detected as installed
console.log(wallets.value);
});
Contributing
Contributions are welcome! If you find any issues or have suggestions for improvement, feel free to open an issue or submit a pull request.