Class MirrorGenerationTwoLib
Constructors
constructor
- new MirrorGenerationTwoLib(programId: PublicKey, connection: Connection, wallet: Wallet): MirrorGenerationTwoLib
Parameters
programId: PublicKey
connection: Connection
wallet: Wallet
Properties
connection
connection: Connection
program
Methods
addFeePayerAndRecentBlockHashInTransaction
- addFeePayerAndRecentBlockHashInTransaction(tx: Transaction, feePayer: PublicKey): Promise<Transaction>
Parameters
tx: Transaction
feePayer: PublicKey
Returns Promise<Transaction>
addSignatureInTransaction
- addSignatureInTransaction(tx: Transaction, signerAddress: PublicKey, signature: Buffer): Transaction
Parameters
tx: Transaction
signerAddress: PublicKey
signature: Buffer
Returns Transaction
createAirdropFroReserveTransaction
- createAirdropFroReserveTransaction(uuid: string, tokenId: string | number, signingAuthority: PublicKey, user: PublicKey, collectionKey: PublicKey, tokenProgram?: PublicKey, associatedTokenProgram?: PublicKey, systemProgram?: PublicKey, rent?: PublicKey, mplProgramId?: PublicKey): Promise<Transaction>
Parameters
uuid: string
tokenId: string | number
signingAuthority: PublicKey
user: PublicKey
collectionKey: PublicKey
tokenProgram: PublicKey = TOKEN_PROGRAM_ID
associatedTokenProgram: PublicKey = ASSOCIATED_TOKEN_PROGRAM_ID
systemProgram: PublicKey = SystemProgram.programId
rent: PublicKey = SYSVAR_RENT_PUBKEY
mplProgramId: PublicKey = METADATA_PROGRAM_ID
Returns Promise<Transaction>
createAirdropTransaction
- createAirdropTransaction(uuid: string, signingAuthority: PublicKey, user: PublicKey, collectionKey: PublicKey, tokenProgram?: PublicKey, associatedTokenProgram?: PublicKey, systemProgram?: PublicKey, rent?: PublicKey, mplProgramId?: PublicKey): Promise<Transaction>
Parameters
uuid: string
signingAuthority: PublicKey
user: PublicKey
collectionKey: PublicKey
tokenProgram: PublicKey = TOKEN_PROGRAM_ID
associatedTokenProgram: PublicKey = ASSOCIATED_TOKEN_PROGRAM_ID
systemProgram: PublicKey = SystemProgram.programId
rent: PublicKey = SYSVAR_RENT_PUBKEY
mplProgramId: PublicKey = METADATA_PROGRAM_ID
Returns Promise<Transaction>
createFreeMintFromReserveTransaction
- createFreeMintFromReserveTransaction(uuid: string, tokenId: string | number, signingAuthority: PublicKey, user: PublicKey, collectionKey: PublicKey, tokenProgram?: PublicKey, associatedTokenProgram?: PublicKey, systemProgram?: PublicKey, rent?: PublicKey, mplProgramId?: PublicKey): Promise<Transaction>
Parameters
uuid: string
tokenId: string | number
signingAuthority: PublicKey
user: PublicKey
collectionKey: PublicKey
tokenProgram: PublicKey = TOKEN_PROGRAM_ID
associatedTokenProgram: PublicKey = ASSOCIATED_TOKEN_PROGRAM_ID
systemProgram: PublicKey = SystemProgram.programId
rent: PublicKey = SYSVAR_RENT_PUBKEY
mplProgramId: PublicKey = METADATA_PROGRAM_ID
Returns Promise<Transaction>
createFreeMintTransaction
- createFreeMintTransaction(uuid: string, signingAuthority: PublicKey, user: PublicKey, collectionKey: PublicKey, tokenProgram?: PublicKey, associatedTokenProgram?: PublicKey, systemProgram?: PublicKey, rent?: PublicKey, mplProgramId?: PublicKey): Promise<Transaction>
Parameters
uuid: string
signingAuthority: PublicKey
user: PublicKey
collectionKey: PublicKey
tokenProgram: PublicKey = TOKEN_PROGRAM_ID
associatedTokenProgram: PublicKey = ASSOCIATED_TOKEN_PROGRAM_ID
systemProgram: PublicKey = SystemProgram.programId
rent: PublicKey = SYSVAR_RENT_PUBKEY
mplProgramId: PublicKey = METADATA_PROGRAM_ID
Returns Promise<Transaction>
createInitializeConfigTransaction
- createInitializeConfigTransaction(name: string, symbol: string, baseUri: string, suffix: string, sellerFeeBasisPoints: number, priviewsTokenIdRange: string | number, reserveTokenIdRange: string | number, tokenIdRange: string | number, isTokenIdRangeEnable: boolean, isTokenPaymentEnable: boolean, isNativeTokenPaymentEnable: boolean, isAirdropEnable: boolean, isFreeMintEnable: boolean, isMutable: boolean, isPaymentReceiptMintEnable: boolean, signingAuthority: PublicKey, incomeAccount: PublicKey, collectionKey: PublicKey, systemProgram?: PublicKey): Promise<Transaction>
Parameters
name: string
symbol: string
baseUri: string
suffix: string
sellerFeeBasisPoints: number
priviewsTokenIdRange: string | number
reserveTokenIdRange: string | number
tokenIdRange: string | number
isTokenIdRangeEnable: boolean
isTokenPaymentEnable: boolean
isNativeTokenPaymentEnable: boolean
isAirdropEnable: boolean
isFreeMintEnable: boolean
isMutable: boolean
isPaymentReceiptMintEnable: boolean
signingAuthority: PublicKey
incomeAccount: PublicKey
collectionKey: PublicKey
systemProgram: PublicKey = SystemProgram.programId
Returns Promise<Transaction>
createInitializePaymentReceiptItemTransaction
- createInitializePaymentReceiptItemTransaction(paymentReceiptPda: PublicKey, uuid: string, tokenId: string | number, signingAuthority: PublicKey, user: PublicKey, tokenProgram?: PublicKey, associatedTokenProgram?: PublicKey, systemProgram?: PublicKey, rent?: PublicKey): Promise<Transaction>
Parameters
paymentReceiptPda: PublicKey
uuid: string
tokenId: string | number
signingAuthority: PublicKey
user: PublicKey
tokenProgram: PublicKey = TOKEN_PROGRAM_ID
associatedTokenProgram: PublicKey = ASSOCIATED_TOKEN_PROGRAM_ID
systemProgram: PublicKey = SystemProgram.programId
rent: PublicKey = SYSVAR_RENT_PUBKEY
Returns Promise<Transaction>
createInitializeTokenPaymentConfigTransaction
- createInitializeTokenPaymentConfigTransaction(mintAccount: PublicKey, signingAuthority: PublicKey, decimalPoint: number): Promise<Transaction>
Parameters
mintAccount: PublicKey
signingAuthority: PublicKey
decimalPoint: number
Returns Promise<Transaction>
createMintPaymentReceiptItemFromPaymentReceiptPdaTransaction
- createMintPaymentReceiptItemFromPaymentReceiptPdaTransaction(paymentReceiptPda: PublicKey, uuid: string, tokenId: string | number, signingAuthority: PublicKey, user: PublicKey, collectionKey: PublicKey, tokenProgram?: PublicKey, associatedTokenProgram?: PublicKey, systemProgram?: PublicKey, rent?: PublicKey, mplProgramId?: PublicKey): Promise<Transaction>
Parameters
paymentReceiptPda: PublicKey
uuid: string
tokenId: string | number
signingAuthority: PublicKey
user: PublicKey
collectionKey: PublicKey
tokenProgram: PublicKey = TOKEN_PROGRAM_ID
associatedTokenProgram: PublicKey = ASSOCIATED_TOKEN_PROGRAM_ID
systemProgram: PublicKey = SystemProgram.programId
rent: PublicKey = SYSVAR_RENT_PUBKEY
mplProgramId: PublicKey = METADATA_PROGRAM_ID
Returns Promise<Transaction>
createMintPaymentReceiptItemTransaction
- createMintPaymentReceiptItemTransaction(paymentReceiptUuid: string, uuid: string, tokenId: string | number, signingAuthority: PublicKey, user: PublicKey, collectionKey: PublicKey, tokenProgram?: PublicKey, associatedTokenProgram?: PublicKey, systemProgram?: PublicKey, rent?: PublicKey, mplProgramId?: PublicKey): Promise<Transaction>
Parameters
paymentReceiptUuid: string
uuid: string
tokenId: string | number
signingAuthority: PublicKey
user: PublicKey
collectionKey: PublicKey
tokenProgram: PublicKey = TOKEN_PROGRAM_ID
associatedTokenProgram: PublicKey = ASSOCIATED_TOKEN_PROGRAM_ID
systemProgram: PublicKey = SystemProgram.programId
rent: PublicKey = SYSVAR_RENT_PUBKEY
mplProgramId: PublicKey = METADATA_PROGRAM_ID
Returns Promise<Transaction>
createMintWithNativeTokenPaymentFromReserveTransaction
- createMintWithNativeTokenPaymentFromReserveTransaction(uuid: string, tokenId: string | number, paymentAmount: string | number, incomeAccount: PublicKey, signingAuthority: PublicKey, user: PublicKey, collectionKey: PublicKey, tokenProgram?: PublicKey, associatedTokenProgram?: PublicKey, systemProgram?: PublicKey, rent?: PublicKey, mplProgramId?: PublicKey): Promise<Transaction>
Parameters
uuid: string
tokenId: string | number
paymentAmount: string | number
incomeAccount: PublicKey
signingAuthority: PublicKey
user: PublicKey
collectionKey: PublicKey
tokenProgram: PublicKey = TOKEN_PROGRAM_ID
associatedTokenProgram: PublicKey = ASSOCIATED_TOKEN_PROGRAM_ID
systemProgram: PublicKey = SystemProgram.programId
rent: PublicKey = SYSVAR_RENT_PUBKEY
mplProgramId: PublicKey = METADATA_PROGRAM_ID
Returns Promise<Transaction>
createMintWithNativeTokenPaymentTransaction
- createMintWithNativeTokenPaymentTransaction(uuid: string, paymentAmount: string | number, incomeAccount: PublicKey, signingAuthority: PublicKey, user: PublicKey, collectionKey: PublicKey, tokenProgram?: PublicKey, associatedTokenProgram?: PublicKey, systemProgram?: PublicKey, rent?: PublicKey, mplProgramId?: PublicKey): Promise<Transaction>
Parameters
uuid: string
paymentAmount: string | number
incomeAccount: PublicKey
signingAuthority: PublicKey
user: PublicKey
collectionKey: PublicKey
tokenProgram: PublicKey = TOKEN_PROGRAM_ID
associatedTokenProgram: PublicKey = ASSOCIATED_TOKEN_PROGRAM_ID
systemProgram: PublicKey = SystemProgram.programId
rent: PublicKey = SYSVAR_RENT_PUBKEY
mplProgramId: PublicKey = METADATA_PROGRAM_ID
Returns Promise<Transaction>
createMintWithTokenPaymentFromReserveTransaction
- createMintWithTokenPaymentFromReserveTransaction(uuid: string, tokenId: string | number, paymentAmount: string | number, incomeAccount: PublicKey, paymentTokenMintAccount: PublicKey, signingAuthority: PublicKey, user: PublicKey, collectionKey: PublicKey, tokenProgram?: PublicKey, associatedTokenProgram?: PublicKey, systemProgram?: PublicKey, rent?: PublicKey, mplProgramId?: PublicKey): Promise<Transaction>
Parameters
uuid: string
tokenId: string | number
paymentAmount: string | number
incomeAccount: PublicKey
paymentTokenMintAccount: PublicKey
signingAuthority: PublicKey
user: PublicKey
collectionKey: PublicKey
tokenProgram: PublicKey = TOKEN_PROGRAM_ID
associatedTokenProgram: PublicKey = ASSOCIATED_TOKEN_PROGRAM_ID
systemProgram: PublicKey = SystemProgram.programId
rent: PublicKey = SYSVAR_RENT_PUBKEY
mplProgramId: PublicKey = METADATA_PROGRAM_ID
Returns Promise<Transaction>
createMintWithTokenPaymentTransaction
- createMintWithTokenPaymentTransaction(uuid: string, paymentAmount: string | number, incomeAccount: PublicKey, paymentTokenMintAccount: PublicKey, signingAuthority: PublicKey, user: PublicKey, collectionKey: PublicKey, tokenProgram?: PublicKey, associatedTokenProgram?: PublicKey, systemProgram?: PublicKey, rent?: PublicKey, mplProgramId?: PublicKey): Promise<Transaction>
Parameters
uuid: string
paymentAmount: string | number
incomeAccount: PublicKey
paymentTokenMintAccount: PublicKey
signingAuthority: PublicKey
user: PublicKey
collectionKey: PublicKey
tokenProgram: PublicKey = TOKEN_PROGRAM_ID
associatedTokenProgram: PublicKey = ASSOCIATED_TOKEN_PROGRAM_ID
systemProgram: PublicKey = SystemProgram.programId
rent: PublicKey = SYSVAR_RENT_PUBKEY
mplProgramId: PublicKey = METADATA_PROGRAM_ID
Returns Promise<Transaction>
createPaymentReceiptFromReserveTransaction
- createPaymentReceiptFromReserveTransaction(uuid: string, tokenIds: number[], paymentAmount: string | number, incomeAccount: PublicKey, paymentTokenMintAccount: PublicKey, signingAuthority: PublicKey, user: PublicKey, collectionKey: PublicKey, feeAmount?: number, tokenProgram?: PublicKey, associatedTokenProgram?: PublicKey, systemProgram?: PublicKey, rent?: PublicKey, mplProgramId?: PublicKey): Promise<Transaction>
Parameters
uuid: string
tokenIds: number[]
paymentAmount: string | number
incomeAccount: PublicKey
paymentTokenMintAccount: PublicKey
signingAuthority: PublicKey
user: PublicKey
collectionKey: PublicKey
feeAmount: number = 0
tokenProgram: PublicKey = TOKEN_PROGRAM_ID
associatedTokenProgram: PublicKey = ASSOCIATED_TOKEN_PROGRAM_ID
systemProgram: PublicKey = SystemProgram.programId
rent: PublicKey = SYSVAR_RENT_PUBKEY
mplProgramId: PublicKey = METADATA_PROGRAM_ID
Returns Promise<Transaction>
createPaymentReceiptTransaction
- createPaymentReceiptTransaction(uuid: string, tokenQuantity: number, paymentAmount: string | number, incomeAccount: PublicKey, paymentTokenMintAccount: PublicKey, signingAuthority: PublicKey, user: PublicKey, collectionKey: PublicKey, feeAmount?: number, tokenProgram?: PublicKey, associatedTokenProgram?: PublicKey, systemProgram?: PublicKey, rent?: PublicKey, mplProgramId?: PublicKey): Promise<Transaction>
Parameters
uuid: string
tokenQuantity: number
paymentAmount: string | number
incomeAccount: PublicKey
paymentTokenMintAccount: PublicKey
signingAuthority: PublicKey
user: PublicKey
collectionKey: PublicKey
feeAmount: number = 0
tokenProgram: PublicKey = TOKEN_PROGRAM_ID
associatedTokenProgram: PublicKey = ASSOCIATED_TOKEN_PROGRAM_ID
systemProgram: PublicKey = SystemProgram.programId
rent: PublicKey = SYSVAR_RENT_PUBKEY
mplProgramId: PublicKey = METADATA_PROGRAM_ID
Returns Promise<Transaction>
createUpdateConfigAirdropDisableTransaction
- createUpdateConfigAirdropDisableTransaction(signingAuthority: PublicKey): Promise<Transaction>
Parameters
signingAuthority: PublicKey
Returns Promise<Transaction>
createUpdateConfigAirdropEnableTransaction
- createUpdateConfigAirdropEnableTransaction(signingAuthority: PublicKey): Promise<Transaction>
Parameters
signingAuthority: PublicKey
Returns Promise<Transaction>
createUpdateConfigCollectionTransaction
- createUpdateConfigCollectionTransaction(signingAuthority: PublicKey, collectionKey: PublicKey): Promise<Transaction>
Parameters
signingAuthority: PublicKey
collectionKey: PublicKey
Returns Promise<Transaction>
createUpdateConfigFreeMintDisableTransaction
- createUpdateConfigFreeMintDisableTransaction(signingAuthority: PublicKey): Promise<Transaction>
Parameters
signingAuthority: PublicKey
Returns Promise<Transaction>
createUpdateConfigFreeMintEnableTransaction
- createUpdateConfigFreeMintEnableTransaction(signingAuthority: PublicKey): Promise<Transaction>
Parameters
signingAuthority: PublicKey
Returns Promise<Transaction>
createUpdateConfigIncomeAccountTransaction
- createUpdateConfigIncomeAccountTransaction(incomeAccount: PublicKey, signingAuthority: PublicKey): Promise<Transaction>
Parameters
incomeAccount: PublicKey
signingAuthority: PublicKey
Returns Promise<Transaction>
createUpdateConfigIsMutableTransaction
- createUpdateConfigIsMutableTransaction(signingAuthority: PublicKey, isMutable: boolean): Promise<Transaction>
Parameters
signingAuthority: PublicKey
isMutable: boolean
Returns Promise<Transaction>
createUpdateConfigNativeTokenPaymentDisableTransaction
- createUpdateConfigNativeTokenPaymentDisableTransaction(signingAuthority: PublicKey): Promise<Transaction>
Parameters
signingAuthority: PublicKey
Returns Promise<Transaction>
createUpdateConfigNativeTokenPaymentEnableTransaction
- createUpdateConfigNativeTokenPaymentEnableTransaction(signingAuthority: PublicKey): Promise<Transaction>
Parameters
signingAuthority: PublicKey
Returns Promise<Transaction>
createUpdateConfigPaymentReceiptMintDisableTransaction
- createUpdateConfigPaymentReceiptMintDisableTransaction(signingAuthority: PublicKey): Promise<Transaction>
Parameters
signingAuthority: PublicKey
Returns Promise<Transaction>
createUpdateConfigPaymentReceiptMintEnableTransaction
- createUpdateConfigPaymentReceiptMintEnableTransaction(signingAuthority: PublicKey): Promise<Transaction>
Parameters
signingAuthority: PublicKey
Returns Promise<Transaction>
createUpdateConfigTokenIdRangeDisableTransaction
- createUpdateConfigTokenIdRangeDisableTransaction(signingAuthority: PublicKey): Promise<Transaction>
Parameters
signingAuthority: PublicKey
Returns Promise<Transaction>
createUpdateConfigTokenIdRangeEnableTransaction
- createUpdateConfigTokenIdRangeEnableTransaction(signingAuthority: PublicKey): Promise<Transaction>
Parameters
signingAuthority: PublicKey
Returns Promise<Transaction>
createUpdateConfigTokenIdRangeTransaction
- createUpdateConfigTokenIdRangeTransaction(signingAuthority: PublicKey, tokenIdRange: string | number): Promise<Transaction>
Parameters
signingAuthority: PublicKey
tokenIdRange: string | number
Returns Promise<Transaction>
createUpdateConfigTokenPaymentDisableTransaction
- createUpdateConfigTokenPaymentDisableTransaction(signingAuthority: PublicKey): Promise<Transaction>
Parameters
signingAuthority: PublicKey
Returns Promise<Transaction>
createUpdateConfigTokenPaymentEnableTransaction
- createUpdateConfigTokenPaymentEnableTransaction(signingAuthority: PublicKey): Promise<Transaction>
Parameters
signingAuthority: PublicKey
Returns Promise<Transaction>
createUpdateTokenPaymentConfigDecimalTransaction
- createUpdateTokenPaymentConfigDecimalTransaction(mintAccount: PublicKey, signingAuthority: PublicKey, decimalPoint: number): Promise<Transaction>
Parameters
mintAccount: PublicKey
signingAuthority: PublicKey
decimalPoint: number
Returns Promise<Transaction>
createUpdateTokenPaymentConfigDisableTransaction
- createUpdateTokenPaymentConfigDisableTransaction(mintAccount: PublicKey, signingAuthority: PublicKey): Promise<Transaction>
Parameters
mintAccount: PublicKey
signingAuthority: PublicKey
Returns Promise<Transaction>
createUpdateTokenPaymentConfigEnableTransaction
- createUpdateTokenPaymentConfigEnableTransaction(mintAccount: PublicKey, signingAuthority: PublicKey): Promise<Transaction>
Parameters
mintAccount: PublicKey
signingAuthority: PublicKey
Returns Promise<Transaction>
getAllConfigAccount
- getAllConfigAccount(): Promise<any>
Returns Promise<any>
getAllPaymentReceiptAccount
- getAllPaymentReceiptAccount(): Promise<any>
Returns Promise<any>
getAllReserveTokenIdListAccount
- getAllReserveTokenIdListAccount(): Promise<any>
Returns Promise<any>
getAllTokenPaymentConfigAccount
- getAllTokenPaymentConfigAccount(): Promise<any>
Returns Promise<any>
getConfigAccountPdaAddress
- getConfigAccountPdaAddress(): Promise<PublicKey>
Returns Promise<PublicKey>
getConfigAccountPdaAndIsInitialized
- getConfigAccountPdaAndIsInitialized(): Promise<PublicKey>
Returns Promise<PublicKey>
getConfigAccountPdaData
- getConfigAccountPdaData(configAccountPda: PublicKey): Promise<any>
Parameters
configAccountPda: PublicKey
Returns Promise<any>
getMasterEditionAccountPda
- getMasterEditionAccountPda(mintAccountPda: PublicKey, mplProgramId?: PublicKey): Promise<PublicKey>
Parameters
mintAccountPda: PublicKey
mplProgramId: PublicKey = METADATA_PROGRAM_ID
Returns Promise<PublicKey>
getMetadataAccountPda
- getMetadataAccountPda(mintAccountPda: PublicKey, mplProgramId?: PublicKey): Promise<PublicKey>
Parameters
mintAccountPda: PublicKey
mplProgramId: PublicKey = METADATA_PROGRAM_ID
Returns Promise<PublicKey>
getMintAccountPda
- getMintAccountPda(uuid: string): Promise<PublicKey>
Parameters
Returns Promise<PublicKey>
getPaymentReceiptPdaAddress
- getPaymentReceiptPdaAddress(uuid: string): Promise<PublicKey>
Parameters
Returns Promise<PublicKey>
getPaymentReceiptPdaData
- getPaymentReceiptPdaData(paymentReceiptPdaAddress: PublicKey): Promise<any>
Parameters
paymentReceiptPdaAddress: PublicKey
Returns Promise<any>
getReserveTokenIdListAccountData
- getReserveTokenIdListAccountData(reserveTokenIdListAccountPda: PublicKey): Promise<any>
Parameters
reserveTokenIdListAccountPda: PublicKey
Returns Promise<any>
getReserveTokenIdListOnePdsAddress
- getReserveTokenIdListOnePdsAddress(): Promise<PublicKey>
Returns Promise<PublicKey>
getReserveTokenIdListTwoPdsAddress
- getReserveTokenIdListTwoPdsAddress(): Promise<PublicKey>
Returns Promise<PublicKey>
getTokenAccountPda
- getTokenAccountPda(mintAccountPda: PublicKey, owner: PublicKey): Promise<PublicKey>
Parameters
mintAccountPda: PublicKey
owner: PublicKey
Returns Promise<PublicKey>
getTokenPaymentConfigAccountData
- getTokenPaymentConfigAccountData(tokenPaymentConfigAccountPda: PublicKey): Promise<any>
Parameters
tokenPaymentConfigAccountPda: PublicKey
Returns Promise<any>
getTokenPaymentConfigAccountPdaAddress
- getTokenPaymentConfigAccountPdaAddress(mintAccount: PublicKey): Promise<PublicKey>
Parameters
Returns Promise<PublicKey>
isPdaAddressInitialize
- isPdaAddressInitialize(pdaAddress: PublicKey): Promise<boolean>
Parameters
Returns Promise<boolean>
signTransaction
- signTransaction(tx: Transaction, secretKey: string): Transaction
Parameters
tx: Transaction
secretKey: string
Returns Transaction
Add signature in the transaction.