Skip to content
This repository was archived by the owner on Sep 13, 2024. It is now read-only.

Commit 89b019f

Browse files
authored
Merge pull request #284 from dexon-foundation/master
Let some functions public for customization
2 parents e8ffa75 + 2e76378 commit 89b019f

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

Sources/web3swift/Web3/Web3+Eth.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ public class Web3Eth: Web3OptionsInheritable {
323323
/// - Parameter options: Object can override the "to", "gasPrice", "gasLimit" and "value" parameters is pre-formed transaction.
324324
/// "from" field in "options" is mandatory for both local and remote signing.
325325
/// - Parameter password: Password to decrypt sender's private key
326-
func sendTransactionPromise(_ transaction: EthereumTransaction, options: Web3Options, password: String = "BANKEXFOUNDATION") -> Promise<TransactionSendingResult> {
326+
public func sendTransactionPromise(_ transaction: EthereumTransaction, options: Web3Options, password: String = "BANKEXFOUNDATION") -> Promise<TransactionSendingResult> {
327327
// print(transaction)
328328
var assembledTransaction: EthereumTransaction = transaction.mergedWithOptions(options)
329329
let queue = web3.requestDispatcher.queue

Sources/web3swift/Web3/Web3+JsonRpcRequest.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ struct Counter {
2727
/// JSON RPC request structure for serialization and deserialization purposes.
2828
public struct JsonRpcRequest: Encodable {
2929
/// jsonrpc version
30-
var jsonrpc: String = "2.0"
30+
public var jsonrpc: String = "2.0"
3131
/// node api
32-
var method: JsonRpcMethod
32+
public var method: JsonRpcMethod
3333
/// node input
34-
var params: JsonRpcParams
34+
public var params: JsonRpcParams
3535
/// request local id
36-
var id: Int = Counter.increment()
36+
public var id: Int = Counter.increment()
3737

3838
/// A type that can be used as a key for encoding and decoding.
3939
enum CodingKeys: String, CodingKey {

Sources/web3swift/Web3/Web3+Personal.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public class Web3Personal: Web3OptionsInheritable {
7878
return try Web3Utils.hashECRecover(hash: hash, signature: signature)
7979
}
8080

81-
func signPersonalMessagePromise(message: Data, from: Address, password: String = "BANKEXFOUNDATION") -> Promise<Data> {
81+
public func signPersonalMessagePromise(message: Data, from: Address, password: String = "BANKEXFOUNDATION") -> Promise<Data> {
8282
let queue = web3.requestDispatcher.queue
8383
do {
8484
if web3.provider.attachedKeystoreManager.isEmpty {

0 commit comments

Comments
 (0)