Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,997 changes: 2,936 additions & 61 deletions bindings/go/iota_sdk/iota_sdk.go

Large diffs are not rendered by default.

1,295 changes: 1,295 additions & 0 deletions bindings/go/iota_sdk/iota_sdk.h

Large diffs are not rendered by default.

2,092 changes: 2,092 additions & 0 deletions bindings/kotlin/lib/iota_sdk/iota_sdk_ffi.kt

Large diffs are not rendered by default.

3,401 changes: 3,401 additions & 0 deletions bindings/python/lib/iota_sdk_ffi.py

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion crates/iota-sdk-ffi/src/crypto/bls12381.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ impl Bls12381PrivateKey {
}
}

#[derive(derive_more::From, uniffi::Object)]
#[derive(Debug, derive_more::From, uniffi::Object)]
#[uniffi::export(Debug)]
pub struct Bls12381VerifyingKey(pub iota_sdk::crypto::bls12381::Bls12381VerifyingKey);

#[uniffi::export]
Expand Down
9 changes: 6 additions & 3 deletions crates/iota-sdk-ffi/src/crypto/ed25519.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ use crate::{
},
};

#[derive(derive_more::From, derive_more::Deref, uniffi::Object)]
#[derive(PartialEq, Eq, derive_more::From, derive_more::Deref, uniffi::Object)]
#[uniffi::export(Eq)]
pub struct Ed25519PrivateKey(iota_sdk::crypto::ed25519::Ed25519PrivateKey);

#[uniffi::export]
Expand Down Expand Up @@ -154,7 +155,8 @@ impl Ed25519PrivateKey {
}
}

#[derive(derive_more::From, uniffi::Object)]
#[derive(Debug, PartialEq, Eq, derive_more::From, uniffi::Object)]
#[uniffi::export(Debug, Eq)]
pub struct Ed25519VerifyingKey(iota_sdk::crypto::ed25519::Ed25519VerifyingKey);

#[uniffi::export]
Expand Down Expand Up @@ -213,7 +215,8 @@ impl Ed25519VerifyingKey {
}
}

#[derive(derive_more::From, uniffi::Object)]
#[derive(Debug, derive_more::From, uniffi::Object)]
#[uniffi::export(Debug)]
pub struct Ed25519Verifier(iota_sdk::crypto::ed25519::Ed25519Verifier);

impl Ed25519Verifier {
Expand Down
9 changes: 6 additions & 3 deletions crates/iota-sdk-ffi/src/crypto/multisig.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ use crate::{
},
};

#[derive(derive_more::From, uniffi::Object)]
#[derive(Debug, derive_more::From, uniffi::Object)]
#[uniffi::export(Debug)]
pub struct MultisigVerifier(pub iota_sdk::crypto::multisig::MultisigVerifier);

#[uniffi::export]
Expand Down Expand Up @@ -48,7 +49,8 @@ impl MultisigVerifier {
}

/// Verifier that will verify all UserSignature variants
#[derive(derive_more::From, uniffi::Object)]
#[derive(Debug, derive_more::From, uniffi::Object)]
#[uniffi::export(Debug)]
pub struct UserSignatureVerifier(pub iota_sdk::crypto::multisig::UserSignatureVerifier);

#[uniffi::export]
Expand Down Expand Up @@ -77,7 +79,8 @@ impl UserSignatureVerifier {
}
}

#[derive(derive_more::From, uniffi::Object)]
#[derive(Debug, derive_more::From, uniffi::Object)]
#[uniffi::export(Debug)]
pub struct MultisigAggregator(pub iota_sdk::crypto::multisig::MultisigAggregator);

#[uniffi::export]
Expand Down
3 changes: 2 additions & 1 deletion crates/iota-sdk-ffi/src/crypto/passkey.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ use crate::{
types::{crypto::passkey::PasskeyAuthenticator, signature::SimpleSignature},
};

#[derive(uniffi::Object)]
#[derive(Debug, uniffi::Object)]
#[uniffi::export(Debug)]
pub struct PasskeyVerifier(iota_sdk::crypto::passkey::PasskeyVerifier);

#[uniffi::export]
Expand Down
9 changes: 6 additions & 3 deletions crates/iota-sdk-ffi/src/crypto/secp256k1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ use crate::{
},
};

#[derive(derive_more::From, derive_more::Deref, uniffi::Object)]
#[derive(PartialEq, Eq, derive_more::From, derive_more::Deref, uniffi::Object)]
#[uniffi::export(Eq)]
pub struct Secp256k1PrivateKey(iota_sdk::crypto::secp256k1::Secp256k1PrivateKey);

#[uniffi::export]
Expand Down Expand Up @@ -156,7 +157,8 @@ impl Secp256k1PrivateKey {
}
}

