Giter Club home page Giter Club logo

chia-client's People

Contributors

cmeone avatar crcrcr999 avatar dependabot[bot] avatar embiem avatar freddiecoleman avatar jimkoen avatar jordybaylac avatar madddintribled avatar michaeldistel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

chia-client's Issues

fullNode.getUnspentCoins() not working?

Hi!

getBlockchainState() does work ...

but as soon as I try

fullNode.getUnspentCoins({
  puzzleHash: '<any puzzle hash>',
  startHeight: 10000,
  endHeight: 50000
}).then((value) => {
  console.log("getUnspentCoins result:", value);
}).catch((e) => {
  console.error("getUnspentCoins error:", e)
})

it returns:

getUnspentCoins result: { error: ''dict' object has no attribute 'startswith'',
success: false }

while checking the same puzzle hash with CURL works

curl --insecure --cert ~/.chia/mainnet/config/ssl/full_node/private_full_node.crt --key ~/.chia/mainnet/config/ssl/full_node/private_full_node.key -H "Content-Type: application/json" -X POST https://localhost:8555/get_coin_records_by_puzzle_hash -d '{"puzzle_hash": "< some puzzle hash >", "start_height": 350000, "include_spend_coins":false}' | python3 -m json.tool

any idea what I'm doing wrong?

how to generate coin_info

coinID == sha256(parent_ID + puzzlehash + amount)
I found it from https://chialisp.com/docs/doc2

I tried it with Nodejs and still not correct.
console.log(CryptoJS.SHA256('f7e09a94c5da73019577b288aeedaf4750540ecca091bb5c4bcf45dacb3a0485' + 'ee12091f293040e42999c64d471ec9a65692f1dde0c42a4936d80e25a8d0535c' + 299700000000).toString()) // return e8ad8111fd2761792b9b39a531117ca8edcbc4ba65b2c3d9472c63dd76876731 not matched 6dddefd62523efccacf35e0cac24cc5348dde8f40ae48be1c563a9404e8251fe

So what the type of these params are?
Can someone provide any examples? Thank you.

call .then on the promise for fullNode

For using ts-node

Instead of
console.log(await blockChainState.blockchain_state.space);

call with .then to prevent Promise { <pending> }

console.log(blockchain)

blockchain.then(function(fullNode) {
   console.log(fullNode)
})

这工具怎么用?

不知道怎么使用这个工具
windows和Ubuntu上node 环境跑都会报这个错
image

run serve api error

(node:26220) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:26220) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Ca't connect to testnet

I try to set up a CHIA local testnet blockchain. (testnet7)
Could you give me some idea to set up this lib interact with testnet.
Many thanks.
My issue below:

Error: ENOENT: no such file or directory, open '/home/caodb/.chia/mainnet/config/config.yaml'
at Object.openSync (fs.js:443:3)
at Object.readFileSync (fs.js:343:35)
at Object.exports.getChiaConfig (/home/caodb/CaoDinh/projects/CHIA/chia-client-test/node_modules/chia-client/dist/src/ChiaNodeUtils.js:17:30)
at Object. (/home/caodb/CaoDinh/projects/CHIA/chia-client-test/node_modules/chia-client/dist/src/FullNode.js:6:36)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)

puzzle_hash convert address

How to make a convertion between puzzle_hash and address?
Can it be provided as a tool in chia-client please?

thank you.

Do you run Chia Explorer?

Hey there, I was wondering if you ran the Chia Explorer or knew who did, since I have a very simple feature suggestion for the explorer (has to do with an improvement to the miscellaneous transaction label) and haven't found any contact information on the website. Thanks!

getNextAddress ssl error

The JS code:
const wallet = new Wallet({
protocol: 'https',
hostname: '47.241.90.20',
port: 9256,
caCertPath: './xch_ssh/private_ca.crt',
certPath: './xch_ssh/private_daemon.crt',
keyPath: './xch_ssh/private_daemon.key',
});
wallet.getNextAddress('1').then(console.log);

got errors:
(node:55573) UnhandledPromiseRejectionWarning: Error [ERR_TLS_CERT_ALTNAME_INVALID]: Hostname/IP does not match certificate's altnames: IP: 47.241.90.20 is not in the cert's list:
at Object.checkServerIdentity (tls.js:297:12)
at TLSSocket.onConnectSecure (_tls_wrap.js:1507:27)
at TLSSocket.emit (events.js:315:20)
at TLSSocket._finishInit (_tls_wrap.js:932:8)
at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:706:12)
at TLSWrap.callbackTrampoline (internal/async_hooks.js:131:14)

So which ssl files should the params caCertPath, certPath, keyPath point to ?

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.