Development
...
API Reference
Wallets Module
3 min
api reference https //signum network github io/signumjs/modules/wallets html npm package https //www npmjs com/package/@signumjs/wallets cdn url https //cdn jsdelivr net/npm/@signumjs/crypto\@1 0 0 rc 31/dist/signumjs crypto min js https //cdn jsdelivr net/npm/@signumjs/contracts/dist/signumjs contracts min js https //cdn jsdelivr net/npm/@signumjs/wallets/dist/signumjs wallets min js iife namespace sig$wallets installation npm npm i @signumjs/wallets yarn yarn add @signumjs/wallets \<script/> basic usage the wallets module offers easy to use abstractions to interact with wallets via one way deep linking for mobile and desktop wallet and/or full duplex communication with the https //www signum network/wallet the following example shows how to generate a (deep) link, that opens the phoenix wallet (mobile or desktop) async function createpaymentlink(args) { try { const {recipient, amount, reference} = args // in nodejs the wallet will only generate the link, // but running this code in the browser opens the deeplink // which opens the phoenix wallet, if installed const wallet = new deeplinkablewallet() const recipientid = address create(recipient) getnumericid() const result = await wallet pay({ amount, message reference, to recipientid }) console info(`your deeplink ${result}`) } catch (e) { handleerror(e); } } (async () => { await createpaymentlink({ recipient 's 9k9l 4cb5 88y5 f5g4z', amount 100 00, reference 'donation' }); })(); \<script/> async function createpaymentlink(args) { try { const {recipient, amount, reference} = args // in nodejs the wallet will only generate the link, // but running this code in the browser opens the deeplink // which opens the phoenix wallet, if installed const wallet = new sig$wallets deeplinkablewallet() const recipientid = sig$util address create(recipient) getnumericid() const result = await wallet pay({ amount, message reference, to recipientid }) console info(`your deeplink ${result}`) } catch (e) { handleerror(e); } } (async () => { await createpaymentlink({ recipient 's 9k9l 4cb5 88y5 f5g4z', amount 100 00, reference 'donation' }); })();