File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -14,4 +14,20 @@ public extension CoreRPC {
14
14
return call ( method: . getdescriptorinfo, params: [ descriptor] )
15
15
}
16
16
17
+ func deriveAddress( for descriptor: String ) -> Promise < [ String ] > {
18
+
19
+ return call ( method: . deriveaddresses, params: [ descriptor] )
20
+ }
21
+
22
+ func deriveAddresses( for descriptor: String , with range: [ Int ] ) -> Promise < [ String ] > {
23
+
24
+ struct deriveAddressesParams : Codable {
25
+ let descriptor : String
26
+ let range : [ Int ]
27
+ }
28
+
29
+ let params = deriveAddressesParams ( descriptor: descriptor, range: range)
30
+
31
+ return call ( method: . deriveaddresses, params: params)
32
+ }
17
33
}
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import Foundation
3
3
public enum RPCMethod : String , Codable {
4
4
case createrawtransaction = " createrawtransaction "
5
5
case createwallet = " createwallet "
6
+ case deriveaddresses = " deriveaddresses "
6
7
case decoderawtransaction = " decoderawtransaction "
7
8
case estimatesmartfee = " estimatesmartfee "
8
9
case fundrawtransaction = " fundrawtransaction "
You can’t perform that action at this time.
0 commit comments