For the complete documentation index, see llms.txt. This page is also available as Markdown.

Submit and Retrieve a Payload

Submit a payload through an XL1 gateway and retrieve it through typed viewers.

Use a write-capable XL1 gateway for submission and its typed viewer surface for retrieval.

import { PayloadBuilder } from '@xyo-network/sdk'
import { GatewayBuilder } from '@xyo-network/xl1-sdk'
  1. Build and validate the application payload.

  2. Obtain a write-capable gateway using a public browser-wallet provider or a server-side GatewayBuilder with an application-managed account.

  3. Submit through gateway.addPayloadsToChain(...).

  4. Retain the returned transaction hash.

  5. Retrieve the transaction through gateway.connection.viewer?.transaction.byHash(hash).

  6. Validate every application payload body before using it.

Last updated