# FunFair Wallet SDK

# Information

💡 The SDK is only ever linked to the leader instance.

💡 All communication goes from the leader > SDK.

💡 If the follower needs to emit, say, some tracking information, the flow would be: Follower emits tracking event > Leader picks it up emits it to > SDK > dapp

💡 This way we only ever have one thing in control and the leader is the master in all of this.

💡 The leader speaks to the SDK for internal tasks without the dApp needing to do anything.

💡 The leader keeps the iframe height in sync.

💡 As it's embedded in the dApp it has super powers, like storage and other things.

💡 The leader is exposed on the window for easy Web use.

💡 It supports full typings.

💡 It handles web3 or etherjs libraries.

💡 Script is referenced to a place in the Wallet, so we can deploy fixes and new features without having to make every dApp update their package. The NPM package is just enums and typings.

💡 We use post-robot to perform nice communication with full compile time errors.

# Method Execution Flows

Click on the image to zoom in.

# Method Listeners Flows

Click on the image to zoom in.