Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
134 commits
Select commit Hold shift + click to select a range
93120ee
feat(dashpay): sign in to an app with one DashConnect QR from protoco…
jeanpierreroma Oct 8, 2026
9552f6a
feat(dashpay): disable the app's key when a one-QR connection is turn…
jeanpierreroma Oct 10, 2026
18d0a04
fix(dashpay): keep every one-QR session key revocable
jeanpierreroma Oct 10, 2026
c80f5a0
fix(dashpay): match grant records by key and fail closed on a stale i…
jeanpierreroma Oct 10, 2026
cc1a970
fix(dashpay): decide one-QR key and response state from Platform
jeanpierreroma Oct 12, 2026
09a28c5
fix(dashpay): disconnect also disables one-QR keys the wallet has no …
jeanpierreroma Oct 12, 2026
a31dd3a
feat(dashpay): decode App Connect request v2 and seal its response
jeanpierreroma Oct 12, 2026
7a414c8
fix(dashpay): take an App Connect callback only with a plain lowercas…
jeanpierreroma Oct 13, 2026
7ec86f2
fix(dashpay): keep a stored App Connect value that is not a row list
jeanpierreroma Oct 13, 2026
9c8b4a3
Merge branch 'feat/dashconnect-v2' into feat/app-connect-request-v2
jeanpierreroma Oct 13, 2026
d24e54a
fix(dashpay): show what a one-QR sign-in gives the app and bind the a…
jeanpierreroma Oct 13, 2026
430b3c0
fix(dashpay): model an unresolved sign-in as its own state and keep t…
jeanpierreroma Oct 13, 2026
fdc5d4c
fix(dashpay): turning off a one-QR connection also disables the app's…
jeanpierreroma Oct 13, 2026
d61a1df
fix(dashpay): a one-QR disconnect reaches the two-QR keys with no ses…
jeanpierreroma Oct 13, 2026
aa8488d
fix(dashpay): a one-QR disconnect looks for the app's keys on the wal…
jeanpierreroma Oct 13, 2026
957ea94
fix(dashpay): say when an app's key on another identity keeps the con…
jeanpierreroma Oct 13, 2026
c5fdbd3
fix(dashpay): keep DashConnect rows and grant records with the wallet…
jeanpierreroma Oct 13, 2026
1633ae0
fix(dashpay): a DashConnect disconnect acts only on the wallet its ro…
jeanpierreroma Oct 13, 2026
aceff2f
Merge branch 'feat/dashconnect-v2' into feat/app-connect-request-v2
jeanpierreroma Oct 13, 2026
8bfc35b
fix(dashpay): one DashConnect approval, key registration or disconnec…
jeanpierreroma Oct 13, 2026
463f58a
Merge branch 'feat/dashconnect-v2' into feat/app-connect-request-v2
jeanpierreroma Oct 13, 2026
57b3346
fix(dashpay): bind DashConnect operations to the network scope too, a…
jeanpierreroma Oct 13, 2026
6bb852f
feat(dashpay): add the App Connect request v2 grant rules
PastaPastaPasta Oct 13, 2026
f7ca95a
refactor(dashpay): publish an App Connect response through one helper
PastaPastaPasta Oct 13, 2026
5b207d3
feat(dashpay): answer App Connect request v2 in the login flow
PastaPastaPasta Oct 13, 2026
8290134
feat(dashpay): show a v2 sign-in's keys and return to the app
PastaPastaPasta Oct 13, 2026
e044442
fix(dashpay): never send again a key recorded for another app connect…
PastaPastaPasta Oct 13, 2026
c1d6001
fix(dashpay): approve a DashConnect sign-in only for the wallet and n…
jeanpierreroma Oct 13, 2026
c89def3
fix(dashpay): a devnet pointed at other nodes is another scope for a …
jeanpierreroma Oct 13, 2026
41187c9
fix(dashpay): record a one-QR session key before its registration is …
jeanpierreroma Oct 14, 2026
5868ac1
fix(dashpay): confirm a recovered one-QR key only with its bound and …
jeanpierreroma Oct 14, 2026
b41bc1c
fix(dashpay): free a native result string through a typed C pointer
jeanpierreroma Oct 14, 2026
4a05418
Merge branch 'develop' into feat/dashconnect-v2
jeanpierreroma Oct 15, 2026
06e0d2c
fix(dashpay): activate an app's existing row when its one-QR key is c…
jeanpierreroma Oct 15, 2026
5c2f19d
fix(dashpay): give a confirmed one-QR key its row back if the row was…
jeanpierreroma Oct 15, 2026
d126261
Merge remote-tracking branch 'origin/develop' into feat/dashconnect-v2
jeanpierreroma Oct 16, 2026
3b75374
build: pin the platform SDK to v5.1-dev with platform#4844
jeanpierreroma Oct 16, 2026
b9e5089
fix(dashpay): settle a pending one-QR registration before a disconnec…
jeanpierreroma Oct 16, 2026
96bee7c
fix(dashpay): choose the disconnect from a fresh view, and settle a o…
jeanpierreroma Oct 16, 2026
13c1466
fix(dashpay): open an App Connect callback only for a request opened …
jeanpierreroma Oct 18, 2026
ce53cc7
fix(dashpay): report the user's last answer to an App Connect callback
jeanpierreroma Oct 18, 2026
87a75f1
fix(dashpay): check an App Connect v2 request against the app's website
jeanpierreroma Oct 18, 2026
aaee088
fix(dashpay): send an App Connect v2 key again only as the binding's,…
jeanpierreroma Oct 18, 2026
bf4e32c
fix(dashpay): settle a registration that lands during a disconnect, a…
jeanpierreroma Oct 18, 2026
0f3afaa
Merge branch 'feat/dashconnect-v2' into feat/app-connect-request-v2
jeanpierreroma Oct 18, 2026
05cda52
Merge branch 'feat/app-connect-request-v2' into feat/app-connect-v2-l…
jeanpierreroma Oct 18, 2026
f796a86
fix(dashpay): close the second round of App Connect v2 review blockers
jeanpierreroma Oct 18, 2026
2286399
fix(dashpay): take an App Connect v2 key that settled late only as it…
jeanpierreroma Oct 18, 2026
74b7fed
fix(dashconnect): take the app's current encryption key from Platform
jeanpierreroma Oct 19, 2026
074aa11
fix(dashconnect): send the current encryption key only when both read…
jeanpierreroma Oct 19, 2026
d636c66
fix(dashconnect): follow the contract's current-key rule for the app'…
jeanpierreroma Oct 19, 2026
1bbd2e7
fix(dashconnect): wait for a second read before trusting an answer a …
jeanpierreroma Oct 19, 2026
f6d4446
fix(dashconnect): never take a lagging read of the current keys over …
jeanpierreroma Oct 19, 2026
09d8d6c
fix(dashconnect): confirm every answer about the app's current key on…
jeanpierreroma Oct 19, 2026
6ec3819
fix(dashconnect): wait on a second read beside any other live key of …
jeanpierreroma Oct 19, 2026
29f08ca
fix(dashconnect): treat a disabled key of the app's as proof of a cur…
jeanpierreroma Oct 19, 2026
b62296c
fix(dashconnect): register the app's key behind a confirmed disabled …
jeanpierreroma Oct 19, 2026
1ebc6d5
fix(dashconnect): count disabled keys of the app's beside a live curr…
jeanpierreroma Oct 19, 2026
58ed8d7
fix(dashconnect): weigh a disabled key the store cannot place, and sh…
jeanpierreroma Oct 19, 2026
d2555f7
build: pin the platform SDK to v5.1-dev with platform#5491
jeanpierreroma Oct 24, 2026
7851606
feat(dashpay): accept App Connect requests on dashpay://connect
PastaPastaPasta Oct 28, 2026
790df15
fix(dashpay): bound the work dashpayHost does before the size limit
PastaPastaPasta Oct 28, 2026
1571e2b
build: pin platform to 03945d3a for the encryption rotation level
PastaPastaPasta Oct 29, 2026
41b4f17
feat(dashpay): select App Connect encryption keys by the DIP rotation…
PastaPastaPasta Oct 29, 2026
ecca052
feat(dashpay): leave unattributed DashPay profile keys on a disconnec…
romchornyi Oct 30, 2026
2b13a81
fix(dashpay): pin the shared profile revoke to its identity and refus…
romchornyi Oct 30, 2026
16c9bc5
fix(dashpay): keep an expired key from blocking the shared profile re…
romchornyi Oct 30, 2026
0c5c2d6
fix(dashpay): revoke shared profile access only on the identity that …
romchornyi Oct 30, 2026
9d9cb47
fix(dashpay): clearer shared profile copy, card styling and an honest…
romchornyi Oct 30, 2026
db0f58c
test(dashpay): cover the shared profile revoke's wallet pin and an un…
romchornyi Oct 30, 2026
1ddb5d0
fix(wallet): pin testnet to Platform protocol 14 on this stack
romchornyi Oct 30, 2026
6c95187
fix(wallet): pin testnet to Platform protocol 14 on this stack
romchornyi Oct 30, 2026
2db6c0d
Merge remote-tracking branch 'origin/feat/app-connect-encryption-rota…
romchornyi Oct 30, 2026
c716e4d
docs(dashpay): say testnet gets the App Connect login now that it is …
PastaPastaPasta Oct 30, 2026
fa9270f
Merge remote-tracking branch 'origin/feat/app-connect-encryption-rota…
romchornyi Oct 30, 2026
95f097f
fix(dashconnect): fail closed on unknown shared profile counts and le…
romchornyi Oct 30, 2026
a2c04e3
fix(dashconnect): show the shared profile row in the connections card
romchornyi Oct 30, 2026
1eff885
fix(dashconnect): pin a shared profile revoke to what was shown and f…
romchornyi Oct 30, 2026
8587971
fix(dashconnect): judge a vanished shared profile access by the ident…
romchornyi Oct 30, 2026
eb52302
fix(dashconnect): compare App Connect key expiries as unsigned timest…
romchornyi Oct 30, 2026
78ceedd
feat(dashconnect): a disconnect turns off unattributed DashPay profil…
romchornyi Oct 31, 2026
7686069
fix(dashconnect): the app's revoke is never blocked by the profile ke…
romchornyi Oct 31, 2026
3415560
refactor(dashconnect): derive App Connect rows from the identity and …
romchornyi Nov 3, 2026
ded1f51
refactor(dashconnect): remove the two-QR login and close review findings
romchornyi Nov 3, 2026
9e87349
fix(dashconnect): keep live keys of a conflicting intent actionable a…
romchornyi Nov 3, 2026
8e8aa7e
fix(dashconnect): bind retries to their connection and recheck keys b…
romchornyi Nov 3, 2026
ab339f2
fix(dashconnect): publish a response only while its keys are current …
romchornyi Nov 3, 2026
5c4f4db
fix(dashconnect): read the app's current encryption key one way
romchornyi Nov 3, 2026
4f16611
refactor(dashconnect): answer a request at most once; show undelivere…
romchornyi Nov 3, 2026
e536c44
fix(dashconnect): check the read that showed the update before publis…
romchornyi Nov 3, 2026
dbffc36
fix(dashconnect): keep a scan button and access seen on other identities
romchornyi Nov 3, 2026
3c9445e
fix(dashconnect): tell an answered request by its whole body
romchornyi Nov 3, 2026
917a4a0
fix(dashconnect): refuse every repeat approval of a request
romchornyi Nov 3, 2026
7422ef0
Merge branch 'develop' into feat/app-connect-v2-login
romchornyi Nov 6, 2026
d8ba460
fix(dashpay): derive an App Connect encryption key at DIP-13 rotation 0
romchornyi Nov 6, 2026
de4b125
fix(dashpay): refuse an App Connect request v2 for mainnet in the parser
romchornyi Nov 6, 2026
5b3505f
docs: record ADR-0009 for answering App Connect request v2
romchornyi Nov 6, 2026
d6289ee
fix(dashconnect): key the sheet's permission rows by position
romchornyi Nov 6, 2026
62dc24a
fix(dashconnect): bound the dash-key query before it is split or decoded
romchornyi Nov 6, 2026
3ca6b58
fix(dashconnect): tell the app when its request is refused at Approve
romchornyi Nov 6, 2026
05c9991
fix(dashconnect): leave the encryption slot out behind a disabled cur…
romchornyi Nov 6, 2026
d830206
fix(dashconnect): warn, not refuse, when a known app's request return…
romchornyi Nov 6, 2026
0d46484
fix(dashconnect): refuse, not retry, a request that names an absent c…
romchornyi Nov 6, 2026
5620cbc
fix(dashconnect): refuse a v2 request for an absent app contract or d…
romchornyi Nov 6, 2026
29fef61
Merge origin/develop into feat/app-connect-v2-login
romchornyi Nov 9, 2026
ae77818
fix(dashconnect): refuse a v2 app owned like a system contract
romchornyi Nov 9, 2026
99baad2
Merge the final head of #1210 into feat/app-connect-dashpay-carrier
romchornyi Nov 9, 2026
b6527df
Merge origin/develop into feat/app-connect-dashpay-carrier
romchornyi Nov 9, 2026
edcc414
Merge feat/app-connect-dashpay-carrier into feat/app-connect-encrypti…
romchornyi Nov 9, 2026
6f230ff
Merge feat/app-connect-encryption-rotation into fix/app-connect-share…
romchornyi Nov 9, 2026
ad072fd
Merge fix/app-connect-shared-profile-access into refactor/app-connect…
romchornyi Nov 9, 2026
654b76b
test(dashconnect): drop the session-key terms from the refusal-at-App…
romchornyi Nov 9, 2026
19e57aa
docs(dashconnect): give the wallet's own gate as the reason a mainnet…
romchornyi Nov 9, 2026
e9f88e6
Merge remote-tracking branch 'origin/develop' into feat/app-connect-e…
romchornyi Nov 9, 2026
2fca237
docs(adr): record #1301's App Connect decisions (0027–0030)
romchornyi Nov 9, 2026
41ee478
fix(dashconnect): disable the app's keys after the profile keys, and …
romchornyi Nov 9, 2026
bd0145e
Merge remote-tracking branch 'origin/feat/app-connect-encryption-rota…
romchornyi Nov 9, 2026
44abef3
Merge remote-tracking branch 'origin/develop' into feat/app-connect-e…
romchornyi Nov 9, 2026
7180c6e
Merge remote-tracking branch 'origin/feat/app-connect-encryption-rota…
romchornyi Nov 9, 2026
9447a46
docs(dashpay): describe the encryption key rules in ADR-0009 and the …
romchornyi Nov 10, 2026
5dc260a
Merge remote-tracking branch 'origin/feat/app-connect-encryption-rota…
romchornyi Nov 10, 2026
075afb3
Merge remote-tracking branch 'origin/develop' into fix/app-connect-sh…
romchornyi Nov 10, 2026
f7995b4
Merge remote-tracking branch 'origin/fix/app-connect-shared-profile-a…
romchornyi Nov 10, 2026
20076bc
fix(dashconnect): disable the app's keys after the other keys on disc…
romchornyi Nov 10, 2026
aa03cc0
Merge origin/develop into stack/1301 (#1263 squash-merged; its tree i…
romchornyi Nov 10, 2026
1e11360
fix(dashconnect): retry a failed response delete on the next signed o…
romchornyi Nov 10, 2026
0bb2013
fix(dashconnect): an update is not landed while a key's bound is unknown
romchornyi Nov 10, 2026
0a29cf5
fix(dashconnect): retry left response deletes on every signed disconnect
romchornyi Nov 10, 2026
e002360
fix(dashconnect): keep the row while a disconnect leaves keys of unkn…
romchornyi Nov 10, 2026
4e8c23a
fix(dashconnect): keep every row while a key's bound is unknown
romchornyi Nov 11, 2026
ea770db
Merge remote-tracking branch 'origin/develop' into stack/1301
romchornyi Nov 11, 2026
b3c29b5
Merge remote-tracking branch 'origin/develop' into stack/1301
romchornyi Nov 11, 2026
41f7d5f
refactor(dashpay): use the read a new App Connect intent was made from
romchornyi Nov 11, 2026
5734ef1
docs(dashpay): say what #1301 does in the App Connect summary and ADR…
romchornyi Nov 11, 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
8 changes: 4 additions & 4 deletions DashWallet.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1165,10 +1165,10 @@
AA0031032FD0000000000013 /* IconName+DashIconSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA0031012FD0000000000011 /* IconName+DashIconSource.swift */; };
AA00F1012FF0A10000A1B402 /* ExchangeAddressLookupContextTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA00F1002FF0A10000A1B402 /* ExchangeAddressLookupContextTests.swift */; };
AA03A0012FF3000000000001 /* KeyExchangeCryptoTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA03A0032FF3000000000003 /* KeyExchangeCryptoTests.swift */; };
AA03A0022FF3000000000002 /* LoginKeyDerivationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA03A0042FF3000000000004 /* LoginKeyDerivationTests.swift */; };
AA04A0012FF4000000000001 /* DashConnectDataSourceTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA04A0032FF4000000000003 /* DashConnectDataSourceTests.swift */; };
AA05A0012FF5000000000001 /* DashConnectStoreTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA05A0032FF5000000000003 /* DashConnectStoreTests.swift */; };
AA06A0112FF6000000000011 /* AppConnectV2LoginTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA06A0132FF6000000000013 /* AppConnectV2LoginTests.swift */; };
AA06A0F12FF60000000000F1 /* AppConnectProjectionTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA06A0F32FF60000000000F3 /* AppConnectProjectionTests.swift */; };
AA06A0212FF6000000000021 /* AppConnectEncryptionRotationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA06A0232FF6000000000023 /* AppConnectEncryptionRotationTests.swift */; };
AA06A0012FF6000000000001 /* PlatformDashConnectDataSourceTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA06A0032FF6000000000003 /* PlatformDashConnectDataSourceTests.swift */; };
AA22BB33CC44DD55EE66FF78 /* BuyReceiveFlowUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA22BB33CC44DD55EE66FF77 /* BuyReceiveFlowUITests.swift */; };
Expand Down Expand Up @@ -3297,10 +3297,10 @@
AA0031012FD0000000000011 /* IconName+DashIconSource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "IconName+DashIconSource.swift"; sourceTree = "<group>"; };
AA00F1002FF0A10000A1B402 /* ExchangeAddressLookupContextTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExchangeAddressLookupContextTests.swift; sourceTree = "<group>"; };
AA03A0032FF3000000000003 /* KeyExchangeCryptoTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = KeyExchangeCryptoTests.swift; path = DashConnect/KeyExchangeCryptoTests.swift; sourceTree = "<group>"; };
AA03A0042FF3000000000004 /* LoginKeyDerivationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = LoginKeyDerivationTests.swift; path = DashConnect/LoginKeyDerivationTests.swift; sourceTree = "<group>"; };
AA04A0032FF4000000000003 /* DashConnectDataSourceTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = DashConnectDataSourceTests.swift; path = DashConnect/DashConnectDataSourceTests.swift; sourceTree = "<group>"; };
AA05A0032FF5000000000003 /* DashConnectStoreTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = DashConnectStoreTests.swift; path = DashConnect/DashConnectStoreTests.swift; sourceTree = "<group>"; };
AA06A0132FF6000000000013 /* AppConnectV2LoginTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = AppConnectV2LoginTests.swift; path = DashConnect/AppConnectV2LoginTests.swift; sourceTree = "<group>"; };
AA06A0F32FF60000000000F3 /* AppConnectProjectionTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = AppConnectProjectionTests.swift; path = DashConnect/AppConnectProjectionTests.swift; sourceTree = "<group>"; };
AA06A0232FF6000000000023 /* AppConnectEncryptionRotationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = AppConnectEncryptionRotationTests.swift; path = DashConnect/AppConnectEncryptionRotationTests.swift; sourceTree = "<group>"; };
AA06A0032FF6000000000003 /* PlatformDashConnectDataSourceTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = PlatformDashConnectDataSourceTests.swift; path = DashConnect/PlatformDashConnectDataSourceTests.swift; sourceTree = "<group>"; };
AA22BB33CC44DD55EE66FF77 /* BuyReceiveFlowUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BuyReceiveFlowUITests.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -7363,10 +7363,10 @@
2A7CAFFF191922CBF6075212 /* DashConnectUriTests.swift */,
7C172F43568AE0A5AFDB5349 /* Secp256k1Tests.swift */,
AA03A0032FF3000000000003 /* KeyExchangeCryptoTests.swift */,
AA03A0042FF3000000000004 /* LoginKeyDerivationTests.swift */,
AA04A0032FF4000000000003 /* DashConnectDataSourceTests.swift */,
AA05A0032FF5000000000003 /* DashConnectStoreTests.swift */,
AA06A0132FF6000000000013 /* AppConnectV2LoginTests.swift */,
AA06A0F32FF60000000000F3 /* AppConnectProjectionTests.swift */,
AA06A0232FF6000000000023 /* AppConnectEncryptionRotationTests.swift */,
AA06A0032FF6000000000003 /* PlatformDashConnectDataSourceTests.swift */,
47976E492987772700612988 /* AmountObjectTests.swift */,
Expand Down Expand Up @@ -10688,10 +10688,10 @@
0438F3D117619B14594F95E6 /* DashConnectUriTests.swift in Sources */,
8D66A1B0E97F5B50411765B4 /* Secp256k1Tests.swift in Sources */,
AA03A0012FF3000000000001 /* KeyExchangeCryptoTests.swift in Sources */,
AA03A0022FF3000000000002 /* LoginKeyDerivationTests.swift in Sources */,
AA04A0012FF4000000000001 /* DashConnectDataSourceTests.swift in Sources */,
AA05A0012FF5000000000001 /* DashConnectStoreTests.swift in Sources */,
AA06A0112FF6000000000011 /* AppConnectV2LoginTests.swift in Sources */,
AA06A0F12FF60000000000F1 /* AppConnectProjectionTests.swift in Sources */,
AA06A0212FF6000000000021 /* AppConnectEncryptionRotationTests.swift in Sources */,
AA06A0012FF6000000000001 /* PlatformDashConnectDataSourceTests.swift in Sources */,
47976E4A2987772700612988 /* AmountObjectTests.swift in Sources */,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,21 @@ import SwiftDashSDK

