Our ProtocolIntegrateTry It NowContact

How to Integrate

Uploading and searching for provenance records in the RAIL protocol is simple. Because the standard uses Arweave as its storage layer, you do not need to register or generate API keys (etc.)in order to make use of it. Instead, you simply need to create an Arweave address representing your identity to start signing and uploading records.

Uploading data to the Arweave network can be performed in a number of ways. In the following examples, we use a Javascript library, and dispatch through Bundlr, a RAIL member who are presently subsidizing all uploads of provenance records.

You can learn more about methods of submitting data entries toArweave here, and find Arweave libraries for many other programming languages online (for example, Rust, Go, and Python.

Example:

Uploading a provenance record

A provenance record can be generated and dispatched for storage in the Arweave network as follows:

Example:

Querying provenance records

The RAIL standard uses Arweave as a data layer. This means that we can query any Arweave indexing service in order to find records uploaded by all participating members of the alliance. In general, services in the Arweave ecosystem use a [standardized GraphQL interface], allowing users to easily swap between indexers without needing to change any code. In this example, we will use the javascript libraries default Arweave.net host, provided by AR.IO.

Need help integrating? Reach out via email, or ask for developer help on the Arweave ecosystemDiscord server.

© 2022 Al Provenance Alliance