All phases of Avail's unification drop have now ended, 👉👉 check out this page 👈👈 for more information.

API reference
Fetch the next available App ID on Avail DA

Fetch the next available App ID on Avail DA

On-chain name of method: dataAvailablity_nextAppId

app_ids, once registered, cannot be claimed by another dev. You can use this method to fetch the next available app_id for your awesome rollup :)

Parameters

  • None

Returns

  • app_id: The next available App ID

Minimal example (Fetch the next available app_id)

  1. Inside your-file-name.ts, add the following code:
avail-deno
import { SDK } from "https://raw.githubusercontent.com/availproject/avail/main/avail-deno/src/sdk.ts";
 
const providerEndpoint = "wss://turing-rpc.avail.so/ws";
const sdk = await SDK.New(providerEndpoint);
 
const value = await sdk.api.query.dataAvailability.nextAppId();
console.log(value.toHuman());
 
Deno.exit();
  1. Run the code using:
deno run --allow-net your-file-name.ts

Sample Response:
99