spl: update mpl metadata crate and add more wrappers (#2430)
* update mpl metadata crate and add more wrappers * update changelog
This commit is contained in:
parent
16da5e9ce7
commit
5e13431aca
|
@ -12,6 +12,8 @@ The minor version will be incremented upon a breaking change and the patch versi
|
|||
|
||||
### Features
|
||||
|
||||
- spl: Add metadata wrappers `approve_collection_authority`, `bubblegum_set_collection_size`, `burn_edition_nft`, `burn_nft`, `revoke_collection_authority`, `set_token_standard`, `utilize`, `unverify_sized_collection_item`, `unverify_collection` ([#2430](https://github.com/coral-xyz/anchor/pull/2430))
|
||||
|
||||
### Fixes
|
||||
|
||||
### Breaking
|
||||
|
|
|
@ -104,7 +104,7 @@ dependencies = [
|
|||
"proc-macro2 1.0.47",
|
||||
"quote 1.0.21",
|
||||
"regex",
|
||||
"syn 1.0.103",
|
||||
"syn 1.0.109",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -117,7 +117,7 @@ dependencies = [
|
|||
"proc-macro2 1.0.47",
|
||||
"quote 1.0.21",
|
||||
"rustversion",
|
||||
"syn 1.0.103",
|
||||
"syn 1.0.109",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -126,7 +126,7 @@ version = "0.27.0"
|
|||
dependencies = [
|
||||
"anchor-syn",
|
||||
"proc-macro2 1.0.47",
|
||||
"syn 1.0.103",
|
||||
"syn 1.0.109",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -136,7 +136,7 @@ dependencies = [
|
|||
"anchor-syn",
|
||||
"proc-macro2 1.0.47",
|
||||
"quote 1.0.21",
|
||||
"syn 1.0.103",
|
||||
"syn 1.0.109",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -147,7 +147,7 @@ dependencies = [
|
|||
"anyhow",
|
||||
"proc-macro2 1.0.47",
|
||||
"quote 1.0.21",
|
||||
"syn 1.0.103",
|
||||
"syn 1.0.109",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -158,7 +158,7 @@ dependencies = [
|
|||
"anyhow",
|
||||
"proc-macro2 1.0.47",
|
||||
"quote 1.0.21",
|
||||
"syn 1.0.103",
|
||||
"syn 1.0.109",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -187,7 +187,7 @@ dependencies = [
|
|||
"solana-faucet",
|
||||
"solana-program",
|
||||
"solana-sdk",
|
||||
"syn 1.0.103",
|
||||
"syn 1.0.109",
|
||||
"tar",
|
||||
"tokio",
|
||||
"toml",
|
||||
|
@ -217,7 +217,7 @@ dependencies = [
|
|||
"anyhow",
|
||||
"proc-macro2 1.0.47",
|
||||
"quote 1.0.21",
|
||||
"syn 1.0.103",
|
||||
"syn 1.0.109",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -226,7 +226,7 @@ version = "0.27.0"
|
|||
dependencies = [
|
||||
"proc-macro2 1.0.47",
|
||||
"quote 1.0.21",
|
||||
"syn 1.0.103",
|
||||
"syn 1.0.109",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -276,7 +276,7 @@ dependencies = [
|
|||
"serde",
|
||||
"serde_json",
|
||||
"sha2 0.9.9",
|
||||
"syn 1.0.103",
|
||||
"syn 1.0.109",
|
||||
"thiserror",
|
||||
]
|
||||
|
||||
|
@ -354,7 +354,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "db02d390bf6643fb404d3d22d31aee1c4bc4459600aef9113833d17e786c6e44"
|
||||
dependencies = [
|
||||
"quote 1.0.21",
|
||||
"syn 1.0.103",
|
||||
"syn 1.0.109",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -366,7 +366,7 @@ dependencies = [
|
|||
"num-bigint 0.4.3",
|
||||
"num-traits",
|
||||
"quote 1.0.21",
|
||||
"syn 1.0.103",
|
||||
"syn 1.0.109",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -437,7 +437,7 @@ checksum = "726535892e8eae7e70657b4c8ea93d26b8553afb1ce617caee529ef96d7dee6c"
|
|||
dependencies = [
|
||||
"proc-macro2 1.0.47",
|
||||
"quote 1.0.21",
|
||||
"syn 1.0.103",
|
||||
"syn 1.0.109",
|
||||
"synstructure",
|
||||
]
|
||||
|
||||
|
@ -449,7 +449,7 @@ checksum = "2777730b2039ac0f95f093556e61b6d26cebed5393ca6f152717777cec3a42ed"
|
|||
dependencies = [
|
||||
"proc-macro2 1.0.47",
|
||||
"quote 1.0.21",
|
||||
"syn 1.0.103",
|
||||
"syn 1.0.109",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -489,7 +489,7 @@ checksum = "1e805d94e6b5001b651426cf4cd446b1ab5f319d27bab5c644f61de0a804360c"
|
|||
dependencies = [
|
||||
"proc-macro2 1.0.47",
|
||||
"quote 1.0.21",
|
||||
"syn 1.0.103",
|
||||
"syn 1.0.109",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -610,7 +610,7 @@ dependencies = [
|
|||
"borsh-schema-derive-internal",
|
||||
"proc-macro-crate 0.1.5",
|
||||
"proc-macro2 1.0.47",
|
||||
"syn 1.0.103",
|
||||
"syn 1.0.109",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -621,7 +621,7 @@ checksum = "5449c28a7b352f2d1e592a8a28bf139bc71afb0764a14f3c02500935d8c44065"
|
|||
dependencies = [
|
||||
"proc-macro2 1.0.47",
|
||||
"quote 1.0.21",
|
||||
"syn 1.0.103",
|
||||
"syn 1.0.109",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -632,7 +632,7 @@ checksum = "cdbd5696d8bfa21d53d9fe39a714a18538bad11492a42d066dbbc395fb1951c0"
|
|||
dependencies = [
|
||||
"proc-macro2 1.0.47",
|
||||
"quote 1.0.21",
|
||||
"syn 1.0.103",
|
||||
"syn 1.0.109",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -701,7 +701,7 @@ checksum = "1b9e1f5fa78f69496407a27ae9ed989e3c3b072310286f5ef385525e4cbc24a9"
|
|||
dependencies = [
|
||||
"proc-macro2 1.0.47",
|
||||
"quote 1.0.21",
|
||||
"syn 1.0.103",
|
||||
"syn 1.0.109",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -842,7 +842,7 @@ dependencies = [
|
|||
"proc-macro-error",
|
||||
"proc-macro2 1.0.47",
|
||||
"quote 1.0.21",
|
||||
"syn 1.0.103",
|
||||
"syn 1.0.109",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1082,7 +1082,7 @@ dependencies = [
|
|||
"proc-macro2 1.0.47",
|
||||
"quote 1.0.21",
|
||||
"scratch",
|
||||
"syn 1.0.103",
|
||||
"syn 1.0.109",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1099,7 +1099,7 @@ checksum = "309e4fb93eed90e1e14bea0da16b209f81813ba9fc7830c20ed151dd7bc0a4d7"
|
|||
dependencies = [
|
||||
"proc-macro2 1.0.47",
|
||||
"quote 1.0.21",
|
||||
"syn 1.0.103",
|
||||
"syn 1.0.109",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1123,7 +1123,7 @@ dependencies = [
|
|||
"proc-macro2 1.0.47",
|
||||
"quote 1.0.21",
|
||||
"strsim 0.10.0",
|
||||
"syn 1.0.103",
|
||||
"syn 1.0.109",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1134,7 +1134,7 @@ checksum = "b36230598a2d5de7ec1c6f51f72d8a99a9208daff41de2084d06e3fd3ea56685"
|
|||
dependencies = [
|
||||
"darling_core",
|
||||
"quote 1.0.21",
|
||||
"syn 1.0.103",
|
||||
"syn 1.0.109",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1180,7 +1180,7 @@ checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b"
|
|||
dependencies = [
|
||||
"proc-macro2 1.0.47",
|
||||
"quote 1.0.21",
|
||||
"syn 1.0.103",
|
||||
"syn 1.0.109",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1263,7 +1263,7 @@ checksum = "3bf95dc3f046b9da4f2d51833c0d3547d8564ef6910f5c1ed130306a75b92886"
|
|||
dependencies = [
|
||||
"proc-macro2 1.0.47",
|
||||
"quote 1.0.21",
|
||||
"syn 1.0.103",
|
||||
"syn 1.0.109",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1368,7 +1368,7 @@ checksum = "355f93763ef7b0ae1c43c4d8eccc9d5848d84ad1a1d8ce61c421d1ac85a19d05"
|
|||
dependencies = [
|
||||
"proc-macro2 1.0.47",
|
||||
"quote 1.0.21",
|
||||
"syn 1.0.103",
|
||||
"syn 1.0.109",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1380,7 +1380,7 @@ dependencies = [
|
|||
"once_cell",
|
||||
"proc-macro2 1.0.47",
|
||||
"quote 1.0.21",
|
||||
"syn 1.0.103",
|
||||
"syn 1.0.109",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1400,7 +1400,7 @@ checksum = "946ee94e3dbf58fdd324f9ce245c7b238d46a66f00e86a020b71996349e46cce"
|
|||
dependencies = [
|
||||
"proc-macro2 1.0.47",
|
||||
"quote 1.0.21",
|
||||
"syn 1.0.103",
|
||||
"syn 1.0.109",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1540,7 +1540,7 @@ checksum = "bdfb8ce053d86b91919aad980c220b1fb8401a9394410e1c289ed7e66b61835d"
|
|||
dependencies = [
|
||||
"proc-macro2 1.0.47",
|
||||
"quote 1.0.21",
|
||||
"syn 1.0.103",
|
||||
"syn 1.0.109",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -2166,14 +2166,34 @@ dependencies = [
|
|||
]
|
||||
|
||||
[[package]]
|
||||
name = "mpl-token-metadata"
|
||||
version = "1.4.3"
|
||||
name = "mpl-token-auth-rules"
|
||||
version = "1.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e719d7e0b5a9d97c7fd4d6f52ebfc32f1e3942e068173e47355f8c275656488a"
|
||||
checksum = "a69803fbfbc4bb0327de86f49d2639692c7c60276cb87d6cced84bb8189f2000"
|
||||
dependencies = [
|
||||
"borsh",
|
||||
"mpl-token-metadata-context-derive",
|
||||
"num-derive",
|
||||
"num-traits",
|
||||
"rmp-serde",
|
||||
"serde",
|
||||
"shank",
|
||||
"solana-program",
|
||||
"solana-zk-token-sdk",
|
||||
"thiserror",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "mpl-token-metadata"
|
||||
version = "1.9.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c8831a402e72f24052d019a83d72b70c38673caaf198e6e345575a77f98166b1"
|
||||
dependencies = [
|
||||
"arrayref",
|
||||
"borsh",
|
||||
"mpl-token-vault",
|
||||
"mpl-token-auth-rules",
|
||||
"mpl-token-metadata-context-derive",
|
||||
"mpl-utils",
|
||||
"num-derive",
|
||||
"num-traits",
|
||||
"shank",
|
||||
|
@ -2184,17 +2204,25 @@ dependencies = [
|
|||
]
|
||||
|
||||
[[package]]
|
||||
name = "mpl-token-vault"
|
||||
name = "mpl-token-metadata-context-derive"
|
||||
version = "0.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "12989bc45715b0ee91944855130131479f9c772e198a910c3eb0ea327d5bffc3"
|
||||
dependencies = [
|
||||
"quote 1.0.21",
|
||||
"syn 1.0.109",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "mpl-utils"
|
||||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7ade4ef15bc06a6033076c4ff28cba9b42521df5ec61211d6f419415ace2746a"
|
||||
checksum = "7fc48e64c50dba956acb46eec86d6968ef0401ef37031426da479f1f2b592066"
|
||||
dependencies = [
|
||||
"arrayref",
|
||||
"borsh",
|
||||
"num-derive",
|
||||
"num-traits",
|
||||
"solana-program",
|
||||
"spl-token",
|
||||
"thiserror",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -2275,7 +2303,7 @@ checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d"
|
|||
dependencies = [
|
||||
"proc-macro2 1.0.47",
|
||||
"quote 1.0.21",
|
||||
"syn 1.0.103",
|
||||
"syn 1.0.109",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -2348,7 +2376,7 @@ dependencies = [
|
|||
"proc-macro-crate 1.2.1",
|
||||
"proc-macro2 1.0.47",
|
||||
"quote 1.0.21",
|
||||
"syn 1.0.103",
|
||||
"syn 1.0.109",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -2577,7 +2605,7 @@ dependencies = [
|
|||
"proc-macro-error-attr",
|
||||
"proc-macro2 1.0.47",
|
||||
"quote 1.0.21",
|
||||
"syn 1.0.103",
|
||||
"syn 1.0.109",
|
||||
"version_check",
|
||||
]
|
||||
|
||||
|
@ -2906,6 +2934,28 @@ dependencies = [
|
|||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rmp"
|
||||
version = "0.8.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "44519172358fd6d58656c86ab8e7fbc9e1490c3e8f14d35ed78ca0dd07403c9f"
|
||||
dependencies = [
|
||||
"byteorder",
|
||||
"num-traits",
|
||||
"paste",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rmp-serde"
|
||||
version = "1.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c5b13be192e0220b8afb7222aa5813cb62cc269ebb5cac346ca6487681d2913e"
|
||||
dependencies = [
|
||||
"byteorder",
|
||||
"rmp",
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rpassword"
|
||||
version = "7.2.0"
|
||||
|
@ -3065,7 +3115,7 @@ checksum = "bdbda6ac5cd1321e724fa9cee216f3a61885889b896f073b8f82322789c5250e"
|
|||
dependencies = [
|
||||
"proc-macro2 1.0.47",
|
||||
"quote 1.0.21",
|
||||
"syn 1.0.103",
|
||||
"syn 1.0.109",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -3127,9 +3177,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "serde"
|
||||
version = "1.0.147"
|
||||
version = "1.0.154"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d193d69bae983fc11a79df82342761dfbf28a99fc8d203dca4c3c1b590948965"
|
||||
checksum = "8cdd151213925e7f1ab45a9bbfb129316bd00799784b174b7cc7bcd16961c49e"
|
||||
dependencies = [
|
||||
"serde_derive",
|
||||
]
|
||||
|
@ -3145,13 +3195,13 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "serde_derive"
|
||||
version = "1.0.147"
|
||||
version = "1.0.154"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4f1d362ca8fc9c3e3a7484440752472d68a6caa98f1ab81d99b5dfe517cec852"
|
||||
checksum = "4fc80d722935453bcafdc2c9a73cd6fac4dc1938f0346035d84bf99fa9e33217"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.47",
|
||||
"quote 1.0.21",
|
||||
"syn 1.0.103",
|
||||
"syn 1.0.109",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -3196,7 +3246,7 @@ dependencies = [
|
|||
"darling",
|
||||
"proc-macro2 1.0.47",
|
||||
"quote 1.0.21",
|
||||
"syn 1.0.103",
|
||||
"syn 1.0.109",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -3294,36 +3344,36 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "shank"
|
||||
version = "0.0.10"
|
||||
version = "0.0.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "90b0d7b8998cc311310854451e7f5903cf3a151ca93ef6aa2b8b6c369a037b21"
|
||||
checksum = "b63e565b5e95ad88ab38f312e89444c749360641c509ef2de0093b49f55974a5"
|
||||
dependencies = [
|
||||
"shank_macro",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "shank_macro"
|
||||
version = "0.0.10"
|
||||
version = "0.0.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b3a37d6cf5df84eb622cb6fc74071d5d773c6a23b9ec55691db7b6a8c2286926"
|
||||
checksum = "63927d22a1e8b74bda98cc6e151fcdf178b7abb0dc6c4f81e0bbf5ffe2fc4ec8"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.47",
|
||||
"quote 1.0.21",
|
||||
"shank_macro_impl",
|
||||
"syn 1.0.103",
|
||||
"syn 1.0.109",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "shank_macro_impl"
|
||||
version = "0.0.10"
|
||||
version = "0.0.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1314ff5d5a3dffd9b93de1463e2b6afc2350f17596d7d9b3fe0924c9edd250df"
|
||||
checksum = "40ce03403df682f80f4dc1efafa87a4d0cb89b03726d0565e6364bdca5b9a441"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"proc-macro2 1.0.47",
|
||||
"quote 1.0.21",
|
||||
"serde",
|
||||
"syn 1.0.103",
|
||||
"syn 1.0.109",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -3601,7 +3651,7 @@ dependencies = [
|
|||
"proc-macro2 1.0.47",
|
||||
"quote 1.0.21",
|
||||
"rustc_version 0.4.0",
|
||||
"syn 1.0.103",
|
||||
"syn 1.0.109",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -3976,7 +4026,7 @@ dependencies = [
|
|||
"proc-macro2 1.0.47",
|
||||
"quote 1.0.21",
|
||||
"rustversion",
|
||||
"syn 1.0.103",
|
||||
"syn 1.0.109",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -4293,9 +4343,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "1.0.103"
|
||||
version = "1.0.109"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a864042229133ada95abf3b54fdc62ef5ccabe9515b64717bcb9a1919e59445d"
|
||||
checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.47",
|
||||
"quote 1.0.21",
|
||||
|
@ -4310,7 +4360,7 @@ checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f"
|
|||
dependencies = [
|
||||
"proc-macro2 1.0.47",
|
||||
"quote 1.0.21",
|
||||
"syn 1.0.103",
|
||||
"syn 1.0.109",
|
||||
"unicode-xid 0.2.4",
|
||||
]
|
||||
|
||||
|
@ -4390,7 +4440,7 @@ checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb"
|
|||
dependencies = [
|
||||
"proc-macro2 1.0.47",
|
||||
"quote 1.0.21",
|
||||
"syn 1.0.103",
|
||||
"syn 1.0.109",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -4495,7 +4545,7 @@ checksum = "9724f9a975fb987ef7a3cd9be0350edcbe130698af5b8f7a631e23d42d052484"
|
|||
dependencies = [
|
||||
"proc-macro2 1.0.47",
|
||||
"quote 1.0.21",
|
||||
"syn 1.0.103",
|
||||
"syn 1.0.109",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -4585,7 +4635,7 @@ checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a"
|
|||
dependencies = [
|
||||
"proc-macro2 1.0.47",
|
||||
"quote 1.0.21",
|
||||
"syn 1.0.103",
|
||||
"syn 1.0.109",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -4836,7 +4886,7 @@ dependencies = [
|
|||
"once_cell",
|
||||
"proc-macro2 1.0.47",
|
||||
"quote 1.0.21",
|
||||
"syn 1.0.103",
|
||||
"syn 1.0.109",
|
||||
"wasm-bindgen-shared",
|
||||
]
|
||||
|
||||
|
@ -4870,7 +4920,7 @@ checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c"
|
|||
dependencies = [
|
||||
"proc-macro2 1.0.47",
|
||||
"quote 1.0.21",
|
||||
"syn 1.0.103",
|
||||
"syn 1.0.109",
|
||||
"wasm-bindgen-backend",
|
||||
"wasm-bindgen-shared",
|
||||
]
|
||||
|
@ -5113,7 +5163,7 @@ checksum = "3f8f187641dad4f680d25c4bfc4225b418165984179f26ca76ec4fb6441d3a17"
|
|||
dependencies = [
|
||||
"proc-macro2 1.0.47",
|
||||
"quote 1.0.21",
|
||||
"syn 1.0.103",
|
||||
"syn 1.0.109",
|
||||
"synstructure",
|
||||
]
|
||||
|
||||
|
|
|
@ -28,4 +28,4 @@ solana-program = "1.14.16"
|
|||
spl-token = { version = "3.5.0", features = ["no-entrypoint"], optional = true }
|
||||
spl-token-2022 = { version = "0.5.0", features = ["no-entrypoint"], optional = true }
|
||||
spl-associated-token-account = { version = "1.1.1", features = ["no-entrypoint"], optional = true }
|
||||
mpl-token-metadata = { version = "^1.4.3", optional = true, features = ["no-entrypoint"] }
|
||||
mpl-token-metadata = { version = "^1.9.0", optional = true, features = ["no-entrypoint"] }
|
||||
|
|
|
@ -6,6 +6,96 @@ use solana_program::account_info::AccountInfo;
|
|||
use solana_program::pubkey::Pubkey;
|
||||
use std::ops::Deref;
|
||||
|
||||
pub fn approve_collection_authority<'info>(
|
||||
ctx: CpiContext<'_, '_, '_, 'info, ApproveCollectionAuthority<'info>>,
|
||||
) -> Result<()> {
|
||||
let ix = mpl_token_metadata::instruction::approve_collection_authority(
|
||||
ID,
|
||||
*ctx.accounts.collection_authority_record.key,
|
||||
*ctx.accounts.new_collection_authority.key,
|
||||
*ctx.accounts.update_authority.key,
|
||||
*ctx.accounts.payer.key,
|
||||
*ctx.accounts.metadata.key,
|
||||
*ctx.accounts.mint.key,
|
||||
);
|
||||
solana_program::program::invoke_signed(
|
||||
&ix,
|
||||
&ToAccountInfos::to_account_infos(&ctx),
|
||||
ctx.signer_seeds,
|
||||
)
|
||||
.map_err(Into::into)
|
||||
}
|
||||
|
||||
pub fn bubblegum_set_collection_size<'info>(
|
||||
ctx: CpiContext<'_, '_, '_, 'info, BubblegumSetCollectionSize<'info>>,
|
||||
collection_authority_record: Option<Pubkey>,
|
||||
size: u64,
|
||||
) -> Result<()> {
|
||||
let ix = mpl_token_metadata::instruction::bubblegum_set_collection_size(
|
||||
ID,
|
||||
*ctx.accounts.metadata_account.key,
|
||||
*ctx.accounts.update_authority.key,
|
||||
*ctx.accounts.mint.key,
|
||||
*ctx.accounts.bubblegum_signer.key,
|
||||
collection_authority_record,
|
||||
size,
|
||||
);
|
||||
solana_program::program::invoke_signed(
|
||||
&ix,
|
||||
&ToAccountInfos::to_account_infos(&ctx),
|
||||
ctx.signer_seeds,
|
||||
)
|
||||
.map_err(Into::into)
|
||||
}
|
||||
|
||||
pub fn burn_edition_nft<'info>(
|
||||
ctx: CpiContext<'_, '_, '_, 'info, BurnEditionNft<'info>>,
|
||||
collection_metadata: Option<Pubkey>,
|
||||
) -> Result<()> {
|
||||
let ix = mpl_token_metadata::instruction::burn_edition_nft(
|
||||
ID,
|
||||
*ctx.accounts.metadata.key,
|
||||
*ctx.accounts.owner.key,
|
||||
*ctx.accounts.print_edition_mint.key,
|
||||
*ctx.accounts.master_edition_mint.key,
|
||||
*ctx.accounts.print_edition_token.key,
|
||||
*ctx.accounts.master_edition_token.key,
|
||||
*ctx.accounts.master_edition.key,
|
||||
*ctx.accounts.print_edition.key,
|
||||
*ctx.accounts.edition_marker.key,
|
||||
*ctx.accounts.spl_token.key,
|
||||
);
|
||||
solana_program::program::invoke_signed(
|
||||
&ix,
|
||||
&ToAccountInfos::to_account_infos(&ctx),
|
||||
ctx.signer_seeds,
|
||||
)
|
||||
.map_err(Into::into)
|
||||
}
|
||||
|
||||
pub fn burn_nft<'info>(
|
||||
ctx: CpiContext<'_, '_, '_, 'info, BurnNft<'info>>,
|
||||
collection_metadata: Option<Pubkey>,
|
||||
) -> Result<()> {
|
||||
let ix = mpl_token_metadata::instruction::burn_nft(
|
||||
ID,
|
||||
*ctx.accounts.metadata.key,
|
||||
*ctx.accounts.owner.key,
|
||||
*ctx.accounts.mint.key,
|
||||
*ctx.accounts.token.key,
|
||||
*ctx.accounts.edition.key,
|
||||
*ctx.accounts.spl_token.key,
|
||||
collection_metadata,
|
||||
);
|
||||
solana_program::program::invoke_signed(
|
||||
&ix,
|
||||
&ToAccountInfos::to_account_infos(&ctx),
|
||||
ctx.signer_seeds,
|
||||
)
|
||||
.map_err(Into::into)
|
||||
}
|
||||
|
||||
#[deprecated(note = "internal instructions deprecated by Metaplex")]
|
||||
pub fn create_metadata_accounts_v2<'info>(
|
||||
ctx: CpiContext<'_, '_, '_, 'info, CreateMetadataAccountsV2<'info>>,
|
||||
data: DataV2,
|
||||
|
@ -161,6 +251,25 @@ pub fn mint_new_edition_from_master_edition_via_token<'info>(
|
|||
.map_err(Into::into)
|
||||
}
|
||||
|
||||
pub fn revoke_collection_authority<'info>(
|
||||
ctx: CpiContext<'_, '_, '_, 'info, RevokeCollectionAuthority<'info>>,
|
||||
) -> Result<()> {
|
||||
let ix = mpl_token_metadata::instruction::revoke_collection_authority(
|
||||
ID,
|
||||
*ctx.accounts.collection_authority_record.key,
|
||||
*ctx.accounts.delegate_authority.key,
|
||||
*ctx.accounts.revoke_authority.key,
|
||||
*ctx.accounts.metadata.key,
|
||||
*ctx.accounts.mint.key,
|
||||
);
|
||||
solana_program::program::invoke_signed(
|
||||
&ix,
|
||||
&ToAccountInfos::to_account_infos(&ctx),
|
||||
ctx.signer_seeds,
|
||||
)
|
||||
.map_err(Into::into)
|
||||
}
|
||||
|
||||
pub fn set_collection_size<'info>(
|
||||
ctx: CpiContext<'_, '_, '_, 'info, SetCollectionSize<'info>>,
|
||||
collection_authority_record: Option<Pubkey>,
|
||||
|
@ -326,6 +435,25 @@ pub fn update_primary_sale_happened_via_token<'info>(
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn set_token_standard<'info>(
|
||||
ctx: CpiContext<'_, '_, '_, 'info, SetTokenStandard<'info>>,
|
||||
edition_account: Option<Pubkey>,
|
||||
) -> Result<()> {
|
||||
let ix = mpl_token_metadata::instruction::set_token_standard(
|
||||
ID,
|
||||
*ctx.accounts.metadata_account.key,
|
||||
*ctx.accounts.update_authority.key,
|
||||
*ctx.accounts.mint_account.key,
|
||||
edition_account,
|
||||
);
|
||||
solana_program::program::invoke_signed(
|
||||
&ix,
|
||||
&ToAccountInfos::to_account_infos(&ctx),
|
||||
ctx.signer_seeds,
|
||||
)
|
||||
.map_err(Into::into)
|
||||
}
|
||||
|
||||
pub fn sign_metadata<'info>(ctx: CpiContext<'_, '_, '_, 'info, SignMetadata<'info>>) -> Result<()> {
|
||||
let ix = mpl_token_metadata::instruction::sign_metadata(
|
||||
ID,
|
||||
|
@ -349,7 +477,6 @@ pub fn remove_creator_verification<'info>(
|
|||
*ctx.accounts.metadata.key,
|
||||
*ctx.accounts.creator.key,
|
||||
);
|
||||
|
||||
solana_program::program::invoke_signed(
|
||||
&ix,
|
||||
&ToAccountInfos::to_account_infos(&ctx),
|
||||
|
@ -358,6 +485,117 @@ pub fn remove_creator_verification<'info>(
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn utilize<'info>(
|
||||
ctx: CpiContext<'_, '_, '_, 'info, Utilize<'info>>,
|
||||
use_authority_record_pda: Option<Pubkey>,
|
||||
burner: Option<Pubkey>,
|
||||
number_of_uses: u64,
|
||||
) -> Result<()> {
|
||||
let ix = mpl_token_metadata::instruction::utilize(
|
||||
ID,
|
||||
*ctx.accounts.metadata.key,
|
||||
*ctx.accounts.token_account.key,
|
||||
*ctx.accounts.mint.key,
|
||||
use_authority_record_pda,
|
||||
*ctx.accounts.use_authority.key,
|
||||
*ctx.accounts.owner.key,
|
||||
burner,
|
||||
number_of_uses,
|
||||
);
|
||||
solana_program::program::invoke_signed(
|
||||
&ix,
|
||||
&ToAccountInfos::to_account_infos(&ctx),
|
||||
ctx.signer_seeds,
|
||||
)
|
||||
.map_err(Into::into)
|
||||
}
|
||||
|
||||
pub fn unverify_collection<'info>(
|
||||
ctx: CpiContext<'_, '_, '_, 'info, UnverifyCollection<'info>>,
|
||||
collection_authority_record: Option<Pubkey>,
|
||||
) -> Result<()> {
|
||||
let ix = mpl_token_metadata::instruction::unverify_collection(
|
||||
ID,
|
||||
*ctx.accounts.metadata.key,
|
||||
*ctx.accounts.collection_authority.key,
|
||||
*ctx.accounts.collection_mint.key,
|
||||
*ctx.accounts.collection.key,
|
||||
*ctx.accounts.collection_master_edition_account.key,
|
||||
collection_authority_record,
|
||||
);
|
||||
solana_program::program::invoke_signed(
|
||||
&ix,
|
||||
&ToAccountInfos::to_account_infos(&ctx),
|
||||
ctx.signer_seeds,
|
||||
)
|
||||
.map_err(Into::into)
|
||||
}
|
||||
|
||||
pub fn unverify_sized_collection_item<'info>(
|
||||
ctx: CpiContext<'_, '_, '_, 'info, UnverifySizedCollectionItem<'info>>,
|
||||
collection_authority_record: Option<Pubkey>,
|
||||
) -> Result<()> {
|
||||
let ix = mpl_token_metadata::instruction::unverify_sized_collection_item(
|
||||
ID,
|
||||
*ctx.accounts.metadata.key,
|
||||
*ctx.accounts.collection_authority.key,
|
||||
*ctx.accounts.payer.key,
|
||||
*ctx.accounts.collection_mint.key,
|
||||
*ctx.accounts.collection.key,
|
||||
*ctx.accounts.collection_master_edition_account.key,
|
||||
collection_authority_record,
|
||||
);
|
||||
solana_program::program::invoke_signed(
|
||||
&ix,
|
||||
&ToAccountInfos::to_account_infos(&ctx),
|
||||
ctx.signer_seeds,
|
||||
)
|
||||
.map_err(Into::into)
|
||||
}
|
||||
|
||||
#[derive(Accounts)]
|
||||
pub struct ApproveCollectionAuthority<'info> {
|
||||
pub collection_authority_record: AccountInfo<'info>,
|
||||
pub new_collection_authority: AccountInfo<'info>,
|
||||
pub update_authority: AccountInfo<'info>,
|
||||
pub payer: AccountInfo<'info>,
|
||||
pub metadata: AccountInfo<'info>,
|
||||
pub mint: AccountInfo<'info>,
|
||||
}
|
||||
|
||||
#[derive(Accounts)]
|
||||
pub struct BubblegumSetCollectionSize<'info> {
|
||||
pub metadata_account: AccountInfo<'info>,
|
||||
pub update_authority: AccountInfo<'info>,
|
||||
pub mint: AccountInfo<'info>,
|
||||
pub bubblegum_signer: AccountInfo<'info>,
|
||||
}
|
||||
|
||||
#[derive(Accounts)]
|
||||
pub struct BurnEditionNft<'info> {
|
||||
pub metadata: AccountInfo<'info>,
|
||||
pub owner: AccountInfo<'info>,
|
||||
pub print_edition_mint: AccountInfo<'info>,
|
||||
pub master_edition_mint: AccountInfo<'info>,
|
||||
pub print_edition_token: AccountInfo<'info>,
|
||||
pub master_edition_token: AccountInfo<'info>,
|
||||
pub master_edition: AccountInfo<'info>,
|
||||
pub print_edition: AccountInfo<'info>,
|
||||
pub edition_marker: AccountInfo<'info>,
|
||||
pub spl_token: AccountInfo<'info>,
|
||||
}
|
||||
|
||||
#[derive(Accounts)]
|
||||
pub struct BurnNft<'info> {
|
||||
pub metadata: AccountInfo<'info>,
|
||||
pub owner: AccountInfo<'info>,
|
||||
pub mint: AccountInfo<'info>,
|
||||
pub token: AccountInfo<'info>,
|
||||
pub edition: AccountInfo<'info>,
|
||||
pub spl_token: AccountInfo<'info>,
|
||||
}
|
||||
|
||||
#[deprecated(note = "internal instructions deprecated by Metaplex")]
|
||||
#[derive(Accounts)]
|
||||
pub struct CreateMetadataAccountsV2<'info> {
|
||||
pub metadata: AccountInfo<'info>,
|
||||
|
@ -425,6 +663,15 @@ pub struct MintNewEditionFromMasterEditionViaToken<'info> {
|
|||
pub metadata_mint: AccountInfo<'info>,
|
||||
}
|
||||
|
||||
#[derive(Accounts)]
|
||||
pub struct RevokeCollectionAuthority<'info> {
|
||||
pub collection_authority_record: AccountInfo<'info>,
|
||||
pub delegate_authority: AccountInfo<'info>,
|
||||
pub revoke_authority: AccountInfo<'info>,
|
||||
pub metadata: AccountInfo<'info>,
|
||||
pub mint: AccountInfo<'info>,
|
||||
}
|
||||
|
||||
#[derive(Accounts)]
|
||||
pub struct SetCollectionSize<'info> {
|
||||
pub metadata: AccountInfo<'info>,
|
||||
|
@ -433,6 +680,13 @@ pub struct SetCollectionSize<'info> {
|
|||
pub system_program: AccountInfo<'info>,
|
||||
}
|
||||
|
||||
#[derive(Accounts)]
|
||||
pub struct SetTokenStandard<'info> {
|
||||
pub metadata_account: AccountInfo<'info>,
|
||||
pub update_authority: AccountInfo<'info>,
|
||||
pub mint_account: AccountInfo<'info>,
|
||||
}
|
||||
|
||||
#[derive(Accounts)]
|
||||
pub struct VerifyCollection<'info> {
|
||||
pub payer: AccountInfo<'info>,
|
||||
|
@ -514,6 +768,34 @@ pub struct RemoveCreatorVerification<'info> {
|
|||
pub metadata: AccountInfo<'info>,
|
||||
}
|
||||
|
||||
#[derive(Accounts)]
|
||||
pub struct Utilize<'info> {
|
||||
pub metadata: AccountInfo<'info>,
|
||||
pub token_account: AccountInfo<'info>,
|
||||
pub mint: AccountInfo<'info>,
|
||||
pub use_authority: AccountInfo<'info>,
|
||||
pub owner: AccountInfo<'info>,
|
||||
}
|
||||
|
||||
#[derive(Accounts)]
|
||||
pub struct UnverifyCollection<'info> {
|
||||
pub metadata: AccountInfo<'info>,
|
||||
pub collection_authority: AccountInfo<'info>,
|
||||
pub collection_mint: AccountInfo<'info>,
|
||||
pub collection: AccountInfo<'info>,
|
||||
pub collection_master_edition_account: AccountInfo<'info>,
|
||||
}
|
||||
|
||||
#[derive(Accounts)]
|
||||
pub struct UnverifySizedCollectionItem<'info> {
|
||||
pub metadata: AccountInfo<'info>,
|
||||
pub collection_authority: AccountInfo<'info>,
|
||||
pub payer: AccountInfo<'info>,
|
||||
pub collection_mint: AccountInfo<'info>,
|
||||
pub collection: AccountInfo<'info>,
|
||||
pub collection_master_edition_account: AccountInfo<'info>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
pub struct MetadataAccount(mpl_token_metadata::state::Metadata);
|
||||
|
||||
|
|
Loading…
Reference in New Issue