minter-js-web3-sdk
minter-js-web3-sdk
Please note that this package is under active development and is subject to change.
Install
npm install minter-js-web3-sdk
Usage
// - calculation of smart-wallet address
// - methods to build, sign, and broadcast combined tx from multiple internal txs
import useWeb3SmartWallet from 'minter-js-web3-sdk/src/composables/use-web3-smartwallet.js';
// - calculates reward amount (in erc20 tokens or native coin) for relay service
// - build internal txs to swap erc20 token to native coin and send it to relay service as reward
import useWeb3SmartWalletWithRelayReward from 'minter-js-web3-sdk/src/composables/use-web3-smartwallet-relay-reward.js';
// swap tokens via 1inch, makes estimation and build internal swap tx
import useWeb3SmartWalletSwap from 'minter-js-web3-sdk/src/composables/use-web3-smartwallet-swap.js';
Examples
Transfer ERC20 token and pay fee with it https://github.com/MinterTeam/honee-app-web/blob/dev/components/ActionSendWeb3.vue
Swap via 1inch (spend on Minter and receive on Minter) https://github.com/MinterTeam/honee-app-web/blob/master/components/ActionSwapWeb3.vue
Related Packages
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 0.0.15 | ^2.7.0 || | MIT | |
| 0.0.14 | ^2.7.0 || | MIT | |
| 0.0.13 | ^2.7.0 || | MIT | |
| 0.0.12 | ^2.7.0 || | MIT | |
| 0.0.11 | ^2.7.0 || | MIT | |
| 0.0.10 | ^2.7.0 || | MIT | |
| 0.0.9 | ^2.7.0 || | MIT | |
| 0.0.8 | ^2.7.0 || | MIT | |
| 0.0.7 | ^2.7.0 || | MIT | |
| 0.0.6 | ^2.7.0 || | MIT | |
| 0.0.5 | ^2.7.0 || | MIT | |
| 0.0.4 | ^2.7.0 || | MIT | |
| 0.0.3 | ^2.7.0 || | MIT | |
| 0.0.2 | ^2.7.0 || | MIT | |
| 0.0.1 | ^2.7.0 || | MIT |