Skip to content
Merged
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
246 changes: 123 additions & 123 deletions bindings/go/iota_sdk_ffi/iota_sdk_ffi.go

Large diffs are not rendered by default.

302 changes: 151 additions & 151 deletions bindings/go/iota_sdk_ffi/iota_sdk_ffi.h

Large diffs are not rendered by default.

246 changes: 123 additions & 123 deletions bindings/kotlin/lib/iota_sdk/iota_sdk_ffi.kt

Large diffs are not rendered by default.

348 changes: 174 additions & 174 deletions bindings/python/lib/iota_sdk_ffi.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bindings/python/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ async def main():
)

move_struct = MoveStruct(
struct_type=StructTag.coin(TypeTag.vector(TypeTag.u8())),
struct_type=StructTag.coin(TypeTag.new_vector(TypeTag.new_u8())),
version=1,
contents=bytes(),
)
Expand Down
6 changes: 3 additions & 3 deletions crates/iota-sdk-ffi/src/faucet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,19 @@ impl FaucetClient {

/// Set to local faucet.
#[uniffi::constructor]
pub fn local() -> Self {
pub fn new_local() -> Self {
Self(iota_graphql_client::faucet::FaucetClient::local())
}

/// Set to devnet faucet.
#[uniffi::constructor]
pub fn devnet() -> Self {
pub fn new_devnet() -> Self {
Self(iota_graphql_client::faucet::FaucetClient::devnet())
}

/// Set to testnet faucet.
#[uniffi::constructor]
pub fn testnet() -> Self {
pub fn new_testnet() -> Self {
Self(iota_graphql_client::faucet::FaucetClient::testnet())
}

Expand Down
20 changes: 10 additions & 10 deletions crates/iota-sdk-ffi/src/types/transaction/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,40 +124,40 @@ pub struct TransactionKind(pub iota_types::TransactionKind);
#[uniffi::export]
impl TransactionKind {
#[uniffi::constructor]
pub fn programmable_transaction(tx: &ProgrammableTransaction) -> Self {
pub fn new_programmable_transaction(tx: &ProgrammableTransaction) -> Self {
Self(iota_types::TransactionKind::ProgrammableTransaction(
tx.0.clone(),
))
}

#[uniffi::constructor]
pub fn genesis(tx: &GenesisTransaction) -> Self {
pub fn new_genesis(tx: &GenesisTransaction) -> Self {
Self(iota_types::TransactionKind::Genesis(tx.0.clone()))
}

#[uniffi::constructor]
pub fn consensus_commit_prologue_v1(tx: &ConsensusCommitPrologueV1) -> Self {
pub fn new_consensus_commit_prologue_v1(tx: &ConsensusCommitPrologueV1) -> Self {
Self(iota_types::TransactionKind::ConsensusCommitPrologueV1(
tx.0.clone(),
))
}

#[uniffi::constructor]
pub fn authenticator_state_update_v1(tx: &AuthenticatorStateUpdateV1) -> Self {
pub fn new_authenticator_state_update_v1(tx: &AuthenticatorStateUpdateV1) -> Self {
Self(iota_types::TransactionKind::AuthenticatorStateUpdateV1(
tx.clone(),
))
}

#[uniffi::constructor]
pub fn end_of_epoch(tx: Vec<Arc<EndOfEpochTransactionKind>>) -> Self {
pub fn new_end_of_epoch(tx: Vec<Arc<EndOfEpochTransactionKind>>) -> Self {
Self(iota_types::TransactionKind::EndOfEpoch(
tx.into_iter().map(|tx| tx.0.clone()).collect(),
))
}

#[uniffi::constructor]
pub fn randomness_state_update(tx: &RandomnessStateUpdate) -> Self {
pub fn new_randomness_state_update(tx: &RandomnessStateUpdate) -> Self {
Self(iota_types::TransactionKind::RandomnessStateUpdate(
tx.clone(),
))
Expand Down Expand Up @@ -1368,26 +1368,26 @@ pub struct EndOfEpochTransactionKind(pub iota_types::EndOfEpochTransactionKind);
#[uniffi::export]
impl EndOfEpochTransactionKind {
#[uniffi::constructor]
pub fn change_epoch(tx: &ChangeEpoch) -> Self {
pub fn new_change_epoch(tx: &ChangeEpoch) -> Self {
Self(iota_types::EndOfEpochTransactionKind::ChangeEpoch(
tx.0.clone(),
))
}

#[uniffi::constructor]
pub fn change_epoch_v2(tx: &ChangeEpochV2) -> Self {
pub fn new_change_epoch_v2(tx: &ChangeEpochV2) -> Self {
Self(iota_types::EndOfEpochTransactionKind::ChangeEpochV2(
tx.0.clone(),
))
}

#[uniffi::constructor]
pub fn authenticator_state_create() -> Self {
pub fn new_authenticator_state_create() -> Self {
Self(iota_types::EndOfEpochTransactionKind::AuthenticatorStateCreate)
}

#[uniffi::constructor]
pub fn authenticator_state_expire(tx: &AuthenticatorStateExpire) -> Self {
pub fn new_authenticator_state_expire(tx: &AuthenticatorStateExpire) -> Self {
Self(iota_types::EndOfEpochTransactionKind::AuthenticatorStateExpire(tx.clone()))
}
}
Expand Down
22 changes: 11 additions & 11 deletions crates/iota-sdk-ffi/src/types/type_tag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,57 +125,57 @@ impl TypeTag {
}

#[uniffi::constructor]
pub fn u8() -> Self {
pub fn new_u8() -> Self {
Self(iota_types::TypeTag::U8)
}

#[uniffi::constructor]
pub fn u16() -> Self {
pub fn new_u16() -> Self {
Self(iota_types::TypeTag::U16)
}

#[uniffi::constructor]
pub fn u32() -> Self {
pub fn new_u32() -> Self {
Self(iota_types::TypeTag::U32)
}

#[uniffi::constructor]
pub fn u64() -> Self {
pub fn new_u64() -> Self {
Self(iota_types::TypeTag::U64)
}

#[uniffi::constructor]
pub fn u128() -> Self {
pub fn new_u128() -> Self {
Self(iota_types::TypeTag::U128)
}

#[uniffi::constructor]
pub fn u256() -> Self {
pub fn new_u256() -> Self {
Self(iota_types::TypeTag::U256)
}

#[uniffi::constructor]
pub fn bool() -> Self {
pub fn new_bool() -> Self {
Self(iota_types::TypeTag::Bool)
}

#[uniffi::constructor]
pub fn address() -> Self {
pub fn new_address() -> Self {
Self(iota_types::TypeTag::Address)
}

#[uniffi::constructor]
pub fn signer() -> Self {
pub fn new_signer() -> Self {
Self(iota_types::TypeTag::Signer)
}

#[uniffi::constructor]
pub fn vector(type_tag: &TypeTag) -> Self {
pub fn new_vector(type_tag: &TypeTag) -> Self {
Self(iota_types::TypeTag::Vector(Box::new(type_tag.0.clone())))
}

#[uniffi::constructor]
pub fn struct_tag(struct_tag: &StructTag) -> Self {
pub fn new_struct(struct_tag: &StructTag) -> Self {
Self(iota_types::TypeTag::Struct(Box::new(struct_tag.0.clone())))
}
}