728x90
728x90
비트코인은 bip 44, bip49, bip 84와 같이 지갑을 생성하는 표준이 형성되어 있다. 🍸 bip 44는 계층지갑, bip49는 P2WPKH-nested-in-P2SH 기반 계정, bip84는 P2WPKH 기반 계정을 생성하는 표준이다. https://trezor.io/learn/a/what-are-bips-slips https://trezor.io/learn/a/what-are-bips-slips trezor.io 자바스크립트로 비트코인 지갑을 생성하는 코드를 작성하였다. ecpair 라이브러리를 통해서 비트코인 지갑 키쌍을 생성할 수 있다. const bip39 = require("bip39"); const { ECPairFactory } = require("ecpair"); const bi..
필요한 라이브러리를 설치한다. npm i @solana/web3.js react-native-get-random-values react-native-url-polyfill babel.config.js를 다음과 같이 수정한다. module.exports = { presets: [ [ 'module:metro-react-native-babel-preset', {unstable_transformProfile: 'hermes-stable'}, ], ], }; 프로젝트 최상단 (index.js)에 다음과 같이 설정한다. import 'react-native-get-random-values'; import 'react-native-url-polyfill/auto'; 설정이 끝난뒤 다음과 같이 계정을 생성할 수 있다..
bip39 - Bip39는 Mnemonic과 관련된 내용이 담긴 라이브러리 - Bip39 라이브러리는 generateMnemonic, mnemonicToEntropy, mnemonicToSeed, wordlists, entropyToMnemonic, validateMnemonic 등의 메서드를 제공한다. 🍙 Entropy는 임의의 난수를 의미한다. - 임의의Mnemonic 생성, entropy를 통한 Mnemonic 생성, Mnemonic의 seed 변환, Mnemonic의 wordlist, 유효한 Mnemonic인지 검증하는 기능을 제공한다. https://github.com/bitcoinjs/bip39 GitHub - bitcoinjs/bip39: JavaScript implementation of ..