Base URL: https://miden-playground-api.walnut.dev

CORS Access-Control-Allow-Origin:

All endpoints accept a JSON body request and return a JSON response.

Custom types:

type PackageType = "account" | "note-script" | "transaction-script" | "authentication-component";

type PackageDependency = {
  id: string;
  name: string;
  type: PackageType;
  digest: string;
  rust: string;
};

type Package = {
  id: string;
  name: string;
  type: PackageType;
  status: "draft" | "compiled" | "error";
  readOnly: boolean;
  rust: string;
  masm: string;
  digest: string;
  masp: string;
  exports: {
    Procedure: {
      path: string;
   	  digest: string;
	    signature: { abi: number; params: string[]; results: string[] };
	    attributes: { attrs: string[] };
    }
  }[];
  // list of dependencies this package depends on
  dependencies: PackageDependency[];
  createdAt: number;
  updatedAt: number;
  // exports filtered by "Procedure" type
  procedureExports: {
    path: string;
	  digest: string;
		signature: { abi: number; params: string[]; results: string[] };
   	attributes: { attrs: string[] };
  }[];
};

type PackageSource = {
  // Rust project Cargo.toml as string
  cargoToml: string;
  // Rust project source code (src/lib.rs) as string
  rust: string;
};

Verified Account Components Lookup

GET /verified-account-components/[network]/[identifier] Get the list of verified account components for a given network (mtst or mdev) and account identifier (Address without routing parameters eg. mtst1ar2zjq0arpq5ysqqjqw8ws0jf5fygx84).

When the contract has been previously verified with the API, it will return the list of verified components (in particular the Rust source code and the list of exported procedures).

This endpoint always returns the list of “standard” components this account implements, even if the contract hasn’t verified a custom component.

Standard accounts:

Standard authentication components: