How to export your Widget
There are two main ways of handling transaction signing: Local Signer and Parent Signer.
Last updated
Was this helpful?
There are two main ways of handling transaction signing: Local Signer and Parent Signer.
Last updated
Was this helpful?
Was this helpful?
const widgetIframeUrl = WidgetController.generateWidgetIframeUrl({
platformName: "Platform name",
// should be `true` if you will use your own wallet
useParentSigner: true,
// :exclamation:update `accountAddress` value with the real value of the connected account address
accountAddress: "ADDRESS_OF_SIGNER_ACCOUNT",
network: "testnet", // "testnet" or "mainnet"
themeVariables: {
shouldDisplayTinymanLogo: true
// you can customize more styles, please refer to configuration page
},
parentUrlOrigin: window.location.origin, // or your app url origin e.g. "https://myapp.com"
assetIds: [0, 10458941]
});<iframe title="tinyman swap widget"
src=`${widgetIframeUrl}`
style="width: 415px; height: 440px; border: none;"
sandbox="allow-same-origin allow-scripts allow-popups allow-forms"
/>