1.3.9 • Published 6 months ago

@m3s/wallet v1.3.9

Weekly downloads
-
License
MIT
Repository
bitbucket
Last release
6 months ago

@m3s/wallet

Universal wallet interface supporting multiple blockchain wallet types with consistent API across EVM wallets and Web3Auth integration.

⚠️ Alpha Release: APIs may change. Not production-ready.

Installation

npm install @m3s/wallet

Quick Start

import { createWallet } from '@m3s/wallet';

// EVM Wallet (Private Key)
const wallet = await createWallet({
  name: 'ethers',
  version: '1.0.0',
  options: { 
    privateKey: 'YOUR_PRIVATE_KEY' 
  }
});

// Set network
await wallet.setProvider({
  chainId: '0xaa36a7', // Sepolia
  rpcUrls: ['https://sepolia.infura.io/v3/YOUR_KEY']
});

// Use wallet
const accounts = await wallet.getAccounts();
const balance = await wallet.getBalance();
const txHash = await wallet.sendTransaction({
  to: '0x...',
  value: '0.01'
});

Features

  • Universal API - Same interface for all wallet types
  • EVM Support - Private key wallets with ethers.js
  • Web3Auth - Social login with OAuth providers
  • Network Management - Easy network switching
  • Transaction Signing - Messages, transactions, typed data
  • Event Handling - Account/chain change notifications

Supported Wallets

AdapterDescriptionStatus
ethersPrivate key wallets✅ Ready
web3authSocial login wallets✅ Ready

Examples

Web3Auth Social Login

const wallet = await createWallet({
  name: 'web3auth',
  version: '1.0.0',
  options: {
    web3authConfig: {
      clientId: 'YOUR_CLIENT_ID',
      web3AuthNetwork: 'sapphire_devnet',
      chainConfig: {
        chainId: '0xaa36a7',
        rpcTarget: 'https://sepolia.infura.io/v3/YOUR_KEY'
      }
    }
  }
});

ERC20 Token Transfer

const transferData = erc20Interface.encodeFunctionData('transfer', [
  recipientAddress, 
  ethers.parseUnits('100', 18)
]);

const txHash = await wallet.sendTransaction({
  to: tokenAddress,
  data: transferData
});

Community Adapters

Want to add support for more wallets? Check out our:

License

MIT

1.6.4

6 months ago

1.6.3

6 months ago

1.6.2

6 months ago

1.6.1

6 months ago

1.6.0

6 months ago

1.5.9

6 months ago

1.5.8

6 months ago

1.5.7

6 months ago

1.5.6

6 months ago

1.5.5

6 months ago

1.5.4

6 months ago

1.5.3

6 months ago

1.5.2

6 months ago

1.5.1

6 months ago

1.5.0

6 months ago

1.4.9

6 months ago

1.4.8

6 months ago

1.4.7

6 months ago

1.4.6

6 months ago

1.4.5

6 months ago

1.4.4

6 months ago

1.4.3

6 months ago

1.4.2

6 months ago

1.4.1

6 months ago

1.4.0

6 months ago

1.3.9

6 months ago

1.3.8

6 months ago

1.3.7

6 months ago

1.3.6

6 months ago

1.3.5

6 months ago

1.3.4

6 months ago

1.3.3

6 months ago

1.3.2

6 months ago

1.3.1

6 months ago

1.3.0

6 months ago

1.2.9

6 months ago

1.2.8

6 months ago

1.2.7

6 months ago

1.2.6

6 months ago

1.2.5

7 months ago

1.2.4

7 months ago

1.2.3

7 months ago

1.2.2

7 months ago

1.2.1

7 months ago

1.2.0

7 months ago

1.1.25

7 months ago

1.1.24

7 months ago

1.1.23

8 months ago

1.1.22

8 months ago

1.1.21

8 months ago

1.1.20

8 months ago

1.1.19

8 months ago

1.1.18

8 months ago

1.1.17

8 months ago

1.1.16

8 months ago

1.1.15

8 months ago

1.1.14

8 months ago

1.1.13

8 months ago

1.1.12

8 months ago

1.1.11

8 months ago

1.1.10

8 months ago

1.1.9

8 months ago

1.1.8

8 months ago

1.1.7

8 months ago

1.1.6

8 months ago

1.1.5

8 months ago

1.1.4

8 months ago

1.1.3

8 months ago

1.1.2

8 months ago

1.1.1

8 months ago

1.1.0

8 months ago

1.0.100

8 months ago

1.0.99

8 months ago

1.0.98

8 months ago

1.0.97

9 months ago

1.0.96

9 months ago

1.0.95

9 months ago

1.0.94

9 months ago

1.0.93

9 months ago

1.0.92

9 months ago

1.0.90

10 months ago

1.0.89

10 months ago

1.0.88

10 months ago

1.0.87

10 months ago

1.0.86

10 months ago

1.0.85

10 months ago

1.0.84

10 months ago

1.0.83

10 months ago

1.0.82

10 months ago

1.0.81

10 months ago

1.0.80

10 months ago

1.0.79

10 months ago

1.0.78

10 months ago

1.0.77

10 months ago

1.0.76

10 months ago

1.0.75

10 months ago

1.0.74

10 months ago

1.0.73

10 months ago

1.0.72

10 months ago

1.0.70

10 months ago

1.0.69

10 months ago

1.0.68

10 months ago

1.0.66

10 months ago

1.0.63

10 months ago

1.0.62

10 months ago

1.0.61

10 months ago

1.0.60

10 months ago

1.0.59

10 months ago

1.0.58

10 months ago

1.0.57

10 months ago

1.0.56

10 months ago

1.0.53

10 months ago

1.0.51

10 months ago

1.0.49

10 months ago

1.0.47

10 months ago

1.0.45

10 months ago

1.0.43

10 months ago

1.0.39

10 months ago

1.0.36

10 months ago

1.0.34

10 months ago

1.0.32

10 months ago

1.0.23

10 months ago

1.0.14

10 months ago

1.0.12

10 months ago

1.0.11

10 months ago

1.0.10

10 months ago

1.0.9

10 months ago

1.0.8

10 months ago

1.0.7

10 months ago

1.0.6

10 months ago

1.0.5

10 months ago

1.0.4

10 months ago

1.0.0

11 months ago