-
Notifications
You must be signed in to change notification settings - Fork 191
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
[Push, Echo] api milestone 1 #624
Conversation
llbartekll
commented
Dec 5, 2022
•
edited
Loading
edited
- Add Echo target - component for registering a client at Echo server
- has not been e2e tested yet, there is still issue with echo server
- Push API
- Add Push subscription negotiation
- Add Wallet and Dapp clients - with not all methods implemented
- allows to send push message over relay network
- integration tests testDappSendsPushMessage and testWalletApprovesPushRequest pass
- There is push registration pulled from Derek's PR, it will be replaced with Echo SDK registration when issue on Echo server is fixed.
…letConnectSwiftV2 into push-api-milestone-1
add client factories
- add singletones for dapp and wallet push clients
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good high level. Important IMO that it works, too with the simulator but I think that works
…V2 into push-api-milestone-1 # Conflicts: # Example/ExampleApp.xcodeproj/project.pbxproj # Example/IntegrationTests/Pairing/PairingTests.swift
wait(for: [expectation], timeout: InputConfig.defaultTimeout) | ||
} | ||
|
||
func testWalletRejectsPushRequest() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Planning to implement in this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but it is not implemented in the engine yet
} | ||
|
||
private func generateAgreementKeys(peerPublicKeyHex: String, selfpublicKeyHex: String) throws -> (topic: String, keys: AgreementKeys) { | ||
let selfPublicKey = try AgreementPublicKey(hex: selfpublicKeyHex) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just an idea. We doing same actions to generate keys, topic, setAgreementSecret in many places. May be we should move it in KMS package?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe worth to consider, should we open an issue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets open
|
||
import Foundation | ||
|
||
public struct PushMessage: Codable { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All params is required?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so far, yes but it may be a good suggestion to change specs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, just few comments