Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
4891bd4
docs(dashpay): DIP-13 invitations spec (reviewed + synced)
shumkov Jul 8, 2026
1d8b490
feat(platform-wallet): DIP-13 invitation link codec
shumkov Jul 8, 2026
c60b3e3
feat(platform-wallet): path-gated invitation voucher-key export
shumkov Jul 8, 2026
9e40ee8
feat(platform-wallet): invitation create + claim flows
shumkov Jul 8, 2026
5039946
fix(platform-wallet): fold invitation Rust-core review findings
shumkov Jul 8, 2026
6a730a9
test(qa): add DIP-13 invitation scenarios to the example-app QA contract
shumkov Jul 8, 2026
f59edf6
feat(platform-wallet): invitation create + claim FFI
shumkov Jul 8, 2026
55c9537
fix(platform-wallet): scrub the exported voucher scalar in create_inv…
shumkov Jul 8, 2026
4d39bdc
feat(swift-sdk): createInvitation / claimInvitation wrappers on Manag…
shumkov Jul 8, 2026
2b2a871
feat(platform-wallet): persist inviter-side invitation records (Rust …
shumkov Jul 8, 2026
8fd0613
feat(swift-sdk): add DashPay create-invitation UI (DIP-13)
shumkov Jul 8, 2026
bd60102
feat(platform-wallet-ffi): add parse-invitation preview FFI + Swift w…
shumkov Jul 8, 2026
5967661
feat(swift-sdk): add DashPay claim-invitation flow (DIP-13)
shumkov Jul 8, 2026
4e0dfbe
feat(swift-sdk): handle dashpay:// invitation deep links
shumkov Jul 8, 2026
01cd566
test(platform-wallet-storage): allow-list invitations.rs read-only re…
shumkov Jul 8, 2026
a50a806
fix(swift-sdk): present invitation claim sheet on cold-launch deep link
shumkov Jul 8, 2026
0b51001
fix(rs-sdk-ffi): enforce fully-hardened invitation export path
shumkov Jul 8, 2026
2d568b7
fix(platform-wallet): fold invitation review findings
shumkov Jul 8, 2026
c2ddfcf
docs(dip15): sync spec §4.1/§6 with as-built code + note scheme limit…
shumkov Jul 8, 2026
a001d26
fix(swift-sdk): re-present invitation claim sheet on a second deep link
shumkov Jul 8, 2026
10fbc57
fix(platform-wallet): persist asset-lock account used-index across re…
shumkov Jul 10, 2026
74675fc
test(platform-wallet): pin asset-lock funding-index persistence
shumkov Jul 10, 2026
55937e1
fix(platform-wallet): gate invitation broadcast on funding-index persist
shumkov Jul 10, 2026
096e52d
feat(platform-wallet-ffi): topup-from-existing-asset-lock FFI (invita…
shumkov Jul 10, 2026
ce6a04d
feat(platform-wallet-ffi): invitation persistence callback (Sent-invi…
shumkov Jul 10, 2026
4e49286
test(platform-wallet-ffi): pin InvitationEntryFFI ABI size (layout gu…
shumkov Jul 10, 2026
9a6188c
docs(dip15): reviewed Sent-invitations persistence + reclaim spec
shumkov Jul 10, 2026
c1f0c45
feat(swift-sdk): Sent-invitations SwiftData bridge + list (DIP-13)
shumkov Jul 10, 2026
0b12d2d
fix(rs-sdk-ffi): revert over-strict hardened invitation export gate
shumkov Jul 10, 2026
3f498ba
fix(platform-wallet): persist invitation record for non-hardened fund…
shumkov Jul 10, 2026
7b371fe
fix(SwiftExampleApp): add PersistentInvitation to Storage Explorer views
shumkov Jul 10, 2026
4e3a9b0
style(platform-wallet-ffi): sort invitation_persistence re-export
shumkov Jul 10, 2026
30ab23f
Merge branch 'v4.1-dev' into feat/dip15-dashpay-invitations
shumkov Jul 10, 2026
d7ebdaa
feat(swift-sdk): reclaim an unclaimed DashPay invitation as credits
shumkov Jul 10, 2026
3029ffe
feat(platform-wallet): enforce a minimum invitation amount
shumkov Jul 10, 2026
261e2f2
fix(swift-sdk): raise invitation default above the claimable floor
shumkov Jul 10, 2026
d14c02e
fix(swift-sdk): narrow already-consumed classifier to canonical Displ…
shumkov Jul 10, 2026
139a478
fix(swift-sdk): disable Cancel during an in-flight invitation reclaim
shumkov Jul 10, 2026
250976a
docs(swift-example-app): add QA004 invitation-reclaim AI-QA playbook
shumkov Jul 10, 2026
fb31b53
fix(swift-example-app): make the reclaim classifier nonisolated
shumkov Jul 11, 2026
a0161d0
refactor(swift-example-app): move Create invitation to the Sent Invit…
shumkov Jul 11, 2026
d8ab2f8
docs(swift-example-app): point QA004 + DP-12 at the new Create-invita…
shumkov Jul 11, 2026
cc19969
docs(dip15): address review nits — fence language + stale reclaim-sco…
shumkov Jul 12, 2026
539d721
fix(swift-example-app): distinguish self-reclaim from foreign claim o…
shumkov Jul 12, 2026
2b47bd5
fix(swift-sdk): log invitation persistence fetch failures instead of …
shumkov Jul 12, 2026
101f941
docs(dip13): reviewed legacy-compat invitation spec (v2)
shumkov Jul 13, 2026
4af1427
feat(platform-wallet): size the invitation cap for onboarding (identi…
shumkov Jul 13, 2026
ccc4801
feat(rs-sdk): add Sdk::get_transaction to fetch + decode a Core tx by id
shumkov Jul 13, 2026
31b6ca3
feat(platform-wallet): legacy-compatible invitation codec + claim-by-…
shumkov Jul 13, 2026
48bbdb6
feat(platform-wallet-ffi): adapt invitation FFI to the legacy codec
shumkov Jul 13, 2026
a26136b
docs(dip13): record legacy-format consequences (inviter-id/expiry off…
shumkov Jul 13, 2026
e1cdbd4
feat(swift-example-app): wire invitation UI to the legacy-compat codec
shumkov Jul 13, 2026
b723662
fix(rs-sdk): get_transaction returns Option; classify not-found vs tr…
shumkov Jul 13, 2026
83f0ee6
fix(platform-wallet): harden invitation codec per adversarial review
shumkov Jul 13, 2026
f7af58d
Merge remote-tracking branch 'origin/v4.1-dev' into feat/dip15-dashpa…
shumkov Jul 13, 2026
57f2a98
style: rustfmt the changeset re-export merge resolution
shumkov Jul 13, 2026
b7d79f7
fix(platform-wallet): record invitation before fallible steps; propag…
shumkov Jul 13, 2026
e51c38f
fix(swift-sdk): persistence callbacks signal failure (invitations; sc…
shumkov Jul 13, 2026
bbc0d27
fix(swift-example-app): keep reclaim UI without an identity; safer re…
shumkov Jul 13, 2026
82532db
docs(dip15): invitation review-fix spec; universal-link note; persist…
shumkov Jul 13, 2026
f0423e0
fix(platform-wallet): record chainlock voucher; retry claim fetch; te…
shumkov Jul 14, 2026
b613d92
fix(swift-example-app): reclaim all wallets' invitations; recover cra…
shumkov Jul 14, 2026
6009566
docs(dip15): update invitation QA/test-plan for the legacy codec + re…
shumkov Jul 14, 2026
2377cf3
Merge remote-tracking branch 'origin/v4.1-dev' into feat/dip15-dashpa…
shumkov Jul 14, 2026
08bf78c
fix(platform-wallet): durable invitation persistence gate; record inv…
shumkov Jul 14, 2026
81b0b72
fix(swift-example-app): scope invitation list to loaded wallets; requ…
shumkov Jul 14, 2026
e67ecfe
docs(dip15): round-3 review-fix spec; QA004/TEST_PLAN accuracy for th…
shumkov Jul 14, 2026
204634c
fix(swift-example-app): re-inject walletManager into the toolbar-push…
shumkov Jul 14, 2026
81a09d8
docs(dip15): record the as-built deltas in the invitations spec
shumkov Jul 14, 2026
ac6adbf
docs(dip15): consolidate the four invitation specs into one canonical…
shumkov Jul 14, 2026
61f066b
refactor(rs-sdk-ffi): source export-gate path constants from key_wall…
shumkov Jul 14, 2026
9913db9
fix(platform-wallet,swift-example-app): round-4 review — retry-loop s…
shumkov Jul 14, 2026
0a0b3e9
build: bump rust-dashcore to ac8828c9; use the new dip9 DIP-15 constants
shumkov Jul 14, 2026
f1af0c9
fix(platform-wallet): round-5 review — fail-closed durability; non-br…
shumkov Jul 14, 2026
ee74cfd
Merge remote-tracking branch 'origin/v4.1-dev' into feat/dip15-dashpa…
shumkov Jul 14, 2026
17578a4
fix(platform-wallet,swift-example-app): round-6 review — serialize fu…
shumkov Jul 14, 2026
ff67585
fix(platform-wallet,swift-example-app): round-7 review — voucher resu…
QuantumExplorer Jul 14, 2026
7c64b1d
fix(swift-sdk): update invitation persistence test for the keyType sn…
shumkov Jul 14, 2026
b3cfa46
Merge remote-tracking branch 'origin/v4.1-dev' into feat/dip15-dashpa…
QuantumExplorer Jul 14, 2026
e1b7449
Merge remote-tracking branch 'origin/feat/dip15-dashpay-invitations' …
QuantumExplorer Jul 14, 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
834 changes: 834 additions & 0 deletions docs/dashpay/DIP15_INVITATIONS_SPEC.md

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions packages/rs-platform-wallet-ffi/src/dashpay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -675,6 +675,20 @@ impl platform_wallet::ContactCryptoProvider for ResolverContactCryptoProvider {
.map_err(|e| platform_wallet::PlatformWalletError::InvalidIdentityData(e.to_string()))
}

async fn export_invitation_private_key(
&self,
path: &key_wallet::bip32::DerivationPath,
) -> Result<dashcore::secp256k1::SecretKey, platform_wallet::PlatformWalletError> {
let scalar = self
.signer
.export_invitation_private_key(path)
.map_err(|e| {
platform_wallet::PlatformWalletError::InvalidIdentityData(e.to_string())
})?;
dashcore::secp256k1::SecretKey::from_slice(scalar.as_ref())
.map_err(|e| platform_wallet::PlatformWalletError::InvalidIdentityData(e.to_string()))
}

async fn account_reference(
&self,
path: &key_wallet::bip32::DerivationPath,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,13 @@ pub unsafe extern "C" fn platform_wallet_register_identity_with_funding_signer(
/// wallet-balance path — the resume logic and IS→CL fallback live
/// there, not here. This FFI is a thin marshaler.
///
/// `consume_invitation_voucher` is the explicit authorization to consume an
/// `IdentityInvitation`-typed lock (a DashPay bearer voucher whose key is
/// shared in the invitation link). Pass `false` for every generic resume
/// surface — the resolver then refuses invitation locks, so a shared voucher
/// can never be silently consumed into an unrelated local identity. Only the
/// invitation reclaim flow passes `true`.
///
/// # Safety
/// - `out_point` must be a valid, non-null pointer to an
/// `OutPointFFI` (32-byte raw txid + u32 vout). The caller retains
Expand All @@ -168,6 +175,7 @@ pub unsafe extern "C" fn platform_wallet_resume_identity_with_existing_asset_loc
identity_pubkeys_count: usize,
signer_handle: *mut SignerHandle,
core_signer_handle: *mut MnemonicResolverHandle,
consume_invitation_voucher: bool,
out_identity_id: *mut [u8; 32],
out_identity_handle: *mut Handle,
Comment on lines 175 to 180

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Blocking: Voucher authorization changes existing C ABI symbols in place

The PR inserts consume_invitation_voucher: bool before the output parameters of two existing #[no_mangle] functions without changing their exported names. The resume symbol had the old signature at the PR merge base, and the top-up symbol had it at updated-target commit 97477d1c88. A caller compiled against either old header passes an output pointer where Rust now expects a bool, shifts the remaining output pointers, and can trigger invalid-bool undefined behavior and writes through unspecified addresses. The in-tree Swift rebuild does not preserve the public C ABI. Keep the existing symbols as default-deny compatibility shims and add new authorized or versioned entry points for invitation reclaim. The public AssetLockFunding::FromExistingAssetLock variant also gained a required field and should receive a source-compatible authorization path.

source: ['codex']

) -> PlatformWalletFFIResult {
Expand Down Expand Up @@ -223,6 +231,7 @@ pub unsafe extern "C" fn platform_wallet_resume_identity_with_existing_asset_loc
.register_identity_with_funding(
AssetLockFunding::FromExistingAssetLock {
out_point: resume_outpoint,
consume_invitation_voucher,
},
identity_index,
keys_map,
Expand Down Expand Up @@ -253,13 +262,21 @@ pub unsafe extern "C" fn platform_wallet_resume_identity_with_existing_asset_loc
/// completing the top-up against `identity_id` from the stored outpoint.
/// Sister to
/// [`platform_wallet_resume_identity_with_existing_asset_lock_signer`],
/// which resumes the lock as a NEW-identity registration instead.
/// which resumes the lock as a NEW-identity registration instead. Also the
/// DashPay invitation "reclaim into an existing identity" path (see
/// `consume_invitation_voucher` below).
///
/// The `FromExistingAssetLock` resume + IS→CL fallback logic lives in
/// `top_up_identity_with_funding`; this FFI is a thin marshaler. No
/// per-identity-key signer is needed (a top-up creates no keys); only the
/// Core-side asset-lock signature, produced by the wallet's own resolver.
///
/// `consume_invitation_voucher` is the explicit authorization to consume an
/// `IdentityInvitation`-typed lock (a DashPay bearer voucher whose key is
/// shared in the invitation link) — the invitation reclaim flow passes
/// `true`; every generic top-up/crash-recovery surface must pass `false`
/// and is refused invitation locks by the funding resolver.
///
/// # Safety
/// - `out_point` must be a valid, non-null `*const OutPointFFI`; the caller
/// retains ownership.
Expand All @@ -273,6 +290,7 @@ pub unsafe extern "C" fn platform_wallet_topup_identity_with_existing_asset_lock
out_point: *const OutPointFFI,
identity_id: *const [u8; 32],
core_signer_handle: *mut MnemonicResolverHandle,
consume_invitation_voucher: bool,
out_new_balance: *mut u64,
) -> PlatformWalletFFIResult {
check_ptr!(out_point);
Expand Down Expand Up @@ -310,6 +328,7 @@ pub unsafe extern "C" fn platform_wallet_topup_identity_with_existing_asset_lock
&identity_id,
AssetLockFunding::FromExistingAssetLock {
out_point: reclaim_outpoint,
consume_invitation_voucher,
},
&asset_lock_signer,
None,
Expand Down Expand Up @@ -351,6 +370,7 @@ mod topup_existing_lock_guard_tests {
std::ptr::null(),
&id,
dangling_core_signer(),
false,
&mut balance,
)
};
Expand All @@ -367,6 +387,7 @@ mod topup_existing_lock_guard_tests {
&op,
std::ptr::null(),
dangling_core_signer(),
false,
&mut balance,
)
};
Expand All @@ -384,6 +405,7 @@ mod topup_existing_lock_guard_tests {
&op,
&id,
std::ptr::null_mut(),
false,
&mut balance,
)
};
Expand All @@ -400,6 +422,7 @@ mod topup_existing_lock_guard_tests {
&op,
&id,
dangling_core_signer(),
false,
std::ptr::null_mut(),
)
};
Expand Down
Loading
Loading