BitBoxSwiss / bitbox-api-rs

BitBox02 client library for Rust and TypeScript
Apache License 2.0
5 stars 9 forks source link

BTC Sign Message #49

Closed davidleomay closed 11 months ago

davidleomay commented 11 months ago

I just saw that the btcSignMessage call is missing. Do you plan to add it?

benma commented 11 months ago

Indeed - yes, we will add it.

davidleomay commented 11 months ago

Cool, thanks!

benma commented 11 months ago

@davidleomay this is now published at https://www.npmjs.com/package/bitbox-api 0.2.0

davidleomay commented 11 months ago

Thanks for the hint @benma. I just tried it and I think there is an error in the typing @asi345.

From bitbox_api.d.ts I get

type BtcSignMessageSignature = {
  sig: Uint8Array,
  recid: bigint,
  electrumSig65: Uint8Array,
}

but the response from btcSignMessage actually is

{ sig: Array(64), recid: 0, electrum_sig65: Array(65) }
benma commented 11 months ago

@asi345 looks like this review comment somehow slipped through the cracks https://github.com/digitalbitbox/bitbox-api-rs/pull/54#discussion_r1373270936 - can you take a look?

asi345 commented 11 months ago

You're right, I missed that since I was doing camel case manually. Take a look here #56 , where I addressed this issue.

asi345 commented 11 months ago

@davidleomay a new version is now published at https://www.npmjs.com/package/bitbox-api 0.2.1, where this issue was solved.

davidleomay commented 11 months ago

@asi345 awesome, thanks 🚀 it works now!