- Support a single type of wallet or multi type of wallet
- Create/Import wallet
- Some basic functions of a wallet: signMessage, transferToken, ...
- 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
- 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
...
- 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)
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