File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -52,5 +52,6 @@ public enum RPCMethod: String, Codable {
52
52
case settxfee = " settxfee "
53
53
case signrawtransactionwithwallet = " signrawtransactionwithwallet "
54
54
case uptime = " uptime "
55
+ case validateaddress = " validateaddress "
55
56
case verifytxoutproof = " verifytxoutproof "
56
57
}
Original file line number Diff line number Diff line change @@ -77,6 +77,20 @@ public extension CoreRPC {
77
77
return call ( method: . loadwallet, params: [ name] )
78
78
}
79
79
80
+ func validateaddress( address: String ) -> Promise < Address > {
81
+ return call ( method: . validateaddress, params: [ address] )
82
+ }
83
+
84
+ struct Address : Codable {
85
+ let address : String
86
+ let isscript : Bool
87
+ let isvalid : Bool
88
+ let iswitness : Bool
89
+ let scriptPubKey : String
90
+ let witness_version : Int ?
91
+ let witness_program : String ?
92
+ }
93
+
80
94
struct AddressInfo : Codable {
81
95
public let address : String
82
96
public let desc : String ?
You can’t perform that action at this time.
0 commit comments