npm i multi-wallet --save
yarn add multi-wallet
;const multi = <network> <BIP32>;const account = multi;const external = accountexternal0; // first external addressconst internal = account; // first internal address (used to receive change)const signature = external // returns base58 encoded MultiSignatureconst address = externaladdress // returns bs58check encoded address (without privateKey)const multi2 = <network> <BIP32>;multi2; // returns boolean// base58 encoded stringconst exported = multi // or multi.save() returns wif// import from exportedmulti // import wif
Future proof cryptocurrency wallet (wallets are versioned & each version should be supported as long as possible (with exceptions)). In short:
- disables the need for a "fork" when changing wallet behaviour (no drop in computing power).
- nodes that aren't updated can (at least for some time) contribute to the network by handling other not updated node transactions.
- updated nodes can still handle older nodes their transactions (until some point in time or whenever an vulnerability is found.)
- flag vulnerable versions by sending a flag Message (flags are send to every node & accepted only when 3/4 off total nodes agree, this results into an lockdown off the flagged node, all other nodes will ignore it until the flagged one has updated to the needed version).
Copyright (c) 2019 vandeurenglenn