Create Collection

Once an application is connected to Martian wallet via connect method, an app can request the user to create a collection using window.martian.createCollection()and it will return a Promise that resolves when the user accepts the request and reject (throw when awaited) when the user declines the request or request is not valid/fails. It takes three parameter listed below

  • Collection name

  • Collection description

  • Collection url

Below is an example code describing the way to create a collection.

// Create a collection
const txnHash = await window.martian.createCollection("ColName123", "CollectionDescription", "https://aptos.dev");

Last updated