Closed pablogeek closed 2 months ago
I have this trait
#[uniffi::export] pub trait PublicKey: Send + Sync { fn to_u8a(&self) -> Vec<u8>; }
And then
#[derive(uniffi::Object)] #[derive(Debug)] struct Secp256r1 { pub bytes: Vec<u8> } #[uniffi::export] impl PublicKey for Secp256r1 { fn to_u8a(&self) -> Vec<u8> { let mut vec = vec![Tag::Secp256r1.to_u8a()]; vec.extend_from_slice(&self.bytes); vec } }
but the swift class generated looks like this
public protocol Secp256r1Protocol: AnyObject { func toU8a() -> Data } open class Secp256r1: Secp256r1Protocol
Secp256r1 should implement PublicKey in swift too
Secp256r1
PublicKey
How can I solve this?
This looks the same as #2169?
yes looks like that. Closing it
I have this trait
And then
but the swift class generated looks like this
Secp256r1
should implementPublicKey
in swift tooHow can I solve this?