Skip to content

Instantly share code, notes, and snippets.

@gmcdev
Created September 27, 2017 05:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gmcdev/c494ca11d2a167082e72cb9c2739c34e to your computer and use it in GitHub Desktop.
Save gmcdev/c494ca11d2a167082e72cb9c2739c34e to your computer and use it in GitHub Desktop.
metamask.setupTrustedCommunication(
new ConnectionStream(),
'metamask-controller'
)
//
//
//
setupTrustedCommunication (connectionStream, originDomain) {
// setup multiplexing
var mx = setupMultiplex(connectionStream)
// connect features
// this.setupControllerConnection(mx.createStream('controller'))
this.setupProviderConnection(mx.createStream('provider'), originDomain)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment