Giter Club home page Giter Club logo

Comments (6)

oncecsc avatar oncecsc commented on September 22, 2024

@xianggy

import { bech32m } from 'bech32';

const puzzleHashWithoutPrefix = '195564b2245bfc2ae660de78c0c02b05c975e6980d222863f2e3b68655955790';
const words = bech32m.toWords(Buffer.from(puzzleHashWithoutPrefix, 'hex'));

console.log(bech32m.encode('xch', words)); // xch1r92kfv3yt07z4enqmeuvpsptqhyhte5cp53zscljuwmgv4v427gqljwlzj

from chia-client.

xianggy avatar xianggy commented on September 22, 2024

Yes, got it. Thanks so much for your reply.

from chia-client.

yzkun001 avatar yzkun001 commented on September 22, 2024

Yes, got it. Thanks so much for your reply.
Hello, how should I get puzzleHashWithoutPrefix from generateMnemonic();
I don't know the process very well, can you help me answer it?

from chia-client.

CMEONE avatar CMEONE commented on September 22, 2024

@1044740162 I've coded a module to do it, it's publishing to NPM and then I will send the link here.

from chia-client.

CMEONE avatar CMEONE commented on September 22, 2024

For all interested, I've created the chia-utils node module which includes methods that solve this issue:
https://www.npmjs.com/package/chia-utils
https://github.com/CMEONE/chia-utils

from chia-client.

yzkun001 avatar yzkun001 commented on September 22, 2024

@ 1044740162我已经编写了一个模块来执行此操作,该模块正在发布到NPM,然后将链接发送到此处。

@1044740162 I've coded a module to do it, it's publishing to NPM and then I will send the link here.

Yes it's very cool, thank you

from chia-client.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.