-
Notifications
You must be signed in to change notification settings - Fork 116
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
[fcl] Adds WalletConnect Adapter Package and support for client plugin services #1352
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gregsantos
force-pushed
the
gsantos/wc-service-plugin
branch
from
August 22, 2022 18:39
f497e0d
to
0a77bea
Compare
gregsantos
changed the title
[fcl] Adds support for client plugin services
[fcl] Adds WalletConnect Adapter Package and support for client plugin services
Aug 22, 2022
jribbink
reviewed
Aug 22, 2022
jribbink
reviewed
Aug 22, 2022
jribbink
reviewed
Aug 22, 2022
JeffreyDoyle
previously requested changes
Aug 22, 2022
@JeffreyDoyle We need the topic id from an existing paired wallet. This topic is sent with the wallet connect request, to skip QR code. |
chasefleming
approved these changes
Aug 22, 2022
chasefleming
previously requested changes
Aug 22, 2022
jribbink
approved these changes
Aug 23, 2022
gregsantos
dismissed stale reviews from chasefleming and JeffreyDoyle
August 23, 2022 00:09
resolved for alpha
huyndo
pushed a commit
that referenced
this pull request
Sep 24, 2022
…n services (#1352) * PKG -- [fcl-wc] Create pkg, add WC deps * PKG -- [fcl-wc] Add init, wc utils * PKG -- [fcl-wc] Update wc beta, add fcl-bundle * PKG -- [fcl-wc] Remove default WalletConnect projectId * PKG -- [fcl-wc] Add README * PKG -- [fcl-wc] Update to WalletConnect 2.0.0-beta.102 * PKG -- [fcl-wc] Update jest version * PKG -- [fcl-js] Add wc-rpc strategy * PKG -- [fcl-js] Add wc pairings to execService config * PKG -- [fcl-js] Normalize data sent in client request * PKG -- [fcl-js] Update request to switch on service.endpoint * PKG -- [fcl-js] Add case for flow_user_sign endpoint * PKG -- [fcl-js] Remove switch and set chainId * PKG -- [fcl-js] Add fallback for config.get client * PKG -- [fcl-wc] Create pkg, add WC deps * PKG -- [fcl-wc] Add init, wc utils * PKG -- [fcl-wc] Update wc beta, add fcl-bundle * PKG -- [fcl-wc] Remove default WalletConnect projectId * PKG -- [fcl-wc] Add README * PKG -- [fcl-wc] Update to WalletConnect 2.0.0-beta.102 * PKG -- [fcl-wc] Update jest version * PKG -- [fcl-wc] Update Walletconnect to 2.0.0-rc.0 * PKG -- [fcl] add default client on exec discovery config * PKG -- [fcl-js] Add discoveryServices to execService, remove wc pairings * PKG -- [fcl-wc] Add servicePlugin * PKG -- [fcl-wc] Add servicePlugin * PKG -- [fcl-wc] update service def and strategy * PKG -- [fcl-wc] add fcl config and full service strategy * PKG -- [fcl] update service strategy args to obj, remove client * PKG -- [fcl] move config to authn, remove client.extensions * PKG -- [fcl] add execStrategy and service registry * PKG -- [fcl-wc] update service with qrcode modal, remove @onflow/config * PKG -- [fcl] add WC/RPC back to core strategies * PKG -- [fcl] add plugin registry and wire up in execService * PKG -- [fcl] update plugin registry to new service format * PKG -- [fcl-wc] update service name and combine definition with strategy * PKG -- [fcl] remove wc-rpc, replaced with plugin strategy * PKG -- [fcl-wc] update README * PKG -- [fcl-wc] add better-sqlite3, update package-lock.json * PKG -- [fcl-wc] add better-sqlite3 as dev dep * PKG -- [fcl] update supported plugins and setServices method to remove dupe * PKG -- [fcl-wc] update Service name and type * PKG -- [fcl-wc] update init client test * PKG -- [fcl-wc] update walletconnect deps to rc.0 * PKG -- [fcl-wc] update walletconnect to 2.0.0-rc.2 * PKG -- [root] update package-lock.json * PKG -- [root] merge master and update package-lock.json * PKG -- [fcl-wc] update pairing and service provider address to placeholder, * PKG -- [fcl-wc] add network from config * PKG -- [fcl-wc] add util-logger * PKG -- [fcl] add plugin validation * PKG -- [fcl] add client services to discovery api * PKG -- [fcl] add logger to discovery authn * PKG -- [fcl] update naming of discoveryServices to clientServices * PKG -- [root] update changeset for fcl-wc * PKG -- [fcl-wc] add provider.uid to service and use as pairing topic * PKG -- [fcl] move makeDiscoveryServices to discovery utils * PKG -- [fcl-wc] update servicePlugin fiel from services to discoveryServices * PKG -- [fcl] add validation * PKG -- [fcl-wc] add util-logger to service strategy * PKG -- [fcl-wc] update isMobile util to include iPad * PKG -- [fcl-wc] add f_type to service plugin * PKG -- [fcl] add validation for ServicePlugin f_type * PKG -- [fcl-wc] change pairing service provider.address to null * PKG -- [fcl-wc] update console.logs to use logger * PKG -- [fcl-wc] update version for alpha release
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In order to add support for WalletConnect and other client configured authentication services, FCL can use a service plugin registry or config to extend it's service methods. Client configured services, including extensions and plugins can be sent to Discovery for display and selection by the user.
A Discovery Service Plugin should be an object consist of a
name: String, type: String, discoveryServices: Array
.Each service needs a service definition of
f_type: "Service"
and a corresponding service strategy for the service definition's Method.A Service strategy should return a function that returns a Promise that resolves to a PollingResponse.
pluginRegistry.add
will accept one or an array of plugins of type"discovery-service"