@wallettree/wallettree-js v0.1.1
🌲 WalletTree-JS
Add global wallet discovery using 📧, ☎️, and @socials to your dApp. Let users share wallets with a single link and send/receive any crypto without ever touching an address.
⭐️ Features
- Instant Lookup
- Universal Link
- Send/Receive Without Addresses
- Chain Agnostic
- Privacy Built In
- Affordable
💾 Installation
Install with npm
npm install @wallettree/wallettree-js
📝 Usage/Examples
import { WalletTreeSDK } from '@wallettree/wallettree-js'
// Create SDK instance
const walletTree = new WalletTreeSDK({ apiKey: '<apiKey>' })
await walletTree.authenticate()
Profile
// Search a profile using email
const { profile, wallets } = await walletTree.search('joshua@wallettree.me')
// Search a profile using phone (E.164 format)
const { profile, wallets } = await walletTree.search('+11234567890')
// Search a profile using a social username
// Supported: twitter, discord, facebook, linkedin, twitch
const { profile, wallets } = await walletTree.search('@wallettreeme', 'twitter')
// Create a profile
const newProfile = await walletTree.profile.create('user-123')
// Get current profile
const myProfile = await walletTree.profile.me()
// Update profile privacy
const updatedProfile = await walletTree.profile.setPrivacy(true)
Wallets
// Add wallet to your profile
const wallet: Wallet = {
address: '0x0000000000000000000000000000000000000000',
name: 'My amazing wallet',
description: 'For sending me money!',
provider: WalletProvider.ETHEREUM,
chain: WalletChain.METAMASK,
primary: false,
private: false,
favorite: false,
}
const newWallet = await walletTree.wallets.create(wallet)
// Update a wallet
const updatedWallet = await walletTree.wallets.updateName(newWallet.id, 'For Vitalik')
await walletTree.wallets.updateDescription(newWallet.id, 'Because I love him')
await walletTree.wallets.updatePrimary(newWallet.id, true)
await walletTree.wallets.updatePrivacy(newWallet.id, true)
await walletTree.wallets.updateFavorite(newWallet.id, true)
// Delete a wallet
await walletTree.wallets.delete(wallet.id)
📚 Documentation
Everything you need to get started is here, but you can reference our full Documentation for additional information.
🔑 API Keys
Development
To help you get up and running easily, we've created a shared development
API key.
Development API Key: b87uJJUd5i4EdmGpBOOZQ3RiRvbYpki72aMHwKrD
PLEASE use this key respectfully as other developers and projects use it along with you.
Production
When you're ready migrate to production
, please schedule a call with us.
This short call will allow us to collect the few pieces of info we need to create your production
API key, share our Pricing plans with you, and answer any questions you may have.
📢 Contributing
Contributions are always welcome!
See contributing.md
for ways to get started.
Please adhere to this project's code of conduct
.
❓ Support & Feedback
If you have any feedback or support needs, please reach out to us at support@wallettree.me, or join our Slack channel for easier communication.