Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • SolstoryServerWriterAPI

Index

Constructors

Properties

program: SolstoryAPI
writerKey: PublicKey

Methods

  • Appends an item to the initialized writer+mintId solstory sidechain.

    This method transparently uses ARBundler for high efficiency uploading.

    If you haven't already appended an item, you must create a head before using this. Heads can be created manually by both the writer service (the one calling appendItem) or by the update-privilege-owner (usually the creator) of the NFT, since it is a modification on the NFT. You'd generally only want to use this api if you're expecting the owner to create the head (and therefore carry the expense of initializing the PDA the head is stored in.

    If you want to automatically create a head use (@link appendItemCreate) instead.

    Parameters

    Returns Promise<string>

  • Appends an item to the initialized writer+mintId solstory sidechain.

    This method transparently uses ARBundler for high efficiency uploading.

    It will also automatically create a "head" for the story, taking the funds required to do so out of the wallet the API was initialized with. If you do not want this, use (@link appendItem) instead.

    Heads can be created manually by both the writer service (the one calling appendItem) or by the update-privilege-owner (usually the creator) of the NFT, since it is a modification on the NFT.

    Parameters

    Returns Promise<string>

  • createWriterHead(mintId: PublicKey): Promise<string>
  • setExtendedMetadata(extMetadata: any): Promise<string>
  • updateHeadAppend(mintId: PublicKey, data: UpdateHeadData, options?: ConfirmOptions): Promise<string>
  • Uploads an item to bundlr.

    If you want to misuse the library, pass anything you want in and it'll get serialized to json. Or just copy this implementation of bundlr uploading for your own purposes.

    This will naturally fail if bundlr has not been initialized.

    WARNING: This function will also cost sol on either devnet or mainnet. Uploads to bundlr are relatively cheap but are NOT free. Call this.bundlr.getPrice with the bytes in your data to get a price check.

    Parameters

    Returns Promise<string>

Generated using TypeDoc