How to use the @waves/waves-transactions.libs function in @waves/waves-transactions

To help you get started, we’ve selected a few @waves/waves-transactions examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github wavesplatform / WavesGUI / src / modules / utils / modals / exportAccounts / ExportAccounts.js View on Github external
const controller = function (Base, $scope, user, utils) {

        const { encryptSeed } = require('@waves/waves-transactions').seedUtils;
        const { crypto } = require('@waves/waves-transactions').libs;
        const { publicKey: getPublicKey, address: getAddress, base58Decode } = crypto;
        const checkAccount = (account) => {
            if (!account) {
                return false;
            }

            const { address, userType, networkByte } = account;

            let publicKey = '';


            switch (userType) {
                case 'seed':
                    try {
                        if (/^base58:/.test(account.seed)) {
                            publicKey = getPublicKey(base58Decode(account.seed.replace('base58:', '')));