Prophet Swap

Quick Start



1. Add required script to your HTML:
<script src="https://krc20.safunet.com/bundle.js"></script>

2. Add html tag
<token-swap-chat
    theme="dark"
    default-tokens="KAS,KRTO,PINTL,NACHO"
    default-buy-token="PINTL">
</token-swap-chat>


Example:
<!DOCTYPE html>
<html>
<head>
    <title>Prophet Swap Integration</title>
    <script src="https://krc20.safunet.com/bundle.js"></script>
</head>
<body>
    <token-swap-chat
        theme="dark"
        default-tokens="KAS,KRTO,PINTL,NACHO"
        default-buy-token="PINTL">
    </token-swap-chat>

    <script>
        const chat = document.querySelector('token-swap-chat');
        
        // Optional: Customize theme
        chat.updateTheme({
            dimensions: {
                height: '600px',
                width: '440px'
            }
        });

        // Optional: Handle events
        chat.addEventListener('message', (e) => {
            console.log('Transaction status:', e.detail);
        });
    </script>
</body>
</html>

Available Settings

HTML Attributes

Theme Configuration

Text Configuration

Available Methods

Events

Message Types

Last updated