#[derive(derive_more::From, uniffi::Object)]
#[derive(Debug, PartialEq, Eq, derive_more::From, uniffi::Object)]
#[uniffi::export(Debug, Eq)]
pub struct Secp256k1VerifyingKey(iota_sdk::crypto::secp256k1::Secp256k1VerifyingKey);

#[uniffi::export]
Expand Down Expand Up @@ -215,7 +217,8 @@ impl Secp256k1VerifyingKey {
}
}

#[derive(derive_more::From, uniffi::Object)]
#[derive(Debug, derive_more::From, uniffi::Object)]
#[uniffi::export(Debug)]
pub struct Secp256k1Verifier(iota_sdk::crypto::secp256k1::Secp256k1Verifier);

#[uniffi::export]
Expand Down
9 changes: 6 additions & 3 deletions crates/iota-sdk-ffi/src/crypto/secp256r1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ use crate::{
},
};

#[derive(derive_more::From, derive_more::Deref, uniffi::Object)]
#[derive(PartialEq, Eq, derive_more::From, derive_more::Deref, uniffi::Object)]
#[uniffi::export(Eq)]
pub struct Secp256r1PrivateKey(pub iota_sdk::crypto::secp256r1::Secp256r1PrivateKey);

#[uniffi::export]
Expand Down Expand Up @@ -163,7 +164,8 @@ impl Secp256r1PrivateKey {
}
}

#[derive(derive_more::From, uniffi::Object)]
#[derive(Debug, PartialEq, Eq, derive_more::From, uniffi::Object)]
#[uniffi::export(Debug, Eq)]
pub struct Secp256r1VerifyingKey(pub iota_sdk::crypto::secp256r1::Secp256r1VerifyingKey);

#[uniffi::export]
Expand Down Expand Up @@ -220,7 +222,8 @@ impl Secp256r1VerifyingKey {
}
}

#[derive(derive_more::From, uniffi::Object)]
#[derive(Debug, derive_more::From, uniffi::Object)]
#[uniffi::export(Debug)]
pub struct Secp256r1Verifier(pub iota_sdk::crypto::secp256r1::Secp256r1Verifier);

#[uniffi::export]
Expand Down
6 changes: 4 additions & 2 deletions crates/iota-sdk-ffi/src/crypto/simple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ impl SimpleVerifier {
}
}

#[derive(derive_more::From, uniffi::Object)]
#[derive(Debug, derive_more::From, uniffi::Object)]
#[uniffi::export(Debug)]
pub struct SimpleKeypair(pub iota_sdk::crypto::simple::SimpleKeypair);

#[uniffi::export]
Expand Down Expand Up @@ -139,7 +140,8 @@ impl SimpleKeypair {
}
}

#[derive(derive_more::From, uniffi::Object)]
#[derive(Debug, PartialEq, Eq, derive_more::From, uniffi::Object)]
#[uniffi::export(Debug, Eq)]
pub struct SimpleVerifyingKey(iota_sdk::crypto::simple::SimpleVerifyingKey);

#[uniffi::export]
Expand Down
6 changes: 4 additions & 2 deletions crates/iota-sdk-ffi/src/crypto/validator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ use crate::{
},
};

#[derive(derive_more::From, uniffi::Object)]
#[derive(Debug, derive_more::From, uniffi::Object)]
#[uniffi::export(Debug)]
pub struct ValidatorCommitteeSignatureVerifier(
pub iota_sdk::crypto::validator::ValidatorCommitteeSignatureVerifier,
);
Expand Down Expand Up @@ -56,7 +57,8 @@ impl ValidatorCommitteeSignatureVerifier {
}
}

