Skip to content

Commit

Permalink
Regenerate IDL and clients
Browse files Browse the repository at this point in the history
  • Loading branch information
danenbm committed Feb 28, 2024
1 parent 68e679d commit eaf2fdc
Show file tree
Hide file tree
Showing 8 changed files with 76 additions and 60 deletions.
48 changes: 48 additions & 0 deletions clients/js/src/generated/types/hashablePluginSchema.ts
Original file line number Diff line number Diff line change
@@ -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<Authority>;
plugin: Plugin;
};

export type HashablePluginSchemaArgs = {
index: number | bigint;
authorities: Array<AuthorityArgs>;
plugin: PluginArgs;
};

export function getHashablePluginSchemaSerializer(): Serializer<
HashablePluginSchemaArgs,
HashablePluginSchema
> {
return struct<HashablePluginSchema>(
[
['index', u64()],
['authorities', array(getAuthoritySerializer())],
['plugin', getPluginSerializer()],
],
{ description: 'HashablePluginSchema' }
) as Serializer<HashablePluginSchemaArgs, HashablePluginSchema>;
}
10 changes: 3 additions & 7 deletions clients/js/src/generated/types/hashedAssetSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,13 @@ import {
bytes,
struct,
} from '@metaplex-foundation/umi/serializers';
import { PluginHash, PluginHashArgs, getPluginHashSerializer } from '.';

export type HashedAssetSchema = {
assetHash: Uint8Array;
pluginHashes: Array<PluginHash>;
pluginHashes: Array<Uint8Array>;
};

export type HashedAssetSchemaArgs = {
assetHash: Uint8Array;
pluginHashes: Array<PluginHashArgs>;
};
export type HashedAssetSchemaArgs = HashedAssetSchema;

export function getHashedAssetSchemaSerializer(): Serializer<
HashedAssetSchemaArgs,
Expand All @@ -31,7 +27,7 @@ export function getHashedAssetSchemaSerializer(): Serializer<
return struct<HashedAssetSchema>(
[
['assetHash', bytes({ size: 32 })],
['pluginHashes', array(getPluginHashSerializer())],
['pluginHashes', array(bytes({ size: 32 }))],
],
{ description: 'HashedAssetSchema' }
) as Serializer<HashedAssetSchemaArgs, HashedAssetSchema>;
Expand Down
2 changes: 1 addition & 1 deletion clients/js/src/generated/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
33 changes: 0 additions & 33 deletions clients/js/src/generated/types/pluginHash.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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<Authority>,
pub plugin: Plugin,
}
3 changes: 1 addition & 2 deletions clients/rust/src/generated/types/hashed_asset_schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@
//! [https://github.com/metaplex-foundation/kinobi]
//!
use crate::generated::types::PluginHash;
use borsh::BorshDeserialize;
use borsh::BorshSerialize;

#[derive(BorshSerialize, BorshDeserialize, Clone, Debug, Eq, PartialEq)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct HashedAssetSchema {
pub asset_hash: [u8; 32],
pub plugin_hashes: Vec<PluginHash>,
pub plugin_hashes: Vec<[u8; 32]>,
}
4 changes: 2 additions & 2 deletions clients/rust/src/generated/types/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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::*;
Expand Down
27 changes: 15 additions & 12 deletions idls/mpl_core.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
]
Expand All @@ -1337,7 +1337,10 @@
"name": "pluginHashes",
"type": {
"vec": {
"defined": "PluginHash"
"array": [
"u8",
32
]
}
}
}
Expand Down

0 comments on commit eaf2fdc

Please sign in to comment.