Overlay Actions

Once initialized, the following functionality is available:

In-Game Purchasing

Checkout

Trigger checkout of an NFT payable with credit card or a crypto wallet by calling Overlay.Event.Checkout:

Overlay.Event.Checkout("MY_ITEM_SKU")

Once initialized, the result of the checkout will be returned as an incoming message via the OnChekoutResult delegate.

Only one checkout process can be started at a given time. Calling Checkout a second time before getting the result will interrupt a previous checkout process.

Invisible Wallet

GetWallet

The getWallet function in the SDK returns the public wallet of the user. The user might be asked to go through a verification process before the wallet is returned.

The result of the operation will be returned as an incoming event via the OnGetWalletResult delegate.

SignTypedData

Once you have built an ethereum typed data, you can ask the user to sign it by using signTypedData function in MetaKeep SDK. The function expects a non-empty reason which is shown to the user at the time of typed data signing. This API is compliant with the latest EIP-712 spec and is a drop in replacement for Metamask's signTypedData_v4 API.

The first parameter (message) should be a stringified JSON of the EIP-712 compliant payload.

Overlay.Event.SignTypedData("{ ... }", "Do Some Action")

Once initialized, the result of the checkout will be returned as an incoming event via the OnSignTypedDataResult delegate.

Last updated