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
497 changes: 497 additions & 0 deletions packages/rs-platform-wallet-ffi/src/derive_and_persist_callbacks.rs

Large diffs are not rendered by default.

775 changes: 775 additions & 0 deletions packages/rs-platform-wallet-ffi/src/identity_derive_and_persist.rs

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ use crate::identity_registration_with_signer::IdentityRegistrationKeyDerivations
/// helper. BIP-39 wordlists are mutually exclusive within a single
/// phrase, so the first language that yields a valid mnemonic is the
/// right one.
fn parse_mnemonic_any_language(phrase: &str) -> Result<Mnemonic, &'static str> {
pub(crate) fn parse_mnemonic_any_language(phrase: &str) -> Result<Mnemonic, &'static str> {
const LANGUAGES: [Language; 10] = [
Language::English,
Language::Spanish,
Expand All @@ -85,7 +85,7 @@ fn parse_mnemonic_any_language(phrase: &str) -> Result<Mnemonic, &'static str> {
///
/// `Local` collapses to `Regtest` to match the rest of the FFI surface
/// (`dash_sdk_signer_create_from_private_key`, `dash_sdk_sign_with_mnemonic_and_path`).
fn map_network(network: DashSDKNetwork) -> key_wallet::Network {
pub(crate) fn map_network(network: DashSDKNetwork) -> key_wallet::Network {
match network {
DashSDKNetwork::SDKMainnet => key_wallet::Network::Mainnet,
DashSDKNetwork::SDKTestnet => key_wallet::Network::Testnet,
Expand All @@ -108,7 +108,7 @@ fn map_network(network: DashSDKNetwork) -> key_wallet::Network {
/// Re-derived locally instead of borrowed from `platform-wallet` because
/// `platform_wallet::identity_auth_derivation_path` is `pub(crate)` and
/// this entry point sits outside that crate.
fn identity_auth_derivation_path(
pub(crate) fn identity_auth_derivation_path(
network: key_wallet::Network,
identity_index: u32,
key_index: u32,
Expand Down
6 changes: 6 additions & 0 deletions packages/rs-platform-wallet-ffi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@ pub mod core_wallet_types;
pub mod dashpay;
pub mod dashpay_profile;
pub mod derivation;
pub mod derive_and_persist_callbacks;
pub mod dpns;
pub mod error;
pub mod established_contact;
pub mod event_handler;
pub mod handle;
pub mod identity_derive_and_persist;
pub mod identity_discovery;
pub mod identity_key_preview;
pub mod identity_keys_from_mnemonic;
Expand All @@ -43,6 +45,7 @@ pub mod platform_address_types;
pub mod platform_addresses;
pub mod platform_wallet_info;
mod runtime;
pub mod sign_with_mnemonic_resolver;
pub mod spv;
pub mod types;
pub mod utils;
Expand All @@ -60,11 +63,13 @@ pub use core_wallet_types::*;
pub use dashpay::*;
pub use dashpay_profile::*;
pub use derivation::*;
pub use derive_and_persist_callbacks::*;
pub use dpns::*;
pub use error::*;
pub use established_contact::*;
pub use event_handler::*;
pub use handle::*;
pub use identity_derive_and_persist::*;
pub use identity_discovery::*;
pub use identity_key_preview::*;
pub use identity_keys_from_mnemonic::*;
Expand All @@ -83,6 +88,7 @@ pub use platform_address_sync::*;
pub use platform_address_types::*;
pub use platform_addresses::*;
pub use platform_wallet_info::*;
pub use sign_with_mnemonic_resolver::*;
pub use spv::*;
pub use types::*;
pub use utils::*;
Expand Down
Loading
Loading