@@ -269,15 +269,15 @@ impl From<rust_cktap::DumpError> for DumpError {
269269#[ derive( Clone , Debug , PartialEq , Eq , thiserror:: Error , uniffi:: Error ) ]
270270pub enum SignPsbtError {
271271 #[ error( "Invalid path at index: {index}" ) ]
272- InvalidPath { index : u64 } ,
272+ InvalidPath { index : u32 } ,
273273 #[ error( "Invalid script at index: {index}" ) ]
274- InvalidScript { index : u64 } ,
274+ InvalidScript { index : u32 } ,
275275 #[ error( "Missing pubkey at index: {index}" ) ]
276- MissingPubkey { index : u64 } ,
276+ MissingPubkey { index : u32 } ,
277277 #[ error( "Missing UTXO at index: {index}" ) ]
278- MissingUtxo { index : u64 } ,
278+ MissingUtxo { index : u32 } ,
279279 #[ error( "Pubkey mismatch at index: {index}" ) ]
280- PubkeyMismatch { index : u64 } ,
280+ PubkeyMismatch { index : u32 } ,
281281 #[ error( "Sighash error: {msg}" ) ]
282282 SighashError { msg : String } ,
283283 #[ error( "Signature error: {msg}" ) ]
@@ -300,21 +300,17 @@ pub enum SignPsbtError {
300300impl From < rust_cktap:: SignPsbtError > for SignPsbtError {
301301 fn from ( value : rust_cktap:: SignPsbtError ) -> SignPsbtError {
302302 match value {
303- rust_cktap:: SignPsbtError :: InvalidPath ( index) => SignPsbtError :: InvalidPath {
304- index : index as u64 ,
305- } ,
306- rust_cktap:: SignPsbtError :: InvalidScript ( index) => SignPsbtError :: InvalidScript {
307- index : index as u64 ,
308- } ,
309- rust_cktap:: SignPsbtError :: MissingPubkey ( index) => SignPsbtError :: MissingPubkey {
310- index : index as u64 ,
311- } ,
312- rust_cktap:: SignPsbtError :: MissingUtxo ( index) => SignPsbtError :: MissingUtxo {
313- index : index as u64 ,
314- } ,
315- rust_cktap:: SignPsbtError :: PubkeyMismatch ( index) => SignPsbtError :: PubkeyMismatch {
316- index : index as u64 ,
317- } ,
303+ rust_cktap:: SignPsbtError :: InvalidPath ( index) => SignPsbtError :: InvalidPath { index } ,
304+ rust_cktap:: SignPsbtError :: InvalidScript ( index) => {
305+ SignPsbtError :: InvalidScript { index }
306+ }
307+ rust_cktap:: SignPsbtError :: MissingPubkey ( index) => {
308+ SignPsbtError :: MissingPubkey { index }
309+ }
310+ rust_cktap:: SignPsbtError :: MissingUtxo ( index) => SignPsbtError :: MissingUtxo { index } ,
311+ rust_cktap:: SignPsbtError :: PubkeyMismatch ( index) => {
312+ SignPsbtError :: PubkeyMismatch { index }
313+ }
318314 rust_cktap:: SignPsbtError :: SighashError ( msg) => SignPsbtError :: SighashError { msg } ,
319315 rust_cktap:: SignPsbtError :: SignatureError ( msg) => SignPsbtError :: SignatureError { msg } ,
320316 rust_cktap:: SignPsbtError :: SlotNotUnsealed ( slot) => {
@@ -349,9 +345,9 @@ pub enum ChangeError {
349345 err : CkTapError ,
350346 } ,
351347 #[ error( "new cvc is too short, must be at least 6 bytes, was only {len} bytes" ) ]
352- TooShort { len : u64 } ,
348+ TooShort { len : u8 } ,
353349 #[ error( "new cvc is too long, must be at most 32 bytes, was {len} bytes" ) ]
354- TooLong { len : u64 } ,
350+ TooLong { len : u8 } ,
355351 #[ error( "new cvc is the same as the old one" ) ]
356352 SameAsOld ,
357353}
@@ -360,8 +356,8 @@ impl From<rust_cktap::ChangeError> for ChangeError {
360356 fn from ( value : rust_cktap:: ChangeError ) -> Self {
361357 match value {
362358 rust_cktap:: ChangeError :: CkTap ( err) => ChangeError :: CkTap { err : err. into ( ) } ,
363- rust_cktap:: ChangeError :: TooShort ( len) => ChangeError :: TooShort { len : len as u64 } ,
364- rust_cktap:: ChangeError :: TooLong ( len) => ChangeError :: TooLong { len : len as u64 } ,
359+ rust_cktap:: ChangeError :: TooShort ( len) => ChangeError :: TooShort { len } ,
360+ rust_cktap:: ChangeError :: TooLong ( len) => ChangeError :: TooLong { len } ,
365361 rust_cktap:: ChangeError :: SameAsOld => ChangeError :: SameAsOld ,
366362 }
367363 }
0 commit comments