Skip to content

Commit cdaf223

Browse files
committed
Add listwallets method
1 parent c690c72 commit cdaf223

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

Sources/CoreRPC/Methods.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ public enum RPCMethod: String, Codable {
3636
case help = "help"
3737
case listbanned = "listbanned"
3838
case listunspent = "listunspent"
39+
case listwallets = "listwallets"
3940
case loadwallet = "loadwallet"
4041
case logging = "logging"
4142
case sendrawtransaction = "sendrawtransaction"

Sources/CoreRPC/Wallet.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ public extension CoreRPC {
1515
return call(method: .listunspent, params: Empty())
1616
}
1717

18+
func listWallets() -> Promise<[String]> {
19+
return call(method: .listwallets, params: Empty())
20+
}
21+
1822
struct LoadedWallet: Decodable {
1923
let name: String
2024
let warning: String

0 commit comments

Comments
 (0)