kaspanet / rusty-kaspa

Kaspa full-node and related libraries in the Rust programming language. This is a stable version at the initial rollout phases.
ISC License
376 stars 119 forks source link

Demo syntax doesn't work in typescript #330

Closed Cryptok777 closed 5 months ago

Cryptok777 commented 7 months ago

https://github.com/kaspanet/rusty-kaspa/blob/f674ad5e071f79d294c6964ee114e8feea9d29ff/wasm/nodejs/generator.js#L81

截屏2023-11-21 下午11 40 25

The following should work:

let pending
while ((pending = await generator.next())) {
  await pending.sign([privateKey])
  let txid = await pending.submit(rpc)
  console.log("txid:", txid)
}