-
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
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
r1b2ns e188b6c
added sentAndReceived
r1b2ns 572942f
implemented new functions
r1b2ns 01be1b9
fix secret
r1b2ns 899457e
fix create new wallet
r1b2ns 8b66948
chore: removed comments
r1b2ns ebe05e9
added kyoto structure
r1b2ns a0708dd
Added Kyoto sync
r1b2ns 91acf93
no message
r1b2ns 8af10a8
no message
r1b2ns 9f770fe
removed ActivityListViewModel dead code
r1b2ns 0b490db
no message
r1b2ns 8c2a9d9
fix the code
r1b2ns bf844b5
chore: organizing code
r1b2ns c13fc74
testing kyoto
r1b2ns db1a908
added Kyoto stop service
r1b2ns 93562f2
organize code
r1b2ns e1543e2
no message
r1b2ns a8d06f7
clean dead code
r1b2ns 4a9a4fd
create live for EsploraService and KyotoService
r1b2ns f7cf0ad
test main net
r1b2ns d46e6f3
testing main net with bip84
r1b2ns a6ee9bf
chore: removed main net
r1b2ns 37046bf
feat: added option to in onboard to synchronise using kyoto and savin…
r1b2ns 19a8518
organize code
r1b2ns a37b954
added getSyncMode
r1b2ns cc2e69d
added kyoto in settings
r1b2ns a646078
fix needFullScan
r1b2ns 699385a
no message
r1b2ns 0540621
swift-format
r1b2ns 59e039e
fix: using concrete type for EsploraService and Kyoto
r1b2ns 7b7e2ab
added .live
r1b2ns 3f0341b
code review fixe
r1b2ns 608aecd
Code review fixes
r1b2ns 79a94be
code review fixes
r1b2ns 2521e9d
Removed full scan when syncing with Kyoto
r1b2ns ddf573f
feat: Added circular progress view
r1b2ns be0e172
Removed option to choose network when using kyoto
r1b2ns 364a996
added automatic update
r1b2ns 840e0f8
added network indicator
r1b2ns 2a109a3
realtime update wallet
r1b2ns 531cc7b
Stop any service when delete a wallet
r1b2ns 35c7072
removed taprootheight
r1b2ns 98f86d8
no message
r1b2ns 13a363b
fix onboarding
r1b2ns 3c5cdf4
chore: swift-format
r1b2ns a05f172
code review fix
r1b2ns ce793a9
Code review fixes
r1b2ns 71507d4
code review fix
r1b2ns 57620a2
code review fix
r1b2ns 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.