最美情侣中文字幕电影,在线麻豆精品传媒,在线网站高清黄,久久黄色视频

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

多鏈錢包系統(tǒng)開發(fā)(方案及邏輯)丨多鏈錢包開發(fā)案例及源碼

2023-02-27 16:14 作者:bili_28856027824  | 我要投稿

Is multi-chain wallet a multi-currency wallet? Multi-currency wallet:a wallet that supports multiple blockchain digital assets.Multiple blockchain digital assets can be a blockchain main chain and tokens set around the main chain protocol,or different digital assets on multiple blockchain main chains,so multi-chain wallets can also be said to be multi-currency wallets. NetworkParameters params=TestNet3Params.get(); DeterministicSeed seed=new DeterministicSeed(new SecureRandom(),128,"password",Utils.currentTimeSeconds()); Wallet wallet=Wallet.fromSeed(params,seed); DeterministicSeed的構(gòu)造方法:開發(fā)需求I35模式7O98源碼o7I8 public DeterministicSeed(SecureRandom random,int bits,String passphrase,long creationTimeSeconds){ this(getEntropy(random,bits),checkNotNull(passphrase),creationTimeSeconds); } 先來看看getEntropy函數(shù) private static byte[]getEntropy(SecureRandom random,int bits){ checkArgument(bits<=MAX_SEED_ENTROPY_BITS,"requested entropy size too large"); byte[]seed=new byte[bits/8];案例分析及開發(fā):mrsfu123 random.nextBytes(seed); return seed; } 可以看出通過getEntropy函數(shù)得到一個byte數(shù)組,然后作為參數(shù)傳給構(gòu)造方法2 public DeterministicSeed(byte[]entropy,String passphrase,long creationTimeSeconds){ //檢查參數(shù)的正確性 checkArgument(entropy.length%4==0,"entropy size in bits not divisible by 32"); checkArgument(entropy.length*8>=DEFAULT_SEED_ENTROPY_BITS,"entropy size too small"); checkNotNull(passphrase); try{ //生成助記詞 this.mnemonicCode=MnemonicCode.INSTANCE.toMnemonic(entropy); }catch(MnemonicException.MnemonicLengthException e){ //cannot happen throw new RuntimeException(e); } //通過助記詞生成種子,詳情看“通過助記詞生成種子” this.seed=MnemonicCode.toSeed(mnemonicCode,passphrase); this.encryptedMnemonicCode=null; this.creationTimeSeconds=creationTimeSeconds; }

多鏈錢包系統(tǒng)開發(fā)(方案及邏輯)丨多鏈錢包開發(fā)案例及源碼的評論 (共 條)

分享到微博請遵守國家法律
宜州市| 鸡西市| 称多县| 临安市| 方山县| 蒲江县| 墨竹工卡县| 昌乐县| 绍兴县| 榆社县| 长寿区| 寿阳县| 左权县| 鹤山市| 青海省| 綦江县| 全椒县| 开平市| 旺苍县| 和硕县| 昌图县| 昌宁县| 蓝田县| 保定市| 三穗县| 仁怀市| 灵川县| 田阳县| 马山县| 上蔡县| 巨鹿县| 油尖旺区| 霍州市| 遂平县| 怀集县| 固阳县| 台中市| 胶南市| 娱乐| 许昌市| 金秀|