@metaplex-foundation/mpl-core
Advanced tools
Comparing version 0.4.5 to 0.4.6
@@ -21,2 +21,3 @@ /** | ||
export * from './key'; | ||
export * from './masterEdition'; | ||
export * from './permanentBurnDelegate'; | ||
@@ -23,0 +24,0 @@ export * from './permanentFreezeDelegate'; |
@@ -37,2 +37,3 @@ "use strict"; | ||
__exportStar(require("./key"), exports); | ||
__exportStar(require("./masterEdition"), exports); | ||
__exportStar(require("./permanentBurnDelegate"), exports); | ||
@@ -39,0 +40,0 @@ __exportStar(require("./permanentFreezeDelegate"), exports); |
@@ -9,3 +9,3 @@ /** | ||
import { GetDataEnumKind, GetDataEnumKindContent, Serializer } from '@metaplex-foundation/umi/serializers'; | ||
import { Attributes, AttributesArgs, BurnDelegate, BurnDelegateArgs, Edition, EditionArgs, FreezeDelegate, FreezeDelegateArgs, PermanentBurnDelegate, PermanentBurnDelegateArgs, PermanentFreezeDelegate, PermanentFreezeDelegateArgs, PermanentTransferDelegate, PermanentTransferDelegateArgs, Royalties, RoyaltiesArgs, TransferDelegate, TransferDelegateArgs, UpdateDelegate, UpdateDelegateArgs } from '.'; | ||
import { Attributes, AttributesArgs, BurnDelegate, BurnDelegateArgs, Edition, EditionArgs, FreezeDelegate, FreezeDelegateArgs, MasterEdition, MasterEditionArgs, PermanentBurnDelegate, PermanentBurnDelegateArgs, PermanentFreezeDelegate, PermanentFreezeDelegateArgs, PermanentTransferDelegate, PermanentTransferDelegateArgs, Royalties, RoyaltiesArgs, TransferDelegate, TransferDelegateArgs, UpdateDelegate, UpdateDelegateArgs } from '.'; | ||
export type Plugin = { | ||
@@ -41,2 +41,5 @@ __kind: 'Royalties'; | ||
fields: [Edition]; | ||
} | { | ||
__kind: 'MasterEdition'; | ||
fields: [MasterEdition]; | ||
}; | ||
@@ -73,2 +76,5 @@ export type PluginArgs = { | ||
fields: [EditionArgs]; | ||
} | { | ||
__kind: 'MasterEdition'; | ||
fields: [MasterEditionArgs]; | ||
}; | ||
@@ -86,4 +92,5 @@ export declare function getPluginSerializer(): Serializer<PluginArgs, Plugin>; | ||
export declare function plugin(kind: 'Edition', data: GetDataEnumKindContent<PluginArgs, 'Edition'>['fields']): GetDataEnumKind<PluginArgs, 'Edition'>; | ||
export declare function plugin(kind: 'MasterEdition', data: GetDataEnumKindContent<PluginArgs, 'MasterEdition'>['fields']): GetDataEnumKind<PluginArgs, 'MasterEdition'>; | ||
export declare function isPlugin<K extends Plugin['__kind']>(kind: K, value: Plugin): value is Plugin & { | ||
__kind: K; | ||
}; |
@@ -75,2 +75,8 @@ "use strict"; | ||
], | ||
[ | ||
'MasterEdition', | ||
(0, serializers_1.struct)([ | ||
['fields', (0, serializers_1.tuple)([(0, _1.getMasterEditionSerializer)()])], | ||
]), | ||
], | ||
], { description: 'Plugin' }); | ||
@@ -77,0 +83,0 @@ } |
@@ -19,5 +19,6 @@ /** | ||
PermanentBurnDelegate = 8, | ||
Edition = 9 | ||
Edition = 9, | ||
MasterEdition = 10 | ||
} | ||
export type PluginTypeArgs = PluginType; | ||
export declare function getPluginTypeSerializer(): Serializer<PluginTypeArgs, PluginType>; |
@@ -24,2 +24,3 @@ "use strict"; | ||
PluginType[PluginType["Edition"] = 9] = "Edition"; | ||
PluginType[PluginType["MasterEdition"] = 10] = "MasterEdition"; | ||
})(PluginType = exports.PluginType || (exports.PluginType = {})); | ||
@@ -26,0 +27,0 @@ function getPluginTypeSerializer() { |
@@ -1,2 +0,2 @@ | ||
import { PluginHeaderV1, Plugin as BasePlugin, RegistryRecord, PluginAuthorityPair, PluginAuthority, RoyaltiesArgs, FreezeDelegateArgs, AttributesArgs, PermanentFreezeDelegateArgs, UpdateDelegateArgs, EditionArgs } from './generated'; | ||
import { PluginHeaderV1, Plugin as BasePlugin, RegistryRecord, PluginAuthorityPair, PluginAuthority, RoyaltiesArgs, FreezeDelegateArgs, AttributesArgs, PermanentFreezeDelegateArgs, UpdateDelegateArgs, EditionArgs, MasterEditionArgs } from './generated'; | ||
import { BasePluginAuthority, PluginsList } from './types'; | ||
@@ -33,2 +33,5 @@ export declare function formPluginHeaderV1(pluginRegistryOffset: bigint): Omit<PluginHeaderV1, 'publicKey' | 'header'>; | ||
data: EditionArgs; | ||
} | { | ||
type: 'MasterEdition'; | ||
data: MasterEditionArgs; | ||
}; | ||
@@ -46,2 +49,2 @@ export declare function createPlugin(args: CreatePluginArgs): BasePlugin; | ||
export declare function registryRecordsToPluginsList(registryRecords: RegistryRecord[], accountData: Uint8Array): PluginsList; | ||
export declare function pluginKeyToPluginType(pluginKey: keyof PluginsList): "Attributes" | "BurnDelegate" | "Royalties" | "FreezeDelegate" | "TransferDelegate" | "UpdateDelegate" | "PermanentFreezeDelegate" | "PermanentTransferDelegate" | "PermanentBurnDelegate" | "Edition"; | ||
export declare function pluginKeyToPluginType(pluginKey: keyof PluginsList): "Attributes" | "BurnDelegate" | "Royalties" | "FreezeDelegate" | "TransferDelegate" | "UpdateDelegate" | "PermanentFreezeDelegate" | "PermanentTransferDelegate" | "PermanentBurnDelegate" | "Edition" | "MasterEdition"; |
import { PublicKey } from '@metaplex-foundation/umi'; | ||
import { PluginAuthority, BurnDelegate, FreezeDelegate, PermanentFreezeDelegate, Royalties, TransferDelegate, UpdateDelegate, Attributes, PermanentTransferDelegate, UpdateAuthority, PermanentBurnDelegate, Edition } from './generated'; | ||
import { PluginAuthority, BurnDelegate, FreezeDelegate, PermanentFreezeDelegate, Royalties, TransferDelegate, UpdateDelegate, Attributes, PermanentTransferDelegate, UpdateAuthority, PermanentBurnDelegate, Edition, MasterEdition } from './generated'; | ||
export type BasePluginAuthority = { | ||
@@ -27,2 +27,3 @@ type: PluginAuthorityType; | ||
export type EditionPlugin = BasePlugin & Edition; | ||
export type MasterEditionPlugin = BasePlugin & MasterEdition; | ||
export type PluginsList = { | ||
@@ -39,2 +40,3 @@ royalties?: RoyaltiesPlugin; | ||
edition?: EditionPlugin; | ||
masterEdition?: MasterEditionPlugin; | ||
}; |
{ | ||
"name": "@metaplex-foundation/mpl-core", | ||
"version": "0.4.5", | ||
"version": "0.4.6", | ||
"description": "Digital Assets", | ||
@@ -51,3 +51,4 @@ "main": "dist/src/index.js", | ||
"src/": "dist/src/", | ||
"test/": "dist/test/" | ||
"test/": "dist/test/", | ||
"bench/": "dist/bench/" | ||
} | ||
@@ -61,2 +62,3 @@ } | ||
"test": "ava --timeout 600s", | ||
"bench": "rm -f output.json && ava ./dist/bench/*.js --serial --no-worker-threads", | ||
"lint": "eslint --ext js,ts,tsx src", | ||
@@ -63,0 +65,0 @@ "lint:fix": "eslint --fix --ext js,ts,tsx src", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
395696
260
6434
0