Skip to content

JavaScript SDK to communicate with the Dala Wallet ecosystem.

License

Notifications You must be signed in to change notification settings

GetDala/dala-wallet-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dala Wallet JavaScript SDK

JavaScript SDK to communicate with the Dala Wallet ecosystem.

How to use the SDK

Install the Dala Wallet SDK

npm install dala-wallet-js | yarn add dala-wallet-js

Create a wallet instance

const DalaWallet = require('../src/DalaWallet');

const wallet = new DalaWallet({
    rpcServer:'http://localhost:8545',
    sender: '0xED507a7758F278277bBB92a77CDD39fcB0B2F983',
    network:'ropsten',
    autoTopupEnabled: true,
    autoTopupAmount: 50000000000000000000,
    defaultDeposit: 50000000000000000000
});

Call one of the endpoints

wallet.register({
    body: {
        username: 'some.username',
        password: 's0m3p@ssw0rd',
        phoneNumber: '+27123456789',
        email: '[email protected]'
    },
    apiKey: 'my-api-key-that-i-was-given'
}).then(result=>{
    console.log('result', result);
}).catch(error=>{
    console.log('error', error);
});

About

JavaScript SDK to communicate with the Dala Wallet ecosystem.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published