-
Notifications
You must be signed in to change notification settings - Fork 12
feat: add Kyoto #296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
rubensmachion
wants to merge
50
commits into
bitcoindevkit:main
from
rubensmachion:feat/test-new-service
Closed
feat: add Kyoto #296
Changes from 46 commits
Commits
Show all changes
50 commits
Select commit
Hold shift + click to select a range
9a4ea77
tests
rubensmachion e188b6c
added sentAndReceived
rubensmachion 572942f
implemented new functions
rubensmachion 01be1b9
fix secret
rubensmachion 899457e
fix create new wallet
rubensmachion 8b66948
chore: removed comments
rubensmachion ebe05e9
added kyoto structure
rubensmachion a0708dd
Added Kyoto sync
rubensmachion 91acf93
no message
rubensmachion 8af10a8
no message
rubensmachion 9f770fe
removed ActivityListViewModel dead code
rubensmachion 0b490db
no message
rubensmachion 8c2a9d9
fix the code
rubensmachion bf844b5
chore: organizing code
rubensmachion c13fc74
testing kyoto
rubensmachion db1a908
added Kyoto stop service
rubensmachion 93562f2
organize code
rubensmachion e1543e2
no message
rubensmachion a8d06f7
clean dead code
rubensmachion 4a9a4fd
create live for EsploraService and KyotoService
rubensmachion f7cf0ad
test main net
rubensmachion d46e6f3
testing main net with bip84
rubensmachion a6ee9bf
chore: removed main net
rubensmachion 37046bf
feat: added option to in onboard to synchronise using kyoto and savin…
rubensmachion 19a8518
organize code
rubensmachion a37b954
added getSyncMode
rubensmachion cc2e69d
added kyoto in settings
rubensmachion a646078
fix needFullScan
rubensmachion 699385a
no message
rubensmachion 0540621
swift-format
rubensmachion 59e039e
fix: using concrete type for EsploraService and Kyoto
rubensmachion 7b7e2ab
added .live
rubensmachion 3f0341b
code review fixe
rubensmachion 608aecd
Code review fixes
rubensmachion 79a94be
code review fixes
rubensmachion 2521e9d
Removed full scan when syncing with Kyoto
rubensmachion ddf573f
feat: Added circular progress view
rubensmachion be0e172
Removed option to choose network when using kyoto
rubensmachion 364a996
added automatic update
rubensmachion 840e0f8
added network indicator
rubensmachion 2a109a3
realtime update wallet
rubensmachion 531cc7b
Stop any service when delete a wallet
rubensmachion 35c7072
removed taprootheight
rubensmachion 98f86d8
no message
rubensmachion 13a363b
fix onboarding
rubensmachion 3c5cdf4
chore: swift-format
rubensmachion a05f172
code review fix
rubensmachion ce793a9
Code review fixes
rubensmachion 71507d4
code review fix
rubensmachion 57620a2
code review fix
rubensmachion File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// | ||
// URL+Extensions.swift | ||
// BDKSwiftExampleWallet | ||
// | ||
// Created by Rubens Machion on 17/05/25. | ||
// | ||
|
||
import Foundation | ||
|
||
extension URL { | ||
|
||
static var defaultWalletDirectory: URL { | ||
URL.documentsDirectory | ||
} | ||
|
||
static var walletDirectoryName: String { | ||
"wallet_data" | ||
} | ||
|
||
static var walletDBName: String { | ||
"wallet.sqlite" | ||
} | ||
|
||
static var walletDataDirectoryURL: URL { | ||
defaultWalletDirectory.appendingPathComponent(walletDirectoryName) | ||
} | ||
|
||
static var persistenceBackendPath: String { | ||
walletDataDirectoryURL.appendingPathComponent(walletDBName).path | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
99 changes: 99 additions & 0 deletions
99
BDKSwiftExampleWallet/Service/BDK Service/BDKClient+Esplora.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
// | ||
// BDKClient+Esplora.swift | ||
// BDKSwiftExampleWallet | ||
// | ||
// Created by Rubens Machion on 31/05/25. | ||
// | ||
|
||
extension BDKClient { | ||
static let esplora = Self( | ||
loadWallet: { | ||
try EsploraService.shared.loadWallet() | ||
}, | ||
deleteWallet: { | ||
try EsploraService.shared.deleteWallet() | ||
}, | ||
createWalletFromSeed: { words in | ||
try EsploraService.shared.createWallet(params: words) | ||
}, | ||
createWalletFromDescriptor: { descriptor in | ||
try EsploraService.shared.createWallet(params: descriptor) | ||
}, | ||
createWalletFromXPub: { xpub in | ||
try EsploraService.shared.createWallet(params: xpub) | ||
}, | ||
getBalance: { | ||
try EsploraService.shared.getBalance() | ||
}, | ||
transactions: { | ||
try EsploraService.shared.getTransactions() | ||
}, | ||
listUnspent: { | ||
try EsploraService.shared.listUnspent() | ||
}, | ||
syncScanWithSyncScanProgress: { progress in | ||
try await EsploraService.shared.startSync(progress: progress) | ||
}, | ||
fullScanWithFullScanProgress: { progress in | ||
try await EsploraService.shared.startFullScan(progress: progress) | ||
}, | ||
getAddress: { | ||
try EsploraService.shared.getAddress() | ||
}, | ||
send: { (address, amount, feeRate) in | ||
Task { | ||
try await EsploraService.shared.send( | ||
address: address, | ||
amount: amount, | ||
feeRate: feeRate | ||
) | ||
} | ||
}, | ||
calculateFee: { tx in | ||
try EsploraService.shared.calculateFee(tx: tx) | ||
}, | ||
calculateFeeRate: { tx in | ||
try EsploraService.shared.calculateFeeRate(tx: tx) | ||
}, | ||
sentAndReceived: { tx in | ||
try EsploraService.shared.sentAndReceived(tx: tx) | ||
}, | ||
buildTransaction: { (address, amount, feeRate) in | ||
try EsploraService.shared.buildTransaction( | ||
address: address, | ||
amount: amount, | ||
feeRate: feeRate | ||
) | ||
}, | ||
getBackupInfo: { | ||
try BDKService.shared.getBackupInfo() | ||
}, | ||
needsFullScan: { | ||
BDKService.shared.needsFullScanOfWallet() | ||
}, | ||
setNeedsFullScan: { value in | ||
BDKService.shared.setNeedsFullScan(value) | ||
}, | ||
getNetwork: { | ||
BDKService.shared.network | ||
}, | ||
getEsploraURL: { | ||
BDKService.shared.esploraURL | ||
}, | ||
updateNetwork: { newNetwork in | ||
BDKService.shared.updateNetwork(newNetwork) | ||
}, | ||
updateEsploraURL: { newURL in | ||
BDKService.shared.updateEsploraURL(newURL) | ||
}, | ||
stop: { | ||
try await EsploraService.shared.stopService() | ||
}, | ||
upateSyncMode: { mode in | ||
BDKService.shared.updateSyncMode(mode) | ||
}, | ||
getSyncMode: { | ||
BDKService.shared.getSyncMode() | ||
} | ||
) | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.