Skip to content
Terra WalletDevelopers

Early access. The Terra API and SDKs may change before launch, and the SDK packages are not published yet.

View as Markdown

SDK and widgets

Early access

SDK: 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_sample with framework: "html" and product: "pay".
  • A working plain-HTML connect button: framework: "html" and product: "connect", or EIP-6963 and EIP-1193.