Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
155 commits
Select commit Hold shift + click to select a range
aa05391
feat: dashpay
pauldelucia Aug 20, 2025
6db2041
ok
pauldelucia Aug 21, 2025
1eef611
ok
pauldelucia Aug 21, 2025
f5ac1a4
remove doc
pauldelucia Aug 21, 2025
ec65304
ok
pauldelucia Aug 22, 2025
432285a
ok
pauldelucia Aug 22, 2025
3e9ee11
database
pauldelucia Aug 23, 2025
2012520
ok
pauldelucia Aug 23, 2025
fe5586f
fix: use proper BackendTaskSuccessResults rather than Message
pauldelucia Aug 25, 2025
26155a6
fmt and clippy
pauldelucia Aug 25, 2025
25df372
remove dashpay dip file
pauldelucia Sep 1, 2025
05f73f5
logo and cleanup
pauldelucia Sep 1, 2025
7907df5
fix top panel spacing
pauldelucia Sep 1, 2025
fc660b1
ui stuff
pauldelucia Sep 1, 2025
acac400
fmt
pauldelucia Sep 1, 2025
42a858e
dip 14
pauldelucia Sep 2, 2025
1d3060d
image fetching
pauldelucia Sep 2, 2025
48c1df2
some fixes
pauldelucia Sep 3, 2025
be4078b
cleaning up
pauldelucia Sep 4, 2025
5bef691
todos
pauldelucia Sep 18, 2025
bba90a4
feat: SPV phase 1 (#440)
pauldelucia Oct 23, 2025
8723bf9
feat: spv progress bars and sync from genesis when wallets are loaded…
pauldelucia Oct 24, 2025
cc991a6
Merge branch 'v1.0-dev' into feat/dashpay
pauldelucia Oct 24, 2025
32dd45c
fmt
pauldelucia Oct 24, 2025
a5e1188
update
pauldelucia Oct 24, 2025
4999cb1
merge
QuantumExplorer Oct 24, 2025
885a8eb
fixes
QuantumExplorer Oct 24, 2025
7c8bfca
Merge branch 'v1.0-dev' into feat/dashpay
pauldelucia Nov 10, 2025
4e96a59
fix: add sdk features
pauldelucia Nov 10, 2025
75ff018
feat: add accounts and transactions to wallet screen
pauldelucia Nov 10, 2025
7ef5f2b
clippy
pauldelucia Nov 10, 2025
dfa2367
fmt
pauldelucia Nov 10, 2025
8b42344
fix: dashpay database table initialization was hanging on new db (#463)
pauldelucia Nov 10, 2025
091138d
Merge branch 'feat/dashpay' into feat/new-wallet-screen
pauldelucia Nov 11, 2025
1d40104
fix: display stuff
pauldelucia Nov 11, 2025
7370331
add accounts and much progress
pauldelucia Nov 11, 2025
21e8c6f
feat: transaction history in wallet
pauldelucia Nov 12, 2025
862c113
clippy
pauldelucia Nov 12, 2025
4db0aea
ok
pauldelucia Nov 13, 2025
7fb5746
feat: hd wallet
pauldelucia Nov 14, 2025
9bd086d
send tx via wallet and wallet lock/unlock
pauldelucia Nov 14, 2025
2a901a0
update to PeerNetworkManager
pauldelucia Nov 17, 2025
c623e38
ok
pauldelucia Nov 20, 2025
84a463e
ok
pauldelucia Nov 20, 2025
64664c0
ok
pauldelucia Nov 21, 2025
503dc81
fmt
pauldelucia Nov 22, 2025
c26bcd8
clippy
pauldelucia Nov 22, 2025
13ac162
clippy
pauldelucia Nov 22, 2025
031b1ab
feat: clear SPV data button
pauldelucia Nov 22, 2025
68b732d
fix: switch from dash core rpc to spv mode
pauldelucia Nov 22, 2025
7fec58c
feat: switch to DashSpvClientInterface
pauldelucia Nov 27, 2025
71d482f
clean spv button fix
pauldelucia Nov 27, 2025
4b598a7
feat: send from wallet screen
pauldelucia Nov 28, 2025
dd6fb44
feat: platform addresses
pauldelucia Dec 2, 2025
ee132bf
feat: platform address transitions
pauldelucia Dec 3, 2025
022b0c0
feat: platform address transitions
pauldelucia Dec 3, 2025
24006cb
feat: move dashpay screen to top level
pauldelucia Dec 5, 2025
40e9530
platform addresses sdk
pauldelucia Dec 9, 2025
f749fbe
remove async context provider fn
pauldelucia Dec 9, 2025
eddf01c
lock
pauldelucia Dec 11, 2025
d32c4ee
update for new sdk with addresses and handle sdk result data
pauldelucia Dec 12, 2025
bc44b9a
chore: update grovestark dependency
pauldelucia Dec 12, 2025
91a5791
chore: update dash-sdk rev
pauldelucia Dec 12, 2025
85b1afa
fmt
pauldelucia Dec 12, 2025
e21e424
remove elliptic curves patch
pauldelucia Dec 12, 2025
f8637ed
clippy
pauldelucia Dec 12, 2025
ec18907
feat: use BackendTaskSuccessResult variants instead of Message(String)
pauldelucia Dec 12, 2025
2646183
fmt
pauldelucia Dec 12, 2025
79665df
clippy
pauldelucia Dec 12, 2025
64078a4
update DIP18 implementation, fixes and some features around wallets a…
pauldelucia Dec 15, 2025
035a787
fix
pauldelucia Dec 15, 2025
819570b
wallet unlock on wallet screen
pauldelucia Dec 15, 2025
ecfca28
info popup component
pauldelucia Dec 15, 2025
09d7c7f
small fixes
pauldelucia Dec 15, 2025
35e5dd5
wallet unlock component
pauldelucia Dec 15, 2025
887b4a9
fix startup panic
pauldelucia Dec 16, 2025
f3f279b
welcome screen and dashpay stuff
pauldelucia Dec 16, 2025
3f5aa3d
cargo fix
pauldelucia Dec 16, 2025
016efcc
cargo fmt
pauldelucia Dec 16, 2025
0354940
chore: update deps to use most recent dash-sdk
lklimek Dec 16, 2025
59ba10f
simplify welcome screen and move spv storage clear to advanced settings
pauldelucia Dec 17, 2025
027e6d2
default connect to peers via SPV DNS seeds
pauldelucia Dec 17, 2025
f053f4b
fix: exit app without waiting
pauldelucia Dec 17, 2025
f8fcc59
fix error message and reverse quorum hash on lookup
pauldelucia Dec 17, 2025
f7260d8
fmt
pauldelucia Dec 17, 2025
dc8dcbd
settings to turn off spv auto sync
pauldelucia Dec 17, 2025
1525c47
clippy
pauldelucia Dec 17, 2025
4cbf212
work on getting started flow
pauldelucia Dec 17, 2025
366f449
AddressProvider stuff
pauldelucia Dec 22, 2025
0c24186
address sync stuff
pauldelucia Dec 22, 2025
2ab35d9
many fixes all in one
pauldelucia Dec 22, 2025
e45873a
fix
pauldelucia Dec 22, 2025
814a555
many fixes
pauldelucia Dec 23, 2025
8ecc051
fixes
pauldelucia Dec 23, 2025
3b4809c
amount input stuff
pauldelucia Dec 26, 2025
c69c7b6
alignment in identity create screen for adding keys
pauldelucia Dec 26, 2025
e7f50a2
more fixes
pauldelucia Dec 26, 2025
a0d90b1
many improvements
pauldelucia Dec 29, 2025
e95de77
simple token creator, word count selection for wallet seed phrases, more
pauldelucia Dec 30, 2025
5833039
fix: platform address info storage
pauldelucia Jan 7, 2026
75610d2
feat: generate platform addresses and address sync post-checkpoint
pauldelucia Jan 8, 2026
52b8f98
many things
pauldelucia Jan 8, 2026
de8231f
fix: cannot create identity from address
lklimek Jan 8, 2026
6de1b78
Merge remote-tracking branch 'origin/feat/hd-wallet' into fix/identit…
lklimek Jan 8, 2026
b93bb6d
chore: update to recent changes in platform
shumkov Jan 9, 2026
f8f4792
docs: added few lines about .env file
shumkov Jan 9, 2026
54f0990
fix: banned addresses and failure during address sync
shumkov Jan 9, 2026
690127c
fix: updates for new platform and fee estimation
pauldelucia Jan 9, 2026
4068739
fix: only take PA credits after checkpoint
pauldelucia Jan 9, 2026
c9acdcc
feat: fee estimation and display
pauldelucia Jan 9, 2026
e4c024b
feat: fee estimation follow-up
pauldelucia Jan 9, 2026
dadf295
chore: fix build
lklimek Jan 9, 2026
e58d2a7
chore: correct platform revision
lklimek Jan 9, 2026
4bc1270
Merge remote-tracking branch 'origin/feat/hd-wallet' into fix/identit…
lklimek Jan 9, 2026
3963964
refactor: don't query for nonce when creating identity
lklimek Jan 9, 2026
c730943
more on fee displays
pauldelucia Jan 12, 2026
1acc50c
fix: proof logs in data contract create
pauldelucia Jan 12, 2026
f34f025
fix: white on white text for fee estimation display
pauldelucia Jan 12, 2026
7d9ab05
fix: always start as closed for advanced settings dropdown in setting…
pauldelucia Jan 12, 2026
43166da
fix: hard to see data contracts in the register contract screen
pauldelucia Jan 12, 2026
edcc03e
fix: document create screen scroll
pauldelucia Jan 12, 2026
2593513
fix: fee estimations accuracy
pauldelucia Jan 12, 2026
925bedc
Merge branch 'v1.0-dev' into feat/hd-wallet
pauldelucia Jan 12, 2026
7858507
fmt
pauldelucia Jan 12, 2026
034c71e
clippy auto fixes
pauldelucia Jan 12, 2026
b406f74
clippy manual fixes and pin dash-sdk dep
pauldelucia Jan 12, 2026
6ab6e8f
fix failing tests
pauldelucia Jan 12, 2026
2238fa3
fmt
pauldelucia Jan 12, 2026
149f603
fix: update rust toolchain to 1.92
pauldelucia Jan 12, 2026
f360966
refactor: hide SPV behind dev mode
pauldelucia Jan 12, 2026
18a2346
feat: warning about SPV being experimental
pauldelucia Jan 12, 2026
be4eb94
fix: platform nonces not updated in sync
lklimek Jan 12, 2026
2dc0d4a
chore: cargo fmt
lklimek Jan 12, 2026
2145f18
deps: update platform repo
lklimek Jan 12, 2026
16897fb
Merge remote-tracking branch 'origin/feat/hd-wallet' into fix/identit…
lklimek Jan 12, 2026
c18783b
chore: clippy and rabbit
lklimek Jan 12, 2026
4137dec
chore: rabbit review
lklimek Jan 12, 2026
0535e55
chore: enforce address networ with require_network()
lklimek Jan 12, 2026
866aa54
cleanup based on claude review
pauldelucia Jan 13, 2026
5fc7757
fmt
pauldelucia Jan 13, 2026
0c11125
cleanup based on another claude review
pauldelucia Jan 13, 2026
991f438
fix: kittest failing
pauldelucia Jan 13, 2026
3e5488f
fix: remove fee result display in success screens and clean up dashpa…
pauldelucia Jan 15, 2026
0e39de6
dashpay fixes and platform address fixes
pauldelucia Jan 16, 2026
c7fb888
deps: update platform repo
lklimek Jan 16, 2026
d2b9433
Merge remote-tracking branch 'origin/feat/hd-wallet' into fix/identit…
lklimek Jan 16, 2026
b381450
chore: fixes after merge
lklimek Jan 16, 2026
fd22961
refactor: move some AppContext functions to backend_task module
pauldelucia Jan 19, 2026
047a86e
clippy
pauldelucia Jan 19, 2026
c04c60e
clippy
pauldelucia Jan 19, 2026
1208e55
fix: refresh mode alignment in wallet screen and fmt
pauldelucia Jan 19, 2026
e2523da
Merge remote-tracking branch 'origin/feat/hd-wallet' into fix/identit…
lklimek Jan 19, 2026
233e1b2
chore: fmt
lklimek Jan 19, 2026
08fcc79
Merge branch 'v1.0-dev' into fix/identity-from-address
pauldelucia Jan 20, 2026
dfc6635
fmt
pauldelucia Jan 20, 2026
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
88 changes: 44 additions & 44 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ qrcode = "0.14.1"
nix = { version = "0.30.1", features = ["signal"] }
eframe = { version = "0.32.0", features = ["persistence"] }
base64 = "0.22.1"
dash-sdk = { git = "https://github.com/dashpay/platform.git", rev = "eace6d1c4563c3d9d58e6a12f4d5ed8bdd53d167", features = [
dash-sdk = { git = "https://github.com/dashpay/platform", rev = "a3d135c0e4baa5e6690cea99d1c79e2e5ad50e17", features = [
"core_key_wallet",
"core_key_wallet_manager",
"core_bincode",
Expand Down
80 changes: 64 additions & 16 deletions src/backend_task/identity/register_identity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,22 @@ use crate::context::AppContext;
use crate::model::fee_estimation::PlatformFeeEstimator;
use crate::model::proof_log_item::{ProofLogItem, RequestType};
use crate::model::qualified_identity::{IdentityStatus, IdentityType, QualifiedIdentity};
use dash_sdk::dash_spv::Network;
use dash_sdk::dashcore_rpc::RpcApi;
use dash_sdk::dpp::ProtocolError;
use dash_sdk::dpp::address_funds::PlatformAddress;
use dash_sdk::dpp::block::extended_epoch_info::ExtendedEpochInfo;
use dash_sdk::dpp::dashcore::hashes::Hash;
use dash_sdk::dpp::dashcore::{OutPoint, PrivateKey};
use dash_sdk::dpp::fee::Credits;
use dash_sdk::dpp::identity::state_transition::asset_lock_proof::chain::ChainAssetLockProof;
use dash_sdk::dpp::native_bls::NativeBlsModule;
use dash_sdk::dpp::prelude::AssetLockProof;
use dash_sdk::dpp::prelude::{AddressNonce, AssetLockProof};
use dash_sdk::dpp::state_transition::identity_create_transition::IdentityCreateTransition;
use dash_sdk::dpp::state_transition::identity_create_transition::methods::IdentityCreateTransitionMethodsV0;
use dash_sdk::platform::transition::put_identity::PutIdentity;
use dash_sdk::platform::{Fetch, Identity};
use dash_sdk::query_types::AddressInfo;
use dash_sdk::{Error, Sdk};
use std::collections::BTreeMap;
use std::time::Duration;
Expand Down Expand Up @@ -223,14 +227,25 @@ impl AppContext {
inputs,
wallet_seed_hash,
} => {
// This is a separate flow - we call a dedicated function for Platform address funding
// inputs with nonces, incremented by 1 from current nonce
let inputs_with_nonces = inputs
.into_iter()
.map(|(addr, credits)| {
self.get_platform_address_best_info(&addr, self.network)
.map(|info| (addr, (info.nonce.saturating_add(1), credits)))
})
.collect::<Option<BTreeMap<PlatformAddress, (AddressNonce, Credits)>>>()
.ok_or(String::from(
"Each input platform address must be present in at least one wallet",
))?;

return self
.register_identity_from_platform_addresses(
alias_input,
keys,
wallet,
wallet_identity_index,
inputs,
inputs_with_nonces,
wallet_seed_hash,
)
.await;
Expand Down Expand Up @@ -674,7 +689,10 @@ impl AppContext {
}
}

/// Register a new identity funded by Platform addresses
/// Register a new identity funded by Platform addresses.
///
/// `inputs` is a map of Platform addresses to (nonce, credits) tuples. Nonces must be incremented by 1
/// from the current nonce of the address.
async fn register_identity_from_platform_addresses(
&self,
alias_input: String,
Expand All @@ -683,7 +701,7 @@ impl AppContext {
wallet_identity_index: u32,
inputs: BTreeMap<
dash_sdk::dpp::address_funds::PlatformAddress,
dash_sdk::dpp::fee::Credits,
(AddressNonce, dash_sdk::dpp::fee::Credits),
>,
wallet_seed_hash: super::WalletSeedHash,
) -> Result<BackendTaskSuccessResult, String> {
Expand All @@ -708,17 +726,12 @@ impl AppContext {
// Clone the wallet for use as the address signer (needed across async boundary)
let wallet_clone = { wallet.read().map_err(|e| e.to_string())?.clone() };

// For Platform address funding, we need to compute the identity ID from the inputs
// The SDK will handle this internally when creating the identity
// We create a temporary identity with a placeholder ID, which will be computed correctly
// during the state transition creation

// Create a temporary identity ID - will be replaced by the actual one from Platform
let temp_identity_id = dash_sdk::platform::Identifier::random();

let identity =
Identity::new_with_id_and_keys(temp_identity_id, public_keys.clone(), sdk.version())
.map_err(|e| format!("Failed to create identity: {}", e))?;
let identity = Identity::new_with_input_addresses_and_keys(
&inputs,
public_keys.clone(),
sdk.version(),
)
.map_err(|e| format!("Failed to create identity: {}", e))?;

let wallet_seed_hash_actual = { wallet.read().unwrap().seed_hash() };
let mut qualified_identity = QualifiedIdentity {
Expand Down Expand Up @@ -825,4 +838,39 @@ impl AppContext {
}
}
}

/// Get the best (most recent nonce) AddressInfo from all wallets for the given [PlatformAddress] in current [Self::network].
///
/// Returns `None`` if no info is found.
fn get_platform_address_best_info(
&self,
platform_address: &PlatformAddress,
network: Network,
) -> Option<AddressInfo> {
let generic_address = platform_address.to_address_with_network(network);
let wallets = self
.wallets
.read()
.inspect_err(|e| tracing::error!(err=%e, "wallet lock poisoned"))
.ok()?;

let mut recent_info: Option<AddressInfo> = None;
for wallet in wallets.values() {
let wallet_guard = wallet.read().ok()?;

if let Some(new_info) = wallet_guard.get_platform_address_info(&generic_address)
&& recent_info
.as_ref()
.is_none_or(|recent| new_info.nonce > recent.nonce)
{
recent_info = Some(AddressInfo {
address: *platform_address,
balance: new_info.balance,
nonce: new_info.nonce,
});
}
}

recent_info
}
}
Loading
Loading