How to use the @waves/waves-transactions.seedUtils.generateNewSeed 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 / services / ExportStorageService.js View on Github external
}).then((result) => {
                if (!result || result.event !== 'connect') {
                    this._onConnectReject();
                    throw new Error(`Message event is not valid: ${result.event}`);
                }
                this._onConnectResolve();

                const publicKeyTo = result.payload;
                const { publicKey, privateKey } = keyPair(seedUtils.generateNewSeed(SEED_LENGTH));

                return this._storageExporter.export(
                    privateKey,
                    publicKeyTo
                ).then((data) => {
                    return this._provider.send(JSON.stringify({
                        event: 'data',
                        payload: {
                            publicKey,
                            data
                        }
                    }), { event: 'data' });
                });
            }).then((result) => {
                if (result.payload === 'ok') {