Skip to content

Commit

Permalink
eternal glory
Browse files Browse the repository at this point in the history
  • Loading branch information
Sajjon committed Jan 1, 2025
1 parent f019ef4 commit fc9c139
Show file tree
Hide file tree
Showing 12 changed files with 9 additions and 124 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ impl From<InternalFactorInstancesProviderOutcomeForFactor>
for FactorInstancesProviderOutcomeForFactor
{
fn from(value: InternalFactorInstancesProviderOutcomeForFactor) -> Self {


Self {
hidden: HiddenConstructor,
factor_source_id: value.factor_source_id,
Expand Down
19 changes: 5 additions & 14 deletions crates/sargon-uniffi/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#![feature(async_closure)]
#![feature(let_chains)]
#![feature(core_intrinsics)]
#![allow(unused_imports)]
#![allow(internal_features)]

mod core;
Expand Down Expand Up @@ -49,32 +50,22 @@ pub mod prelude {
pub(crate) use sargon_uniffi_conversion_macros::*;
// pub(crate) use sargon_manifests::prelude::*;
pub(crate) use sargon::prelude::{
DeserializeBytes, DeserializeStr, HasSampleValues, HashMap, HashSet,
DeserializeBytes, DeserializeStr, HasSampleValues, HashMap,
SerializeToBytes, SerializeToString,
};

pub(crate) use ::hex::decode as hex_decode;
pub(crate) use ::hex::encode as hex_encode;
pub(crate) use iso8601_timestamp::Timestamp;
pub(crate) use itertools::Itertools;
pub(crate) use log::{debug, error, info, trace, warn};
pub(crate) use log::error;

pub(crate) use std::cmp::Ordering;
pub(crate) use std::collections::BTreeMap;
pub(crate) use std::fmt::{Debug, Display, Formatter};
pub(crate) use std::fs;
pub(crate) use std::hash::Hash as StdHash;
pub(crate) use std::fmt::Debug;
pub use std::ops::{Add, AddAssign, Deref, Div, Mul, Neg, Sub};
pub(crate) use std::str::FromStr;
pub(crate) use std::sync::{Arc, RwLock};
pub(crate) use std::sync::Arc;

pub(crate) use strum::FromRepr;
pub(crate) use strum::IntoEnumIterator;
pub(crate) use url::Url;
pub(crate) use uuid::Uuid;

pub(crate) use enum_as_inner::EnumAsInner;
pub(crate) use enum_iterator::all;
pub(crate) use paste::*;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ macro_rules! decl_transaction_to_sign_per_factor_source {
};
(signable: $signable:ty, signable_id: $signable_id:ty) => {
paste! {
use sargon::[< $signable >] as [< Internal $signable >];
use sargon::[< $signable_id >] as [< Internal $signable_id >];

decl_transaction_to_sign_per_factor_source!(
struct_name: [< TransactionToSignPerFactorSourceOf $signable >],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
mod test;
mod unsafe_storage_key;

pub use test::*;
pub use unsafe_storage_key::*;
5 changes: 1 addition & 4 deletions crates/sargon-uniffi/src/system/sargon_os/sargon_os.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
use std::sync::Once;

use crate::prelude::*;
use sargon::Interactors;
use sargon::SargonOS as InternalSargonOS;
use sargon::UseFactorSourcesInteractor as InternalHostInteractor;
use sargon::{Bios as InternalBios, Interactors};

/// The Sargon "Operating System" is the root "manager" of the Sargon library
/// which holds an in-memory Profile and a collection of "clients" which are
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#![allow(deprecated)]

use std::sync::RwLockWriteGuard;

use crate::prelude::*;

#[uniffi::export]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
use crate::prelude::*;
use sargon::AuthIntent as InternalAuthIntent;
use sargon::Subintent as InternalSubintent;
use sargon::TransactionIntent as InternalTransactionIntent;

#[uniffi::export]
impl SargonOS {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use crate::prelude::*;
use std::sync::RwLockWriteGuard;

#[uniffi::export]
impl SargonOS {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ pub use address_of_account_or_persona::*;
pub use assets_transfers::*;
pub use build_information::*;

pub use address_union::*;

pub use stake_claim::*;
pub use transaction::*;
pub use transaction_guarantee::*;
Expand Down
88 changes: 3 additions & 85 deletions crates/sargon/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,105 +21,23 @@ mod types;

pub mod prelude {
pub use gateway_client_and_api::prelude::*;
pub(crate) use identified_vec_of::prelude::*;
pub(crate) use sargon_addresses::prelude::*;
pub use sargon_clients::prelude::*;
pub(crate) use sargon_core::prelude::*;
pub use sargon_factor_instances_provider::prelude::*;
pub(crate) use sargon_factors::prelude::*;
pub(crate) use sargon_hierarchical_deterministic::prelude::*;
pub use sargon_keys_collector::prelude::*;
pub use sargon_manifests::prelude::*;
pub(crate) use sargon_profile::prelude::*;
pub use sargon_profile_logic::prelude::*;
pub(crate) use sargon_profile_security_structures::prelude::*;
pub(crate) use sargon_transaction_models::prelude::*;

pub use crate::home_cards::*;
pub(crate) use crate::needs_a_new_home_dumping_ground::*;
pub use crate::radix_connect::*;
pub use crate::security_center::*;
pub use crate::signing::*;
pub use crate::system::*;
pub use crate::types::*;

pub(crate) use radix_engine_toolkit_common::receipt::RuntimeToolkitTransactionReceipt as ScryptoRuntimeToolkitTransactionReceipt;
pub(crate) use radix_engine_interface::prelude::MetadataValue as ScryptoMetadataValue;

pub(crate) use sbor::Versioned;

pub(crate) use radix_common::{
crypto::{
blake2b_256_hash, verify_ed25519 as scrypto_verify_ed25519,
verify_secp256k1 as scrypto_verify_secp256k1,
Ed25519PrivateKey as ScryptoEd25519PrivateKey,
Ed25519Signature as ScryptoEd25519Signature,
Secp256k1PrivateKey as ScryptoSecp256k1PrivateKey,
Secp256k1PublicKey as ScryptoSecp256k1PublicKey,
Secp256k1Signature as ScryptoSecp256k1Signature,
},
math::{
Decimal as ScryptoDecimal192, RoundingMode as ScryptoRoundingMode,
},
network::NetworkDefinition as ScryptoNetworkDefinition,
prelude::{
UpperBound as ScryptoUpperBound,
IDENTITY_OWNER_BADGE as SCRYPTO_IDENTITY_OWNER_BADGE,
},
ManifestSbor as ScryptoManifestSbor, ScryptoSbor,
};

pub(crate) use radix_engine_interface::blueprints::{
access_controller::{
RecoveryProposal as ScryptoRecoveryProposal,
RuleSet as ScryptoRuleSet,
},
account::{
DefaultDepositRule as ScryptoDefaultDepositRule,
ResourcePreference as ScryptoResourcePreference,
ACCOUNT_SECURIFY_IDENT as SCRYPTO_ACCOUNT_SECURIFY_IDENT,
},
identity::IDENTITY_SECURIFY_IDENT as SCRYPTO_IDENTITY_SECURIFY_IDENT,
resource::ResourceOrNonFungible as ScryptoResourceOrNonFungible,
};

pub(crate) use radix_engine_interface::prelude::{
AccessRule as ScryptoAccessRule,
BasicRequirement as ScryptoBasicRequirement,
CompositeRequirement as ScryptoCompositeRequirement,
FungibleResourceRoles as ScryptoFungibleResourceRoles,
MetadataInit as ScryptoMetadataInit,
MetadataValue as ScryptoMetadataValue,
ModuleConfig as ScryptoModuleConfig,
NonFungibleResourceRoles as ScryptoNonFungibleResourceRoles,
OwnerRole as ScryptoOwnerRole,
RoleAssignmentInit as ScryptoRoleAssignmentInit,
ToMetadataEntry as ScryptoToMetadataEntry,
UncheckedUrl as ScryptoUncheckedUrl,
};

pub(crate) use radix_transactions::manifest::{
compile as scrypto_compile,
compile_error_diagnostics as scrypto_compile_error_diagnostics,
compile_manifest as scrypto_compile_manifest,
decompile as scrypto_decompile,
generator::{GeneratorError, GeneratorErrorKind},
lexer::{LexerError, LexerErrorKind},
static_resource_movements::{
AccountDeposit as ScryptoAccountDeposit,
AccountWithdraw as ScryptoAccountWithdraw,
ChangeSource as ScryptoChangeSource,
SimpleFungibleResourceBounds as ScryptoSimpleFungibleResourceBounds,
SimpleNonFungibleResourceBounds as ScryptoSimpleNonFungibleResourceBounds,
SimpleResourceBounds as ScryptoSimpleResourceBounds,
UnspecifiedResources as ScryptoUnspecifiedResources,
},
token::Span,
CompileError as ScryptoCompileError,
CompileErrorDiagnosticsStyle as ScryptoCompileErrorDiagnosticsStyle,
KnownManifestObjectNames as ScryptoKnownManifestObjectNames,
ManifestObjectNames as ScryptoManifestObjectNames,
MockBlobProvider as ScryptoMockBlobProvider,
};
#[cfg(test)]
pub(crate) use radix_common::math::Decimal as ScryptoDecimal192;

pub use radix_engine_toolkit::{
functions::{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

use super::*;
use crate::prelude::*;

Expand Down
8 changes: 0 additions & 8 deletions crates/sargon/src/system/sargon_os/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,5 @@ pub use pre_authorization::*;
pub use profile_state_holder::*;
pub use sargon_os::*;
pub use sargon_os_accounts::*;
pub(crate) use sargon_os_entities_linked_to_factor_source::*;
pub use sargon_os_factors::*;
pub(crate) use sargon_os_gateway::*;
pub(crate) use sargon_os_personas::*;
pub(crate) use sargon_os_profile::*;
pub(crate) use sargon_os_security_center::*;
pub(crate) use sargon_os_security_structures::*;
pub(crate) use sargon_os_signing::*;
pub(crate) use sargon_os_sync_accounts::*;
pub use transactions::*;

0 comments on commit fc9c139

Please sign in to comment.