Skip to content

Commit e30eded

Browse files
committed
add listlabels method
1 parent 744c627 commit e30eded

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

Sources/CoreRPC/Labels.swift

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import Foundation
2+
import PromiseKit
3+
4+
public extension CoreRPC {
5+
6+
enum LabelType: String, Codable {
7+
case all = ""
8+
case receive
9+
case send
10+
}
11+
12+
func listLabels(_ type: LabelType) -> Promise<[String]> {
13+
return call(method: .listlabels, params: [type])
14+
}
15+
}

Sources/CoreRPC/Methods.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ public enum RPCMethod: String, Codable {
4141
case getzmqnotifications = "getzmqnotifications"
4242
case help = "help"
4343
case listbanned = "listbanned"
44+
case listlabels = "listlabels"
4445
case listunspent = "listunspent"
4546
case listwalletdir = "listwalletdir"
4647
case listwallets = "listwallets"

0 commit comments

Comments
 (0)