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

0.1.0 • Public • Published

Sdk Wallet

  • Support a single type of wallet or multi type of wallet
  • Create/Import wallet
  • Some basic functions of a wallet: signMessage, transferToken, ...

How to install local

  • Create file .npmrc in the root folder, with the content:
@digi-money:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=your_token

Install via git workflow

  • Add registry-url,scope and NODE_AUTH_TOKEN
   ...
   - name: Set up Node.js
        uses: actions/setup-node@v1
        with:
          node-version: 20.x
          registry-url: 'https://npm.pkg.github.com'
          scope: '@digi-money'
   ...

   - name: Install dependencies
      uses: bahmutov/npm-install@HEAD
      env:
         NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} ### authen npm
   ...

How to use

Initialize SDK

  • Make sure call these lines once
const config = {
   debug: true, // enable logging to debug 
   userId: 'your_id', // telegram userId
   getEncryptionKeyFn, // a function to get encryption key
}

// if your wallet support only 1 type of wallet:
const walletInstance = new EvmWallet(config)
// or
const walletInstance = new SolanaWallet(config)

// if your wallet support (or will support) multi-type wallet at the same time, we suggest you use this `MultiChainWallet`
const walletInstance = new MultiChainWallet(config)

Use by specific usecase

How to publish this package

  • Create file .npmrc in root folder, with content same as above
  • Update version in package.json
  • Run npm publish
  • Check here

Readme

Keywords

none

Package Sidebar

Install

npm i @paw-wallet/wallet

Weekly Downloads

1

Version

0.1.0

License

MIT

Unpacked Size

966 kB

Total Files

31

Last publish

Collaborators

  • kiemtrann