Skip to content

Commit

Permalink
Showing 67 changed files with 826 additions and 902 deletions.
14 changes: 4 additions & 10 deletions clients/js/src/generated/instructions/addCollectionPlugin.ts
Original file line number Diff line number Diff line change
@@ -25,11 +25,7 @@ import {
ResolvedAccountsWithIndices,
getAccountMetasAndSigners,
} from '../shared';
import {
AddPluginArgs,
AddPluginArgsArgs,
getAddPluginArgsSerializer,
} from '../types';
import { Plugin, PluginArgs, getPluginSerializer } from '../types';

// Accounts.
export type AddCollectionPluginInstructionAccounts = {
@@ -48,12 +44,10 @@ export type AddCollectionPluginInstructionAccounts = {
// Data.
export type AddCollectionPluginInstructionData = {
discriminator: number;
addPluginArgs: AddPluginArgs;
plugin: Plugin;
};

export type AddCollectionPluginInstructionDataArgs = {
addPluginArgs: AddPluginArgsArgs;
};
export type AddCollectionPluginInstructionDataArgs = { plugin: PluginArgs };

export function getAddCollectionPluginInstructionDataSerializer(): Serializer<
AddCollectionPluginInstructionDataArgs,
@@ -67,7 +61,7 @@ export function getAddCollectionPluginInstructionDataSerializer(): Serializer<
struct<AddCollectionPluginInstructionData>(
[
['discriminator', u8()],
['addPluginArgs', getAddPluginArgsSerializer()],
['plugin', getPluginSerializer()],
],
{ description: 'AddCollectionPluginInstructionData' }
),
Original file line number Diff line number Diff line change
@@ -26,9 +26,12 @@ import {
getAccountMetasAndSigners,
} from '../shared';
import {
AddPluginAuthorityArgs,
AddPluginAuthorityArgsArgs,
getAddPluginAuthorityArgsSerializer,
Authority,
AuthorityArgs,
PluginType,
PluginTypeArgs,
getAuthoritySerializer,
getPluginTypeSerializer,
} from '../types';

// Accounts.
@@ -48,11 +51,13 @@ export type AddCollectionPluginAuthorityInstructionAccounts = {
// Data.
export type AddCollectionPluginAuthorityInstructionData = {
discriminator: number;
addPluginAuthorityArgs: AddPluginAuthorityArgs;
pluginType: PluginType;
newAuthority: Authority;
};

export type AddCollectionPluginAuthorityInstructionDataArgs = {
addPluginAuthorityArgs: AddPluginAuthorityArgsArgs;
pluginType: PluginTypeArgs;
newAuthority: AuthorityArgs;
};

export function getAddCollectionPluginAuthorityInstructionDataSerializer(): Serializer<
@@ -67,7 +72,8 @@ export function getAddCollectionPluginAuthorityInstructionDataSerializer(): Seri
struct<AddCollectionPluginAuthorityInstructionData>(
[
['discriminator', u8()],
['addPluginAuthorityArgs', getAddPluginAuthorityArgsSerializer()],
['pluginType', getPluginTypeSerializer()],
['newAuthority', getAuthoritySerializer()],
],
{ description: 'AddCollectionPluginAuthorityInstructionData' }
),
12 changes: 4 additions & 8 deletions clients/js/src/generated/instructions/addPlugin.ts
Original file line number Diff line number Diff line change
@@ -25,11 +25,7 @@ import {
ResolvedAccountsWithIndices,
getAccountMetasAndSigners,
} from '../shared';
import {
AddPluginArgs,
AddPluginArgsArgs,
getAddPluginArgsSerializer,
} from '../types';
import { Plugin, PluginArgs, getPluginSerializer } from '../types';

// Accounts.
export type AddPluginInstructionAccounts = {
@@ -50,10 +46,10 @@ export type AddPluginInstructionAccounts = {
// Data.
export type AddPluginInstructionData = {
discriminator: number;
addPluginArgs: AddPluginArgs;
plugin: Plugin;
};

export type AddPluginInstructionDataArgs = { addPluginArgs: AddPluginArgsArgs };
export type AddPluginInstructionDataArgs = { plugin: PluginArgs };

export function getAddPluginInstructionDataSerializer(): Serializer<
AddPluginInstructionDataArgs,
@@ -67,7 +63,7 @@ export function getAddPluginInstructionDataSerializer(): Serializer<
struct<AddPluginInstructionData>(
[
['discriminator', u8()],
['addPluginArgs', getAddPluginArgsSerializer()],
['plugin', getPluginSerializer()],
],
{ description: 'AddPluginInstructionData' }
),
18 changes: 12 additions & 6 deletions clients/js/src/generated/instructions/addPluginAuthority.ts
Original file line number Diff line number Diff line change
@@ -26,9 +26,12 @@ import {
getAccountMetasAndSigners,
} from '../shared';
import {
AddPluginAuthorityArgs,
AddPluginAuthorityArgsArgs,
getAddPluginAuthorityArgsSerializer,
Authority,
AuthorityArgs,
PluginType,
PluginTypeArgs,
getAuthoritySerializer,
getPluginTypeSerializer,
} from '../types';

// Accounts.
@@ -50,11 +53,13 @@ export type AddPluginAuthorityInstructionAccounts = {
// Data.
export type AddPluginAuthorityInstructionData = {
discriminator: number;
addPluginAuthorityArgs: AddPluginAuthorityArgs;
pluginType: PluginType;
newAuthority: Authority;
};

export type AddPluginAuthorityInstructionDataArgs = {
addPluginAuthorityArgs: AddPluginAuthorityArgsArgs;
pluginType: PluginTypeArgs;
newAuthority: AuthorityArgs;
};

export function getAddPluginAuthorityInstructionDataSerializer(): Serializer<
@@ -69,7 +74,8 @@ export function getAddPluginAuthorityInstructionDataSerializer(): Serializer<
struct<AddPluginAuthorityInstructionData>(
[
['discriminator', u8()],
['addPluginAuthorityArgs', getAddPluginAuthorityArgsSerializer()],
['pluginType', getPluginTypeSerializer()],
['newAuthority', getAuthoritySerializer()],
],
{ description: 'AddPluginAuthorityInstructionData' }
),
39 changes: 32 additions & 7 deletions clients/js/src/generated/instructions/burnCollection.ts
Original file line number Diff line number Diff line change
@@ -8,6 +8,8 @@

import {
Context,
Option,
OptionOrNullable,
Pda,
PublicKey,
Signer,
@@ -17,6 +19,7 @@ import {
import {
Serializer,
mapSerializer,
option,
struct,
u8,
} from '@metaplex-foundation/umi/serializers';
@@ -25,6 +28,11 @@ import {
ResolvedAccountsWithIndices,
getAccountMetasAndSigners,
} from '../shared';
import {
CompressionProof,
CompressionProofArgs,
getCompressionProofSerializer,
} from '../types';

// Accounts.
export type BurnCollectionInstructionAccounts = {
@@ -39,9 +47,14 @@ export type BurnCollectionInstructionAccounts = {
};

// Data.
export type BurnCollectionInstructionData = { discriminator: number };
export type BurnCollectionInstructionData = {
discriminator: number;
compressionProof: Option<CompressionProof>;
};

export type BurnCollectionInstructionDataArgs = {};
export type BurnCollectionInstructionDataArgs = {
compressionProof: OptionOrNullable<CompressionProofArgs>;
};

export function getBurnCollectionInstructionDataSerializer(): Serializer<
BurnCollectionInstructionDataArgs,
@@ -52,20 +65,27 @@ export function getBurnCollectionInstructionDataSerializer(): Serializer<
any,
BurnCollectionInstructionData
>(
struct<BurnCollectionInstructionData>([['discriminator', u8()]], {
description: 'BurnCollectionInstructionData',
}),
struct<BurnCollectionInstructionData>(
[
['discriminator', u8()],
['compressionProof', option(getCompressionProofSerializer())],
],
{ description: 'BurnCollectionInstructionData' }
),
(value) => ({ ...value, discriminator: 13 })
) as Serializer<
BurnCollectionInstructionDataArgs,
BurnCollectionInstructionData
>;
}

// Args.
export type BurnCollectionInstructionArgs = BurnCollectionInstructionDataArgs;

// Instruction.
export function burnCollection(
context: Pick<Context, 'identity' | 'programs'>,
input: BurnCollectionInstructionAccounts
input: BurnCollectionInstructionAccounts & BurnCollectionInstructionArgs
): TransactionBuilder {
// Program ID.
const programId = context.programs.getPublicKey(
@@ -85,6 +105,9 @@ export function burnCollection(
},
};

// Arguments.
const resolvedArgs: BurnCollectionInstructionArgs = { ...input };

// Default values.
if (!resolvedAccounts.authority.value) {
resolvedAccounts.authority.value = context.identity;
@@ -103,7 +126,9 @@ export function burnCollection(
);

// Data.
const data = getBurnCollectionInstructionDataSerializer().serialize({});
const data = getBurnCollectionInstructionDataSerializer().serialize(
resolvedArgs as BurnCollectionInstructionDataArgs
);

// Bytes Created On Chain.
const bytesCreatedOnChain = 0;
12 changes: 4 additions & 8 deletions clients/js/src/generated/instructions/removeCollectionPlugin.ts
Original file line number Diff line number Diff line change
@@ -25,11 +25,7 @@ import {
ResolvedAccountsWithIndices,
getAccountMetasAndSigners,
} from '../shared';
import {
RemovePluginArgs,
RemovePluginArgsArgs,
getRemovePluginArgsSerializer,
} from '../types';
import { PluginType, PluginTypeArgs, getPluginTypeSerializer } from '../types';

// Accounts.
export type RemoveCollectionPluginInstructionAccounts = {
@@ -48,11 +44,11 @@ export type RemoveCollectionPluginInstructionAccounts = {
// Data.
export type RemoveCollectionPluginInstructionData = {
discriminator: number;
removePluginArgs: RemovePluginArgs;
pluginType: PluginType;
};

export type RemoveCollectionPluginInstructionDataArgs = {
removePluginArgs: RemovePluginArgsArgs;
pluginType: PluginTypeArgs;
};

export function getRemoveCollectionPluginInstructionDataSerializer(): Serializer<
@@ -67,7 +63,7 @@ export function getRemoveCollectionPluginInstructionDataSerializer(): Serializer
struct<RemoveCollectionPluginInstructionData>(
[
['discriminator', u8()],
['removePluginArgs', getRemovePluginArgsSerializer()],
['pluginType', getPluginTypeSerializer()],
],
{ description: 'RemoveCollectionPluginInstructionData' }
),
Original file line number Diff line number Diff line change
@@ -26,9 +26,12 @@ import {
getAccountMetasAndSigners,
} from '../shared';
import {
RemovePluginAuthorityArgs,
RemovePluginAuthorityArgsArgs,
getRemovePluginAuthorityArgsSerializer,
Authority,
AuthorityArgs,
PluginType,
PluginTypeArgs,
getAuthoritySerializer,
getPluginTypeSerializer,
} from '../types';

// Accounts.
@@ -48,11 +51,13 @@ export type RemoveCollectionPluginAuthorityInstructionAccounts = {
// Data.
export type RemoveCollectionPluginAuthorityInstructionData = {
discriminator: number;
removePluginAuthorityArgs: RemovePluginAuthorityArgs;
pluginType: PluginType;
authorityToRemove: Authority;
};

export type RemoveCollectionPluginAuthorityInstructionDataArgs = {
removePluginAuthorityArgs: RemovePluginAuthorityArgsArgs;
pluginType: PluginTypeArgs;
authorityToRemove: AuthorityArgs;
};

export function getRemoveCollectionPluginAuthorityInstructionDataSerializer(): Serializer<
@@ -67,7 +72,8 @@ export function getRemoveCollectionPluginAuthorityInstructionDataSerializer(): S
struct<RemoveCollectionPluginAuthorityInstructionData>(
[
['discriminator', u8()],
['removePluginAuthorityArgs', getRemovePluginAuthorityArgsSerializer()],
['pluginType', getPluginTypeSerializer()],
['authorityToRemove', getAuthoritySerializer()],
],
{ description: 'RemoveCollectionPluginAuthorityInstructionData' }
),
14 changes: 4 additions & 10 deletions clients/js/src/generated/instructions/removePlugin.ts
Original file line number Diff line number Diff line change
@@ -25,11 +25,7 @@ import {
ResolvedAccountsWithIndices,
getAccountMetasAndSigners,
} from '../shared';
import {
RemovePluginArgs,
RemovePluginArgsArgs,
getRemovePluginArgsSerializer,
} from '../types';
import { PluginType, PluginTypeArgs, getPluginTypeSerializer } from '../types';

// Accounts.
export type RemovePluginInstructionAccounts = {
@@ -50,12 +46,10 @@ export type RemovePluginInstructionAccounts = {
// Data.
export type RemovePluginInstructionData = {
discriminator: number;
removePluginArgs: RemovePluginArgs;
pluginType: PluginType;
};

export type RemovePluginInstructionDataArgs = {
removePluginArgs: RemovePluginArgsArgs;
};
export type RemovePluginInstructionDataArgs = { pluginType: PluginTypeArgs };

export function getRemovePluginInstructionDataSerializer(): Serializer<
RemovePluginInstructionDataArgs,
@@ -69,7 +63,7 @@ export function getRemovePluginInstructionDataSerializer(): Serializer<
struct<RemovePluginInstructionData>(
[
['discriminator', u8()],
['removePluginArgs', getRemovePluginArgsSerializer()],
['pluginType', getPluginTypeSerializer()],
],
{ description: 'RemovePluginInstructionData' }
),
Loading

0 comments on commit b83d448

Please sign in to comment.