SDK and widgets
Early accessSDK: elements
Shell
# npm install @terrawallet/elements (not published yet; name may change)What it will include#
<terra-connect-button>: connects Terra Wallet (EIP-6963 in browsers, WalletConnect or a deep link on phones).<terra-pay-button>: opens checkout for a payment intent your server created.- One
<script type="module">tag, pinned per version with an SRI hash, for WordPress, Webflow or plain HTML. - Shadow DOM rendering, so your page's CSS cannot break or spoof the buttons.
A preview of the shape#
HTML
<!-- Preview API, not installable. The real script URL and SRI hash are published at launch. --><script type="module" src="TERRA_ELEMENTS_URL" integrity="sha384-PINNED_HASH" crossorigin="anonymous"></script> <terra-connect-button theme="auto"></terra-connect-button><terra-pay-button payment-intent="pi_..."></terra-pay-button>Never load a Terra script without the published integrity hash, and never from a URL other than the one in these docs at launch.
Until then#
- A working plain-HTML checkout button: MCP tool
get_code_samplewithframework: "html"andproduct: "pay". - A working plain-HTML connect button:
framework: "html"andproduct: "connect", or EIP-6963 and EIP-1193.