@renec-foundation/mpl-token-metadata
Version:
MPL Token Metadata JavaScript API.
68 lines • 2.33 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.UnVerifyCollection = exports.UnVerifyCollectionArgs = void 0;
const mpl_core_1 = require("@renec-foundation/mpl-core");
const web3_js_1 = require("@solana/web3.js");
const MetadataProgram_1 = require("../MetadataProgram");
class UnVerifyCollectionArgs extends mpl_core_1.Borsh.Data {
constructor() {
super(...arguments);
this.instruction = 22;
}
}
exports.UnVerifyCollectionArgs = UnVerifyCollectionArgs;
UnVerifyCollectionArgs.SCHEMA = new Map([...UnVerifyCollectionArgs.struct([['instruction', 'u8']])]);
class UnVerifyCollection extends mpl_core_1.Transaction {
constructor(options, params) {
super(options);
const { feePayer } = options;
const { metadata, collectionAuthority, collectionMint, collectionMetadata, collectionMasterEdition, collectionAuthorityRecord, } = params;
const data = UnVerifyCollectionArgs.serialize();
const accounts = [
{
pubkey: metadata,
isSigner: false,
isWritable: true,
},
{
pubkey: collectionAuthority,
isSigner: true,
isWritable: true,
},
{
pubkey: feePayer,
isSigner: true,
isWritable: true,
},
{
pubkey: collectionMint,
isSigner: false,
isWritable: false,
},
{
pubkey: collectionMetadata,
isSigner: false,
isWritable: false,
},
{
pubkey: collectionMasterEdition,
isSigner: false,
isWritable: false,
},
];
if (collectionAuthorityRecord) {
accounts.push({
pubkey: collectionAuthorityRecord,
isSigner: false,
isWritable: false,
});
}
this.add(new web3_js_1.TransactionInstruction({
keys: accounts,
programId: MetadataProgram_1.MetadataProgram.PUBKEY,
data,
}));
}
}
exports.UnVerifyCollection = UnVerifyCollection;
//# sourceMappingURL=UnverifyCollection.js.map