#[derive(derive_more::From, uniffi::Object)]
#[derive(Debug, derive_more::From, uniffi::Object)]
#[uniffi::export(Debug)]
pub struct ValidatorCommitteeSignatureAggregator(
pub RwLock<iota_sdk::crypto::validator::ValidatorCommitteeSignatureAggregator>,
);
Expand Down
3 changes: 2 additions & 1 deletion crates/iota-sdk-ffi/src/crypto/zklogin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ use iota_sdk::{

use crate::{error::Result, types::crypto::zklogin::ZkLoginAuthenticator};

#[derive(derive_more::From, uniffi::Object)]
#[derive(Debug, PartialEq, derive_more::From, uniffi::Object)]
#[uniffi::export(Debug)]
pub struct ZkloginVerifier(pub iota_sdk::crypto::zklogin::ZkloginVerifier);

#[uniffi::export]
Expand Down
3 changes: 2 additions & 1 deletion crates/iota-sdk-ffi/src/transaction_builder/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ use crate::{

/// A builder for creating transactions. Use `finish` to finalize the
/// transaction data.
#[derive(derive_more::From, uniffi::Object)]
#[derive(Debug, derive_more::From, uniffi::Object)]
#[uniffi::export(Debug)]
pub struct TransactionBuilder(RwLock<iota_sdk::transaction_builder::TransactionBuilder<()>>);

impl TransactionBuilder {
Expand Down
14 changes: 13 additions & 1 deletion crates/iota-sdk-ffi/src/types/address.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,19 @@ use crate::{
/// ```text
/// address = 32OCTET
/// ```
#[derive(derive_more::From, derive_more::Deref, uniffi::Object)]
#[derive(
Debug,
Hash,
PartialEq,
Eq,
PartialOrd,
Ord,
derive_more::Display,
derive_more::From,
derive_more::Deref,
uniffi::Object,
)]
#[uniffi::export(Debug, Display, Eq, Hash)]
pub struct Address(pub iota_sdk::types::Address);

#[uniffi::export]
Expand Down
3 changes: 2 additions & 1 deletion crates/iota-sdk-ffi/src/types/coin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ use crate::{
},
};

#[derive(derive_more::From, uniffi::Object)]
#[derive(Debug, derive_more::From, uniffi::Object)]
#[uniffi::export(Debug)]
pub struct Coin(pub iota_sdk::types::framework::Coin);

#[uniffi::export]
Expand Down
3 changes: 2 additions & 1 deletion crates/iota-sdk-ffi/src/types/crypto/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ use crate::{
macro_rules! impl_crypto_object {
($(#[$meta:meta])* $t:ident) => {
$(#[$meta])*
#[derive(derive_more::From, derive_more::Deref, uniffi::Object)]
#[derive(PartialEq, Eq, PartialOrd, Ord, Hash, derive_more::From, derive_more::Deref, uniffi::Object)]
#[uniffi::export(Eq, Hash)]
pub struct $t(pub iota_sdk::types::$t);

#[uniffi::export]
Expand Down
15 changes: 10 additions & 5 deletions crates/iota-sdk-ffi/src/types/crypto/multisig.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ use crate::types::{
/// secp256r1-multisig-member-signature = %x02 secp256r1-signature
/// zklogin-multisig-member-signature = %x03 zklogin-authenticator
/// ```
#[derive(derive_more::From, uniffi::Object)]
#[derive(Debug, PartialEq, Eq, derive_more::From, uniffi::Object)]
#[uniffi::export(Debug, Eq)]
pub struct MultisigMemberSignature(pub iota_sdk::types::MultisigMemberSignature);

#[uniffi::export]
Expand Down Expand Up @@ -129,7 +130,8 @@ impl MultisigMemberSignature {
/// (secp256k1-flag secp256k1-public-key) /
/// (secp256r1-flag secp256r1-public-key)
/// ```
#[derive(derive_more::From, uniffi::Object)]
#[derive(Debug, PartialEq, Eq, derive_more::From, uniffi::Object)]
#[uniffi::export(Debug, Eq)]
pub struct MultisigMemberPublicKey(pub iota_sdk::types::MultisigMemberPublicKey);

#[uniffi::export]
Expand Down Expand Up @@ -224,7 +226,8 @@ impl MultisigMemberPublicKey {
///
/// See <https://github.com/RoaringBitmap/RoaringFormatSpec> for the specification for the
/// serialized format of RoaringBitmaps.
#[derive(derive_more::From, uniffi::Object)]
#[derive(Debug, PartialEq, Eq, derive_more::From, uniffi::Object)]
#[uniffi::export(Debug, Eq)]
pub struct MultisigAggregatedSignature(pub iota_sdk::types::MultisigAggregatedSignature);

#[uniffi::export]
Expand Down Expand Up @@ -293,7 +296,8 @@ impl MultisigAggregatedSignature {
/// legacy-multisig-committee = (vector legacy-multisig-member)
/// u16 ; threshold
/// ```
#[derive(derive_more::From, uniffi::Object)]
#[derive(Debug, PartialEq, Eq, derive_more::From, uniffi::Object)]
#[uniffi::export(Debug, Eq)]
pub struct MultisigCommittee(pub iota_sdk::types::MultisigCommittee);

#[uniffi::export]
Expand Down Expand Up @@ -383,7 +387,8 @@ impl MultisigCommittee {
/// legacy-multisig-member = legacy-multisig-member-public-key
/// u8 ; weight
/// ```
#[derive(derive_more::From, uniffi::Object)]
#[derive(Debug, PartialEq, Eq, derive_more::From, uniffi::Object)]
#[uniffi::export(Debug, Eq)]
pub struct MultisigMember(pub iota_sdk::types::MultisigMember);

#[uniffi::export]
Expand Down
6 changes: 4 additions & 2 deletions crates/iota-sdk-ffi/src/types/crypto/passkey.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ use crate::{
/// signature is ever embedded in another structure it generally is serialized
/// as `bytes` meaning it has a length prefix that defines the length of
/// the completely serialized signature.
#[derive(derive_more::From, uniffi::Object)]
#[derive(Debug, PartialEq, Eq, derive_more::From, uniffi::Object)]
#[uniffi::export(Debug, Eq)]
pub struct PasskeyAuthenticator(pub iota_sdk::types::PasskeyAuthenticator);

#[uniffi::export]
Expand Down Expand Up @@ -88,7 +89,8 @@ impl PasskeyAuthenticator {
/// ```text
/// passkey-public-key = passkey-flag secp256r1-public-key
/// ```
#[derive(derive_more::From, uniffi::Object)]
#[derive(Debug, PartialEq, Eq, derive_more::From, uniffi::Object)]
#[uniffi::export(Debug, Eq)]
pub struct PasskeyPublicKey(iota_sdk::types::PasskeyPublicKey);

#[uniffi::export]
Expand Down
21 changes: 14 additions & 7 deletions crates/iota-sdk-ffi/src/types/crypto/zklogin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ use crate::{
/// signature is ever embedded in another structure it generally is serialized
/// as `bytes` meaning it has a length prefix that defines the length of
/// the completely serialized signature.
#[derive(derive_more::From, uniffi::Object)]
#[derive(Debug, PartialEq, Eq, derive_more::From, uniffi::Object)]
#[uniffi::export(Debug, Eq)]
pub struct ZkLoginAuthenticator(pub iota_sdk::types::ZkLoginAuthenticator);

#[uniffi::export]
Expand Down Expand Up @@ -106,7 +107,8 @@ impl ZkLoginAuthenticator {
/// ; with any leading zero bytes stripped
/// address-seed-unpadded = %x00 / %x01-ff *31(OCTET)
/// ```
#[derive(derive_more::From, uniffi::Object)]
#[derive(Debug, PartialEq, Eq, derive_more::From, uniffi::Object)]
#[uniffi::export(Debug, Eq)]
pub struct ZkLoginPublicIdentifier(pub iota_sdk::types::ZkLoginPublicIdentifier);

#[uniffi::export]
Expand Down Expand Up @@ -176,7 +178,8 @@ impl ZkLoginPublicIdentifier {
/// string ; base64url-unpadded encoded JwtHeader
/// bn254-field-element ; address_seed
/// ```
#[derive(derive_more::From, uniffi::Object)]
#[derive(Debug, PartialEq, Eq, derive_more::From, uniffi::Object)]
#[uniffi::export(Debug, Eq)]
pub struct ZkLoginInputs(pub iota_sdk::types::ZkLoginInputs);

#[uniffi::export]
Expand Down Expand Up @@ -234,7 +237,8 @@ impl ZkLoginInputs {
/// ```text
/// zklogin-proof = circom-g1 circom-g2 circom-g1
/// ```
#[derive(derive_more::From, uniffi::Object)]
#[derive(Debug, PartialEq, Eq, derive_more::From, uniffi::Object)]
#[uniffi::export(Debug, Eq)]
pub struct ZkLoginProof(pub iota_sdk::types::ZkLoginProof);

#[uniffi::export]
Expand Down Expand Up @@ -288,7 +292,8 @@ pub struct ZkLoginClaim {
/// ```text
/// circom-g1 = %x03 3(bn254-field-element)
/// ```
#[derive(derive_more::From, uniffi::Object)]
#[derive(Debug, PartialEq, Eq, derive_more::From, uniffi::Object)]
#[uniffi::export(Debug, Eq)]
pub struct CircomG1(pub iota_sdk::types::CircomG1);

#[uniffi::export]
Expand Down Expand Up @@ -319,7 +324,8 @@ impl CircomG1 {
/// ```text
/// circom-g2 = %x03 3(%x02 2(bn254-field-element))
/// ```
#[derive(derive_more::From, uniffi::Object)]
#[derive(Debug, PartialEq, Eq, derive_more::From, uniffi::Object)]
#[uniffi::export(Debug, Eq)]
pub struct CircomG2(pub iota_sdk::types::CircomG2);

#[uniffi::export]
Expand Down Expand Up @@ -354,7 +360,8 @@ impl CircomG2 {
/// ```text
/// bn254-field-element = *DIGIT ; which is then interpreted as a radix10 encoded 32-byte value
/// ```
#[derive(derive_more::From, uniffi::Object)]
#[derive(Debug, PartialEq, Eq, derive_more::From, uniffi::Object)]
#[uniffi::export(Debug, Eq)]
pub struct Bn254FieldElement(pub iota_sdk::types::Bn254FieldElement);

#[uniffi::export]
Expand Down
Loading
Loading