anonymous No title
No License TypeScript
2021年11月07日
Copy Clone
// 過去作成したニーモニックよりアカウントを復元し、保有モザイクを確認する
(async () => {
  const mnemonicWords = "xxxxxxxxxxxxxxxxxx";
  const xKey = ExtendedKey.createFromSeed(new MnemonicPassPhrase(mnemonicWords).toSeed("password").toString("hex"), Network.SYMBOL);
  const wallet = new Wallet(xKey);
  const privateKey = wallet.getChildAccountPrivateKey(Wallet.DEFAULT_WALLET_PATH);
  const symbolAccount = Account.createFromPrivateKey(privateKey, NetworkType.TEST_NET);

  const nodeUrl = "http://symbol-test.next-web-technology.com:3000";
  const address = Address.createFromRawAddress(symbolAccount.address.pretty());
  const accountRepo = new RepositoryFactoryHttp(nodeUrl).createAccountRepository();
  const accountInfo = await accountRepo.getAccountInfo(address).pipe(timeout(5000)).toPromise();

  for (const ownedMosaic of accountInfo.mosaics) {

    const mosaicId = new MosaicId(ownedMosaic.id.toHex());
    const repositry = new RepositoryFactoryHttp(nodeUrl);
    const mosaicHttp = repositry.createMosaicRepository();
    const info = await mosaicHttp.getMosaic(mosaicId).pipe(timeout(5000)).toPromise();
    console.log(info);
  }

})();
// 過去作成したニーモニックよりアカウントを復元し、保有モザイクを確認する
(async () => {
  const mnemonicWords = "xxxxxxxxxxxxxxxxxx";
  const xKey = ExtendedKey.createFromSeed(new MnemonicPassPhrase(mnemonicWords).toSeed("password").toString("hex"), Network.SYMBOL);
  const wallet = new Wallet(xKey);
  const privateKey = wallet.getChildAccountPrivateKey(Wallet.DEFAULT_WALLET_PATH);
  const symbolAccount = Account.createFromPrivateKey(privateKey, NetworkType.TEST_NET);

  const nodeUrl = "http://symbol-test.next-web-technology.com:3000";
  const address = Address.createFromRawAddress(symbolAccount.address.pretty());
  const accountRepo = new RepositoryFactoryHttp(nodeUrl).createAccountRepository();
  const accountInfo = await accountRepo.getAccountInfo(address).pipe(timeout(5000)).toPromise();

  for (const ownedMosaic of accountInfo.mosaics) {

    const mosaicId = new MosaicId(ownedMosaic.id.toHex());
    const repositry = new RepositoryFactoryHttp(nodeUrl);
    const mosaicHttp = repositry.createMosaicRepository();
    const info = await mosaicHttp.getMosaic(mosaicId).pipe(timeout(5000)).toPromise();
    console.log(info);
  }

})();
anonymous
Anonymous
22 時間前
<a href="https://doxycycline2022.top">buy doxycycline without prescription</a>
anonymous
Anonymous
8 時間前
<a href="https://doxycycline2022.top">buy doxycycline without dr prescription</a>