@blockassetlabs/project
TypeScript icon, indicating that this package has built-in type declarations

2.4.9 • Public • Published

Blockasset Labs Project

Addresses

Program addresses are the same on devnet, and mainnet-beta.

Installation

Installing the package using yarn:

yarn add @blockassetlabs/project

You can also use npm instead, if you'd like:

npm install @blockassetlabs/project

🔥 Pro Tip: Check out our implementations on "BlockassetLabs UI" repository.

Documentation

Create Project

This is a public transaction, so anybody can create a new project

import { withInitProject } from "@blockassetlabs/project";

const [transaction, projectId] = await withInitProject(
  new Transaction(),
  connection,
  wallet as Wallet,
  {
    authorities: [wallet.publicKey],
    name: formValues.name,
  },
);
await executeTransaction(connection, wallet as Wallet, transaction);

Update Project

This transaction can only be called by one of the project authorities

import { withUpdateProject } from "@blockassetlabs/project";

const transaction = await withUpdateProject(
  new Transaction(),
  connection,
  wallet as Wallet,
  {
    projectId: projectId,
    authorities: [wallet.publicKey],
    name: formValues.name,
  },
);
await executeTransaction(connection, wallet as Wallet, transaction);

Close Project

It's possible to recover the funds used to pay rent for the data stored on-chain by closing the Project.

  • Although closing a project will not affect any of its raffles, it's highly recommended to close its raffles first because once the project closed, you will no longer have access to its raffles to modify or close.
  • This action is not recoverable and permanently remove the access to the project.

This transaction can only be called by one of the project authorities

import { withUpdateProject } from "@blockassetlabs/project";

const transaction = await withCloseProject(
  new Transaction(),
  connection,
  wallet as Wallet,
  {
    projectId: projectId,
  },
);
await executeTransaction(connection, wallet as Wallet, transaction);

Questions & Support

If you are developing using Blockasset contracts and libraries, feel free to reach out for support on Discord. We will work with you or your team to answer questions, provide development support and discuss new feature requests.

For issues please, file a GitHub issue.

https://discord.gg/blockasset

License

Readme

Keywords

Package Sidebar

Install

npm i @blockassetlabs/project

Weekly Downloads

66

Version

2.4.9

License

MIT

Unpacked Size

471 kB

Total Files

146

Last publish

Collaborators

  • nikhil_blockasset
  • sorooshblockasset