@metaplex-foundation/mpl-core
Advanced tools
Comparing version 1.0.0-alpha.5 to 1.0.0-alpha.6
@@ -5,1 +5,2 @@ export * from './state'; | ||
export * from './authority'; | ||
export * from './fetch'; |
@@ -21,2 +21,3 @@ "use strict"; | ||
__exportStar(require("./authority"), exports); | ||
__exportStar(require("./fetch"), exports); | ||
//# sourceMappingURL=index.js.map |
import { PublicKey } from '@metaplex-foundation/umi'; | ||
import { AssetV1, CollectionV1, PluginType } from '../generated'; | ||
import { PluginsList } from '../plugins'; | ||
export type AssetPluginKey = keyof PluginsList; | ||
import { AssetPluginsList } from '../plugins'; | ||
export type AssetPluginKey = keyof AssetPluginsList; | ||
/** | ||
@@ -6,0 +6,0 @@ * Convert a plugin type to a key for the asset plugins. |
@@ -69,3 +69,6 @@ "use strict"; | ||
return { | ||
...collection, | ||
...{ | ||
...collection, | ||
masterEdition: undefined, // master edition can only be on the collection | ||
}, | ||
...asset, | ||
@@ -72,0 +75,0 @@ ...externalPluginAdapters, |
import { Serializer } from '@metaplex-foundation/umi/serializers'; | ||
import { PluginHeaderV1 } from '../generated'; | ||
import { AssetV1AccountData as GenAssetV1AccountData, AssetV1AccountDataArgs as GenAssetV1AccountDataArgs } from '../generated/types/assetV1AccountData'; | ||
import { PluginsList, UpdateAuthority } from '../plugins'; | ||
import { AssetPluginsList, UpdateAuthority } from '../plugins'; | ||
import { ExternalPluginAdaptersList } from '../plugins/externalPluginAdapters'; | ||
export type AssetV1AccountData = Omit<GenAssetV1AccountData, 'updateAuthority'> & PluginsList & ExternalPluginAdaptersList & { | ||
export type AssetV1AccountData = Omit<GenAssetV1AccountData, 'updateAuthority'> & AssetPluginsList & ExternalPluginAdaptersList & { | ||
pluginHeader?: Omit<PluginHeaderV1, 'publicKey' | 'header'>; | ||
updateAuthority: UpdateAuthority; | ||
}; | ||
export type AssetV1AccountDataArgs = Omit<GenAssetV1AccountDataArgs, 'updateAuthority'> & PluginsList & { | ||
export type AssetV1AccountDataArgs = Omit<GenAssetV1AccountDataArgs, 'updateAuthority'> & AssetPluginsList & { | ||
pluginHeader?: Omit<PluginHeaderV1, 'publicKey' | 'header'>; | ||
@@ -12,0 +12,0 @@ updateAuthority: UpdateAuthority; |
import { Serializer } from '@metaplex-foundation/umi/serializers'; | ||
import { PluginHeaderV1 } from '../generated'; | ||
import { CollectionV1AccountData as GenCollectionV1AccountData, CollectionV1AccountDataArgs as GenCollectionV1AccountDataArgs } from '../generated/types/collectionV1AccountData'; | ||
import { ExternalPluginAdaptersList, PluginsList } from '../plugins'; | ||
export type CollectionV1AccountData = GenCollectionV1AccountData & PluginsList & ExternalPluginAdaptersList & { | ||
import { CollectionPluginsList, ExternalPluginAdaptersList } from '../plugins'; | ||
export type CollectionV1AccountData = GenCollectionV1AccountData & CollectionPluginsList & ExternalPluginAdaptersList & { | ||
pluginHeader?: Omit<PluginHeaderV1, 'publicKey' | 'header'>; | ||
}; | ||
export type CollectionV1AccountDataArgs = Omit<GenCollectionV1AccountDataArgs, 'updateAuthority'> & PluginsList & { | ||
export type CollectionV1AccountDataArgs = Omit<GenCollectionV1AccountDataArgs, 'updateAuthority'> & CollectionPluginsList & { | ||
pluginHeader?: Omit<PluginHeaderV1, 'publicKey' | 'header'>; | ||
}; | ||
export declare const getCollectionV1AccountDataSerializer: () => Serializer<CollectionV1AccountDataArgs, CollectionV1AccountData>; |
@@ -8,2 +8,2 @@ import { Context } from '@metaplex-foundation/umi'; | ||
}; | ||
export declare const addPlugin: (context: Pick<Context, 'payer' | 'programs' | 'identity'>, { plugin, ...args }: AddPluginArgs) => import("@metaplex-foundation/umi").TransactionBuilder; | ||
export declare const addPlugin: (context: Pick<Context, 'payer' | 'programs'>, { plugin, ...args }: AddPluginArgs) => import("@metaplex-foundation/umi").TransactionBuilder; |
@@ -11,2 +11,2 @@ import { Context } from '@metaplex-foundation/umi'; | ||
}; | ||
export declare const approvePluginAuthority: (context: Pick<Context, 'payer' | 'programs' | 'identity'>, { plugin, newAuthority, ...args }: ApprovePluginAuthorityArgs) => import("@metaplex-foundation/umi").TransactionBuilder; | ||
export declare const approvePluginAuthority: (context: Pick<Context, 'payer' | 'programs'>, { plugin, newAuthority, ...args }: ApprovePluginAuthorityArgs) => import("@metaplex-foundation/umi").TransactionBuilder; |
@@ -7,2 +7,2 @@ import { Context } from '@metaplex-foundation/umi'; | ||
}; | ||
export declare const burn: (context: Pick<Context, 'payer' | 'programs' | 'eddsa' | 'identity'>, { asset, collection, ...args }: BurnArgs) => import("@metaplex-foundation/umi").TransactionBuilder; | ||
export declare const burn: (context: Pick<Context, 'payer' | 'programs' | 'eddsa'>, { asset, collection, ...args }: BurnArgs) => import("@metaplex-foundation/umi").TransactionBuilder; |
@@ -11,2 +11,2 @@ import { Context } from '@metaplex-foundation/umi'; | ||
}; | ||
export declare const addCollectionPlugin: (context: Pick<Context, 'payer' | 'programs' | 'eddsa' | 'identity'>, { plugin, ...args }: AddCollectionPluginArgs) => import("@metaplex-foundation/umi").TransactionBuilder; | ||
export declare const addCollectionPlugin: (context: Pick<Context, 'payer' | 'programs'>, { plugin, ...args }: AddCollectionPluginArgs) => import("@metaplex-foundation/umi").TransactionBuilder; |
@@ -10,2 +10,2 @@ import { Context } from '@metaplex-foundation/umi'; | ||
}; | ||
export declare const approveCollectionPluginAuthority: (context: Pick<Context, 'payer' | 'programs' | 'identity'>, { plugin, newAuthority, ...args }: ApproveCollectionPluginAuthorityArgs) => import("@metaplex-foundation/umi").TransactionBuilder; | ||
export declare const approveCollectionPluginAuthority: (context: Pick<Context, 'payer' | 'programs'>, { plugin, newAuthority, ...args }: ApproveCollectionPluginAuthorityArgs) => import("@metaplex-foundation/umi").TransactionBuilder; |
@@ -9,2 +9,2 @@ import { Context } from '@metaplex-foundation/umi'; | ||
}; | ||
export declare const createCollection: (context: Pick<Context, 'payer' | 'programs' | 'eddsa' | 'identity'>, { plugins, ...args }: CreateCollectionArgs) => import("@metaplex-foundation/umi").TransactionBuilder; | ||
export declare const createCollection: (context: Pick<Context, 'payer' | 'programs'>, { plugins, ...args }: CreateCollectionArgs) => import("@metaplex-foundation/umi").TransactionBuilder; |
@@ -10,2 +10,2 @@ import { Context } from '@metaplex-foundation/umi'; | ||
}; | ||
export declare const removeCollectionPlugin: (context: Pick<Context, 'payer' | 'programs' | 'eddsa' | 'identity'>, { plugin, ...args }: RemoveCollectionPluginArgs) => import("@metaplex-foundation/umi").TransactionBuilder; | ||
export declare const removeCollectionPlugin: (context: Pick<Context, 'payer' | 'programs'>, { plugin, ...args }: RemoveCollectionPluginArgs) => import("@metaplex-foundation/umi").TransactionBuilder; |
@@ -8,2 +8,2 @@ import { Context } from '@metaplex-foundation/umi'; | ||
}; | ||
export declare const revokeCollectionPluginAuthority: (context: Pick<Context, 'payer' | 'programs' | 'identity'>, { plugin, ...args }: RevokeCollectionPluginAuthorityArgs) => import("@metaplex-foundation/umi").TransactionBuilder; | ||
export declare const revokeCollectionPluginAuthority: (context: Pick<Context, 'payer' | 'programs'>, { plugin, ...args }: RevokeCollectionPluginAuthorityArgs) => import("@metaplex-foundation/umi").TransactionBuilder; |
@@ -7,2 +7,2 @@ import { Context } from '@metaplex-foundation/umi'; | ||
}; | ||
export declare const updateCollection: (context: Pick<Context, 'payer' | 'programs' | 'eddsa' | 'identity'>, { name, uri, ...args }: UpdateCollectionArgs) => import("@metaplex-foundation/umi").TransactionBuilder; | ||
export declare const updateCollection: (context: Pick<Context, 'payer' | 'programs'>, { name, uri, ...args }: UpdateCollectionArgs) => import("@metaplex-foundation/umi").TransactionBuilder; |
@@ -9,2 +9,2 @@ import { Context } from '@metaplex-foundation/umi'; | ||
}; | ||
export declare const updateCollectionPlugin: (context: Pick<Context, 'payer' | 'programs' | 'identity'>, { plugin, ...args }: UpdateCollectionPluginArgs) => import("@metaplex-foundation/umi").TransactionBuilder; | ||
export declare const updateCollectionPlugin: (context: Pick<Context, 'payer' | 'programs'>, { plugin, ...args }: UpdateCollectionPluginArgs) => import("@metaplex-foundation/umi").TransactionBuilder; |
@@ -9,2 +9,3 @@ "use strict"; | ||
const authority_1 = require("../authority"); | ||
const approvePluginAuthority_1 = require("./approvePluginAuthority"); | ||
function legacyDelegate(context, asset, targetDelegate) { | ||
@@ -33,6 +34,9 @@ const definedPlugins = (({ freezeDelegate, transferDelegate, burnDelegate, }) => ({ | ||
const plugType = (0, plugins_1.pluginKeyToPluginType)(pluginKey); | ||
txBuilder = txBuilder.add((0, generated_1.approvePluginAuthorityV1)(context, { | ||
txBuilder = txBuilder.add((0, approvePluginAuthority_1.approvePluginAuthority)(context, { | ||
asset: asset.publicKey, | ||
pluginType: generated_1.PluginType[plugType], | ||
newAuthority: (0, authority_1.addressPluginAuthority)(targetDelegate), | ||
plugin: { type: plugType }, | ||
newAuthority: { | ||
type: 'Address', | ||
address: targetDelegate, | ||
}, | ||
})); | ||
@@ -39,0 +43,0 @@ }); |
@@ -10,2 +10,2 @@ import { Context } from '@metaplex-foundation/umi'; | ||
}; | ||
export declare const removePlugin: (context: Pick<Context, 'payer' | 'programs' | 'identity'>, { plugin, ...args }: RemovePluginArgs) => import("@metaplex-foundation/umi").TransactionBuilder; | ||
export declare const removePlugin: (context: Pick<Context, 'payer' | 'programs'>, { plugin, ...args }: RemovePluginArgs) => import("@metaplex-foundation/umi").TransactionBuilder; |
@@ -9,2 +9,2 @@ import { Context } from '@metaplex-foundation/umi'; | ||
}; | ||
export declare const revokePluginAuthority: (context: Pick<Context, 'payer' | 'programs' | 'identity'>, { plugin, ...args }: RevokePluginAuthorityArgs) => import("@metaplex-foundation/umi").TransactionBuilder; | ||
export declare const revokePluginAuthority: (context: Pick<Context, 'payer' | 'programs'>, { plugin, ...args }: RevokePluginAuthorityArgs) => import("@metaplex-foundation/umi").TransactionBuilder; |
@@ -7,2 +7,2 @@ import { Context } from '@metaplex-foundation/umi'; | ||
}; | ||
export declare const transfer: (context: Pick<Context, 'payer' | 'programs' | 'eddsa' | 'identity'>, { asset, collection, ...args }: TransferArgs) => import("@metaplex-foundation/umi").TransactionBuilder; | ||
export declare const transfer: (context: Pick<Context, 'payer' | 'programs' | 'eddsa'>, { asset, collection, ...args }: TransferArgs) => import("@metaplex-foundation/umi").TransactionBuilder; |
@@ -9,2 +9,2 @@ import { Context } from '@metaplex-foundation/umi'; | ||
}; | ||
export declare const update: (context: Pick<Context, 'payer' | 'programs' | 'eddsa' | 'identity'>, { asset, collection, name, uri, ...args }: UpdateArgs) => import("@metaplex-foundation/umi").TransactionBuilder; | ||
export declare const update: (context: Pick<Context, 'payer' | 'programs' | 'eddsa'>, { asset, collection, name, uri, ...args }: UpdateArgs) => import("@metaplex-foundation/umi").TransactionBuilder; |
@@ -9,2 +9,2 @@ import { Context } from '@metaplex-foundation/umi'; | ||
}; | ||
export declare const updatePlugin: (context: Pick<Context, 'payer' | 'programs' | 'identity'>, { plugin, ...args }: UpdatePluginArgs) => import("@metaplex-foundation/umi").TransactionBuilder; | ||
export declare const updatePlugin: (context: Pick<Context, 'payer' | 'programs'>, { plugin, ...args }: UpdatePluginArgs) => import("@metaplex-foundation/umi").TransactionBuilder; |
@@ -99,16 +99,21 @@ import { BurnDelegate, FreezeDelegate, PermanentFreezeDelegate, TransferDelegate, UpdateDelegate, Attributes, PermanentTransferDelegate, PermanentBurnDelegate, Edition, basePluginAuthority as pluginAuthority, baseUpdateAuthority as updateAuthority, baseRuleSet as ruleSet, FreezeDelegateArgs, UpdateDelegateArgs, AttributesArgs, PermanentFreezeDelegateArgs, EditionArgs, BasePluginAuthority, BaseRoyaltiesArgs, BaseMasterEditionArgs, AddBlocker, ImmutableMetadata } from '../generated'; | ||
export type ImmutableMetadataPlugin = BasePlugin & ImmutableMetadata; | ||
export type PluginsList = { | ||
export type CommonPluginsList = { | ||
attributes?: AttributesPlugin; | ||
royalties?: RoyaltiesPlugin; | ||
freezeDelegate?: FreezeDelegatePlugin; | ||
burnDelegate?: BurnDelegatePlugin; | ||
transferDelegate?: TransferDelegatePlugin; | ||
updateDelegate?: UpdateDelegatePlugin; | ||
attributes?: AttributesPlugin; | ||
permanentFreezeDelegate?: PermanentFreezeDelegatePlugin; | ||
permanentTransferDelegate?: PermanentTransferDelegatePlugin; | ||
permanentBurnDelegate?: PermanentBurnDelegatePlugin; | ||
edition?: EditionPlugin; | ||
masterEdition?: MasterEditionPlugin; | ||
addBlocker?: AddBlockerPlugin; | ||
immutableMetadata?: ImmutableMetadataPlugin; | ||
}; | ||
export type AssetPluginsList = { | ||
freezeDelegate?: FreezeDelegatePlugin; | ||
burnDelegate?: BurnDelegatePlugin; | ||
transferDelegate?: TransferDelegatePlugin; | ||
edition?: EditionPlugin; | ||
} & CommonPluginsList; | ||
export type CollectionPluginsList = { | ||
masterEdition?: MasterEditionPlugin; | ||
} & CommonPluginsList; | ||
export type PluginsList = AssetPluginsList & CollectionPluginsList; |
{ | ||
"name": "@metaplex-foundation/mpl-core", | ||
"version": "1.0.0-alpha.5", | ||
"version": "1.0.0-alpha.6", | ||
"description": "Digital Assets", | ||
@@ -5,0 +5,0 @@ "main": "dist/src/index.js", |
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
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
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
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
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
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
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
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
718228
464
11531
1