diff --git a/clients/js/src/generated/types/hashablePluginSchema.ts b/clients/js/src/generated/types/hashablePluginSchema.ts new file mode 100644 index 00000000..cfdd5cf0 --- /dev/null +++ b/clients/js/src/generated/types/hashablePluginSchema.ts @@ -0,0 +1,48 @@ +/** + * This code was AUTOGENERATED using the kinobi library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun kinobi to update it. + * + * @see https://github.com/metaplex-foundation/kinobi + */ + +import { + Serializer, + array, + struct, + u64, +} from '@metaplex-foundation/umi/serializers'; +import { + Authority, + AuthorityArgs, + Plugin, + PluginArgs, + getAuthoritySerializer, + getPluginSerializer, +} from '.'; + +export type HashablePluginSchema = { + index: bigint; + authorities: Array; + plugin: Plugin; +}; + +export type HashablePluginSchemaArgs = { + index: number | bigint; + authorities: Array; + plugin: PluginArgs; +}; + +export function getHashablePluginSchemaSerializer(): Serializer< + HashablePluginSchemaArgs, + HashablePluginSchema +> { + return struct( + [ + ['index', u64()], + ['authorities', array(getAuthoritySerializer())], + ['plugin', getPluginSerializer()], + ], + { description: 'HashablePluginSchema' } + ) as Serializer; +} diff --git a/clients/js/src/generated/types/hashedAssetSchema.ts b/clients/js/src/generated/types/hashedAssetSchema.ts index 2ac4339f..0937ab87 100644 --- a/clients/js/src/generated/types/hashedAssetSchema.ts +++ b/clients/js/src/generated/types/hashedAssetSchema.ts @@ -12,17 +12,13 @@ import { bytes, struct, } from '@metaplex-foundation/umi/serializers'; -import { PluginHash, PluginHashArgs, getPluginHashSerializer } from '.'; export type HashedAssetSchema = { assetHash: Uint8Array; - pluginHashes: Array; + pluginHashes: Array; }; -export type HashedAssetSchemaArgs = { - assetHash: Uint8Array; - pluginHashes: Array; -}; +export type HashedAssetSchemaArgs = HashedAssetSchema; export function getHashedAssetSchemaSerializer(): Serializer< HashedAssetSchemaArgs, @@ -31,7 +27,7 @@ export function getHashedAssetSchemaSerializer(): Serializer< return struct( [ ['assetHash', bytes({ size: 32 })], - ['pluginHashes', array(getPluginHashSerializer())], + ['pluginHashes', array(bytes({ size: 32 }))], ], { description: 'HashedAssetSchema' } ) as Serializer; diff --git a/clients/js/src/generated/types/index.ts b/clients/js/src/generated/types/index.ts index 98a18533..49d32f65 100644 --- a/clients/js/src/generated/types/index.ts +++ b/clients/js/src/generated/types/index.ts @@ -14,10 +14,10 @@ export * from './dataState'; export * from './externalPluginRecord'; export * from './extraAccounts'; export * from './freeze'; +export * from './hashablePluginSchema'; export * from './hashedAssetSchema'; export * from './key'; export * from './plugin'; -export * from './pluginHash'; export * from './pluginType'; export * from './registryRecord'; export * from './royalties'; diff --git a/clients/js/src/generated/types/pluginHash.ts b/clients/js/src/generated/types/pluginHash.ts deleted file mode 100644 index 6a458792..00000000 --- a/clients/js/src/generated/types/pluginHash.ts +++ /dev/null @@ -1,33 +0,0 @@ -/** - * This code was AUTOGENERATED using the kinobi library. - * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. - * - * @see https://github.com/metaplex-foundation/kinobi - */ - -import { - Serializer, - bytes, - struct, -} from '@metaplex-foundation/umi/serializers'; - -export type PluginHash = { - pluginAuthoritiesHash: Uint8Array; - pluginHash: Uint8Array; -}; - -export type PluginHashArgs = PluginHash; - -export function getPluginHashSerializer(): Serializer< - PluginHashArgs, - PluginHash -> { - return struct( - [ - ['pluginAuthoritiesHash', bytes({ size: 32 })], - ['pluginHash', bytes({ size: 32 })], - ], - { description: 'PluginHash' } - ) as Serializer; -} diff --git a/clients/rust/src/generated/types/plugin_hash.rs b/clients/rust/src/generated/types/hashable_plugin_schema.rs similarity index 69% rename from clients/rust/src/generated/types/plugin_hash.rs rename to clients/rust/src/generated/types/hashable_plugin_schema.rs index 2d03a632..ab50285c 100644 --- a/clients/rust/src/generated/types/plugin_hash.rs +++ b/clients/rust/src/generated/types/hashable_plugin_schema.rs @@ -5,12 +5,15 @@ //! [https://github.com/metaplex-foundation/kinobi] //! +use crate::generated::types::Authority; +use crate::generated::types::Plugin; use borsh::BorshDeserialize; use borsh::BorshSerialize; #[derive(BorshSerialize, BorshDeserialize, Clone, Debug, Eq, PartialEq)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] -pub struct PluginHash { - pub plugin_authorities_hash: [u8; 32], - pub plugin_hash: [u8; 32], +pub struct HashablePluginSchema { + pub index: u64, + pub authorities: Vec, + pub plugin: Plugin, } diff --git a/clients/rust/src/generated/types/hashed_asset_schema.rs b/clients/rust/src/generated/types/hashed_asset_schema.rs index f282fa66..2bc0f967 100644 --- a/clients/rust/src/generated/types/hashed_asset_schema.rs +++ b/clients/rust/src/generated/types/hashed_asset_schema.rs @@ -5,7 +5,6 @@ //! [https://github.com/metaplex-foundation/kinobi] //! -use crate::generated::types::PluginHash; use borsh::BorshDeserialize; use borsh::BorshSerialize; @@ -13,5 +12,5 @@ use borsh::BorshSerialize; #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub struct HashedAssetSchema { pub asset_hash: [u8; 32], - pub plugin_hashes: Vec, + pub plugin_hashes: Vec<[u8; 32]>, } diff --git a/clients/rust/src/generated/types/mod.rs b/clients/rust/src/generated/types/mod.rs index 29fa601c..b76d7f39 100644 --- a/clients/rust/src/generated/types/mod.rs +++ b/clients/rust/src/generated/types/mod.rs @@ -13,10 +13,10 @@ pub(crate) mod data_state; pub(crate) mod external_plugin_record; pub(crate) mod extra_accounts; pub(crate) mod freeze; +pub(crate) mod hashable_plugin_schema; pub(crate) mod hashed_asset_schema; pub(crate) mod key; pub(crate) mod plugin; -pub(crate) mod plugin_hash; pub(crate) mod plugin_type; pub(crate) mod registry_record; pub(crate) mod royalties; @@ -33,10 +33,10 @@ pub use self::data_state::*; pub use self::external_plugin_record::*; pub use self::extra_accounts::*; pub use self::freeze::*; +pub use self::hashable_plugin_schema::*; pub use self::hashed_asset_schema::*; pub use self::key::*; pub use self::plugin::*; -pub use self::plugin_hash::*; pub use self::plugin_type::*; pub use self::registry_record::*; pub use self::royalties::*; diff --git a/idls/mpl_core.json b/idls/mpl_core.json index 027bfc9d..8b1a9656 100644 --- a/idls/mpl_core.json +++ b/idls/mpl_core.json @@ -1294,26 +1294,26 @@ } }, { - "name": "PluginHash", + "name": "HashablePluginSchema", "type": { "kind": "struct", "fields": [ { - "name": "pluginAuthoritiesHash", + "name": "index", + "type": "u64" + }, + { + "name": "authorities", "type": { - "array": [ - "u8", - 32 - ] + "vec": { + "defined": "Authority" + } } }, { - "name": "pluginHash", + "name": "plugin", "type": { - "array": [ - "u8", - 32 - ] + "defined": "Plugin" } } ] @@ -1337,7 +1337,10 @@ "name": "pluginHashes", "type": { "vec": { - "defined": "PluginHash" + "array": [ + "u8", + 32 + ] } } }