Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: adding support for WebSocket #714

Draft
wants to merge 36 commits into
base: develop-4.0
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
b26f3a6
moved keystore manager to web3 main object
odanylovych Dec 29, 2021
d3b410c
renamed attachedKeystoreManager
odanylovych Dec 29, 2021
791a863
added Web3SubscriptionProvider protocol
odanylovych Dec 31, 2021
9368301
some fixes for subscription provider
odanylovych Dec 31, 2021
5659133
Merge branch 'skywinder:develop' into develop
odanylovych Dec 31, 2021
98b0796
optional websocket delegator
odanylovych Jan 4, 2022
21779a2
moved common methods to default websocket provider
odanylovych Jan 4, 2022
d65eae1
merged jsonrpc methods
odanylovych Jan 4, 2022
c716c26
added verification for supported request methods
odanylovych Jan 4, 2022
e0bff8d
implemented sendAsync in WebsocketProvider
odanylovych Jan 5, 2022
a8a2120
implemented sendAsync for batch requests
odanylovych Jan 5, 2022
0ed27cf
added filter requests
odanylovych Jan 6, 2022
400913e
added subscribe methods to Eth
odanylovych Jan 7, 2022
ec49477
set queue when calling subscribe
odanylovych Jan 10, 2022
a3f7b5c
added internalQueue to WebsocketProvider
odanylovych Jan 10, 2022
46abd66
removed unneeded IWebsocketProvider
odanylovych Jan 10, 2022
4e6a096
added queue as param in subscribe
odanylovych Jan 10, 2022
90329c3
added method to convert SubscribeEventFilter to params
odanylovych Jan 10, 2022
9044573
reworked writeTimer to pendingRequests
odanylovych Jan 10, 2022
1ba9885
moved infura specific constructor
odanylovych Jan 11, 2022
4db90c1
removed url session from websocket
odanylovych Jan 11, 2022
bf9997c
fixes for subscribe methods
odanylovych Jan 12, 2022
86088cf
tests for subscribe methods
odanylovych Jan 12, 2022
b570545
added init to ErrorMessage, made batch requests public
odanylovych Jan 19, 2022
69b0a3f
created JSONRPCresponse.Result struct
odanylovych Jan 20, 2022
428251d
minor improvement: removed guard statement
odanylovych Feb 23, 2022
2d90894
removed LogItem and used EventLog
odanylovych Feb 24, 2022
54cf7e9
Merge remote-tracking branch 'upstream/develop' into develop
odanylovych May 3, 2022
d1add3b
added hash field in BlockHeader struct
odanylovych May 6, 2022
2c3cf29
Merge remote-tracking branch 'upstream/develop' into develop
odanylovych May 6, 2022
907d3da
included new files in project
odanylovych May 7, 2022
7c90489
updated websockets documentation
odanylovych May 13, 2022
4cfa03b
made EthereumTransaction.encode public
odanylovych May 17, 2022
e5a6579
chore: merge with develop
JeneaVranceanu Dec 20, 2022
2a0625e
chore: merge branch 'develop-upstream' into feat/webscoket-support
JeneaVranceanu Dec 20, 2022
6861408
fix: returned back the type of `network` to `Networks?` (optional)
JeneaVranceanu Dec 20, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
added init to ErrorMessage, made batch requests public
odanylovych committed Jan 19, 2022
commit b5705453f3bc26322d4f1c08bf140a3358b10c3a
7 changes: 6 additions & 1 deletion Sources/web3swift/Web3/Web3+JSONRPC.swift
Original file line number Diff line number Diff line change
@@ -57,7 +57,7 @@ public struct JSONRPCrequest: Encodable {

/// JSON RPC batch request structure for serialization and deserialization purposes.
public struct JSONRPCrequestBatch: Encodable {
var requests: [JSONRPCrequest]
public var requests: [JSONRPCrequest]

public func encode(to encoder: Encoder) throws {
var container = encoder.singleValueContainer()
@@ -90,6 +90,11 @@ public struct JSONRPCresponse: Decodable{
public struct ErrorMessage: Decodable {
public var code: Int
public var message: String

public init(code: Int, message: String) {
self.code = code
self.message = message
}
}

internal var decodableTypes: [Decodable.Type] = [[EventLog].self,