How to use the @waves/waves-transactions.seedUtils.decryptSeed 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 / waveskeeper / src / lib / encryprtor.js View on Github external
export function decrypt(ciphertext, password) {
    try {
        const decryptedJson = seedUtils.decryptSeed(ciphertext, password);
        return JSON.parse(decryptedJson)
    } catch (e) {
        throw new Error('Invalid password')
    }
}
github wavesplatform / waveskeeper / src / ui / utils / waves.ts View on Github external
export function decrypt(encryptedText: string, password: string): T | never {
    try {
        const decryptedJson = seedUtils.decryptSeed(encryptedText, password);
        return JSON.parse(decryptedJson)
    } catch (e) {
        throw new Error('Invalid password')
    }
}