@particle-network/wallet
TypeScript icon, indicating that this package has built-in type declarations

2.0.3 • Public • Published

Particle Walelt

A wallet component that can be easily injected into the developer's website to provide rich custom styles.

Installation

Install wallet and its peer dependencies.

yarn add @particle-network/wallet@latest

Configure

Init Wallet with Particle project config, you can get the config from Particle Dashboard.

The modal support custom style, refer to Wallet Service.

import { walletEntryPlugin } from '@particle-network/wallet';

// init wallet component, replace 'xxx' with project config.
walletEntryPlugin.init(
    {
        projectId: 'xxx',
        clientKey: 'xxx',
        appId: 'xxx',
    },
    walletOptions // optional: wallet custom configs
);

// set wallet provider
walletEntryPlugin.setWalletCore({
    ethereum: provider,  // optional: evm eip1193 provider
    solana: wallet, // optional: solana wallet
});

// show wallet entry
walletEntryPlugin.walletEntryCreate();

// destroy wallet entry
walletEntryPlugin.walletEntryDestroy();

// open wallet
walletEntryPlugin.openWallet(params);

Learn More

/@particle-network/wallet/

    Package Sidebar

    Install

    npm i @particle-network/wallet

    Weekly Downloads

    1,681

    Version

    2.0.3

    License

    Apache-2.0

    Unpacked Size

    443 kB

    Total Files

    21

    Last publish

    Collaborators

    • pantaovay
    • particle-web3