Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • AssetMintingLib

Index

Constructors

  • new AssetMintingLib(programId: PublicKey, connection: Connection, wallet: Wallet): AssetMintingLib
  • Parameters

    • programId: PublicKey
    • connection: Connection
    • wallet: Wallet

    Returns AssetMintingLib

Properties

connection: Connection
program: Program<AssetMinting>

Methods

  • addAssetEventListener(callback: ((event: AssetEvent) => void)): number
  • Add asset event listener.

    Parameters

    • callback: ((event: AssetEvent) => void)

      Callback for the event to manage the event response on emit.

    Returns number

  • addCollectionEventListener(callback: ((event: CollectionEvent) => void)): number
  • Add collection event listener.

    Parameters

    Returns number

  • addFeePayerAndRecentBlockHashInTransaction(tx: Transaction, feePayer: PublicKey): Promise<Transaction>
  • Add signature in the transaction.

    Parameters

    • tx: Transaction

      Transaction object where signature needs to add.

    • feePayer: PublicKey

      public key of the address which going to pay the fee.

    Returns Promise<Transaction>

  • addMintEventListener(callback: ((event: MintEvent) => void)): number
  • Add mint event listener.

    Parameters

    • callback: ((event: MintEvent) => void)

      Callback for the event to manage the event response on emit.

    Returns number

  • addSignatureInTransaction(tx: Transaction, signerAddress: PublicKey, signature: Buffer): Transaction
  • Add signature in the transaction.

    Parameters

    • tx: Transaction

      Transaction object where signature needs to add.

    • signerAddress: PublicKey

      Signer public key from which secret key transaction is signed.

    • signature: Buffer

      Signed transaction message signature.

    Returns Transaction

  • Add sub collection event listener.

    Parameters

    Returns number

  • createAndAddCreatorSignMetadataInstruction(tx: Transaction, uuid: string, creatorPublicKey: PublicKey, mplProgram?: PublicKey): Promise<Transaction>
  • Create and add creator sign metadata instruction.

    Parameters

    • tx: Transaction

      Transaction object where instruction needs to add.

    • uuid: string

      Seed for the mint account

    • creatorPublicKey: PublicKey

      Creator public key

    • mplProgram: PublicKey = METADATA_PROGRAM_ID

      Metadata program id

    Returns Promise<Transaction>

  • createAssetTokenTransaction(assetUuid: string, collectionUuid: string, payer: PublicKey, signingAuthority: PublicKey, user: PublicKey, assetMintAuthority: PublicKey, tokenName: string, tokenSymbol: string, tokenUrl: string, tokenIsMutable: boolean, tokenSellerPoint: number, creators: CreatorType[], configName?: string, collectionUpdateAuthority?: PublicKey, systemProgram?: PublicKey, rent?: PublicKey, associatedTokenProgram?: PublicKey, tokenProgram?: PublicKey, mplProgram?: PublicKey): Promise<Transaction>
  • Create asset token transaction

    Parameters

    • assetUuid: string

      asset uuid

    • collectionUuid: string

      seed for the collection mint account

    • payer: PublicKey

      transaction fee payer public key

    • signingAuthority: PublicKey

      signing authority public key

    • user: PublicKey

      user public key

    • assetMintAuthority: PublicKey
    • tokenName: string

      token name

    • tokenSymbol: string

      token symbol

    • tokenUrl: string

      token url

    • tokenIsMutable: boolean

      token is mutable

    • tokenSellerPoint: number

      token seller point

    • creators: CreatorType[]

      List of the creators

    • configName: string = NAME

      config account seed for pda

    • collectionUpdateAuthority: PublicKey = signingAuthority

      collection update authority (by default it's singing )

    • systemProgram: PublicKey = SystemProgram.programId

      system program id

    • rent: PublicKey = SYSVAR_RENT_PUBKEY

      rent program id

    • associatedTokenProgram: PublicKey = ASSOCIATED_TOKEN_PROGRAM_ID

      associated token program id

    • tokenProgram: PublicKey = TOKEN_PROGRAM_ID

      token program id

    • mplProgram: PublicKey = METADATA_PROGRAM_ID

      Metadata program id

    Returns Promise<Transaction>

  • createCollectionTokenTransaction(collectionUuid: string, payer: PublicKey, signingAuthority: PublicKey, collectionMintAuthority: PublicKey, collectionOwner: PublicKey, tokenName: string, tokenSymbol: string, tokenUrl: string, tokenIsMutable: boolean, tokenSellerPoint: number, creators: CreatorType[], configName?: string, systemProgram?: PublicKey, rent?: PublicKey, associatedTokenProgram?: PublicKey, tokenProgram?: PublicKey, mplProgram?: PublicKey): Promise<Transaction>
  • Create collection token transaction

    Parameters

    • collectionUuid: string

      seed for the collection mint account

    • payer: PublicKey

      transaction fee payer public key

    • signingAuthority: PublicKey

      signing authority public key

    • collectionMintAuthority: PublicKey

      collection mint authority public key

    • collectionOwner: PublicKey

      collection owner

    • tokenName: string

      token name

    • tokenSymbol: string

      token symbol

    • tokenUrl: string

      token url

    • tokenIsMutable: boolean

      token is mutable

    • tokenSellerPoint: number

      token seller point

    • creators: CreatorType[]

      List of the creators

    • configName: string = NAME

      config account seed for pda

    • systemProgram: PublicKey = SystemProgram.programId

      system program id

    • rent: PublicKey = SYSVAR_RENT_PUBKEY

      rent program id

    • associatedTokenProgram: PublicKey = ASSOCIATED_TOKEN_PROGRAM_ID

      associated token program id

    • tokenProgram: PublicKey = TOKEN_PROGRAM_ID

      token program id

    • mplProgram: PublicKey = METADATA_PROGRAM_ID

      Metadata program id

    Returns Promise<Transaction>

  • createInitializeConfigTransaction(payer: PublicKey, signingAuthority: PublicKey, configName?: string, systemProgram?: PublicKey, rent?: PublicKey): Promise<Transaction>
  • Create initialize config transaction

    Parameters

    • payer: PublicKey

      transaction fee payer public key

    • signingAuthority: PublicKey

      signing authority public key

    • configName: string = NAME

      config account seed for pda

    • systemProgram: PublicKey = SystemProgram.programId

      system program id

    • rent: PublicKey = SYSVAR_RENT_PUBKEY

      rent program id

    Returns Promise<Transaction>

  • createMintTokenTransaction(assetUuid: string, payer: PublicKey, signingAuthority: PublicKey, mintAuthority: PublicKey, configName?: string, systemProgram?: PublicKey, rent?: PublicKey, associatedTokenProgram?: PublicKey, tokenProgram?: PublicKey): Promise<Transaction>
  • Create mint token transaction

    Parameters

    • assetUuid: string

      seed for the mint account

    • payer: PublicKey

      transaction fee payer public key

    • signingAuthority: PublicKey

      signing authority public key

    • mintAuthority: PublicKey

      token mint authority

    • configName: string = NAME

      config account seed for pda

    • systemProgram: PublicKey = SystemProgram.programId

      system program id

    • rent: PublicKey = SYSVAR_RENT_PUBKEY

      rent program id

    • associatedTokenProgram: PublicKey = ASSOCIATED_TOKEN_PROGRAM_ID

      associated token program id

    • tokenProgram: PublicKey = TOKEN_PROGRAM_ID

      token program id

    Returns Promise<Transaction>

  • createSubCollectionTokenTransaction(collectionUuid: string, subCollectionUuid: string, payer: PublicKey, signingAuthority: PublicKey, subCollectionMintAuthority: PublicKey, subCollectionOwner: PublicKey, tokenName: string, tokenSymbol: string, tokenUrl: string, tokenIsMutable: boolean, tokenSellerPoint: number, creators: CreatorType[], configName?: string, collectionUpdateAuthority?: PublicKey, systemProgram?: PublicKey, rent?: PublicKey, associatedTokenProgram?: PublicKey, tokenProgram?: PublicKey, mplProgram?: PublicKey): Promise<Transaction>
  • Create sub collection token transaction

    Parameters

    • collectionUuid: string

      seed for the collection mint account

    • subCollectionUuid: string

      seed for the sub collection mint account

    • payer: PublicKey

      transaction fee payer public key

    • signingAuthority: PublicKey

      signing authority public key

    • subCollectionMintAuthority: PublicKey

      sub collection mint authority public key

    • subCollectionOwner: PublicKey

      sub collection owner public key

    • tokenName: string

      token name

    • tokenSymbol: string

      token symbol

    • tokenUrl: string

      token url

    • tokenIsMutable: boolean

      token is mutable

    • tokenSellerPoint: number

      token seller point

    • creators: CreatorType[]

      List of the creators

    • configName: string = NAME

      config account seed for pda

    • collectionUpdateAuthority: PublicKey = signingAuthority

      collection update authority (By default it's singing authority)

    • systemProgram: PublicKey = SystemProgram.programId

      system program id

    • rent: PublicKey = SYSVAR_RENT_PUBKEY

      rent program id

    • associatedTokenProgram: PublicKey = ASSOCIATED_TOKEN_PROGRAM_ID

      associated token program id

    • tokenProgram: PublicKey = TOKEN_PROGRAM_ID

      token program id

    • mplProgram: PublicKey = METADATA_PROGRAM_ID

      Metadata program id

    Returns Promise<Transaction>

  • creatorSignMetadataInstruction(uuid: string, creatorPublicKey: PublicKey, mplProgram?: PublicKey): Promise<TransactionInstruction>
  • Creator sign metadata instruction.

    Parameters

    • uuid: string

      Seed for the mint account

    • creatorPublicKey: PublicKey

      Creator public key

    • mplProgram: PublicKey = METADATA_PROGRAM_ID

      Metadata program id

    Returns Promise<TransactionInstruction>

  • getConfigAccountData(configAccountPda: PublicKey): Promise<any>
  • Get config account pda data

    Parameters

    • configAccountPda: PublicKey

      pda address for data

    Returns Promise<any>

  • getConfigAccountPdaAndBump(name?: String): Promise<[PublicKey, number]>
  • get the config account pda and bump.

    Parameters

    • name: String = NAME

      seed for the config account.

    Returns Promise<[PublicKey, number]>

  • getCurrentBlockTime(): Promise<BN>
  • Get current block time

    Returns Promise<BN>

  • getMasterEditionAccountPda(mintAccountPda: PublicKey, mplProgramId?: PublicKey): Promise<[PublicKey, number]>
  • Get master edition account pda.

    Parameters

    • mintAccountPda: PublicKey

      token mint account

    • mplProgramId: PublicKey = METADATA_PROGRAM_ID

      metadata program id

    Returns Promise<[PublicKey, number]>

  • getMetadataAccountPda(mintAccountPda: PublicKey, mplProgramId?: PublicKey): Promise<[PublicKey, number]>
  • Get metadata account pda.

    Parameters

    • mintAccountPda: PublicKey

      token mint account

    • mplProgramId: PublicKey = METADATA_PROGRAM_ID

      metadata program id

    Returns Promise<[PublicKey, number]>

  • getMintAccountPdaAndBump(uuid: String): Promise<[PublicKey, number]>
  • get the mint account pda and bump.

    Parameters

    • uuid: String

      seed for the mint account.

    Returns Promise<[PublicKey, number]>

  • isPdaAddressInitialize(pdaAddress: PublicKey): Promise<boolean>
  • Is pda address initialize.

    Parameters

    • pdaAddress: PublicKey

    Returns Promise<boolean>

  • removeEventListener(eventId: number): Promise<void>
  • Remove event listener.

    Parameters

    • eventId: number

      Event id which need to remove.

    Returns Promise<void>

  • signTransaction(tx: Transaction, secretKey: string): Transaction
  • Sign the transaction and add the signature in the transaction.

    Parameters

    • tx: Transaction

      Transaction object which needs to sign.

    • secretKey: string

      Transaction signer secret key (secret key in base58 string).

    Returns Transaction

Generated using TypeDoc