@@ -79,6 +79,7 @@ export const createNft = async ({
7979 creators,
8080 setCollSize,
8181 collection,
82+ collectionUA,
8283 collectionVerified = true ,
8384 ruleSet = null ,
8485} : {
@@ -91,6 +92,8 @@ export const createNft = async ({
9192 creators ?: CreatorInput [ ] ;
9293 setCollSize ?: number ;
9394 collection ?: Keypair ;
95+ /** Must pass (if not owner) to verify collection */
96+ collectionUA ?: Keypair ;
9497 collectionVerified ?: boolean ;
9598 ruleSet ?: PublicKey | null ;
9699} ) => {
@@ -198,7 +201,7 @@ export const createNft = async ({
198201 ? [
199202 createVerifyInstruction (
200203 {
201- authority : owner . publicKey ,
204+ authority : collectionUA ?. publicKey ?? owner . publicKey ,
202205 metadata,
203206 collectionMint : collection . publicKey ,
204207 collectionMetadata : findMetadataPda ( collection . publicKey ) [ 0 ] ,
@@ -262,6 +265,7 @@ export const createNft = async ({
262265 owner ,
263266 mint ,
264267 ...( creators ?. map ( ( c ) => c . authority ) ?? [ ] ) ,
268+ collectionUA ,
265269 ] ) ,
266270 ( k ) => k . publicKey . toBase58 ( ) ,
267271 ) ,
@@ -282,6 +286,7 @@ export const createAndFundAta = async ({
282286 royaltyBps,
283287 creators,
284288 collection,
289+ collectionUA,
285290 collectionVerified,
286291 createCollection = true ,
287292 programmable = false ,
@@ -295,6 +300,8 @@ export const createAndFundAta = async ({
295300 creators ?: CreatorInput [ ] ;
296301 collection ?: Keypair ;
297302 createCollection ?: boolean ;
303+ /** Must pass (if not owner) to verify collection */
304+ collectionUA ?: Keypair ;
298305 collectionVerified ?: boolean ;
299306 programmable ?: boolean ;
300307 ruleSetAddr ?: PublicKey ;
@@ -334,6 +341,7 @@ export const createAndFundAta = async ({
334341 royaltyBps,
335342 creators,
336343 collection,
344+ collectionUA,
337345 collectionVerified,
338346 ruleSet : ruleSetAddr ,
339347 tokenStandard : programmable
@@ -360,6 +368,7 @@ export const makeMintTwoAta = async ({
360368 royaltyBps,
361369 creators,
362370 collection,
371+ collectionUA,
363372 collectionVerified,
364373 createCollection,
365374 programmable,
@@ -372,6 +381,8 @@ export const makeMintTwoAta = async ({
372381 royaltyBps ?: number ;
373382 creators ?: CreatorInput [ ] ;
374383 collection ?: Keypair ;
384+ /** Must pass (if not owner) to verify collection */
385+ collectionUA ?: Keypair ;
375386 collectionVerified ?: boolean ;
376387 createCollection ?: boolean ;
377388 programmable ?: boolean ;
@@ -385,6 +396,7 @@ export const makeMintTwoAta = async ({
385396 royaltyBps,
386397 creators,
387398 collection,
399+ collectionUA,
388400 collectionVerified,
389401 createCollection,
390402 programmable,
@@ -400,3 +412,5 @@ export const makeMintTwoAta = async ({
400412
401413 return { mint, metadata, ata, otherAta, masterEdition, collectionInfo } ;
402414} ;
415+ 1 ;
416+ export type MintTwoAta = Awaited < ReturnType < typeof makeMintTwoAta > > ;
0 commit comments