/// The user-editable devnet coordinates, over UserDefaults.
///
/// Two of the keys are READ DIRECTLY BY SwiftDashSDK and must keep their
/// exact names:
/// Both keys are READ DIRECTLY BY SwiftDashSDK and must keep their exact
/// names:
/// - `platformQuorumURL` — `SDK.init(network: .devnet, …)` reads it and
/// auto-discovers DAPI addresses from `{quorumURL}/masternodes`. Without
/// it, devnet SDK creation fails.
/// - `platformDevnetName` — the `dashd -devnet=<name>` chain name. The app
/// passes it into `PlatformSpvStartConfig.devnetName` so the SPV user
/// agent embeds `devnet.devnet-<name>` (Core devnet peers drop the
/// handshake without it).
/// The third key is app-owned: the DashConnect `loginKeyResponse` contract
/// id on devnet (the contract is registered separately per devnet, so its id
/// differs from the pinned testnet one).
///
/// Values are trimmed on read; empty-after-trim counts as unset. The quorum
/// URL and devnet name are seeded with the current team devnet
/// (`devnet-moutai`) through the registration domain, so a fresh install can
/// select Devnet without typing anything — a user-saved value (including an
/// explicitly emptied one, stored as `""`) always wins over the seed. The
/// DashConnect contract id deliberately has NO default: it is unknown for
/// moutai, and an absent value must surface as a normal error, never a guess.
/// explicitly emptied one, stored as `""`) always wins over the seed.
///
/// NOTE: the SDK's own built-in devnet quorum template
/// (`https://quorums.devnet.<name>.networks.dash.org`) does not match real
Expand All @@ -53,8 +48,6 @@ enum DevnetConfiguration {
static let quorumURLKey = "platformQuorumURL"
/// Same key the SwiftDashSDK sample app uses — do not rename.
static let devnetNameKey = "platformDevnetName"
/// App-owned: base58 id of the devnet `loginKeyResponse` contract.
static let dashConnectContractIdKey = "devnetDashConnectLoginContractId"

/// devnet-moutai, verified reachable 2026-09-01 (13 enabled masternodes,
/// Core P2P on :20001, DAPI on :1443).
Expand Down Expand Up @@ -121,14 +114,6 @@ enum DevnetConfiguration {
return nil
}

/// The devnet DashConnect `loginKeyResponse` contract id (base58), or nil
/// when unset/blank. Stored as entered; validity (32-byte identifier) is
/// the consumer's check so a typo surfaces as an error there, not a crash.
static var dashConnectContractId: String? {
ensureDefaultsRegistered()
return normalized(UserDefaults.standard.string(forKey: dashConnectContractIdKey))
}

/// Writers store the raw (trimmed) text — including the empty string, so
/// clearing a field genuinely unsets it instead of resurfacing the
/// registered default.
Expand All @@ -142,14 +127,7 @@ enum DevnetConfiguration {
UserDefaults.standard.set(value.trimmingCharacters(in: .whitespacesAndNewlines), forKey: devnetNameKey)
}

static func setDashConnectContractId(_ value: String) {
ensureDefaultsRegistered()
UserDefaults.standard.set(value.trimmingCharacters(in: .whitespacesAndNewlines), forKey: dashConnectContractIdKey)
}

/// Whether devnet can start: quorum URL AND devnet name are both present.
/// The DashConnect contract id is deliberately not part of this — it only
/// gates DashConnect approvals, not the network itself.
static var isConfigured: Bool {
quorumURL != nil && devnetName != nil
}
Expand Down
Loading
Loading