From 4d50d40bba84d1fa46f04d9f8f0905ae710ad857 Mon Sep 17 00:00:00 2001 From: Zhuojie Zhou | rex <89176731+nothing0012@users.noreply.github.com> Date: Mon, 12 Feb 2024 14:17:47 -0800 Subject: [PATCH] Add shared escrow with remainning accounts (#82) * wip * wip * Add shared escrow from M2 * Add post distribution handling * Add comment * Add handling for mip1 and ocp * Add tests * Add set shared escrow in the test setup * Change the test config * Add tests * Fix tests * Fix bump * Add cap and address comments * fmt * Add more tests * use non optional fields * Address comments * Fix tests * Fix tests * remove unused files * Add tests * Address comments * Use counter for shared escrow * Fix idl * Fix test * Add comments --------- Co-authored-by: JeremyLi28 --- Anchor.toml | 5 +- Cargo.lock | 13 + package-lock.json | 13120 ++++++++++++++++ programs/m2_interface/.gitignore | 2 + programs/m2_interface/Cargo.toml | 23 + programs/m2_interface/m2.json | 2093 +++ programs/m2_interface/src/accounts.rs | 221 + programs/m2_interface/src/errors.rs | 109 + programs/m2_interface/src/instructions.rs | 6166 ++++++++ programs/m2_interface/src/lib.rs | 9 + programs/m2_interface/src/typedefs.rs | 36 + programs/mmm/Cargo.toml | 4 +- programs/mmm/src/constants.rs | 4 + programs/mmm/src/errors.rs | 2 + programs/mmm/src/instructions/admin/mod.rs | 2 + .../instructions/admin/set_shared_escrow.rs | 59 + .../mmm/src/instructions/admin/update_pool.rs | 9 +- .../instructions/mip1/mip1_deposit_sell.rs | 4 + .../instructions/mip1/sol_mip1_fulfill_buy.rs | 79 +- programs/mmm/src/instructions/mod.rs | 1 - .../src/instructions/ocp/ocp_deposit_sell.rs | 4 + .../instructions/ocp/sol_ocp_fulfill_buy.rs | 70 +- .../src/instructions/vanilla/deposit_sell.rs | 4 + .../instructions/vanilla/sol_deposit_buy.rs | 4 + .../instructions/vanilla/sol_fulfill_buy.rs | 70 +- programs/mmm/src/lib.rs | 8 + programs/mmm/src/state.rs | 11 +- programs/mmm/src/util.rs | 104 +- sdk/src/idl/mmm.ts | 116 + sdk/src/mmmClient.ts | 14 + sdk/src/pda.ts | 16 + tests/mmm-fulfill-shared-escrow.ts | 610 + tests/utils/mmm.ts | 68 +- 33 files changed, 23039 insertions(+), 21 deletions(-) create mode 100644 package-lock.json create mode 100644 programs/m2_interface/.gitignore create mode 100644 programs/m2_interface/Cargo.toml create mode 100644 programs/m2_interface/m2.json create mode 100644 programs/m2_interface/src/accounts.rs create mode 100644 programs/m2_interface/src/errors.rs create mode 100644 programs/m2_interface/src/instructions.rs create mode 100644 programs/m2_interface/src/lib.rs create mode 100644 programs/m2_interface/src/typedefs.rs create mode 100644 programs/mmm/src/instructions/admin/set_shared_escrow.rs create mode 100644 tests/mmm-fulfill-shared-escrow.ts diff --git a/Anchor.toml b/Anchor.toml index 216d750..54559b7 100644 --- a/Anchor.toml +++ b/Anchor.toml @@ -12,6 +12,9 @@ types = "sdk/src/idl/" [test.validator] url = "https://api.devnet.solana.com" +[[test.validator.clone]] +address = "M2mx93ekt1fmXSVkTrUL9xVFHkmME8HTUi5Cyc5aF7K" # m2 + [[test.validator.clone]] address = "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s" # metadata @@ -31,7 +34,7 @@ address = "6Huqrb4xxmmNA4NufYdgpmspoLmjXFd3qEfteCddLgSz" # ocp: policy (allow al mmm = "mmm3XBJg5gk8XJxEKBvdgptZz6SgK4tXvn36sodowMc" [scripts] -test = "npx ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.spec.ts" +test = "npx ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts" [toolchain] anchor_version = "0.29.0" diff --git a/Cargo.lock b/Cargo.lock index 2270159..ec96280 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1236,6 +1236,18 @@ version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +[[package]] +name = "m2_interface" +version = "0.1.0" +dependencies = [ + "borsh 0.10.3", + "num-derive 0.3.3", + "num-traits", + "serde", + "solana-program", + "thiserror", +] + [[package]] name = "memchr" version = "2.7.1" @@ -1279,6 +1291,7 @@ dependencies = [ "anchor-lang", "anchor-spl", "community-managed-token", + "m2_interface", "mpl-token-metadata 4.0.0", "open_creator_protocol", "solana-program", diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..e627741 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,13120 @@ +{ + "name": "mmm", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "dependencies": { + "@magiceden-oss/open_creator_protocol": "^0.3.2", + "@metaplex-foundation/js": "^0.19.4", + "@metaplex-foundation/mpl-token-auth-rules": "^2.0.0", + "@metaplex-foundation/mpl-token-metadata": "^3.1.2", + "@metaplex-foundation/umi": "^0.8.2", + "@metaplex-foundation/umi-bundle-tests": "^0.8.2", + "@metaplex-foundation/umi-web3js-adapters": "^0.8.2", + "@project-serum/anchor": "^0.26.0", + "@solana/spl-token": "^0.3.5", + "@solana/web3.js": "^1.65.0", + "borsh": "^0.7.0", + "old-mpl-token-metadata": "npm:@metaplex-foundation/mpl-token-metadata@2.12.0" + }, + "devDependencies": { + "@magiceden-oss/mmm": "file:sdk", + "@metaplex-foundation/mpl-migration-validator": "^0.4.1", + "@msgpack/msgpack": "^2.8.0", + "@types/chai": "^4.2.21", + "@types/mocha": "^9.0.0", + "chai": "^4.3.4", + "eslint-config-standard-with-typescript": "^21.0.1", + "eslint-plugin-prettier": "^4.0.0", + "mocha": "^9.0.3", + "prettier": "^2.3.2", + "ts-mocha": "^9.0.0", + "typescript": "^4.4.2" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.12.11", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/highlight": "^7.10.4" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.15.7", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight": { + "version": "7.16.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.15.7", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight/node_modules/ansi-styles": { + "version": "3.2.1", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/chalk": { + "version": "2.4.2", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/color-convert": { + "version": "1.9.3", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/@babel/highlight/node_modules/color-name": { + "version": "1.1.3", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/@babel/highlight/node_modules/escape-string-regexp": { + "version": "1.0.5", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/@babel/highlight/node_modules/has-flag": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/supports-color": { + "version": "5.5.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/runtime": { + "version": "7.23.9", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.9.tgz", + "integrity": "sha512-0CX6F+BI2s9dkUqr08KFrAIZgNFj75rdBU/DjCyYLIaV/quFjkk6T+EJ2LkZHyZTbEV4L5p97mNkUsHl2wLFAw==", + "dependencies": { + "regenerator-runtime": "^0.14.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@bundlr-network/client": { + "version": "0.8.9", + "license": "Apache-2.0", + "dependencies": { + "@solana/wallet-adapter-base": "^0.9.2", + "@solana/web3.js": "^1.36.0", + "@supercharge/promise-pool": "^2.1.0", + "algosdk": "^1.13.1", + "arbundles": "^0.6.21", + "arweave": "^1.11.4", + "async-retry": "^1.3.3", + "axios": "^0.25.0", + "base64url": "^3.0.1", + "bignumber.js": "^9.0.1", + "bs58": "^4.0.1", + "commander": "^8.2.0", + "csv": "^6.0.5", + "ethers": "^5.5.1", + "inquirer": "^8.2.0", + "js-sha256": "^0.9.0", + "mime-types": "^2.1.34", + "near-api-js": "^0.44.2", + "near-seed-phrase": "^0.2.0" + }, + "bin": { + "bundlr": "build/node/cli.js" + } + }, + "node_modules/@bundlr-network/client/node_modules/commander": { + "version": "8.3.0", + "license": "MIT", + "engines": { + "node": ">= 12" + } + }, + "node_modules/@coral-xyz/borsh": { + "version": "0.26.0", + "license": "Apache-2.0", + "dependencies": { + "bn.js": "^5.1.2", + "buffer-layout": "^1.2.0" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "@solana/web3.js": "^1.68.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "0.4.3", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.1.1", + "espree": "^7.3.0", + "globals": "^13.9.0", + "ignore": "^4.0.6", + "import-fresh": "^3.2.1", + "js-yaml": "^3.13.1", + "minimatch": "^3.0.4", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/@ethersproject/abi": { + "version": "5.7.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/address": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/constants": "^5.7.0", + "@ethersproject/hash": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/strings": "^5.7.0" + } + }, + "node_modules/@ethersproject/abstract-provider": { + "version": "5.7.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/networks": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/transactions": "^5.7.0", + "@ethersproject/web": "^5.7.0" + } + }, + "node_modules/@ethersproject/abstract-signer": { + "version": "5.7.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/abstract-provider": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0" + } + }, + "node_modules/@ethersproject/address": { + "version": "5.7.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/rlp": "^5.7.0" + } + }, + "node_modules/@ethersproject/base64": { + "version": "5.7.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bytes": "^5.7.0" + } + }, + "node_modules/@ethersproject/basex": { + "version": "5.7.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/properties": "^5.7.0" + } + }, + "node_modules/@ethersproject/bignumber": { + "version": "5.7.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "bn.js": "^5.2.1" + } + }, + "node_modules/@ethersproject/bytes": { + "version": "5.7.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/logger": "^5.7.0" + } + }, + "node_modules/@ethersproject/constants": { + "version": "5.7.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bignumber": "^5.7.0" + } + }, + "node_modules/@ethersproject/contracts": { + "version": "5.7.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/abi": "^5.7.0", + "@ethersproject/abstract-provider": "^5.7.0", + "@ethersproject/abstract-signer": "^5.7.0", + "@ethersproject/address": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/constants": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/transactions": "^5.7.0" + } + }, + "node_modules/@ethersproject/hash": { + "version": "5.7.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/abstract-signer": "^5.7.0", + "@ethersproject/address": "^5.7.0", + "@ethersproject/base64": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/strings": "^5.7.0" + } + }, + "node_modules/@ethersproject/hdnode": { + "version": "5.7.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/abstract-signer": "^5.7.0", + "@ethersproject/basex": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/pbkdf2": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/sha2": "^5.7.0", + "@ethersproject/signing-key": "^5.7.0", + "@ethersproject/strings": "^5.7.0", + "@ethersproject/transactions": "^5.7.0", + "@ethersproject/wordlists": "^5.7.0" + } + }, + "node_modules/@ethersproject/json-wallets": { + "version": "5.7.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/abstract-signer": "^5.7.0", + "@ethersproject/address": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/hdnode": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/pbkdf2": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/random": "^5.7.0", + "@ethersproject/strings": "^5.7.0", + "@ethersproject/transactions": "^5.7.0", + "aes-js": "3.0.0", + "scrypt-js": "3.0.1" + } + }, + "node_modules/@ethersproject/keccak256": { + "version": "5.7.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bytes": "^5.7.0", + "js-sha3": "0.8.0" + } + }, + "node_modules/@ethersproject/logger": { + "version": "5.7.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT" + }, + "node_modules/@ethersproject/networks": { + "version": "5.7.1", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/logger": "^5.7.0" + } + }, + "node_modules/@ethersproject/pbkdf2": { + "version": "5.7.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/sha2": "^5.7.0" + } + }, + "node_modules/@ethersproject/properties": { + "version": "5.7.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/logger": "^5.7.0" + } + }, + "node_modules/@ethersproject/providers": { + "version": "5.7.1", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/abstract-provider": "^5.7.0", + "@ethersproject/abstract-signer": "^5.7.0", + "@ethersproject/address": "^5.7.0", + "@ethersproject/base64": "^5.7.0", + "@ethersproject/basex": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/constants": "^5.7.0", + "@ethersproject/hash": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/networks": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/random": "^5.7.0", + "@ethersproject/rlp": "^5.7.0", + "@ethersproject/sha2": "^5.7.0", + "@ethersproject/strings": "^5.7.0", + "@ethersproject/transactions": "^5.7.0", + "@ethersproject/web": "^5.7.0", + "bech32": "1.1.4", + "ws": "7.4.6" + } + }, + "node_modules/@ethersproject/providers/node_modules/ws": { + "version": "7.4.6", + "license": "MIT", + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/@ethersproject/random": { + "version": "5.7.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0" + } + }, + "node_modules/@ethersproject/rlp": { + "version": "5.7.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0" + } + }, + "node_modules/@ethersproject/sha2": { + "version": "5.7.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "hash.js": "1.1.7" + } + }, + "node_modules/@ethersproject/signing-key": { + "version": "5.7.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "bn.js": "^5.2.1", + "elliptic": "6.5.4", + "hash.js": "1.1.7" + } + }, + "node_modules/@ethersproject/solidity": { + "version": "5.7.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/sha2": "^5.7.0", + "@ethersproject/strings": "^5.7.0" + } + }, + "node_modules/@ethersproject/strings": { + "version": "5.7.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/constants": "^5.7.0", + "@ethersproject/logger": "^5.7.0" + } + }, + "node_modules/@ethersproject/transactions": { + "version": "5.7.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/address": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/constants": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/rlp": "^5.7.0", + "@ethersproject/signing-key": "^5.7.0" + } + }, + "node_modules/@ethersproject/units": { + "version": "5.7.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/constants": "^5.7.0", + "@ethersproject/logger": "^5.7.0" + } + }, + "node_modules/@ethersproject/wallet": { + "version": "5.7.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/abstract-provider": "^5.7.0", + "@ethersproject/abstract-signer": "^5.7.0", + "@ethersproject/address": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/hash": "^5.7.0", + "@ethersproject/hdnode": "^5.7.0", + "@ethersproject/json-wallets": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/random": "^5.7.0", + "@ethersproject/signing-key": "^5.7.0", + "@ethersproject/transactions": "^5.7.0", + "@ethersproject/wordlists": "^5.7.0" + } + }, + "node_modules/@ethersproject/web": { + "version": "5.7.1", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/base64": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/strings": "^5.7.0" + } + }, + "node_modules/@ethersproject/wordlists": { + "version": "5.7.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/hash": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/strings": "^5.7.0" + } + }, + "node_modules/@hapi/hoek": { + "version": "9.3.0", + "license": "BSD-3-Clause" + }, + "node_modules/@hapi/topo": { + "version": "5.1.0", + "license": "BSD-3-Clause", + "dependencies": { + "@hapi/hoek": "^9.0.0" + } + }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.5.0", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@humanwhocodes/object-schema": "^1.2.0", + "debug": "^4.1.1", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "1.2.1", + "dev": true, + "license": "BSD-3-Clause", + "peer": true + }, + "node_modules/@magiceden-oss/mmm": { + "resolved": "sdk", + "link": true + }, + "node_modules/@magiceden-oss/open_creator_protocol": { + "version": "0.3.2", + "license": "Apache 2.0", + "dependencies": { + "@metaplex-foundation/beet": "^0.7.1", + "@metaplex-foundation/beet-solana": "^0.3.1", + "@metaplex-foundation/js": "^0.16.1", + "@metaplex-foundation/mpl-token-metadata": "^2.5.1", + "@metaplex-foundation/rustbin": "^0.3.1", + "@metaplex-foundation/solita": "^0.12.2", + "@project-serum/anchor": "^0.25.0", + "@project-serum/serum": "^0.13.58", + "@solana/spl-token": "^0.3.5", + "@solana/web3.js": "^1.65.0", + "borsh": "^0.7.0" + } + }, + "node_modules/@magiceden-oss/open_creator_protocol/node_modules/@bundlr-network/client": { + "version": "0.7.17", + "license": "Apache-2.0", + "dependencies": { + "@solana/wallet-adapter-base": "^0.9.2", + "@solana/web3.js": "^1.36.0", + "@supercharge/promise-pool": "^2.1.0", + "algosdk": "^1.13.1", + "arbundles": "^0.6.20", + "arweave": "^1.11.4", + "async-retry": "^1.3.3", + "axios": "^0.25.0", + "base64url": "^3.0.1", + "bignumber.js": "^9.0.1", + "bs58": "^4.0.1", + "commander": "^8.2.0", + "csv": "^6.0.5", + "ethers": "^5.5.1", + "inquirer": "^8.2.0", + "js-sha256": "^0.9.0", + "mime-types": "^2.1.34", + "near-api-js": "^0.44.2", + "near-seed-phrase": "^0.2.0" + }, + "bin": { + "bundlr": "build/node/cli.js" + } + }, + "node_modules/@magiceden-oss/open_creator_protocol/node_modules/@metaplex-foundation/js": { + "version": "0.16.1", + "license": "MIT", + "dependencies": { + "@bundlr-network/client": "^0.7.14", + "@metaplex-foundation/beet": "^0.4.0", + "@metaplex-foundation/beet-solana": "^0.3.0", + "@metaplex-foundation/mpl-auction-house": "^2.1.1", + "@metaplex-foundation/mpl-candy-machine": "^4.4.1", + "@metaplex-foundation/mpl-token-metadata": "^2.2.2", + "@solana/spl-token": "^0.2.0", + "@solana/web3.js": "^1.47.3", + "abort-controller": "^3.0.0", + "bignumber.js": "^9.0.2", + "bn.js": "^5.2.0", + "bs58": "^5.0.0", + "buffer": "^6.0.3", + "cross-fetch": "^3.1.5", + "debug": "^4.3.4", + "eventemitter3": "^4.0.7", + "lodash.clonedeep": "^4.5.0", + "lodash.isequal": "^4.5.0", + "mime": "^3.0.0", + "tweetnacl": "^1.0.3" + }, + "engines": { + "node": ">=16.0" + } + }, + "node_modules/@magiceden-oss/open_creator_protocol/node_modules/@metaplex-foundation/js/node_modules/@metaplex-foundation/beet": { + "version": "0.4.0", + "license": "Apache-2.0", + "dependencies": { + "ansicolors": "^0.3.2", + "bn.js": "^5.2.0", + "debug": "^4.3.3" + } + }, + "node_modules/@magiceden-oss/open_creator_protocol/node_modules/@metaplex-foundation/js/node_modules/@solana/spl-token": { + "version": "0.2.0", + "license": "Apache-2.0", + "dependencies": { + "@solana/buffer-layout": "^4.0.0", + "@solana/buffer-layout-utils": "^0.2.0", + "@solana/web3.js": "^1.32.0", + "start-server-and-test": "^1.14.0" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/@magiceden-oss/open_creator_protocol/node_modules/@metaplex-foundation/js/node_modules/bs58": { + "version": "5.0.0", + "license": "MIT", + "dependencies": { + "base-x": "^4.0.0" + } + }, + "node_modules/@magiceden-oss/open_creator_protocol/node_modules/@metaplex-foundation/mpl-token-metadata": { + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/@metaplex-foundation/mpl-token-metadata/-/mpl-token-metadata-2.13.0.tgz", + "integrity": "sha512-Fl/8I0L9rv4bKTV/RAl5YIbJe9SnQPInKvLz+xR1fEc4/VQkuCn3RPgypfUMEKWmCznzaw4sApDxy6CFS4qmJw==", + "dependencies": { + "@metaplex-foundation/beet": "^0.7.1", + "@metaplex-foundation/beet-solana": "^0.4.0", + "@metaplex-foundation/cusper": "^0.0.2", + "@solana/spl-token": "^0.3.6", + "@solana/web3.js": "^1.66.2", + "bn.js": "^5.2.0", + "debug": "^4.3.4" + } + }, + "node_modules/@magiceden-oss/open_creator_protocol/node_modules/@metaplex-foundation/mpl-token-metadata/node_modules/@metaplex-foundation/beet-solana": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@metaplex-foundation/beet-solana/-/beet-solana-0.4.1.tgz", + "integrity": "sha512-/6o32FNUtwK8tjhotrvU/vorP7umBuRFvBZrC6XCk51aKidBHe5LPVPA5AjGPbV3oftMfRuXPNd9yAGeEqeCDQ==", + "dependencies": { + "@metaplex-foundation/beet": ">=0.1.0", + "@solana/web3.js": "^1.56.2", + "bs58": "^5.0.0", + "debug": "^4.3.4" + } + }, + "node_modules/@magiceden-oss/open_creator_protocol/node_modules/@metaplex-foundation/mpl-token-metadata/node_modules/bs58": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-5.0.0.tgz", + "integrity": "sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ==", + "dependencies": { + "base-x": "^4.0.0" + } + }, + "node_modules/@magiceden-oss/open_creator_protocol/node_modules/@project-serum/anchor": { + "version": "0.25.0", + "license": "(MIT OR Apache-2.0)", + "dependencies": { + "@project-serum/borsh": "^0.2.5", + "@solana/web3.js": "^1.36.0", + "base64-js": "^1.5.1", + "bn.js": "^5.1.2", + "bs58": "^4.0.1", + "buffer-layout": "^1.2.2", + "camelcase": "^5.3.1", + "cross-fetch": "^3.1.5", + "crypto-hash": "^1.3.0", + "eventemitter3": "^4.0.7", + "js-sha256": "^0.9.0", + "pako": "^2.0.3", + "snake-case": "^3.0.4", + "superstruct": "^0.15.4", + "toml": "^3.0.0" + }, + "engines": { + "node": ">=11" + } + }, + "node_modules/@magiceden-oss/open_creator_protocol/node_modules/base-x": { + "version": "4.0.0", + "license": "MIT" + }, + "node_modules/@magiceden-oss/open_creator_protocol/node_modules/commander": { + "version": "8.3.0", + "license": "MIT", + "engines": { + "node": ">= 12" + } + }, + "node_modules/@magiceden-oss/open_creator_protocol/node_modules/debug": { + "version": "4.3.4", + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/@magiceden-oss/open_creator_protocol/node_modules/superstruct": { + "version": "0.15.5", + "license": "MIT" + }, + "node_modules/@metaplex-foundation/beet": { + "version": "0.7.1", + "license": "Apache-2.0", + "dependencies": { + "ansicolors": "^0.3.2", + "bn.js": "^5.2.0", + "debug": "^4.3.3" + } + }, + "node_modules/@metaplex-foundation/beet-solana": { + "version": "0.3.1", + "license": "Apache-2.0", + "dependencies": { + "@metaplex-foundation/beet": ">=0.1.0", + "@solana/web3.js": "^1.56.2", + "bs58": "^5.0.0", + "debug": "^4.3.4" + } + }, + "node_modules/@metaplex-foundation/beet-solana/node_modules/base-x": { + "version": "4.0.0", + "license": "MIT" + }, + "node_modules/@metaplex-foundation/beet-solana/node_modules/bs58": { + "version": "5.0.0", + "license": "MIT", + "dependencies": { + "base-x": "^4.0.0" + } + }, + "node_modules/@metaplex-foundation/beet-solana/node_modules/debug": { + "version": "4.3.4", + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/@metaplex-foundation/cusper": { + "version": "0.0.2", + "license": "Apache-2.0" + }, + "node_modules/@metaplex-foundation/js": { + "version": "0.19.4", + "license": "MIT", + "dependencies": { + "@bundlr-network/client": "^0.8.8", + "@metaplex-foundation/beet": "0.7.1", + "@metaplex-foundation/mpl-auction-house": "^2.3.0", + "@metaplex-foundation/mpl-bubblegum": "^0.6.2", + "@metaplex-foundation/mpl-candy-guard": "^0.3.0", + "@metaplex-foundation/mpl-candy-machine": "^5.0.0", + "@metaplex-foundation/mpl-candy-machine-core": "^0.1.2", + "@metaplex-foundation/mpl-token-metadata": "^2.11.0", + "@noble/ed25519": "^1.7.1", + "@noble/hashes": "^1.1.3", + "@solana/spl-account-compression": "^0.1.8", + "@solana/spl-token": "^0.3.5", + "@solana/web3.js": "^1.63.1", + "bignumber.js": "^9.0.2", + "bn.js": "^5.2.1", + "bs58": "^5.0.0", + "buffer": "^6.0.3", + "debug": "^4.3.4", + "eventemitter3": "^4.0.7", + "lodash.clonedeep": "^4.5.0", + "lodash.isequal": "^4.5.0", + "merkletreejs": "^0.2.32", + "mime": "^3.0.0", + "node-fetch": "^2.6.7" + } + }, + "node_modules/@metaplex-foundation/js/node_modules/@metaplex-foundation/beet-solana": { + "version": "0.4.0", + "license": "Apache-2.0", + "dependencies": { + "@metaplex-foundation/beet": ">=0.1.0", + "@solana/web3.js": "^1.56.2", + "bs58": "^5.0.0", + "debug": "^4.3.4" + } + }, + "node_modules/@metaplex-foundation/js/node_modules/@metaplex-foundation/mpl-candy-machine": { + "version": "5.0.0", + "license": "Apache-2.0", + "dependencies": { + "@metaplex-foundation/beet": "^0.7.1", + "@metaplex-foundation/beet-solana": "^0.4.0", + "@metaplex-foundation/cusper": "^0.0.2", + "@solana/spl-token": "^0.3.6", + "@solana/web3.js": "^1.66.2" + } + }, + "node_modules/@metaplex-foundation/js/node_modules/@metaplex-foundation/mpl-token-metadata": { + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/@metaplex-foundation/mpl-token-metadata/-/mpl-token-metadata-2.13.0.tgz", + "integrity": "sha512-Fl/8I0L9rv4bKTV/RAl5YIbJe9SnQPInKvLz+xR1fEc4/VQkuCn3RPgypfUMEKWmCznzaw4sApDxy6CFS4qmJw==", + "dependencies": { + "@metaplex-foundation/beet": "^0.7.1", + "@metaplex-foundation/beet-solana": "^0.4.0", + "@metaplex-foundation/cusper": "^0.0.2", + "@solana/spl-token": "^0.3.6", + "@solana/web3.js": "^1.66.2", + "bn.js": "^5.2.0", + "debug": "^4.3.4" + } + }, + "node_modules/@metaplex-foundation/js/node_modules/base-x": { + "version": "4.0.0", + "license": "MIT" + }, + "node_modules/@metaplex-foundation/js/node_modules/bs58": { + "version": "5.0.0", + "license": "MIT", + "dependencies": { + "base-x": "^4.0.0" + } + }, + "node_modules/@metaplex-foundation/js/node_modules/debug": { + "version": "4.3.4", + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/@metaplex-foundation/mpl-auction-house": { + "version": "2.3.0", + "license": "Apache-2.0", + "dependencies": { + "@metaplex-foundation/beet": "^0.6.1", + "@metaplex-foundation/beet-solana": "^0.3.1", + "@metaplex-foundation/cusper": "^0.0.2", + "@solana/web3.js": "^1.56.2", + "bn.js": "^5.2.0" + } + }, + "node_modules/@metaplex-foundation/mpl-auction-house/node_modules/@metaplex-foundation/beet": { + "version": "0.6.1", + "license": "Apache-2.0", + "dependencies": { + "ansicolors": "^0.3.2", + "bn.js": "^5.2.0", + "debug": "^4.3.3" + } + }, + "node_modules/@metaplex-foundation/mpl-bubblegum": { + "version": "0.6.2", + "license": "Apache-2.0", + "dependencies": { + "@metaplex-foundation/beet": "0.7.1", + "@metaplex-foundation/beet-solana": "0.4.0", + "@metaplex-foundation/cusper": "^0.0.2", + "@metaplex-foundation/mpl-token-metadata": "^2.5.2", + "@solana/spl-account-compression": "^0.1.4", + "@solana/spl-token": "^0.1.8", + "@solana/web3.js": "^1.50.1", + "bn.js": "^5.2.0", + "js-sha3": "^0.8.0" + } + }, + "node_modules/@metaplex-foundation/mpl-bubblegum/node_modules/@metaplex-foundation/beet-solana": { + "version": "0.4.0", + "license": "Apache-2.0", + "dependencies": { + "@metaplex-foundation/beet": ">=0.1.0", + "@solana/web3.js": "^1.56.2", + "bs58": "^5.0.0", + "debug": "^4.3.4" + } + }, + "node_modules/@metaplex-foundation/mpl-bubblegum/node_modules/@metaplex-foundation/mpl-token-metadata": { + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/@metaplex-foundation/mpl-token-metadata/-/mpl-token-metadata-2.13.0.tgz", + "integrity": "sha512-Fl/8I0L9rv4bKTV/RAl5YIbJe9SnQPInKvLz+xR1fEc4/VQkuCn3RPgypfUMEKWmCznzaw4sApDxy6CFS4qmJw==", + "dependencies": { + "@metaplex-foundation/beet": "^0.7.1", + "@metaplex-foundation/beet-solana": "^0.4.0", + "@metaplex-foundation/cusper": "^0.0.2", + "@solana/spl-token": "^0.3.6", + "@solana/web3.js": "^1.66.2", + "bn.js": "^5.2.0", + "debug": "^4.3.4" + } + }, + "node_modules/@metaplex-foundation/mpl-bubblegum/node_modules/@metaplex-foundation/mpl-token-metadata/node_modules/@solana/spl-token": { + "version": "0.3.11", + "resolved": "https://registry.npmjs.org/@solana/spl-token/-/spl-token-0.3.11.tgz", + "integrity": "sha512-bvohO3rIMSVL24Pb+I4EYTJ6cL82eFpInEXD/I8K8upOGjpqHsKUoAempR/RnUlI1qSFNyFlWJfu6MNUgfbCQQ==", + "dependencies": { + "@solana/buffer-layout": "^4.0.0", + "@solana/buffer-layout-utils": "^0.2.0", + "@solana/spl-token-metadata": "^0.1.2", + "buffer": "^6.0.3" + }, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "@solana/web3.js": "^1.88.0" + } + }, + "node_modules/@metaplex-foundation/mpl-bubblegum/node_modules/@solana/spl-token": { + "version": "0.1.8", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.10.5", + "@solana/web3.js": "^1.21.0", + "bn.js": "^5.1.0", + "buffer": "6.0.3", + "buffer-layout": "^1.2.0", + "dotenv": "10.0.0" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/@metaplex-foundation/mpl-bubblegum/node_modules/base-x": { + "version": "4.0.0", + "license": "MIT" + }, + "node_modules/@metaplex-foundation/mpl-bubblegum/node_modules/bs58": { + "version": "5.0.0", + "license": "MIT", + "dependencies": { + "base-x": "^4.0.0" + } + }, + "node_modules/@metaplex-foundation/mpl-bubblegum/node_modules/debug": { + "version": "4.3.4", + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/@metaplex-foundation/mpl-candy-guard": { + "version": "0.3.2", + "license": "Apache-2.0", + "dependencies": { + "@metaplex-foundation/beet": "^0.4.0", + "@metaplex-foundation/beet-solana": "^0.3.0", + "@metaplex-foundation/cusper": "^0.0.2", + "@solana/web3.js": "^1.66.2", + "bn.js": "^5.2.0" + } + }, + "node_modules/@metaplex-foundation/mpl-candy-guard/node_modules/@metaplex-foundation/beet": { + "version": "0.4.0", + "license": "Apache-2.0", + "dependencies": { + "ansicolors": "^0.3.2", + "bn.js": "^5.2.0", + "debug": "^4.3.3" + } + }, + "node_modules/@metaplex-foundation/mpl-candy-machine": { + "version": "4.7.1", + "license": "Apache-2.0", + "dependencies": { + "@metaplex-foundation/beet": "^0.4.0", + "@metaplex-foundation/beet-solana": "^0.3.0", + "@metaplex-foundation/cusper": "^0.0.2", + "@metaplex-foundation/mpl-core": "^0.6.1", + "@solana/web3.js": "^1.35.1" + } + }, + "node_modules/@metaplex-foundation/mpl-candy-machine-core": { + "version": "0.1.2", + "license": "Apache-2.0", + "dependencies": { + "@metaplex-foundation/beet": "^0.4.0", + "@metaplex-foundation/beet-solana": "^0.3.0", + "@metaplex-foundation/cusper": "^0.0.2", + "@solana/web3.js": "^1.56.2", + "bn.js": "^5.2.0" + } + }, + "node_modules/@metaplex-foundation/mpl-candy-machine-core/node_modules/@metaplex-foundation/beet": { + "version": "0.4.0", + "license": "Apache-2.0", + "dependencies": { + "ansicolors": "^0.3.2", + "bn.js": "^5.2.0", + "debug": "^4.3.3" + } + }, + "node_modules/@metaplex-foundation/mpl-candy-machine/node_modules/@metaplex-foundation/beet": { + "version": "0.4.0", + "license": "Apache-2.0", + "dependencies": { + "ansicolors": "^0.3.2", + "bn.js": "^5.2.0", + "debug": "^4.3.3" + } + }, + "node_modules/@metaplex-foundation/mpl-core": { + "version": "0.6.1", + "license": "MIT", + "dependencies": { + "@solana/web3.js": "^1.35.1", + "bs58": "^4.0.1" + } + }, + "node_modules/@metaplex-foundation/mpl-migration-validator": { + "version": "0.4.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@metaplex-foundation/beet": "^0.7.1", + "@metaplex-foundation/beet-solana": "^0.4.0", + "@metaplex-foundation/cusper": "^0.0.2", + "@solana/spl-token": "^0.3.6", + "@solana/web3.js": "^1.66.2", + "bn.js": "^5.2.0", + "debug": "^4.3.4" + } + }, + "node_modules/@metaplex-foundation/mpl-migration-validator/node_modules/@metaplex-foundation/beet-solana": { + "version": "0.4.0", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@metaplex-foundation/beet": ">=0.1.0", + "@solana/web3.js": "^1.56.2", + "bs58": "^5.0.0", + "debug": "^4.3.4" + } + }, + "node_modules/@metaplex-foundation/mpl-migration-validator/node_modules/base-x": { + "version": "4.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/@metaplex-foundation/mpl-migration-validator/node_modules/bs58": { + "version": "5.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "base-x": "^4.0.0" + } + }, + "node_modules/@metaplex-foundation/mpl-migration-validator/node_modules/debug": { + "version": "4.3.4", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/@metaplex-foundation/mpl-token-auth-rules": { + "version": "2.0.0", + "license": "Apache-2.0", + "dependencies": { + "@metaplex-foundation/beet": "^0.7.1", + "@metaplex-foundation/beet-solana": "^0.4.0", + "@metaplex-foundation/cusper": "^0.0.2", + "@msgpack/msgpack": "^2.8.0", + "@solana/spl-token": "^0.3.6", + "@solana/web3.js": "^1.66.2", + "bn.js": "^5.2.1" + } + }, + "node_modules/@metaplex-foundation/mpl-token-auth-rules/node_modules/@metaplex-foundation/beet-solana": { + "version": "0.4.0", + "license": "Apache-2.0", + "dependencies": { + "@metaplex-foundation/beet": ">=0.1.0", + "@solana/web3.js": "^1.56.2", + "bs58": "^5.0.0", + "debug": "^4.3.4" + } + }, + "node_modules/@metaplex-foundation/mpl-token-auth-rules/node_modules/base-x": { + "version": "4.0.0", + "license": "MIT" + }, + "node_modules/@metaplex-foundation/mpl-token-auth-rules/node_modules/bs58": { + "version": "5.0.0", + "license": "MIT", + "dependencies": { + "base-x": "^4.0.0" + } + }, + "node_modules/@metaplex-foundation/mpl-token-auth-rules/node_modules/debug": { + "version": "4.3.4", + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/@metaplex-foundation/mpl-token-metadata": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@metaplex-foundation/mpl-token-metadata/-/mpl-token-metadata-3.2.0.tgz", + "integrity": "sha512-IP+orxAIkQwSa9M+xsYi7IopV+/0od5rgXTxp0988cHeB0hR1RpXQT8RrcTH/PeOs/tPCU5HvU01NaavV9EEcw==", + "dependencies": { + "@metaplex-foundation/mpl-toolbox": "^0.9.0" + }, + "peerDependencies": { + "@metaplex-foundation/umi": ">= 0.8.2 < 1" + } + }, + "node_modules/@metaplex-foundation/mpl-toolbox": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/@metaplex-foundation/mpl-toolbox/-/mpl-toolbox-0.9.2.tgz", + "integrity": "sha512-fNOpWUobslv/zyhj4KHVx+773B43/75q7vCiiFOuTAWs46OQXmJL8sl72qwh36pi1aNpoQMCL/wNI3wPNyJsNw==", + "peerDependencies": { + "@metaplex-foundation/umi": ">= 0.8.2 < 1" + } + }, + "node_modules/@metaplex-foundation/rustbin": { + "version": "0.3.1", + "license": "Apache-2.0", + "dependencies": { + "debug": "^4.3.3", + "semver": "^7.3.7", + "text-table": "^0.2.0", + "toml": "^3.0.0" + } + }, + "node_modules/@metaplex-foundation/solita": { + "version": "0.12.2", + "license": "Apache-2.0", + "dependencies": { + "@metaplex-foundation/beet": "^0.4.0", + "@metaplex-foundation/beet-solana": "^0.3.0", + "@metaplex-foundation/rustbin": "^0.3.0", + "@solana/web3.js": "^1.36.0", + "camelcase": "^6.2.1", + "debug": "^4.3.3", + "js-sha256": "^0.9.0", + "prettier": "^2.5.1", + "snake-case": "^3.0.4", + "spok": "^1.4.3" + }, + "bin": { + "solita": "dist/src/cli/solita.js" + } + }, + "node_modules/@metaplex-foundation/solita/node_modules/@metaplex-foundation/beet": { + "version": "0.4.0", + "license": "Apache-2.0", + "dependencies": { + "ansicolors": "^0.3.2", + "bn.js": "^5.2.0", + "debug": "^4.3.3" + } + }, + "node_modules/@metaplex-foundation/solita/node_modules/camelcase": { + "version": "6.3.0", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@metaplex-foundation/umi": { + "version": "0.8.10", + "resolved": "https://registry.npmjs.org/@metaplex-foundation/umi/-/umi-0.8.10.tgz", + "integrity": "sha512-iGuGIfJh2+YFvUIkZ0nB/69EsQcaoq89DDPRPYvPBtOunfv8TH8SNrwcsXHlp9aBtn5FGKCPx3V3X/eurB32Fg==", + "dependencies": { + "@metaplex-foundation/umi-options": "^0.8.9", + "@metaplex-foundation/umi-public-keys": "^0.8.9", + "@metaplex-foundation/umi-serializers": "^0.8.9" + } + }, + "node_modules/@metaplex-foundation/umi-bundle-tests": { + "version": "0.8.10", + "resolved": "https://registry.npmjs.org/@metaplex-foundation/umi-bundle-tests/-/umi-bundle-tests-0.8.10.tgz", + "integrity": "sha512-12BLhBF5lXLG7K1m4J8mEArcc/l4a4iRCmZt2VKSD0tA+i+b3ou1RA+e+262nhrEZ/uhYx0ChUzrJlBk0a1aXQ==", + "dependencies": { + "@metaplex-foundation/umi-eddsa-web3js": "^0.8.10", + "@metaplex-foundation/umi-http-fetch": "^0.8.10", + "@metaplex-foundation/umi-program-repository": "^0.8.10", + "@metaplex-foundation/umi-rpc-web3js": "^0.8.10", + "@metaplex-foundation/umi-serializer-data-view": "^0.8.10", + "@metaplex-foundation/umi-storage-mock": "^0.8.10", + "@metaplex-foundation/umi-transaction-factory-web3js": "^0.8.10" + }, + "peerDependencies": { + "@metaplex-foundation/umi": "^0.8.10", + "@solana/web3.js": "^1.72.0" + } + }, + "node_modules/@metaplex-foundation/umi-eddsa-web3js": { + "version": "0.8.10", + "resolved": "https://registry.npmjs.org/@metaplex-foundation/umi-eddsa-web3js/-/umi-eddsa-web3js-0.8.10.tgz", + "integrity": "sha512-2CLsuQ67oPKczB7RuG07/Ro1rrW25vGZArren20/zBTgHubGIuFW7V8e9qZDqkHDt1nFecxrX55g0fNtQaU40g==", + "dependencies": { + "@metaplex-foundation/umi-web3js-adapters": "^0.8.10", + "@noble/curves": "^1.0.0" + }, + "peerDependencies": { + "@metaplex-foundation/umi": "^0.8.10", + "@solana/web3.js": "^1.72.0" + } + }, + "node_modules/@metaplex-foundation/umi-http-fetch": { + "version": "0.8.10", + "resolved": "https://registry.npmjs.org/@metaplex-foundation/umi-http-fetch/-/umi-http-fetch-0.8.10.tgz", + "integrity": "sha512-9QkVMaM8A8JFaTSanVJT3R7IzeLn05xrK7fFnfCTASaTvk+7Dj8ZsgXQjuyCi1pXQrMN+EsREn2NE/tn48ffMQ==", + "dependencies": { + "node-fetch": "^2.6.7" + }, + "peerDependencies": { + "@metaplex-foundation/umi": "^0.8.10" + } + }, + "node_modules/@metaplex-foundation/umi-options": { + "version": "0.8.9", + "resolved": "https://registry.npmjs.org/@metaplex-foundation/umi-options/-/umi-options-0.8.9.tgz", + "integrity": "sha512-jSQ61sZMPSAk/TXn8v8fPqtz3x8d0/blVZXLLbpVbo2/T5XobiI6/MfmlUosAjAUaQl6bHRF8aIIqZEFkJiy4A==" + }, + "node_modules/@metaplex-foundation/umi-program-repository": { + "version": "0.8.10", + "resolved": "https://registry.npmjs.org/@metaplex-foundation/umi-program-repository/-/umi-program-repository-0.8.10.tgz", + "integrity": "sha512-zw+UMOg9z3xqqeosRfctmcnaDYkaoMMvqhu7Vpwt7K9tpVtMaMT5yei29ORvaYpiEVG5hZSbywr/vQsNY0EV9g==", + "peerDependencies": { + "@metaplex-foundation/umi": "^0.8.10" + } + }, + "node_modules/@metaplex-foundation/umi-public-keys": { + "version": "0.8.9", + "resolved": "https://registry.npmjs.org/@metaplex-foundation/umi-public-keys/-/umi-public-keys-0.8.9.tgz", + "integrity": "sha512-CxMzN7dgVGOq9OcNCJe2casKUpJ3RmTVoOvDFyeoTQuK+vkZ1YSSahbqC1iGuHEtKTLSjtWjKvUU6O7zWFTw3Q==", + "dependencies": { + "@metaplex-foundation/umi-serializers-encodings": "^0.8.9" + } + }, + "node_modules/@metaplex-foundation/umi-rpc-web3js": { + "version": "0.8.10", + "resolved": "https://registry.npmjs.org/@metaplex-foundation/umi-rpc-web3js/-/umi-rpc-web3js-0.8.10.tgz", + "integrity": "sha512-+60uxlX1OcThL2UIW9dbcy0Ihr011ggxkQYSxc1qh4qitgD9wrZZ/v9nX4tzEN88a52UJGhH5G3SF6CNmqy4aw==", + "dependencies": { + "@metaplex-foundation/umi-web3js-adapters": "^0.8.10" + }, + "peerDependencies": { + "@metaplex-foundation/umi": "^0.8.10", + "@solana/web3.js": "^1.72.0" + } + }, + "node_modules/@metaplex-foundation/umi-serializer-data-view": { + "version": "0.8.10", + "resolved": "https://registry.npmjs.org/@metaplex-foundation/umi-serializer-data-view/-/umi-serializer-data-view-0.8.10.tgz", + "integrity": "sha512-DVKUQw7FEfpRIE9RF4YU73Mwlaf42RAWDgcycNiYFWpj/FLRebNr+2NT3ALYlOqXsAchnCAYjlQVxCB0Sopn9Q==", + "peerDependencies": { + "@metaplex-foundation/umi": "^0.8.10" + } + }, + "node_modules/@metaplex-foundation/umi-serializers": { + "version": "0.8.9", + "resolved": "https://registry.npmjs.org/@metaplex-foundation/umi-serializers/-/umi-serializers-0.8.9.tgz", + "integrity": "sha512-Sve8Etm3zqvLSUfza+MYRkjTnCpiaAFT7VWdqeHzA3n58P0AfT3p74RrZwVt/UFkxI+ln8BslwBDJmwzcPkuHw==", + "dependencies": { + "@metaplex-foundation/umi-options": "^0.8.9", + "@metaplex-foundation/umi-public-keys": "^0.8.9", + "@metaplex-foundation/umi-serializers-core": "^0.8.9", + "@metaplex-foundation/umi-serializers-encodings": "^0.8.9", + "@metaplex-foundation/umi-serializers-numbers": "^0.8.9" + } + }, + "node_modules/@metaplex-foundation/umi-serializers-core": { + "version": "0.8.9", + "resolved": "https://registry.npmjs.org/@metaplex-foundation/umi-serializers-core/-/umi-serializers-core-0.8.9.tgz", + "integrity": "sha512-WT82tkiYJ0Qmscp7uTj1Hz6aWQPETwaKLAENAUN5DeWghkuBKtuxyBKVvEOuoXerJSdhiAk0e8DWA4cxcTTQ/w==" + }, + "node_modules/@metaplex-foundation/umi-serializers-encodings": { + "version": "0.8.9", + "resolved": "https://registry.npmjs.org/@metaplex-foundation/umi-serializers-encodings/-/umi-serializers-encodings-0.8.9.tgz", + "integrity": "sha512-N3VWLDTJ0bzzMKcJDL08U3FaqRmwlN79FyE4BHj6bbAaJ9LEHjDQ9RJijZyWqTm0jE7I750fU7Ow5EZL38Xi6Q==", + "dependencies": { + "@metaplex-foundation/umi-serializers-core": "^0.8.9" + } + }, + "node_modules/@metaplex-foundation/umi-serializers-numbers": { + "version": "0.8.9", + "resolved": "https://registry.npmjs.org/@metaplex-foundation/umi-serializers-numbers/-/umi-serializers-numbers-0.8.9.tgz", + "integrity": "sha512-NtBf1fnVNQJHFQjLFzRu2i9GGnigb9hOm/Gfrk628d0q0tRJB7BOM3bs5C61VAs7kJs4yd+pDNVAERJkknQ7Lg==", + "dependencies": { + "@metaplex-foundation/umi-serializers-core": "^0.8.9" + } + }, + "node_modules/@metaplex-foundation/umi-storage-mock": { + "version": "0.8.10", + "resolved": "https://registry.npmjs.org/@metaplex-foundation/umi-storage-mock/-/umi-storage-mock-0.8.10.tgz", + "integrity": "sha512-YOg/ZeeyZoD9vywumL8rpQmgcm4PcWAy1QpEx6Q7ocVqMBlbD08Hrn9/F0cjvjUHhy8NYG7QrbNXdGnklavtuw==", + "peerDependencies": { + "@metaplex-foundation/umi": "^0.8.10" + } + }, + "node_modules/@metaplex-foundation/umi-transaction-factory-web3js": { + "version": "0.8.10", + "resolved": "https://registry.npmjs.org/@metaplex-foundation/umi-transaction-factory-web3js/-/umi-transaction-factory-web3js-0.8.10.tgz", + "integrity": "sha512-hnkDKdtuZgY6DKH6aSEd6UrZGi5/WvfYqJUWeM8SVl1/8GhNypNKWvuppvFHpU9X2tLXuF4JSG4TVxAuIs9LBQ==", + "dependencies": { + "@metaplex-foundation/umi-web3js-adapters": "^0.8.10" + }, + "peerDependencies": { + "@metaplex-foundation/umi": "^0.8.10", + "@solana/web3.js": "^1.72.0" + } + }, + "node_modules/@metaplex-foundation/umi-web3js-adapters": { + "version": "0.8.10", + "resolved": "https://registry.npmjs.org/@metaplex-foundation/umi-web3js-adapters/-/umi-web3js-adapters-0.8.10.tgz", + "integrity": "sha512-TGF+vzO/v0HMRM8sz1M1yh+wfZ5l4RCFm1Kkcy5MC9FrNDookPP6y9aYZ3R0QkEVVV3u+8QLptrTUrxr3EGmyQ==", + "dependencies": { + "buffer": "^6.0.3" + }, + "peerDependencies": { + "@metaplex-foundation/umi": "^0.8.10", + "@solana/web3.js": "^1.72.0" + } + }, + "node_modules/@msgpack/msgpack": { + "version": "2.8.0", + "license": "ISC", + "engines": { + "node": ">= 10" + } + }, + "node_modules/@noble/curves": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.3.0.tgz", + "integrity": "sha512-t01iSXPuN+Eqzb4eBX0S5oubSqXbK/xXa1Ne18Hj8f9pStxztHCE2gfboSp/dZRLSqfuLpRK2nDXDK+W9puocA==", + "dependencies": { + "@noble/hashes": "1.3.3" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@noble/ed25519": { + "version": "1.7.1", + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "license": "MIT" + }, + "node_modules/@noble/hashes": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.3.tgz", + "integrity": "sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA==", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@project-serum/anchor": { + "version": "0.26.0", + "license": "(MIT OR Apache-2.0)", + "dependencies": { + "@coral-xyz/borsh": "^0.26.0", + "@solana/web3.js": "^1.68.0", + "base64-js": "^1.5.1", + "bn.js": "^5.1.2", + "bs58": "^4.0.1", + "buffer-layout": "^1.2.2", + "camelcase": "^6.3.0", + "cross-fetch": "^3.1.5", + "crypto-hash": "^1.3.0", + "eventemitter3": "^4.0.7", + "js-sha256": "^0.9.0", + "pako": "^2.0.3", + "snake-case": "^3.0.4", + "superstruct": "^0.15.4", + "toml": "^3.0.0" + }, + "engines": { + "node": ">=11" + } + }, + "node_modules/@project-serum/anchor/node_modules/camelcase": { + "version": "6.3.0", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@project-serum/anchor/node_modules/superstruct": { + "version": "0.15.5", + "license": "MIT" + }, + "node_modules/@project-serum/borsh": { + "version": "0.2.5", + "license": "Apache-2.0", + "dependencies": { + "bn.js": "^5.1.2", + "buffer-layout": "^1.2.0" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "@solana/web3.js": "^1.2.0" + } + }, + "node_modules/@project-serum/serum": { + "version": "0.13.61", + "license": "MIT", + "dependencies": { + "@project-serum/anchor": "^0.11.1", + "@solana/spl-token": "^0.1.6", + "@solana/web3.js": "^1.21.0", + "bn.js": "^5.1.2", + "buffer-layout": "^1.2.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@project-serum/serum/node_modules/@project-serum/anchor": { + "version": "0.11.1", + "license": "(MIT OR Apache-2.0)", + "dependencies": { + "@project-serum/borsh": "^0.2.2", + "@solana/web3.js": "^1.17.0", + "base64-js": "^1.5.1", + "bn.js": "^5.1.2", + "bs58": "^4.0.1", + "buffer-layout": "^1.2.0", + "camelcase": "^5.3.1", + "crypto-hash": "^1.3.0", + "eventemitter3": "^4.0.7", + "find": "^0.3.0", + "js-sha256": "^0.9.0", + "pako": "^2.0.3", + "snake-case": "^3.0.4", + "toml": "^3.0.0" + }, + "engines": { + "node": ">=11" + } + }, + "node_modules/@project-serum/serum/node_modules/@solana/spl-token": { + "version": "0.1.8", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.10.5", + "@solana/web3.js": "^1.21.0", + "bn.js": "^5.1.0", + "buffer": "6.0.3", + "buffer-layout": "^1.2.0", + "dotenv": "10.0.0" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/@randlabs/communication-bridge": { + "version": "1.0.1", + "license": "Apache-2.0" + }, + "node_modules/@randlabs/myalgo-connect": { + "version": "1.3.1", + "license": "Apache-2.0", + "dependencies": { + "@randlabs/communication-bridge": "1.0.1" + } + }, + "node_modules/@sideway/address": { + "version": "4.1.4", + "license": "BSD-3-Clause", + "dependencies": { + "@hapi/hoek": "^9.0.0" + } + }, + "node_modules/@sideway/formula": { + "version": "3.0.0", + "license": "BSD-3-Clause" + }, + "node_modules/@sideway/pinpoint": { + "version": "2.0.0", + "license": "BSD-3-Clause" + }, + "node_modules/@solana/buffer-layout": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@solana/buffer-layout/-/buffer-layout-4.0.1.tgz", + "integrity": "sha512-E1ImOIAD1tBZFRdjeM4/pzTiTApC0AOBGwyAMS4fwIodCWArzJ3DWdoh8cKxeFM2fElkxBh2Aqts1BPC373rHA==", + "dependencies": { + "buffer": "~6.0.3" + }, + "engines": { + "node": ">=5.10" + } + }, + "node_modules/@solana/buffer-layout-utils": { + "version": "0.2.0", + "license": "Apache-2.0", + "dependencies": { + "@solana/buffer-layout": "^4.0.0", + "@solana/web3.js": "^1.32.0", + "bigint-buffer": "^1.1.5", + "bignumber.js": "^9.0.1" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/@solana/codecs-core": { + "version": "2.0.0-experimental.8618508", + "resolved": "https://registry.npmjs.org/@solana/codecs-core/-/codecs-core-2.0.0-experimental.8618508.tgz", + "integrity": "sha512-JCz7mKjVKtfZxkuDtwMAUgA7YvJcA2BwpZaA1NOLcted4OMC4Prwa3DUe3f3181ixPYaRyptbF0Ikq2MbDkYEA==" + }, + "node_modules/@solana/codecs-data-structures": { + "version": "2.0.0-experimental.8618508", + "resolved": "https://registry.npmjs.org/@solana/codecs-data-structures/-/codecs-data-structures-2.0.0-experimental.8618508.tgz", + "integrity": "sha512-sLpjL9sqzaDdkloBPV61Rht1tgaKq98BCtIKRuyscIrmVPu3wu0Bavk2n/QekmUzaTsj7K1pVSniM0YqCdnEBw==", + "dependencies": { + "@solana/codecs-core": "2.0.0-experimental.8618508", + "@solana/codecs-numbers": "2.0.0-experimental.8618508" + } + }, + "node_modules/@solana/codecs-numbers": { + "version": "2.0.0-experimental.8618508", + "resolved": "https://registry.npmjs.org/@solana/codecs-numbers/-/codecs-numbers-2.0.0-experimental.8618508.tgz", + "integrity": "sha512-EXQKfzFr3CkKKNzKSZPOOOzchXsFe90TVONWsSnVkonO9z+nGKALE0/L9uBmIFGgdzhhU9QQVFvxBMclIDJo2Q==", + "dependencies": { + "@solana/codecs-core": "2.0.0-experimental.8618508" + } + }, + "node_modules/@solana/codecs-strings": { + "version": "2.0.0-experimental.8618508", + "resolved": "https://registry.npmjs.org/@solana/codecs-strings/-/codecs-strings-2.0.0-experimental.8618508.tgz", + "integrity": "sha512-b2yhinr1+oe+JDmnnsV0641KQqqDG8AQ16Z/x7GVWO+AWHMpRlHWVXOq8U1yhPMA4VXxl7i+D+C6ql0VGFp0GA==", + "dependencies": { + "@solana/codecs-core": "2.0.0-experimental.8618508", + "@solana/codecs-numbers": "2.0.0-experimental.8618508" + }, + "peerDependencies": { + "fastestsmallesttextencoderdecoder": "^1.0.22" + } + }, + "node_modules/@solana/options": { + "version": "2.0.0-experimental.8618508", + "resolved": "https://registry.npmjs.org/@solana/options/-/options-2.0.0-experimental.8618508.tgz", + "integrity": "sha512-fy/nIRAMC3QHvnKi63KEd86Xr/zFBVxNW4nEpVEU2OT0gCEKwHY4Z55YHf7XujhyuM3PNpiBKg/YYw5QlRU4vg==", + "dependencies": { + "@solana/codecs-core": "2.0.0-experimental.8618508", + "@solana/codecs-numbers": "2.0.0-experimental.8618508" + } + }, + "node_modules/@solana/spl-account-compression": { + "version": "0.1.8", + "license": "Apache-2.0", + "dependencies": { + "@metaplex-foundation/beet": "^0.7.1", + "@metaplex-foundation/beet-solana": "^0.4.0", + "bn.js": "^5.2.1", + "borsh": "^0.7.0", + "js-sha3": "^0.8.0", + "typescript-collections": "^1.3.3" + }, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "@solana/web3.js": "^1.50.1" + } + }, + "node_modules/@solana/spl-account-compression/node_modules/@metaplex-foundation/beet-solana": { + "version": "0.4.0", + "license": "Apache-2.0", + "dependencies": { + "@metaplex-foundation/beet": ">=0.1.0", + "@solana/web3.js": "^1.56.2", + "bs58": "^5.0.0", + "debug": "^4.3.4" + } + }, + "node_modules/@solana/spl-account-compression/node_modules/base-x": { + "version": "4.0.0", + "license": "MIT" + }, + "node_modules/@solana/spl-account-compression/node_modules/bs58": { + "version": "5.0.0", + "license": "MIT", + "dependencies": { + "base-x": "^4.0.0" + } + }, + "node_modules/@solana/spl-account-compression/node_modules/debug": { + "version": "4.3.4", + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/@solana/spl-token": { + "version": "0.3.7", + "license": "Apache-2.0", + "dependencies": { + "@solana/buffer-layout": "^4.0.0", + "@solana/buffer-layout-utils": "^0.2.0", + "buffer": "^6.0.3" + }, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "@solana/web3.js": "^1.47.4" + } + }, + "node_modules/@solana/spl-token-metadata": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@solana/spl-token-metadata/-/spl-token-metadata-0.1.2.tgz", + "integrity": "sha512-hJYnAJNkDrtkE2Q41YZhCpeOGU/0JgRFXbtrtOuGGeKc3pkEUHB9DDoxZAxx+XRno13GozUleyBi0qypz4c3bw==", + "dependencies": { + "@solana/codecs-core": "2.0.0-experimental.8618508", + "@solana/codecs-data-structures": "2.0.0-experimental.8618508", + "@solana/codecs-numbers": "2.0.0-experimental.8618508", + "@solana/codecs-strings": "2.0.0-experimental.8618508", + "@solana/options": "2.0.0-experimental.8618508", + "@solana/spl-type-length-value": "0.1.0" + }, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "@solana/web3.js": "^1.87.6" + } + }, + "node_modules/@solana/spl-type-length-value": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@solana/spl-type-length-value/-/spl-type-length-value-0.1.0.tgz", + "integrity": "sha512-JBMGB0oR4lPttOZ5XiUGyvylwLQjt1CPJa6qQ5oM+MBCndfjz2TKKkw0eATlLLcYmq1jBVsNlJ2cD6ns2GR7lA==", + "dependencies": { + "buffer": "^6.0.3" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/@solana/wallet-adapter-base": { + "version": "0.9.18", + "license": "Apache-2.0", + "dependencies": { + "eventemitter3": "^4.0.0" + }, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "@solana/web3.js": "^1.61.0" + } + }, + "node_modules/@solana/web3.js": { + "version": "1.90.0", + "resolved": "https://registry.npmjs.org/@solana/web3.js/-/web3.js-1.90.0.tgz", + "integrity": "sha512-p0cb/COXb8NNVSMkGMPwqQ6NvObZgUitN80uOedMB+jbYWOKOeJBuPnzhenkIV9RX0krGwyuY1Ltn5O8MGFsEw==", + "dependencies": { + "@babel/runtime": "^7.23.4", + "@noble/curves": "^1.2.0", + "@noble/hashes": "^1.3.2", + "@solana/buffer-layout": "^4.0.1", + "agentkeepalive": "^4.5.0", + "bigint-buffer": "^1.1.5", + "bn.js": "^5.2.1", + "borsh": "^0.7.0", + "bs58": "^4.0.1", + "buffer": "6.0.3", + "fast-stable-stringify": "^1.0.0", + "jayson": "^4.1.0", + "node-fetch": "^2.7.0", + "rpc-websockets": "^7.5.1", + "superstruct": "^0.14.2" + } + }, + "node_modules/@solana/web3.js/node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/@supercharge/promise-pool": { + "version": "2.3.2", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/@types/bn.js": { + "version": "5.1.1", + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/chai": { + "version": "4.2.22", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/connect": { + "version": "3.4.38", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", + "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/json-schema": { + "version": "7.0.9", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/@types/json5": { + "version": "0.0.29", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/mocha": { + "version": "9.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "16.11.12", + "license": "MIT" + }, + "node_modules/@types/pbkdf2": { + "version": "3.1.0", + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/secp256k1": { + "version": "4.0.3", + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/ws": { + "version": "7.4.7", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-7.4.7.tgz", + "integrity": "sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "4.33.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@typescript-eslint/experimental-utils": "4.33.0", + "@typescript-eslint/scope-manager": "4.33.0", + "debug": "^4.3.1", + "functional-red-black-tree": "^1.0.1", + "ignore": "^5.1.8", + "regexpp": "^3.1.0", + "semver": "^7.3.5", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^4.0.0", + "eslint": "^5.0.0 || ^6.0.0 || ^7.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { + "version": "5.2.0", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/@typescript-eslint/experimental-utils": { + "version": "4.33.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@types/json-schema": "^7.0.7", + "@typescript-eslint/scope-manager": "4.33.0", + "@typescript-eslint/types": "4.33.0", + "@typescript-eslint/typescript-estree": "4.33.0", + "eslint-scope": "^5.1.1", + "eslint-utils": "^3.0.0" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "*" + } + }, + "node_modules/@typescript-eslint/experimental-utils/node_modules/eslint-utils": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "eslint-visitor-keys": "^2.0.0" + }, + "engines": { + "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": ">=5" + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "4.33.0", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@typescript-eslint/scope-manager": "4.33.0", + "@typescript-eslint/types": "4.33.0", + "@typescript-eslint/typescript-estree": "4.33.0", + "debug": "^4.3.1" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^5.0.0 || ^6.0.0 || ^7.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "4.33.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "4.33.0", + "@typescript-eslint/visitor-keys": "4.33.0" + }, + "engines": { + "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/types": { + "version": "4.33.0", + "dev": true, + "license": "MIT", + "engines": { + "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "4.33.0", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@typescript-eslint/types": "4.33.0", + "@typescript-eslint/visitor-keys": "4.33.0", + "debug": "^4.3.1", + "globby": "^11.0.3", + "is-glob": "^4.0.1", + "semver": "^7.3.5", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "4.33.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "4.33.0", + "eslint-visitor-keys": "^2.0.0" + }, + "engines": { + "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@ungap/promise-all-settled": { + "version": "1.1.2", + "dev": true, + "license": "ISC" + }, + "node_modules/abort-controller": { + "version": "3.0.0", + "license": "MIT", + "dependencies": { + "event-target-shim": "^5.0.0" + }, + "engines": { + "node": ">=6.5" + } + }, + "node_modules/acorn": { + "version": "7.4.1", + "dev": true, + "license": "MIT", + "peer": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "dev": true, + "license": "MIT", + "peer": true, + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/aes-js": { + "version": "3.0.0", + "license": "MIT" + }, + "node_modules/agentkeepalive": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.5.0.tgz", + "integrity": "sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew==", + "dependencies": { + "humanize-ms": "^1.2.1" + }, + "engines": { + "node": ">= 8.0.0" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/algo-msgpack-with-bigint": { + "version": "2.1.1", + "license": "ISC", + "engines": { + "node": ">= 10" + } + }, + "node_modules/algosdk": { + "version": "1.22.0", + "license": "MIT", + "dependencies": { + "algo-msgpack-with-bigint": "^2.1.1", + "buffer": "^6.0.2", + "hi-base32": "^0.5.1", + "js-sha256": "^0.9.0", + "js-sha3": "^0.8.0", + "js-sha512": "^0.8.0", + "json-bigint": "^1.0.0", + "superagent": "^6.1.0", + "tweetnacl": "^1.0.3", + "vlq": "^2.0.4" + }, + "optionalDependencies": { + "fsevents": "2.1.2" + } + }, + "node_modules/algosdk/node_modules/fsevents": { + "version": "2.1.2", + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/ansi-colors": { + "version": "4.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "license": "MIT", + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-escapes/node_modules/type-fest": { + "version": "0.21.3", + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/ansicolors": { + "version": "0.3.2", + "license": "MIT" + }, + "node_modules/anymatch": { + "version": "3.1.2", + "dev": true, + "license": "ISC", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/arbundles": { + "version": "0.6.21", + "license": "Apache-2.0", + "dependencies": { + "@noble/ed25519": "^1.6.1", + "@randlabs/myalgo-connect": "^1.1.2", + "@solana/wallet-adapter-base": "^0.9.2", + "algosdk": "^1.13.1", + "arweave": "^1.11.4", + "arweave-stream-tx": "^1.1.0", + "avsc": "https://github.com/Bundlr-Network/avsc#csp-fixes", + "axios": "^0.21.3", + "base64url": "^3.0.1", + "bs58": "^4.0.1", + "ethers": "^5.5.1", + "keccak": "^3.0.2", + "multistream": "^4.1.0", + "process": "^0.11.10", + "secp256k1": "^4.0.2", + "tmp-promise": "^3.0.2" + } + }, + "node_modules/arbundles/node_modules/axios": { + "version": "0.21.4", + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.14.0" + } + }, + "node_modules/arconnect": { + "version": "0.4.2", + "license": "MIT", + "dependencies": { + "arweave": "^1.10.13" + } + }, + "node_modules/arg": { + "version": "5.0.2", + "license": "MIT" + }, + "node_modules/argparse": { + "version": "1.0.10", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/array-includes": { + "version": "3.1.4", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.1", + "get-intrinsic": "^1.1.1", + "is-string": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array-union": { + "version": "2.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/array.prototype.flat": { + "version": "1.2.5", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/arrify": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/arweave": { + "version": "1.11.6", + "license": "MIT", + "dependencies": { + "arconnect": "^0.4.2", + "asn1.js": "^5.4.1", + "axios": "^0.27.2", + "base64-js": "^1.5.1", + "bignumber.js": "^9.0.2", + "util": "^0.12.4" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/arweave-stream-tx": { + "version": "1.1.0", + "dependencies": { + "exponential-backoff": "^3.1.0", + "stream-chunker": "^1.2.8" + }, + "peerDependencies": { + "arweave": "^1.10.0" + } + }, + "node_modules/arweave/node_modules/axios": { + "version": "0.27.2", + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.14.9", + "form-data": "^4.0.0" + } + }, + "node_modules/arweave/node_modules/form-data": { + "version": "4.0.0", + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/asn1.js": { + "version": "5.4.1", + "license": "MIT", + "dependencies": { + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "safer-buffer": "^2.1.0" + } + }, + "node_modules/asn1.js/node_modules/bn.js": { + "version": "4.12.0", + "license": "MIT" + }, + "node_modules/assertion-error": { + "version": "1.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/astral-regex": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/async-retry": { + "version": "1.3.3", + "license": "MIT", + "dependencies": { + "retry": "0.13.1" + } + }, + "node_modules/asynckit": { + "version": "0.4.0", + "license": "MIT" + }, + "node_modules/available-typed-arrays": { + "version": "1.0.5", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/avsc": { + "version": "5.4.7", + "resolved": "git+ssh://git@github.com/Bundlr-Network/avsc.git#a730cc8018b79e114b6a3381bbb57760a24c6cef", + "license": "MIT", + "engines": { + "node": ">=0.11" + } + }, + "node_modules/axios": { + "version": "0.25.0", + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.14.7" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "license": "MIT" + }, + "node_modules/base-x": { + "version": "3.0.9", + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "node_modules/base64-js": { + "version": "1.5.1", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/base64url": { + "version": "3.0.1", + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/bech32": { + "version": "1.1.4", + "license": "MIT" + }, + "node_modules/bigint-buffer": { + "version": "1.1.5", + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "bindings": "^1.3.0" + }, + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/bignumber.js": { + "version": "9.1.0", + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/binary-extensions": { + "version": "2.2.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/bindings": { + "version": "1.5.0", + "license": "MIT", + "dependencies": { + "file-uri-to-path": "1.0.0" + } + }, + "node_modules/bip39": { + "version": "3.0.2", + "license": "ISC", + "dependencies": { + "@types/node": "11.11.6", + "create-hash": "^1.1.0", + "pbkdf2": "^3.0.9", + "randombytes": "^2.0.1" + } + }, + "node_modules/bip39-light": { + "version": "1.0.7", + "license": "ISC", + "dependencies": { + "create-hash": "^1.1.0", + "pbkdf2": "^3.0.9" + } + }, + "node_modules/bip39/node_modules/@types/node": { + "version": "11.11.6", + "license": "MIT" + }, + "node_modules/bl": { + "version": "4.1.0", + "license": "MIT", + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/bl/node_modules/buffer": { + "version": "5.7.1", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/blakejs": { + "version": "1.2.1", + "license": "MIT" + }, + "node_modules/bluebird": { + "version": "3.7.2", + "license": "MIT" + }, + "node_modules/bn.js": { + "version": "5.2.1", + "license": "MIT" + }, + "node_modules/borsh": { + "version": "0.7.0", + "license": "Apache-2.0", + "dependencies": { + "bn.js": "^5.2.0", + "bs58": "^4.0.0", + "text-encoding-utf-8": "^1.0.2" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/brorand": { + "version": "1.1.0", + "license": "MIT" + }, + "node_modules/browser-stdout": { + "version": "1.3.1", + "dev": true, + "license": "ISC" + }, + "node_modules/browserify-aes": { + "version": "1.2.0", + "license": "MIT", + "dependencies": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/bs58": { + "version": "4.0.1", + "license": "MIT", + "dependencies": { + "base-x": "^3.0.2" + } + }, + "node_modules/bs58check": { + "version": "2.1.2", + "license": "MIT", + "dependencies": { + "bs58": "^4.0.0", + "create-hash": "^1.1.0", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/buffer": { + "version": "6.0.3", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "dev": true, + "license": "MIT" + }, + "node_modules/buffer-layout": { + "version": "1.2.2", + "license": "MIT", + "engines": { + "node": ">=4.5" + } + }, + "node_modules/buffer-reverse": { + "version": "1.0.1", + "license": "MIT" + }, + "node_modules/buffer-xor": { + "version": "1.0.3", + "license": "MIT" + }, + "node_modules/bufferutil": { + "version": "4.0.5", + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "dependencies": { + "node-gyp-build": "^4.3.0" + }, + "engines": { + "node": ">=6.14.2" + } + }, + "node_modules/call-bind": { + "version": "1.0.2", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/camelcase": { + "version": "5.3.1", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/capability": { + "version": "0.2.5", + "license": "MIT" + }, + "node_modules/chai": { + "version": "4.3.4", + "dev": true, + "license": "MIT", + "dependencies": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.2", + "deep-eql": "^3.0.1", + "get-func-name": "^2.0.0", + "pathval": "^1.1.1", + "type-detect": "^4.0.5" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chardet": { + "version": "0.7.0", + "license": "MIT" + }, + "node_modules/check-error": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/check-more-types": { + "version": "2.24.0", + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/chokidar": { + "version": "3.5.3", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "license": "MIT", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/cipher-base": { + "version": "1.0.4", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/cli-cursor": { + "version": "3.1.0", + "license": "MIT", + "dependencies": { + "restore-cursor": "^3.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cli-spinners": { + "version": "2.7.0", + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-width": { + "version": "3.0.0", + "license": "ISC", + "engines": { + "node": ">= 10" + } + }, + "node_modules/cliui": { + "version": "7.0.4", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/clone": { + "version": "1.0.4", + "license": "MIT", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "license": "MIT" + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "license": "MIT", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + }, + "node_modules/component-emitter": { + "version": "1.3.0", + "license": "MIT" + }, + "node_modules/concat-map": { + "version": "0.0.1", + "license": "MIT" + }, + "node_modules/cookiejar": { + "version": "2.1.3", + "license": "MIT" + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "license": "MIT" + }, + "node_modules/create-hash": { + "version": "1.2.0", + "license": "MIT", + "dependencies": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "node_modules/create-hmac": { + "version": "1.1.7", + "license": "MIT", + "dependencies": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "node_modules/cross-fetch": { + "version": "3.1.5", + "license": "MIT", + "dependencies": { + "node-fetch": "2.6.7" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/crypto-hash": { + "version": "1.3.0", + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/crypto-js": { + "version": "3.3.0", + "license": "MIT" + }, + "node_modules/csv": { + "version": "6.2.1", + "license": "MIT", + "dependencies": { + "csv-generate": "^4.2.0", + "csv-parse": "^5.3.1", + "csv-stringify": "^6.2.0", + "stream-transform": "^3.2.0" + }, + "engines": { + "node": ">= 0.1.90" + } + }, + "node_modules/csv-generate": { + "version": "4.2.0", + "license": "MIT" + }, + "node_modules/csv-parse": { + "version": "5.3.1", + "license": "MIT" + }, + "node_modules/csv-stringify": { + "version": "6.2.0", + "license": "MIT" + }, + "node_modules/debug": { + "version": "4.3.3", + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decamelize": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/deep-eql": { + "version": "3.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "type-detect": "^4.0.0" + }, + "engines": { + "node": ">=0.12" + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/defaults": { + "version": "1.0.4", + "license": "MIT", + "dependencies": { + "clone": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/define-properties": { + "version": "1.1.4", + "license": "MIT", + "dependencies": { + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/delay": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/delay/-/delay-5.0.0.tgz", + "integrity": "sha512-ReEBKkIfe4ya47wlPYf/gu5ib6yUG0/Aez0JQZQz94kiWtRQvZIQbTiehsnwHvLSWJnQdhVeqYue7Id1dKr0qw==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/depd": { + "version": "2.0.0", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/diff": { + "version": "5.0.0", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/doctrine": { + "version": "3.0.0", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/dot-case": { + "version": "3.0.4", + "license": "MIT", + "dependencies": { + "no-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, + "node_modules/dotenv": { + "version": "10.0.0", + "license": "BSD-2-Clause", + "engines": { + "node": ">=10" + } + }, + "node_modules/duplexer": { + "version": "0.1.2", + "license": "MIT" + }, + "node_modules/elliptic": { + "version": "6.5.4", + "license": "MIT", + "dependencies": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/elliptic/node_modules/bn.js": { + "version": "4.12.0", + "license": "MIT" + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "license": "MIT" + }, + "node_modules/enquirer": { + "version": "2.3.6", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "ansi-colors": "^4.1.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/error-polyfill": { + "version": "0.1.3", + "license": "MIT", + "dependencies": { + "capability": "^0.2.5", + "o3": "^1.0.3", + "u3": "^0.1.1" + } + }, + "node_modules/es-abstract": { + "version": "1.20.4", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "function.prototype.name": "^1.1.5", + "get-intrinsic": "^1.1.3", + "get-symbol-description": "^1.0.0", + "has": "^1.0.3", + "has-property-descriptors": "^1.0.0", + "has-symbols": "^1.0.3", + "internal-slot": "^1.0.3", + "is-callable": "^1.2.7", + "is-negative-zero": "^2.0.2", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "is-string": "^1.0.7", + "is-weakref": "^1.0.2", + "object-inspect": "^1.12.2", + "object-keys": "^1.1.1", + "object.assign": "^4.1.4", + "regexp.prototype.flags": "^1.4.3", + "safe-regex-test": "^1.0.0", + "string.prototype.trimend": "^1.0.5", + "string.prototype.trimstart": "^1.0.5", + "unbox-primitive": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-to-primitive": { + "version": "1.2.1", + "license": "MIT", + "dependencies": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es6-promise": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", + "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==" + }, + "node_modules/es6-promisify": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", + "integrity": "sha512-C+d6UdsYDk0lMebHNR4S2NybQMMngAOnOwYBQjTOiv0MkoJMP0Myw2mgpDLBcpfCmRLxyFqYhS/CfOENq4SJhQ==", + "dependencies": { + "es6-promise": "^4.0.3" + } + }, + "node_modules/escalade": { + "version": "3.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "7.32.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/code-frame": "7.12.11", + "@eslint/eslintrc": "^0.4.3", + "@humanwhocodes/config-array": "^0.5.0", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "enquirer": "^2.3.5", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^5.1.1", + "eslint-utils": "^2.1.0", + "eslint-visitor-keys": "^2.0.0", + "espree": "^7.3.1", + "esquery": "^1.4.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^5.1.2", + "globals": "^13.6.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "js-yaml": "^3.13.1", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.0.4", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "progress": "^2.0.0", + "regexpp": "^3.1.0", + "semver": "^7.2.1", + "strip-ansi": "^6.0.0", + "strip-json-comments": "^3.1.0", + "table": "^6.0.9", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-config-standard": { + "version": "16.0.3", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "peerDependencies": { + "eslint": "^7.12.1", + "eslint-plugin-import": "^2.22.1", + "eslint-plugin-node": "^11.1.0", + "eslint-plugin-promise": "^4.2.1 || ^5.0.0" + } + }, + "node_modules/eslint-config-standard-with-typescript": { + "version": "21.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/parser": "^4.0.0", + "eslint-config-standard": "^16.0.0" + }, + "peerDependencies": { + "@typescript-eslint/eslint-plugin": "^4.0.1", + "eslint": "^7.12.1", + "eslint-plugin-import": "^2.22.1", + "eslint-plugin-node": "^11.1.0", + "eslint-plugin-promise": "^4.2.1 || ^5.0.0", + "typescript": "^3.9 || ^4.0.0" + } + }, + "node_modules/eslint-import-resolver-node": { + "version": "0.3.6", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "debug": "^3.2.7", + "resolve": "^1.20.0" + } + }, + "node_modules/eslint-import-resolver-node/node_modules/debug": { + "version": "3.2.7", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-module-utils": { + "version": "2.7.1", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "debug": "^3.2.7", + "find-up": "^2.1.0", + "pkg-dir": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-module-utils/node_modules/debug": { + "version": "3.2.7", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-plugin-es": { + "version": "3.0.1", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "eslint-utils": "^2.0.0", + "regexpp": "^3.0.0" + }, + "engines": { + "node": ">=8.10.0" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": ">=4.19.1" + } + }, + "node_modules/eslint-plugin-import": { + "version": "2.25.3", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "array-includes": "^3.1.4", + "array.prototype.flat": "^1.2.5", + "debug": "^2.6.9", + "doctrine": "^2.1.0", + "eslint-import-resolver-node": "^0.3.6", + "eslint-module-utils": "^2.7.1", + "has": "^1.0.3", + "is-core-module": "^2.8.0", + "is-glob": "^4.0.3", + "minimatch": "^3.0.4", + "object.values": "^1.1.5", + "resolve": "^1.20.0", + "tsconfig-paths": "^3.11.0" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" + } + }, + "node_modules/eslint-plugin-import/node_modules/debug": { + "version": "2.6.9", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/eslint-plugin-import/node_modules/doctrine": { + "version": "2.1.0", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/eslint-plugin-import/node_modules/ms": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/eslint-plugin-node": { + "version": "11.1.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "eslint-plugin-es": "^3.0.0", + "eslint-utils": "^2.0.0", + "ignore": "^5.1.1", + "minimatch": "^3.0.4", + "resolve": "^1.10.1", + "semver": "^6.1.0" + }, + "engines": { + "node": ">=8.10.0" + }, + "peerDependencies": { + "eslint": ">=5.16.0" + } + }, + "node_modules/eslint-plugin-node/node_modules/ignore": { + "version": "5.1.9", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/eslint-plugin-node/node_modules/semver": { + "version": "6.3.0", + "dev": true, + "license": "ISC", + "peer": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/eslint-plugin-prettier": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "prettier-linter-helpers": "^1.0.0" + }, + "engines": { + "node": ">=6.0.0" + }, + "peerDependencies": { + "eslint": ">=7.28.0", + "prettier": ">=2.0.0" + }, + "peerDependenciesMeta": { + "eslint-config-prettier": { + "optional": true + } + } + }, + "node_modules/eslint-plugin-promise": { + "version": "5.2.0", + "dev": true, + "license": "ISC", + "peer": true, + "engines": { + "node": "^10.12.0 || >=12.0.0" + }, + "peerDependencies": { + "eslint": "^7.0.0" + } + }, + "node_modules/eslint-scope": { + "version": "5.1.1", + "dev": true, + "license": "BSD-2-Clause", + "peer": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/eslint-utils": { + "version": "2.1.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "eslint-visitor-keys": "^1.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + } + }, + "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "1.3.0", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "2.1.0", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=10" + } + }, + "node_modules/espree": { + "version": "7.3.1", + "dev": true, + "license": "BSD-2-Clause", + "peer": true, + "dependencies": { + "acorn": "^7.4.0", + "acorn-jsx": "^5.3.1", + "eslint-visitor-keys": "^1.3.0" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/espree/node_modules/eslint-visitor-keys": { + "version": "1.3.0", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "dev": true, + "license": "BSD-2-Clause", + "peer": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/esquery": { + "version": "1.4.0", + "dev": true, + "license": "BSD-3-Clause", + "peer": true, + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esquery/node_modules/estraverse": { + "version": "5.3.0", + "dev": true, + "license": "BSD-2-Clause", + "peer": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "dev": true, + "license": "BSD-2-Clause", + "peer": true, + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esrecurse/node_modules/estraverse": { + "version": "5.3.0", + "dev": true, + "license": "BSD-2-Clause", + "peer": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "4.3.0", + "dev": true, + "license": "BSD-2-Clause", + "peer": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "dev": true, + "license": "BSD-2-Clause", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ethereum-bloom-filters": { + "version": "1.0.10", + "license": "MIT", + "dependencies": { + "js-sha3": "^0.8.0" + } + }, + "node_modules/ethereum-cryptography": { + "version": "0.1.3", + "license": "MIT", + "dependencies": { + "@types/pbkdf2": "^3.0.0", + "@types/secp256k1": "^4.0.1", + "blakejs": "^1.1.0", + "browserify-aes": "^1.2.0", + "bs58check": "^2.1.2", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "hash.js": "^1.1.7", + "keccak": "^3.0.0", + "pbkdf2": "^3.0.17", + "randombytes": "^2.1.0", + "safe-buffer": "^5.1.2", + "scrypt-js": "^3.0.0", + "secp256k1": "^4.0.1", + "setimmediate": "^1.0.5" + } + }, + "node_modules/ethereumjs-util": { + "version": "7.1.5", + "license": "MPL-2.0", + "dependencies": { + "@types/bn.js": "^5.1.0", + "bn.js": "^5.1.2", + "create-hash": "^1.1.2", + "ethereum-cryptography": "^0.1.3", + "rlp": "^2.2.4" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/ethers": { + "version": "5.7.1", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/abi": "5.7.0", + "@ethersproject/abstract-provider": "5.7.0", + "@ethersproject/abstract-signer": "5.7.0", + "@ethersproject/address": "5.7.0", + "@ethersproject/base64": "5.7.0", + "@ethersproject/basex": "5.7.0", + "@ethersproject/bignumber": "5.7.0", + "@ethersproject/bytes": "5.7.0", + "@ethersproject/constants": "5.7.0", + "@ethersproject/contracts": "5.7.0", + "@ethersproject/hash": "5.7.0", + "@ethersproject/hdnode": "5.7.0", + "@ethersproject/json-wallets": "5.7.0", + "@ethersproject/keccak256": "5.7.0", + "@ethersproject/logger": "5.7.0", + "@ethersproject/networks": "5.7.1", + "@ethersproject/pbkdf2": "5.7.0", + "@ethersproject/properties": "5.7.0", + "@ethersproject/providers": "5.7.1", + "@ethersproject/random": "5.7.0", + "@ethersproject/rlp": "5.7.0", + "@ethersproject/sha2": "5.7.0", + "@ethersproject/signing-key": "5.7.0", + "@ethersproject/solidity": "5.7.0", + "@ethersproject/strings": "5.7.0", + "@ethersproject/transactions": "5.7.0", + "@ethersproject/units": "5.7.0", + "@ethersproject/wallet": "5.7.0", + "@ethersproject/web": "5.7.1", + "@ethersproject/wordlists": "5.7.0" + } + }, + "node_modules/ethjs-unit": { + "version": "0.1.6", + "license": "MIT", + "dependencies": { + "bn.js": "4.11.6", + "number-to-bn": "1.7.0" + }, + "engines": { + "node": ">=6.5.0", + "npm": ">=3" + } + }, + "node_modules/ethjs-unit/node_modules/bn.js": { + "version": "4.11.6", + "license": "MIT" + }, + "node_modules/event-stream": { + "version": "3.3.4", + "license": "MIT", + "dependencies": { + "duplexer": "~0.1.1", + "from": "~0", + "map-stream": "~0.1.0", + "pause-stream": "0.0.11", + "split": "0.3", + "stream-combiner": "~0.0.4", + "through": "~2.3.1" + } + }, + "node_modules/event-target-shim": { + "version": "5.0.1", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/eventemitter3": { + "version": "4.0.7", + "license": "MIT" + }, + "node_modules/evp_bytestokey": { + "version": "1.0.3", + "license": "MIT", + "dependencies": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, + "node_modules/execa": { + "version": "5.1.1", + "license": "MIT", + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/exponential-backoff": { + "version": "3.1.0", + "license": "Apache-2.0" + }, + "node_modules/external-editor": { + "version": "3.1.0", + "license": "MIT", + "dependencies": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/eyes": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz", + "integrity": "sha512-GipyPsXO1anza0AOZdy69Im7hGFCNB7Y/NGjDlZGJ3GJJLtwNSb2vrzYrTYJRrRloVx7pl+bhUaTB8yiccPvFQ==", + "engines": { + "node": "> 0.1.90" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/fast-diff": { + "version": "1.2.0", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/fast-glob": { + "version": "3.2.7", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/fast-safe-stringify": { + "version": "2.1.1", + "license": "MIT" + }, + "node_modules/fast-stable-stringify": { + "version": "1.0.0", + "license": "MIT" + }, + "node_modules/fastestsmallesttextencoderdecoder": { + "version": "1.0.22", + "resolved": "https://registry.npmjs.org/fastestsmallesttextencoderdecoder/-/fastestsmallesttextencoderdecoder-1.0.22.tgz", + "integrity": "sha512-Pb8d48e+oIuY4MaM64Cd7OW1gt4nxCHs7/ddPPZ/Ic3sg8yVGM7O9wDvZ7us6ScaUupzM+pfBolwtYhN1IxBIw==", + "peer": true + }, + "node_modules/fastq": { + "version": "1.13.0", + "dev": true, + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/figures": { + "version": "3.2.0", + "license": "MIT", + "dependencies": { + "escape-string-regexp": "^1.0.5" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/figures/node_modules/escape-string-regexp": { + "version": "1.0.5", + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/file-uri-to-path": { + "version": "1.0.0", + "license": "MIT" + }, + "node_modules/fill-range": { + "version": "7.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find": { + "version": "0.3.0", + "license": "MIT", + "dependencies": { + "traverse-chain": "~0.1.0" + } + }, + "node_modules/find-up": { + "version": "2.1.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "locate-path": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/flat": { + "version": "5.0.2", + "dev": true, + "license": "BSD-3-Clause", + "bin": { + "flat": "cli.js" + } + }, + "node_modules/flat-cache": { + "version": "3.0.4", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flatted": { + "version": "3.2.4", + "dev": true, + "license": "ISC", + "peer": true + }, + "node_modules/follow-redirects": { + "version": "1.15.2", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "license": "MIT", + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/for-each": { + "version": "0.3.3", + "license": "MIT", + "dependencies": { + "is-callable": "^1.1.3" + } + }, + "node_modules/form-data": { + "version": "3.0.1", + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/formidable": { + "version": "1.2.6", + "license": "MIT", + "funding": { + "url": "https://ko-fi.com/tunnckoCore/commissions" + } + }, + "node_modules/from": { + "version": "0.1.7", + "license": "MIT" + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "license": "ISC" + }, + "node_modules/fsevents": { + "version": "2.3.2", + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.1", + "license": "MIT" + }, + "node_modules/function.prototype.name": { + "version": "1.1.5", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.0", + "functions-have-names": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/functional-red-black-tree": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/functions-have-names": { + "version": "1.2.3", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "dev": true, + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-func-name": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/get-intrinsic": { + "version": "1.1.3", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-stream": { + "version": "6.0.1", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/get-symbol-description": { + "version": "1.0.0", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/glob": { + "version": "7.2.0", + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/globals": { + "version": "13.12.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globby": { + "version": "11.0.4", + "dev": true, + "license": "MIT", + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.1.1", + "ignore": "^5.1.4", + "merge2": "^1.3.0", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globby/node_modules/ignore": { + "version": "5.2.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/growl": { + "version": "1.10.5", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4.x" + } + }, + "node_modules/has": { + "version": "1.0.3", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-bigints": { + "version": "1.0.2", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.0", + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.1.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.0", + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hash-base": { + "version": "3.1.0", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/hash.js": { + "version": "1.1.7", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "node_modules/he": { + "version": "1.2.0", + "dev": true, + "license": "MIT", + "bin": { + "he": "bin/he" + } + }, + "node_modules/hi-base32": { + "version": "0.5.1", + "license": "MIT" + }, + "node_modules/hmac-drbg": { + "version": "1.0.1", + "license": "MIT", + "dependencies": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/http-errors": { + "version": "1.8.1", + "license": "MIT", + "dependencies": { + "depd": "~1.1.2", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": ">= 1.5.0 < 2", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/http-errors/node_modules/depd": { + "version": "1.1.2", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/human-signals": { + "version": "2.1.0", + "license": "Apache-2.0", + "engines": { + "node": ">=10.17.0" + } + }, + "node_modules/humanize-ms": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", + "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==", + "dependencies": { + "ms": "^2.0.0" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/ignore": { + "version": "4.0.6", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "license": "ISC" + }, + "node_modules/inquirer": { + "version": "8.2.4", + "license": "MIT", + "dependencies": { + "ansi-escapes": "^4.2.1", + "chalk": "^4.1.1", + "cli-cursor": "^3.1.0", + "cli-width": "^3.0.0", + "external-editor": "^3.0.3", + "figures": "^3.0.0", + "lodash": "^4.17.21", + "mute-stream": "0.0.8", + "ora": "^5.4.1", + "run-async": "^2.4.0", + "rxjs": "^7.5.5", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "through": "^2.3.6", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/internal-slot": { + "version": "1.0.3", + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.1.0", + "has": "^1.0.3", + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-arguments": { + "version": "1.1.1", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-bigint": { + "version": "1.0.4", + "license": "MIT", + "dependencies": { + "has-bigints": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-boolean-object": { + "version": "1.1.2", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-callable": { + "version": "1.2.7", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-core-module": { + "version": "2.8.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-date-object": { + "version": "1.0.5", + "license": "MIT", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-generator-function": { + "version": "1.0.10", + "license": "MIT", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-hex-prefixed": { + "version": "1.0.0", + "license": "MIT", + "engines": { + "node": ">=6.5.0", + "npm": ">=3" + } + }, + "node_modules/is-interactive": { + "version": "1.0.0", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-negative-zero": { + "version": "2.0.2", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-number-object": { + "version": "1.0.7", + "license": "MIT", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-plain-obj": { + "version": "2.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-regex": { + "version": "1.1.4", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-shared-array-buffer": { + "version": "1.0.2", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-stream": { + "version": "2.0.1", + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-string": { + "version": "1.0.7", + "license": "MIT", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-symbol": { + "version": "1.0.4", + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-typed-array": { + "version": "1.1.9", + "license": "MIT", + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "es-abstract": "^1.20.0", + "for-each": "^0.3.3", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-weakref": { + "version": "1.0.2", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/isarray": { + "version": "1.0.0", + "license": "MIT" + }, + "node_modules/isexe": { + "version": "2.0.0", + "license": "ISC" + }, + "node_modules/isomorphic-ws": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz", + "integrity": "sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w==", + "peerDependencies": { + "ws": "*" + } + }, + "node_modules/jayson": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/jayson/-/jayson-4.1.0.tgz", + "integrity": "sha512-R6JlbyLN53Mjku329XoRT2zJAE6ZgOQ8f91ucYdMCD4nkGCF9kZSrcGXpHIU4jeKj58zUZke2p+cdQchU7Ly7A==", + "dependencies": { + "@types/connect": "^3.4.33", + "@types/node": "^12.12.54", + "@types/ws": "^7.4.4", + "commander": "^2.20.3", + "delay": "^5.0.0", + "es6-promisify": "^5.0.0", + "eyes": "^0.1.8", + "isomorphic-ws": "^4.0.1", + "json-stringify-safe": "^5.0.1", + "JSONStream": "^1.3.5", + "uuid": "^8.3.2", + "ws": "^7.4.5" + }, + "bin": { + "jayson": "bin/jayson.js" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jayson/node_modules/@types/node": { + "version": "12.20.55", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", + "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==" + }, + "node_modules/joi": { + "version": "17.7.0", + "license": "BSD-3-Clause", + "dependencies": { + "@hapi/hoek": "^9.0.0", + "@hapi/topo": "^5.0.0", + "@sideway/address": "^4.1.3", + "@sideway/formula": "^3.0.0", + "@sideway/pinpoint": "^2.0.0" + } + }, + "node_modules/js-sha256": { + "version": "0.9.0", + "license": "MIT" + }, + "node_modules/js-sha3": { + "version": "0.8.0", + "license": "MIT" + }, + "node_modules/js-sha512": { + "version": "0.8.0", + "license": "MIT" + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/js-yaml": { + "version": "3.14.1", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-bigint": { + "version": "1.0.0", + "license": "MIT", + "dependencies": { + "bignumber.js": "^9.0.0" + } + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==" + }, + "node_modules/json5": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "json5": "lib/cli.js" + } + }, + "node_modules/jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==", + "engines": [ + "node >= 0.2.0" + ] + }, + "node_modules/JSONStream": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", + "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", + "dependencies": { + "jsonparse": "^1.2.0", + "through": ">=2.2.7 <3" + }, + "bin": { + "JSONStream": "bin.js" + }, + "engines": { + "node": "*" + } + }, + "node_modules/keccak": { + "version": "3.0.2", + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "node-addon-api": "^2.0.0", + "node-gyp-build": "^4.2.0", + "readable-stream": "^3.6.0" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/lazy-ass": { + "version": "1.6.0", + "license": "MIT", + "engines": { + "node": "> 0.8" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/locate-path": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "license": "MIT" + }, + "node_modules/lodash.clonedeep": { + "version": "4.5.0", + "license": "MIT" + }, + "node_modules/lodash.isequal": { + "version": "4.5.0", + "license": "MIT" + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/lodash.truncate": { + "version": "4.4.2", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/log-symbols": { + "version": "4.1.0", + "license": "MIT", + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lower-case": { + "version": "2.0.2", + "license": "MIT", + "dependencies": { + "tslib": "^2.0.3" + } + }, + "node_modules/lru-cache": { + "version": "6.0.0", + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/make-error": { + "version": "1.3.6", + "dev": true, + "license": "ISC" + }, + "node_modules/map-stream": { + "version": "0.1.0" + }, + "node_modules/md5.js": { + "version": "1.3.5", + "license": "MIT", + "dependencies": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "license": "MIT" + }, + "node_modules/merge2": { + "version": "1.4.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/merkletreejs": { + "version": "0.2.32", + "license": "MIT", + "dependencies": { + "bignumber.js": "^9.0.1", + "buffer-reverse": "^1.0.1", + "crypto-js": "^3.1.9-1", + "treeify": "^1.1.0", + "web3-utils": "^1.3.4" + }, + "engines": { + "node": ">= 7.6.0" + } + }, + "node_modules/methods": { + "version": "1.1.2", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/micromatch": { + "version": "4.0.4", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.1", + "picomatch": "^2.2.3" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mime": { + "version": "3.0.0", + "license": "MIT", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/minimalistic-assert": { + "version": "1.0.1", + "license": "ISC" + }, + "node_modules/minimalistic-crypto-utils": { + "version": "1.0.1", + "license": "MIT" + }, + "node_modules/minimatch": { + "version": "3.0.4", + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.6", + "license": "MIT" + }, + "node_modules/mkdirp": { + "version": "0.5.5", + "dev": true, + "license": "MIT", + "dependencies": { + "minimist": "^1.2.5" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/mocha": { + "version": "9.2.2", + "dev": true, + "license": "MIT", + "dependencies": { + "@ungap/promise-all-settled": "1.1.2", + "ansi-colors": "4.1.1", + "browser-stdout": "1.3.1", + "chokidar": "3.5.3", + "debug": "4.3.3", + "diff": "5.0.0", + "escape-string-regexp": "4.0.0", + "find-up": "5.0.0", + "glob": "7.2.0", + "growl": "1.10.5", + "he": "1.2.0", + "js-yaml": "4.1.0", + "log-symbols": "4.1.0", + "minimatch": "4.2.1", + "ms": "2.1.3", + "nanoid": "3.3.1", + "serialize-javascript": "6.0.0", + "strip-json-comments": "3.1.1", + "supports-color": "8.1.1", + "which": "2.0.2", + "workerpool": "6.2.0", + "yargs": "16.2.0", + "yargs-parser": "20.2.4", + "yargs-unparser": "2.0.0" + }, + "bin": { + "_mocha": "bin/_mocha", + "mocha": "bin/mocha" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mochajs" + } + }, + "node_modules/mocha/node_modules/argparse": { + "version": "2.0.1", + "dev": true, + "license": "Python-2.0" + }, + "node_modules/mocha/node_modules/find-up": { + "version": "5.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mocha/node_modules/js-yaml": { + "version": "4.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/mocha/node_modules/locate-path": { + "version": "6.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mocha/node_modules/minimatch": { + "version": "4.2.1", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/mocha/node_modules/ms": { + "version": "2.1.3", + "dev": true, + "license": "MIT" + }, + "node_modules/mocha/node_modules/p-limit": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mocha/node_modules/p-locate": { + "version": "5.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mocha/node_modules/path-exists": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/mocha/node_modules/supports-color": { + "version": "8.1.1", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "license": "MIT" + }, + "node_modules/multistream": { + "version": "4.1.0", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "once": "^1.4.0", + "readable-stream": "^3.6.0" + } + }, + "node_modules/mustache": { + "version": "4.2.0", + "license": "MIT", + "bin": { + "mustache": "bin/mustache" + } + }, + "node_modules/mute-stream": { + "version": "0.0.8", + "license": "ISC" + }, + "node_modules/nanoid": { + "version": "3.3.1", + "dev": true, + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/near-api-js": { + "version": "0.44.2", + "license": "(MIT AND Apache-2.0)", + "dependencies": { + "bn.js": "5.2.0", + "borsh": "^0.6.0", + "bs58": "^4.0.0", + "depd": "^2.0.0", + "error-polyfill": "^0.1.3", + "http-errors": "^1.7.2", + "js-sha256": "^0.9.0", + "mustache": "^4.0.0", + "node-fetch": "^2.6.1", + "text-encoding-utf-8": "^1.0.2", + "tweetnacl": "^1.0.1" + } + }, + "node_modules/near-api-js/node_modules/bn.js": { + "version": "5.2.0", + "license": "MIT" + }, + "node_modules/near-api-js/node_modules/borsh": { + "version": "0.6.0", + "license": "Apache-2.0", + "dependencies": { + "bn.js": "^5.2.0", + "bs58": "^4.0.0", + "text-encoding-utf-8": "^1.0.2" + } + }, + "node_modules/near-hd-key": { + "version": "1.2.1", + "license": "MIT", + "dependencies": { + "bip39": "3.0.2", + "create-hmac": "1.1.7", + "tweetnacl": "1.0.3" + } + }, + "node_modules/near-seed-phrase": { + "version": "0.2.0", + "license": "MIT", + "dependencies": { + "bip39-light": "^1.0.7", + "bs58": "^4.0.1", + "near-hd-key": "^1.2.1", + "tweetnacl": "^1.0.2" + } + }, + "node_modules/no-case": { + "version": "3.0.4", + "license": "MIT", + "dependencies": { + "lower-case": "^2.0.2", + "tslib": "^2.0.3" + } + }, + "node_modules/node-addon-api": { + "version": "2.0.2", + "license": "MIT" + }, + "node_modules/node-fetch": { + "version": "2.6.7", + "license": "MIT", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/node-gyp-build": { + "version": "4.3.0", + "license": "MIT", + "bin": { + "node-gyp-build": "bin.js", + "node-gyp-build-optional": "optional.js", + "node-gyp-build-test": "build-test.js" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm-run-path": { + "version": "4.0.1", + "license": "MIT", + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/number-to-bn": { + "version": "1.7.0", + "license": "MIT", + "dependencies": { + "bn.js": "4.11.6", + "strip-hex-prefix": "1.0.0" + }, + "engines": { + "node": ">=6.5.0", + "npm": ">=3" + } + }, + "node_modules/number-to-bn/node_modules/bn.js": { + "version": "4.11.6", + "license": "MIT" + }, + "node_modules/o3": { + "version": "1.0.3", + "license": "MIT", + "dependencies": { + "capability": "^0.2.5" + } + }, + "node_modules/object-inspect": { + "version": "1.12.2", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.assign": { + "version": "4.1.4", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.values": { + "version": "1.1.5", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/old-mpl-token-metadata": { + "name": "@metaplex-foundation/mpl-token-metadata", + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/@metaplex-foundation/mpl-token-metadata/-/mpl-token-metadata-2.12.0.tgz", + "integrity": "sha512-DetC2F5MwMRt4TmLXwj8PJ8nClRYGMecSQ4pr9iKKa+rWertHgKoJHl2XhheRa084GtL7i0ssOKbX2gfYFosuQ==", + "dependencies": { + "@metaplex-foundation/beet": "^0.7.1", + "@metaplex-foundation/beet-solana": "^0.4.0", + "@metaplex-foundation/cusper": "^0.0.2", + "@solana/spl-token": "^0.3.6", + "@solana/web3.js": "^1.66.2", + "bn.js": "^5.2.0", + "debug": "^4.3.4" + } + }, + "node_modules/old-mpl-token-metadata/node_modules/@metaplex-foundation/beet-solana": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@metaplex-foundation/beet-solana/-/beet-solana-0.4.1.tgz", + "integrity": "sha512-/6o32FNUtwK8tjhotrvU/vorP7umBuRFvBZrC6XCk51aKidBHe5LPVPA5AjGPbV3oftMfRuXPNd9yAGeEqeCDQ==", + "dependencies": { + "@metaplex-foundation/beet": ">=0.1.0", + "@solana/web3.js": "^1.56.2", + "bs58": "^5.0.0", + "debug": "^4.3.4" + } + }, + "node_modules/old-mpl-token-metadata/node_modules/base-x": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-4.0.0.tgz", + "integrity": "sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw==" + }, + "node_modules/old-mpl-token-metadata/node_modules/bs58": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-5.0.0.tgz", + "integrity": "sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ==", + "dependencies": { + "base-x": "^4.0.0" + } + }, + "node_modules/old-mpl-token-metadata/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/once": { + "version": "1.4.0", + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "5.1.2", + "license": "MIT", + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/optionator": { + "version": "0.9.1", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/ora": { + "version": "5.4.1", + "license": "MIT", + "dependencies": { + "bl": "^4.1.0", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-spinners": "^2.5.0", + "is-interactive": "^1.0.0", + "is-unicode-supported": "^0.1.0", + "log-symbols": "^4.1.0", + "strip-ansi": "^6.0.0", + "wcwidth": "^1.0.1" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/os-tmpdir": { + "version": "1.0.2", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/p-limit": { + "version": "1.3.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "p-try": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/p-locate": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "p-limit": "^1.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/p-try": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/pako": { + "version": "2.0.4", + "license": "(MIT AND Zlib)" + }, + "node_modules/parent-module": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/path-exists": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/path-type": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/pathval": { + "version": "1.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/pause-stream": { + "version": "0.0.11", + "license": [ + "MIT", + "Apache2" + ], + "dependencies": { + "through": "~2.3" + } + }, + "node_modules/pbkdf2": { + "version": "3.1.2", + "license": "MIT", + "dependencies": { + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + }, + "engines": { + "node": ">=0.12" + } + }, + "node_modules/picomatch": { + "version": "2.3.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pkg-dir": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "find-up": "^2.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/prettier": { + "version": "2.5.1", + "license": "MIT", + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/prettier-linter-helpers": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-diff": "^1.1.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/process": { + "version": "0.11.10", + "license": "MIT", + "engines": { + "node": ">= 0.6.0" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "license": "MIT" + }, + "node_modules/progress": { + "version": "2.0.3", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/ps-tree": { + "version": "1.2.0", + "license": "MIT", + "dependencies": { + "event-stream": "=3.3.4" + }, + "bin": { + "ps-tree": "bin/ps-tree.js" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/punycode": { + "version": "2.1.1", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/qs": { + "version": "6.11.0", + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/randombytes": { + "version": "2.1.0", + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/readable-stream": { + "version": "3.6.0", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "dev": true, + "license": "MIT", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/regenerator-runtime": { + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==" + }, + "node_modules/regexp.prototype.flags": { + "version": "1.4.3", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "functions-have-names": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/regexpp": { + "version": "3.2.0", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-from-string": { + "version": "2.0.2", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve": { + "version": "1.20.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "is-core-module": "^2.2.0", + "path-parse": "^1.0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/restore-cursor": { + "version": "3.1.0", + "license": "MIT", + "dependencies": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/retry": { + "version": "0.13.1", + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "license": "ISC", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/ripemd160": { + "version": "2.0.2", + "license": "MIT", + "dependencies": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "node_modules/rlp": { + "version": "2.2.7", + "license": "MPL-2.0", + "dependencies": { + "bn.js": "^5.2.0" + }, + "bin": { + "rlp": "bin/rlp" + } + }, + "node_modules/rpc-websockets": { + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/rpc-websockets/-/rpc-websockets-7.9.0.tgz", + "integrity": "sha512-DwKewQz1IUA5wfLvgM8wDpPRcr+nWSxuFxx5CbrI2z/MyyZ4nXLM86TvIA+cI1ZAdqC8JIBR1mZR55dzaLU+Hw==", + "dependencies": { + "@babel/runtime": "^7.17.2", + "eventemitter3": "^4.0.7", + "uuid": "^8.3.2", + "ws": "^8.5.0" + }, + "funding": { + "type": "paypal", + "url": "https://paypal.me/kozjak" + }, + "optionalDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + } + }, + "node_modules/rpc-websockets/node_modules/ws": { + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz", + "integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/run-async": { + "version": "2.4.1", + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/rxjs": { + "version": "7.5.7", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/safe-regex-test": { + "version": "1.0.0", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "is-regex": "^1.1.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "license": "MIT" + }, + "node_modules/scrypt-js": { + "version": "3.0.1", + "license": "MIT" + }, + "node_modules/secp256k1": { + "version": "4.0.2", + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "elliptic": "^6.5.2", + "node-addon-api": "^2.0.0", + "node-gyp-build": "^4.2.0" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/semver": { + "version": "7.3.8", + "license": "ISC", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/serialize-javascript": { + "version": "6.0.0", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "randombytes": "^2.1.0" + } + }, + "node_modules/setimmediate": { + "version": "1.0.5", + "license": "MIT" + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "license": "ISC" + }, + "node_modules/sha.js": { + "version": "2.4.11", + "license": "(MIT AND BSD-3-Clause)", + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + }, + "bin": { + "sha.js": "bin.js" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/side-channel": { + "version": "1.0.4", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "license": "ISC" + }, + "node_modules/slash": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/slice-ansi": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" + } + }, + "node_modules/snake-case": { + "version": "3.0.4", + "license": "MIT", + "dependencies": { + "dot-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.21", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/split": { + "version": "0.3.3", + "license": "MIT", + "dependencies": { + "through": "2" + }, + "engines": { + "node": "*" + } + }, + "node_modules/spok": { + "version": "1.4.3", + "license": "MIT", + "dependencies": { + "ansicolors": "~0.3.2" + } + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "dev": true, + "license": "BSD-3-Clause", + "peer": true + }, + "node_modules/start-server-and-test": { + "version": "1.15.2", + "license": "MIT", + "dependencies": { + "arg": "^5.0.2", + "bluebird": "3.7.2", + "check-more-types": "2.24.0", + "debug": "4.3.4", + "execa": "5.1.1", + "lazy-ass": "1.6.0", + "ps-tree": "1.2.0", + "wait-on": "6.0.1" + }, + "bin": { + "server-test": "src/bin/start.js", + "start-server-and-test": "src/bin/start.js", + "start-test": "src/bin/start.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/start-server-and-test/node_modules/debug": { + "version": "4.3.4", + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/statuses": { + "version": "1.5.0", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/stream-chunker": { + "version": "1.2.8", + "license": "MIT", + "dependencies": { + "through2": "~2.0.0" + } + }, + "node_modules/stream-combiner": { + "version": "0.0.4", + "license": "MIT", + "dependencies": { + "duplexer": "~0.1.1" + } + }, + "node_modules/stream-transform": { + "version": "3.2.0", + "license": "MIT" + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string.prototype.trimend": { + "version": "1.0.5", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.19.5" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimstart": { + "version": "1.0.5", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.19.5" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-bom": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/strip-final-newline": { + "version": "2.0.0", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/strip-hex-prefix": { + "version": "1.0.0", + "license": "MIT", + "dependencies": { + "is-hex-prefixed": "1.0.0" + }, + "engines": { + "node": ">=6.5.0", + "npm": ">=3" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/superagent": { + "version": "6.1.0", + "license": "MIT", + "dependencies": { + "component-emitter": "^1.3.0", + "cookiejar": "^2.1.2", + "debug": "^4.1.1", + "fast-safe-stringify": "^2.0.7", + "form-data": "^3.0.0", + "formidable": "^1.2.2", + "methods": "^1.1.2", + "mime": "^2.4.6", + "qs": "^6.9.4", + "readable-stream": "^3.6.0", + "semver": "^7.3.2" + }, + "engines": { + "node": ">= 7.0.0" + } + }, + "node_modules/superagent/node_modules/mime": { + "version": "2.6.0", + "license": "MIT", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/superstruct": { + "version": "0.14.2", + "license": "MIT" + }, + "node_modules/supports-color": { + "version": "7.2.0", + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/table": { + "version": "6.7.5", + "dev": true, + "license": "BSD-3-Clause", + "peer": true, + "dependencies": { + "ajv": "^8.0.1", + "lodash.truncate": "^4.4.2", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/table/node_modules/ajv": { + "version": "8.8.2", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/table/node_modules/json-schema-traverse": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/text-encoding-utf-8": { + "version": "1.0.2" + }, + "node_modules/text-table": { + "version": "0.2.0", + "license": "MIT" + }, + "node_modules/through": { + "version": "2.3.8", + "license": "MIT" + }, + "node_modules/through2": { + "version": "2.0.5", + "license": "MIT", + "dependencies": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + }, + "node_modules/through2/node_modules/readable-stream": { + "version": "2.3.7", + "license": "MIT", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/through2/node_modules/safe-buffer": { + "version": "5.1.2", + "license": "MIT" + }, + "node_modules/through2/node_modules/string_decoder": { + "version": "1.1.1", + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/tmp": { + "version": "0.0.33", + "license": "MIT", + "dependencies": { + "os-tmpdir": "~1.0.2" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/tmp-promise": { + "version": "3.0.3", + "license": "MIT", + "dependencies": { + "tmp": "^0.2.0" + } + }, + "node_modules/tmp-promise/node_modules/tmp": { + "version": "0.2.1", + "license": "MIT", + "dependencies": { + "rimraf": "^3.0.0" + }, + "engines": { + "node": ">=8.17.0" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "license": "MIT", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/toml": { + "version": "3.0.0", + "license": "MIT" + }, + "node_modules/tr46": { + "version": "0.0.3", + "license": "MIT" + }, + "node_modules/traverse-chain": { + "version": "0.1.0", + "license": "MIT" + }, + "node_modules/treeify": { + "version": "1.1.0", + "license": "MIT", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/ts-mocha": { + "version": "9.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "ts-node": "7.0.1" + }, + "bin": { + "ts-mocha": "bin/ts-mocha" + }, + "engines": { + "node": ">= 6.X.X" + }, + "optionalDependencies": { + "tsconfig-paths": "^3.5.0" + }, + "peerDependencies": { + "mocha": "^3.X.X || ^4.X.X || ^5.X.X || ^6.X.X || ^7.X.X || ^8.X.X || ^9.X.X" + } + }, + "node_modules/ts-node": { + "version": "7.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "arrify": "^1.0.0", + "buffer-from": "^1.1.0", + "diff": "^3.1.0", + "make-error": "^1.1.1", + "minimist": "^1.2.0", + "mkdirp": "^0.5.1", + "source-map-support": "^0.5.6", + "yn": "^2.0.0" + }, + "bin": { + "ts-node": "dist/bin.js" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/ts-node/node_modules/diff": { + "version": "3.5.0", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/tsconfig-paths": { + "version": "3.12.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/json5": "^0.0.29", + "json5": "^1.0.1", + "minimist": "^1.2.0", + "strip-bom": "^3.0.0" + } + }, + "node_modules/tslib": { + "version": "2.3.1", + "license": "0BSD" + }, + "node_modules/tsutils": { + "version": "3.21.0", + "dev": true, + "license": "MIT", + "dependencies": { + "tslib": "^1.8.1" + }, + "engines": { + "node": ">= 6" + }, + "peerDependencies": { + "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" + } + }, + "node_modules/tsutils/node_modules/tslib": { + "version": "1.14.1", + "dev": true, + "license": "0BSD" + }, + "node_modules/tweetnacl": { + "version": "1.0.3", + "license": "Unlicense" + }, + "node_modules/type-check": { + "version": "0.4.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-detect": { + "version": "4.0.8", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/type-fest": { + "version": "0.20.2", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "peer": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typescript": { + "version": "4.5.2", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/typescript-collections": { + "version": "1.3.3", + "license": "MIT" + }, + "node_modules/u3": { + "version": "0.1.1", + "license": "MIT" + }, + "node_modules/unbox-primitive": { + "version": "1.0.2", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "dev": true, + "license": "BSD-2-Clause", + "peer": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/utf-8-validate": { + "version": "5.0.7", + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "dependencies": { + "node-gyp-build": "^4.3.0" + }, + "engines": { + "node": ">=6.14.2" + } + }, + "node_modules/utf8": { + "version": "3.0.0", + "license": "MIT" + }, + "node_modules/util": { + "version": "0.12.4", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "is-arguments": "^1.0.4", + "is-generator-function": "^1.0.7", + "is-typed-array": "^1.1.3", + "safe-buffer": "^5.1.2", + "which-typed-array": "^1.1.2" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "license": "MIT" + }, + "node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/v8-compile-cache": { + "version": "2.3.0", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/vlq": { + "version": "2.0.4", + "license": "MIT" + }, + "node_modules/wait-on": { + "version": "6.0.1", + "license": "MIT", + "dependencies": { + "axios": "^0.25.0", + "joi": "^17.6.0", + "lodash": "^4.17.21", + "minimist": "^1.2.5", + "rxjs": "^7.5.4" + }, + "bin": { + "wait-on": "bin/wait-on" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/wcwidth": { + "version": "1.0.1", + "license": "MIT", + "dependencies": { + "defaults": "^1.0.3" + } + }, + "node_modules/web3-utils": { + "version": "1.8.0", + "license": "LGPL-3.0", + "dependencies": { + "bn.js": "^5.2.1", + "ethereum-bloom-filters": "^1.0.6", + "ethereumjs-util": "^7.1.0", + "ethjs-unit": "0.1.6", + "number-to-bn": "1.7.0", + "randombytes": "^2.1.0", + "utf8": "3.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "license": "BSD-2-Clause" + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "license": "MIT", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "node_modules/which": { + "version": "2.0.2", + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/which-boxed-primitive": { + "version": "1.0.2", + "license": "MIT", + "dependencies": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-typed-array": { + "version": "1.1.8", + "license": "MIT", + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "es-abstract": "^1.20.0", + "for-each": "^0.3.3", + "has-tostringtag": "^1.0.0", + "is-typed-array": "^1.1.9" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/wide-align": { + "version": "1.1.3", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "string-width": "^1.0.2 || 2" + } + }, + "node_modules/wide-align/node_modules/ansi-regex": { + "version": "3.0.1", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/wide-align/node_modules/is-fullwidth-code-point": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/wide-align/node_modules/string-width": { + "version": "2.1.1", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/wide-align/node_modules/strip-ansi": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "ansi-regex": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/word-wrap": { + "version": "1.2.3", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/workerpool": { + "version": "6.2.0", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "license": "ISC" + }, + "node_modules/ws": { + "version": "7.5.9", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", + "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/xtend": { + "version": "4.0.2", + "license": "MIT", + "engines": { + "node": ">=0.4" + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yallist": { + "version": "4.0.0", + "license": "ISC" + }, + "node_modules/yargs": { + "version": "16.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-parser": { + "version": "20.2.4", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-unparser": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "camelcase": "^6.0.0", + "decamelize": "^4.0.0", + "flat": "^5.0.2", + "is-plain-obj": "^2.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-unparser/node_modules/camelcase": { + "version": "6.2.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/yn": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "sdk": { + "name": "@coralcube-oss/mmm", + "version": "0.1.2", + "dev": true, + "license": "Apache 2.0", + "dependencies": { + "@magiceden-oss/open_creator_protocol": "^0.3.2", + "@metaplex-foundation/js": "^0.18.3", + "@metaplex-foundation/mpl-token-auth-rules": "^1.2.0", + "@metaplex-foundation/mpl-token-metadata": "^3.1.2", + "@project-serum/anchor": "^0.26.0", + "@solana/spl-token": "^0.3.5", + "@solana/web3.js": "^1.65.0", + "old-mpl-token-metadata": "npm:@metaplex-foundation/mpl-token-metadata@2.12.0" + }, + "devDependencies": { + "@types/bn.js": "^5.1.0", + "@types/chai": "^4.2.15", + "@types/mocha": "^8.2.1", + "chai": "^4.3.0", + "ts-mocha": "^8.0.0", + "typescript": "^4.4.4" + } + }, + "sdk/node_modules/@metaplex-foundation/beet-solana": { + "version": "0.4.0", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@metaplex-foundation/beet": ">=0.1.0", + "@solana/web3.js": "^1.56.2", + "bs58": "^5.0.0", + "debug": "^4.3.4" + } + }, + "sdk/node_modules/@metaplex-foundation/beet-solana/node_modules/debug": { + "version": "4.3.4", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "sdk/node_modules/@metaplex-foundation/js": { + "version": "0.18.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@bundlr-network/client": "^0.8.8", + "@metaplex-foundation/beet": "0.7.1", + "@metaplex-foundation/mpl-auction-house": "^2.3.0", + "@metaplex-foundation/mpl-candy-guard": "^0.3.0", + "@metaplex-foundation/mpl-candy-machine": "^5.0.0", + "@metaplex-foundation/mpl-candy-machine-core": "^0.1.2", + "@metaplex-foundation/mpl-token-metadata": "^2.8.6", + "@noble/ed25519": "^1.7.1", + "@noble/hashes": "^1.1.3", + "@solana/spl-token": "^0.3.5", + "@solana/web3.js": "^1.63.1", + "bignumber.js": "^9.0.2", + "bn.js": "^5.2.1", + "bs58": "^5.0.0", + "buffer": "^6.0.3", + "debug": "^4.3.4", + "eventemitter3": "^4.0.7", + "lodash.clonedeep": "^4.5.0", + "lodash.isequal": "^4.5.0", + "merkletreejs": "^0.2.32", + "mime": "^3.0.0", + "node-fetch": "^2.6.7" + } + }, + "sdk/node_modules/@metaplex-foundation/js/node_modules/@metaplex-foundation/mpl-token-metadata": { + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/@metaplex-foundation/mpl-token-metadata/-/mpl-token-metadata-2.13.0.tgz", + "integrity": "sha512-Fl/8I0L9rv4bKTV/RAl5YIbJe9SnQPInKvLz+xR1fEc4/VQkuCn3RPgypfUMEKWmCznzaw4sApDxy6CFS4qmJw==", + "dev": true, + "dependencies": { + "@metaplex-foundation/beet": "^0.7.1", + "@metaplex-foundation/beet-solana": "^0.4.0", + "@metaplex-foundation/cusper": "^0.0.2", + "@solana/spl-token": "^0.3.6", + "@solana/web3.js": "^1.66.2", + "bn.js": "^5.2.0", + "debug": "^4.3.4" + } + }, + "sdk/node_modules/@metaplex-foundation/js/node_modules/debug": { + "version": "4.3.4", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "sdk/node_modules/@metaplex-foundation/mpl-candy-machine": { + "version": "5.1.0", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@metaplex-foundation/beet": "^0.7.1", + "@metaplex-foundation/beet-solana": "^0.4.0", + "@metaplex-foundation/cusper": "^0.0.2", + "@solana/spl-token": "^0.3.6", + "@solana/web3.js": "^1.66.2" + } + }, + "sdk/node_modules/@metaplex-foundation/mpl-token-auth-rules": { + "version": "1.2.0", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@metaplex-foundation/beet": "^0.7.1", + "@metaplex-foundation/beet-solana": "^0.4.0", + "@metaplex-foundation/cusper": "^0.0.2", + "@solana/spl-token": "^0.3.6", + "@solana/web3.js": "^1.66.2" + } + }, + "sdk/node_modules/@types/mocha": { + "version": "8.2.3", + "dev": true, + "license": "MIT" + }, + "sdk/node_modules/argparse": { + "version": "2.0.1", + "dev": true, + "license": "Python-2.0", + "peer": true + }, + "sdk/node_modules/base-x": { + "version": "4.0.0", + "dev": true, + "license": "MIT" + }, + "sdk/node_modules/bs58": { + "version": "5.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "base-x": "^4.0.0" + } + }, + "sdk/node_modules/chokidar": { + "version": "3.5.1", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "anymatch": "~3.1.1", + "braces": "~3.0.2", + "glob-parent": "~5.1.0", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.5.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.1" + } + }, + "sdk/node_modules/debug": { + "version": "4.3.1", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "sdk/node_modules/find-up": { + "version": "5.0.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "sdk/node_modules/glob": { + "version": "7.1.6", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "sdk/node_modules/js-yaml": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "sdk/node_modules/locate-path": { + "version": "6.0.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "sdk/node_modules/log-symbols": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "chalk": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "sdk/node_modules/mocha": { + "version": "8.4.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@ungap/promise-all-settled": "1.1.2", + "ansi-colors": "4.1.1", + "browser-stdout": "1.3.1", + "chokidar": "3.5.1", + "debug": "4.3.1", + "diff": "5.0.0", + "escape-string-regexp": "4.0.0", + "find-up": "5.0.0", + "glob": "7.1.6", + "growl": "1.10.5", + "he": "1.2.0", + "js-yaml": "4.0.0", + "log-symbols": "4.0.0", + "minimatch": "3.0.4", + "ms": "2.1.3", + "nanoid": "3.1.20", + "serialize-javascript": "5.0.1", + "strip-json-comments": "3.1.1", + "supports-color": "8.1.1", + "which": "2.0.2", + "wide-align": "1.1.3", + "workerpool": "6.1.0", + "yargs": "16.2.0", + "yargs-parser": "20.2.4", + "yargs-unparser": "2.0.0" + }, + "bin": { + "_mocha": "bin/_mocha", + "mocha": "bin/mocha" + }, + "engines": { + "node": ">= 10.12.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mochajs" + } + }, + "sdk/node_modules/mocha/node_modules/ms": { + "version": "2.1.3", + "dev": true, + "license": "MIT", + "peer": true + }, + "sdk/node_modules/nanoid": { + "version": "3.1.20", + "dev": true, + "license": "MIT", + "peer": true, + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "sdk/node_modules/p-limit": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "sdk/node_modules/p-locate": { + "version": "5.0.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "sdk/node_modules/path-exists": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "sdk/node_modules/readdirp": { + "version": "3.5.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "sdk/node_modules/serialize-javascript": { + "version": "5.0.1", + "dev": true, + "license": "BSD-3-Clause", + "peer": true, + "dependencies": { + "randombytes": "^2.1.0" + } + }, + "sdk/node_modules/supports-color": { + "version": "8.1.1", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "sdk/node_modules/ts-mocha": { + "version": "8.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "ts-node": "7.0.1" + }, + "bin": { + "ts-mocha": "bin/ts-mocha" + }, + "engines": { + "node": ">= 6.X.X" + }, + "optionalDependencies": { + "tsconfig-paths": "^3.5.0" + }, + "peerDependencies": { + "mocha": "^3.X.X || ^4.X.X || ^5.X.X || ^6.X.X || ^7.X.X || ^8.X.X" + } + }, + "sdk/node_modules/workerpool": { + "version": "6.1.0", + "dev": true, + "license": "Apache-2.0", + "peer": true + } + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.12.11", + "dev": true, + "peer": true, + "requires": { + "@babel/highlight": "^7.10.4" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.15.7", + "dev": true, + "peer": true + }, + "@babel/highlight": { + "version": "7.16.0", + "dev": true, + "peer": true, + "requires": { + "@babel/helper-validator-identifier": "^7.15.7", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "dev": true, + "peer": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "dev": true, + "peer": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "dev": true, + "peer": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "dev": true, + "peer": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "dev": true, + "peer": true + }, + "has-flag": { + "version": "3.0.0", + "dev": true, + "peer": true + }, + "supports-color": { + "version": "5.5.0", + "dev": true, + "peer": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "@babel/runtime": { + "version": "7.23.9", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.9.tgz", + "integrity": "sha512-0CX6F+BI2s9dkUqr08KFrAIZgNFj75rdBU/DjCyYLIaV/quFjkk6T+EJ2LkZHyZTbEV4L5p97mNkUsHl2wLFAw==", + "requires": { + "regenerator-runtime": "^0.14.0" + } + }, + "@bundlr-network/client": { + "version": "0.8.9", + "requires": { + "@solana/wallet-adapter-base": "^0.9.2", + "@solana/web3.js": "^1.36.0", + "@supercharge/promise-pool": "^2.1.0", + "algosdk": "^1.13.1", + "arbundles": "^0.6.21", + "arweave": "^1.11.4", + "async-retry": "^1.3.3", + "axios": "^0.25.0", + "base64url": "^3.0.1", + "bignumber.js": "^9.0.1", + "bs58": "^4.0.1", + "commander": "^8.2.0", + "csv": "^6.0.5", + "ethers": "^5.5.1", + "inquirer": "^8.2.0", + "js-sha256": "^0.9.0", + "mime-types": "^2.1.34", + "near-api-js": "^0.44.2", + "near-seed-phrase": "^0.2.0" + }, + "dependencies": { + "commander": { + "version": "8.3.0" + } + } + }, + "@coral-xyz/borsh": { + "version": "0.26.0", + "requires": { + "bn.js": "^5.1.2", + "buffer-layout": "^1.2.0" + } + }, + "@eslint/eslintrc": { + "version": "0.4.3", + "dev": true, + "peer": true, + "requires": { + "ajv": "^6.12.4", + "debug": "^4.1.1", + "espree": "^7.3.0", + "globals": "^13.9.0", + "ignore": "^4.0.6", + "import-fresh": "^3.2.1", + "js-yaml": "^3.13.1", + "minimatch": "^3.0.4", + "strip-json-comments": "^3.1.1" + } + }, + "@ethersproject/abi": { + "version": "5.7.0", + "requires": { + "@ethersproject/address": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/constants": "^5.7.0", + "@ethersproject/hash": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/strings": "^5.7.0" + } + }, + "@ethersproject/abstract-provider": { + "version": "5.7.0", + "requires": { + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/networks": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/transactions": "^5.7.0", + "@ethersproject/web": "^5.7.0" + } + }, + "@ethersproject/abstract-signer": { + "version": "5.7.0", + "requires": { + "@ethersproject/abstract-provider": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0" + } + }, + "@ethersproject/address": { + "version": "5.7.0", + "requires": { + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/rlp": "^5.7.0" + } + }, + "@ethersproject/base64": { + "version": "5.7.0", + "requires": { + "@ethersproject/bytes": "^5.7.0" + } + }, + "@ethersproject/basex": { + "version": "5.7.0", + "requires": { + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/properties": "^5.7.0" + } + }, + "@ethersproject/bignumber": { + "version": "5.7.0", + "requires": { + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "bn.js": "^5.2.1" + } + }, + "@ethersproject/bytes": { + "version": "5.7.0", + "requires": { + "@ethersproject/logger": "^5.7.0" + } + }, + "@ethersproject/constants": { + "version": "5.7.0", + "requires": { + "@ethersproject/bignumber": "^5.7.0" + } + }, + "@ethersproject/contracts": { + "version": "5.7.0", + "requires": { + "@ethersproject/abi": "^5.7.0", + "@ethersproject/abstract-provider": "^5.7.0", + "@ethersproject/abstract-signer": "^5.7.0", + "@ethersproject/address": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/constants": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/transactions": "^5.7.0" + } + }, + "@ethersproject/hash": { + "version": "5.7.0", + "requires": { + "@ethersproject/abstract-signer": "^5.7.0", + "@ethersproject/address": "^5.7.0", + "@ethersproject/base64": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/strings": "^5.7.0" + } + }, + "@ethersproject/hdnode": { + "version": "5.7.0", + "requires": { + "@ethersproject/abstract-signer": "^5.7.0", + "@ethersproject/basex": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/pbkdf2": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/sha2": "^5.7.0", + "@ethersproject/signing-key": "^5.7.0", + "@ethersproject/strings": "^5.7.0", + "@ethersproject/transactions": "^5.7.0", + "@ethersproject/wordlists": "^5.7.0" + } + }, + "@ethersproject/json-wallets": { + "version": "5.7.0", + "requires": { + "@ethersproject/abstract-signer": "^5.7.0", + "@ethersproject/address": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/hdnode": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/pbkdf2": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/random": "^5.7.0", + "@ethersproject/strings": "^5.7.0", + "@ethersproject/transactions": "^5.7.0", + "aes-js": "3.0.0", + "scrypt-js": "3.0.1" + } + }, + "@ethersproject/keccak256": { + "version": "5.7.0", + "requires": { + "@ethersproject/bytes": "^5.7.0", + "js-sha3": "0.8.0" + } + }, + "@ethersproject/logger": { + "version": "5.7.0" + }, + "@ethersproject/networks": { + "version": "5.7.1", + "requires": { + "@ethersproject/logger": "^5.7.0" + } + }, + "@ethersproject/pbkdf2": { + "version": "5.7.0", + "requires": { + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/sha2": "^5.7.0" + } + }, + "@ethersproject/properties": { + "version": "5.7.0", + "requires": { + "@ethersproject/logger": "^5.7.0" + } + }, + "@ethersproject/providers": { + "version": "5.7.1", + "requires": { + "@ethersproject/abstract-provider": "^5.7.0", + "@ethersproject/abstract-signer": "^5.7.0", + "@ethersproject/address": "^5.7.0", + "@ethersproject/base64": "^5.7.0", + "@ethersproject/basex": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/constants": "^5.7.0", + "@ethersproject/hash": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/networks": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/random": "^5.7.0", + "@ethersproject/rlp": "^5.7.0", + "@ethersproject/sha2": "^5.7.0", + "@ethersproject/strings": "^5.7.0", + "@ethersproject/transactions": "^5.7.0", + "@ethersproject/web": "^5.7.0", + "bech32": "1.1.4", + "ws": "7.4.6" + }, + "dependencies": { + "ws": { + "version": "7.4.6", + "requires": {} + } + } + }, + "@ethersproject/random": { + "version": "5.7.0", + "requires": { + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0" + } + }, + "@ethersproject/rlp": { + "version": "5.7.0", + "requires": { + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0" + } + }, + "@ethersproject/sha2": { + "version": "5.7.0", + "requires": { + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "hash.js": "1.1.7" + } + }, + "@ethersproject/signing-key": { + "version": "5.7.0", + "requires": { + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "bn.js": "^5.2.1", + "elliptic": "6.5.4", + "hash.js": "1.1.7" + } + }, + "@ethersproject/solidity": { + "version": "5.7.0", + "requires": { + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/sha2": "^5.7.0", + "@ethersproject/strings": "^5.7.0" + } + }, + "@ethersproject/strings": { + "version": "5.7.0", + "requires": { + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/constants": "^5.7.0", + "@ethersproject/logger": "^5.7.0" + } + }, + "@ethersproject/transactions": { + "version": "5.7.0", + "requires": { + "@ethersproject/address": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/constants": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/rlp": "^5.7.0", + "@ethersproject/signing-key": "^5.7.0" + } + }, + "@ethersproject/units": { + "version": "5.7.0", + "requires": { + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/constants": "^5.7.0", + "@ethersproject/logger": "^5.7.0" + } + }, + "@ethersproject/wallet": { + "version": "5.7.0", + "requires": { + "@ethersproject/abstract-provider": "^5.7.0", + "@ethersproject/abstract-signer": "^5.7.0", + "@ethersproject/address": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/hash": "^5.7.0", + "@ethersproject/hdnode": "^5.7.0", + "@ethersproject/json-wallets": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/random": "^5.7.0", + "@ethersproject/signing-key": "^5.7.0", + "@ethersproject/transactions": "^5.7.0", + "@ethersproject/wordlists": "^5.7.0" + } + }, + "@ethersproject/web": { + "version": "5.7.1", + "requires": { + "@ethersproject/base64": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/strings": "^5.7.0" + } + }, + "@ethersproject/wordlists": { + "version": "5.7.0", + "requires": { + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/hash": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/strings": "^5.7.0" + } + }, + "@hapi/hoek": { + "version": "9.3.0" + }, + "@hapi/topo": { + "version": "5.1.0", + "requires": { + "@hapi/hoek": "^9.0.0" + } + }, + "@humanwhocodes/config-array": { + "version": "0.5.0", + "dev": true, + "peer": true, + "requires": { + "@humanwhocodes/object-schema": "^1.2.0", + "debug": "^4.1.1", + "minimatch": "^3.0.4" + } + }, + "@humanwhocodes/object-schema": { + "version": "1.2.1", + "dev": true, + "peer": true + }, + "@magiceden-oss/mmm": { + "version": "file:sdk", + "requires": { + "@magiceden-oss/open_creator_protocol": "^0.3.2", + "@metaplex-foundation/js": "^0.18.3", + "@metaplex-foundation/mpl-token-auth-rules": "^1.2.0", + "@metaplex-foundation/mpl-token-metadata": "^3.1.2", + "@project-serum/anchor": "^0.26.0", + "@solana/spl-token": "^0.3.5", + "@solana/web3.js": "^1.65.0", + "@types/bn.js": "^5.1.0", + "@types/chai": "^4.2.15", + "@types/mocha": "^8.2.1", + "chai": "^4.3.0", + "old-mpl-token-metadata": "npm:@metaplex-foundation/mpl-token-metadata@2.12.0", + "ts-mocha": "^8.0.0", + "typescript": "^4.4.4" + }, + "dependencies": { + "@metaplex-foundation/beet-solana": { + "version": "0.4.0", + "dev": true, + "requires": { + "@metaplex-foundation/beet": ">=0.1.0", + "@solana/web3.js": "^1.56.2", + "bs58": "^5.0.0", + "debug": "^4.3.4" + }, + "dependencies": { + "debug": { + "version": "4.3.4", + "dev": true, + "requires": { + "ms": "2.1.2" + } + } + } + }, + "@metaplex-foundation/js": { + "version": "0.18.3", + "dev": true, + "requires": { + "@bundlr-network/client": "^0.8.8", + "@metaplex-foundation/beet": "0.7.1", + "@metaplex-foundation/mpl-auction-house": "^2.3.0", + "@metaplex-foundation/mpl-candy-guard": "^0.3.0", + "@metaplex-foundation/mpl-candy-machine": "^5.0.0", + "@metaplex-foundation/mpl-candy-machine-core": "^0.1.2", + "@metaplex-foundation/mpl-token-metadata": "^2.8.6", + "@noble/ed25519": "^1.7.1", + "@noble/hashes": "^1.1.3", + "@solana/spl-token": "^0.3.5", + "@solana/web3.js": "^1.63.1", + "bignumber.js": "^9.0.2", + "bn.js": "^5.2.1", + "bs58": "^5.0.0", + "buffer": "^6.0.3", + "debug": "^4.3.4", + "eventemitter3": "^4.0.7", + "lodash.clonedeep": "^4.5.0", + "lodash.isequal": "^4.5.0", + "merkletreejs": "^0.2.32", + "mime": "^3.0.0", + "node-fetch": "^2.6.7" + }, + "dependencies": { + "@metaplex-foundation/mpl-token-metadata": { + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/@metaplex-foundation/mpl-token-metadata/-/mpl-token-metadata-2.13.0.tgz", + "integrity": "sha512-Fl/8I0L9rv4bKTV/RAl5YIbJe9SnQPInKvLz+xR1fEc4/VQkuCn3RPgypfUMEKWmCznzaw4sApDxy6CFS4qmJw==", + "dev": true, + "requires": { + "@metaplex-foundation/beet": "^0.7.1", + "@metaplex-foundation/beet-solana": "^0.4.0", + "@metaplex-foundation/cusper": "^0.0.2", + "@solana/spl-token": "^0.3.6", + "@solana/web3.js": "^1.66.2", + "bn.js": "^5.2.0", + "debug": "^4.3.4" + } + }, + "debug": { + "version": "4.3.4", + "dev": true, + "requires": { + "ms": "2.1.2" + } + } + } + }, + "@metaplex-foundation/mpl-candy-machine": { + "version": "5.1.0", + "dev": true, + "requires": { + "@metaplex-foundation/beet": "^0.7.1", + "@metaplex-foundation/beet-solana": "^0.4.0", + "@metaplex-foundation/cusper": "^0.0.2", + "@solana/spl-token": "^0.3.6", + "@solana/web3.js": "^1.66.2" + } + }, + "@metaplex-foundation/mpl-token-auth-rules": { + "version": "1.2.0", + "dev": true, + "requires": { + "@metaplex-foundation/beet": "^0.7.1", + "@metaplex-foundation/beet-solana": "^0.4.0", + "@metaplex-foundation/cusper": "^0.0.2", + "@solana/spl-token": "^0.3.6", + "@solana/web3.js": "^1.66.2" + } + }, + "@types/mocha": { + "version": "8.2.3", + "dev": true + }, + "argparse": { + "version": "2.0.1", + "dev": true, + "peer": true + }, + "base-x": { + "version": "4.0.0", + "dev": true + }, + "bs58": { + "version": "5.0.0", + "dev": true, + "requires": { + "base-x": "^4.0.0" + } + }, + "chokidar": { + "version": "3.5.1", + "dev": true, + "peer": true, + "requires": { + "anymatch": "~3.1.1", + "braces": "~3.0.2", + "fsevents": "~2.3.1", + "glob-parent": "~5.1.0", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.5.0" + } + }, + "debug": { + "version": "4.3.1", + "dev": true, + "peer": true, + "requires": { + "ms": "2.1.2" + } + }, + "find-up": { + "version": "5.0.0", + "dev": true, + "peer": true, + "requires": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + } + }, + "glob": { + "version": "7.1.6", + "dev": true, + "peer": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "js-yaml": { + "version": "4.0.0", + "dev": true, + "peer": true, + "requires": { + "argparse": "^2.0.1" + } + }, + "locate-path": { + "version": "6.0.0", + "dev": true, + "peer": true, + "requires": { + "p-locate": "^5.0.0" + } + }, + "log-symbols": { + "version": "4.0.0", + "dev": true, + "peer": true, + "requires": { + "chalk": "^4.0.0" + } + }, + "mocha": { + "version": "8.4.0", + "dev": true, + "peer": true, + "requires": { + "@ungap/promise-all-settled": "1.1.2", + "ansi-colors": "4.1.1", + "browser-stdout": "1.3.1", + "chokidar": "3.5.1", + "debug": "4.3.1", + "diff": "5.0.0", + "escape-string-regexp": "4.0.0", + "find-up": "5.0.0", + "glob": "7.1.6", + "growl": "1.10.5", + "he": "1.2.0", + "js-yaml": "4.0.0", + "log-symbols": "4.0.0", + "minimatch": "3.0.4", + "ms": "2.1.3", + "nanoid": "3.1.20", + "serialize-javascript": "5.0.1", + "strip-json-comments": "3.1.1", + "supports-color": "8.1.1", + "which": "2.0.2", + "wide-align": "1.1.3", + "workerpool": "6.1.0", + "yargs": "16.2.0", + "yargs-parser": "20.2.4", + "yargs-unparser": "2.0.0" + }, + "dependencies": { + "ms": { + "version": "2.1.3", + "dev": true, + "peer": true + } + } + }, + "nanoid": { + "version": "3.1.20", + "dev": true, + "peer": true + }, + "p-limit": { + "version": "3.1.0", + "dev": true, + "peer": true, + "requires": { + "yocto-queue": "^0.1.0" + } + }, + "p-locate": { + "version": "5.0.0", + "dev": true, + "peer": true, + "requires": { + "p-limit": "^3.0.2" + } + }, + "path-exists": { + "version": "4.0.0", + "dev": true, + "peer": true + }, + "readdirp": { + "version": "3.5.0", + "dev": true, + "peer": true, + "requires": { + "picomatch": "^2.2.1" + } + }, + "serialize-javascript": { + "version": "5.0.1", + "dev": true, + "peer": true, + "requires": { + "randombytes": "^2.1.0" + } + }, + "supports-color": { + "version": "8.1.1", + "dev": true, + "peer": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "ts-mocha": { + "version": "8.0.0", + "dev": true, + "requires": { + "ts-node": "7.0.1", + "tsconfig-paths": "^3.5.0" + } + }, + "workerpool": { + "version": "6.1.0", + "dev": true, + "peer": true + } + } + }, + "@magiceden-oss/open_creator_protocol": { + "version": "0.3.2", + "requires": { + "@metaplex-foundation/beet": "^0.7.1", + "@metaplex-foundation/beet-solana": "^0.3.1", + "@metaplex-foundation/js": "^0.16.1", + "@metaplex-foundation/mpl-token-metadata": "^2.5.1", + "@metaplex-foundation/rustbin": "^0.3.1", + "@metaplex-foundation/solita": "^0.12.2", + "@project-serum/anchor": "^0.25.0", + "@project-serum/serum": "^0.13.58", + "@solana/spl-token": "^0.3.5", + "@solana/web3.js": "^1.65.0", + "borsh": "^0.7.0" + }, + "dependencies": { + "@bundlr-network/client": { + "version": "0.7.17", + "requires": { + "@solana/wallet-adapter-base": "^0.9.2", + "@solana/web3.js": "^1.36.0", + "@supercharge/promise-pool": "^2.1.0", + "algosdk": "^1.13.1", + "arbundles": "^0.6.20", + "arweave": "^1.11.4", + "async-retry": "^1.3.3", + "axios": "^0.25.0", + "base64url": "^3.0.1", + "bignumber.js": "^9.0.1", + "bs58": "^4.0.1", + "commander": "^8.2.0", + "csv": "^6.0.5", + "ethers": "^5.5.1", + "inquirer": "^8.2.0", + "js-sha256": "^0.9.0", + "mime-types": "^2.1.34", + "near-api-js": "^0.44.2", + "near-seed-phrase": "^0.2.0" + } + }, + "@metaplex-foundation/js": { + "version": "0.16.1", + "requires": { + "@bundlr-network/client": "^0.7.14", + "@metaplex-foundation/beet": "^0.4.0", + "@metaplex-foundation/beet-solana": "^0.3.0", + "@metaplex-foundation/mpl-auction-house": "^2.1.1", + "@metaplex-foundation/mpl-candy-machine": "^4.4.1", + "@metaplex-foundation/mpl-token-metadata": "^2.2.2", + "@solana/spl-token": "^0.2.0", + "@solana/web3.js": "^1.47.3", + "abort-controller": "^3.0.0", + "bignumber.js": "^9.0.2", + "bn.js": "^5.2.0", + "bs58": "^5.0.0", + "buffer": "^6.0.3", + "cross-fetch": "^3.1.5", + "debug": "^4.3.4", + "eventemitter3": "^4.0.7", + "lodash.clonedeep": "^4.5.0", + "lodash.isequal": "^4.5.0", + "mime": "^3.0.0", + "tweetnacl": "^1.0.3" + }, + "dependencies": { + "@metaplex-foundation/beet": { + "version": "0.4.0", + "requires": { + "ansicolors": "^0.3.2", + "bn.js": "^5.2.0", + "debug": "^4.3.3" + } + }, + "@solana/spl-token": { + "version": "0.2.0", + "requires": { + "@solana/buffer-layout": "^4.0.0", + "@solana/buffer-layout-utils": "^0.2.0", + "@solana/web3.js": "^1.32.0", + "start-server-and-test": "^1.14.0" + } + }, + "bs58": { + "version": "5.0.0", + "requires": { + "base-x": "^4.0.0" + } + } + } + }, + "@metaplex-foundation/mpl-token-metadata": { + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/@metaplex-foundation/mpl-token-metadata/-/mpl-token-metadata-2.13.0.tgz", + "integrity": "sha512-Fl/8I0L9rv4bKTV/RAl5YIbJe9SnQPInKvLz+xR1fEc4/VQkuCn3RPgypfUMEKWmCznzaw4sApDxy6CFS4qmJw==", + "requires": { + "@metaplex-foundation/beet": "^0.7.1", + "@metaplex-foundation/beet-solana": "^0.4.0", + "@metaplex-foundation/cusper": "^0.0.2", + "@solana/spl-token": "^0.3.6", + "@solana/web3.js": "^1.66.2", + "bn.js": "^5.2.0", + "debug": "^4.3.4" + }, + "dependencies": { + "@metaplex-foundation/beet-solana": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@metaplex-foundation/beet-solana/-/beet-solana-0.4.1.tgz", + "integrity": "sha512-/6o32FNUtwK8tjhotrvU/vorP7umBuRFvBZrC6XCk51aKidBHe5LPVPA5AjGPbV3oftMfRuXPNd9yAGeEqeCDQ==", + "requires": { + "@metaplex-foundation/beet": ">=0.1.0", + "@solana/web3.js": "^1.56.2", + "bs58": "^5.0.0", + "debug": "^4.3.4" + } + }, + "bs58": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-5.0.0.tgz", + "integrity": "sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ==", + "requires": { + "base-x": "^4.0.0" + } + } + } + }, + "@project-serum/anchor": { + "version": "0.25.0", + "requires": { + "@project-serum/borsh": "^0.2.5", + "@solana/web3.js": "^1.36.0", + "base64-js": "^1.5.1", + "bn.js": "^5.1.2", + "bs58": "^4.0.1", + "buffer-layout": "^1.2.2", + "camelcase": "^5.3.1", + "cross-fetch": "^3.1.5", + "crypto-hash": "^1.3.0", + "eventemitter3": "^4.0.7", + "js-sha256": "^0.9.0", + "pako": "^2.0.3", + "snake-case": "^3.0.4", + "superstruct": "^0.15.4", + "toml": "^3.0.0" + } + }, + "base-x": { + "version": "4.0.0" + }, + "commander": { + "version": "8.3.0" + }, + "debug": { + "version": "4.3.4", + "requires": { + "ms": "2.1.2" + } + }, + "superstruct": { + "version": "0.15.5" + } + } + }, + "@metaplex-foundation/beet": { + "version": "0.7.1", + "requires": { + "ansicolors": "^0.3.2", + "bn.js": "^5.2.0", + "debug": "^4.3.3" + } + }, + "@metaplex-foundation/beet-solana": { + "version": "0.3.1", + "requires": { + "@metaplex-foundation/beet": ">=0.1.0", + "@solana/web3.js": "^1.56.2", + "bs58": "^5.0.0", + "debug": "^4.3.4" + }, + "dependencies": { + "base-x": { + "version": "4.0.0" + }, + "bs58": { + "version": "5.0.0", + "requires": { + "base-x": "^4.0.0" + } + }, + "debug": { + "version": "4.3.4", + "requires": { + "ms": "2.1.2" + } + } + } + }, + "@metaplex-foundation/cusper": { + "version": "0.0.2" + }, + "@metaplex-foundation/js": { + "version": "0.19.4", + "requires": { + "@bundlr-network/client": "^0.8.8", + "@metaplex-foundation/beet": "0.7.1", + "@metaplex-foundation/mpl-auction-house": "^2.3.0", + "@metaplex-foundation/mpl-bubblegum": "^0.6.2", + "@metaplex-foundation/mpl-candy-guard": "^0.3.0", + "@metaplex-foundation/mpl-candy-machine": "^5.0.0", + "@metaplex-foundation/mpl-candy-machine-core": "^0.1.2", + "@metaplex-foundation/mpl-token-metadata": "^2.11.0", + "@noble/ed25519": "^1.7.1", + "@noble/hashes": "^1.1.3", + "@solana/spl-account-compression": "^0.1.8", + "@solana/spl-token": "^0.3.5", + "@solana/web3.js": "^1.63.1", + "bignumber.js": "^9.0.2", + "bn.js": "^5.2.1", + "bs58": "^5.0.0", + "buffer": "^6.0.3", + "debug": "^4.3.4", + "eventemitter3": "^4.0.7", + "lodash.clonedeep": "^4.5.0", + "lodash.isequal": "^4.5.0", + "merkletreejs": "^0.2.32", + "mime": "^3.0.0", + "node-fetch": "^2.6.7" + }, + "dependencies": { + "@metaplex-foundation/beet-solana": { + "version": "0.4.0", + "requires": { + "@metaplex-foundation/beet": ">=0.1.0", + "@solana/web3.js": "^1.56.2", + "bs58": "^5.0.0", + "debug": "^4.3.4" + } + }, + "@metaplex-foundation/mpl-candy-machine": { + "version": "5.0.0", + "requires": { + "@metaplex-foundation/beet": "^0.7.1", + "@metaplex-foundation/beet-solana": "^0.4.0", + "@metaplex-foundation/cusper": "^0.0.2", + "@solana/spl-token": "^0.3.6", + "@solana/web3.js": "^1.66.2" + } + }, + "@metaplex-foundation/mpl-token-metadata": { + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/@metaplex-foundation/mpl-token-metadata/-/mpl-token-metadata-2.13.0.tgz", + "integrity": "sha512-Fl/8I0L9rv4bKTV/RAl5YIbJe9SnQPInKvLz+xR1fEc4/VQkuCn3RPgypfUMEKWmCznzaw4sApDxy6CFS4qmJw==", + "requires": { + "@metaplex-foundation/beet": "^0.7.1", + "@metaplex-foundation/beet-solana": "^0.4.0", + "@metaplex-foundation/cusper": "^0.0.2", + "@solana/spl-token": "^0.3.6", + "@solana/web3.js": "^1.66.2", + "bn.js": "^5.2.0", + "debug": "^4.3.4" + } + }, + "base-x": { + "version": "4.0.0" + }, + "bs58": { + "version": "5.0.0", + "requires": { + "base-x": "^4.0.0" + } + }, + "debug": { + "version": "4.3.4", + "requires": { + "ms": "2.1.2" + } + } + } + }, + "@metaplex-foundation/mpl-auction-house": { + "version": "2.3.0", + "requires": { + "@metaplex-foundation/beet": "^0.6.1", + "@metaplex-foundation/beet-solana": "^0.3.1", + "@metaplex-foundation/cusper": "^0.0.2", + "@solana/web3.js": "^1.56.2", + "bn.js": "^5.2.0" + }, + "dependencies": { + "@metaplex-foundation/beet": { + "version": "0.6.1", + "requires": { + "ansicolors": "^0.3.2", + "bn.js": "^5.2.0", + "debug": "^4.3.3" + } + } + } + }, + "@metaplex-foundation/mpl-bubblegum": { + "version": "0.6.2", + "requires": { + "@metaplex-foundation/beet": "0.7.1", + "@metaplex-foundation/beet-solana": "0.4.0", + "@metaplex-foundation/cusper": "^0.0.2", + "@metaplex-foundation/mpl-token-metadata": "^2.5.2", + "@solana/spl-account-compression": "^0.1.4", + "@solana/spl-token": "^0.1.8", + "@solana/web3.js": "^1.50.1", + "bn.js": "^5.2.0", + "js-sha3": "^0.8.0" + }, + "dependencies": { + "@metaplex-foundation/beet-solana": { + "version": "0.4.0", + "requires": { + "@metaplex-foundation/beet": ">=0.1.0", + "@solana/web3.js": "^1.56.2", + "bs58": "^5.0.0", + "debug": "^4.3.4" + } + }, + "@metaplex-foundation/mpl-token-metadata": { + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/@metaplex-foundation/mpl-token-metadata/-/mpl-token-metadata-2.13.0.tgz", + "integrity": "sha512-Fl/8I0L9rv4bKTV/RAl5YIbJe9SnQPInKvLz+xR1fEc4/VQkuCn3RPgypfUMEKWmCznzaw4sApDxy6CFS4qmJw==", + "requires": { + "@metaplex-foundation/beet": "^0.7.1", + "@metaplex-foundation/beet-solana": "^0.4.0", + "@metaplex-foundation/cusper": "^0.0.2", + "@solana/spl-token": "^0.3.6", + "@solana/web3.js": "^1.66.2", + "bn.js": "^5.2.0", + "debug": "^4.3.4" + }, + "dependencies": { + "@solana/spl-token": { + "version": "0.3.11", + "resolved": "https://registry.npmjs.org/@solana/spl-token/-/spl-token-0.3.11.tgz", + "integrity": "sha512-bvohO3rIMSVL24Pb+I4EYTJ6cL82eFpInEXD/I8K8upOGjpqHsKUoAempR/RnUlI1qSFNyFlWJfu6MNUgfbCQQ==", + "requires": { + "@solana/buffer-layout": "^4.0.0", + "@solana/buffer-layout-utils": "^0.2.0", + "@solana/spl-token-metadata": "^0.1.2", + "buffer": "^6.0.3" + } + } + } + }, + "@solana/spl-token": { + "version": "0.1.8", + "requires": { + "@babel/runtime": "^7.10.5", + "@solana/web3.js": "^1.21.0", + "bn.js": "^5.1.0", + "buffer": "6.0.3", + "buffer-layout": "^1.2.0", + "dotenv": "10.0.0" + } + }, + "base-x": { + "version": "4.0.0" + }, + "bs58": { + "version": "5.0.0", + "requires": { + "base-x": "^4.0.0" + } + }, + "debug": { + "version": "4.3.4", + "requires": { + "ms": "2.1.2" + } + } + } + }, + "@metaplex-foundation/mpl-candy-guard": { + "version": "0.3.2", + "requires": { + "@metaplex-foundation/beet": "^0.4.0", + "@metaplex-foundation/beet-solana": "^0.3.0", + "@metaplex-foundation/cusper": "^0.0.2", + "@solana/web3.js": "^1.66.2", + "bn.js": "^5.2.0" + }, + "dependencies": { + "@metaplex-foundation/beet": { + "version": "0.4.0", + "requires": { + "ansicolors": "^0.3.2", + "bn.js": "^5.2.0", + "debug": "^4.3.3" + } + } + } + }, + "@metaplex-foundation/mpl-candy-machine": { + "version": "4.7.1", + "requires": { + "@metaplex-foundation/beet": "^0.4.0", + "@metaplex-foundation/beet-solana": "^0.3.0", + "@metaplex-foundation/cusper": "^0.0.2", + "@metaplex-foundation/mpl-core": "^0.6.1", + "@solana/web3.js": "^1.35.1" + }, + "dependencies": { + "@metaplex-foundation/beet": { + "version": "0.4.0", + "requires": { + "ansicolors": "^0.3.2", + "bn.js": "^5.2.0", + "debug": "^4.3.3" + } + } + } + }, + "@metaplex-foundation/mpl-candy-machine-core": { + "version": "0.1.2", + "requires": { + "@metaplex-foundation/beet": "^0.4.0", + "@metaplex-foundation/beet-solana": "^0.3.0", + "@metaplex-foundation/cusper": "^0.0.2", + "@solana/web3.js": "^1.56.2", + "bn.js": "^5.2.0" + }, + "dependencies": { + "@metaplex-foundation/beet": { + "version": "0.4.0", + "requires": { + "ansicolors": "^0.3.2", + "bn.js": "^5.2.0", + "debug": "^4.3.3" + } + } + } + }, + "@metaplex-foundation/mpl-core": { + "version": "0.6.1", + "requires": { + "@solana/web3.js": "^1.35.1", + "bs58": "^4.0.1" + } + }, + "@metaplex-foundation/mpl-migration-validator": { + "version": "0.4.1", + "dev": true, + "requires": { + "@metaplex-foundation/beet": "^0.7.1", + "@metaplex-foundation/beet-solana": "^0.4.0", + "@metaplex-foundation/cusper": "^0.0.2", + "@solana/spl-token": "^0.3.6", + "@solana/web3.js": "^1.66.2", + "bn.js": "^5.2.0", + "debug": "^4.3.4" + }, + "dependencies": { + "@metaplex-foundation/beet-solana": { + "version": "0.4.0", + "dev": true, + "requires": { + "@metaplex-foundation/beet": ">=0.1.0", + "@solana/web3.js": "^1.56.2", + "bs58": "^5.0.0", + "debug": "^4.3.4" + } + }, + "base-x": { + "version": "4.0.0", + "dev": true + }, + "bs58": { + "version": "5.0.0", + "dev": true, + "requires": { + "base-x": "^4.0.0" + } + }, + "debug": { + "version": "4.3.4", + "dev": true, + "requires": { + "ms": "2.1.2" + } + } + } + }, + "@metaplex-foundation/mpl-token-auth-rules": { + "version": "2.0.0", + "requires": { + "@metaplex-foundation/beet": "^0.7.1", + "@metaplex-foundation/beet-solana": "^0.4.0", + "@metaplex-foundation/cusper": "^0.0.2", + "@msgpack/msgpack": "^2.8.0", + "@solana/spl-token": "^0.3.6", + "@solana/web3.js": "^1.66.2", + "bn.js": "^5.2.1" + }, + "dependencies": { + "@metaplex-foundation/beet-solana": { + "version": "0.4.0", + "requires": { + "@metaplex-foundation/beet": ">=0.1.0", + "@solana/web3.js": "^1.56.2", + "bs58": "^5.0.0", + "debug": "^4.3.4" + } + }, + "base-x": { + "version": "4.0.0" + }, + "bs58": { + "version": "5.0.0", + "requires": { + "base-x": "^4.0.0" + } + }, + "debug": { + "version": "4.3.4", + "requires": { + "ms": "2.1.2" + } + } + } + }, + "@metaplex-foundation/mpl-token-metadata": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@metaplex-foundation/mpl-token-metadata/-/mpl-token-metadata-3.2.0.tgz", + "integrity": "sha512-IP+orxAIkQwSa9M+xsYi7IopV+/0od5rgXTxp0988cHeB0hR1RpXQT8RrcTH/PeOs/tPCU5HvU01NaavV9EEcw==", + "requires": { + "@metaplex-foundation/mpl-toolbox": "^0.9.0" + } + }, + "@metaplex-foundation/mpl-toolbox": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/@metaplex-foundation/mpl-toolbox/-/mpl-toolbox-0.9.2.tgz", + "integrity": "sha512-fNOpWUobslv/zyhj4KHVx+773B43/75q7vCiiFOuTAWs46OQXmJL8sl72qwh36pi1aNpoQMCL/wNI3wPNyJsNw==", + "requires": {} + }, + "@metaplex-foundation/rustbin": { + "version": "0.3.1", + "requires": { + "debug": "^4.3.3", + "semver": "^7.3.7", + "text-table": "^0.2.0", + "toml": "^3.0.0" + } + }, + "@metaplex-foundation/solita": { + "version": "0.12.2", + "requires": { + "@metaplex-foundation/beet": "^0.4.0", + "@metaplex-foundation/beet-solana": "^0.3.0", + "@metaplex-foundation/rustbin": "^0.3.0", + "@solana/web3.js": "^1.36.0", + "camelcase": "^6.2.1", + "debug": "^4.3.3", + "js-sha256": "^0.9.0", + "prettier": "^2.5.1", + "snake-case": "^3.0.4", + "spok": "^1.4.3" + }, + "dependencies": { + "@metaplex-foundation/beet": { + "version": "0.4.0", + "requires": { + "ansicolors": "^0.3.2", + "bn.js": "^5.2.0", + "debug": "^4.3.3" + } + }, + "camelcase": { + "version": "6.3.0" + } + } + }, + "@metaplex-foundation/umi": { + "version": "0.8.10", + "resolved": "https://registry.npmjs.org/@metaplex-foundation/umi/-/umi-0.8.10.tgz", + "integrity": "sha512-iGuGIfJh2+YFvUIkZ0nB/69EsQcaoq89DDPRPYvPBtOunfv8TH8SNrwcsXHlp9aBtn5FGKCPx3V3X/eurB32Fg==", + "requires": { + "@metaplex-foundation/umi-options": "^0.8.9", + "@metaplex-foundation/umi-public-keys": "^0.8.9", + "@metaplex-foundation/umi-serializers": "^0.8.9" + } + }, + "@metaplex-foundation/umi-bundle-tests": { + "version": "0.8.10", + "resolved": "https://registry.npmjs.org/@metaplex-foundation/umi-bundle-tests/-/umi-bundle-tests-0.8.10.tgz", + "integrity": "sha512-12BLhBF5lXLG7K1m4J8mEArcc/l4a4iRCmZt2VKSD0tA+i+b3ou1RA+e+262nhrEZ/uhYx0ChUzrJlBk0a1aXQ==", + "requires": { + "@metaplex-foundation/umi-eddsa-web3js": "^0.8.10", + "@metaplex-foundation/umi-http-fetch": "^0.8.10", + "@metaplex-foundation/umi-program-repository": "^0.8.10", + "@metaplex-foundation/umi-rpc-web3js": "^0.8.10", + "@metaplex-foundation/umi-serializer-data-view": "^0.8.10", + "@metaplex-foundation/umi-storage-mock": "^0.8.10", + "@metaplex-foundation/umi-transaction-factory-web3js": "^0.8.10" + } + }, + "@metaplex-foundation/umi-eddsa-web3js": { + "version": "0.8.10", + "resolved": "https://registry.npmjs.org/@metaplex-foundation/umi-eddsa-web3js/-/umi-eddsa-web3js-0.8.10.tgz", + "integrity": "sha512-2CLsuQ67oPKczB7RuG07/Ro1rrW25vGZArren20/zBTgHubGIuFW7V8e9qZDqkHDt1nFecxrX55g0fNtQaU40g==", + "requires": { + "@metaplex-foundation/umi-web3js-adapters": "^0.8.10", + "@noble/curves": "^1.0.0" + } + }, + "@metaplex-foundation/umi-http-fetch": { + "version": "0.8.10", + "resolved": "https://registry.npmjs.org/@metaplex-foundation/umi-http-fetch/-/umi-http-fetch-0.8.10.tgz", + "integrity": "sha512-9QkVMaM8A8JFaTSanVJT3R7IzeLn05xrK7fFnfCTASaTvk+7Dj8ZsgXQjuyCi1pXQrMN+EsREn2NE/tn48ffMQ==", + "requires": { + "node-fetch": "^2.6.7" + } + }, + "@metaplex-foundation/umi-options": { + "version": "0.8.9", + "resolved": "https://registry.npmjs.org/@metaplex-foundation/umi-options/-/umi-options-0.8.9.tgz", + "integrity": "sha512-jSQ61sZMPSAk/TXn8v8fPqtz3x8d0/blVZXLLbpVbo2/T5XobiI6/MfmlUosAjAUaQl6bHRF8aIIqZEFkJiy4A==" + }, + "@metaplex-foundation/umi-program-repository": { + "version": "0.8.10", + "resolved": "https://registry.npmjs.org/@metaplex-foundation/umi-program-repository/-/umi-program-repository-0.8.10.tgz", + "integrity": "sha512-zw+UMOg9z3xqqeosRfctmcnaDYkaoMMvqhu7Vpwt7K9tpVtMaMT5yei29ORvaYpiEVG5hZSbywr/vQsNY0EV9g==", + "requires": {} + }, + "@metaplex-foundation/umi-public-keys": { + "version": "0.8.9", + "resolved": "https://registry.npmjs.org/@metaplex-foundation/umi-public-keys/-/umi-public-keys-0.8.9.tgz", + "integrity": "sha512-CxMzN7dgVGOq9OcNCJe2casKUpJ3RmTVoOvDFyeoTQuK+vkZ1YSSahbqC1iGuHEtKTLSjtWjKvUU6O7zWFTw3Q==", + "requires": { + "@metaplex-foundation/umi-serializers-encodings": "^0.8.9" + } + }, + "@metaplex-foundation/umi-rpc-web3js": { + "version": "0.8.10", + "resolved": "https://registry.npmjs.org/@metaplex-foundation/umi-rpc-web3js/-/umi-rpc-web3js-0.8.10.tgz", + "integrity": "sha512-+60uxlX1OcThL2UIW9dbcy0Ihr011ggxkQYSxc1qh4qitgD9wrZZ/v9nX4tzEN88a52UJGhH5G3SF6CNmqy4aw==", + "requires": { + "@metaplex-foundation/umi-web3js-adapters": "^0.8.10" + } + }, + "@metaplex-foundation/umi-serializer-data-view": { + "version": "0.8.10", + "resolved": "https://registry.npmjs.org/@metaplex-foundation/umi-serializer-data-view/-/umi-serializer-data-view-0.8.10.tgz", + "integrity": "sha512-DVKUQw7FEfpRIE9RF4YU73Mwlaf42RAWDgcycNiYFWpj/FLRebNr+2NT3ALYlOqXsAchnCAYjlQVxCB0Sopn9Q==", + "requires": {} + }, + "@metaplex-foundation/umi-serializers": { + "version": "0.8.9", + "resolved": "https://registry.npmjs.org/@metaplex-foundation/umi-serializers/-/umi-serializers-0.8.9.tgz", + "integrity": "sha512-Sve8Etm3zqvLSUfza+MYRkjTnCpiaAFT7VWdqeHzA3n58P0AfT3p74RrZwVt/UFkxI+ln8BslwBDJmwzcPkuHw==", + "requires": { + "@metaplex-foundation/umi-options": "^0.8.9", + "@metaplex-foundation/umi-public-keys": "^0.8.9", + "@metaplex-foundation/umi-serializers-core": "^0.8.9", + "@metaplex-foundation/umi-serializers-encodings": "^0.8.9", + "@metaplex-foundation/umi-serializers-numbers": "^0.8.9" + } + }, + "@metaplex-foundation/umi-serializers-core": { + "version": "0.8.9", + "resolved": "https://registry.npmjs.org/@metaplex-foundation/umi-serializers-core/-/umi-serializers-core-0.8.9.tgz", + "integrity": "sha512-WT82tkiYJ0Qmscp7uTj1Hz6aWQPETwaKLAENAUN5DeWghkuBKtuxyBKVvEOuoXerJSdhiAk0e8DWA4cxcTTQ/w==" + }, + "@metaplex-foundation/umi-serializers-encodings": { + "version": "0.8.9", + "resolved": "https://registry.npmjs.org/@metaplex-foundation/umi-serializers-encodings/-/umi-serializers-encodings-0.8.9.tgz", + "integrity": "sha512-N3VWLDTJ0bzzMKcJDL08U3FaqRmwlN79FyE4BHj6bbAaJ9LEHjDQ9RJijZyWqTm0jE7I750fU7Ow5EZL38Xi6Q==", + "requires": { + "@metaplex-foundation/umi-serializers-core": "^0.8.9" + } + }, + "@metaplex-foundation/umi-serializers-numbers": { + "version": "0.8.9", + "resolved": "https://registry.npmjs.org/@metaplex-foundation/umi-serializers-numbers/-/umi-serializers-numbers-0.8.9.tgz", + "integrity": "sha512-NtBf1fnVNQJHFQjLFzRu2i9GGnigb9hOm/Gfrk628d0q0tRJB7BOM3bs5C61VAs7kJs4yd+pDNVAERJkknQ7Lg==", + "requires": { + "@metaplex-foundation/umi-serializers-core": "^0.8.9" + } + }, + "@metaplex-foundation/umi-storage-mock": { + "version": "0.8.10", + "resolved": "https://registry.npmjs.org/@metaplex-foundation/umi-storage-mock/-/umi-storage-mock-0.8.10.tgz", + "integrity": "sha512-YOg/ZeeyZoD9vywumL8rpQmgcm4PcWAy1QpEx6Q7ocVqMBlbD08Hrn9/F0cjvjUHhy8NYG7QrbNXdGnklavtuw==", + "requires": {} + }, + "@metaplex-foundation/umi-transaction-factory-web3js": { + "version": "0.8.10", + "resolved": "https://registry.npmjs.org/@metaplex-foundation/umi-transaction-factory-web3js/-/umi-transaction-factory-web3js-0.8.10.tgz", + "integrity": "sha512-hnkDKdtuZgY6DKH6aSEd6UrZGi5/WvfYqJUWeM8SVl1/8GhNypNKWvuppvFHpU9X2tLXuF4JSG4TVxAuIs9LBQ==", + "requires": { + "@metaplex-foundation/umi-web3js-adapters": "^0.8.10" + } + }, + "@metaplex-foundation/umi-web3js-adapters": { + "version": "0.8.10", + "resolved": "https://registry.npmjs.org/@metaplex-foundation/umi-web3js-adapters/-/umi-web3js-adapters-0.8.10.tgz", + "integrity": "sha512-TGF+vzO/v0HMRM8sz1M1yh+wfZ5l4RCFm1Kkcy5MC9FrNDookPP6y9aYZ3R0QkEVVV3u+8QLptrTUrxr3EGmyQ==", + "requires": { + "buffer": "^6.0.3" + } + }, + "@msgpack/msgpack": { + "version": "2.8.0" + }, + "@noble/curves": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.3.0.tgz", + "integrity": "sha512-t01iSXPuN+Eqzb4eBX0S5oubSqXbK/xXa1Ne18Hj8f9pStxztHCE2gfboSp/dZRLSqfuLpRK2nDXDK+W9puocA==", + "requires": { + "@noble/hashes": "1.3.3" + } + }, + "@noble/ed25519": { + "version": "1.7.1" + }, + "@noble/hashes": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.3.tgz", + "integrity": "sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA==" + }, + "@nodelib/fs.scandir": { + "version": "2.1.5", + "dev": true, + "requires": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + } + }, + "@nodelib/fs.stat": { + "version": "2.0.5", + "dev": true + }, + "@nodelib/fs.walk": { + "version": "1.2.8", + "dev": true, + "requires": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + } + }, + "@project-serum/anchor": { + "version": "0.26.0", + "requires": { + "@coral-xyz/borsh": "^0.26.0", + "@solana/web3.js": "^1.68.0", + "base64-js": "^1.5.1", + "bn.js": "^5.1.2", + "bs58": "^4.0.1", + "buffer-layout": "^1.2.2", + "camelcase": "^6.3.0", + "cross-fetch": "^3.1.5", + "crypto-hash": "^1.3.0", + "eventemitter3": "^4.0.7", + "js-sha256": "^0.9.0", + "pako": "^2.0.3", + "snake-case": "^3.0.4", + "superstruct": "^0.15.4", + "toml": "^3.0.0" + }, + "dependencies": { + "camelcase": { + "version": "6.3.0" + }, + "superstruct": { + "version": "0.15.5" + } + } + }, + "@project-serum/borsh": { + "version": "0.2.5", + "requires": { + "bn.js": "^5.1.2", + "buffer-layout": "^1.2.0" + } + }, + "@project-serum/serum": { + "version": "0.13.61", + "requires": { + "@project-serum/anchor": "^0.11.1", + "@solana/spl-token": "^0.1.6", + "@solana/web3.js": "^1.21.0", + "bn.js": "^5.1.2", + "buffer-layout": "^1.2.0" + }, + "dependencies": { + "@project-serum/anchor": { + "version": "0.11.1", + "requires": { + "@project-serum/borsh": "^0.2.2", + "@solana/web3.js": "^1.17.0", + "base64-js": "^1.5.1", + "bn.js": "^5.1.2", + "bs58": "^4.0.1", + "buffer-layout": "^1.2.0", + "camelcase": "^5.3.1", + "crypto-hash": "^1.3.0", + "eventemitter3": "^4.0.7", + "find": "^0.3.0", + "js-sha256": "^0.9.0", + "pako": "^2.0.3", + "snake-case": "^3.0.4", + "toml": "^3.0.0" + } + }, + "@solana/spl-token": { + "version": "0.1.8", + "requires": { + "@babel/runtime": "^7.10.5", + "@solana/web3.js": "^1.21.0", + "bn.js": "^5.1.0", + "buffer": "6.0.3", + "buffer-layout": "^1.2.0", + "dotenv": "10.0.0" + } + } + } + }, + "@randlabs/communication-bridge": { + "version": "1.0.1" + }, + "@randlabs/myalgo-connect": { + "version": "1.3.1", + "requires": { + "@randlabs/communication-bridge": "1.0.1" + } + }, + "@sideway/address": { + "version": "4.1.4", + "requires": { + "@hapi/hoek": "^9.0.0" + } + }, + "@sideway/formula": { + "version": "3.0.0" + }, + "@sideway/pinpoint": { + "version": "2.0.0" + }, + "@solana/buffer-layout": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@solana/buffer-layout/-/buffer-layout-4.0.1.tgz", + "integrity": "sha512-E1ImOIAD1tBZFRdjeM4/pzTiTApC0AOBGwyAMS4fwIodCWArzJ3DWdoh8cKxeFM2fElkxBh2Aqts1BPC373rHA==", + "requires": { + "buffer": "~6.0.3" + } + }, + "@solana/buffer-layout-utils": { + "version": "0.2.0", + "requires": { + "@solana/buffer-layout": "^4.0.0", + "@solana/web3.js": "^1.32.0", + "bigint-buffer": "^1.1.5", + "bignumber.js": "^9.0.1" + } + }, + "@solana/codecs-core": { + "version": "2.0.0-experimental.8618508", + "resolved": "https://registry.npmjs.org/@solana/codecs-core/-/codecs-core-2.0.0-experimental.8618508.tgz", + "integrity": "sha512-JCz7mKjVKtfZxkuDtwMAUgA7YvJcA2BwpZaA1NOLcted4OMC4Prwa3DUe3f3181ixPYaRyptbF0Ikq2MbDkYEA==" + }, + "@solana/codecs-data-structures": { + "version": "2.0.0-experimental.8618508", + "resolved": "https://registry.npmjs.org/@solana/codecs-data-structures/-/codecs-data-structures-2.0.0-experimental.8618508.tgz", + "integrity": "sha512-sLpjL9sqzaDdkloBPV61Rht1tgaKq98BCtIKRuyscIrmVPu3wu0Bavk2n/QekmUzaTsj7K1pVSniM0YqCdnEBw==", + "requires": { + "@solana/codecs-core": "2.0.0-experimental.8618508", + "@solana/codecs-numbers": "2.0.0-experimental.8618508" + } + }, + "@solana/codecs-numbers": { + "version": "2.0.0-experimental.8618508", + "resolved": "https://registry.npmjs.org/@solana/codecs-numbers/-/codecs-numbers-2.0.0-experimental.8618508.tgz", + "integrity": "sha512-EXQKfzFr3CkKKNzKSZPOOOzchXsFe90TVONWsSnVkonO9z+nGKALE0/L9uBmIFGgdzhhU9QQVFvxBMclIDJo2Q==", + "requires": { + "@solana/codecs-core": "2.0.0-experimental.8618508" + } + }, + "@solana/codecs-strings": { + "version": "2.0.0-experimental.8618508", + "resolved": "https://registry.npmjs.org/@solana/codecs-strings/-/codecs-strings-2.0.0-experimental.8618508.tgz", + "integrity": "sha512-b2yhinr1+oe+JDmnnsV0641KQqqDG8AQ16Z/x7GVWO+AWHMpRlHWVXOq8U1yhPMA4VXxl7i+D+C6ql0VGFp0GA==", + "requires": { + "@solana/codecs-core": "2.0.0-experimental.8618508", + "@solana/codecs-numbers": "2.0.0-experimental.8618508" + } + }, + "@solana/options": { + "version": "2.0.0-experimental.8618508", + "resolved": "https://registry.npmjs.org/@solana/options/-/options-2.0.0-experimental.8618508.tgz", + "integrity": "sha512-fy/nIRAMC3QHvnKi63KEd86Xr/zFBVxNW4nEpVEU2OT0gCEKwHY4Z55YHf7XujhyuM3PNpiBKg/YYw5QlRU4vg==", + "requires": { + "@solana/codecs-core": "2.0.0-experimental.8618508", + "@solana/codecs-numbers": "2.0.0-experimental.8618508" + } + }, + "@solana/spl-account-compression": { + "version": "0.1.8", + "requires": { + "@metaplex-foundation/beet": "^0.7.1", + "@metaplex-foundation/beet-solana": "^0.4.0", + "bn.js": "^5.2.1", + "borsh": "^0.7.0", + "js-sha3": "^0.8.0", + "typescript-collections": "^1.3.3" + }, + "dependencies": { + "@metaplex-foundation/beet-solana": { + "version": "0.4.0", + "requires": { + "@metaplex-foundation/beet": ">=0.1.0", + "@solana/web3.js": "^1.56.2", + "bs58": "^5.0.0", + "debug": "^4.3.4" + } + }, + "base-x": { + "version": "4.0.0" + }, + "bs58": { + "version": "5.0.0", + "requires": { + "base-x": "^4.0.0" + } + }, + "debug": { + "version": "4.3.4", + "requires": { + "ms": "2.1.2" + } + } + } + }, + "@solana/spl-token": { + "version": "0.3.7", + "requires": { + "@solana/buffer-layout": "^4.0.0", + "@solana/buffer-layout-utils": "^0.2.0", + "buffer": "^6.0.3" + } + }, + "@solana/spl-token-metadata": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@solana/spl-token-metadata/-/spl-token-metadata-0.1.2.tgz", + "integrity": "sha512-hJYnAJNkDrtkE2Q41YZhCpeOGU/0JgRFXbtrtOuGGeKc3pkEUHB9DDoxZAxx+XRno13GozUleyBi0qypz4c3bw==", + "requires": { + "@solana/codecs-core": "2.0.0-experimental.8618508", + "@solana/codecs-data-structures": "2.0.0-experimental.8618508", + "@solana/codecs-numbers": "2.0.0-experimental.8618508", + "@solana/codecs-strings": "2.0.0-experimental.8618508", + "@solana/options": "2.0.0-experimental.8618508", + "@solana/spl-type-length-value": "0.1.0" + } + }, + "@solana/spl-type-length-value": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@solana/spl-type-length-value/-/spl-type-length-value-0.1.0.tgz", + "integrity": "sha512-JBMGB0oR4lPttOZ5XiUGyvylwLQjt1CPJa6qQ5oM+MBCndfjz2TKKkw0eATlLLcYmq1jBVsNlJ2cD6ns2GR7lA==", + "requires": { + "buffer": "^6.0.3" + } + }, + "@solana/wallet-adapter-base": { + "version": "0.9.18", + "requires": { + "eventemitter3": "^4.0.0" + } + }, + "@solana/web3.js": { + "version": "1.90.0", + "resolved": "https://registry.npmjs.org/@solana/web3.js/-/web3.js-1.90.0.tgz", + "integrity": "sha512-p0cb/COXb8NNVSMkGMPwqQ6NvObZgUitN80uOedMB+jbYWOKOeJBuPnzhenkIV9RX0krGwyuY1Ltn5O8MGFsEw==", + "requires": { + "@babel/runtime": "^7.23.4", + "@noble/curves": "^1.2.0", + "@noble/hashes": "^1.3.2", + "@solana/buffer-layout": "^4.0.1", + "agentkeepalive": "^4.5.0", + "bigint-buffer": "^1.1.5", + "bn.js": "^5.2.1", + "borsh": "^0.7.0", + "bs58": "^4.0.1", + "buffer": "6.0.3", + "fast-stable-stringify": "^1.0.0", + "jayson": "^4.1.0", + "node-fetch": "^2.7.0", + "rpc-websockets": "^7.5.1", + "superstruct": "^0.14.2" + }, + "dependencies": { + "node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "requires": { + "whatwg-url": "^5.0.0" + } + } + } + }, + "@supercharge/promise-pool": { + "version": "2.3.2" + }, + "@types/bn.js": { + "version": "5.1.1", + "requires": { + "@types/node": "*" + } + }, + "@types/chai": { + "version": "4.2.22", + "dev": true + }, + "@types/connect": { + "version": "3.4.38", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", + "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", + "requires": { + "@types/node": "*" + } + }, + "@types/json-schema": { + "version": "7.0.9", + "dev": true, + "peer": true + }, + "@types/json5": { + "version": "0.0.29", + "dev": true + }, + "@types/mocha": { + "version": "9.0.0", + "dev": true + }, + "@types/node": { + "version": "16.11.12" + }, + "@types/pbkdf2": { + "version": "3.1.0", + "requires": { + "@types/node": "*" + } + }, + "@types/secp256k1": { + "version": "4.0.3", + "requires": { + "@types/node": "*" + } + }, + "@types/ws": { + "version": "7.4.7", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-7.4.7.tgz", + "integrity": "sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==", + "requires": { + "@types/node": "*" + } + }, + "@typescript-eslint/eslint-plugin": { + "version": "4.33.0", + "dev": true, + "peer": true, + "requires": { + "@typescript-eslint/experimental-utils": "4.33.0", + "@typescript-eslint/scope-manager": "4.33.0", + "debug": "^4.3.1", + "functional-red-black-tree": "^1.0.1", + "ignore": "^5.1.8", + "regexpp": "^3.1.0", + "semver": "^7.3.5", + "tsutils": "^3.21.0" + }, + "dependencies": { + "ignore": { + "version": "5.2.0", + "dev": true, + "peer": true + } + } + }, + "@typescript-eslint/experimental-utils": { + "version": "4.33.0", + "dev": true, + "peer": true, + "requires": { + "@types/json-schema": "^7.0.7", + "@typescript-eslint/scope-manager": "4.33.0", + "@typescript-eslint/types": "4.33.0", + "@typescript-eslint/typescript-estree": "4.33.0", + "eslint-scope": "^5.1.1", + "eslint-utils": "^3.0.0" + }, + "dependencies": { + "eslint-utils": { + "version": "3.0.0", + "dev": true, + "peer": true, + "requires": { + "eslint-visitor-keys": "^2.0.0" + } + } + } + }, + "@typescript-eslint/parser": { + "version": "4.33.0", + "dev": true, + "requires": { + "@typescript-eslint/scope-manager": "4.33.0", + "@typescript-eslint/types": "4.33.0", + "@typescript-eslint/typescript-estree": "4.33.0", + "debug": "^4.3.1" + } + }, + "@typescript-eslint/scope-manager": { + "version": "4.33.0", + "dev": true, + "requires": { + "@typescript-eslint/types": "4.33.0", + "@typescript-eslint/visitor-keys": "4.33.0" + } + }, + "@typescript-eslint/types": { + "version": "4.33.0", + "dev": true + }, + "@typescript-eslint/typescript-estree": { + "version": "4.33.0", + "dev": true, + "requires": { + "@typescript-eslint/types": "4.33.0", + "@typescript-eslint/visitor-keys": "4.33.0", + "debug": "^4.3.1", + "globby": "^11.0.3", + "is-glob": "^4.0.1", + "semver": "^7.3.5", + "tsutils": "^3.21.0" + } + }, + "@typescript-eslint/visitor-keys": { + "version": "4.33.0", + "dev": true, + "requires": { + "@typescript-eslint/types": "4.33.0", + "eslint-visitor-keys": "^2.0.0" + } + }, + "@ungap/promise-all-settled": { + "version": "1.1.2", + "dev": true + }, + "abort-controller": { + "version": "3.0.0", + "requires": { + "event-target-shim": "^5.0.0" + } + }, + "acorn": { + "version": "7.4.1", + "dev": true, + "peer": true + }, + "acorn-jsx": { + "version": "5.3.2", + "dev": true, + "peer": true, + "requires": {} + }, + "aes-js": { + "version": "3.0.0" + }, + "agentkeepalive": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.5.0.tgz", + "integrity": "sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew==", + "requires": { + "humanize-ms": "^1.2.1" + } + }, + "ajv": { + "version": "6.12.6", + "dev": true, + "peer": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "algo-msgpack-with-bigint": { + "version": "2.1.1" + }, + "algosdk": { + "version": "1.22.0", + "requires": { + "algo-msgpack-with-bigint": "^2.1.1", + "buffer": "^6.0.2", + "fsevents": "2.1.2", + "hi-base32": "^0.5.1", + "js-sha256": "^0.9.0", + "js-sha3": "^0.8.0", + "js-sha512": "^0.8.0", + "json-bigint": "^1.0.0", + "superagent": "^6.1.0", + "tweetnacl": "^1.0.3", + "vlq": "^2.0.4" + }, + "dependencies": { + "fsevents": { + "version": "2.1.2", + "optional": true + } + } + }, + "ansi-colors": { + "version": "4.1.1", + "dev": true + }, + "ansi-escapes": { + "version": "4.3.2", + "requires": { + "type-fest": "^0.21.3" + }, + "dependencies": { + "type-fest": { + "version": "0.21.3" + } + } + }, + "ansi-regex": { + "version": "5.0.1" + }, + "ansi-styles": { + "version": "4.3.0", + "requires": { + "color-convert": "^2.0.1" + } + }, + "ansicolors": { + "version": "0.3.2" + }, + "anymatch": { + "version": "3.1.2", + "dev": true, + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, + "arbundles": { + "version": "0.6.21", + "requires": { + "@noble/ed25519": "^1.6.1", + "@randlabs/myalgo-connect": "^1.1.2", + "@solana/wallet-adapter-base": "^0.9.2", + "algosdk": "^1.13.1", + "arweave": "^1.11.4", + "arweave-stream-tx": "^1.1.0", + "avsc": "https://github.com/Bundlr-Network/avsc#csp-fixes", + "axios": "^0.21.3", + "base64url": "^3.0.1", + "bs58": "^4.0.1", + "ethers": "^5.5.1", + "keccak": "^3.0.2", + "multistream": "^4.1.0", + "process": "^0.11.10", + "secp256k1": "^4.0.2", + "tmp-promise": "^3.0.2" + }, + "dependencies": { + "axios": { + "version": "0.21.4", + "requires": { + "follow-redirects": "^1.14.0" + } + } + } + }, + "arconnect": { + "version": "0.4.2", + "requires": { + "arweave": "^1.10.13" + } + }, + "arg": { + "version": "5.0.2" + }, + "argparse": { + "version": "1.0.10", + "dev": true, + "peer": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "array-includes": { + "version": "3.1.4", + "dev": true, + "peer": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.1", + "get-intrinsic": "^1.1.1", + "is-string": "^1.0.7" + } + }, + "array-union": { + "version": "2.1.0", + "dev": true + }, + "array.prototype.flat": { + "version": "1.2.5", + "dev": true, + "peer": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.0" + } + }, + "arrify": { + "version": "1.0.1", + "dev": true + }, + "arweave": { + "version": "1.11.6", + "requires": { + "arconnect": "^0.4.2", + "asn1.js": "^5.4.1", + "axios": "^0.27.2", + "base64-js": "^1.5.1", + "bignumber.js": "^9.0.2", + "util": "^0.12.4" + }, + "dependencies": { + "axios": { + "version": "0.27.2", + "requires": { + "follow-redirects": "^1.14.9", + "form-data": "^4.0.0" + } + }, + "form-data": { + "version": "4.0.0", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + } + } + }, + "arweave-stream-tx": { + "version": "1.1.0", + "requires": { + "exponential-backoff": "^3.1.0", + "stream-chunker": "^1.2.8" + } + }, + "asn1.js": { + "version": "5.4.1", + "requires": { + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "safer-buffer": "^2.1.0" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0" + } + } + }, + "assertion-error": { + "version": "1.1.0", + "dev": true + }, + "astral-regex": { + "version": "2.0.0", + "dev": true, + "peer": true + }, + "async-retry": { + "version": "1.3.3", + "requires": { + "retry": "0.13.1" + } + }, + "asynckit": { + "version": "0.4.0" + }, + "available-typed-arrays": { + "version": "1.0.5" + }, + "avsc": { + "version": "git+ssh://git@github.com/Bundlr-Network/avsc.git#a730cc8018b79e114b6a3381bbb57760a24c6cef", + "from": "avsc@https://github.com/Bundlr-Network/avsc#csp-fixes" + }, + "axios": { + "version": "0.25.0", + "requires": { + "follow-redirects": "^1.14.7" + } + }, + "balanced-match": { + "version": "1.0.2" + }, + "base-x": { + "version": "3.0.9", + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "base64-js": { + "version": "1.5.1" + }, + "base64url": { + "version": "3.0.1" + }, + "bech32": { + "version": "1.1.4" + }, + "bigint-buffer": { + "version": "1.1.5", + "requires": { + "bindings": "^1.3.0" + } + }, + "bignumber.js": { + "version": "9.1.0" + }, + "binary-extensions": { + "version": "2.2.0", + "dev": true + }, + "bindings": { + "version": "1.5.0", + "requires": { + "file-uri-to-path": "1.0.0" + } + }, + "bip39": { + "version": "3.0.2", + "requires": { + "@types/node": "11.11.6", + "create-hash": "^1.1.0", + "pbkdf2": "^3.0.9", + "randombytes": "^2.0.1" + }, + "dependencies": { + "@types/node": { + "version": "11.11.6" + } + } + }, + "bip39-light": { + "version": "1.0.7", + "requires": { + "create-hash": "^1.1.0", + "pbkdf2": "^3.0.9" + } + }, + "bl": { + "version": "4.1.0", + "requires": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + }, + "dependencies": { + "buffer": { + "version": "5.7.1", + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + } + } + }, + "blakejs": { + "version": "1.2.1" + }, + "bluebird": { + "version": "3.7.2" + }, + "bn.js": { + "version": "5.2.1" + }, + "borsh": { + "version": "0.7.0", + "requires": { + "bn.js": "^5.2.0", + "bs58": "^4.0.0", + "text-encoding-utf-8": "^1.0.2" + } + }, + "brace-expansion": { + "version": "1.1.11", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "3.0.2", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "brorand": { + "version": "1.1.0" + }, + "browser-stdout": { + "version": "1.3.1", + "dev": true + }, + "browserify-aes": { + "version": "1.2.0", + "requires": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "bs58": { + "version": "4.0.1", + "requires": { + "base-x": "^3.0.2" + } + }, + "bs58check": { + "version": "2.1.2", + "requires": { + "bs58": "^4.0.0", + "create-hash": "^1.1.0", + "safe-buffer": "^5.1.2" + } + }, + "buffer": { + "version": "6.0.3", + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "buffer-from": { + "version": "1.1.2", + "dev": true + }, + "buffer-layout": { + "version": "1.2.2" + }, + "buffer-reverse": { + "version": "1.0.1" + }, + "buffer-xor": { + "version": "1.0.3" + }, + "bufferutil": { + "version": "4.0.5", + "optional": true, + "requires": { + "node-gyp-build": "^4.3.0" + } + }, + "call-bind": { + "version": "1.0.2", + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "callsites": { + "version": "3.1.0", + "dev": true, + "peer": true + }, + "camelcase": { + "version": "5.3.1" + }, + "capability": { + "version": "0.2.5" + }, + "chai": { + "version": "4.3.4", + "dev": true, + "requires": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.2", + "deep-eql": "^3.0.1", + "get-func-name": "^2.0.0", + "pathval": "^1.1.1", + "type-detect": "^4.0.5" + } + }, + "chalk": { + "version": "4.1.2", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "chardet": { + "version": "0.7.0" + }, + "check-error": { + "version": "1.0.2", + "dev": true + }, + "check-more-types": { + "version": "2.24.0" + }, + "chokidar": { + "version": "3.5.3", + "dev": true, + "requires": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "fsevents": "~2.3.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + } + }, + "cipher-base": { + "version": "1.0.4", + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "cli-cursor": { + "version": "3.1.0", + "requires": { + "restore-cursor": "^3.1.0" + } + }, + "cli-spinners": { + "version": "2.7.0" + }, + "cli-width": { + "version": "3.0.0" + }, + "cliui": { + "version": "7.0.4", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "clone": { + "version": "1.0.4" + }, + "color-convert": { + "version": "2.0.1", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4" + }, + "combined-stream": { + "version": "1.0.8", + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + }, + "component-emitter": { + "version": "1.3.0" + }, + "concat-map": { + "version": "0.0.1" + }, + "cookiejar": { + "version": "2.1.3" + }, + "core-util-is": { + "version": "1.0.3" + }, + "create-hash": { + "version": "1.2.0", + "requires": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "create-hmac": { + "version": "1.1.7", + "requires": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "cross-fetch": { + "version": "3.1.5", + "requires": { + "node-fetch": "2.6.7" + } + }, + "cross-spawn": { + "version": "7.0.3", + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "crypto-hash": { + "version": "1.3.0" + }, + "crypto-js": { + "version": "3.3.0" + }, + "csv": { + "version": "6.2.1", + "requires": { + "csv-generate": "^4.2.0", + "csv-parse": "^5.3.1", + "csv-stringify": "^6.2.0", + "stream-transform": "^3.2.0" + } + }, + "csv-generate": { + "version": "4.2.0" + }, + "csv-parse": { + "version": "5.3.1" + }, + "csv-stringify": { + "version": "6.2.0" + }, + "debug": { + "version": "4.3.3", + "requires": { + "ms": "2.1.2" + } + }, + "decamelize": { + "version": "4.0.0", + "dev": true + }, + "deep-eql": { + "version": "3.0.1", + "dev": true, + "requires": { + "type-detect": "^4.0.0" + } + }, + "deep-is": { + "version": "0.1.4", + "dev": true, + "peer": true + }, + "defaults": { + "version": "1.0.4", + "requires": { + "clone": "^1.0.2" + } + }, + "define-properties": { + "version": "1.1.4", + "requires": { + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + } + }, + "delay": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/delay/-/delay-5.0.0.tgz", + "integrity": "sha512-ReEBKkIfe4ya47wlPYf/gu5ib6yUG0/Aez0JQZQz94kiWtRQvZIQbTiehsnwHvLSWJnQdhVeqYue7Id1dKr0qw==" + }, + "delayed-stream": { + "version": "1.0.0" + }, + "depd": { + "version": "2.0.0" + }, + "diff": { + "version": "5.0.0", + "dev": true + }, + "dir-glob": { + "version": "3.0.1", + "dev": true, + "requires": { + "path-type": "^4.0.0" + } + }, + "doctrine": { + "version": "3.0.0", + "dev": true, + "peer": true, + "requires": { + "esutils": "^2.0.2" + } + }, + "dot-case": { + "version": "3.0.4", + "requires": { + "no-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, + "dotenv": { + "version": "10.0.0" + }, + "duplexer": { + "version": "0.1.2" + }, + "elliptic": { + "version": "6.5.4", + "requires": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0" + } + } + }, + "emoji-regex": { + "version": "8.0.0" + }, + "enquirer": { + "version": "2.3.6", + "dev": true, + "peer": true, + "requires": { + "ansi-colors": "^4.1.1" + } + }, + "error-polyfill": { + "version": "0.1.3", + "requires": { + "capability": "^0.2.5", + "o3": "^1.0.3", + "u3": "^0.1.1" + } + }, + "es-abstract": { + "version": "1.20.4", + "requires": { + "call-bind": "^1.0.2", + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "function.prototype.name": "^1.1.5", + "get-intrinsic": "^1.1.3", + "get-symbol-description": "^1.0.0", + "has": "^1.0.3", + "has-property-descriptors": "^1.0.0", + "has-symbols": "^1.0.3", + "internal-slot": "^1.0.3", + "is-callable": "^1.2.7", + "is-negative-zero": "^2.0.2", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "is-string": "^1.0.7", + "is-weakref": "^1.0.2", + "object-inspect": "^1.12.2", + "object-keys": "^1.1.1", + "object.assign": "^4.1.4", + "regexp.prototype.flags": "^1.4.3", + "safe-regex-test": "^1.0.0", + "string.prototype.trimend": "^1.0.5", + "string.prototype.trimstart": "^1.0.5", + "unbox-primitive": "^1.0.2" + } + }, + "es-to-primitive": { + "version": "1.2.1", + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, + "es6-promise": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", + "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==" + }, + "es6-promisify": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", + "integrity": "sha512-C+d6UdsYDk0lMebHNR4S2NybQMMngAOnOwYBQjTOiv0MkoJMP0Myw2mgpDLBcpfCmRLxyFqYhS/CfOENq4SJhQ==", + "requires": { + "es6-promise": "^4.0.3" + } + }, + "escalade": { + "version": "3.1.1", + "dev": true + }, + "escape-string-regexp": { + "version": "4.0.0", + "dev": true + }, + "eslint": { + "version": "7.32.0", + "dev": true, + "peer": true, + "requires": { + "@babel/code-frame": "7.12.11", + "@eslint/eslintrc": "^0.4.3", + "@humanwhocodes/config-array": "^0.5.0", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "enquirer": "^2.3.5", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^5.1.1", + "eslint-utils": "^2.1.0", + "eslint-visitor-keys": "^2.0.0", + "espree": "^7.3.1", + "esquery": "^1.4.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^5.1.2", + "globals": "^13.6.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "js-yaml": "^3.13.1", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.0.4", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "progress": "^2.0.0", + "regexpp": "^3.1.0", + "semver": "^7.2.1", + "strip-ansi": "^6.0.0", + "strip-json-comments": "^3.1.0", + "table": "^6.0.9", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + } + }, + "eslint-config-standard": { + "version": "16.0.3", + "dev": true, + "requires": {} + }, + "eslint-config-standard-with-typescript": { + "version": "21.0.1", + "dev": true, + "requires": { + "@typescript-eslint/parser": "^4.0.0", + "eslint-config-standard": "^16.0.0" + } + }, + "eslint-import-resolver-node": { + "version": "0.3.6", + "dev": true, + "peer": true, + "requires": { + "debug": "^3.2.7", + "resolve": "^1.20.0" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "dev": true, + "peer": true, + "requires": { + "ms": "^2.1.1" + } + } + } + }, + "eslint-module-utils": { + "version": "2.7.1", + "dev": true, + "peer": true, + "requires": { + "debug": "^3.2.7", + "find-up": "^2.1.0", + "pkg-dir": "^2.0.0" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "dev": true, + "peer": true, + "requires": { + "ms": "^2.1.1" + } + } + } + }, + "eslint-plugin-es": { + "version": "3.0.1", + "dev": true, + "peer": true, + "requires": { + "eslint-utils": "^2.0.0", + "regexpp": "^3.0.0" + } + }, + "eslint-plugin-import": { + "version": "2.25.3", + "dev": true, + "peer": true, + "requires": { + "array-includes": "^3.1.4", + "array.prototype.flat": "^1.2.5", + "debug": "^2.6.9", + "doctrine": "^2.1.0", + "eslint-import-resolver-node": "^0.3.6", + "eslint-module-utils": "^2.7.1", + "has": "^1.0.3", + "is-core-module": "^2.8.0", + "is-glob": "^4.0.3", + "minimatch": "^3.0.4", + "object.values": "^1.1.5", + "resolve": "^1.20.0", + "tsconfig-paths": "^3.11.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "dev": true, + "peer": true, + "requires": { + "ms": "2.0.0" + } + }, + "doctrine": { + "version": "2.1.0", + "dev": true, + "peer": true, + "requires": { + "esutils": "^2.0.2" + } + }, + "ms": { + "version": "2.0.0", + "dev": true, + "peer": true + } + } + }, + "eslint-plugin-node": { + "version": "11.1.0", + "dev": true, + "peer": true, + "requires": { + "eslint-plugin-es": "^3.0.0", + "eslint-utils": "^2.0.0", + "ignore": "^5.1.1", + "minimatch": "^3.0.4", + "resolve": "^1.10.1", + "semver": "^6.1.0" + }, + "dependencies": { + "ignore": { + "version": "5.1.9", + "dev": true, + "peer": true + }, + "semver": { + "version": "6.3.0", + "dev": true, + "peer": true + } + } + }, + "eslint-plugin-prettier": { + "version": "4.0.0", + "dev": true, + "requires": { + "prettier-linter-helpers": "^1.0.0" + } + }, + "eslint-plugin-promise": { + "version": "5.2.0", + "dev": true, + "peer": true, + "requires": {} + }, + "eslint-scope": { + "version": "5.1.1", + "dev": true, + "peer": true, + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + } + }, + "eslint-utils": { + "version": "2.1.0", + "dev": true, + "peer": true, + "requires": { + "eslint-visitor-keys": "^1.1.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "1.3.0", + "dev": true, + "peer": true + } + } + }, + "eslint-visitor-keys": { + "version": "2.1.0", + "dev": true + }, + "espree": { + "version": "7.3.1", + "dev": true, + "peer": true, + "requires": { + "acorn": "^7.4.0", + "acorn-jsx": "^5.3.1", + "eslint-visitor-keys": "^1.3.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "1.3.0", + "dev": true, + "peer": true + } + } + }, + "esprima": { + "version": "4.0.1", + "dev": true, + "peer": true + }, + "esquery": { + "version": "1.4.0", + "dev": true, + "peer": true, + "requires": { + "estraverse": "^5.1.0" + }, + "dependencies": { + "estraverse": { + "version": "5.3.0", + "dev": true, + "peer": true + } + } + }, + "esrecurse": { + "version": "4.3.0", + "dev": true, + "peer": true, + "requires": { + "estraverse": "^5.2.0" + }, + "dependencies": { + "estraverse": { + "version": "5.3.0", + "dev": true, + "peer": true + } + } + }, + "estraverse": { + "version": "4.3.0", + "dev": true, + "peer": true + }, + "esutils": { + "version": "2.0.3", + "dev": true, + "peer": true + }, + "ethereum-bloom-filters": { + "version": "1.0.10", + "requires": { + "js-sha3": "^0.8.0" + } + }, + "ethereum-cryptography": { + "version": "0.1.3", + "requires": { + "@types/pbkdf2": "^3.0.0", + "@types/secp256k1": "^4.0.1", + "blakejs": "^1.1.0", + "browserify-aes": "^1.2.0", + "bs58check": "^2.1.2", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "hash.js": "^1.1.7", + "keccak": "^3.0.0", + "pbkdf2": "^3.0.17", + "randombytes": "^2.1.0", + "safe-buffer": "^5.1.2", + "scrypt-js": "^3.0.0", + "secp256k1": "^4.0.1", + "setimmediate": "^1.0.5" + } + }, + "ethereumjs-util": { + "version": "7.1.5", + "requires": { + "@types/bn.js": "^5.1.0", + "bn.js": "^5.1.2", + "create-hash": "^1.1.2", + "ethereum-cryptography": "^0.1.3", + "rlp": "^2.2.4" + } + }, + "ethers": { + "version": "5.7.1", + "requires": { + "@ethersproject/abi": "5.7.0", + "@ethersproject/abstract-provider": "5.7.0", + "@ethersproject/abstract-signer": "5.7.0", + "@ethersproject/address": "5.7.0", + "@ethersproject/base64": "5.7.0", + "@ethersproject/basex": "5.7.0", + "@ethersproject/bignumber": "5.7.0", + "@ethersproject/bytes": "5.7.0", + "@ethersproject/constants": "5.7.0", + "@ethersproject/contracts": "5.7.0", + "@ethersproject/hash": "5.7.0", + "@ethersproject/hdnode": "5.7.0", + "@ethersproject/json-wallets": "5.7.0", + "@ethersproject/keccak256": "5.7.0", + "@ethersproject/logger": "5.7.0", + "@ethersproject/networks": "5.7.1", + "@ethersproject/pbkdf2": "5.7.0", + "@ethersproject/properties": "5.7.0", + "@ethersproject/providers": "5.7.1", + "@ethersproject/random": "5.7.0", + "@ethersproject/rlp": "5.7.0", + "@ethersproject/sha2": "5.7.0", + "@ethersproject/signing-key": "5.7.0", + "@ethersproject/solidity": "5.7.0", + "@ethersproject/strings": "5.7.0", + "@ethersproject/transactions": "5.7.0", + "@ethersproject/units": "5.7.0", + "@ethersproject/wallet": "5.7.0", + "@ethersproject/web": "5.7.1", + "@ethersproject/wordlists": "5.7.0" + } + }, + "ethjs-unit": { + "version": "0.1.6", + "requires": { + "bn.js": "4.11.6", + "number-to-bn": "1.7.0" + }, + "dependencies": { + "bn.js": { + "version": "4.11.6" + } + } + }, + "event-stream": { + "version": "3.3.4", + "requires": { + "duplexer": "~0.1.1", + "from": "~0", + "map-stream": "~0.1.0", + "pause-stream": "0.0.11", + "split": "0.3", + "stream-combiner": "~0.0.4", + "through": "~2.3.1" + } + }, + "event-target-shim": { + "version": "5.0.1" + }, + "eventemitter3": { + "version": "4.0.7" + }, + "evp_bytestokey": { + "version": "1.0.3", + "requires": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, + "execa": { + "version": "5.1.1", + "requires": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + } + }, + "exponential-backoff": { + "version": "3.1.0" + }, + "external-editor": { + "version": "3.1.0", + "requires": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + } + }, + "eyes": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz", + "integrity": "sha512-GipyPsXO1anza0AOZdy69Im7hGFCNB7Y/NGjDlZGJ3GJJLtwNSb2vrzYrTYJRrRloVx7pl+bhUaTB8yiccPvFQ==" + }, + "fast-deep-equal": { + "version": "3.1.3", + "dev": true, + "peer": true + }, + "fast-diff": { + "version": "1.2.0", + "dev": true + }, + "fast-glob": { + "version": "3.2.7", + "dev": true, + "requires": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + } + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "dev": true, + "peer": true + }, + "fast-levenshtein": { + "version": "2.0.6", + "dev": true, + "peer": true + }, + "fast-safe-stringify": { + "version": "2.1.1" + }, + "fast-stable-stringify": { + "version": "1.0.0" + }, + "fastestsmallesttextencoderdecoder": { + "version": "1.0.22", + "resolved": "https://registry.npmjs.org/fastestsmallesttextencoderdecoder/-/fastestsmallesttextencoderdecoder-1.0.22.tgz", + "integrity": "sha512-Pb8d48e+oIuY4MaM64Cd7OW1gt4nxCHs7/ddPPZ/Ic3sg8yVGM7O9wDvZ7us6ScaUupzM+pfBolwtYhN1IxBIw==", + "peer": true + }, + "fastq": { + "version": "1.13.0", + "dev": true, + "requires": { + "reusify": "^1.0.4" + } + }, + "figures": { + "version": "3.2.0", + "requires": { + "escape-string-regexp": "^1.0.5" + }, + "dependencies": { + "escape-string-regexp": { + "version": "1.0.5" + } + } + }, + "file-entry-cache": { + "version": "6.0.1", + "dev": true, + "peer": true, + "requires": { + "flat-cache": "^3.0.4" + } + }, + "file-uri-to-path": { + "version": "1.0.0" + }, + "fill-range": { + "version": "7.0.1", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "find": { + "version": "0.3.0", + "requires": { + "traverse-chain": "~0.1.0" + } + }, + "find-up": { + "version": "2.1.0", + "dev": true, + "peer": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "flat": { + "version": "5.0.2", + "dev": true + }, + "flat-cache": { + "version": "3.0.4", + "dev": true, + "peer": true, + "requires": { + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + } + }, + "flatted": { + "version": "3.2.4", + "dev": true, + "peer": true + }, + "follow-redirects": { + "version": "1.15.2" + }, + "for-each": { + "version": "0.3.3", + "requires": { + "is-callable": "^1.1.3" + } + }, + "form-data": { + "version": "3.0.1", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + }, + "formidable": { + "version": "1.2.6" + }, + "from": { + "version": "0.1.7" + }, + "fs.realpath": { + "version": "1.0.0" + }, + "fsevents": { + "version": "2.3.2", + "dev": true, + "optional": true + }, + "function-bind": { + "version": "1.1.1" + }, + "function.prototype.name": { + "version": "1.1.5", + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.0", + "functions-have-names": "^1.2.2" + } + }, + "functional-red-black-tree": { + "version": "1.0.1", + "dev": true, + "peer": true + }, + "functions-have-names": { + "version": "1.2.3" + }, + "get-caller-file": { + "version": "2.0.5", + "dev": true + }, + "get-func-name": { + "version": "2.0.0", + "dev": true + }, + "get-intrinsic": { + "version": "1.1.3", + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.3" + } + }, + "get-stream": { + "version": "6.0.1" + }, + "get-symbol-description": { + "version": "1.0.0", + "requires": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" + } + }, + "glob": { + "version": "7.2.0", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-parent": { + "version": "5.1.2", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "globals": { + "version": "13.12.0", + "dev": true, + "peer": true, + "requires": { + "type-fest": "^0.20.2" + } + }, + "globby": { + "version": "11.0.4", + "dev": true, + "requires": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.1.1", + "ignore": "^5.1.4", + "merge2": "^1.3.0", + "slash": "^3.0.0" + }, + "dependencies": { + "ignore": { + "version": "5.2.0", + "dev": true + } + } + }, + "growl": { + "version": "1.10.5", + "dev": true + }, + "has": { + "version": "1.0.3", + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-bigints": { + "version": "1.0.2" + }, + "has-flag": { + "version": "4.0.0" + }, + "has-property-descriptors": { + "version": "1.0.0", + "requires": { + "get-intrinsic": "^1.1.1" + } + }, + "has-symbols": { + "version": "1.0.3" + }, + "has-tostringtag": { + "version": "1.0.0", + "requires": { + "has-symbols": "^1.0.2" + } + }, + "hash-base": { + "version": "3.1.0", + "requires": { + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + } + }, + "hash.js": { + "version": "1.1.7", + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "he": { + "version": "1.2.0", + "dev": true + }, + "hi-base32": { + "version": "0.5.1" + }, + "hmac-drbg": { + "version": "1.0.1", + "requires": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "http-errors": { + "version": "1.8.1", + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": ">= 1.5.0 < 2", + "toidentifier": "1.0.1" + }, + "dependencies": { + "depd": { + "version": "1.1.2" + } + } + }, + "human-signals": { + "version": "2.1.0" + }, + "humanize-ms": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", + "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==", + "requires": { + "ms": "^2.0.0" + } + }, + "iconv-lite": { + "version": "0.4.24", + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ieee754": { + "version": "1.2.1" + }, + "ignore": { + "version": "4.0.6", + "dev": true, + "peer": true + }, + "import-fresh": { + "version": "3.3.0", + "dev": true, + "peer": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "dev": true, + "peer": true + }, + "inflight": { + "version": "1.0.6", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4" + }, + "inquirer": { + "version": "8.2.4", + "requires": { + "ansi-escapes": "^4.2.1", + "chalk": "^4.1.1", + "cli-cursor": "^3.1.0", + "cli-width": "^3.0.0", + "external-editor": "^3.0.3", + "figures": "^3.0.0", + "lodash": "^4.17.21", + "mute-stream": "0.0.8", + "ora": "^5.4.1", + "run-async": "^2.4.0", + "rxjs": "^7.5.5", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "through": "^2.3.6", + "wrap-ansi": "^7.0.0" + } + }, + "internal-slot": { + "version": "1.0.3", + "requires": { + "get-intrinsic": "^1.1.0", + "has": "^1.0.3", + "side-channel": "^1.0.4" + } + }, + "is-arguments": { + "version": "1.1.1", + "requires": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + } + }, + "is-bigint": { + "version": "1.0.4", + "requires": { + "has-bigints": "^1.0.1" + } + }, + "is-binary-path": { + "version": "2.1.0", + "dev": true, + "requires": { + "binary-extensions": "^2.0.0" + } + }, + "is-boolean-object": { + "version": "1.1.2", + "requires": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + } + }, + "is-callable": { + "version": "1.2.7" + }, + "is-core-module": { + "version": "2.8.0", + "dev": true, + "peer": true, + "requires": { + "has": "^1.0.3" + } + }, + "is-date-object": { + "version": "1.0.5", + "requires": { + "has-tostringtag": "^1.0.0" + } + }, + "is-extglob": { + "version": "2.1.1", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0" + }, + "is-generator-function": { + "version": "1.0.10", + "requires": { + "has-tostringtag": "^1.0.0" + } + }, + "is-glob": { + "version": "4.0.3", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-hex-prefixed": { + "version": "1.0.0" + }, + "is-interactive": { + "version": "1.0.0" + }, + "is-negative-zero": { + "version": "2.0.2" + }, + "is-number": { + "version": "7.0.0", + "dev": true + }, + "is-number-object": { + "version": "1.0.7", + "requires": { + "has-tostringtag": "^1.0.0" + } + }, + "is-plain-obj": { + "version": "2.1.0", + "dev": true + }, + "is-regex": { + "version": "1.1.4", + "requires": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + } + }, + "is-shared-array-buffer": { + "version": "1.0.2", + "requires": { + "call-bind": "^1.0.2" + } + }, + "is-stream": { + "version": "2.0.1" + }, + "is-string": { + "version": "1.0.7", + "requires": { + "has-tostringtag": "^1.0.0" + } + }, + "is-symbol": { + "version": "1.0.4", + "requires": { + "has-symbols": "^1.0.2" + } + }, + "is-typed-array": { + "version": "1.1.9", + "requires": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "es-abstract": "^1.20.0", + "for-each": "^0.3.3", + "has-tostringtag": "^1.0.0" + } + }, + "is-unicode-supported": { + "version": "0.1.0" + }, + "is-weakref": { + "version": "1.0.2", + "requires": { + "call-bind": "^1.0.2" + } + }, + "isarray": { + "version": "1.0.0" + }, + "isexe": { + "version": "2.0.0" + }, + "isomorphic-ws": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz", + "integrity": "sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w==", + "requires": {} + }, + "jayson": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/jayson/-/jayson-4.1.0.tgz", + "integrity": "sha512-R6JlbyLN53Mjku329XoRT2zJAE6ZgOQ8f91ucYdMCD4nkGCF9kZSrcGXpHIU4jeKj58zUZke2p+cdQchU7Ly7A==", + "requires": { + "@types/connect": "^3.4.33", + "@types/node": "^12.12.54", + "@types/ws": "^7.4.4", + "commander": "^2.20.3", + "delay": "^5.0.0", + "es6-promisify": "^5.0.0", + "eyes": "^0.1.8", + "isomorphic-ws": "^4.0.1", + "json-stringify-safe": "^5.0.1", + "JSONStream": "^1.3.5", + "uuid": "^8.3.2", + "ws": "^7.4.5" + }, + "dependencies": { + "@types/node": { + "version": "12.20.55", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", + "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==" + } + } + }, + "joi": { + "version": "17.7.0", + "requires": { + "@hapi/hoek": "^9.0.0", + "@hapi/topo": "^5.0.0", + "@sideway/address": "^4.1.3", + "@sideway/formula": "^3.0.0", + "@sideway/pinpoint": "^2.0.0" + } + }, + "js-sha256": { + "version": "0.9.0" + }, + "js-sha3": { + "version": "0.8.0" + }, + "js-sha512": { + "version": "0.8.0" + }, + "js-tokens": { + "version": "4.0.0", + "dev": true, + "peer": true + }, + "js-yaml": { + "version": "3.14.1", + "dev": true, + "peer": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "json-bigint": { + "version": "1.0.0", + "requires": { + "bignumber.js": "^9.0.0" + } + }, + "json-schema-traverse": { + "version": "0.4.1", + "dev": true, + "peer": true + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "dev": true, + "peer": true + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==" + }, + "json5": { + "version": "1.0.1", + "dev": true, + "requires": { + "minimist": "^1.2.0" + } + }, + "jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==" + }, + "JSONStream": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", + "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", + "requires": { + "jsonparse": "^1.2.0", + "through": ">=2.2.7 <3" + } + }, + "keccak": { + "version": "3.0.2", + "requires": { + "node-addon-api": "^2.0.0", + "node-gyp-build": "^4.2.0", + "readable-stream": "^3.6.0" + } + }, + "lazy-ass": { + "version": "1.6.0" + }, + "levn": { + "version": "0.4.1", + "dev": true, + "peer": true, + "requires": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + } + }, + "locate-path": { + "version": "2.0.0", + "dev": true, + "peer": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "lodash": { + "version": "4.17.21" + }, + "lodash.clonedeep": { + "version": "4.5.0" + }, + "lodash.isequal": { + "version": "4.5.0" + }, + "lodash.merge": { + "version": "4.6.2", + "dev": true, + "peer": true + }, + "lodash.truncate": { + "version": "4.4.2", + "dev": true, + "peer": true + }, + "log-symbols": { + "version": "4.1.0", + "requires": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + } + }, + "lower-case": { + "version": "2.0.2", + "requires": { + "tslib": "^2.0.3" + } + }, + "lru-cache": { + "version": "6.0.0", + "requires": { + "yallist": "^4.0.0" + } + }, + "make-error": { + "version": "1.3.6", + "dev": true + }, + "map-stream": { + "version": "0.1.0" + }, + "md5.js": { + "version": "1.3.5", + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "merge-stream": { + "version": "2.0.0" + }, + "merge2": { + "version": "1.4.1", + "dev": true + }, + "merkletreejs": { + "version": "0.2.32", + "requires": { + "bignumber.js": "^9.0.1", + "buffer-reverse": "^1.0.1", + "crypto-js": "^3.1.9-1", + "treeify": "^1.1.0", + "web3-utils": "^1.3.4" + } + }, + "methods": { + "version": "1.1.2" + }, + "micromatch": { + "version": "4.0.4", + "dev": true, + "requires": { + "braces": "^3.0.1", + "picomatch": "^2.2.3" + } + }, + "mime": { + "version": "3.0.0" + }, + "mime-db": { + "version": "1.52.0" + }, + "mime-types": { + "version": "2.1.35", + "requires": { + "mime-db": "1.52.0" + } + }, + "mimic-fn": { + "version": "2.1.0" + }, + "minimalistic-assert": { + "version": "1.0.1" + }, + "minimalistic-crypto-utils": { + "version": "1.0.1" + }, + "minimatch": { + "version": "3.0.4", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.6" + }, + "mkdirp": { + "version": "0.5.5", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "mocha": { + "version": "9.2.2", + "dev": true, + "requires": { + "@ungap/promise-all-settled": "1.1.2", + "ansi-colors": "4.1.1", + "browser-stdout": "1.3.1", + "chokidar": "3.5.3", + "debug": "4.3.3", + "diff": "5.0.0", + "escape-string-regexp": "4.0.0", + "find-up": "5.0.0", + "glob": "7.2.0", + "growl": "1.10.5", + "he": "1.2.0", + "js-yaml": "4.1.0", + "log-symbols": "4.1.0", + "minimatch": "4.2.1", + "ms": "2.1.3", + "nanoid": "3.3.1", + "serialize-javascript": "6.0.0", + "strip-json-comments": "3.1.1", + "supports-color": "8.1.1", + "which": "2.0.2", + "workerpool": "6.2.0", + "yargs": "16.2.0", + "yargs-parser": "20.2.4", + "yargs-unparser": "2.0.0" + }, + "dependencies": { + "argparse": { + "version": "2.0.1", + "dev": true + }, + "find-up": { + "version": "5.0.0", + "dev": true, + "requires": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + } + }, + "js-yaml": { + "version": "4.1.0", + "dev": true, + "requires": { + "argparse": "^2.0.1" + } + }, + "locate-path": { + "version": "6.0.0", + "dev": true, + "requires": { + "p-locate": "^5.0.0" + } + }, + "minimatch": { + "version": "4.2.1", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "ms": { + "version": "2.1.3", + "dev": true + }, + "p-limit": { + "version": "3.1.0", + "dev": true, + "requires": { + "yocto-queue": "^0.1.0" + } + }, + "p-locate": { + "version": "5.0.0", + "dev": true, + "requires": { + "p-limit": "^3.0.2" + } + }, + "path-exists": { + "version": "4.0.0", + "dev": true + }, + "supports-color": { + "version": "8.1.1", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "ms": { + "version": "2.1.2" + }, + "multistream": { + "version": "4.1.0", + "requires": { + "once": "^1.4.0", + "readable-stream": "^3.6.0" + } + }, + "mustache": { + "version": "4.2.0" + }, + "mute-stream": { + "version": "0.0.8" + }, + "nanoid": { + "version": "3.3.1", + "dev": true + }, + "natural-compare": { + "version": "1.4.0", + "dev": true, + "peer": true + }, + "near-api-js": { + "version": "0.44.2", + "requires": { + "bn.js": "5.2.0", + "borsh": "^0.6.0", + "bs58": "^4.0.0", + "depd": "^2.0.0", + "error-polyfill": "^0.1.3", + "http-errors": "^1.7.2", + "js-sha256": "^0.9.0", + "mustache": "^4.0.0", + "node-fetch": "^2.6.1", + "text-encoding-utf-8": "^1.0.2", + "tweetnacl": "^1.0.1" + }, + "dependencies": { + "bn.js": { + "version": "5.2.0" + }, + "borsh": { + "version": "0.6.0", + "requires": { + "bn.js": "^5.2.0", + "bs58": "^4.0.0", + "text-encoding-utf-8": "^1.0.2" + } + } + } + }, + "near-hd-key": { + "version": "1.2.1", + "requires": { + "bip39": "3.0.2", + "create-hmac": "1.1.7", + "tweetnacl": "1.0.3" + } + }, + "near-seed-phrase": { + "version": "0.2.0", + "requires": { + "bip39-light": "^1.0.7", + "bs58": "^4.0.1", + "near-hd-key": "^1.2.1", + "tweetnacl": "^1.0.2" + } + }, + "no-case": { + "version": "3.0.4", + "requires": { + "lower-case": "^2.0.2", + "tslib": "^2.0.3" + } + }, + "node-addon-api": { + "version": "2.0.2" + }, + "node-fetch": { + "version": "2.6.7", + "requires": { + "whatwg-url": "^5.0.0" + } + }, + "node-gyp-build": { + "version": "4.3.0" + }, + "normalize-path": { + "version": "3.0.0", + "dev": true + }, + "npm-run-path": { + "version": "4.0.1", + "requires": { + "path-key": "^3.0.0" + } + }, + "number-to-bn": { + "version": "1.7.0", + "requires": { + "bn.js": "4.11.6", + "strip-hex-prefix": "1.0.0" + }, + "dependencies": { + "bn.js": { + "version": "4.11.6" + } + } + }, + "o3": { + "version": "1.0.3", + "requires": { + "capability": "^0.2.5" + } + }, + "object-inspect": { + "version": "1.12.2" + }, + "object-keys": { + "version": "1.1.1" + }, + "object.assign": { + "version": "4.1.4", + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + } + }, + "object.values": { + "version": "1.1.5", + "dev": true, + "peer": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.1" + } + }, + "old-mpl-token-metadata": { + "version": "npm:@metaplex-foundation/mpl-token-metadata@2.12.0", + "resolved": "https://registry.npmjs.org/@metaplex-foundation/mpl-token-metadata/-/mpl-token-metadata-2.12.0.tgz", + "integrity": "sha512-DetC2F5MwMRt4TmLXwj8PJ8nClRYGMecSQ4pr9iKKa+rWertHgKoJHl2XhheRa084GtL7i0ssOKbX2gfYFosuQ==", + "requires": { + "@metaplex-foundation/beet": "^0.7.1", + "@metaplex-foundation/beet-solana": "^0.4.0", + "@metaplex-foundation/cusper": "^0.0.2", + "@solana/spl-token": "^0.3.6", + "@solana/web3.js": "^1.66.2", + "bn.js": "^5.2.0", + "debug": "^4.3.4" + }, + "dependencies": { + "@metaplex-foundation/beet-solana": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@metaplex-foundation/beet-solana/-/beet-solana-0.4.1.tgz", + "integrity": "sha512-/6o32FNUtwK8tjhotrvU/vorP7umBuRFvBZrC6XCk51aKidBHe5LPVPA5AjGPbV3oftMfRuXPNd9yAGeEqeCDQ==", + "requires": { + "@metaplex-foundation/beet": ">=0.1.0", + "@solana/web3.js": "^1.56.2", + "bs58": "^5.0.0", + "debug": "^4.3.4" + } + }, + "base-x": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-4.0.0.tgz", + "integrity": "sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw==" + }, + "bs58": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-5.0.0.tgz", + "integrity": "sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ==", + "requires": { + "base-x": "^4.0.0" + } + }, + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "requires": { + "ms": "2.1.2" + } + } + } + }, + "once": { + "version": "1.4.0", + "requires": { + "wrappy": "1" + } + }, + "onetime": { + "version": "5.1.2", + "requires": { + "mimic-fn": "^2.1.0" + } + }, + "optionator": { + "version": "0.9.1", + "dev": true, + "peer": true, + "requires": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" + } + }, + "ora": { + "version": "5.4.1", + "requires": { + "bl": "^4.1.0", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-spinners": "^2.5.0", + "is-interactive": "^1.0.0", + "is-unicode-supported": "^0.1.0", + "log-symbols": "^4.1.0", + "strip-ansi": "^6.0.0", + "wcwidth": "^1.0.1" + } + }, + "os-tmpdir": { + "version": "1.0.2" + }, + "p-limit": { + "version": "1.3.0", + "dev": true, + "peer": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "dev": true, + "peer": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "dev": true, + "peer": true + }, + "pako": { + "version": "2.0.4" + }, + "parent-module": { + "version": "1.0.1", + "dev": true, + "peer": true, + "requires": { + "callsites": "^3.0.0" + } + }, + "path-exists": { + "version": "3.0.0", + "dev": true, + "peer": true + }, + "path-is-absolute": { + "version": "1.0.1" + }, + "path-key": { + "version": "3.1.1" + }, + "path-parse": { + "version": "1.0.7", + "dev": true, + "peer": true + }, + "path-type": { + "version": "4.0.0", + "dev": true + }, + "pathval": { + "version": "1.1.1", + "dev": true + }, + "pause-stream": { + "version": "0.0.11", + "requires": { + "through": "~2.3" + } + }, + "pbkdf2": { + "version": "3.1.2", + "requires": { + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "picomatch": { + "version": "2.3.0", + "dev": true + }, + "pkg-dir": { + "version": "2.0.0", + "dev": true, + "peer": true, + "requires": { + "find-up": "^2.1.0" + } + }, + "prelude-ls": { + "version": "1.2.1", + "dev": true, + "peer": true + }, + "prettier": { + "version": "2.5.1" + }, + "prettier-linter-helpers": { + "version": "1.0.0", + "dev": true, + "requires": { + "fast-diff": "^1.1.2" + } + }, + "process": { + "version": "0.11.10" + }, + "process-nextick-args": { + "version": "2.0.1" + }, + "progress": { + "version": "2.0.3", + "dev": true, + "peer": true + }, + "ps-tree": { + "version": "1.2.0", + "requires": { + "event-stream": "=3.3.4" + } + }, + "punycode": { + "version": "2.1.1", + "dev": true, + "peer": true + }, + "qs": { + "version": "6.11.0", + "requires": { + "side-channel": "^1.0.4" + } + }, + "queue-microtask": { + "version": "1.2.3", + "dev": true + }, + "randombytes": { + "version": "2.1.0", + "requires": { + "safe-buffer": "^5.1.0" + } + }, + "readable-stream": { + "version": "3.6.0", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "readdirp": { + "version": "3.6.0", + "dev": true, + "requires": { + "picomatch": "^2.2.1" + } + }, + "regenerator-runtime": { + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==" + }, + "regexp.prototype.flags": { + "version": "1.4.3", + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "functions-have-names": "^1.2.2" + } + }, + "regexpp": { + "version": "3.2.0", + "dev": true, + "peer": true + }, + "require-directory": { + "version": "2.1.1", + "dev": true + }, + "require-from-string": { + "version": "2.0.2", + "dev": true, + "peer": true + }, + "resolve": { + "version": "1.20.0", + "dev": true, + "peer": true, + "requires": { + "is-core-module": "^2.2.0", + "path-parse": "^1.0.6" + } + }, + "resolve-from": { + "version": "4.0.0", + "dev": true, + "peer": true + }, + "restore-cursor": { + "version": "3.1.0", + "requires": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + } + }, + "retry": { + "version": "0.13.1" + }, + "reusify": { + "version": "1.0.4", + "dev": true + }, + "rimraf": { + "version": "3.0.2", + "requires": { + "glob": "^7.1.3" + } + }, + "ripemd160": { + "version": "2.0.2", + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "rlp": { + "version": "2.2.7", + "requires": { + "bn.js": "^5.2.0" + } + }, + "rpc-websockets": { + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/rpc-websockets/-/rpc-websockets-7.9.0.tgz", + "integrity": "sha512-DwKewQz1IUA5wfLvgM8wDpPRcr+nWSxuFxx5CbrI2z/MyyZ4nXLM86TvIA+cI1ZAdqC8JIBR1mZR55dzaLU+Hw==", + "requires": { + "@babel/runtime": "^7.17.2", + "bufferutil": "^4.0.1", + "eventemitter3": "^4.0.7", + "utf-8-validate": "^5.0.2", + "uuid": "^8.3.2", + "ws": "^8.5.0" + }, + "dependencies": { + "ws": { + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz", + "integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==", + "requires": {} + } + } + }, + "run-async": { + "version": "2.4.1" + }, + "run-parallel": { + "version": "1.2.0", + "dev": true, + "requires": { + "queue-microtask": "^1.2.2" + } + }, + "rxjs": { + "version": "7.5.7", + "requires": { + "tslib": "^2.1.0" + } + }, + "safe-buffer": { + "version": "5.2.1" + }, + "safe-regex-test": { + "version": "1.0.0", + "requires": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "is-regex": "^1.1.4" + } + }, + "safer-buffer": { + "version": "2.1.2" + }, + "scrypt-js": { + "version": "3.0.1" + }, + "secp256k1": { + "version": "4.0.2", + "requires": { + "elliptic": "^6.5.2", + "node-addon-api": "^2.0.0", + "node-gyp-build": "^4.2.0" + } + }, + "semver": { + "version": "7.3.8", + "requires": { + "lru-cache": "^6.0.0" + } + }, + "serialize-javascript": { + "version": "6.0.0", + "dev": true, + "requires": { + "randombytes": "^2.1.0" + } + }, + "setimmediate": { + "version": "1.0.5" + }, + "setprototypeof": { + "version": "1.2.0" + }, + "sha.js": { + "version": "2.4.11", + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "shebang-command": { + "version": "2.0.0", + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0" + }, + "side-channel": { + "version": "1.0.4", + "requires": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + } + }, + "signal-exit": { + "version": "3.0.7" + }, + "slash": { + "version": "3.0.0", + "dev": true + }, + "slice-ansi": { + "version": "4.0.0", + "dev": true, + "peer": true, + "requires": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + } + }, + "snake-case": { + "version": "3.0.4", + "requires": { + "dot-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, + "source-map": { + "version": "0.6.1", + "dev": true + }, + "source-map-support": { + "version": "0.5.21", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "split": { + "version": "0.3.3", + "requires": { + "through": "2" + } + }, + "spok": { + "version": "1.4.3", + "requires": { + "ansicolors": "~0.3.2" + } + }, + "sprintf-js": { + "version": "1.0.3", + "dev": true, + "peer": true + }, + "start-server-and-test": { + "version": "1.15.2", + "requires": { + "arg": "^5.0.2", + "bluebird": "3.7.2", + "check-more-types": "2.24.0", + "debug": "4.3.4", + "execa": "5.1.1", + "lazy-ass": "1.6.0", + "ps-tree": "1.2.0", + "wait-on": "6.0.1" + }, + "dependencies": { + "debug": { + "version": "4.3.4", + "requires": { + "ms": "2.1.2" + } + } + } + }, + "statuses": { + "version": "1.5.0" + }, + "stream-chunker": { + "version": "1.2.8", + "requires": { + "through2": "~2.0.0" + } + }, + "stream-combiner": { + "version": "0.0.4", + "requires": { + "duplexer": "~0.1.1" + } + }, + "stream-transform": { + "version": "3.2.0" + }, + "string_decoder": { + "version": "1.3.0", + "requires": { + "safe-buffer": "~5.2.0" + } + }, + "string-width": { + "version": "4.2.3", + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + }, + "string.prototype.trimend": { + "version": "1.0.5", + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.19.5" + } + }, + "string.prototype.trimstart": { + "version": "1.0.5", + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.19.5" + } + }, + "strip-ansi": { + "version": "6.0.1", + "requires": { + "ansi-regex": "^5.0.1" + } + }, + "strip-bom": { + "version": "3.0.0", + "dev": true + }, + "strip-final-newline": { + "version": "2.0.0" + }, + "strip-hex-prefix": { + "version": "1.0.0", + "requires": { + "is-hex-prefixed": "1.0.0" + } + }, + "strip-json-comments": { + "version": "3.1.1", + "dev": true + }, + "superagent": { + "version": "6.1.0", + "requires": { + "component-emitter": "^1.3.0", + "cookiejar": "^2.1.2", + "debug": "^4.1.1", + "fast-safe-stringify": "^2.0.7", + "form-data": "^3.0.0", + "formidable": "^1.2.2", + "methods": "^1.1.2", + "mime": "^2.4.6", + "qs": "^6.9.4", + "readable-stream": "^3.6.0", + "semver": "^7.3.2" + }, + "dependencies": { + "mime": { + "version": "2.6.0" + } + } + }, + "superstruct": { + "version": "0.14.2" + }, + "supports-color": { + "version": "7.2.0", + "requires": { + "has-flag": "^4.0.0" + } + }, + "table": { + "version": "6.7.5", + "dev": true, + "peer": true, + "requires": { + "ajv": "^8.0.1", + "lodash.truncate": "^4.4.2", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1" + }, + "dependencies": { + "ajv": { + "version": "8.8.2", + "dev": true, + "peer": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + } + }, + "json-schema-traverse": { + "version": "1.0.0", + "dev": true, + "peer": true + } + } + }, + "text-encoding-utf-8": { + "version": "1.0.2" + }, + "text-table": { + "version": "0.2.0" + }, + "through": { + "version": "2.3.8" + }, + "through2": { + "version": "2.0.5", + "requires": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.7", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2" + }, + "string_decoder": { + "version": "1.1.1", + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "tmp": { + "version": "0.0.33", + "requires": { + "os-tmpdir": "~1.0.2" + } + }, + "tmp-promise": { + "version": "3.0.3", + "requires": { + "tmp": "^0.2.0" + }, + "dependencies": { + "tmp": { + "version": "0.2.1", + "requires": { + "rimraf": "^3.0.0" + } + } + } + }, + "to-regex-range": { + "version": "5.0.1", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + }, + "toidentifier": { + "version": "1.0.1" + }, + "toml": { + "version": "3.0.0" + }, + "tr46": { + "version": "0.0.3" + }, + "traverse-chain": { + "version": "0.1.0" + }, + "treeify": { + "version": "1.1.0" + }, + "ts-mocha": { + "version": "9.0.2", + "dev": true, + "requires": { + "ts-node": "7.0.1", + "tsconfig-paths": "^3.5.0" + } + }, + "ts-node": { + "version": "7.0.1", + "dev": true, + "requires": { + "arrify": "^1.0.0", + "buffer-from": "^1.1.0", + "diff": "^3.1.0", + "make-error": "^1.1.1", + "minimist": "^1.2.0", + "mkdirp": "^0.5.1", + "source-map-support": "^0.5.6", + "yn": "^2.0.0" + }, + "dependencies": { + "diff": { + "version": "3.5.0", + "dev": true + } + } + }, + "tsconfig-paths": { + "version": "3.12.0", + "dev": true, + "requires": { + "@types/json5": "^0.0.29", + "json5": "^1.0.1", + "minimist": "^1.2.0", + "strip-bom": "^3.0.0" + } + }, + "tslib": { + "version": "2.3.1" + }, + "tsutils": { + "version": "3.21.0", + "dev": true, + "requires": { + "tslib": "^1.8.1" + }, + "dependencies": { + "tslib": { + "version": "1.14.1", + "dev": true + } + } + }, + "tweetnacl": { + "version": "1.0.3" + }, + "type-check": { + "version": "0.4.0", + "dev": true, + "peer": true, + "requires": { + "prelude-ls": "^1.2.1" + } + }, + "type-detect": { + "version": "4.0.8", + "dev": true + }, + "type-fest": { + "version": "0.20.2", + "dev": true, + "peer": true + }, + "typescript": { + "version": "4.5.2", + "dev": true + }, + "typescript-collections": { + "version": "1.3.3" + }, + "u3": { + "version": "0.1.1" + }, + "unbox-primitive": { + "version": "1.0.2", + "requires": { + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" + } + }, + "uri-js": { + "version": "4.4.1", + "dev": true, + "peer": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "utf-8-validate": { + "version": "5.0.7", + "optional": true, + "requires": { + "node-gyp-build": "^4.3.0" + } + }, + "utf8": { + "version": "3.0.0" + }, + "util": { + "version": "0.12.4", + "requires": { + "inherits": "^2.0.3", + "is-arguments": "^1.0.4", + "is-generator-function": "^1.0.7", + "is-typed-array": "^1.1.3", + "safe-buffer": "^5.1.2", + "which-typed-array": "^1.1.2" + } + }, + "util-deprecate": { + "version": "1.0.2" + }, + "uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" + }, + "v8-compile-cache": { + "version": "2.3.0", + "dev": true, + "peer": true + }, + "vlq": { + "version": "2.0.4" + }, + "wait-on": { + "version": "6.0.1", + "requires": { + "axios": "^0.25.0", + "joi": "^17.6.0", + "lodash": "^4.17.21", + "minimist": "^1.2.5", + "rxjs": "^7.5.4" + } + }, + "wcwidth": { + "version": "1.0.1", + "requires": { + "defaults": "^1.0.3" + } + }, + "web3-utils": { + "version": "1.8.0", + "requires": { + "bn.js": "^5.2.1", + "ethereum-bloom-filters": "^1.0.6", + "ethereumjs-util": "^7.1.0", + "ethjs-unit": "0.1.6", + "number-to-bn": "1.7.0", + "randombytes": "^2.1.0", + "utf8": "3.0.0" + } + }, + "webidl-conversions": { + "version": "3.0.1" + }, + "whatwg-url": { + "version": "5.0.0", + "requires": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "which": { + "version": "2.0.2", + "requires": { + "isexe": "^2.0.0" + } + }, + "which-boxed-primitive": { + "version": "1.0.2", + "requires": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + } + }, + "which-typed-array": { + "version": "1.1.8", + "requires": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "es-abstract": "^1.20.0", + "for-each": "^0.3.3", + "has-tostringtag": "^1.0.0", + "is-typed-array": "^1.1.9" + } + }, + "wide-align": { + "version": "1.1.3", + "dev": true, + "peer": true, + "requires": { + "string-width": "^1.0.2 || 2" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.1", + "dev": true, + "peer": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "dev": true, + "peer": true + }, + "string-width": { + "version": "2.1.1", + "dev": true, + "peer": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "dev": true, + "peer": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, + "word-wrap": { + "version": "1.2.3", + "dev": true, + "peer": true + }, + "workerpool": { + "version": "6.2.0", + "dev": true + }, + "wrap-ansi": { + "version": "7.0.0", + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, + "wrappy": { + "version": "1.0.2" + }, + "ws": { + "version": "7.5.9", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", + "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", + "requires": {} + }, + "xtend": { + "version": "4.0.2" + }, + "y18n": { + "version": "5.0.8", + "dev": true + }, + "yallist": { + "version": "4.0.0" + }, + "yargs": { + "version": "16.2.0", + "dev": true, + "requires": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + } + }, + "yargs-parser": { + "version": "20.2.4", + "dev": true + }, + "yargs-unparser": { + "version": "2.0.0", + "dev": true, + "requires": { + "camelcase": "^6.0.0", + "decamelize": "^4.0.0", + "flat": "^5.0.2", + "is-plain-obj": "^2.1.0" + }, + "dependencies": { + "camelcase": { + "version": "6.2.1", + "dev": true + } + } + }, + "yn": { + "version": "2.0.0", + "dev": true + }, + "yocto-queue": { + "version": "0.1.0", + "dev": true + } + } +} diff --git a/programs/m2_interface/.gitignore b/programs/m2_interface/.gitignore new file mode 100644 index 0000000..869df07 --- /dev/null +++ b/programs/m2_interface/.gitignore @@ -0,0 +1,2 @@ +/target +Cargo.lock \ No newline at end of file diff --git a/programs/m2_interface/Cargo.toml b/programs/m2_interface/Cargo.toml new file mode 100644 index 0000000..b29236e --- /dev/null +++ b/programs/m2_interface/Cargo.toml @@ -0,0 +1,23 @@ +[package] +name = "m2_interface" +version = "0.1.0" +edition = "2021" + +[dependencies.borsh] +version = "^0.10" + +[dependencies.num-derive] +version = "^0.3" + +[dependencies.num-traits] +version = "^0.2" + +[dependencies.serde] +optional = true +version = "^1.0" + +[dependencies.solana-program] +version = "^1.16" + +[dependencies.thiserror] +version = "^1.0" diff --git a/programs/m2_interface/m2.json b/programs/m2_interface/m2.json new file mode 100644 index 0000000..04f5189 --- /dev/null +++ b/programs/m2_interface/m2.json @@ -0,0 +1,2093 @@ +{ + "version": "0.1.0", + "name": "m2", + "instructions": [ + { + "name": "withdrawFromTreasury", + "accounts": [ + { + "name": "treasuryWithdrawalDestination", + "isMut": true, + "isSigner": false + }, + { + "name": "auctionHouseTreasury", + "isMut": true, + "isSigner": false + }, + { + "name": "auctionHouse", + "isMut": false, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "amount", + "type": "u64" + } + ] + }, + { + "name": "updateAuctionHouse", + "accounts": [ + { + "name": "payer", + "isMut": false, + "isSigner": true + }, + { + "name": "notary", + "isMut": false, + "isSigner": false + }, + { + "name": "authority", + "isMut": false, + "isSigner": true + }, + { + "name": "newAuthority", + "isMut": false, + "isSigner": false + }, + { + "name": "treasuryWithdrawalDestination", + "isMut": true, + "isSigner": false + }, + { + "name": "auctionHouse", + "isMut": true, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "sellerFeeBasisPoints", + "type": { + "option": "u16" + } + }, + { + "name": "buyerReferralBp", + "type": { + "option": "u16" + } + }, + { + "name": "sellerReferralBp", + "type": { + "option": "u16" + } + }, + { + "name": "requiresNotary", + "type": { + "option": "bool" + } + }, + { + "name": "nprob", + "type": { + "option": "u8" + } + } + ] + }, + { + "name": "createAuctionHouse", + "accounts": [ + { + "name": "payer", + "isMut": true, + "isSigner": true + }, + { + "name": "notary", + "isMut": false, + "isSigner": false + }, + { + "name": "authority", + "isMut": false, + "isSigner": false + }, + { + "name": "treasuryWithdrawalDestination", + "isMut": true, + "isSigner": false + }, + { + "name": "auctionHouse", + "isMut": true, + "isSigner": false + }, + { + "name": "auctionHouseTreasury", + "isMut": true, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "bump", + "type": "u8" + }, + { + "name": "treasuryBump", + "type": "u8" + }, + { + "name": "sellerFeeBasisPoints", + "type": "u16" + }, + { + "name": "buyerReferralBp", + "type": "u16" + }, + { + "name": "sellerReferralBp", + "type": "u16" + }, + { + "name": "requiresNotary", + "type": "bool" + }, + { + "name": "createAuctionHouseNonce", + "type": "u64" + } + ] + }, + { + "name": "withdraw", + "accounts": [ + { + "name": "wallet", + "isMut": true, + "isSigner": false + }, + { + "name": "notary", + "isMut": false, + "isSigner": false + }, + { + "name": "escrowPaymentAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "authority", + "isMut": false, + "isSigner": false + }, + { + "name": "auctionHouse", + "isMut": false, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "escrowPaymentBump", + "type": "u8" + }, + { + "name": "amount", + "type": "u64" + } + ] + }, + { + "name": "deposit", + "accounts": [ + { + "name": "wallet", + "isMut": true, + "isSigner": false + }, + { + "name": "notary", + "isMut": false, + "isSigner": false + }, + { + "name": "escrowPaymentAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "authority", + "isMut": false, + "isSigner": false + }, + { + "name": "auctionHouse", + "isMut": false, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "escrowPaymentBump", + "type": "u8" + }, + { + "name": "amount", + "type": "u64" + } + ] + }, + { + "name": "sell", + "accounts": [ + { + "name": "wallet", + "isMut": true, + "isSigner": true + }, + { + "name": "notary", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "tokenAta", + "isMut": true, + "isSigner": false + }, + { + "name": "tokenMint", + "isMut": false, + "isSigner": false + }, + { + "name": "metadata", + "isMut": false, + "isSigner": false + }, + { + "name": "authority", + "isMut": false, + "isSigner": false + }, + { + "name": "auctionHouse", + "isMut": false, + "isSigner": false + }, + { + "name": "sellerTradeState", + "isMut": true, + "isSigner": false + }, + { + "name": "sellerReferral", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "ataProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "programAsSigner", + "isMut": false, + "isSigner": false + }, + { + "name": "rent", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "sellerStateBump", + "type": "u8" + }, + { + "name": "programAsSignerBump", + "type": "u8" + }, + { + "name": "buyerPrice", + "type": "u64" + }, + { + "name": "tokenSize", + "type": "u64" + }, + { + "name": "sellerStateExpiry", + "type": "i64" + } + ] + }, + { + "name": "cancelSell", + "accounts": [ + { + "name": "wallet", + "isMut": true, + "isSigner": false + }, + { + "name": "notary", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "tokenMint", + "isMut": false, + "isSigner": false + }, + { + "name": "authority", + "isMut": false, + "isSigner": false + }, + { + "name": "auctionHouse", + "isMut": false, + "isSigner": false + }, + { + "name": "sellerTradeState", + "isMut": true, + "isSigner": false + }, + { + "name": "sellerReferral", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "buyerPrice", + "type": "u64" + }, + { + "name": "tokenSize", + "type": "u64" + }, + { + "name": "sellerStateExpiry", + "type": "i64" + } + ] + }, + { + "name": "buy", + "accounts": [ + { + "name": "wallet", + "isMut": true, + "isSigner": true + }, + { + "name": "notary", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenMint", + "isMut": false, + "isSigner": false + }, + { + "name": "metadata", + "isMut": false, + "isSigner": false + }, + { + "name": "escrowPaymentAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "authority", + "isMut": false, + "isSigner": false + }, + { + "name": "auctionHouse", + "isMut": false, + "isSigner": false + }, + { + "name": "buyerTradeState", + "isMut": true, + "isSigner": false + }, + { + "name": "buyerReferral", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "rent", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "buyerStateBump", + "type": "u8" + }, + { + "name": "escrowPaymentBump", + "type": "u8" + }, + { + "name": "buyerPrice", + "type": "u64" + }, + { + "name": "tokenSize", + "type": "u64" + }, + { + "name": "buyerStateExpiry", + "type": "i64" + } + ] + }, + { + "name": "buyV2", + "accounts": [ + { + "name": "wallet", + "isMut": true, + "isSigner": true + }, + { + "name": "notary", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenMint", + "isMut": false, + "isSigner": false + }, + { + "name": "metadata", + "isMut": false, + "isSigner": false + }, + { + "name": "escrowPaymentAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "authority", + "isMut": false, + "isSigner": false + }, + { + "name": "auctionHouse", + "isMut": false, + "isSigner": false + }, + { + "name": "buyerTradeState", + "isMut": true, + "isSigner": false + }, + { + "name": "buyerReferral", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "buyerPrice", + "type": "u64" + }, + { + "name": "tokenSize", + "type": "u64" + }, + { + "name": "buyerStateExpiry", + "type": "i64" + }, + { + "name": "buyerCreatorRoyaltyBp", + "type": "u16" + }, + { + "name": "extraArgs", + "type": "bytes" + } + ] + }, + { + "name": "cancelBuy", + "accounts": [ + { + "name": "wallet", + "isMut": true, + "isSigner": false + }, + { + "name": "notary", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenMint", + "isMut": true, + "isSigner": false + }, + { + "name": "authority", + "isMut": false, + "isSigner": false + }, + { + "name": "auctionHouse", + "isMut": false, + "isSigner": false + }, + { + "name": "buyerTradeState", + "isMut": true, + "isSigner": false + }, + { + "name": "buyerReferral", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "buyerPrice", + "type": "u64" + }, + { + "name": "tokenSize", + "type": "u64" + }, + { + "name": "buyerStateExpiry", + "type": "i64" + } + ] + }, + { + "name": "ocpSell", + "accounts": [ + { + "name": "wallet", + "isMut": true, + "isSigner": true + }, + { + "name": "notary", + "isMut": false, + "isSigner": false + }, + { + "name": "programAsSigner", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenAta", + "isMut": true, + "isSigner": false + }, + { + "name": "tokenMint", + "isMut": false, + "isSigner": false + }, + { + "name": "metadata", + "isMut": false, + "isSigner": false + }, + { + "name": "auctionHouse", + "isMut": false, + "isSigner": false + }, + { + "name": "sellerTradeState", + "isMut": true, + "isSigner": false + }, + { + "name": "sellerReferral", + "isMut": false, + "isSigner": false + }, + { + "name": "ocpMintState", + "isMut": true, + "isSigner": false + }, + { + "name": "ocpPolicy", + "isMut": false, + "isSigner": false + }, + { + "name": "ocpFreezeAuthority", + "isMut": false, + "isSigner": false + }, + { + "name": "ocpProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "cmtProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "instructions", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "rent", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "args", + "type": { + "defined": "OCPSellArgs" + } + } + ] + }, + { + "name": "ocpCancelSell", + "accounts": [ + { + "name": "wallet", + "isMut": true, + "isSigner": false + }, + { + "name": "notary", + "isMut": false, + "isSigner": true + }, + { + "name": "programAsSigner", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenAta", + "isMut": true, + "isSigner": false + }, + { + "name": "tokenMint", + "isMut": false, + "isSigner": false + }, + { + "name": "metadata", + "isMut": false, + "isSigner": false + }, + { + "name": "auctionHouse", + "isMut": false, + "isSigner": false + }, + { + "name": "sellerTradeState", + "isMut": true, + "isSigner": false + }, + { + "name": "ocpMintState", + "isMut": true, + "isSigner": false + }, + { + "name": "ocpPolicy", + "isMut": false, + "isSigner": false + }, + { + "name": "ocpFreezeAuthority", + "isMut": false, + "isSigner": false + }, + { + "name": "ocpProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "cmtProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "instructions", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "rent", + "isMut": false, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "ocpExecuteSaleV2", + "accounts": [ + { + "name": "payer", + "isMut": true, + "isSigner": true + }, + { + "name": "buyer", + "isMut": true, + "isSigner": false + }, + { + "name": "seller", + "isMut": true, + "isSigner": false + }, + { + "name": "notary", + "isMut": false, + "isSigner": false + }, + { + "name": "programAsSigner", + "isMut": false, + "isSigner": false + }, + { + "name": "sellerTokenAta", + "isMut": true, + "isSigner": false + }, + { + "name": "buyerTokenAta", + "isMut": true, + "isSigner": false + }, + { + "name": "tokenMint", + "isMut": false, + "isSigner": false + }, + { + "name": "metadata", + "isMut": false, + "isSigner": false + }, + { + "name": "auctionHouse", + "isMut": false, + "isSigner": false + }, + { + "name": "auctionHouseTreasury", + "isMut": true, + "isSigner": false + }, + { + "name": "sellerTradeState", + "isMut": true, + "isSigner": false + }, + { + "name": "buyerTradeState", + "isMut": true, + "isSigner": false + }, + { + "name": "buyerEscrowPaymentAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "buyerReferral", + "isMut": true, + "isSigner": false + }, + { + "name": "sellerReferral", + "isMut": true, + "isSigner": false + }, + { + "name": "ocpMintState", + "isMut": true, + "isSigner": false + }, + { + "name": "ocpPolicy", + "isMut": false, + "isSigner": false + }, + { + "name": "ocpFreezeAuthority", + "isMut": false, + "isSigner": false + }, + { + "name": "ocpProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "cmtProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "instructions", + "isMut": false, + "isSigner": false + }, + { + "name": "associatedTokenProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "rent", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "args", + "type": { + "defined": "OCPExecuteSaleV2Args" + } + } + ] + }, + { + "name": "executeSaleV2", + "accounts": [ + { + "name": "buyer", + "isMut": true, + "isSigner": false + }, + { + "name": "seller", + "isMut": true, + "isSigner": false + }, + { + "name": "notary", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "tokenMint", + "isMut": false, + "isSigner": false + }, + { + "name": "metadata", + "isMut": false, + "isSigner": false + }, + { + "name": "escrowPaymentAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "buyerReceiptTokenAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "authority", + "isMut": false, + "isSigner": false + }, + { + "name": "auctionHouse", + "isMut": false, + "isSigner": false + }, + { + "name": "auctionHouseTreasury", + "isMut": true, + "isSigner": false + }, + { + "name": "buyerTradeState", + "isMut": true, + "isSigner": false + }, + { + "name": "buyerReferral", + "isMut": true, + "isSigner": false + }, + { + "name": "sellerTradeState", + "isMut": true, + "isSigner": false + }, + { + "name": "sellerReferral", + "isMut": true, + "isSigner": false + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "ataProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "programAsSigner", + "isMut": false, + "isSigner": false + }, + { + "name": "rent", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "escrowPaymentBump", + "type": "u8" + }, + { + "name": "programAsSignerBump", + "type": "u8" + }, + { + "name": "buyerPrice", + "type": "u64" + }, + { + "name": "tokenSize", + "type": "u64" + }, + { + "name": "buyerStateExpiry", + "type": "i64" + }, + { + "name": "sellerStateExpiry", + "type": "i64" + }, + { + "name": "makerFeeBp", + "type": "i16" + }, + { + "name": "takerFeeBp", + "type": "u16" + } + ] + }, + { + "name": "mip1Sell", + "accounts": [ + { + "name": "wallet", + "isMut": true, + "isSigner": true + }, + { + "name": "notary", + "isMut": false, + "isSigner": false + }, + { + "name": "programAsSigner", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "tokenMint", + "isMut": false, + "isSigner": false + }, + { + "name": "metadata", + "isMut": true, + "isSigner": false + }, + { + "name": "auctionHouse", + "isMut": false, + "isSigner": false + }, + { + "name": "sellerTradeState", + "isMut": true, + "isSigner": false + }, + { + "name": "migrationSellerTradeState", + "isMut": true, + "isSigner": false + }, + { + "name": "sellerReferral", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenAta", + "isMut": true, + "isSigner": false, + "docs": [ + "escrow mode for init sell: we transfer from token_account to token_ata", + "escrow mode for change price: token_account is the same as token_ata", + "migration mode for change price: token_ata is not used, because we only need token_account which is owned by program_as_signer" + ] + }, + { + "name": "tokenMetadataProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "edition", + "isMut": false, + "isSigner": false + }, + { + "name": "authorizationRulesProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "authorizationRules", + "isMut": false, + "isSigner": false + }, + { + "name": "instructions", + "isMut": false, + "isSigner": false + }, + { + "name": "ownerTokenRecord", + "isMut": true, + "isSigner": false + }, + { + "name": "destinationTokenRecord", + "isMut": true, + "isSigner": false + }, + { + "name": "associatedTokenProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "rent", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "args", + "type": { + "defined": "MIP1SellArgs" + } + } + ] + }, + { + "name": "mip1ExecuteSaleV2", + "accounts": [ + { + "name": "payer", + "isMut": true, + "isSigner": true + }, + { + "name": "buyer", + "isMut": true, + "isSigner": false + }, + { + "name": "seller", + "isMut": true, + "isSigner": false + }, + { + "name": "notary", + "isMut": false, + "isSigner": false + }, + { + "name": "programAsSigner", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "buyerReceiptTokenAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "tokenMint", + "isMut": false, + "isSigner": false + }, + { + "name": "metadata", + "isMut": true, + "isSigner": false + }, + { + "name": "auctionHouse", + "isMut": false, + "isSigner": false + }, + { + "name": "auctionHouseTreasury", + "isMut": true, + "isSigner": false + }, + { + "name": "sellerTradeState", + "isMut": true, + "isSigner": false + }, + { + "name": "buyerTradeState", + "isMut": true, + "isSigner": false + }, + { + "name": "buyerEscrowPaymentAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "buyerReferral", + "isMut": true, + "isSigner": false + }, + { + "name": "sellerReferral", + "isMut": true, + "isSigner": false + }, + { + "name": "tokenMetadataProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "edition", + "isMut": false, + "isSigner": false + }, + { + "name": "authorizationRulesProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "authorizationRules", + "isMut": false, + "isSigner": false + }, + { + "name": "ownerTokenRecord", + "isMut": true, + "isSigner": false + }, + { + "name": "destinationTokenRecord", + "isMut": true, + "isSigner": false + }, + { + "name": "instructions", + "isMut": false, + "isSigner": false + }, + { + "name": "associatedTokenProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "rent", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "args", + "type": { + "defined": "MIP1ExecuteSaleV2Args" + } + } + ] + }, + { + "name": "mip1CancelSell", + "accounts": [ + { + "name": "wallet", + "isMut": true, + "isSigner": true + }, + { + "name": "notary", + "isMut": false, + "isSigner": true + }, + { + "name": "programAsSigner", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenAta", + "isMut": true, + "isSigner": false + }, + { + "name": "tokenMint", + "isMut": false, + "isSigner": false + }, + { + "name": "metadata", + "isMut": true, + "isSigner": false + }, + { + "name": "auctionHouse", + "isMut": false, + "isSigner": false + }, + { + "name": "sellerTradeState", + "isMut": true, + "isSigner": false + }, + { + "name": "tokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "should always be ATA of (mint, wallet)" + ] + }, + { + "name": "tokenAccountTemp", + "isMut": true, + "isSigner": false, + "docs": [ + "should always be ATA of (mint, program_as_signer)" + ] + }, + { + "name": "tempTokenRecord", + "isMut": true, + "isSigner": false + }, + { + "name": "tokenMetadataProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "edition", + "isMut": false, + "isSigner": false + }, + { + "name": "authorizationRulesProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "authorizationRules", + "isMut": false, + "isSigner": false + }, + { + "name": "ownerTokenRecord", + "isMut": true, + "isSigner": false + }, + { + "name": "destinationTokenRecord", + "isMut": true, + "isSigner": false + }, + { + "name": "instructions", + "isMut": false, + "isSigner": false + }, + { + "name": "associatedTokenProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "withdrawByMmm", + "accounts": [ + { + "name": "mmmPool", + "isMut": false, + "isSigner": true + }, + { + "name": "to", + "isMut": true, + "isSigner": false + }, + { + "name": "escrowPaymentAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "args", + "type": { + "defined": "WithdrawByMMMArgs" + } + } + ] + } + ], + "accounts": [ + { + "name": "BuyerTradeState", + "type": { + "kind": "struct", + "fields": [ + { + "name": "auctionHouseKey", + "type": "publicKey" + }, + { + "name": "buyer", + "type": "publicKey" + }, + { + "name": "buyerReferral", + "type": "publicKey" + }, + { + "name": "buyerPrice", + "type": "u64" + }, + { + "name": "tokenMint", + "type": "publicKey" + }, + { + "name": "tokenSize", + "type": "u64" + }, + { + "name": "bump", + "type": "u8" + }, + { + "name": "expiry", + "type": "i64" + } + ] + } + }, + { + "name": "SellerTradeState", + "type": { + "kind": "struct", + "fields": [ + { + "name": "auctionHouseKey", + "type": "publicKey" + }, + { + "name": "seller", + "type": "publicKey" + }, + { + "name": "sellerReferral", + "type": "publicKey" + }, + { + "name": "buyerPrice", + "type": "u64" + }, + { + "name": "tokenMint", + "type": "publicKey" + }, + { + "name": "tokenAccount", + "type": "publicKey" + }, + { + "name": "tokenSize", + "type": "u64" + }, + { + "name": "bump", + "type": "u8" + }, + { + "name": "expiry", + "type": "i64" + } + ] + } + }, + { + "name": "SellerTradeStateV2", + "type": { + "kind": "struct", + "fields": [ + { + "name": "auctionHouseKey", + "type": "publicKey" + }, + { + "name": "seller", + "type": "publicKey" + }, + { + "name": "sellerReferral", + "type": "publicKey" + }, + { + "name": "buyerPrice", + "type": "u64" + }, + { + "name": "tokenMint", + "type": "publicKey" + }, + { + "name": "tokenAccount", + "type": "publicKey" + }, + { + "name": "tokenSize", + "type": "u64" + }, + { + "name": "bump", + "type": "u8" + }, + { + "name": "expiry", + "type": "i64" + }, + { + "name": "paymentMint", + "type": "publicKey" + } + ] + } + }, + { + "name": "AuctionHouse", + "type": { + "kind": "struct", + "fields": [ + { + "name": "auctionHouseTreasury", + "type": "publicKey" + }, + { + "name": "treasuryWithdrawalDestination", + "type": "publicKey" + }, + { + "name": "authority", + "type": "publicKey" + }, + { + "name": "creator", + "type": "publicKey" + }, + { + "name": "notary", + "type": "publicKey" + }, + { + "name": "bump", + "type": "u8" + }, + { + "name": "treasuryBump", + "type": "u8" + }, + { + "name": "sellerFeeBasisPoints", + "type": "u16" + }, + { + "name": "buyerReferralBp", + "type": "u16" + }, + { + "name": "sellerReferralBp", + "type": "u16" + }, + { + "name": "requiresNotary", + "type": "bool" + }, + { + "name": "nprob", + "type": "u8" + } + ] + } + }, + { + "name": "BuyerTradeStateV2", + "type": { + "kind": "struct", + "fields": [ + { + "name": "auctionHouseKey", + "type": "publicKey" + }, + { + "name": "buyer", + "type": "publicKey" + }, + { + "name": "buyerReferral", + "type": "publicKey" + }, + { + "name": "buyerPrice", + "type": "u64" + }, + { + "name": "tokenMint", + "type": "publicKey" + }, + { + "name": "tokenSize", + "type": "u64" + }, + { + "name": "bump", + "type": "u8" + }, + { + "name": "expiry", + "type": "i64" + }, + { + "name": "buyerCreatorRoyaltyBp", + "type": "u16" + }, + { + "name": "paymentMint", + "type": "publicKey" + } + ] + } + } + ], + "types": [ + { + "name": "WithdrawByMMMArgs", + "type": { + "kind": "struct", + "fields": [ + { + "name": "wallet", + "type": "publicKey" + }, + { + "name": "auctionHouse", + "type": "publicKey" + }, + { + "name": "amount", + "type": "u64" + }, + { + "name": "mmmPoolUuid", + "type": "publicKey" + } + ] + } + }, + { + "name": "MIP1ExecuteSaleV2Args", + "type": { + "kind": "struct", + "fields": [ + { + "name": "price", + "type": "u64" + }, + { + "name": "makerFeeBp", + "type": "i16" + }, + { + "name": "takerFeeBp", + "type": "u16" + } + ] + } + }, + { + "name": "MIP1SellArgs", + "type": { + "kind": "struct", + "fields": [ + { + "name": "price", + "type": "u64" + }, + { + "name": "expiry", + "type": "i64" + } + ] + } + }, + { + "name": "OCPExecuteSaleV2Args", + "type": { + "kind": "struct", + "fields": [ + { + "name": "price", + "type": "u64" + }, + { + "name": "makerFeeBp", + "type": "i16" + }, + { + "name": "takerFeeBp", + "type": "u16" + } + ] + } + }, + { + "name": "OCPSellArgs", + "type": { + "kind": "struct", + "fields": [ + { + "name": "price", + "type": "u64" + }, + { + "name": "expiry", + "type": "i64" + } + ] + } + } + ], + "errors": [ + { + "code": 6000, + "name": "PublicKeyMismatch", + "msg": "PublicKeyMismatch" + }, + { + "code": 6001, + "name": "InvalidMintAuthority", + "msg": "InvalidMintAuthority" + }, + { + "code": 6002, + "name": "UninitializedAccount", + "msg": "UninitializedAccount" + }, + { + "code": 6003, + "name": "IncorrectOwner", + "msg": "IncorrectOwner" + }, + { + "code": 6004, + "name": "PublicKeysShouldBeUnique", + "msg": "PublicKeysShouldBeUnique" + }, + { + "code": 6005, + "name": "StatementFalse", + "msg": "StatementFalse" + }, + { + "code": 6006, + "name": "NotRentExempt", + "msg": "NotRentExempt" + }, + { + "code": 6007, + "name": "NumericalOverflow", + "msg": "NumericalOverflow" + }, + { + "code": 6008, + "name": "ExpectedSolAccount", + "msg": "Expected a sol account but got an spl token account instead" + }, + { + "code": 6009, + "name": "CannotExchangeSOLForSol", + "msg": "Cannot exchange sol for sol" + }, + { + "code": 6010, + "name": "SOLWalletMustSign", + "msg": "If paying with sol, sol wallet must be signer" + }, + { + "code": 6011, + "name": "CannotTakeThisActionWithoutAuctionHouseSignOff", + "msg": "Cannot take this action without auction house signing too" + }, + { + "code": 6012, + "name": "NoPayerPresent", + "msg": "No payer present on this txn" + }, + { + "code": 6013, + "name": "DerivedKeyInvalid", + "msg": "Derived key invalid" + }, + { + "code": 6014, + "name": "MetadataDoesntExist", + "msg": "Metadata doesn't exist" + }, + { + "code": 6015, + "name": "InvalidTokenAmount", + "msg": "Invalid token amount" + }, + { + "code": 6016, + "name": "BothPartiesNeedToAgreeToSale", + "msg": "Both parties need to agree to this sale" + }, + { + "code": 6017, + "name": "CannotMatchFreeSalesWithoutAuctionHouseOrSellerSignoff", + "msg": "Cannot match free sales unless the auction house or seller signs off" + }, + { + "code": 6018, + "name": "SaleRequiresSigner", + "msg": "This sale requires a signer" + }, + { + "code": 6019, + "name": "OldSellerNotInitialized", + "msg": "Old seller not initialized" + }, + { + "code": 6020, + "name": "SellerATACannotHaveDelegate", + "msg": "Seller ata cannot have a delegate set" + }, + { + "code": 6021, + "name": "BuyerATACannotHaveDelegate", + "msg": "Buyer ata cannot have a delegate set" + }, + { + "code": 6022, + "name": "NoValidSignerPresent", + "msg": "No valid signer present" + }, + { + "code": 6023, + "name": "InvalidBasisPoints", + "msg": "Invalid BP" + }, + { + "code": 6024, + "name": "InvalidNotary", + "msg": "Invalid notary" + }, + { + "code": 6025, + "name": "EmptyTradeState", + "msg": "Empty trade state" + }, + { + "code": 6026, + "name": "InvalidExpiry", + "msg": "Invalid expiry" + }, + { + "code": 6027, + "name": "InvalidPrice", + "msg": "Invalid price" + }, + { + "code": 6028, + "name": "InvalidRemainingAccountsWithoutProgramAsSigner", + "msg": "Invalid remainning accounts without program_as_signer" + }, + { + "code": 6029, + "name": "InvalidBump", + "msg": "Invalid bump" + }, + { + "code": 6030, + "name": "InvalidCreateAuctionHouseNonce", + "msg": "Invalid create auction house nonce" + }, + { + "code": 6031, + "name": "InvalidAccountState", + "msg": "Invalid account state" + }, + { + "code": 6032, + "name": "InvalidDiscriminator", + "msg": "Invalid discriminator" + }, + { + "code": 6033, + "name": "InvalidPlatformFeeBp", + "msg": "Invalid platform fee bp" + }, + { + "code": 6034, + "name": "InvalidTokenMint", + "msg": "Invalid token mint" + }, + { + "code": 6035, + "name": "InvalidTokenStandard", + "msg": "Invalid token standard" + }, + { + "code": 6036, + "name": "Deprecated", + "msg": "Deprecated" + }, + { + "code": 6037, + "name": "MissingRemainingAccount", + "msg": "Missing remaining account" + }, + { + "code": 6038, + "name": "InvalidTrustedProgramOrPDA", + "msg": "Invalid trusted program or pda" + } + ] +} \ No newline at end of file diff --git a/programs/m2_interface/src/accounts.rs b/programs/m2_interface/src/accounts.rs new file mode 100644 index 0000000..0548682 --- /dev/null +++ b/programs/m2_interface/src/accounts.rs @@ -0,0 +1,221 @@ +use borsh::{BorshDeserialize, BorshSerialize}; +use solana_program::pubkey::Pubkey; +pub const BUYER_TRADE_STATE_ACCOUNT_DISCM: [u8; 8] = [200, 164, 153, 187, 118, 60, 200, 51]; +#[derive(Clone, Debug, BorshDeserialize, BorshSerialize, PartialEq)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +pub struct BuyerTradeState { + pub auction_house_key: Pubkey, + pub buyer: Pubkey, + pub buyer_referral: Pubkey, + pub buyer_price: u64, + pub token_mint: Pubkey, + pub token_size: u64, + pub bump: u8, + pub expiry: i64, +} +#[derive(Clone, Debug, PartialEq)] +pub struct BuyerTradeStateAccount(pub BuyerTradeState); +impl BuyerTradeStateAccount { + pub fn deserialize(buf: &[u8]) -> std::io::Result { + use std::io::Read; + let mut reader = buf; + let mut maybe_discm = [0u8; 8]; + reader.read_exact(&mut maybe_discm)?; + if maybe_discm != BUYER_TRADE_STATE_ACCOUNT_DISCM { + return Err(std::io::Error::new( + std::io::ErrorKind::Other, + format!( + "discm does not match. Expected: {:?}. Received: {:?}", + BUYER_TRADE_STATE_ACCOUNT_DISCM, maybe_discm + ), + )); + } + Ok(Self(BuyerTradeState::deserialize(&mut reader)?)) + } + pub fn serialize(&self, mut writer: W) -> std::io::Result<()> { + writer.write_all(&BUYER_TRADE_STATE_ACCOUNT_DISCM)?; + self.0.serialize(&mut writer) + } + pub fn try_to_vec(&self) -> std::io::Result> { + let mut data = Vec::new(); + self.serialize(&mut data)?; + Ok(data) + } +} +pub const SELLER_TRADE_STATE_ACCOUNT_DISCM: [u8; 8] = [1, 238, 72, 137, 138, 21, 254, 249]; +#[derive(Clone, Debug, BorshDeserialize, BorshSerialize, PartialEq)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +pub struct SellerTradeState { + pub auction_house_key: Pubkey, + pub seller: Pubkey, + pub seller_referral: Pubkey, + pub buyer_price: u64, + pub token_mint: Pubkey, + pub token_account: Pubkey, + pub token_size: u64, + pub bump: u8, + pub expiry: i64, +} +#[derive(Clone, Debug, PartialEq)] +pub struct SellerTradeStateAccount(pub SellerTradeState); +impl SellerTradeStateAccount { + pub fn deserialize(buf: &[u8]) -> std::io::Result { + use std::io::Read; + let mut reader = buf; + let mut maybe_discm = [0u8; 8]; + reader.read_exact(&mut maybe_discm)?; + if maybe_discm != SELLER_TRADE_STATE_ACCOUNT_DISCM { + return Err(std::io::Error::new( + std::io::ErrorKind::Other, + format!( + "discm does not match. Expected: {:?}. Received: {:?}", + SELLER_TRADE_STATE_ACCOUNT_DISCM, maybe_discm + ), + )); + } + Ok(Self(SellerTradeState::deserialize(&mut reader)?)) + } + pub fn serialize(&self, mut writer: W) -> std::io::Result<()> { + writer.write_all(&SELLER_TRADE_STATE_ACCOUNT_DISCM)?; + self.0.serialize(&mut writer) + } + pub fn try_to_vec(&self) -> std::io::Result> { + let mut data = Vec::new(); + self.serialize(&mut data)?; + Ok(data) + } +} +pub const SELLER_TRADE_STATE_V2_ACCOUNT_DISCM: [u8; 8] = [164, 14, 92, 100, 123, 57, 234, 204]; +#[derive(Clone, Debug, BorshDeserialize, BorshSerialize, PartialEq)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +pub struct SellerTradeStateV2 { + pub auction_house_key: Pubkey, + pub seller: Pubkey, + pub seller_referral: Pubkey, + pub buyer_price: u64, + pub token_mint: Pubkey, + pub token_account: Pubkey, + pub token_size: u64, + pub bump: u8, + pub expiry: i64, + pub payment_mint: Pubkey, +} +#[derive(Clone, Debug, PartialEq)] +pub struct SellerTradeStateV2Account(pub SellerTradeStateV2); +impl SellerTradeStateV2Account { + pub fn deserialize(buf: &[u8]) -> std::io::Result { + use std::io::Read; + let mut reader = buf; + let mut maybe_discm = [0u8; 8]; + reader.read_exact(&mut maybe_discm)?; + if maybe_discm != SELLER_TRADE_STATE_V2_ACCOUNT_DISCM { + return Err(std::io::Error::new( + std::io::ErrorKind::Other, + format!( + "discm does not match. Expected: {:?}. Received: {:?}", + SELLER_TRADE_STATE_V2_ACCOUNT_DISCM, maybe_discm + ), + )); + } + Ok(Self(SellerTradeStateV2::deserialize(&mut reader)?)) + } + pub fn serialize(&self, mut writer: W) -> std::io::Result<()> { + writer.write_all(&SELLER_TRADE_STATE_V2_ACCOUNT_DISCM)?; + self.0.serialize(&mut writer) + } + pub fn try_to_vec(&self) -> std::io::Result> { + let mut data = Vec::new(); + self.serialize(&mut data)?; + Ok(data) + } +} +pub const AUCTION_HOUSE_ACCOUNT_DISCM: [u8; 8] = [40, 108, 215, 107, 213, 85, 245, 48]; +#[derive(Clone, Debug, BorshDeserialize, BorshSerialize, PartialEq)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +pub struct AuctionHouse { + pub auction_house_treasury: Pubkey, + pub treasury_withdrawal_destination: Pubkey, + pub authority: Pubkey, + pub creator: Pubkey, + pub notary: Pubkey, + pub bump: u8, + pub treasury_bump: u8, + pub seller_fee_basis_points: u16, + pub buyer_referral_bp: u16, + pub seller_referral_bp: u16, + pub requires_notary: bool, + pub nprob: u8, +} +#[derive(Clone, Debug, PartialEq)] +pub struct AuctionHouseAccount(pub AuctionHouse); +impl AuctionHouseAccount { + pub fn deserialize(buf: &[u8]) -> std::io::Result { + use std::io::Read; + let mut reader = buf; + let mut maybe_discm = [0u8; 8]; + reader.read_exact(&mut maybe_discm)?; + if maybe_discm != AUCTION_HOUSE_ACCOUNT_DISCM { + return Err(std::io::Error::new( + std::io::ErrorKind::Other, + format!( + "discm does not match. Expected: {:?}. Received: {:?}", + AUCTION_HOUSE_ACCOUNT_DISCM, maybe_discm + ), + )); + } + Ok(Self(AuctionHouse::deserialize(&mut reader)?)) + } + pub fn serialize(&self, mut writer: W) -> std::io::Result<()> { + writer.write_all(&AUCTION_HOUSE_ACCOUNT_DISCM)?; + self.0.serialize(&mut writer) + } + pub fn try_to_vec(&self) -> std::io::Result> { + let mut data = Vec::new(); + self.serialize(&mut data)?; + Ok(data) + } +} +pub const BUYER_TRADE_STATE_V2_ACCOUNT_DISCM: [u8; 8] = [195, 55, 46, 41, 54, 7, 225, 155]; +#[derive(Clone, Debug, BorshDeserialize, BorshSerialize, PartialEq)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +pub struct BuyerTradeStateV2 { + pub auction_house_key: Pubkey, + pub buyer: Pubkey, + pub buyer_referral: Pubkey, + pub buyer_price: u64, + pub token_mint: Pubkey, + pub token_size: u64, + pub bump: u8, + pub expiry: i64, + pub buyer_creator_royalty_bp: u16, + pub payment_mint: Pubkey, +} +#[derive(Clone, Debug, PartialEq)] +pub struct BuyerTradeStateV2Account(pub BuyerTradeStateV2); +impl BuyerTradeStateV2Account { + pub fn deserialize(buf: &[u8]) -> std::io::Result { + use std::io::Read; + let mut reader = buf; + let mut maybe_discm = [0u8; 8]; + reader.read_exact(&mut maybe_discm)?; + if maybe_discm != BUYER_TRADE_STATE_V2_ACCOUNT_DISCM { + return Err(std::io::Error::new( + std::io::ErrorKind::Other, + format!( + "discm does not match. Expected: {:?}. Received: {:?}", + BUYER_TRADE_STATE_V2_ACCOUNT_DISCM, maybe_discm + ), + )); + } + Ok(Self(BuyerTradeStateV2::deserialize(&mut reader)?)) + } + pub fn serialize(&self, mut writer: W) -> std::io::Result<()> { + writer.write_all(&BUYER_TRADE_STATE_V2_ACCOUNT_DISCM)?; + self.0.serialize(&mut writer) + } + pub fn try_to_vec(&self) -> std::io::Result> { + let mut data = Vec::new(); + self.serialize(&mut data)?; + Ok(data) + } +} diff --git a/programs/m2_interface/src/errors.rs b/programs/m2_interface/src/errors.rs new file mode 100644 index 0000000..455ce79 --- /dev/null +++ b/programs/m2_interface/src/errors.rs @@ -0,0 +1,109 @@ +use solana_program::{ + decode_error::DecodeError, + msg, + program_error::{PrintProgramError, ProgramError}, +}; +use thiserror::Error; +#[derive(Clone, Copy, Debug, Eq, Error, num_derive::FromPrimitive, PartialEq)] +pub enum M2Error { + #[error("PublicKeyMismatch")] + PublicKeyMismatch = 6000, + #[error("InvalidMintAuthority")] + InvalidMintAuthority = 6001, + #[error("UninitializedAccount")] + UninitializedAccount = 6002, + #[error("IncorrectOwner")] + IncorrectOwner = 6003, + #[error("PublicKeysShouldBeUnique")] + PublicKeysShouldBeUnique = 6004, + #[error("StatementFalse")] + StatementFalse = 6005, + #[error("NotRentExempt")] + NotRentExempt = 6006, + #[error("NumericalOverflow")] + NumericalOverflow = 6007, + #[error("Expected a sol account but got an spl token account instead")] + ExpectedSolAccount = 6008, + #[error("Cannot exchange sol for sol")] + CannotExchangeSolForSol = 6009, + #[error("If paying with sol, sol wallet must be signer")] + SolWalletMustSign = 6010, + #[error("Cannot take this action without auction house signing too")] + CannotTakeThisActionWithoutAuctionHouseSignOff = 6011, + #[error("No payer present on this txn")] + NoPayerPresent = 6012, + #[error("Derived key invalid")] + DerivedKeyInvalid = 6013, + #[error("Metadata doesn't exist")] + MetadataDoesntExist = 6014, + #[error("Invalid token amount")] + InvalidTokenAmount = 6015, + #[error("Both parties need to agree to this sale")] + BothPartiesNeedToAgreeToSale = 6016, + #[error("Cannot match free sales unless the auction house or seller signs off")] + CannotMatchFreeSalesWithoutAuctionHouseOrSellerSignoff = 6017, + #[error("This sale requires a signer")] + SaleRequiresSigner = 6018, + #[error("Old seller not initialized")] + OldSellerNotInitialized = 6019, + #[error("Seller ata cannot have a delegate set")] + SellerAtaCannotHaveDelegate = 6020, + #[error("Buyer ata cannot have a delegate set")] + BuyerAtaCannotHaveDelegate = 6021, + #[error("No valid signer present")] + NoValidSignerPresent = 6022, + #[error("Invalid BP")] + InvalidBasisPoints = 6023, + #[error("Invalid notary")] + InvalidNotary = 6024, + #[error("Empty trade state")] + EmptyTradeState = 6025, + #[error("Invalid expiry")] + InvalidExpiry = 6026, + #[error("Invalid price")] + InvalidPrice = 6027, + #[error("Invalid remainning accounts without program_as_signer")] + InvalidRemainingAccountsWithoutProgramAsSigner = 6028, + #[error("Invalid bump")] + InvalidBump = 6029, + #[error("Invalid create auction house nonce")] + InvalidCreateAuctionHouseNonce = 6030, + #[error("Invalid account state")] + InvalidAccountState = 6031, + #[error("Invalid discriminator")] + InvalidDiscriminator = 6032, + #[error("Invalid platform fee bp")] + InvalidPlatformFeeBp = 6033, + #[error("Invalid token mint")] + InvalidTokenMint = 6034, + #[error("Invalid token standard")] + InvalidTokenStandard = 6035, + #[error("Deprecated")] + Deprecated = 6036, + #[error("Missing remaining account")] + MissingRemainingAccount = 6037, + #[error("Invalid trusted program or pda")] + InvalidTrustedProgramOrPda = 6038, +} +impl From for ProgramError { + fn from(e: M2Error) -> Self { + ProgramError::Custom(e as u32) + } +} +impl DecodeError for M2Error { + fn type_of() -> &'static str { + "M2Error" + } +} +impl PrintProgramError for M2Error { + fn print(&self) + where + E: 'static + + std::error::Error + + DecodeError + + PrintProgramError + + num_traits::FromPrimitive, + { + msg!(&self.to_string()); + } +} diff --git a/programs/m2_interface/src/instructions.rs b/programs/m2_interface/src/instructions.rs new file mode 100644 index 0000000..1908dcf --- /dev/null +++ b/programs/m2_interface/src/instructions.rs @@ -0,0 +1,6166 @@ +use crate::*; +use borsh::{BorshDeserialize, BorshSerialize}; +use solana_program::{ + account_info::AccountInfo, + entrypoint::ProgramResult, + instruction::{AccountMeta, Instruction}, + program::{invoke, invoke_signed}, + program_error::ProgramError, + pubkey::Pubkey, +}; +use std::io::Read; +#[derive(Clone, Debug, PartialEq)] +pub enum M2ProgramIx { + WithdrawFromTreasury(WithdrawFromTreasuryIxArgs), + UpdateAuctionHouse(UpdateAuctionHouseIxArgs), + CreateAuctionHouse(CreateAuctionHouseIxArgs), + Withdraw(WithdrawIxArgs), + Deposit(DepositIxArgs), + Sell(SellIxArgs), + CancelSell(CancelSellIxArgs), + Buy(BuyIxArgs), + BuyV2(BuyV2IxArgs), + CancelBuy(CancelBuyIxArgs), + OcpSell(OcpSellIxArgs), + OcpCancelSell, + OcpExecuteSaleV2(OcpExecuteSaleV2IxArgs), + ExecuteSaleV2(ExecuteSaleV2IxArgs), + Mip1Sell(Mip1SellIxArgs), + Mip1ExecuteSaleV2(Mip1ExecuteSaleV2IxArgs), + Mip1CancelSell, + WithdrawByMmm(WithdrawByMmmIxArgs), +} +impl M2ProgramIx { + pub fn deserialize(buf: &[u8]) -> std::io::Result { + let mut reader = buf; + let mut maybe_discm = [0u8; 8]; + reader.read_exact(&mut maybe_discm)?; + match maybe_discm { + WITHDRAW_FROM_TREASURY_IX_DISCM => Ok(Self::WithdrawFromTreasury( + WithdrawFromTreasuryIxArgs::deserialize(&mut reader)?, + )), + UPDATE_AUCTION_HOUSE_IX_DISCM => Ok(Self::UpdateAuctionHouse( + UpdateAuctionHouseIxArgs::deserialize(&mut reader)?, + )), + CREATE_AUCTION_HOUSE_IX_DISCM => Ok(Self::CreateAuctionHouse( + CreateAuctionHouseIxArgs::deserialize(&mut reader)?, + )), + WITHDRAW_IX_DISCM => Ok(Self::Withdraw(WithdrawIxArgs::deserialize(&mut reader)?)), + DEPOSIT_IX_DISCM => Ok(Self::Deposit(DepositIxArgs::deserialize(&mut reader)?)), + SELL_IX_DISCM => Ok(Self::Sell(SellIxArgs::deserialize(&mut reader)?)), + CANCEL_SELL_IX_DISCM => Ok(Self::CancelSell(CancelSellIxArgs::deserialize( + &mut reader, + )?)), + BUY_IX_DISCM => Ok(Self::Buy(BuyIxArgs::deserialize(&mut reader)?)), + BUY_V2_IX_DISCM => Ok(Self::BuyV2(BuyV2IxArgs::deserialize(&mut reader)?)), + CANCEL_BUY_IX_DISCM => Ok(Self::CancelBuy(CancelBuyIxArgs::deserialize(&mut reader)?)), + OCP_SELL_IX_DISCM => Ok(Self::OcpSell(OcpSellIxArgs::deserialize(&mut reader)?)), + OCP_CANCEL_SELL_IX_DISCM => Ok(Self::OcpCancelSell), + OCP_EXECUTE_SALE_V2_IX_DISCM => Ok(Self::OcpExecuteSaleV2( + OcpExecuteSaleV2IxArgs::deserialize(&mut reader)?, + )), + EXECUTE_SALE_V2_IX_DISCM => Ok(Self::ExecuteSaleV2(ExecuteSaleV2IxArgs::deserialize( + &mut reader, + )?)), + MIP1_SELL_IX_DISCM => Ok(Self::Mip1Sell(Mip1SellIxArgs::deserialize(&mut reader)?)), + MIP1_EXECUTE_SALE_V2_IX_DISCM => Ok(Self::Mip1ExecuteSaleV2( + Mip1ExecuteSaleV2IxArgs::deserialize(&mut reader)?, + )), + MIP1_CANCEL_SELL_IX_DISCM => Ok(Self::Mip1CancelSell), + WITHDRAW_BY_MMM_IX_DISCM => Ok(Self::WithdrawByMmm(WithdrawByMmmIxArgs::deserialize( + &mut reader, + )?)), + _ => Err(std::io::Error::new( + std::io::ErrorKind::Other, + format!("discm {:?} not found", maybe_discm), + )), + } + } + pub fn serialize(&self, mut writer: W) -> std::io::Result<()> { + match self { + Self::WithdrawFromTreasury(args) => { + writer.write_all(&WITHDRAW_FROM_TREASURY_IX_DISCM)?; + args.serialize(&mut writer) + } + Self::UpdateAuctionHouse(args) => { + writer.write_all(&UPDATE_AUCTION_HOUSE_IX_DISCM)?; + args.serialize(&mut writer) + } + Self::CreateAuctionHouse(args) => { + writer.write_all(&CREATE_AUCTION_HOUSE_IX_DISCM)?; + args.serialize(&mut writer) + } + Self::Withdraw(args) => { + writer.write_all(&WITHDRAW_IX_DISCM)?; + args.serialize(&mut writer) + } + Self::Deposit(args) => { + writer.write_all(&DEPOSIT_IX_DISCM)?; + args.serialize(&mut writer) + } + Self::Sell(args) => { + writer.write_all(&SELL_IX_DISCM)?; + args.serialize(&mut writer) + } + Self::CancelSell(args) => { + writer.write_all(&CANCEL_SELL_IX_DISCM)?; + args.serialize(&mut writer) + } + Self::Buy(args) => { + writer.write_all(&BUY_IX_DISCM)?; + args.serialize(&mut writer) + } + Self::BuyV2(args) => { + writer.write_all(&BUY_V2_IX_DISCM)?; + args.serialize(&mut writer) + } + Self::CancelBuy(args) => { + writer.write_all(&CANCEL_BUY_IX_DISCM)?; + args.serialize(&mut writer) + } + Self::OcpSell(args) => { + writer.write_all(&OCP_SELL_IX_DISCM)?; + args.serialize(&mut writer) + } + Self::OcpCancelSell => writer.write_all(&OCP_CANCEL_SELL_IX_DISCM), + Self::OcpExecuteSaleV2(args) => { + writer.write_all(&OCP_EXECUTE_SALE_V2_IX_DISCM)?; + args.serialize(&mut writer) + } + Self::ExecuteSaleV2(args) => { + writer.write_all(&EXECUTE_SALE_V2_IX_DISCM)?; + args.serialize(&mut writer) + } + Self::Mip1Sell(args) => { + writer.write_all(&MIP1_SELL_IX_DISCM)?; + args.serialize(&mut writer) + } + Self::Mip1ExecuteSaleV2(args) => { + writer.write_all(&MIP1_EXECUTE_SALE_V2_IX_DISCM)?; + args.serialize(&mut writer) + } + Self::Mip1CancelSell => writer.write_all(&MIP1_CANCEL_SELL_IX_DISCM), + Self::WithdrawByMmm(args) => { + writer.write_all(&WITHDRAW_BY_MMM_IX_DISCM)?; + args.serialize(&mut writer) + } + } + } + pub fn try_to_vec(&self) -> std::io::Result> { + let mut data = Vec::new(); + self.serialize(&mut data)?; + Ok(data) + } +} +fn invoke_instruction<'info, A: Into<[AccountInfo<'info>; N]>, const N: usize>( + ix: &Instruction, + accounts: A, +) -> ProgramResult { + let account_info: [AccountInfo<'info>; N] = accounts.into(); + invoke(ix, &account_info) +} +fn invoke_instruction_signed<'info, A: Into<[AccountInfo<'info>; N]>, const N: usize>( + ix: &Instruction, + accounts: A, + seeds: &[&[&[u8]]], +) -> ProgramResult { + let account_info: [AccountInfo<'info>; N] = accounts.into(); + invoke_signed(ix, &account_info, seeds) +} +pub const WITHDRAW_FROM_TREASURY_IX_ACCOUNTS_LEN: usize = 4; +#[derive(Copy, Clone, Debug)] +pub struct WithdrawFromTreasuryAccounts<'me, 'info> { + pub treasury_withdrawal_destination: &'me AccountInfo<'info>, + pub auction_house_treasury: &'me AccountInfo<'info>, + pub auction_house: &'me AccountInfo<'info>, + pub system_program: &'me AccountInfo<'info>, +} +#[derive(Copy, Clone, Debug, PartialEq)] +pub struct WithdrawFromTreasuryKeys { + pub treasury_withdrawal_destination: Pubkey, + pub auction_house_treasury: Pubkey, + pub auction_house: Pubkey, + pub system_program: Pubkey, +} +impl From> for WithdrawFromTreasuryKeys { + fn from(accounts: WithdrawFromTreasuryAccounts) -> Self { + Self { + treasury_withdrawal_destination: *accounts.treasury_withdrawal_destination.key, + auction_house_treasury: *accounts.auction_house_treasury.key, + auction_house: *accounts.auction_house.key, + system_program: *accounts.system_program.key, + } + } +} +impl From for [AccountMeta; WITHDRAW_FROM_TREASURY_IX_ACCOUNTS_LEN] { + fn from(keys: WithdrawFromTreasuryKeys) -> Self { + [ + AccountMeta { + pubkey: keys.treasury_withdrawal_destination, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.auction_house_treasury, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.auction_house, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.system_program, + is_signer: false, + is_writable: false, + }, + ] + } +} +impl From<[Pubkey; WITHDRAW_FROM_TREASURY_IX_ACCOUNTS_LEN]> for WithdrawFromTreasuryKeys { + fn from(pubkeys: [Pubkey; WITHDRAW_FROM_TREASURY_IX_ACCOUNTS_LEN]) -> Self { + Self { + treasury_withdrawal_destination: pubkeys[0], + auction_house_treasury: pubkeys[1], + auction_house: pubkeys[2], + system_program: pubkeys[3], + } + } +} +impl<'info> From> + for [AccountInfo<'info>; WITHDRAW_FROM_TREASURY_IX_ACCOUNTS_LEN] +{ + fn from(accounts: WithdrawFromTreasuryAccounts<'_, 'info>) -> Self { + [ + accounts.treasury_withdrawal_destination.clone(), + accounts.auction_house_treasury.clone(), + accounts.auction_house.clone(), + accounts.system_program.clone(), + ] + } +} +impl<'me, 'info> From<&'me [AccountInfo<'info>; WITHDRAW_FROM_TREASURY_IX_ACCOUNTS_LEN]> + for WithdrawFromTreasuryAccounts<'me, 'info> +{ + fn from(arr: &'me [AccountInfo<'info>; WITHDRAW_FROM_TREASURY_IX_ACCOUNTS_LEN]) -> Self { + Self { + treasury_withdrawal_destination: &arr[0], + auction_house_treasury: &arr[1], + auction_house: &arr[2], + system_program: &arr[3], + } + } +} +pub const WITHDRAW_FROM_TREASURY_IX_DISCM: [u8; 8] = [0, 164, 86, 76, 56, 72, 12, 170]; +#[derive(BorshDeserialize, BorshSerialize, Clone, Debug, PartialEq)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +pub struct WithdrawFromTreasuryIxArgs { + pub amount: u64, +} +#[derive(Clone, Debug, PartialEq)] +pub struct WithdrawFromTreasuryIxData(pub WithdrawFromTreasuryIxArgs); +impl From for WithdrawFromTreasuryIxData { + fn from(args: WithdrawFromTreasuryIxArgs) -> Self { + Self(args) + } +} +impl WithdrawFromTreasuryIxData { + pub fn deserialize(buf: &[u8]) -> std::io::Result { + let mut reader = buf; + let mut maybe_discm = [0u8; 8]; + reader.read_exact(&mut maybe_discm)?; + if maybe_discm != WITHDRAW_FROM_TREASURY_IX_DISCM { + return Err(std::io::Error::new( + std::io::ErrorKind::Other, + format!( + "discm does not match. Expected: {:?}. Received: {:?}", + WITHDRAW_FROM_TREASURY_IX_DISCM, maybe_discm + ), + )); + } + Ok(Self(WithdrawFromTreasuryIxArgs::deserialize(&mut reader)?)) + } + pub fn serialize(&self, mut writer: W) -> std::io::Result<()> { + writer.write_all(&WITHDRAW_FROM_TREASURY_IX_DISCM)?; + self.0.serialize(&mut writer) + } + pub fn try_to_vec(&self) -> std::io::Result> { + let mut data = Vec::new(); + self.serialize(&mut data)?; + Ok(data) + } +} +pub fn withdraw_from_treasury_ix_with_program_id( + program_id: Pubkey, + keys: WithdrawFromTreasuryKeys, + args: WithdrawFromTreasuryIxArgs, +) -> std::io::Result { + let metas: [AccountMeta; WITHDRAW_FROM_TREASURY_IX_ACCOUNTS_LEN] = keys.into(); + let data: WithdrawFromTreasuryIxData = args.into(); + Ok(Instruction { + program_id, + accounts: Vec::from(metas), + data: data.try_to_vec()?, + }) +} +pub fn withdraw_from_treasury_ix( + keys: WithdrawFromTreasuryKeys, + args: WithdrawFromTreasuryIxArgs, +) -> std::io::Result { + withdraw_from_treasury_ix_with_program_id(crate::ID, keys, args) +} +pub fn withdraw_from_treasury_invoke_with_program_id( + program_id: Pubkey, + accounts: WithdrawFromTreasuryAccounts<'_, '_>, + args: WithdrawFromTreasuryIxArgs, +) -> ProgramResult { + let keys: WithdrawFromTreasuryKeys = accounts.into(); + let ix = withdraw_from_treasury_ix_with_program_id(program_id, keys, args)?; + invoke_instruction(&ix, accounts) +} +pub fn withdraw_from_treasury_invoke( + accounts: WithdrawFromTreasuryAccounts<'_, '_>, + args: WithdrawFromTreasuryIxArgs, +) -> ProgramResult { + withdraw_from_treasury_invoke_with_program_id(crate::ID, accounts, args) +} +pub fn withdraw_from_treasury_invoke_signed_with_program_id( + program_id: Pubkey, + accounts: WithdrawFromTreasuryAccounts<'_, '_>, + args: WithdrawFromTreasuryIxArgs, + seeds: &[&[&[u8]]], +) -> ProgramResult { + let keys: WithdrawFromTreasuryKeys = accounts.into(); + let ix = withdraw_from_treasury_ix_with_program_id(program_id, keys, args)?; + invoke_instruction_signed(&ix, accounts, seeds) +} +pub fn withdraw_from_treasury_invoke_signed( + accounts: WithdrawFromTreasuryAccounts<'_, '_>, + args: WithdrawFromTreasuryIxArgs, + seeds: &[&[&[u8]]], +) -> ProgramResult { + withdraw_from_treasury_invoke_signed_with_program_id(crate::ID, accounts, args, seeds) +} +pub fn withdraw_from_treasury_verify_account_keys( + accounts: WithdrawFromTreasuryAccounts<'_, '_>, + keys: WithdrawFromTreasuryKeys, +) -> Result<(), (Pubkey, Pubkey)> { + for (actual, expected) in [ + ( + *accounts.treasury_withdrawal_destination.key, + keys.treasury_withdrawal_destination, + ), + ( + *accounts.auction_house_treasury.key, + keys.auction_house_treasury, + ), + (*accounts.auction_house.key, keys.auction_house), + (*accounts.system_program.key, keys.system_program), + ] { + if actual != expected { + return Err((actual, expected)); + } + } + Ok(()) +} +pub fn withdraw_from_treasury_verify_writable_privileges<'me, 'info>( + accounts: WithdrawFromTreasuryAccounts<'me, 'info>, +) -> Result<(), (&'me AccountInfo<'info>, ProgramError)> { + for should_be_writable in [ + accounts.treasury_withdrawal_destination, + accounts.auction_house_treasury, + ] { + if !should_be_writable.is_writable { + return Err((should_be_writable, ProgramError::InvalidAccountData)); + } + } + Ok(()) +} +pub fn withdraw_from_treasury_verify_account_privileges<'me, 'info>( + accounts: WithdrawFromTreasuryAccounts<'me, 'info>, +) -> Result<(), (&'me AccountInfo<'info>, ProgramError)> { + withdraw_from_treasury_verify_writable_privileges(accounts)?; + Ok(()) +} +pub const UPDATE_AUCTION_HOUSE_IX_ACCOUNTS_LEN: usize = 7; +#[derive(Copy, Clone, Debug)] +pub struct UpdateAuctionHouseAccounts<'me, 'info> { + pub payer: &'me AccountInfo<'info>, + pub notary: &'me AccountInfo<'info>, + pub authority: &'me AccountInfo<'info>, + pub new_authority: &'me AccountInfo<'info>, + pub treasury_withdrawal_destination: &'me AccountInfo<'info>, + pub auction_house: &'me AccountInfo<'info>, + pub system_program: &'me AccountInfo<'info>, +} +#[derive(Copy, Clone, Debug, PartialEq)] +pub struct UpdateAuctionHouseKeys { + pub payer: Pubkey, + pub notary: Pubkey, + pub authority: Pubkey, + pub new_authority: Pubkey, + pub treasury_withdrawal_destination: Pubkey, + pub auction_house: Pubkey, + pub system_program: Pubkey, +} +impl From> for UpdateAuctionHouseKeys { + fn from(accounts: UpdateAuctionHouseAccounts) -> Self { + Self { + payer: *accounts.payer.key, + notary: *accounts.notary.key, + authority: *accounts.authority.key, + new_authority: *accounts.new_authority.key, + treasury_withdrawal_destination: *accounts.treasury_withdrawal_destination.key, + auction_house: *accounts.auction_house.key, + system_program: *accounts.system_program.key, + } + } +} +impl From for [AccountMeta; UPDATE_AUCTION_HOUSE_IX_ACCOUNTS_LEN] { + fn from(keys: UpdateAuctionHouseKeys) -> Self { + [ + AccountMeta { + pubkey: keys.payer, + is_signer: true, + is_writable: false, + }, + AccountMeta { + pubkey: keys.notary, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.authority, + is_signer: true, + is_writable: false, + }, + AccountMeta { + pubkey: keys.new_authority, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.treasury_withdrawal_destination, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.auction_house, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.system_program, + is_signer: false, + is_writable: false, + }, + ] + } +} +impl From<[Pubkey; UPDATE_AUCTION_HOUSE_IX_ACCOUNTS_LEN]> for UpdateAuctionHouseKeys { + fn from(pubkeys: [Pubkey; UPDATE_AUCTION_HOUSE_IX_ACCOUNTS_LEN]) -> Self { + Self { + payer: pubkeys[0], + notary: pubkeys[1], + authority: pubkeys[2], + new_authority: pubkeys[3], + treasury_withdrawal_destination: pubkeys[4], + auction_house: pubkeys[5], + system_program: pubkeys[6], + } + } +} +impl<'info> From> + for [AccountInfo<'info>; UPDATE_AUCTION_HOUSE_IX_ACCOUNTS_LEN] +{ + fn from(accounts: UpdateAuctionHouseAccounts<'_, 'info>) -> Self { + [ + accounts.payer.clone(), + accounts.notary.clone(), + accounts.authority.clone(), + accounts.new_authority.clone(), + accounts.treasury_withdrawal_destination.clone(), + accounts.auction_house.clone(), + accounts.system_program.clone(), + ] + } +} +impl<'me, 'info> From<&'me [AccountInfo<'info>; UPDATE_AUCTION_HOUSE_IX_ACCOUNTS_LEN]> + for UpdateAuctionHouseAccounts<'me, 'info> +{ + fn from(arr: &'me [AccountInfo<'info>; UPDATE_AUCTION_HOUSE_IX_ACCOUNTS_LEN]) -> Self { + Self { + payer: &arr[0], + notary: &arr[1], + authority: &arr[2], + new_authority: &arr[3], + treasury_withdrawal_destination: &arr[4], + auction_house: &arr[5], + system_program: &arr[6], + } + } +} +pub const UPDATE_AUCTION_HOUSE_IX_DISCM: [u8; 8] = [84, 215, 2, 172, 241, 0, 245, 219]; +#[derive(BorshDeserialize, BorshSerialize, Clone, Debug, PartialEq)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +pub struct UpdateAuctionHouseIxArgs { + pub seller_fee_basis_points: Option, + pub buyer_referral_bp: Option, + pub seller_referral_bp: Option, + pub requires_notary: Option, + pub nprob: Option, +} +#[derive(Clone, Debug, PartialEq)] +pub struct UpdateAuctionHouseIxData(pub UpdateAuctionHouseIxArgs); +impl From for UpdateAuctionHouseIxData { + fn from(args: UpdateAuctionHouseIxArgs) -> Self { + Self(args) + } +} +impl UpdateAuctionHouseIxData { + pub fn deserialize(buf: &[u8]) -> std::io::Result { + let mut reader = buf; + let mut maybe_discm = [0u8; 8]; + reader.read_exact(&mut maybe_discm)?; + if maybe_discm != UPDATE_AUCTION_HOUSE_IX_DISCM { + return Err(std::io::Error::new( + std::io::ErrorKind::Other, + format!( + "discm does not match. Expected: {:?}. Received: {:?}", + UPDATE_AUCTION_HOUSE_IX_DISCM, maybe_discm + ), + )); + } + Ok(Self(UpdateAuctionHouseIxArgs::deserialize(&mut reader)?)) + } + pub fn serialize(&self, mut writer: W) -> std::io::Result<()> { + writer.write_all(&UPDATE_AUCTION_HOUSE_IX_DISCM)?; + self.0.serialize(&mut writer) + } + pub fn try_to_vec(&self) -> std::io::Result> { + let mut data = Vec::new(); + self.serialize(&mut data)?; + Ok(data) + } +} +pub fn update_auction_house_ix_with_program_id( + program_id: Pubkey, + keys: UpdateAuctionHouseKeys, + args: UpdateAuctionHouseIxArgs, +) -> std::io::Result { + let metas: [AccountMeta; UPDATE_AUCTION_HOUSE_IX_ACCOUNTS_LEN] = keys.into(); + let data: UpdateAuctionHouseIxData = args.into(); + Ok(Instruction { + program_id, + accounts: Vec::from(metas), + data: data.try_to_vec()?, + }) +} +pub fn update_auction_house_ix( + keys: UpdateAuctionHouseKeys, + args: UpdateAuctionHouseIxArgs, +) -> std::io::Result { + update_auction_house_ix_with_program_id(crate::ID, keys, args) +} +pub fn update_auction_house_invoke_with_program_id( + program_id: Pubkey, + accounts: UpdateAuctionHouseAccounts<'_, '_>, + args: UpdateAuctionHouseIxArgs, +) -> ProgramResult { + let keys: UpdateAuctionHouseKeys = accounts.into(); + let ix = update_auction_house_ix_with_program_id(program_id, keys, args)?; + invoke_instruction(&ix, accounts) +} +pub fn update_auction_house_invoke( + accounts: UpdateAuctionHouseAccounts<'_, '_>, + args: UpdateAuctionHouseIxArgs, +) -> ProgramResult { + update_auction_house_invoke_with_program_id(crate::ID, accounts, args) +} +pub fn update_auction_house_invoke_signed_with_program_id( + program_id: Pubkey, + accounts: UpdateAuctionHouseAccounts<'_, '_>, + args: UpdateAuctionHouseIxArgs, + seeds: &[&[&[u8]]], +) -> ProgramResult { + let keys: UpdateAuctionHouseKeys = accounts.into(); + let ix = update_auction_house_ix_with_program_id(program_id, keys, args)?; + invoke_instruction_signed(&ix, accounts, seeds) +} +pub fn update_auction_house_invoke_signed( + accounts: UpdateAuctionHouseAccounts<'_, '_>, + args: UpdateAuctionHouseIxArgs, + seeds: &[&[&[u8]]], +) -> ProgramResult { + update_auction_house_invoke_signed_with_program_id(crate::ID, accounts, args, seeds) +} +pub fn update_auction_house_verify_account_keys( + accounts: UpdateAuctionHouseAccounts<'_, '_>, + keys: UpdateAuctionHouseKeys, +) -> Result<(), (Pubkey, Pubkey)> { + for (actual, expected) in [ + (*accounts.payer.key, keys.payer), + (*accounts.notary.key, keys.notary), + (*accounts.authority.key, keys.authority), + (*accounts.new_authority.key, keys.new_authority), + ( + *accounts.treasury_withdrawal_destination.key, + keys.treasury_withdrawal_destination, + ), + (*accounts.auction_house.key, keys.auction_house), + (*accounts.system_program.key, keys.system_program), + ] { + if actual != expected { + return Err((actual, expected)); + } + } + Ok(()) +} +pub fn update_auction_house_verify_writable_privileges<'me, 'info>( + accounts: UpdateAuctionHouseAccounts<'me, 'info>, +) -> Result<(), (&'me AccountInfo<'info>, ProgramError)> { + for should_be_writable in [ + accounts.treasury_withdrawal_destination, + accounts.auction_house, + ] { + if !should_be_writable.is_writable { + return Err((should_be_writable, ProgramError::InvalidAccountData)); + } + } + Ok(()) +} +pub fn update_auction_house_verify_signer_privileges<'me, 'info>( + accounts: UpdateAuctionHouseAccounts<'me, 'info>, +) -> Result<(), (&'me AccountInfo<'info>, ProgramError)> { + for should_be_signer in [accounts.payer, accounts.authority] { + if !should_be_signer.is_signer { + return Err((should_be_signer, ProgramError::MissingRequiredSignature)); + } + } + Ok(()) +} +pub fn update_auction_house_verify_account_privileges<'me, 'info>( + accounts: UpdateAuctionHouseAccounts<'me, 'info>, +) -> Result<(), (&'me AccountInfo<'info>, ProgramError)> { + update_auction_house_verify_writable_privileges(accounts)?; + update_auction_house_verify_signer_privileges(accounts)?; + Ok(()) +} +pub const CREATE_AUCTION_HOUSE_IX_ACCOUNTS_LEN: usize = 7; +#[derive(Copy, Clone, Debug)] +pub struct CreateAuctionHouseAccounts<'me, 'info> { + pub payer: &'me AccountInfo<'info>, + pub notary: &'me AccountInfo<'info>, + pub authority: &'me AccountInfo<'info>, + pub treasury_withdrawal_destination: &'me AccountInfo<'info>, + pub auction_house: &'me AccountInfo<'info>, + pub auction_house_treasury: &'me AccountInfo<'info>, + pub system_program: &'me AccountInfo<'info>, +} +#[derive(Copy, Clone, Debug, PartialEq)] +pub struct CreateAuctionHouseKeys { + pub payer: Pubkey, + pub notary: Pubkey, + pub authority: Pubkey, + pub treasury_withdrawal_destination: Pubkey, + pub auction_house: Pubkey, + pub auction_house_treasury: Pubkey, + pub system_program: Pubkey, +} +impl From> for CreateAuctionHouseKeys { + fn from(accounts: CreateAuctionHouseAccounts) -> Self { + Self { + payer: *accounts.payer.key, + notary: *accounts.notary.key, + authority: *accounts.authority.key, + treasury_withdrawal_destination: *accounts.treasury_withdrawal_destination.key, + auction_house: *accounts.auction_house.key, + auction_house_treasury: *accounts.auction_house_treasury.key, + system_program: *accounts.system_program.key, + } + } +} +impl From for [AccountMeta; CREATE_AUCTION_HOUSE_IX_ACCOUNTS_LEN] { + fn from(keys: CreateAuctionHouseKeys) -> Self { + [ + AccountMeta { + pubkey: keys.payer, + is_signer: true, + is_writable: true, + }, + AccountMeta { + pubkey: keys.notary, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.authority, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.treasury_withdrawal_destination, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.auction_house, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.auction_house_treasury, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.system_program, + is_signer: false, + is_writable: false, + }, + ] + } +} +impl From<[Pubkey; CREATE_AUCTION_HOUSE_IX_ACCOUNTS_LEN]> for CreateAuctionHouseKeys { + fn from(pubkeys: [Pubkey; CREATE_AUCTION_HOUSE_IX_ACCOUNTS_LEN]) -> Self { + Self { + payer: pubkeys[0], + notary: pubkeys[1], + authority: pubkeys[2], + treasury_withdrawal_destination: pubkeys[3], + auction_house: pubkeys[4], + auction_house_treasury: pubkeys[5], + system_program: pubkeys[6], + } + } +} +impl<'info> From> + for [AccountInfo<'info>; CREATE_AUCTION_HOUSE_IX_ACCOUNTS_LEN] +{ + fn from(accounts: CreateAuctionHouseAccounts<'_, 'info>) -> Self { + [ + accounts.payer.clone(), + accounts.notary.clone(), + accounts.authority.clone(), + accounts.treasury_withdrawal_destination.clone(), + accounts.auction_house.clone(), + accounts.auction_house_treasury.clone(), + accounts.system_program.clone(), + ] + } +} +impl<'me, 'info> From<&'me [AccountInfo<'info>; CREATE_AUCTION_HOUSE_IX_ACCOUNTS_LEN]> + for CreateAuctionHouseAccounts<'me, 'info> +{ + fn from(arr: &'me [AccountInfo<'info>; CREATE_AUCTION_HOUSE_IX_ACCOUNTS_LEN]) -> Self { + Self { + payer: &arr[0], + notary: &arr[1], + authority: &arr[2], + treasury_withdrawal_destination: &arr[3], + auction_house: &arr[4], + auction_house_treasury: &arr[5], + system_program: &arr[6], + } + } +} +pub const CREATE_AUCTION_HOUSE_IX_DISCM: [u8; 8] = [221, 66, 242, 159, 249, 206, 134, 241]; +#[derive(BorshDeserialize, BorshSerialize, Clone, Debug, PartialEq)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +pub struct CreateAuctionHouseIxArgs { + pub bump: u8, + pub treasury_bump: u8, + pub seller_fee_basis_points: u16, + pub buyer_referral_bp: u16, + pub seller_referral_bp: u16, + pub requires_notary: bool, + pub create_auction_house_nonce: u64, +} +#[derive(Clone, Debug, PartialEq)] +pub struct CreateAuctionHouseIxData(pub CreateAuctionHouseIxArgs); +impl From for CreateAuctionHouseIxData { + fn from(args: CreateAuctionHouseIxArgs) -> Self { + Self(args) + } +} +impl CreateAuctionHouseIxData { + pub fn deserialize(buf: &[u8]) -> std::io::Result { + let mut reader = buf; + let mut maybe_discm = [0u8; 8]; + reader.read_exact(&mut maybe_discm)?; + if maybe_discm != CREATE_AUCTION_HOUSE_IX_DISCM { + return Err(std::io::Error::new( + std::io::ErrorKind::Other, + format!( + "discm does not match. Expected: {:?}. Received: {:?}", + CREATE_AUCTION_HOUSE_IX_DISCM, maybe_discm + ), + )); + } + Ok(Self(CreateAuctionHouseIxArgs::deserialize(&mut reader)?)) + } + pub fn serialize(&self, mut writer: W) -> std::io::Result<()> { + writer.write_all(&CREATE_AUCTION_HOUSE_IX_DISCM)?; + self.0.serialize(&mut writer) + } + pub fn try_to_vec(&self) -> std::io::Result> { + let mut data = Vec::new(); + self.serialize(&mut data)?; + Ok(data) + } +} +pub fn create_auction_house_ix_with_program_id( + program_id: Pubkey, + keys: CreateAuctionHouseKeys, + args: CreateAuctionHouseIxArgs, +) -> std::io::Result { + let metas: [AccountMeta; CREATE_AUCTION_HOUSE_IX_ACCOUNTS_LEN] = keys.into(); + let data: CreateAuctionHouseIxData = args.into(); + Ok(Instruction { + program_id, + accounts: Vec::from(metas), + data: data.try_to_vec()?, + }) +} +pub fn create_auction_house_ix( + keys: CreateAuctionHouseKeys, + args: CreateAuctionHouseIxArgs, +) -> std::io::Result { + create_auction_house_ix_with_program_id(crate::ID, keys, args) +} +pub fn create_auction_house_invoke_with_program_id( + program_id: Pubkey, + accounts: CreateAuctionHouseAccounts<'_, '_>, + args: CreateAuctionHouseIxArgs, +) -> ProgramResult { + let keys: CreateAuctionHouseKeys = accounts.into(); + let ix = create_auction_house_ix_with_program_id(program_id, keys, args)?; + invoke_instruction(&ix, accounts) +} +pub fn create_auction_house_invoke( + accounts: CreateAuctionHouseAccounts<'_, '_>, + args: CreateAuctionHouseIxArgs, +) -> ProgramResult { + create_auction_house_invoke_with_program_id(crate::ID, accounts, args) +} +pub fn create_auction_house_invoke_signed_with_program_id( + program_id: Pubkey, + accounts: CreateAuctionHouseAccounts<'_, '_>, + args: CreateAuctionHouseIxArgs, + seeds: &[&[&[u8]]], +) -> ProgramResult { + let keys: CreateAuctionHouseKeys = accounts.into(); + let ix = create_auction_house_ix_with_program_id(program_id, keys, args)?; + invoke_instruction_signed(&ix, accounts, seeds) +} +pub fn create_auction_house_invoke_signed( + accounts: CreateAuctionHouseAccounts<'_, '_>, + args: CreateAuctionHouseIxArgs, + seeds: &[&[&[u8]]], +) -> ProgramResult { + create_auction_house_invoke_signed_with_program_id(crate::ID, accounts, args, seeds) +} +pub fn create_auction_house_verify_account_keys( + accounts: CreateAuctionHouseAccounts<'_, '_>, + keys: CreateAuctionHouseKeys, +) -> Result<(), (Pubkey, Pubkey)> { + for (actual, expected) in [ + (*accounts.payer.key, keys.payer), + (*accounts.notary.key, keys.notary), + (*accounts.authority.key, keys.authority), + ( + *accounts.treasury_withdrawal_destination.key, + keys.treasury_withdrawal_destination, + ), + (*accounts.auction_house.key, keys.auction_house), + ( + *accounts.auction_house_treasury.key, + keys.auction_house_treasury, + ), + (*accounts.system_program.key, keys.system_program), + ] { + if actual != expected { + return Err((actual, expected)); + } + } + Ok(()) +} +pub fn create_auction_house_verify_writable_privileges<'me, 'info>( + accounts: CreateAuctionHouseAccounts<'me, 'info>, +) -> Result<(), (&'me AccountInfo<'info>, ProgramError)> { + for should_be_writable in [ + accounts.payer, + accounts.treasury_withdrawal_destination, + accounts.auction_house, + accounts.auction_house_treasury, + ] { + if !should_be_writable.is_writable { + return Err((should_be_writable, ProgramError::InvalidAccountData)); + } + } + Ok(()) +} +pub fn create_auction_house_verify_signer_privileges<'me, 'info>( + accounts: CreateAuctionHouseAccounts<'me, 'info>, +) -> Result<(), (&'me AccountInfo<'info>, ProgramError)> { + for should_be_signer in [accounts.payer] { + if !should_be_signer.is_signer { + return Err((should_be_signer, ProgramError::MissingRequiredSignature)); + } + } + Ok(()) +} +pub fn create_auction_house_verify_account_privileges<'me, 'info>( + accounts: CreateAuctionHouseAccounts<'me, 'info>, +) -> Result<(), (&'me AccountInfo<'info>, ProgramError)> { + create_auction_house_verify_writable_privileges(accounts)?; + create_auction_house_verify_signer_privileges(accounts)?; + Ok(()) +} +pub const WITHDRAW_IX_ACCOUNTS_LEN: usize = 6; +#[derive(Copy, Clone, Debug)] +pub struct WithdrawAccounts<'me, 'info> { + pub wallet: &'me AccountInfo<'info>, + pub notary: &'me AccountInfo<'info>, + pub escrow_payment_account: &'me AccountInfo<'info>, + pub authority: &'me AccountInfo<'info>, + pub auction_house: &'me AccountInfo<'info>, + pub system_program: &'me AccountInfo<'info>, +} +#[derive(Copy, Clone, Debug, PartialEq)] +pub struct WithdrawKeys { + pub wallet: Pubkey, + pub notary: Pubkey, + pub escrow_payment_account: Pubkey, + pub authority: Pubkey, + pub auction_house: Pubkey, + pub system_program: Pubkey, +} +impl From> for WithdrawKeys { + fn from(accounts: WithdrawAccounts) -> Self { + Self { + wallet: *accounts.wallet.key, + notary: *accounts.notary.key, + escrow_payment_account: *accounts.escrow_payment_account.key, + authority: *accounts.authority.key, + auction_house: *accounts.auction_house.key, + system_program: *accounts.system_program.key, + } + } +} +impl From for [AccountMeta; WITHDRAW_IX_ACCOUNTS_LEN] { + fn from(keys: WithdrawKeys) -> Self { + [ + AccountMeta { + pubkey: keys.wallet, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.notary, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.escrow_payment_account, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.authority, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.auction_house, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.system_program, + is_signer: false, + is_writable: false, + }, + ] + } +} +impl From<[Pubkey; WITHDRAW_IX_ACCOUNTS_LEN]> for WithdrawKeys { + fn from(pubkeys: [Pubkey; WITHDRAW_IX_ACCOUNTS_LEN]) -> Self { + Self { + wallet: pubkeys[0], + notary: pubkeys[1], + escrow_payment_account: pubkeys[2], + authority: pubkeys[3], + auction_house: pubkeys[4], + system_program: pubkeys[5], + } + } +} +impl<'info> From> for [AccountInfo<'info>; WITHDRAW_IX_ACCOUNTS_LEN] { + fn from(accounts: WithdrawAccounts<'_, 'info>) -> Self { + [ + accounts.wallet.clone(), + accounts.notary.clone(), + accounts.escrow_payment_account.clone(), + accounts.authority.clone(), + accounts.auction_house.clone(), + accounts.system_program.clone(), + ] + } +} +impl<'me, 'info> From<&'me [AccountInfo<'info>; WITHDRAW_IX_ACCOUNTS_LEN]> + for WithdrawAccounts<'me, 'info> +{ + fn from(arr: &'me [AccountInfo<'info>; WITHDRAW_IX_ACCOUNTS_LEN]) -> Self { + Self { + wallet: &arr[0], + notary: &arr[1], + escrow_payment_account: &arr[2], + authority: &arr[3], + auction_house: &arr[4], + system_program: &arr[5], + } + } +} +pub const WITHDRAW_IX_DISCM: [u8; 8] = [183, 18, 70, 156, 148, 109, 161, 34]; +#[derive(BorshDeserialize, BorshSerialize, Clone, Debug, PartialEq)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +pub struct WithdrawIxArgs { + pub escrow_payment_bump: u8, + pub amount: u64, +} +#[derive(Clone, Debug, PartialEq)] +pub struct WithdrawIxData(pub WithdrawIxArgs); +impl From for WithdrawIxData { + fn from(args: WithdrawIxArgs) -> Self { + Self(args) + } +} +impl WithdrawIxData { + pub fn deserialize(buf: &[u8]) -> std::io::Result { + let mut reader = buf; + let mut maybe_discm = [0u8; 8]; + reader.read_exact(&mut maybe_discm)?; + if maybe_discm != WITHDRAW_IX_DISCM { + return Err(std::io::Error::new( + std::io::ErrorKind::Other, + format!( + "discm does not match. Expected: {:?}. Received: {:?}", + WITHDRAW_IX_DISCM, maybe_discm + ), + )); + } + Ok(Self(WithdrawIxArgs::deserialize(&mut reader)?)) + } + pub fn serialize(&self, mut writer: W) -> std::io::Result<()> { + writer.write_all(&WITHDRAW_IX_DISCM)?; + self.0.serialize(&mut writer) + } + pub fn try_to_vec(&self) -> std::io::Result> { + let mut data = Vec::new(); + self.serialize(&mut data)?; + Ok(data) + } +} +pub fn withdraw_ix_with_program_id( + program_id: Pubkey, + keys: WithdrawKeys, + args: WithdrawIxArgs, +) -> std::io::Result { + let metas: [AccountMeta; WITHDRAW_IX_ACCOUNTS_LEN] = keys.into(); + let data: WithdrawIxData = args.into(); + Ok(Instruction { + program_id, + accounts: Vec::from(metas), + data: data.try_to_vec()?, + }) +} +pub fn withdraw_ix(keys: WithdrawKeys, args: WithdrawIxArgs) -> std::io::Result { + withdraw_ix_with_program_id(crate::ID, keys, args) +} +pub fn withdraw_invoke_with_program_id( + program_id: Pubkey, + accounts: WithdrawAccounts<'_, '_>, + args: WithdrawIxArgs, +) -> ProgramResult { + let keys: WithdrawKeys = accounts.into(); + let ix = withdraw_ix_with_program_id(program_id, keys, args)?; + invoke_instruction(&ix, accounts) +} +pub fn withdraw_invoke(accounts: WithdrawAccounts<'_, '_>, args: WithdrawIxArgs) -> ProgramResult { + withdraw_invoke_with_program_id(crate::ID, accounts, args) +} +pub fn withdraw_invoke_signed_with_program_id( + program_id: Pubkey, + accounts: WithdrawAccounts<'_, '_>, + args: WithdrawIxArgs, + seeds: &[&[&[u8]]], +) -> ProgramResult { + let keys: WithdrawKeys = accounts.into(); + let ix = withdraw_ix_with_program_id(program_id, keys, args)?; + invoke_instruction_signed(&ix, accounts, seeds) +} +pub fn withdraw_invoke_signed( + accounts: WithdrawAccounts<'_, '_>, + args: WithdrawIxArgs, + seeds: &[&[&[u8]]], +) -> ProgramResult { + withdraw_invoke_signed_with_program_id(crate::ID, accounts, args, seeds) +} +pub fn withdraw_verify_account_keys( + accounts: WithdrawAccounts<'_, '_>, + keys: WithdrawKeys, +) -> Result<(), (Pubkey, Pubkey)> { + for (actual, expected) in [ + (*accounts.wallet.key, keys.wallet), + (*accounts.notary.key, keys.notary), + ( + *accounts.escrow_payment_account.key, + keys.escrow_payment_account, + ), + (*accounts.authority.key, keys.authority), + (*accounts.auction_house.key, keys.auction_house), + (*accounts.system_program.key, keys.system_program), + ] { + if actual != expected { + return Err((actual, expected)); + } + } + Ok(()) +} +pub fn withdraw_verify_writable_privileges<'me, 'info>( + accounts: WithdrawAccounts<'me, 'info>, +) -> Result<(), (&'me AccountInfo<'info>, ProgramError)> { + for should_be_writable in [accounts.wallet, accounts.escrow_payment_account] { + if !should_be_writable.is_writable { + return Err((should_be_writable, ProgramError::InvalidAccountData)); + } + } + Ok(()) +} +pub fn withdraw_verify_account_privileges<'me, 'info>( + accounts: WithdrawAccounts<'me, 'info>, +) -> Result<(), (&'me AccountInfo<'info>, ProgramError)> { + withdraw_verify_writable_privileges(accounts)?; + Ok(()) +} +pub const DEPOSIT_IX_ACCOUNTS_LEN: usize = 6; +#[derive(Copy, Clone, Debug)] +pub struct DepositAccounts<'me, 'info> { + pub wallet: &'me AccountInfo<'info>, + pub notary: &'me AccountInfo<'info>, + pub escrow_payment_account: &'me AccountInfo<'info>, + pub authority: &'me AccountInfo<'info>, + pub auction_house: &'me AccountInfo<'info>, + pub system_program: &'me AccountInfo<'info>, +} +#[derive(Copy, Clone, Debug, PartialEq)] +pub struct DepositKeys { + pub wallet: Pubkey, + pub notary: Pubkey, + pub escrow_payment_account: Pubkey, + pub authority: Pubkey, + pub auction_house: Pubkey, + pub system_program: Pubkey, +} +impl From> for DepositKeys { + fn from(accounts: DepositAccounts) -> Self { + Self { + wallet: *accounts.wallet.key, + notary: *accounts.notary.key, + escrow_payment_account: *accounts.escrow_payment_account.key, + authority: *accounts.authority.key, + auction_house: *accounts.auction_house.key, + system_program: *accounts.system_program.key, + } + } +} +impl From for [AccountMeta; DEPOSIT_IX_ACCOUNTS_LEN] { + fn from(keys: DepositKeys) -> Self { + [ + AccountMeta { + pubkey: keys.wallet, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.notary, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.escrow_payment_account, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.authority, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.auction_house, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.system_program, + is_signer: false, + is_writable: false, + }, + ] + } +} +impl From<[Pubkey; DEPOSIT_IX_ACCOUNTS_LEN]> for DepositKeys { + fn from(pubkeys: [Pubkey; DEPOSIT_IX_ACCOUNTS_LEN]) -> Self { + Self { + wallet: pubkeys[0], + notary: pubkeys[1], + escrow_payment_account: pubkeys[2], + authority: pubkeys[3], + auction_house: pubkeys[4], + system_program: pubkeys[5], + } + } +} +impl<'info> From> for [AccountInfo<'info>; DEPOSIT_IX_ACCOUNTS_LEN] { + fn from(accounts: DepositAccounts<'_, 'info>) -> Self { + [ + accounts.wallet.clone(), + accounts.notary.clone(), + accounts.escrow_payment_account.clone(), + accounts.authority.clone(), + accounts.auction_house.clone(), + accounts.system_program.clone(), + ] + } +} +impl<'me, 'info> From<&'me [AccountInfo<'info>; DEPOSIT_IX_ACCOUNTS_LEN]> + for DepositAccounts<'me, 'info> +{ + fn from(arr: &'me [AccountInfo<'info>; DEPOSIT_IX_ACCOUNTS_LEN]) -> Self { + Self { + wallet: &arr[0], + notary: &arr[1], + escrow_payment_account: &arr[2], + authority: &arr[3], + auction_house: &arr[4], + system_program: &arr[5], + } + } +} +pub const DEPOSIT_IX_DISCM: [u8; 8] = [242, 35, 198, 137, 82, 225, 242, 182]; +#[derive(BorshDeserialize, BorshSerialize, Clone, Debug, PartialEq)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +pub struct DepositIxArgs { + pub escrow_payment_bump: u8, + pub amount: u64, +} +#[derive(Clone, Debug, PartialEq)] +pub struct DepositIxData(pub DepositIxArgs); +impl From for DepositIxData { + fn from(args: DepositIxArgs) -> Self { + Self(args) + } +} +impl DepositIxData { + pub fn deserialize(buf: &[u8]) -> std::io::Result { + let mut reader = buf; + let mut maybe_discm = [0u8; 8]; + reader.read_exact(&mut maybe_discm)?; + if maybe_discm != DEPOSIT_IX_DISCM { + return Err(std::io::Error::new( + std::io::ErrorKind::Other, + format!( + "discm does not match. Expected: {:?}. Received: {:?}", + DEPOSIT_IX_DISCM, maybe_discm + ), + )); + } + Ok(Self(DepositIxArgs::deserialize(&mut reader)?)) + } + pub fn serialize(&self, mut writer: W) -> std::io::Result<()> { + writer.write_all(&DEPOSIT_IX_DISCM)?; + self.0.serialize(&mut writer) + } + pub fn try_to_vec(&self) -> std::io::Result> { + let mut data = Vec::new(); + self.serialize(&mut data)?; + Ok(data) + } +} +pub fn deposit_ix_with_program_id( + program_id: Pubkey, + keys: DepositKeys, + args: DepositIxArgs, +) -> std::io::Result { + let metas: [AccountMeta; DEPOSIT_IX_ACCOUNTS_LEN] = keys.into(); + let data: DepositIxData = args.into(); + Ok(Instruction { + program_id, + accounts: Vec::from(metas), + data: data.try_to_vec()?, + }) +} +pub fn deposit_ix(keys: DepositKeys, args: DepositIxArgs) -> std::io::Result { + deposit_ix_with_program_id(crate::ID, keys, args) +} +pub fn deposit_invoke_with_program_id( + program_id: Pubkey, + accounts: DepositAccounts<'_, '_>, + args: DepositIxArgs, +) -> ProgramResult { + let keys: DepositKeys = accounts.into(); + let ix = deposit_ix_with_program_id(program_id, keys, args)?; + invoke_instruction(&ix, accounts) +} +pub fn deposit_invoke(accounts: DepositAccounts<'_, '_>, args: DepositIxArgs) -> ProgramResult { + deposit_invoke_with_program_id(crate::ID, accounts, args) +} +pub fn deposit_invoke_signed_with_program_id( + program_id: Pubkey, + accounts: DepositAccounts<'_, '_>, + args: DepositIxArgs, + seeds: &[&[&[u8]]], +) -> ProgramResult { + let keys: DepositKeys = accounts.into(); + let ix = deposit_ix_with_program_id(program_id, keys, args)?; + invoke_instruction_signed(&ix, accounts, seeds) +} +pub fn deposit_invoke_signed( + accounts: DepositAccounts<'_, '_>, + args: DepositIxArgs, + seeds: &[&[&[u8]]], +) -> ProgramResult { + deposit_invoke_signed_with_program_id(crate::ID, accounts, args, seeds) +} +pub fn deposit_verify_account_keys( + accounts: DepositAccounts<'_, '_>, + keys: DepositKeys, +) -> Result<(), (Pubkey, Pubkey)> { + for (actual, expected) in [ + (*accounts.wallet.key, keys.wallet), + (*accounts.notary.key, keys.notary), + ( + *accounts.escrow_payment_account.key, + keys.escrow_payment_account, + ), + (*accounts.authority.key, keys.authority), + (*accounts.auction_house.key, keys.auction_house), + (*accounts.system_program.key, keys.system_program), + ] { + if actual != expected { + return Err((actual, expected)); + } + } + Ok(()) +} +pub fn deposit_verify_writable_privileges<'me, 'info>( + accounts: DepositAccounts<'me, 'info>, +) -> Result<(), (&'me AccountInfo<'info>, ProgramError)> { + for should_be_writable in [accounts.wallet, accounts.escrow_payment_account] { + if !should_be_writable.is_writable { + return Err((should_be_writable, ProgramError::InvalidAccountData)); + } + } + Ok(()) +} +pub fn deposit_verify_account_privileges<'me, 'info>( + accounts: DepositAccounts<'me, 'info>, +) -> Result<(), (&'me AccountInfo<'info>, ProgramError)> { + deposit_verify_writable_privileges(accounts)?; + Ok(()) +} +pub const SELL_IX_ACCOUNTS_LEN: usize = 15; +#[derive(Copy, Clone, Debug)] +pub struct SellAccounts<'me, 'info> { + pub wallet: &'me AccountInfo<'info>, + pub notary: &'me AccountInfo<'info>, + pub token_account: &'me AccountInfo<'info>, + pub token_ata: &'me AccountInfo<'info>, + pub token_mint: &'me AccountInfo<'info>, + pub metadata: &'me AccountInfo<'info>, + pub authority: &'me AccountInfo<'info>, + pub auction_house: &'me AccountInfo<'info>, + pub seller_trade_state: &'me AccountInfo<'info>, + pub seller_referral: &'me AccountInfo<'info>, + pub token_program: &'me AccountInfo<'info>, + pub system_program: &'me AccountInfo<'info>, + pub ata_program: &'me AccountInfo<'info>, + pub program_as_signer: &'me AccountInfo<'info>, + pub rent: &'me AccountInfo<'info>, +} +#[derive(Copy, Clone, Debug, PartialEq)] +pub struct SellKeys { + pub wallet: Pubkey, + pub notary: Pubkey, + pub token_account: Pubkey, + pub token_ata: Pubkey, + pub token_mint: Pubkey, + pub metadata: Pubkey, + pub authority: Pubkey, + pub auction_house: Pubkey, + pub seller_trade_state: Pubkey, + pub seller_referral: Pubkey, + pub token_program: Pubkey, + pub system_program: Pubkey, + pub ata_program: Pubkey, + pub program_as_signer: Pubkey, + pub rent: Pubkey, +} +impl From> for SellKeys { + fn from(accounts: SellAccounts) -> Self { + Self { + wallet: *accounts.wallet.key, + notary: *accounts.notary.key, + token_account: *accounts.token_account.key, + token_ata: *accounts.token_ata.key, + token_mint: *accounts.token_mint.key, + metadata: *accounts.metadata.key, + authority: *accounts.authority.key, + auction_house: *accounts.auction_house.key, + seller_trade_state: *accounts.seller_trade_state.key, + seller_referral: *accounts.seller_referral.key, + token_program: *accounts.token_program.key, + system_program: *accounts.system_program.key, + ata_program: *accounts.ata_program.key, + program_as_signer: *accounts.program_as_signer.key, + rent: *accounts.rent.key, + } + } +} +impl From for [AccountMeta; SELL_IX_ACCOUNTS_LEN] { + fn from(keys: SellKeys) -> Self { + [ + AccountMeta { + pubkey: keys.wallet, + is_signer: true, + is_writable: true, + }, + AccountMeta { + pubkey: keys.notary, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.token_account, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.token_ata, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.token_mint, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.metadata, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.authority, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.auction_house, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.seller_trade_state, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.seller_referral, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.token_program, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.system_program, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.ata_program, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.program_as_signer, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.rent, + is_signer: false, + is_writable: false, + }, + ] + } +} +impl From<[Pubkey; SELL_IX_ACCOUNTS_LEN]> for SellKeys { + fn from(pubkeys: [Pubkey; SELL_IX_ACCOUNTS_LEN]) -> Self { + Self { + wallet: pubkeys[0], + notary: pubkeys[1], + token_account: pubkeys[2], + token_ata: pubkeys[3], + token_mint: pubkeys[4], + metadata: pubkeys[5], + authority: pubkeys[6], + auction_house: pubkeys[7], + seller_trade_state: pubkeys[8], + seller_referral: pubkeys[9], + token_program: pubkeys[10], + system_program: pubkeys[11], + ata_program: pubkeys[12], + program_as_signer: pubkeys[13], + rent: pubkeys[14], + } + } +} +impl<'info> From> for [AccountInfo<'info>; SELL_IX_ACCOUNTS_LEN] { + fn from(accounts: SellAccounts<'_, 'info>) -> Self { + [ + accounts.wallet.clone(), + accounts.notary.clone(), + accounts.token_account.clone(), + accounts.token_ata.clone(), + accounts.token_mint.clone(), + accounts.metadata.clone(), + accounts.authority.clone(), + accounts.auction_house.clone(), + accounts.seller_trade_state.clone(), + accounts.seller_referral.clone(), + accounts.token_program.clone(), + accounts.system_program.clone(), + accounts.ata_program.clone(), + accounts.program_as_signer.clone(), + accounts.rent.clone(), + ] + } +} +impl<'me, 'info> From<&'me [AccountInfo<'info>; SELL_IX_ACCOUNTS_LEN]> + for SellAccounts<'me, 'info> +{ + fn from(arr: &'me [AccountInfo<'info>; SELL_IX_ACCOUNTS_LEN]) -> Self { + Self { + wallet: &arr[0], + notary: &arr[1], + token_account: &arr[2], + token_ata: &arr[3], + token_mint: &arr[4], + metadata: &arr[5], + authority: &arr[6], + auction_house: &arr[7], + seller_trade_state: &arr[8], + seller_referral: &arr[9], + token_program: &arr[10], + system_program: &arr[11], + ata_program: &arr[12], + program_as_signer: &arr[13], + rent: &arr[14], + } + } +} +pub const SELL_IX_DISCM: [u8; 8] = [51, 230, 133, 164, 1, 127, 131, 173]; +#[derive(BorshDeserialize, BorshSerialize, Clone, Debug, PartialEq)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +pub struct SellIxArgs { + pub seller_state_bump: u8, + pub program_as_signer_bump: u8, + pub buyer_price: u64, + pub token_size: u64, + pub seller_state_expiry: i64, +} +#[derive(Clone, Debug, PartialEq)] +pub struct SellIxData(pub SellIxArgs); +impl From for SellIxData { + fn from(args: SellIxArgs) -> Self { + Self(args) + } +} +impl SellIxData { + pub fn deserialize(buf: &[u8]) -> std::io::Result { + let mut reader = buf; + let mut maybe_discm = [0u8; 8]; + reader.read_exact(&mut maybe_discm)?; + if maybe_discm != SELL_IX_DISCM { + return Err(std::io::Error::new( + std::io::ErrorKind::Other, + format!( + "discm does not match. Expected: {:?}. Received: {:?}", + SELL_IX_DISCM, maybe_discm + ), + )); + } + Ok(Self(SellIxArgs::deserialize(&mut reader)?)) + } + pub fn serialize(&self, mut writer: W) -> std::io::Result<()> { + writer.write_all(&SELL_IX_DISCM)?; + self.0.serialize(&mut writer) + } + pub fn try_to_vec(&self) -> std::io::Result> { + let mut data = Vec::new(); + self.serialize(&mut data)?; + Ok(data) + } +} +pub fn sell_ix_with_program_id( + program_id: Pubkey, + keys: SellKeys, + args: SellIxArgs, +) -> std::io::Result { + let metas: [AccountMeta; SELL_IX_ACCOUNTS_LEN] = keys.into(); + let data: SellIxData = args.into(); + Ok(Instruction { + program_id, + accounts: Vec::from(metas), + data: data.try_to_vec()?, + }) +} +pub fn sell_ix(keys: SellKeys, args: SellIxArgs) -> std::io::Result { + sell_ix_with_program_id(crate::ID, keys, args) +} +pub fn sell_invoke_with_program_id( + program_id: Pubkey, + accounts: SellAccounts<'_, '_>, + args: SellIxArgs, +) -> ProgramResult { + let keys: SellKeys = accounts.into(); + let ix = sell_ix_with_program_id(program_id, keys, args)?; + invoke_instruction(&ix, accounts) +} +pub fn sell_invoke(accounts: SellAccounts<'_, '_>, args: SellIxArgs) -> ProgramResult { + sell_invoke_with_program_id(crate::ID, accounts, args) +} +pub fn sell_invoke_signed_with_program_id( + program_id: Pubkey, + accounts: SellAccounts<'_, '_>, + args: SellIxArgs, + seeds: &[&[&[u8]]], +) -> ProgramResult { + let keys: SellKeys = accounts.into(); + let ix = sell_ix_with_program_id(program_id, keys, args)?; + invoke_instruction_signed(&ix, accounts, seeds) +} +pub fn sell_invoke_signed( + accounts: SellAccounts<'_, '_>, + args: SellIxArgs, + seeds: &[&[&[u8]]], +) -> ProgramResult { + sell_invoke_signed_with_program_id(crate::ID, accounts, args, seeds) +} +pub fn sell_verify_account_keys( + accounts: SellAccounts<'_, '_>, + keys: SellKeys, +) -> Result<(), (Pubkey, Pubkey)> { + for (actual, expected) in [ + (*accounts.wallet.key, keys.wallet), + (*accounts.notary.key, keys.notary), + (*accounts.token_account.key, keys.token_account), + (*accounts.token_ata.key, keys.token_ata), + (*accounts.token_mint.key, keys.token_mint), + (*accounts.metadata.key, keys.metadata), + (*accounts.authority.key, keys.authority), + (*accounts.auction_house.key, keys.auction_house), + (*accounts.seller_trade_state.key, keys.seller_trade_state), + (*accounts.seller_referral.key, keys.seller_referral), + (*accounts.token_program.key, keys.token_program), + (*accounts.system_program.key, keys.system_program), + (*accounts.ata_program.key, keys.ata_program), + (*accounts.program_as_signer.key, keys.program_as_signer), + (*accounts.rent.key, keys.rent), + ] { + if actual != expected { + return Err((actual, expected)); + } + } + Ok(()) +} +pub fn sell_verify_writable_privileges<'me, 'info>( + accounts: SellAccounts<'me, 'info>, +) -> Result<(), (&'me AccountInfo<'info>, ProgramError)> { + for should_be_writable in [ + accounts.wallet, + accounts.token_account, + accounts.token_ata, + accounts.seller_trade_state, + ] { + if !should_be_writable.is_writable { + return Err((should_be_writable, ProgramError::InvalidAccountData)); + } + } + Ok(()) +} +pub fn sell_verify_signer_privileges<'me, 'info>( + accounts: SellAccounts<'me, 'info>, +) -> Result<(), (&'me AccountInfo<'info>, ProgramError)> { + for should_be_signer in [accounts.wallet] { + if !should_be_signer.is_signer { + return Err((should_be_signer, ProgramError::MissingRequiredSignature)); + } + } + Ok(()) +} +pub fn sell_verify_account_privileges<'me, 'info>( + accounts: SellAccounts<'me, 'info>, +) -> Result<(), (&'me AccountInfo<'info>, ProgramError)> { + sell_verify_writable_privileges(accounts)?; + sell_verify_signer_privileges(accounts)?; + Ok(()) +} +pub const CANCEL_SELL_IX_ACCOUNTS_LEN: usize = 9; +#[derive(Copy, Clone, Debug)] +pub struct CancelSellAccounts<'me, 'info> { + pub wallet: &'me AccountInfo<'info>, + pub notary: &'me AccountInfo<'info>, + pub token_account: &'me AccountInfo<'info>, + pub token_mint: &'me AccountInfo<'info>, + pub authority: &'me AccountInfo<'info>, + pub auction_house: &'me AccountInfo<'info>, + pub seller_trade_state: &'me AccountInfo<'info>, + pub seller_referral: &'me AccountInfo<'info>, + pub token_program: &'me AccountInfo<'info>, +} +#[derive(Copy, Clone, Debug, PartialEq)] +pub struct CancelSellKeys { + pub wallet: Pubkey, + pub notary: Pubkey, + pub token_account: Pubkey, + pub token_mint: Pubkey, + pub authority: Pubkey, + pub auction_house: Pubkey, + pub seller_trade_state: Pubkey, + pub seller_referral: Pubkey, + pub token_program: Pubkey, +} +impl From> for CancelSellKeys { + fn from(accounts: CancelSellAccounts) -> Self { + Self { + wallet: *accounts.wallet.key, + notary: *accounts.notary.key, + token_account: *accounts.token_account.key, + token_mint: *accounts.token_mint.key, + authority: *accounts.authority.key, + auction_house: *accounts.auction_house.key, + seller_trade_state: *accounts.seller_trade_state.key, + seller_referral: *accounts.seller_referral.key, + token_program: *accounts.token_program.key, + } + } +} +impl From for [AccountMeta; CANCEL_SELL_IX_ACCOUNTS_LEN] { + fn from(keys: CancelSellKeys) -> Self { + [ + AccountMeta { + pubkey: keys.wallet, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.notary, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.token_account, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.token_mint, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.authority, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.auction_house, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.seller_trade_state, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.seller_referral, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.token_program, + is_signer: false, + is_writable: false, + }, + ] + } +} +impl From<[Pubkey; CANCEL_SELL_IX_ACCOUNTS_LEN]> for CancelSellKeys { + fn from(pubkeys: [Pubkey; CANCEL_SELL_IX_ACCOUNTS_LEN]) -> Self { + Self { + wallet: pubkeys[0], + notary: pubkeys[1], + token_account: pubkeys[2], + token_mint: pubkeys[3], + authority: pubkeys[4], + auction_house: pubkeys[5], + seller_trade_state: pubkeys[6], + seller_referral: pubkeys[7], + token_program: pubkeys[8], + } + } +} +impl<'info> From> + for [AccountInfo<'info>; CANCEL_SELL_IX_ACCOUNTS_LEN] +{ + fn from(accounts: CancelSellAccounts<'_, 'info>) -> Self { + [ + accounts.wallet.clone(), + accounts.notary.clone(), + accounts.token_account.clone(), + accounts.token_mint.clone(), + accounts.authority.clone(), + accounts.auction_house.clone(), + accounts.seller_trade_state.clone(), + accounts.seller_referral.clone(), + accounts.token_program.clone(), + ] + } +} +impl<'me, 'info> From<&'me [AccountInfo<'info>; CANCEL_SELL_IX_ACCOUNTS_LEN]> + for CancelSellAccounts<'me, 'info> +{ + fn from(arr: &'me [AccountInfo<'info>; CANCEL_SELL_IX_ACCOUNTS_LEN]) -> Self { + Self { + wallet: &arr[0], + notary: &arr[1], + token_account: &arr[2], + token_mint: &arr[3], + authority: &arr[4], + auction_house: &arr[5], + seller_trade_state: &arr[6], + seller_referral: &arr[7], + token_program: &arr[8], + } + } +} +pub const CANCEL_SELL_IX_DISCM: [u8; 8] = [198, 198, 130, 203, 163, 95, 175, 75]; +#[derive(BorshDeserialize, BorshSerialize, Clone, Debug, PartialEq)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +pub struct CancelSellIxArgs { + pub buyer_price: u64, + pub token_size: u64, + pub seller_state_expiry: i64, +} +#[derive(Clone, Debug, PartialEq)] +pub struct CancelSellIxData(pub CancelSellIxArgs); +impl From for CancelSellIxData { + fn from(args: CancelSellIxArgs) -> Self { + Self(args) + } +} +impl CancelSellIxData { + pub fn deserialize(buf: &[u8]) -> std::io::Result { + let mut reader = buf; + let mut maybe_discm = [0u8; 8]; + reader.read_exact(&mut maybe_discm)?; + if maybe_discm != CANCEL_SELL_IX_DISCM { + return Err(std::io::Error::new( + std::io::ErrorKind::Other, + format!( + "discm does not match. Expected: {:?}. Received: {:?}", + CANCEL_SELL_IX_DISCM, maybe_discm + ), + )); + } + Ok(Self(CancelSellIxArgs::deserialize(&mut reader)?)) + } + pub fn serialize(&self, mut writer: W) -> std::io::Result<()> { + writer.write_all(&CANCEL_SELL_IX_DISCM)?; + self.0.serialize(&mut writer) + } + pub fn try_to_vec(&self) -> std::io::Result> { + let mut data = Vec::new(); + self.serialize(&mut data)?; + Ok(data) + } +} +pub fn cancel_sell_ix_with_program_id( + program_id: Pubkey, + keys: CancelSellKeys, + args: CancelSellIxArgs, +) -> std::io::Result { + let metas: [AccountMeta; CANCEL_SELL_IX_ACCOUNTS_LEN] = keys.into(); + let data: CancelSellIxData = args.into(); + Ok(Instruction { + program_id, + accounts: Vec::from(metas), + data: data.try_to_vec()?, + }) +} +pub fn cancel_sell_ix( + keys: CancelSellKeys, + args: CancelSellIxArgs, +) -> std::io::Result { + cancel_sell_ix_with_program_id(crate::ID, keys, args) +} +pub fn cancel_sell_invoke_with_program_id( + program_id: Pubkey, + accounts: CancelSellAccounts<'_, '_>, + args: CancelSellIxArgs, +) -> ProgramResult { + let keys: CancelSellKeys = accounts.into(); + let ix = cancel_sell_ix_with_program_id(program_id, keys, args)?; + invoke_instruction(&ix, accounts) +} +pub fn cancel_sell_invoke( + accounts: CancelSellAccounts<'_, '_>, + args: CancelSellIxArgs, +) -> ProgramResult { + cancel_sell_invoke_with_program_id(crate::ID, accounts, args) +} +pub fn cancel_sell_invoke_signed_with_program_id( + program_id: Pubkey, + accounts: CancelSellAccounts<'_, '_>, + args: CancelSellIxArgs, + seeds: &[&[&[u8]]], +) -> ProgramResult { + let keys: CancelSellKeys = accounts.into(); + let ix = cancel_sell_ix_with_program_id(program_id, keys, args)?; + invoke_instruction_signed(&ix, accounts, seeds) +} +pub fn cancel_sell_invoke_signed( + accounts: CancelSellAccounts<'_, '_>, + args: CancelSellIxArgs, + seeds: &[&[&[u8]]], +) -> ProgramResult { + cancel_sell_invoke_signed_with_program_id(crate::ID, accounts, args, seeds) +} +pub fn cancel_sell_verify_account_keys( + accounts: CancelSellAccounts<'_, '_>, + keys: CancelSellKeys, +) -> Result<(), (Pubkey, Pubkey)> { + for (actual, expected) in [ + (*accounts.wallet.key, keys.wallet), + (*accounts.notary.key, keys.notary), + (*accounts.token_account.key, keys.token_account), + (*accounts.token_mint.key, keys.token_mint), + (*accounts.authority.key, keys.authority), + (*accounts.auction_house.key, keys.auction_house), + (*accounts.seller_trade_state.key, keys.seller_trade_state), + (*accounts.seller_referral.key, keys.seller_referral), + (*accounts.token_program.key, keys.token_program), + ] { + if actual != expected { + return Err((actual, expected)); + } + } + Ok(()) +} +pub fn cancel_sell_verify_writable_privileges<'me, 'info>( + accounts: CancelSellAccounts<'me, 'info>, +) -> Result<(), (&'me AccountInfo<'info>, ProgramError)> { + for should_be_writable in [ + accounts.wallet, + accounts.token_account, + accounts.seller_trade_state, + ] { + if !should_be_writable.is_writable { + return Err((should_be_writable, ProgramError::InvalidAccountData)); + } + } + Ok(()) +} +pub fn cancel_sell_verify_account_privileges<'me, 'info>( + accounts: CancelSellAccounts<'me, 'info>, +) -> Result<(), (&'me AccountInfo<'info>, ProgramError)> { + cancel_sell_verify_writable_privileges(accounts)?; + Ok(()) +} +pub const BUY_IX_ACCOUNTS_LEN: usize = 12; +#[derive(Copy, Clone, Debug)] +pub struct BuyAccounts<'me, 'info> { + pub wallet: &'me AccountInfo<'info>, + pub notary: &'me AccountInfo<'info>, + pub token_mint: &'me AccountInfo<'info>, + pub metadata: &'me AccountInfo<'info>, + pub escrow_payment_account: &'me AccountInfo<'info>, + pub authority: &'me AccountInfo<'info>, + pub auction_house: &'me AccountInfo<'info>, + pub buyer_trade_state: &'me AccountInfo<'info>, + pub buyer_referral: &'me AccountInfo<'info>, + pub token_program: &'me AccountInfo<'info>, + pub system_program: &'me AccountInfo<'info>, + pub rent: &'me AccountInfo<'info>, +} +#[derive(Copy, Clone, Debug, PartialEq)] +pub struct BuyKeys { + pub wallet: Pubkey, + pub notary: Pubkey, + pub token_mint: Pubkey, + pub metadata: Pubkey, + pub escrow_payment_account: Pubkey, + pub authority: Pubkey, + pub auction_house: Pubkey, + pub buyer_trade_state: Pubkey, + pub buyer_referral: Pubkey, + pub token_program: Pubkey, + pub system_program: Pubkey, + pub rent: Pubkey, +} +impl From> for BuyKeys { + fn from(accounts: BuyAccounts) -> Self { + Self { + wallet: *accounts.wallet.key, + notary: *accounts.notary.key, + token_mint: *accounts.token_mint.key, + metadata: *accounts.metadata.key, + escrow_payment_account: *accounts.escrow_payment_account.key, + authority: *accounts.authority.key, + auction_house: *accounts.auction_house.key, + buyer_trade_state: *accounts.buyer_trade_state.key, + buyer_referral: *accounts.buyer_referral.key, + token_program: *accounts.token_program.key, + system_program: *accounts.system_program.key, + rent: *accounts.rent.key, + } + } +} +impl From for [AccountMeta; BUY_IX_ACCOUNTS_LEN] { + fn from(keys: BuyKeys) -> Self { + [ + AccountMeta { + pubkey: keys.wallet, + is_signer: true, + is_writable: true, + }, + AccountMeta { + pubkey: keys.notary, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.token_mint, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.metadata, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.escrow_payment_account, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.authority, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.auction_house, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.buyer_trade_state, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.buyer_referral, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.token_program, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.system_program, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.rent, + is_signer: false, + is_writable: false, + }, + ] + } +} +impl From<[Pubkey; BUY_IX_ACCOUNTS_LEN]> for BuyKeys { + fn from(pubkeys: [Pubkey; BUY_IX_ACCOUNTS_LEN]) -> Self { + Self { + wallet: pubkeys[0], + notary: pubkeys[1], + token_mint: pubkeys[2], + metadata: pubkeys[3], + escrow_payment_account: pubkeys[4], + authority: pubkeys[5], + auction_house: pubkeys[6], + buyer_trade_state: pubkeys[7], + buyer_referral: pubkeys[8], + token_program: pubkeys[9], + system_program: pubkeys[10], + rent: pubkeys[11], + } + } +} +impl<'info> From> for [AccountInfo<'info>; BUY_IX_ACCOUNTS_LEN] { + fn from(accounts: BuyAccounts<'_, 'info>) -> Self { + [ + accounts.wallet.clone(), + accounts.notary.clone(), + accounts.token_mint.clone(), + accounts.metadata.clone(), + accounts.escrow_payment_account.clone(), + accounts.authority.clone(), + accounts.auction_house.clone(), + accounts.buyer_trade_state.clone(), + accounts.buyer_referral.clone(), + accounts.token_program.clone(), + accounts.system_program.clone(), + accounts.rent.clone(), + ] + } +} +impl<'me, 'info> From<&'me [AccountInfo<'info>; BUY_IX_ACCOUNTS_LEN]> for BuyAccounts<'me, 'info> { + fn from(arr: &'me [AccountInfo<'info>; BUY_IX_ACCOUNTS_LEN]) -> Self { + Self { + wallet: &arr[0], + notary: &arr[1], + token_mint: &arr[2], + metadata: &arr[3], + escrow_payment_account: &arr[4], + authority: &arr[5], + auction_house: &arr[6], + buyer_trade_state: &arr[7], + buyer_referral: &arr[8], + token_program: &arr[9], + system_program: &arr[10], + rent: &arr[11], + } + } +} +pub const BUY_IX_DISCM: [u8; 8] = [102, 6, 61, 18, 1, 218, 235, 234]; +#[derive(BorshDeserialize, BorshSerialize, Clone, Debug, PartialEq)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +pub struct BuyIxArgs { + pub buyer_state_bump: u8, + pub escrow_payment_bump: u8, + pub buyer_price: u64, + pub token_size: u64, + pub buyer_state_expiry: i64, +} +#[derive(Clone, Debug, PartialEq)] +pub struct BuyIxData(pub BuyIxArgs); +impl From for BuyIxData { + fn from(args: BuyIxArgs) -> Self { + Self(args) + } +} +impl BuyIxData { + pub fn deserialize(buf: &[u8]) -> std::io::Result { + let mut reader = buf; + let mut maybe_discm = [0u8; 8]; + reader.read_exact(&mut maybe_discm)?; + if maybe_discm != BUY_IX_DISCM { + return Err(std::io::Error::new( + std::io::ErrorKind::Other, + format!( + "discm does not match. Expected: {:?}. Received: {:?}", + BUY_IX_DISCM, maybe_discm + ), + )); + } + Ok(Self(BuyIxArgs::deserialize(&mut reader)?)) + } + pub fn serialize(&self, mut writer: W) -> std::io::Result<()> { + writer.write_all(&BUY_IX_DISCM)?; + self.0.serialize(&mut writer) + } + pub fn try_to_vec(&self) -> std::io::Result> { + let mut data = Vec::new(); + self.serialize(&mut data)?; + Ok(data) + } +} +pub fn buy_ix_with_program_id( + program_id: Pubkey, + keys: BuyKeys, + args: BuyIxArgs, +) -> std::io::Result { + let metas: [AccountMeta; BUY_IX_ACCOUNTS_LEN] = keys.into(); + let data: BuyIxData = args.into(); + Ok(Instruction { + program_id, + accounts: Vec::from(metas), + data: data.try_to_vec()?, + }) +} +pub fn buy_ix(keys: BuyKeys, args: BuyIxArgs) -> std::io::Result { + buy_ix_with_program_id(crate::ID, keys, args) +} +pub fn buy_invoke_with_program_id( + program_id: Pubkey, + accounts: BuyAccounts<'_, '_>, + args: BuyIxArgs, +) -> ProgramResult { + let keys: BuyKeys = accounts.into(); + let ix = buy_ix_with_program_id(program_id, keys, args)?; + invoke_instruction(&ix, accounts) +} +pub fn buy_invoke(accounts: BuyAccounts<'_, '_>, args: BuyIxArgs) -> ProgramResult { + buy_invoke_with_program_id(crate::ID, accounts, args) +} +pub fn buy_invoke_signed_with_program_id( + program_id: Pubkey, + accounts: BuyAccounts<'_, '_>, + args: BuyIxArgs, + seeds: &[&[&[u8]]], +) -> ProgramResult { + let keys: BuyKeys = accounts.into(); + let ix = buy_ix_with_program_id(program_id, keys, args)?; + invoke_instruction_signed(&ix, accounts, seeds) +} +pub fn buy_invoke_signed( + accounts: BuyAccounts<'_, '_>, + args: BuyIxArgs, + seeds: &[&[&[u8]]], +) -> ProgramResult { + buy_invoke_signed_with_program_id(crate::ID, accounts, args, seeds) +} +pub fn buy_verify_account_keys( + accounts: BuyAccounts<'_, '_>, + keys: BuyKeys, +) -> Result<(), (Pubkey, Pubkey)> { + for (actual, expected) in [ + (*accounts.wallet.key, keys.wallet), + (*accounts.notary.key, keys.notary), + (*accounts.token_mint.key, keys.token_mint), + (*accounts.metadata.key, keys.metadata), + ( + *accounts.escrow_payment_account.key, + keys.escrow_payment_account, + ), + (*accounts.authority.key, keys.authority), + (*accounts.auction_house.key, keys.auction_house), + (*accounts.buyer_trade_state.key, keys.buyer_trade_state), + (*accounts.buyer_referral.key, keys.buyer_referral), + (*accounts.token_program.key, keys.token_program), + (*accounts.system_program.key, keys.system_program), + (*accounts.rent.key, keys.rent), + ] { + if actual != expected { + return Err((actual, expected)); + } + } + Ok(()) +} +pub fn buy_verify_writable_privileges<'me, 'info>( + accounts: BuyAccounts<'me, 'info>, +) -> Result<(), (&'me AccountInfo<'info>, ProgramError)> { + for should_be_writable in [ + accounts.wallet, + accounts.escrow_payment_account, + accounts.buyer_trade_state, + ] { + if !should_be_writable.is_writable { + return Err((should_be_writable, ProgramError::InvalidAccountData)); + } + } + Ok(()) +} +pub fn buy_verify_signer_privileges<'me, 'info>( + accounts: BuyAccounts<'me, 'info>, +) -> Result<(), (&'me AccountInfo<'info>, ProgramError)> { + for should_be_signer in [accounts.wallet] { + if !should_be_signer.is_signer { + return Err((should_be_signer, ProgramError::MissingRequiredSignature)); + } + } + Ok(()) +} +pub fn buy_verify_account_privileges<'me, 'info>( + accounts: BuyAccounts<'me, 'info>, +) -> Result<(), (&'me AccountInfo<'info>, ProgramError)> { + buy_verify_writable_privileges(accounts)?; + buy_verify_signer_privileges(accounts)?; + Ok(()) +} +pub const BUY_V2_IX_ACCOUNTS_LEN: usize = 11; +#[derive(Copy, Clone, Debug)] +pub struct BuyV2Accounts<'me, 'info> { + pub wallet: &'me AccountInfo<'info>, + pub notary: &'me AccountInfo<'info>, + pub token_mint: &'me AccountInfo<'info>, + pub metadata: &'me AccountInfo<'info>, + pub escrow_payment_account: &'me AccountInfo<'info>, + pub authority: &'me AccountInfo<'info>, + pub auction_house: &'me AccountInfo<'info>, + pub buyer_trade_state: &'me AccountInfo<'info>, + pub buyer_referral: &'me AccountInfo<'info>, + pub token_program: &'me AccountInfo<'info>, + pub system_program: &'me AccountInfo<'info>, +} +#[derive(Copy, Clone, Debug, PartialEq)] +pub struct BuyV2Keys { + pub wallet: Pubkey, + pub notary: Pubkey, + pub token_mint: Pubkey, + pub metadata: Pubkey, + pub escrow_payment_account: Pubkey, + pub authority: Pubkey, + pub auction_house: Pubkey, + pub buyer_trade_state: Pubkey, + pub buyer_referral: Pubkey, + pub token_program: Pubkey, + pub system_program: Pubkey, +} +impl From> for BuyV2Keys { + fn from(accounts: BuyV2Accounts) -> Self { + Self { + wallet: *accounts.wallet.key, + notary: *accounts.notary.key, + token_mint: *accounts.token_mint.key, + metadata: *accounts.metadata.key, + escrow_payment_account: *accounts.escrow_payment_account.key, + authority: *accounts.authority.key, + auction_house: *accounts.auction_house.key, + buyer_trade_state: *accounts.buyer_trade_state.key, + buyer_referral: *accounts.buyer_referral.key, + token_program: *accounts.token_program.key, + system_program: *accounts.system_program.key, + } + } +} +impl From for [AccountMeta; BUY_V2_IX_ACCOUNTS_LEN] { + fn from(keys: BuyV2Keys) -> Self { + [ + AccountMeta { + pubkey: keys.wallet, + is_signer: true, + is_writable: true, + }, + AccountMeta { + pubkey: keys.notary, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.token_mint, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.metadata, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.escrow_payment_account, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.authority, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.auction_house, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.buyer_trade_state, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.buyer_referral, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.token_program, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.system_program, + is_signer: false, + is_writable: false, + }, + ] + } +} +impl From<[Pubkey; BUY_V2_IX_ACCOUNTS_LEN]> for BuyV2Keys { + fn from(pubkeys: [Pubkey; BUY_V2_IX_ACCOUNTS_LEN]) -> Self { + Self { + wallet: pubkeys[0], + notary: pubkeys[1], + token_mint: pubkeys[2], + metadata: pubkeys[3], + escrow_payment_account: pubkeys[4], + authority: pubkeys[5], + auction_house: pubkeys[6], + buyer_trade_state: pubkeys[7], + buyer_referral: pubkeys[8], + token_program: pubkeys[9], + system_program: pubkeys[10], + } + } +} +impl<'info> From> for [AccountInfo<'info>; BUY_V2_IX_ACCOUNTS_LEN] { + fn from(accounts: BuyV2Accounts<'_, 'info>) -> Self { + [ + accounts.wallet.clone(), + accounts.notary.clone(), + accounts.token_mint.clone(), + accounts.metadata.clone(), + accounts.escrow_payment_account.clone(), + accounts.authority.clone(), + accounts.auction_house.clone(), + accounts.buyer_trade_state.clone(), + accounts.buyer_referral.clone(), + accounts.token_program.clone(), + accounts.system_program.clone(), + ] + } +} +impl<'me, 'info> From<&'me [AccountInfo<'info>; BUY_V2_IX_ACCOUNTS_LEN]> + for BuyV2Accounts<'me, 'info> +{ + fn from(arr: &'me [AccountInfo<'info>; BUY_V2_IX_ACCOUNTS_LEN]) -> Self { + Self { + wallet: &arr[0], + notary: &arr[1], + token_mint: &arr[2], + metadata: &arr[3], + escrow_payment_account: &arr[4], + authority: &arr[5], + auction_house: &arr[6], + buyer_trade_state: &arr[7], + buyer_referral: &arr[8], + token_program: &arr[9], + system_program: &arr[10], + } + } +} +pub const BUY_V2_IX_DISCM: [u8; 8] = [184, 23, 238, 97, 103, 197, 211, 61]; +#[derive(BorshDeserialize, BorshSerialize, Clone, Debug, PartialEq)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +pub struct BuyV2IxArgs { + pub buyer_price: u64, + pub token_size: u64, + pub buyer_state_expiry: i64, + pub buyer_creator_royalty_bp: u16, + pub extra_args: Vec, +} +#[derive(Clone, Debug, PartialEq)] +pub struct BuyV2IxData(pub BuyV2IxArgs); +impl From for BuyV2IxData { + fn from(args: BuyV2IxArgs) -> Self { + Self(args) + } +} +impl BuyV2IxData { + pub fn deserialize(buf: &[u8]) -> std::io::Result { + let mut reader = buf; + let mut maybe_discm = [0u8; 8]; + reader.read_exact(&mut maybe_discm)?; + if maybe_discm != BUY_V2_IX_DISCM { + return Err(std::io::Error::new( + std::io::ErrorKind::Other, + format!( + "discm does not match. Expected: {:?}. Received: {:?}", + BUY_V2_IX_DISCM, maybe_discm + ), + )); + } + Ok(Self(BuyV2IxArgs::deserialize(&mut reader)?)) + } + pub fn serialize(&self, mut writer: W) -> std::io::Result<()> { + writer.write_all(&BUY_V2_IX_DISCM)?; + self.0.serialize(&mut writer) + } + pub fn try_to_vec(&self) -> std::io::Result> { + let mut data = Vec::new(); + self.serialize(&mut data)?; + Ok(data) + } +} +pub fn buy_v2_ix_with_program_id( + program_id: Pubkey, + keys: BuyV2Keys, + args: BuyV2IxArgs, +) -> std::io::Result { + let metas: [AccountMeta; BUY_V2_IX_ACCOUNTS_LEN] = keys.into(); + let data: BuyV2IxData = args.into(); + Ok(Instruction { + program_id, + accounts: Vec::from(metas), + data: data.try_to_vec()?, + }) +} +pub fn buy_v2_ix(keys: BuyV2Keys, args: BuyV2IxArgs) -> std::io::Result { + buy_v2_ix_with_program_id(crate::ID, keys, args) +} +pub fn buy_v2_invoke_with_program_id( + program_id: Pubkey, + accounts: BuyV2Accounts<'_, '_>, + args: BuyV2IxArgs, +) -> ProgramResult { + let keys: BuyV2Keys = accounts.into(); + let ix = buy_v2_ix_with_program_id(program_id, keys, args)?; + invoke_instruction(&ix, accounts) +} +pub fn buy_v2_invoke(accounts: BuyV2Accounts<'_, '_>, args: BuyV2IxArgs) -> ProgramResult { + buy_v2_invoke_with_program_id(crate::ID, accounts, args) +} +pub fn buy_v2_invoke_signed_with_program_id( + program_id: Pubkey, + accounts: BuyV2Accounts<'_, '_>, + args: BuyV2IxArgs, + seeds: &[&[&[u8]]], +) -> ProgramResult { + let keys: BuyV2Keys = accounts.into(); + let ix = buy_v2_ix_with_program_id(program_id, keys, args)?; + invoke_instruction_signed(&ix, accounts, seeds) +} +pub fn buy_v2_invoke_signed( + accounts: BuyV2Accounts<'_, '_>, + args: BuyV2IxArgs, + seeds: &[&[&[u8]]], +) -> ProgramResult { + buy_v2_invoke_signed_with_program_id(crate::ID, accounts, args, seeds) +} +pub fn buy_v2_verify_account_keys( + accounts: BuyV2Accounts<'_, '_>, + keys: BuyV2Keys, +) -> Result<(), (Pubkey, Pubkey)> { + for (actual, expected) in [ + (*accounts.wallet.key, keys.wallet), + (*accounts.notary.key, keys.notary), + (*accounts.token_mint.key, keys.token_mint), + (*accounts.metadata.key, keys.metadata), + ( + *accounts.escrow_payment_account.key, + keys.escrow_payment_account, + ), + (*accounts.authority.key, keys.authority), + (*accounts.auction_house.key, keys.auction_house), + (*accounts.buyer_trade_state.key, keys.buyer_trade_state), + (*accounts.buyer_referral.key, keys.buyer_referral), + (*accounts.token_program.key, keys.token_program), + (*accounts.system_program.key, keys.system_program), + ] { + if actual != expected { + return Err((actual, expected)); + } + } + Ok(()) +} +pub fn buy_v2_verify_writable_privileges<'me, 'info>( + accounts: BuyV2Accounts<'me, 'info>, +) -> Result<(), (&'me AccountInfo<'info>, ProgramError)> { + for should_be_writable in [ + accounts.wallet, + accounts.escrow_payment_account, + accounts.buyer_trade_state, + ] { + if !should_be_writable.is_writable { + return Err((should_be_writable, ProgramError::InvalidAccountData)); + } + } + Ok(()) +} +pub fn buy_v2_verify_signer_privileges<'me, 'info>( + accounts: BuyV2Accounts<'me, 'info>, +) -> Result<(), (&'me AccountInfo<'info>, ProgramError)> { + for should_be_signer in [accounts.wallet] { + if !should_be_signer.is_signer { + return Err((should_be_signer, ProgramError::MissingRequiredSignature)); + } + } + Ok(()) +} +pub fn buy_v2_verify_account_privileges<'me, 'info>( + accounts: BuyV2Accounts<'me, 'info>, +) -> Result<(), (&'me AccountInfo<'info>, ProgramError)> { + buy_v2_verify_writable_privileges(accounts)?; + buy_v2_verify_signer_privileges(accounts)?; + Ok(()) +} +pub const CANCEL_BUY_IX_ACCOUNTS_LEN: usize = 7; +#[derive(Copy, Clone, Debug)] +pub struct CancelBuyAccounts<'me, 'info> { + pub wallet: &'me AccountInfo<'info>, + pub notary: &'me AccountInfo<'info>, + pub token_mint: &'me AccountInfo<'info>, + pub authority: &'me AccountInfo<'info>, + pub auction_house: &'me AccountInfo<'info>, + pub buyer_trade_state: &'me AccountInfo<'info>, + pub buyer_referral: &'me AccountInfo<'info>, +} +#[derive(Copy, Clone, Debug, PartialEq)] +pub struct CancelBuyKeys { + pub wallet: Pubkey, + pub notary: Pubkey, + pub token_mint: Pubkey, + pub authority: Pubkey, + pub auction_house: Pubkey, + pub buyer_trade_state: Pubkey, + pub buyer_referral: Pubkey, +} +impl From> for CancelBuyKeys { + fn from(accounts: CancelBuyAccounts) -> Self { + Self { + wallet: *accounts.wallet.key, + notary: *accounts.notary.key, + token_mint: *accounts.token_mint.key, + authority: *accounts.authority.key, + auction_house: *accounts.auction_house.key, + buyer_trade_state: *accounts.buyer_trade_state.key, + buyer_referral: *accounts.buyer_referral.key, + } + } +} +impl From for [AccountMeta; CANCEL_BUY_IX_ACCOUNTS_LEN] { + fn from(keys: CancelBuyKeys) -> Self { + [ + AccountMeta { + pubkey: keys.wallet, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.notary, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.token_mint, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.authority, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.auction_house, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.buyer_trade_state, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.buyer_referral, + is_signer: false, + is_writable: false, + }, + ] + } +} +impl From<[Pubkey; CANCEL_BUY_IX_ACCOUNTS_LEN]> for CancelBuyKeys { + fn from(pubkeys: [Pubkey; CANCEL_BUY_IX_ACCOUNTS_LEN]) -> Self { + Self { + wallet: pubkeys[0], + notary: pubkeys[1], + token_mint: pubkeys[2], + authority: pubkeys[3], + auction_house: pubkeys[4], + buyer_trade_state: pubkeys[5], + buyer_referral: pubkeys[6], + } + } +} +impl<'info> From> + for [AccountInfo<'info>; CANCEL_BUY_IX_ACCOUNTS_LEN] +{ + fn from(accounts: CancelBuyAccounts<'_, 'info>) -> Self { + [ + accounts.wallet.clone(), + accounts.notary.clone(), + accounts.token_mint.clone(), + accounts.authority.clone(), + accounts.auction_house.clone(), + accounts.buyer_trade_state.clone(), + accounts.buyer_referral.clone(), + ] + } +} +impl<'me, 'info> From<&'me [AccountInfo<'info>; CANCEL_BUY_IX_ACCOUNTS_LEN]> + for CancelBuyAccounts<'me, 'info> +{ + fn from(arr: &'me [AccountInfo<'info>; CANCEL_BUY_IX_ACCOUNTS_LEN]) -> Self { + Self { + wallet: &arr[0], + notary: &arr[1], + token_mint: &arr[2], + authority: &arr[3], + auction_house: &arr[4], + buyer_trade_state: &arr[5], + buyer_referral: &arr[6], + } + } +} +pub const CANCEL_BUY_IX_DISCM: [u8; 8] = [238, 76, 36, 218, 132, 177, 224, 233]; +#[derive(BorshDeserialize, BorshSerialize, Clone, Debug, PartialEq)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +pub struct CancelBuyIxArgs { + pub buyer_price: u64, + pub token_size: u64, + pub buyer_state_expiry: i64, +} +#[derive(Clone, Debug, PartialEq)] +pub struct CancelBuyIxData(pub CancelBuyIxArgs); +impl From for CancelBuyIxData { + fn from(args: CancelBuyIxArgs) -> Self { + Self(args) + } +} +impl CancelBuyIxData { + pub fn deserialize(buf: &[u8]) -> std::io::Result { + let mut reader = buf; + let mut maybe_discm = [0u8; 8]; + reader.read_exact(&mut maybe_discm)?; + if maybe_discm != CANCEL_BUY_IX_DISCM { + return Err(std::io::Error::new( + std::io::ErrorKind::Other, + format!( + "discm does not match. Expected: {:?}. Received: {:?}", + CANCEL_BUY_IX_DISCM, maybe_discm + ), + )); + } + Ok(Self(CancelBuyIxArgs::deserialize(&mut reader)?)) + } + pub fn serialize(&self, mut writer: W) -> std::io::Result<()> { + writer.write_all(&CANCEL_BUY_IX_DISCM)?; + self.0.serialize(&mut writer) + } + pub fn try_to_vec(&self) -> std::io::Result> { + let mut data = Vec::new(); + self.serialize(&mut data)?; + Ok(data) + } +} +pub fn cancel_buy_ix_with_program_id( + program_id: Pubkey, + keys: CancelBuyKeys, + args: CancelBuyIxArgs, +) -> std::io::Result { + let metas: [AccountMeta; CANCEL_BUY_IX_ACCOUNTS_LEN] = keys.into(); + let data: CancelBuyIxData = args.into(); + Ok(Instruction { + program_id, + accounts: Vec::from(metas), + data: data.try_to_vec()?, + }) +} +pub fn cancel_buy_ix(keys: CancelBuyKeys, args: CancelBuyIxArgs) -> std::io::Result { + cancel_buy_ix_with_program_id(crate::ID, keys, args) +} +pub fn cancel_buy_invoke_with_program_id( + program_id: Pubkey, + accounts: CancelBuyAccounts<'_, '_>, + args: CancelBuyIxArgs, +) -> ProgramResult { + let keys: CancelBuyKeys = accounts.into(); + let ix = cancel_buy_ix_with_program_id(program_id, keys, args)?; + invoke_instruction(&ix, accounts) +} +pub fn cancel_buy_invoke( + accounts: CancelBuyAccounts<'_, '_>, + args: CancelBuyIxArgs, +) -> ProgramResult { + cancel_buy_invoke_with_program_id(crate::ID, accounts, args) +} +pub fn cancel_buy_invoke_signed_with_program_id( + program_id: Pubkey, + accounts: CancelBuyAccounts<'_, '_>, + args: CancelBuyIxArgs, + seeds: &[&[&[u8]]], +) -> ProgramResult { + let keys: CancelBuyKeys = accounts.into(); + let ix = cancel_buy_ix_with_program_id(program_id, keys, args)?; + invoke_instruction_signed(&ix, accounts, seeds) +} +pub fn cancel_buy_invoke_signed( + accounts: CancelBuyAccounts<'_, '_>, + args: CancelBuyIxArgs, + seeds: &[&[&[u8]]], +) -> ProgramResult { + cancel_buy_invoke_signed_with_program_id(crate::ID, accounts, args, seeds) +} +pub fn cancel_buy_verify_account_keys( + accounts: CancelBuyAccounts<'_, '_>, + keys: CancelBuyKeys, +) -> Result<(), (Pubkey, Pubkey)> { + for (actual, expected) in [ + (*accounts.wallet.key, keys.wallet), + (*accounts.notary.key, keys.notary), + (*accounts.token_mint.key, keys.token_mint), + (*accounts.authority.key, keys.authority), + (*accounts.auction_house.key, keys.auction_house), + (*accounts.buyer_trade_state.key, keys.buyer_trade_state), + (*accounts.buyer_referral.key, keys.buyer_referral), + ] { + if actual != expected { + return Err((actual, expected)); + } + } + Ok(()) +} +pub fn cancel_buy_verify_writable_privileges<'me, 'info>( + accounts: CancelBuyAccounts<'me, 'info>, +) -> Result<(), (&'me AccountInfo<'info>, ProgramError)> { + for should_be_writable in [ + accounts.wallet, + accounts.token_mint, + accounts.buyer_trade_state, + ] { + if !should_be_writable.is_writable { + return Err((should_be_writable, ProgramError::InvalidAccountData)); + } + } + Ok(()) +} +pub fn cancel_buy_verify_account_privileges<'me, 'info>( + accounts: CancelBuyAccounts<'me, 'info>, +) -> Result<(), (&'me AccountInfo<'info>, ProgramError)> { + cancel_buy_verify_writable_privileges(accounts)?; + Ok(()) +} +pub const OCP_SELL_IX_ACCOUNTS_LEN: usize = 18; +#[derive(Copy, Clone, Debug)] +pub struct OcpSellAccounts<'me, 'info> { + pub wallet: &'me AccountInfo<'info>, + pub notary: &'me AccountInfo<'info>, + pub program_as_signer: &'me AccountInfo<'info>, + pub token_ata: &'me AccountInfo<'info>, + pub token_mint: &'me AccountInfo<'info>, + pub metadata: &'me AccountInfo<'info>, + pub auction_house: &'me AccountInfo<'info>, + pub seller_trade_state: &'me AccountInfo<'info>, + pub seller_referral: &'me AccountInfo<'info>, + pub ocp_mint_state: &'me AccountInfo<'info>, + pub ocp_policy: &'me AccountInfo<'info>, + pub ocp_freeze_authority: &'me AccountInfo<'info>, + pub ocp_program: &'me AccountInfo<'info>, + pub cmt_program: &'me AccountInfo<'info>, + pub instructions: &'me AccountInfo<'info>, + pub token_program: &'me AccountInfo<'info>, + pub system_program: &'me AccountInfo<'info>, + pub rent: &'me AccountInfo<'info>, +} +#[derive(Copy, Clone, Debug, PartialEq)] +pub struct OcpSellKeys { + pub wallet: Pubkey, + pub notary: Pubkey, + pub program_as_signer: Pubkey, + pub token_ata: Pubkey, + pub token_mint: Pubkey, + pub metadata: Pubkey, + pub auction_house: Pubkey, + pub seller_trade_state: Pubkey, + pub seller_referral: Pubkey, + pub ocp_mint_state: Pubkey, + pub ocp_policy: Pubkey, + pub ocp_freeze_authority: Pubkey, + pub ocp_program: Pubkey, + pub cmt_program: Pubkey, + pub instructions: Pubkey, + pub token_program: Pubkey, + pub system_program: Pubkey, + pub rent: Pubkey, +} +impl From> for OcpSellKeys { + fn from(accounts: OcpSellAccounts) -> Self { + Self { + wallet: *accounts.wallet.key, + notary: *accounts.notary.key, + program_as_signer: *accounts.program_as_signer.key, + token_ata: *accounts.token_ata.key, + token_mint: *accounts.token_mint.key, + metadata: *accounts.metadata.key, + auction_house: *accounts.auction_house.key, + seller_trade_state: *accounts.seller_trade_state.key, + seller_referral: *accounts.seller_referral.key, + ocp_mint_state: *accounts.ocp_mint_state.key, + ocp_policy: *accounts.ocp_policy.key, + ocp_freeze_authority: *accounts.ocp_freeze_authority.key, + ocp_program: *accounts.ocp_program.key, + cmt_program: *accounts.cmt_program.key, + instructions: *accounts.instructions.key, + token_program: *accounts.token_program.key, + system_program: *accounts.system_program.key, + rent: *accounts.rent.key, + } + } +} +impl From for [AccountMeta; OCP_SELL_IX_ACCOUNTS_LEN] { + fn from(keys: OcpSellKeys) -> Self { + [ + AccountMeta { + pubkey: keys.wallet, + is_signer: true, + is_writable: true, + }, + AccountMeta { + pubkey: keys.notary, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.program_as_signer, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.token_ata, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.token_mint, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.metadata, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.auction_house, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.seller_trade_state, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.seller_referral, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.ocp_mint_state, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.ocp_policy, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.ocp_freeze_authority, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.ocp_program, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.cmt_program, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.instructions, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.token_program, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.system_program, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.rent, + is_signer: false, + is_writable: false, + }, + ] + } +} +impl From<[Pubkey; OCP_SELL_IX_ACCOUNTS_LEN]> for OcpSellKeys { + fn from(pubkeys: [Pubkey; OCP_SELL_IX_ACCOUNTS_LEN]) -> Self { + Self { + wallet: pubkeys[0], + notary: pubkeys[1], + program_as_signer: pubkeys[2], + token_ata: pubkeys[3], + token_mint: pubkeys[4], + metadata: pubkeys[5], + auction_house: pubkeys[6], + seller_trade_state: pubkeys[7], + seller_referral: pubkeys[8], + ocp_mint_state: pubkeys[9], + ocp_policy: pubkeys[10], + ocp_freeze_authority: pubkeys[11], + ocp_program: pubkeys[12], + cmt_program: pubkeys[13], + instructions: pubkeys[14], + token_program: pubkeys[15], + system_program: pubkeys[16], + rent: pubkeys[17], + } + } +} +impl<'info> From> for [AccountInfo<'info>; OCP_SELL_IX_ACCOUNTS_LEN] { + fn from(accounts: OcpSellAccounts<'_, 'info>) -> Self { + [ + accounts.wallet.clone(), + accounts.notary.clone(), + accounts.program_as_signer.clone(), + accounts.token_ata.clone(), + accounts.token_mint.clone(), + accounts.metadata.clone(), + accounts.auction_house.clone(), + accounts.seller_trade_state.clone(), + accounts.seller_referral.clone(), + accounts.ocp_mint_state.clone(), + accounts.ocp_policy.clone(), + accounts.ocp_freeze_authority.clone(), + accounts.ocp_program.clone(), + accounts.cmt_program.clone(), + accounts.instructions.clone(), + accounts.token_program.clone(), + accounts.system_program.clone(), + accounts.rent.clone(), + ] + } +} +impl<'me, 'info> From<&'me [AccountInfo<'info>; OCP_SELL_IX_ACCOUNTS_LEN]> + for OcpSellAccounts<'me, 'info> +{ + fn from(arr: &'me [AccountInfo<'info>; OCP_SELL_IX_ACCOUNTS_LEN]) -> Self { + Self { + wallet: &arr[0], + notary: &arr[1], + program_as_signer: &arr[2], + token_ata: &arr[3], + token_mint: &arr[4], + metadata: &arr[5], + auction_house: &arr[6], + seller_trade_state: &arr[7], + seller_referral: &arr[8], + ocp_mint_state: &arr[9], + ocp_policy: &arr[10], + ocp_freeze_authority: &arr[11], + ocp_program: &arr[12], + cmt_program: &arr[13], + instructions: &arr[14], + token_program: &arr[15], + system_program: &arr[16], + rent: &arr[17], + } + } +} +pub const OCP_SELL_IX_DISCM: [u8; 8] = [22, 41, 217, 220, 21, 104, 61, 99]; +#[derive(BorshDeserialize, BorshSerialize, Clone, Debug, PartialEq)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +pub struct OcpSellIxArgs { + pub args: OCPSellArgs, +} +#[derive(Clone, Debug, PartialEq)] +pub struct OcpSellIxData(pub OcpSellIxArgs); +impl From for OcpSellIxData { + fn from(args: OcpSellIxArgs) -> Self { + Self(args) + } +} +impl OcpSellIxData { + pub fn deserialize(buf: &[u8]) -> std::io::Result { + let mut reader = buf; + let mut maybe_discm = [0u8; 8]; + reader.read_exact(&mut maybe_discm)?; + if maybe_discm != OCP_SELL_IX_DISCM { + return Err(std::io::Error::new( + std::io::ErrorKind::Other, + format!( + "discm does not match. Expected: {:?}. Received: {:?}", + OCP_SELL_IX_DISCM, maybe_discm + ), + )); + } + Ok(Self(OcpSellIxArgs::deserialize(&mut reader)?)) + } + pub fn serialize(&self, mut writer: W) -> std::io::Result<()> { + writer.write_all(&OCP_SELL_IX_DISCM)?; + self.0.serialize(&mut writer) + } + pub fn try_to_vec(&self) -> std::io::Result> { + let mut data = Vec::new(); + self.serialize(&mut data)?; + Ok(data) + } +} +pub fn ocp_sell_ix_with_program_id( + program_id: Pubkey, + keys: OcpSellKeys, + args: OcpSellIxArgs, +) -> std::io::Result { + let metas: [AccountMeta; OCP_SELL_IX_ACCOUNTS_LEN] = keys.into(); + let data: OcpSellIxData = args.into(); + Ok(Instruction { + program_id, + accounts: Vec::from(metas), + data: data.try_to_vec()?, + }) +} +pub fn ocp_sell_ix(keys: OcpSellKeys, args: OcpSellIxArgs) -> std::io::Result { + ocp_sell_ix_with_program_id(crate::ID, keys, args) +} +pub fn ocp_sell_invoke_with_program_id( + program_id: Pubkey, + accounts: OcpSellAccounts<'_, '_>, + args: OcpSellIxArgs, +) -> ProgramResult { + let keys: OcpSellKeys = accounts.into(); + let ix = ocp_sell_ix_with_program_id(program_id, keys, args)?; + invoke_instruction(&ix, accounts) +} +pub fn ocp_sell_invoke(accounts: OcpSellAccounts<'_, '_>, args: OcpSellIxArgs) -> ProgramResult { + ocp_sell_invoke_with_program_id(crate::ID, accounts, args) +} +pub fn ocp_sell_invoke_signed_with_program_id( + program_id: Pubkey, + accounts: OcpSellAccounts<'_, '_>, + args: OcpSellIxArgs, + seeds: &[&[&[u8]]], +) -> ProgramResult { + let keys: OcpSellKeys = accounts.into(); + let ix = ocp_sell_ix_with_program_id(program_id, keys, args)?; + invoke_instruction_signed(&ix, accounts, seeds) +} +pub fn ocp_sell_invoke_signed( + accounts: OcpSellAccounts<'_, '_>, + args: OcpSellIxArgs, + seeds: &[&[&[u8]]], +) -> ProgramResult { + ocp_sell_invoke_signed_with_program_id(crate::ID, accounts, args, seeds) +} +pub fn ocp_sell_verify_account_keys( + accounts: OcpSellAccounts<'_, '_>, + keys: OcpSellKeys, +) -> Result<(), (Pubkey, Pubkey)> { + for (actual, expected) in [ + (*accounts.wallet.key, keys.wallet), + (*accounts.notary.key, keys.notary), + (*accounts.program_as_signer.key, keys.program_as_signer), + (*accounts.token_ata.key, keys.token_ata), + (*accounts.token_mint.key, keys.token_mint), + (*accounts.metadata.key, keys.metadata), + (*accounts.auction_house.key, keys.auction_house), + (*accounts.seller_trade_state.key, keys.seller_trade_state), + (*accounts.seller_referral.key, keys.seller_referral), + (*accounts.ocp_mint_state.key, keys.ocp_mint_state), + (*accounts.ocp_policy.key, keys.ocp_policy), + ( + *accounts.ocp_freeze_authority.key, + keys.ocp_freeze_authority, + ), + (*accounts.ocp_program.key, keys.ocp_program), + (*accounts.cmt_program.key, keys.cmt_program), + (*accounts.instructions.key, keys.instructions), + (*accounts.token_program.key, keys.token_program), + (*accounts.system_program.key, keys.system_program), + (*accounts.rent.key, keys.rent), + ] { + if actual != expected { + return Err((actual, expected)); + } + } + Ok(()) +} +pub fn ocp_sell_verify_writable_privileges<'me, 'info>( + accounts: OcpSellAccounts<'me, 'info>, +) -> Result<(), (&'me AccountInfo<'info>, ProgramError)> { + for should_be_writable in [ + accounts.wallet, + accounts.token_ata, + accounts.seller_trade_state, + accounts.ocp_mint_state, + ] { + if !should_be_writable.is_writable { + return Err((should_be_writable, ProgramError::InvalidAccountData)); + } + } + Ok(()) +} +pub fn ocp_sell_verify_signer_privileges<'me, 'info>( + accounts: OcpSellAccounts<'me, 'info>, +) -> Result<(), (&'me AccountInfo<'info>, ProgramError)> { + for should_be_signer in [accounts.wallet] { + if !should_be_signer.is_signer { + return Err((should_be_signer, ProgramError::MissingRequiredSignature)); + } + } + Ok(()) +} +pub fn ocp_sell_verify_account_privileges<'me, 'info>( + accounts: OcpSellAccounts<'me, 'info>, +) -> Result<(), (&'me AccountInfo<'info>, ProgramError)> { + ocp_sell_verify_writable_privileges(accounts)?; + ocp_sell_verify_signer_privileges(accounts)?; + Ok(()) +} +pub const OCP_CANCEL_SELL_IX_ACCOUNTS_LEN: usize = 17; +#[derive(Copy, Clone, Debug)] +pub struct OcpCancelSellAccounts<'me, 'info> { + pub wallet: &'me AccountInfo<'info>, + pub notary: &'me AccountInfo<'info>, + pub program_as_signer: &'me AccountInfo<'info>, + pub token_ata: &'me AccountInfo<'info>, + pub token_mint: &'me AccountInfo<'info>, + pub metadata: &'me AccountInfo<'info>, + pub auction_house: &'me AccountInfo<'info>, + pub seller_trade_state: &'me AccountInfo<'info>, + pub ocp_mint_state: &'me AccountInfo<'info>, + pub ocp_policy: &'me AccountInfo<'info>, + pub ocp_freeze_authority: &'me AccountInfo<'info>, + pub ocp_program: &'me AccountInfo<'info>, + pub cmt_program: &'me AccountInfo<'info>, + pub instructions: &'me AccountInfo<'info>, + pub token_program: &'me AccountInfo<'info>, + pub system_program: &'me AccountInfo<'info>, + pub rent: &'me AccountInfo<'info>, +} +#[derive(Copy, Clone, Debug, PartialEq)] +pub struct OcpCancelSellKeys { + pub wallet: Pubkey, + pub notary: Pubkey, + pub program_as_signer: Pubkey, + pub token_ata: Pubkey, + pub token_mint: Pubkey, + pub metadata: Pubkey, + pub auction_house: Pubkey, + pub seller_trade_state: Pubkey, + pub ocp_mint_state: Pubkey, + pub ocp_policy: Pubkey, + pub ocp_freeze_authority: Pubkey, + pub ocp_program: Pubkey, + pub cmt_program: Pubkey, + pub instructions: Pubkey, + pub token_program: Pubkey, + pub system_program: Pubkey, + pub rent: Pubkey, +} +impl From> for OcpCancelSellKeys { + fn from(accounts: OcpCancelSellAccounts) -> Self { + Self { + wallet: *accounts.wallet.key, + notary: *accounts.notary.key, + program_as_signer: *accounts.program_as_signer.key, + token_ata: *accounts.token_ata.key, + token_mint: *accounts.token_mint.key, + metadata: *accounts.metadata.key, + auction_house: *accounts.auction_house.key, + seller_trade_state: *accounts.seller_trade_state.key, + ocp_mint_state: *accounts.ocp_mint_state.key, + ocp_policy: *accounts.ocp_policy.key, + ocp_freeze_authority: *accounts.ocp_freeze_authority.key, + ocp_program: *accounts.ocp_program.key, + cmt_program: *accounts.cmt_program.key, + instructions: *accounts.instructions.key, + token_program: *accounts.token_program.key, + system_program: *accounts.system_program.key, + rent: *accounts.rent.key, + } + } +} +impl From for [AccountMeta; OCP_CANCEL_SELL_IX_ACCOUNTS_LEN] { + fn from(keys: OcpCancelSellKeys) -> Self { + [ + AccountMeta { + pubkey: keys.wallet, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.notary, + is_signer: true, + is_writable: false, + }, + AccountMeta { + pubkey: keys.program_as_signer, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.token_ata, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.token_mint, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.metadata, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.auction_house, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.seller_trade_state, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.ocp_mint_state, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.ocp_policy, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.ocp_freeze_authority, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.ocp_program, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.cmt_program, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.instructions, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.token_program, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.system_program, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.rent, + is_signer: false, + is_writable: false, + }, + ] + } +} +impl From<[Pubkey; OCP_CANCEL_SELL_IX_ACCOUNTS_LEN]> for OcpCancelSellKeys { + fn from(pubkeys: [Pubkey; OCP_CANCEL_SELL_IX_ACCOUNTS_LEN]) -> Self { + Self { + wallet: pubkeys[0], + notary: pubkeys[1], + program_as_signer: pubkeys[2], + token_ata: pubkeys[3], + token_mint: pubkeys[4], + metadata: pubkeys[5], + auction_house: pubkeys[6], + seller_trade_state: pubkeys[7], + ocp_mint_state: pubkeys[8], + ocp_policy: pubkeys[9], + ocp_freeze_authority: pubkeys[10], + ocp_program: pubkeys[11], + cmt_program: pubkeys[12], + instructions: pubkeys[13], + token_program: pubkeys[14], + system_program: pubkeys[15], + rent: pubkeys[16], + } + } +} +impl<'info> From> + for [AccountInfo<'info>; OCP_CANCEL_SELL_IX_ACCOUNTS_LEN] +{ + fn from(accounts: OcpCancelSellAccounts<'_, 'info>) -> Self { + [ + accounts.wallet.clone(), + accounts.notary.clone(), + accounts.program_as_signer.clone(), + accounts.token_ata.clone(), + accounts.token_mint.clone(), + accounts.metadata.clone(), + accounts.auction_house.clone(), + accounts.seller_trade_state.clone(), + accounts.ocp_mint_state.clone(), + accounts.ocp_policy.clone(), + accounts.ocp_freeze_authority.clone(), + accounts.ocp_program.clone(), + accounts.cmt_program.clone(), + accounts.instructions.clone(), + accounts.token_program.clone(), + accounts.system_program.clone(), + accounts.rent.clone(), + ] + } +} +impl<'me, 'info> From<&'me [AccountInfo<'info>; OCP_CANCEL_SELL_IX_ACCOUNTS_LEN]> + for OcpCancelSellAccounts<'me, 'info> +{ + fn from(arr: &'me [AccountInfo<'info>; OCP_CANCEL_SELL_IX_ACCOUNTS_LEN]) -> Self { + Self { + wallet: &arr[0], + notary: &arr[1], + program_as_signer: &arr[2], + token_ata: &arr[3], + token_mint: &arr[4], + metadata: &arr[5], + auction_house: &arr[6], + seller_trade_state: &arr[7], + ocp_mint_state: &arr[8], + ocp_policy: &arr[9], + ocp_freeze_authority: &arr[10], + ocp_program: &arr[11], + cmt_program: &arr[12], + instructions: &arr[13], + token_program: &arr[14], + system_program: &arr[15], + rent: &arr[16], + } + } +} +pub const OCP_CANCEL_SELL_IX_DISCM: [u8; 8] = [73, 4, 55, 246, 37, 155, 2, 166]; +#[derive(Clone, Debug, PartialEq)] +pub struct OcpCancelSellIxData; +impl OcpCancelSellIxData { + pub fn deserialize(buf: &[u8]) -> std::io::Result { + let mut reader = buf; + let mut maybe_discm = [0u8; 8]; + reader.read_exact(&mut maybe_discm)?; + if maybe_discm != OCP_CANCEL_SELL_IX_DISCM { + return Err(std::io::Error::new( + std::io::ErrorKind::Other, + format!( + "discm does not match. Expected: {:?}. Received: {:?}", + OCP_CANCEL_SELL_IX_DISCM, maybe_discm + ), + )); + } + Ok(Self) + } + pub fn serialize(&self, mut writer: W) -> std::io::Result<()> { + writer.write_all(&OCP_CANCEL_SELL_IX_DISCM) + } + pub fn try_to_vec(&self) -> std::io::Result> { + let mut data = Vec::new(); + self.serialize(&mut data)?; + Ok(data) + } +} +pub fn ocp_cancel_sell_ix_with_program_id( + program_id: Pubkey, + keys: OcpCancelSellKeys, +) -> std::io::Result { + let metas: [AccountMeta; OCP_CANCEL_SELL_IX_ACCOUNTS_LEN] = keys.into(); + Ok(Instruction { + program_id, + accounts: Vec::from(metas), + data: OcpCancelSellIxData.try_to_vec()?, + }) +} +pub fn ocp_cancel_sell_ix(keys: OcpCancelSellKeys) -> std::io::Result { + ocp_cancel_sell_ix_with_program_id(crate::ID, keys) +} +pub fn ocp_cancel_sell_invoke_with_program_id( + program_id: Pubkey, + accounts: OcpCancelSellAccounts<'_, '_>, +) -> ProgramResult { + let keys: OcpCancelSellKeys = accounts.into(); + let ix = ocp_cancel_sell_ix_with_program_id(program_id, keys)?; + invoke_instruction(&ix, accounts) +} +pub fn ocp_cancel_sell_invoke(accounts: OcpCancelSellAccounts<'_, '_>) -> ProgramResult { + ocp_cancel_sell_invoke_with_program_id(crate::ID, accounts) +} +pub fn ocp_cancel_sell_invoke_signed_with_program_id( + program_id: Pubkey, + accounts: OcpCancelSellAccounts<'_, '_>, + seeds: &[&[&[u8]]], +) -> ProgramResult { + let keys: OcpCancelSellKeys = accounts.into(); + let ix = ocp_cancel_sell_ix_with_program_id(program_id, keys)?; + invoke_instruction_signed(&ix, accounts, seeds) +} +pub fn ocp_cancel_sell_invoke_signed( + accounts: OcpCancelSellAccounts<'_, '_>, + seeds: &[&[&[u8]]], +) -> ProgramResult { + ocp_cancel_sell_invoke_signed_with_program_id(crate::ID, accounts, seeds) +} +pub fn ocp_cancel_sell_verify_account_keys( + accounts: OcpCancelSellAccounts<'_, '_>, + keys: OcpCancelSellKeys, +) -> Result<(), (Pubkey, Pubkey)> { + for (actual, expected) in [ + (*accounts.wallet.key, keys.wallet), + (*accounts.notary.key, keys.notary), + (*accounts.program_as_signer.key, keys.program_as_signer), + (*accounts.token_ata.key, keys.token_ata), + (*accounts.token_mint.key, keys.token_mint), + (*accounts.metadata.key, keys.metadata), + (*accounts.auction_house.key, keys.auction_house), + (*accounts.seller_trade_state.key, keys.seller_trade_state), + (*accounts.ocp_mint_state.key, keys.ocp_mint_state), + (*accounts.ocp_policy.key, keys.ocp_policy), + ( + *accounts.ocp_freeze_authority.key, + keys.ocp_freeze_authority, + ), + (*accounts.ocp_program.key, keys.ocp_program), + (*accounts.cmt_program.key, keys.cmt_program), + (*accounts.instructions.key, keys.instructions), + (*accounts.token_program.key, keys.token_program), + (*accounts.system_program.key, keys.system_program), + (*accounts.rent.key, keys.rent), + ] { + if actual != expected { + return Err((actual, expected)); + } + } + Ok(()) +} +pub fn ocp_cancel_sell_verify_writable_privileges<'me, 'info>( + accounts: OcpCancelSellAccounts<'me, 'info>, +) -> Result<(), (&'me AccountInfo<'info>, ProgramError)> { + for should_be_writable in [ + accounts.wallet, + accounts.token_ata, + accounts.seller_trade_state, + accounts.ocp_mint_state, + ] { + if !should_be_writable.is_writable { + return Err((should_be_writable, ProgramError::InvalidAccountData)); + } + } + Ok(()) +} +pub fn ocp_cancel_sell_verify_signer_privileges<'me, 'info>( + accounts: OcpCancelSellAccounts<'me, 'info>, +) -> Result<(), (&'me AccountInfo<'info>, ProgramError)> { + for should_be_signer in [accounts.notary] { + if !should_be_signer.is_signer { + return Err((should_be_signer, ProgramError::MissingRequiredSignature)); + } + } + Ok(()) +} +pub fn ocp_cancel_sell_verify_account_privileges<'me, 'info>( + accounts: OcpCancelSellAccounts<'me, 'info>, +) -> Result<(), (&'me AccountInfo<'info>, ProgramError)> { + ocp_cancel_sell_verify_writable_privileges(accounts)?; + ocp_cancel_sell_verify_signer_privileges(accounts)?; + Ok(()) +} +pub const OCP_EXECUTE_SALE_V2_IX_ACCOUNTS_LEN: usize = 26; +#[derive(Copy, Clone, Debug)] +pub struct OcpExecuteSaleV2Accounts<'me, 'info> { + pub payer: &'me AccountInfo<'info>, + pub buyer: &'me AccountInfo<'info>, + pub seller: &'me AccountInfo<'info>, + pub notary: &'me AccountInfo<'info>, + pub program_as_signer: &'me AccountInfo<'info>, + pub seller_token_ata: &'me AccountInfo<'info>, + pub buyer_token_ata: &'me AccountInfo<'info>, + pub token_mint: &'me AccountInfo<'info>, + pub metadata: &'me AccountInfo<'info>, + pub auction_house: &'me AccountInfo<'info>, + pub auction_house_treasury: &'me AccountInfo<'info>, + pub seller_trade_state: &'me AccountInfo<'info>, + pub buyer_trade_state: &'me AccountInfo<'info>, + pub buyer_escrow_payment_account: &'me AccountInfo<'info>, + pub buyer_referral: &'me AccountInfo<'info>, + pub seller_referral: &'me AccountInfo<'info>, + pub ocp_mint_state: &'me AccountInfo<'info>, + pub ocp_policy: &'me AccountInfo<'info>, + pub ocp_freeze_authority: &'me AccountInfo<'info>, + pub ocp_program: &'me AccountInfo<'info>, + pub cmt_program: &'me AccountInfo<'info>, + pub instructions: &'me AccountInfo<'info>, + pub associated_token_program: &'me AccountInfo<'info>, + pub token_program: &'me AccountInfo<'info>, + pub system_program: &'me AccountInfo<'info>, + pub rent: &'me AccountInfo<'info>, +} +#[derive(Copy, Clone, Debug, PartialEq)] +pub struct OcpExecuteSaleV2Keys { + pub payer: Pubkey, + pub buyer: Pubkey, + pub seller: Pubkey, + pub notary: Pubkey, + pub program_as_signer: Pubkey, + pub seller_token_ata: Pubkey, + pub buyer_token_ata: Pubkey, + pub token_mint: Pubkey, + pub metadata: Pubkey, + pub auction_house: Pubkey, + pub auction_house_treasury: Pubkey, + pub seller_trade_state: Pubkey, + pub buyer_trade_state: Pubkey, + pub buyer_escrow_payment_account: Pubkey, + pub buyer_referral: Pubkey, + pub seller_referral: Pubkey, + pub ocp_mint_state: Pubkey, + pub ocp_policy: Pubkey, + pub ocp_freeze_authority: Pubkey, + pub ocp_program: Pubkey, + pub cmt_program: Pubkey, + pub instructions: Pubkey, + pub associated_token_program: Pubkey, + pub token_program: Pubkey, + pub system_program: Pubkey, + pub rent: Pubkey, +} +impl From> for OcpExecuteSaleV2Keys { + fn from(accounts: OcpExecuteSaleV2Accounts) -> Self { + Self { + payer: *accounts.payer.key, + buyer: *accounts.buyer.key, + seller: *accounts.seller.key, + notary: *accounts.notary.key, + program_as_signer: *accounts.program_as_signer.key, + seller_token_ata: *accounts.seller_token_ata.key, + buyer_token_ata: *accounts.buyer_token_ata.key, + token_mint: *accounts.token_mint.key, + metadata: *accounts.metadata.key, + auction_house: *accounts.auction_house.key, + auction_house_treasury: *accounts.auction_house_treasury.key, + seller_trade_state: *accounts.seller_trade_state.key, + buyer_trade_state: *accounts.buyer_trade_state.key, + buyer_escrow_payment_account: *accounts.buyer_escrow_payment_account.key, + buyer_referral: *accounts.buyer_referral.key, + seller_referral: *accounts.seller_referral.key, + ocp_mint_state: *accounts.ocp_mint_state.key, + ocp_policy: *accounts.ocp_policy.key, + ocp_freeze_authority: *accounts.ocp_freeze_authority.key, + ocp_program: *accounts.ocp_program.key, + cmt_program: *accounts.cmt_program.key, + instructions: *accounts.instructions.key, + associated_token_program: *accounts.associated_token_program.key, + token_program: *accounts.token_program.key, + system_program: *accounts.system_program.key, + rent: *accounts.rent.key, + } + } +} +impl From for [AccountMeta; OCP_EXECUTE_SALE_V2_IX_ACCOUNTS_LEN] { + fn from(keys: OcpExecuteSaleV2Keys) -> Self { + [ + AccountMeta { + pubkey: keys.payer, + is_signer: true, + is_writable: true, + }, + AccountMeta { + pubkey: keys.buyer, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.seller, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.notary, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.program_as_signer, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.seller_token_ata, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.buyer_token_ata, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.token_mint, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.metadata, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.auction_house, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.auction_house_treasury, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.seller_trade_state, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.buyer_trade_state, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.buyer_escrow_payment_account, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.buyer_referral, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.seller_referral, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.ocp_mint_state, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.ocp_policy, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.ocp_freeze_authority, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.ocp_program, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.cmt_program, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.instructions, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.associated_token_program, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.token_program, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.system_program, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.rent, + is_signer: false, + is_writable: false, + }, + ] + } +} +impl From<[Pubkey; OCP_EXECUTE_SALE_V2_IX_ACCOUNTS_LEN]> for OcpExecuteSaleV2Keys { + fn from(pubkeys: [Pubkey; OCP_EXECUTE_SALE_V2_IX_ACCOUNTS_LEN]) -> Self { + Self { + payer: pubkeys[0], + buyer: pubkeys[1], + seller: pubkeys[2], + notary: pubkeys[3], + program_as_signer: pubkeys[4], + seller_token_ata: pubkeys[5], + buyer_token_ata: pubkeys[6], + token_mint: pubkeys[7], + metadata: pubkeys[8], + auction_house: pubkeys[9], + auction_house_treasury: pubkeys[10], + seller_trade_state: pubkeys[11], + buyer_trade_state: pubkeys[12], + buyer_escrow_payment_account: pubkeys[13], + buyer_referral: pubkeys[14], + seller_referral: pubkeys[15], + ocp_mint_state: pubkeys[16], + ocp_policy: pubkeys[17], + ocp_freeze_authority: pubkeys[18], + ocp_program: pubkeys[19], + cmt_program: pubkeys[20], + instructions: pubkeys[21], + associated_token_program: pubkeys[22], + token_program: pubkeys[23], + system_program: pubkeys[24], + rent: pubkeys[25], + } + } +} +impl<'info> From> + for [AccountInfo<'info>; OCP_EXECUTE_SALE_V2_IX_ACCOUNTS_LEN] +{ + fn from(accounts: OcpExecuteSaleV2Accounts<'_, 'info>) -> Self { + [ + accounts.payer.clone(), + accounts.buyer.clone(), + accounts.seller.clone(), + accounts.notary.clone(), + accounts.program_as_signer.clone(), + accounts.seller_token_ata.clone(), + accounts.buyer_token_ata.clone(), + accounts.token_mint.clone(), + accounts.metadata.clone(), + accounts.auction_house.clone(), + accounts.auction_house_treasury.clone(), + accounts.seller_trade_state.clone(), + accounts.buyer_trade_state.clone(), + accounts.buyer_escrow_payment_account.clone(), + accounts.buyer_referral.clone(), + accounts.seller_referral.clone(), + accounts.ocp_mint_state.clone(), + accounts.ocp_policy.clone(), + accounts.ocp_freeze_authority.clone(), + accounts.ocp_program.clone(), + accounts.cmt_program.clone(), + accounts.instructions.clone(), + accounts.associated_token_program.clone(), + accounts.token_program.clone(), + accounts.system_program.clone(), + accounts.rent.clone(), + ] + } +} +impl<'me, 'info> From<&'me [AccountInfo<'info>; OCP_EXECUTE_SALE_V2_IX_ACCOUNTS_LEN]> + for OcpExecuteSaleV2Accounts<'me, 'info> +{ + fn from(arr: &'me [AccountInfo<'info>; OCP_EXECUTE_SALE_V2_IX_ACCOUNTS_LEN]) -> Self { + Self { + payer: &arr[0], + buyer: &arr[1], + seller: &arr[2], + notary: &arr[3], + program_as_signer: &arr[4], + seller_token_ata: &arr[5], + buyer_token_ata: &arr[6], + token_mint: &arr[7], + metadata: &arr[8], + auction_house: &arr[9], + auction_house_treasury: &arr[10], + seller_trade_state: &arr[11], + buyer_trade_state: &arr[12], + buyer_escrow_payment_account: &arr[13], + buyer_referral: &arr[14], + seller_referral: &arr[15], + ocp_mint_state: &arr[16], + ocp_policy: &arr[17], + ocp_freeze_authority: &arr[18], + ocp_program: &arr[19], + cmt_program: &arr[20], + instructions: &arr[21], + associated_token_program: &arr[22], + token_program: &arr[23], + system_program: &arr[24], + rent: &arr[25], + } + } +} +pub const OCP_EXECUTE_SALE_V2_IX_DISCM: [u8; 8] = [200, 83, 31, 82, 156, 156, 20, 97]; +#[derive(BorshDeserialize, BorshSerialize, Clone, Debug, PartialEq)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +pub struct OcpExecuteSaleV2IxArgs { + pub args: OCPExecuteSaleV2Args, +} +#[derive(Clone, Debug, PartialEq)] +pub struct OcpExecuteSaleV2IxData(pub OcpExecuteSaleV2IxArgs); +impl From for OcpExecuteSaleV2IxData { + fn from(args: OcpExecuteSaleV2IxArgs) -> Self { + Self(args) + } +} +impl OcpExecuteSaleV2IxData { + pub fn deserialize(buf: &[u8]) -> std::io::Result { + let mut reader = buf; + let mut maybe_discm = [0u8; 8]; + reader.read_exact(&mut maybe_discm)?; + if maybe_discm != OCP_EXECUTE_SALE_V2_IX_DISCM { + return Err(std::io::Error::new( + std::io::ErrorKind::Other, + format!( + "discm does not match. Expected: {:?}. Received: {:?}", + OCP_EXECUTE_SALE_V2_IX_DISCM, maybe_discm + ), + )); + } + Ok(Self(OcpExecuteSaleV2IxArgs::deserialize(&mut reader)?)) + } + pub fn serialize(&self, mut writer: W) -> std::io::Result<()> { + writer.write_all(&OCP_EXECUTE_SALE_V2_IX_DISCM)?; + self.0.serialize(&mut writer) + } + pub fn try_to_vec(&self) -> std::io::Result> { + let mut data = Vec::new(); + self.serialize(&mut data)?; + Ok(data) + } +} +pub fn ocp_execute_sale_v2_ix_with_program_id( + program_id: Pubkey, + keys: OcpExecuteSaleV2Keys, + args: OcpExecuteSaleV2IxArgs, +) -> std::io::Result { + let metas: [AccountMeta; OCP_EXECUTE_SALE_V2_IX_ACCOUNTS_LEN] = keys.into(); + let data: OcpExecuteSaleV2IxData = args.into(); + Ok(Instruction { + program_id, + accounts: Vec::from(metas), + data: data.try_to_vec()?, + }) +} +pub fn ocp_execute_sale_v2_ix( + keys: OcpExecuteSaleV2Keys, + args: OcpExecuteSaleV2IxArgs, +) -> std::io::Result { + ocp_execute_sale_v2_ix_with_program_id(crate::ID, keys, args) +} +pub fn ocp_execute_sale_v2_invoke_with_program_id( + program_id: Pubkey, + accounts: OcpExecuteSaleV2Accounts<'_, '_>, + args: OcpExecuteSaleV2IxArgs, +) -> ProgramResult { + let keys: OcpExecuteSaleV2Keys = accounts.into(); + let ix = ocp_execute_sale_v2_ix_with_program_id(program_id, keys, args)?; + invoke_instruction(&ix, accounts) +} +pub fn ocp_execute_sale_v2_invoke( + accounts: OcpExecuteSaleV2Accounts<'_, '_>, + args: OcpExecuteSaleV2IxArgs, +) -> ProgramResult { + ocp_execute_sale_v2_invoke_with_program_id(crate::ID, accounts, args) +} +pub fn ocp_execute_sale_v2_invoke_signed_with_program_id( + program_id: Pubkey, + accounts: OcpExecuteSaleV2Accounts<'_, '_>, + args: OcpExecuteSaleV2IxArgs, + seeds: &[&[&[u8]]], +) -> ProgramResult { + let keys: OcpExecuteSaleV2Keys = accounts.into(); + let ix = ocp_execute_sale_v2_ix_with_program_id(program_id, keys, args)?; + invoke_instruction_signed(&ix, accounts, seeds) +} +pub fn ocp_execute_sale_v2_invoke_signed( + accounts: OcpExecuteSaleV2Accounts<'_, '_>, + args: OcpExecuteSaleV2IxArgs, + seeds: &[&[&[u8]]], +) -> ProgramResult { + ocp_execute_sale_v2_invoke_signed_with_program_id(crate::ID, accounts, args, seeds) +} +pub fn ocp_execute_sale_v2_verify_account_keys( + accounts: OcpExecuteSaleV2Accounts<'_, '_>, + keys: OcpExecuteSaleV2Keys, +) -> Result<(), (Pubkey, Pubkey)> { + for (actual, expected) in [ + (*accounts.payer.key, keys.payer), + (*accounts.buyer.key, keys.buyer), + (*accounts.seller.key, keys.seller), + (*accounts.notary.key, keys.notary), + (*accounts.program_as_signer.key, keys.program_as_signer), + (*accounts.seller_token_ata.key, keys.seller_token_ata), + (*accounts.buyer_token_ata.key, keys.buyer_token_ata), + (*accounts.token_mint.key, keys.token_mint), + (*accounts.metadata.key, keys.metadata), + (*accounts.auction_house.key, keys.auction_house), + ( + *accounts.auction_house_treasury.key, + keys.auction_house_treasury, + ), + (*accounts.seller_trade_state.key, keys.seller_trade_state), + (*accounts.buyer_trade_state.key, keys.buyer_trade_state), + ( + *accounts.buyer_escrow_payment_account.key, + keys.buyer_escrow_payment_account, + ), + (*accounts.buyer_referral.key, keys.buyer_referral), + (*accounts.seller_referral.key, keys.seller_referral), + (*accounts.ocp_mint_state.key, keys.ocp_mint_state), + (*accounts.ocp_policy.key, keys.ocp_policy), + ( + *accounts.ocp_freeze_authority.key, + keys.ocp_freeze_authority, + ), + (*accounts.ocp_program.key, keys.ocp_program), + (*accounts.cmt_program.key, keys.cmt_program), + (*accounts.instructions.key, keys.instructions), + ( + *accounts.associated_token_program.key, + keys.associated_token_program, + ), + (*accounts.token_program.key, keys.token_program), + (*accounts.system_program.key, keys.system_program), + (*accounts.rent.key, keys.rent), + ] { + if actual != expected { + return Err((actual, expected)); + } + } + Ok(()) +} +pub fn ocp_execute_sale_v2_verify_writable_privileges<'me, 'info>( + accounts: OcpExecuteSaleV2Accounts<'me, 'info>, +) -> Result<(), (&'me AccountInfo<'info>, ProgramError)> { + for should_be_writable in [ + accounts.payer, + accounts.buyer, + accounts.seller, + accounts.seller_token_ata, + accounts.buyer_token_ata, + accounts.auction_house_treasury, + accounts.seller_trade_state, + accounts.buyer_trade_state, + accounts.buyer_escrow_payment_account, + accounts.buyer_referral, + accounts.seller_referral, + accounts.ocp_mint_state, + ] { + if !should_be_writable.is_writable { + return Err((should_be_writable, ProgramError::InvalidAccountData)); + } + } + Ok(()) +} +pub fn ocp_execute_sale_v2_verify_signer_privileges<'me, 'info>( + accounts: OcpExecuteSaleV2Accounts<'me, 'info>, +) -> Result<(), (&'me AccountInfo<'info>, ProgramError)> { + for should_be_signer in [accounts.payer] { + if !should_be_signer.is_signer { + return Err((should_be_signer, ProgramError::MissingRequiredSignature)); + } + } + Ok(()) +} +pub fn ocp_execute_sale_v2_verify_account_privileges<'me, 'info>( + accounts: OcpExecuteSaleV2Accounts<'me, 'info>, +) -> Result<(), (&'me AccountInfo<'info>, ProgramError)> { + ocp_execute_sale_v2_verify_writable_privileges(accounts)?; + ocp_execute_sale_v2_verify_signer_privileges(accounts)?; + Ok(()) +} +pub const EXECUTE_SALE_V2_IX_ACCOUNTS_LEN: usize = 20; +#[derive(Copy, Clone, Debug)] +pub struct ExecuteSaleV2Accounts<'me, 'info> { + pub buyer: &'me AccountInfo<'info>, + pub seller: &'me AccountInfo<'info>, + pub notary: &'me AccountInfo<'info>, + pub token_account: &'me AccountInfo<'info>, + pub token_mint: &'me AccountInfo<'info>, + pub metadata: &'me AccountInfo<'info>, + pub escrow_payment_account: &'me AccountInfo<'info>, + pub buyer_receipt_token_account: &'me AccountInfo<'info>, + pub authority: &'me AccountInfo<'info>, + pub auction_house: &'me AccountInfo<'info>, + pub auction_house_treasury: &'me AccountInfo<'info>, + pub buyer_trade_state: &'me AccountInfo<'info>, + pub buyer_referral: &'me AccountInfo<'info>, + pub seller_trade_state: &'me AccountInfo<'info>, + pub seller_referral: &'me AccountInfo<'info>, + pub token_program: &'me AccountInfo<'info>, + pub system_program: &'me AccountInfo<'info>, + pub ata_program: &'me AccountInfo<'info>, + pub program_as_signer: &'me AccountInfo<'info>, + pub rent: &'me AccountInfo<'info>, +} +#[derive(Copy, Clone, Debug, PartialEq)] +pub struct ExecuteSaleV2Keys { + pub buyer: Pubkey, + pub seller: Pubkey, + pub notary: Pubkey, + pub token_account: Pubkey, + pub token_mint: Pubkey, + pub metadata: Pubkey, + pub escrow_payment_account: Pubkey, + pub buyer_receipt_token_account: Pubkey, + pub authority: Pubkey, + pub auction_house: Pubkey, + pub auction_house_treasury: Pubkey, + pub buyer_trade_state: Pubkey, + pub buyer_referral: Pubkey, + pub seller_trade_state: Pubkey, + pub seller_referral: Pubkey, + pub token_program: Pubkey, + pub system_program: Pubkey, + pub ata_program: Pubkey, + pub program_as_signer: Pubkey, + pub rent: Pubkey, +} +impl From> for ExecuteSaleV2Keys { + fn from(accounts: ExecuteSaleV2Accounts) -> Self { + Self { + buyer: *accounts.buyer.key, + seller: *accounts.seller.key, + notary: *accounts.notary.key, + token_account: *accounts.token_account.key, + token_mint: *accounts.token_mint.key, + metadata: *accounts.metadata.key, + escrow_payment_account: *accounts.escrow_payment_account.key, + buyer_receipt_token_account: *accounts.buyer_receipt_token_account.key, + authority: *accounts.authority.key, + auction_house: *accounts.auction_house.key, + auction_house_treasury: *accounts.auction_house_treasury.key, + buyer_trade_state: *accounts.buyer_trade_state.key, + buyer_referral: *accounts.buyer_referral.key, + seller_trade_state: *accounts.seller_trade_state.key, + seller_referral: *accounts.seller_referral.key, + token_program: *accounts.token_program.key, + system_program: *accounts.system_program.key, + ata_program: *accounts.ata_program.key, + program_as_signer: *accounts.program_as_signer.key, + rent: *accounts.rent.key, + } + } +} +impl From for [AccountMeta; EXECUTE_SALE_V2_IX_ACCOUNTS_LEN] { + fn from(keys: ExecuteSaleV2Keys) -> Self { + [ + AccountMeta { + pubkey: keys.buyer, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.seller, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.notary, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.token_account, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.token_mint, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.metadata, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.escrow_payment_account, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.buyer_receipt_token_account, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.authority, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.auction_house, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.auction_house_treasury, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.buyer_trade_state, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.buyer_referral, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.seller_trade_state, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.seller_referral, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.token_program, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.system_program, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.ata_program, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.program_as_signer, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.rent, + is_signer: false, + is_writable: false, + }, + ] + } +} +impl From<[Pubkey; EXECUTE_SALE_V2_IX_ACCOUNTS_LEN]> for ExecuteSaleV2Keys { + fn from(pubkeys: [Pubkey; EXECUTE_SALE_V2_IX_ACCOUNTS_LEN]) -> Self { + Self { + buyer: pubkeys[0], + seller: pubkeys[1], + notary: pubkeys[2], + token_account: pubkeys[3], + token_mint: pubkeys[4], + metadata: pubkeys[5], + escrow_payment_account: pubkeys[6], + buyer_receipt_token_account: pubkeys[7], + authority: pubkeys[8], + auction_house: pubkeys[9], + auction_house_treasury: pubkeys[10], + buyer_trade_state: pubkeys[11], + buyer_referral: pubkeys[12], + seller_trade_state: pubkeys[13], + seller_referral: pubkeys[14], + token_program: pubkeys[15], + system_program: pubkeys[16], + ata_program: pubkeys[17], + program_as_signer: pubkeys[18], + rent: pubkeys[19], + } + } +} +impl<'info> From> + for [AccountInfo<'info>; EXECUTE_SALE_V2_IX_ACCOUNTS_LEN] +{ + fn from(accounts: ExecuteSaleV2Accounts<'_, 'info>) -> Self { + [ + accounts.buyer.clone(), + accounts.seller.clone(), + accounts.notary.clone(), + accounts.token_account.clone(), + accounts.token_mint.clone(), + accounts.metadata.clone(), + accounts.escrow_payment_account.clone(), + accounts.buyer_receipt_token_account.clone(), + accounts.authority.clone(), + accounts.auction_house.clone(), + accounts.auction_house_treasury.clone(), + accounts.buyer_trade_state.clone(), + accounts.buyer_referral.clone(), + accounts.seller_trade_state.clone(), + accounts.seller_referral.clone(), + accounts.token_program.clone(), + accounts.system_program.clone(), + accounts.ata_program.clone(), + accounts.program_as_signer.clone(), + accounts.rent.clone(), + ] + } +} +impl<'me, 'info> From<&'me [AccountInfo<'info>; EXECUTE_SALE_V2_IX_ACCOUNTS_LEN]> + for ExecuteSaleV2Accounts<'me, 'info> +{ + fn from(arr: &'me [AccountInfo<'info>; EXECUTE_SALE_V2_IX_ACCOUNTS_LEN]) -> Self { + Self { + buyer: &arr[0], + seller: &arr[1], + notary: &arr[2], + token_account: &arr[3], + token_mint: &arr[4], + metadata: &arr[5], + escrow_payment_account: &arr[6], + buyer_receipt_token_account: &arr[7], + authority: &arr[8], + auction_house: &arr[9], + auction_house_treasury: &arr[10], + buyer_trade_state: &arr[11], + buyer_referral: &arr[12], + seller_trade_state: &arr[13], + seller_referral: &arr[14], + token_program: &arr[15], + system_program: &arr[16], + ata_program: &arr[17], + program_as_signer: &arr[18], + rent: &arr[19], + } + } +} +pub const EXECUTE_SALE_V2_IX_DISCM: [u8; 8] = [91, 220, 49, 223, 204, 129, 53, 193]; +#[derive(BorshDeserialize, BorshSerialize, Clone, Debug, PartialEq)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +pub struct ExecuteSaleV2IxArgs { + pub escrow_payment_bump: u8, + pub program_as_signer_bump: u8, + pub buyer_price: u64, + pub token_size: u64, + pub buyer_state_expiry: i64, + pub seller_state_expiry: i64, + pub maker_fee_bp: i16, + pub taker_fee_bp: u16, +} +#[derive(Clone, Debug, PartialEq)] +pub struct ExecuteSaleV2IxData(pub ExecuteSaleV2IxArgs); +impl From for ExecuteSaleV2IxData { + fn from(args: ExecuteSaleV2IxArgs) -> Self { + Self(args) + } +} +impl ExecuteSaleV2IxData { + pub fn deserialize(buf: &[u8]) -> std::io::Result { + let mut reader = buf; + let mut maybe_discm = [0u8; 8]; + reader.read_exact(&mut maybe_discm)?; + if maybe_discm != EXECUTE_SALE_V2_IX_DISCM { + return Err(std::io::Error::new( + std::io::ErrorKind::Other, + format!( + "discm does not match. Expected: {:?}. Received: {:?}", + EXECUTE_SALE_V2_IX_DISCM, maybe_discm + ), + )); + } + Ok(Self(ExecuteSaleV2IxArgs::deserialize(&mut reader)?)) + } + pub fn serialize(&self, mut writer: W) -> std::io::Result<()> { + writer.write_all(&EXECUTE_SALE_V2_IX_DISCM)?; + self.0.serialize(&mut writer) + } + pub fn try_to_vec(&self) -> std::io::Result> { + let mut data = Vec::new(); + self.serialize(&mut data)?; + Ok(data) + } +} +pub fn execute_sale_v2_ix_with_program_id( + program_id: Pubkey, + keys: ExecuteSaleV2Keys, + args: ExecuteSaleV2IxArgs, +) -> std::io::Result { + let metas: [AccountMeta; EXECUTE_SALE_V2_IX_ACCOUNTS_LEN] = keys.into(); + let data: ExecuteSaleV2IxData = args.into(); + Ok(Instruction { + program_id, + accounts: Vec::from(metas), + data: data.try_to_vec()?, + }) +} +pub fn execute_sale_v2_ix( + keys: ExecuteSaleV2Keys, + args: ExecuteSaleV2IxArgs, +) -> std::io::Result { + execute_sale_v2_ix_with_program_id(crate::ID, keys, args) +} +pub fn execute_sale_v2_invoke_with_program_id( + program_id: Pubkey, + accounts: ExecuteSaleV2Accounts<'_, '_>, + args: ExecuteSaleV2IxArgs, +) -> ProgramResult { + let keys: ExecuteSaleV2Keys = accounts.into(); + let ix = execute_sale_v2_ix_with_program_id(program_id, keys, args)?; + invoke_instruction(&ix, accounts) +} +pub fn execute_sale_v2_invoke( + accounts: ExecuteSaleV2Accounts<'_, '_>, + args: ExecuteSaleV2IxArgs, +) -> ProgramResult { + execute_sale_v2_invoke_with_program_id(crate::ID, accounts, args) +} +pub fn execute_sale_v2_invoke_signed_with_program_id( + program_id: Pubkey, + accounts: ExecuteSaleV2Accounts<'_, '_>, + args: ExecuteSaleV2IxArgs, + seeds: &[&[&[u8]]], +) -> ProgramResult { + let keys: ExecuteSaleV2Keys = accounts.into(); + let ix = execute_sale_v2_ix_with_program_id(program_id, keys, args)?; + invoke_instruction_signed(&ix, accounts, seeds) +} +pub fn execute_sale_v2_invoke_signed( + accounts: ExecuteSaleV2Accounts<'_, '_>, + args: ExecuteSaleV2IxArgs, + seeds: &[&[&[u8]]], +) -> ProgramResult { + execute_sale_v2_invoke_signed_with_program_id(crate::ID, accounts, args, seeds) +} +pub fn execute_sale_v2_verify_account_keys( + accounts: ExecuteSaleV2Accounts<'_, '_>, + keys: ExecuteSaleV2Keys, +) -> Result<(), (Pubkey, Pubkey)> { + for (actual, expected) in [ + (*accounts.buyer.key, keys.buyer), + (*accounts.seller.key, keys.seller), + (*accounts.notary.key, keys.notary), + (*accounts.token_account.key, keys.token_account), + (*accounts.token_mint.key, keys.token_mint), + (*accounts.metadata.key, keys.metadata), + ( + *accounts.escrow_payment_account.key, + keys.escrow_payment_account, + ), + ( + *accounts.buyer_receipt_token_account.key, + keys.buyer_receipt_token_account, + ), + (*accounts.authority.key, keys.authority), + (*accounts.auction_house.key, keys.auction_house), + ( + *accounts.auction_house_treasury.key, + keys.auction_house_treasury, + ), + (*accounts.buyer_trade_state.key, keys.buyer_trade_state), + (*accounts.buyer_referral.key, keys.buyer_referral), + (*accounts.seller_trade_state.key, keys.seller_trade_state), + (*accounts.seller_referral.key, keys.seller_referral), + (*accounts.token_program.key, keys.token_program), + (*accounts.system_program.key, keys.system_program), + (*accounts.ata_program.key, keys.ata_program), + (*accounts.program_as_signer.key, keys.program_as_signer), + (*accounts.rent.key, keys.rent), + ] { + if actual != expected { + return Err((actual, expected)); + } + } + Ok(()) +} +pub fn execute_sale_v2_verify_writable_privileges<'me, 'info>( + accounts: ExecuteSaleV2Accounts<'me, 'info>, +) -> Result<(), (&'me AccountInfo<'info>, ProgramError)> { + for should_be_writable in [ + accounts.buyer, + accounts.seller, + accounts.token_account, + accounts.escrow_payment_account, + accounts.buyer_receipt_token_account, + accounts.auction_house_treasury, + accounts.buyer_trade_state, + accounts.buyer_referral, + accounts.seller_trade_state, + accounts.seller_referral, + ] { + if !should_be_writable.is_writable { + return Err((should_be_writable, ProgramError::InvalidAccountData)); + } + } + Ok(()) +} +pub fn execute_sale_v2_verify_account_privileges<'me, 'info>( + accounts: ExecuteSaleV2Accounts<'me, 'info>, +) -> Result<(), (&'me AccountInfo<'info>, ProgramError)> { + execute_sale_v2_verify_writable_privileges(accounts)?; + Ok(()) +} +pub const MIP1_SELL_IX_ACCOUNTS_LEN: usize = 22; +#[derive(Copy, Clone, Debug)] +pub struct Mip1SellAccounts<'me, 'info> { + pub wallet: &'me AccountInfo<'info>, + pub notary: &'me AccountInfo<'info>, + pub program_as_signer: &'me AccountInfo<'info>, + pub token_account: &'me AccountInfo<'info>, + pub token_mint: &'me AccountInfo<'info>, + pub metadata: &'me AccountInfo<'info>, + pub auction_house: &'me AccountInfo<'info>, + pub seller_trade_state: &'me AccountInfo<'info>, + pub migration_seller_trade_state: &'me AccountInfo<'info>, + pub seller_referral: &'me AccountInfo<'info>, + pub token_ata: &'me AccountInfo<'info>, + pub token_metadata_program: &'me AccountInfo<'info>, + pub edition: &'me AccountInfo<'info>, + pub authorization_rules_program: &'me AccountInfo<'info>, + pub authorization_rules: &'me AccountInfo<'info>, + pub instructions: &'me AccountInfo<'info>, + pub owner_token_record: &'me AccountInfo<'info>, + pub destination_token_record: &'me AccountInfo<'info>, + pub associated_token_program: &'me AccountInfo<'info>, + pub token_program: &'me AccountInfo<'info>, + pub system_program: &'me AccountInfo<'info>, + pub rent: &'me AccountInfo<'info>, +} +#[derive(Copy, Clone, Debug, PartialEq)] +pub struct Mip1SellKeys { + pub wallet: Pubkey, + pub notary: Pubkey, + pub program_as_signer: Pubkey, + pub token_account: Pubkey, + pub token_mint: Pubkey, + pub metadata: Pubkey, + pub auction_house: Pubkey, + pub seller_trade_state: Pubkey, + pub migration_seller_trade_state: Pubkey, + pub seller_referral: Pubkey, + pub token_ata: Pubkey, + pub token_metadata_program: Pubkey, + pub edition: Pubkey, + pub authorization_rules_program: Pubkey, + pub authorization_rules: Pubkey, + pub instructions: Pubkey, + pub owner_token_record: Pubkey, + pub destination_token_record: Pubkey, + pub associated_token_program: Pubkey, + pub token_program: Pubkey, + pub system_program: Pubkey, + pub rent: Pubkey, +} +impl From> for Mip1SellKeys { + fn from(accounts: Mip1SellAccounts) -> Self { + Self { + wallet: *accounts.wallet.key, + notary: *accounts.notary.key, + program_as_signer: *accounts.program_as_signer.key, + token_account: *accounts.token_account.key, + token_mint: *accounts.token_mint.key, + metadata: *accounts.metadata.key, + auction_house: *accounts.auction_house.key, + seller_trade_state: *accounts.seller_trade_state.key, + migration_seller_trade_state: *accounts.migration_seller_trade_state.key, + seller_referral: *accounts.seller_referral.key, + token_ata: *accounts.token_ata.key, + token_metadata_program: *accounts.token_metadata_program.key, + edition: *accounts.edition.key, + authorization_rules_program: *accounts.authorization_rules_program.key, + authorization_rules: *accounts.authorization_rules.key, + instructions: *accounts.instructions.key, + owner_token_record: *accounts.owner_token_record.key, + destination_token_record: *accounts.destination_token_record.key, + associated_token_program: *accounts.associated_token_program.key, + token_program: *accounts.token_program.key, + system_program: *accounts.system_program.key, + rent: *accounts.rent.key, + } + } +} +impl From for [AccountMeta; MIP1_SELL_IX_ACCOUNTS_LEN] { + fn from(keys: Mip1SellKeys) -> Self { + [ + AccountMeta { + pubkey: keys.wallet, + is_signer: true, + is_writable: true, + }, + AccountMeta { + pubkey: keys.notary, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.program_as_signer, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.token_account, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.token_mint, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.metadata, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.auction_house, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.seller_trade_state, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.migration_seller_trade_state, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.seller_referral, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.token_ata, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.token_metadata_program, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.edition, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.authorization_rules_program, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.authorization_rules, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.instructions, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.owner_token_record, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.destination_token_record, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.associated_token_program, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.token_program, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.system_program, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.rent, + is_signer: false, + is_writable: false, + }, + ] + } +} +impl From<[Pubkey; MIP1_SELL_IX_ACCOUNTS_LEN]> for Mip1SellKeys { + fn from(pubkeys: [Pubkey; MIP1_SELL_IX_ACCOUNTS_LEN]) -> Self { + Self { + wallet: pubkeys[0], + notary: pubkeys[1], + program_as_signer: pubkeys[2], + token_account: pubkeys[3], + token_mint: pubkeys[4], + metadata: pubkeys[5], + auction_house: pubkeys[6], + seller_trade_state: pubkeys[7], + migration_seller_trade_state: pubkeys[8], + seller_referral: pubkeys[9], + token_ata: pubkeys[10], + token_metadata_program: pubkeys[11], + edition: pubkeys[12], + authorization_rules_program: pubkeys[13], + authorization_rules: pubkeys[14], + instructions: pubkeys[15], + owner_token_record: pubkeys[16], + destination_token_record: pubkeys[17], + associated_token_program: pubkeys[18], + token_program: pubkeys[19], + system_program: pubkeys[20], + rent: pubkeys[21], + } + } +} +impl<'info> From> for [AccountInfo<'info>; MIP1_SELL_IX_ACCOUNTS_LEN] { + fn from(accounts: Mip1SellAccounts<'_, 'info>) -> Self { + [ + accounts.wallet.clone(), + accounts.notary.clone(), + accounts.program_as_signer.clone(), + accounts.token_account.clone(), + accounts.token_mint.clone(), + accounts.metadata.clone(), + accounts.auction_house.clone(), + accounts.seller_trade_state.clone(), + accounts.migration_seller_trade_state.clone(), + accounts.seller_referral.clone(), + accounts.token_ata.clone(), + accounts.token_metadata_program.clone(), + accounts.edition.clone(), + accounts.authorization_rules_program.clone(), + accounts.authorization_rules.clone(), + accounts.instructions.clone(), + accounts.owner_token_record.clone(), + accounts.destination_token_record.clone(), + accounts.associated_token_program.clone(), + accounts.token_program.clone(), + accounts.system_program.clone(), + accounts.rent.clone(), + ] + } +} +impl<'me, 'info> From<&'me [AccountInfo<'info>; MIP1_SELL_IX_ACCOUNTS_LEN]> + for Mip1SellAccounts<'me, 'info> +{ + fn from(arr: &'me [AccountInfo<'info>; MIP1_SELL_IX_ACCOUNTS_LEN]) -> Self { + Self { + wallet: &arr[0], + notary: &arr[1], + program_as_signer: &arr[2], + token_account: &arr[3], + token_mint: &arr[4], + metadata: &arr[5], + auction_house: &arr[6], + seller_trade_state: &arr[7], + migration_seller_trade_state: &arr[8], + seller_referral: &arr[9], + token_ata: &arr[10], + token_metadata_program: &arr[11], + edition: &arr[12], + authorization_rules_program: &arr[13], + authorization_rules: &arr[14], + instructions: &arr[15], + owner_token_record: &arr[16], + destination_token_record: &arr[17], + associated_token_program: &arr[18], + token_program: &arr[19], + system_program: &arr[20], + rent: &arr[21], + } + } +} +pub const MIP1_SELL_IX_DISCM: [u8; 8] = [58, 50, 172, 111, 166, 151, 22, 94]; +#[derive(BorshDeserialize, BorshSerialize, Clone, Debug, PartialEq)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +pub struct Mip1SellIxArgs { + pub args: MIP1SellArgs, +} +#[derive(Clone, Debug, PartialEq)] +pub struct Mip1SellIxData(pub Mip1SellIxArgs); +impl From for Mip1SellIxData { + fn from(args: Mip1SellIxArgs) -> Self { + Self(args) + } +} +impl Mip1SellIxData { + pub fn deserialize(buf: &[u8]) -> std::io::Result { + let mut reader = buf; + let mut maybe_discm = [0u8; 8]; + reader.read_exact(&mut maybe_discm)?; + if maybe_discm != MIP1_SELL_IX_DISCM { + return Err(std::io::Error::new( + std::io::ErrorKind::Other, + format!( + "discm does not match. Expected: {:?}. Received: {:?}", + MIP1_SELL_IX_DISCM, maybe_discm + ), + )); + } + Ok(Self(Mip1SellIxArgs::deserialize(&mut reader)?)) + } + pub fn serialize(&self, mut writer: W) -> std::io::Result<()> { + writer.write_all(&MIP1_SELL_IX_DISCM)?; + self.0.serialize(&mut writer) + } + pub fn try_to_vec(&self) -> std::io::Result> { + let mut data = Vec::new(); + self.serialize(&mut data)?; + Ok(data) + } +} +pub fn mip1_sell_ix_with_program_id( + program_id: Pubkey, + keys: Mip1SellKeys, + args: Mip1SellIxArgs, +) -> std::io::Result { + let metas: [AccountMeta; MIP1_SELL_IX_ACCOUNTS_LEN] = keys.into(); + let data: Mip1SellIxData = args.into(); + Ok(Instruction { + program_id, + accounts: Vec::from(metas), + data: data.try_to_vec()?, + }) +} +pub fn mip1_sell_ix(keys: Mip1SellKeys, args: Mip1SellIxArgs) -> std::io::Result { + mip1_sell_ix_with_program_id(crate::ID, keys, args) +} +pub fn mip1_sell_invoke_with_program_id( + program_id: Pubkey, + accounts: Mip1SellAccounts<'_, '_>, + args: Mip1SellIxArgs, +) -> ProgramResult { + let keys: Mip1SellKeys = accounts.into(); + let ix = mip1_sell_ix_with_program_id(program_id, keys, args)?; + invoke_instruction(&ix, accounts) +} +pub fn mip1_sell_invoke(accounts: Mip1SellAccounts<'_, '_>, args: Mip1SellIxArgs) -> ProgramResult { + mip1_sell_invoke_with_program_id(crate::ID, accounts, args) +} +pub fn mip1_sell_invoke_signed_with_program_id( + program_id: Pubkey, + accounts: Mip1SellAccounts<'_, '_>, + args: Mip1SellIxArgs, + seeds: &[&[&[u8]]], +) -> ProgramResult { + let keys: Mip1SellKeys = accounts.into(); + let ix = mip1_sell_ix_with_program_id(program_id, keys, args)?; + invoke_instruction_signed(&ix, accounts, seeds) +} +pub fn mip1_sell_invoke_signed( + accounts: Mip1SellAccounts<'_, '_>, + args: Mip1SellIxArgs, + seeds: &[&[&[u8]]], +) -> ProgramResult { + mip1_sell_invoke_signed_with_program_id(crate::ID, accounts, args, seeds) +} +pub fn mip1_sell_verify_account_keys( + accounts: Mip1SellAccounts<'_, '_>, + keys: Mip1SellKeys, +) -> Result<(), (Pubkey, Pubkey)> { + for (actual, expected) in [ + (*accounts.wallet.key, keys.wallet), + (*accounts.notary.key, keys.notary), + (*accounts.program_as_signer.key, keys.program_as_signer), + (*accounts.token_account.key, keys.token_account), + (*accounts.token_mint.key, keys.token_mint), + (*accounts.metadata.key, keys.metadata), + (*accounts.auction_house.key, keys.auction_house), + (*accounts.seller_trade_state.key, keys.seller_trade_state), + ( + *accounts.migration_seller_trade_state.key, + keys.migration_seller_trade_state, + ), + (*accounts.seller_referral.key, keys.seller_referral), + (*accounts.token_ata.key, keys.token_ata), + ( + *accounts.token_metadata_program.key, + keys.token_metadata_program, + ), + (*accounts.edition.key, keys.edition), + ( + *accounts.authorization_rules_program.key, + keys.authorization_rules_program, + ), + (*accounts.authorization_rules.key, keys.authorization_rules), + (*accounts.instructions.key, keys.instructions), + (*accounts.owner_token_record.key, keys.owner_token_record), + ( + *accounts.destination_token_record.key, + keys.destination_token_record, + ), + ( + *accounts.associated_token_program.key, + keys.associated_token_program, + ), + (*accounts.token_program.key, keys.token_program), + (*accounts.system_program.key, keys.system_program), + (*accounts.rent.key, keys.rent), + ] { + if actual != expected { + return Err((actual, expected)); + } + } + Ok(()) +} +pub fn mip1_sell_verify_writable_privileges<'me, 'info>( + accounts: Mip1SellAccounts<'me, 'info>, +) -> Result<(), (&'me AccountInfo<'info>, ProgramError)> { + for should_be_writable in [ + accounts.wallet, + accounts.token_account, + accounts.metadata, + accounts.seller_trade_state, + accounts.migration_seller_trade_state, + accounts.token_ata, + accounts.owner_token_record, + accounts.destination_token_record, + ] { + if !should_be_writable.is_writable { + return Err((should_be_writable, ProgramError::InvalidAccountData)); + } + } + Ok(()) +} +pub fn mip1_sell_verify_signer_privileges<'me, 'info>( + accounts: Mip1SellAccounts<'me, 'info>, +) -> Result<(), (&'me AccountInfo<'info>, ProgramError)> { + for should_be_signer in [accounts.wallet] { + if !should_be_signer.is_signer { + return Err((should_be_signer, ProgramError::MissingRequiredSignature)); + } + } + Ok(()) +} +pub fn mip1_sell_verify_account_privileges<'me, 'info>( + accounts: Mip1SellAccounts<'me, 'info>, +) -> Result<(), (&'me AccountInfo<'info>, ProgramError)> { + mip1_sell_verify_writable_privileges(accounts)?; + mip1_sell_verify_signer_privileges(accounts)?; + Ok(()) +} +pub const MIP1_EXECUTE_SALE_V2_IX_ACCOUNTS_LEN: usize = 27; +#[derive(Copy, Clone, Debug)] +pub struct Mip1ExecuteSaleV2Accounts<'me, 'info> { + pub payer: &'me AccountInfo<'info>, + pub buyer: &'me AccountInfo<'info>, + pub seller: &'me AccountInfo<'info>, + pub notary: &'me AccountInfo<'info>, + pub program_as_signer: &'me AccountInfo<'info>, + pub token_account: &'me AccountInfo<'info>, + pub buyer_receipt_token_account: &'me AccountInfo<'info>, + pub token_mint: &'me AccountInfo<'info>, + pub metadata: &'me AccountInfo<'info>, + pub auction_house: &'me AccountInfo<'info>, + pub auction_house_treasury: &'me AccountInfo<'info>, + pub seller_trade_state: &'me AccountInfo<'info>, + pub buyer_trade_state: &'me AccountInfo<'info>, + pub buyer_escrow_payment_account: &'me AccountInfo<'info>, + pub buyer_referral: &'me AccountInfo<'info>, + pub seller_referral: &'me AccountInfo<'info>, + pub token_metadata_program: &'me AccountInfo<'info>, + pub edition: &'me AccountInfo<'info>, + pub authorization_rules_program: &'me AccountInfo<'info>, + pub authorization_rules: &'me AccountInfo<'info>, + pub owner_token_record: &'me AccountInfo<'info>, + pub destination_token_record: &'me AccountInfo<'info>, + pub instructions: &'me AccountInfo<'info>, + pub associated_token_program: &'me AccountInfo<'info>, + pub token_program: &'me AccountInfo<'info>, + pub system_program: &'me AccountInfo<'info>, + pub rent: &'me AccountInfo<'info>, +} +#[derive(Copy, Clone, Debug, PartialEq)] +pub struct Mip1ExecuteSaleV2Keys { + pub payer: Pubkey, + pub buyer: Pubkey, + pub seller: Pubkey, + pub notary: Pubkey, + pub program_as_signer: Pubkey, + pub token_account: Pubkey, + pub buyer_receipt_token_account: Pubkey, + pub token_mint: Pubkey, + pub metadata: Pubkey, + pub auction_house: Pubkey, + pub auction_house_treasury: Pubkey, + pub seller_trade_state: Pubkey, + pub buyer_trade_state: Pubkey, + pub buyer_escrow_payment_account: Pubkey, + pub buyer_referral: Pubkey, + pub seller_referral: Pubkey, + pub token_metadata_program: Pubkey, + pub edition: Pubkey, + pub authorization_rules_program: Pubkey, + pub authorization_rules: Pubkey, + pub owner_token_record: Pubkey, + pub destination_token_record: Pubkey, + pub instructions: Pubkey, + pub associated_token_program: Pubkey, + pub token_program: Pubkey, + pub system_program: Pubkey, + pub rent: Pubkey, +} +impl From> for Mip1ExecuteSaleV2Keys { + fn from(accounts: Mip1ExecuteSaleV2Accounts) -> Self { + Self { + payer: *accounts.payer.key, + buyer: *accounts.buyer.key, + seller: *accounts.seller.key, + notary: *accounts.notary.key, + program_as_signer: *accounts.program_as_signer.key, + token_account: *accounts.token_account.key, + buyer_receipt_token_account: *accounts.buyer_receipt_token_account.key, + token_mint: *accounts.token_mint.key, + metadata: *accounts.metadata.key, + auction_house: *accounts.auction_house.key, + auction_house_treasury: *accounts.auction_house_treasury.key, + seller_trade_state: *accounts.seller_trade_state.key, + buyer_trade_state: *accounts.buyer_trade_state.key, + buyer_escrow_payment_account: *accounts.buyer_escrow_payment_account.key, + buyer_referral: *accounts.buyer_referral.key, + seller_referral: *accounts.seller_referral.key, + token_metadata_program: *accounts.token_metadata_program.key, + edition: *accounts.edition.key, + authorization_rules_program: *accounts.authorization_rules_program.key, + authorization_rules: *accounts.authorization_rules.key, + owner_token_record: *accounts.owner_token_record.key, + destination_token_record: *accounts.destination_token_record.key, + instructions: *accounts.instructions.key, + associated_token_program: *accounts.associated_token_program.key, + token_program: *accounts.token_program.key, + system_program: *accounts.system_program.key, + rent: *accounts.rent.key, + } + } +} +impl From for [AccountMeta; MIP1_EXECUTE_SALE_V2_IX_ACCOUNTS_LEN] { + fn from(keys: Mip1ExecuteSaleV2Keys) -> Self { + [ + AccountMeta { + pubkey: keys.payer, + is_signer: true, + is_writable: true, + }, + AccountMeta { + pubkey: keys.buyer, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.seller, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.notary, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.program_as_signer, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.token_account, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.buyer_receipt_token_account, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.token_mint, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.metadata, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.auction_house, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.auction_house_treasury, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.seller_trade_state, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.buyer_trade_state, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.buyer_escrow_payment_account, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.buyer_referral, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.seller_referral, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.token_metadata_program, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.edition, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.authorization_rules_program, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.authorization_rules, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.owner_token_record, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.destination_token_record, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.instructions, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.associated_token_program, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.token_program, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.system_program, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.rent, + is_signer: false, + is_writable: false, + }, + ] + } +} +impl From<[Pubkey; MIP1_EXECUTE_SALE_V2_IX_ACCOUNTS_LEN]> for Mip1ExecuteSaleV2Keys { + fn from(pubkeys: [Pubkey; MIP1_EXECUTE_SALE_V2_IX_ACCOUNTS_LEN]) -> Self { + Self { + payer: pubkeys[0], + buyer: pubkeys[1], + seller: pubkeys[2], + notary: pubkeys[3], + program_as_signer: pubkeys[4], + token_account: pubkeys[5], + buyer_receipt_token_account: pubkeys[6], + token_mint: pubkeys[7], + metadata: pubkeys[8], + auction_house: pubkeys[9], + auction_house_treasury: pubkeys[10], + seller_trade_state: pubkeys[11], + buyer_trade_state: pubkeys[12], + buyer_escrow_payment_account: pubkeys[13], + buyer_referral: pubkeys[14], + seller_referral: pubkeys[15], + token_metadata_program: pubkeys[16], + edition: pubkeys[17], + authorization_rules_program: pubkeys[18], + authorization_rules: pubkeys[19], + owner_token_record: pubkeys[20], + destination_token_record: pubkeys[21], + instructions: pubkeys[22], + associated_token_program: pubkeys[23], + token_program: pubkeys[24], + system_program: pubkeys[25], + rent: pubkeys[26], + } + } +} +impl<'info> From> + for [AccountInfo<'info>; MIP1_EXECUTE_SALE_V2_IX_ACCOUNTS_LEN] +{ + fn from(accounts: Mip1ExecuteSaleV2Accounts<'_, 'info>) -> Self { + [ + accounts.payer.clone(), + accounts.buyer.clone(), + accounts.seller.clone(), + accounts.notary.clone(), + accounts.program_as_signer.clone(), + accounts.token_account.clone(), + accounts.buyer_receipt_token_account.clone(), + accounts.token_mint.clone(), + accounts.metadata.clone(), + accounts.auction_house.clone(), + accounts.auction_house_treasury.clone(), + accounts.seller_trade_state.clone(), + accounts.buyer_trade_state.clone(), + accounts.buyer_escrow_payment_account.clone(), + accounts.buyer_referral.clone(), + accounts.seller_referral.clone(), + accounts.token_metadata_program.clone(), + accounts.edition.clone(), + accounts.authorization_rules_program.clone(), + accounts.authorization_rules.clone(), + accounts.owner_token_record.clone(), + accounts.destination_token_record.clone(), + accounts.instructions.clone(), + accounts.associated_token_program.clone(), + accounts.token_program.clone(), + accounts.system_program.clone(), + accounts.rent.clone(), + ] + } +} +impl<'me, 'info> From<&'me [AccountInfo<'info>; MIP1_EXECUTE_SALE_V2_IX_ACCOUNTS_LEN]> + for Mip1ExecuteSaleV2Accounts<'me, 'info> +{ + fn from(arr: &'me [AccountInfo<'info>; MIP1_EXECUTE_SALE_V2_IX_ACCOUNTS_LEN]) -> Self { + Self { + payer: &arr[0], + buyer: &arr[1], + seller: &arr[2], + notary: &arr[3], + program_as_signer: &arr[4], + token_account: &arr[5], + buyer_receipt_token_account: &arr[6], + token_mint: &arr[7], + metadata: &arr[8], + auction_house: &arr[9], + auction_house_treasury: &arr[10], + seller_trade_state: &arr[11], + buyer_trade_state: &arr[12], + buyer_escrow_payment_account: &arr[13], + buyer_referral: &arr[14], + seller_referral: &arr[15], + token_metadata_program: &arr[16], + edition: &arr[17], + authorization_rules_program: &arr[18], + authorization_rules: &arr[19], + owner_token_record: &arr[20], + destination_token_record: &arr[21], + instructions: &arr[22], + associated_token_program: &arr[23], + token_program: &arr[24], + system_program: &arr[25], + rent: &arr[26], + } + } +} +pub const MIP1_EXECUTE_SALE_V2_IX_DISCM: [u8; 8] = [236, 163, 204, 173, 71, 144, 235, 118]; +#[derive(BorshDeserialize, BorshSerialize, Clone, Debug, PartialEq)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +pub struct Mip1ExecuteSaleV2IxArgs { + pub args: MIP1ExecuteSaleV2Args, +} +#[derive(Clone, Debug, PartialEq)] +pub struct Mip1ExecuteSaleV2IxData(pub Mip1ExecuteSaleV2IxArgs); +impl From for Mip1ExecuteSaleV2IxData { + fn from(args: Mip1ExecuteSaleV2IxArgs) -> Self { + Self(args) + } +} +impl Mip1ExecuteSaleV2IxData { + pub fn deserialize(buf: &[u8]) -> std::io::Result { + let mut reader = buf; + let mut maybe_discm = [0u8; 8]; + reader.read_exact(&mut maybe_discm)?; + if maybe_discm != MIP1_EXECUTE_SALE_V2_IX_DISCM { + return Err(std::io::Error::new( + std::io::ErrorKind::Other, + format!( + "discm does not match. Expected: {:?}. Received: {:?}", + MIP1_EXECUTE_SALE_V2_IX_DISCM, maybe_discm + ), + )); + } + Ok(Self(Mip1ExecuteSaleV2IxArgs::deserialize(&mut reader)?)) + } + pub fn serialize(&self, mut writer: W) -> std::io::Result<()> { + writer.write_all(&MIP1_EXECUTE_SALE_V2_IX_DISCM)?; + self.0.serialize(&mut writer) + } + pub fn try_to_vec(&self) -> std::io::Result> { + let mut data = Vec::new(); + self.serialize(&mut data)?; + Ok(data) + } +} +pub fn mip1_execute_sale_v2_ix_with_program_id( + program_id: Pubkey, + keys: Mip1ExecuteSaleV2Keys, + args: Mip1ExecuteSaleV2IxArgs, +) -> std::io::Result { + let metas: [AccountMeta; MIP1_EXECUTE_SALE_V2_IX_ACCOUNTS_LEN] = keys.into(); + let data: Mip1ExecuteSaleV2IxData = args.into(); + Ok(Instruction { + program_id, + accounts: Vec::from(metas), + data: data.try_to_vec()?, + }) +} +pub fn mip1_execute_sale_v2_ix( + keys: Mip1ExecuteSaleV2Keys, + args: Mip1ExecuteSaleV2IxArgs, +) -> std::io::Result { + mip1_execute_sale_v2_ix_with_program_id(crate::ID, keys, args) +} +pub fn mip1_execute_sale_v2_invoke_with_program_id( + program_id: Pubkey, + accounts: Mip1ExecuteSaleV2Accounts<'_, '_>, + args: Mip1ExecuteSaleV2IxArgs, +) -> ProgramResult { + let keys: Mip1ExecuteSaleV2Keys = accounts.into(); + let ix = mip1_execute_sale_v2_ix_with_program_id(program_id, keys, args)?; + invoke_instruction(&ix, accounts) +} +pub fn mip1_execute_sale_v2_invoke( + accounts: Mip1ExecuteSaleV2Accounts<'_, '_>, + args: Mip1ExecuteSaleV2IxArgs, +) -> ProgramResult { + mip1_execute_sale_v2_invoke_with_program_id(crate::ID, accounts, args) +} +pub fn mip1_execute_sale_v2_invoke_signed_with_program_id( + program_id: Pubkey, + accounts: Mip1ExecuteSaleV2Accounts<'_, '_>, + args: Mip1ExecuteSaleV2IxArgs, + seeds: &[&[&[u8]]], +) -> ProgramResult { + let keys: Mip1ExecuteSaleV2Keys = accounts.into(); + let ix = mip1_execute_sale_v2_ix_with_program_id(program_id, keys, args)?; + invoke_instruction_signed(&ix, accounts, seeds) +} +pub fn mip1_execute_sale_v2_invoke_signed( + accounts: Mip1ExecuteSaleV2Accounts<'_, '_>, + args: Mip1ExecuteSaleV2IxArgs, + seeds: &[&[&[u8]]], +) -> ProgramResult { + mip1_execute_sale_v2_invoke_signed_with_program_id(crate::ID, accounts, args, seeds) +} +pub fn mip1_execute_sale_v2_verify_account_keys( + accounts: Mip1ExecuteSaleV2Accounts<'_, '_>, + keys: Mip1ExecuteSaleV2Keys, +) -> Result<(), (Pubkey, Pubkey)> { + for (actual, expected) in [ + (*accounts.payer.key, keys.payer), + (*accounts.buyer.key, keys.buyer), + (*accounts.seller.key, keys.seller), + (*accounts.notary.key, keys.notary), + (*accounts.program_as_signer.key, keys.program_as_signer), + (*accounts.token_account.key, keys.token_account), + ( + *accounts.buyer_receipt_token_account.key, + keys.buyer_receipt_token_account, + ), + (*accounts.token_mint.key, keys.token_mint), + (*accounts.metadata.key, keys.metadata), + (*accounts.auction_house.key, keys.auction_house), + ( + *accounts.auction_house_treasury.key, + keys.auction_house_treasury, + ), + (*accounts.seller_trade_state.key, keys.seller_trade_state), + (*accounts.buyer_trade_state.key, keys.buyer_trade_state), + ( + *accounts.buyer_escrow_payment_account.key, + keys.buyer_escrow_payment_account, + ), + (*accounts.buyer_referral.key, keys.buyer_referral), + (*accounts.seller_referral.key, keys.seller_referral), + ( + *accounts.token_metadata_program.key, + keys.token_metadata_program, + ), + (*accounts.edition.key, keys.edition), + ( + *accounts.authorization_rules_program.key, + keys.authorization_rules_program, + ), + (*accounts.authorization_rules.key, keys.authorization_rules), + (*accounts.owner_token_record.key, keys.owner_token_record), + ( + *accounts.destination_token_record.key, + keys.destination_token_record, + ), + (*accounts.instructions.key, keys.instructions), + ( + *accounts.associated_token_program.key, + keys.associated_token_program, + ), + (*accounts.token_program.key, keys.token_program), + (*accounts.system_program.key, keys.system_program), + (*accounts.rent.key, keys.rent), + ] { + if actual != expected { + return Err((actual, expected)); + } + } + Ok(()) +} +pub fn mip1_execute_sale_v2_verify_writable_privileges<'me, 'info>( + accounts: Mip1ExecuteSaleV2Accounts<'me, 'info>, +) -> Result<(), (&'me AccountInfo<'info>, ProgramError)> { + for should_be_writable in [ + accounts.payer, + accounts.buyer, + accounts.seller, + accounts.token_account, + accounts.buyer_receipt_token_account, + accounts.metadata, + accounts.auction_house_treasury, + accounts.seller_trade_state, + accounts.buyer_trade_state, + accounts.buyer_escrow_payment_account, + accounts.buyer_referral, + accounts.seller_referral, + accounts.owner_token_record, + accounts.destination_token_record, + ] { + if !should_be_writable.is_writable { + return Err((should_be_writable, ProgramError::InvalidAccountData)); + } + } + Ok(()) +} +pub fn mip1_execute_sale_v2_verify_signer_privileges<'me, 'info>( + accounts: Mip1ExecuteSaleV2Accounts<'me, 'info>, +) -> Result<(), (&'me AccountInfo<'info>, ProgramError)> { + for should_be_signer in [accounts.payer] { + if !should_be_signer.is_signer { + return Err((should_be_signer, ProgramError::MissingRequiredSignature)); + } + } + Ok(()) +} +pub fn mip1_execute_sale_v2_verify_account_privileges<'me, 'info>( + accounts: Mip1ExecuteSaleV2Accounts<'me, 'info>, +) -> Result<(), (&'me AccountInfo<'info>, ProgramError)> { + mip1_execute_sale_v2_verify_writable_privileges(accounts)?; + mip1_execute_sale_v2_verify_signer_privileges(accounts)?; + Ok(()) +} +pub const MIP1_CANCEL_SELL_IX_ACCOUNTS_LEN: usize = 21; +#[derive(Copy, Clone, Debug)] +pub struct Mip1CancelSellAccounts<'me, 'info> { + pub wallet: &'me AccountInfo<'info>, + pub notary: &'me AccountInfo<'info>, + pub program_as_signer: &'me AccountInfo<'info>, + pub token_ata: &'me AccountInfo<'info>, + pub token_mint: &'me AccountInfo<'info>, + pub metadata: &'me AccountInfo<'info>, + pub auction_house: &'me AccountInfo<'info>, + pub seller_trade_state: &'me AccountInfo<'info>, + pub token_account: &'me AccountInfo<'info>, + pub token_account_temp: &'me AccountInfo<'info>, + pub temp_token_record: &'me AccountInfo<'info>, + pub token_metadata_program: &'me AccountInfo<'info>, + pub edition: &'me AccountInfo<'info>, + pub authorization_rules_program: &'me AccountInfo<'info>, + pub authorization_rules: &'me AccountInfo<'info>, + pub owner_token_record: &'me AccountInfo<'info>, + pub destination_token_record: &'me AccountInfo<'info>, + pub instructions: &'me AccountInfo<'info>, + pub associated_token_program: &'me AccountInfo<'info>, + pub token_program: &'me AccountInfo<'info>, + pub system_program: &'me AccountInfo<'info>, +} +#[derive(Copy, Clone, Debug, PartialEq)] +pub struct Mip1CancelSellKeys { + pub wallet: Pubkey, + pub notary: Pubkey, + pub program_as_signer: Pubkey, + pub token_ata: Pubkey, + pub token_mint: Pubkey, + pub metadata: Pubkey, + pub auction_house: Pubkey, + pub seller_trade_state: Pubkey, + pub token_account: Pubkey, + pub token_account_temp: Pubkey, + pub temp_token_record: Pubkey, + pub token_metadata_program: Pubkey, + pub edition: Pubkey, + pub authorization_rules_program: Pubkey, + pub authorization_rules: Pubkey, + pub owner_token_record: Pubkey, + pub destination_token_record: Pubkey, + pub instructions: Pubkey, + pub associated_token_program: Pubkey, + pub token_program: Pubkey, + pub system_program: Pubkey, +} +impl From> for Mip1CancelSellKeys { + fn from(accounts: Mip1CancelSellAccounts) -> Self { + Self { + wallet: *accounts.wallet.key, + notary: *accounts.notary.key, + program_as_signer: *accounts.program_as_signer.key, + token_ata: *accounts.token_ata.key, + token_mint: *accounts.token_mint.key, + metadata: *accounts.metadata.key, + auction_house: *accounts.auction_house.key, + seller_trade_state: *accounts.seller_trade_state.key, + token_account: *accounts.token_account.key, + token_account_temp: *accounts.token_account_temp.key, + temp_token_record: *accounts.temp_token_record.key, + token_metadata_program: *accounts.token_metadata_program.key, + edition: *accounts.edition.key, + authorization_rules_program: *accounts.authorization_rules_program.key, + authorization_rules: *accounts.authorization_rules.key, + owner_token_record: *accounts.owner_token_record.key, + destination_token_record: *accounts.destination_token_record.key, + instructions: *accounts.instructions.key, + associated_token_program: *accounts.associated_token_program.key, + token_program: *accounts.token_program.key, + system_program: *accounts.system_program.key, + } + } +} +impl From for [AccountMeta; MIP1_CANCEL_SELL_IX_ACCOUNTS_LEN] { + fn from(keys: Mip1CancelSellKeys) -> Self { + [ + AccountMeta { + pubkey: keys.wallet, + is_signer: true, + is_writable: true, + }, + AccountMeta { + pubkey: keys.notary, + is_signer: true, + is_writable: false, + }, + AccountMeta { + pubkey: keys.program_as_signer, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.token_ata, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.token_mint, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.metadata, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.auction_house, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.seller_trade_state, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.token_account, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.token_account_temp, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.temp_token_record, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.token_metadata_program, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.edition, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.authorization_rules_program, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.authorization_rules, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.owner_token_record, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.destination_token_record, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.instructions, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.associated_token_program, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.token_program, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: keys.system_program, + is_signer: false, + is_writable: false, + }, + ] + } +} +impl From<[Pubkey; MIP1_CANCEL_SELL_IX_ACCOUNTS_LEN]> for Mip1CancelSellKeys { + fn from(pubkeys: [Pubkey; MIP1_CANCEL_SELL_IX_ACCOUNTS_LEN]) -> Self { + Self { + wallet: pubkeys[0], + notary: pubkeys[1], + program_as_signer: pubkeys[2], + token_ata: pubkeys[3], + token_mint: pubkeys[4], + metadata: pubkeys[5], + auction_house: pubkeys[6], + seller_trade_state: pubkeys[7], + token_account: pubkeys[8], + token_account_temp: pubkeys[9], + temp_token_record: pubkeys[10], + token_metadata_program: pubkeys[11], + edition: pubkeys[12], + authorization_rules_program: pubkeys[13], + authorization_rules: pubkeys[14], + owner_token_record: pubkeys[15], + destination_token_record: pubkeys[16], + instructions: pubkeys[17], + associated_token_program: pubkeys[18], + token_program: pubkeys[19], + system_program: pubkeys[20], + } + } +} +impl<'info> From> + for [AccountInfo<'info>; MIP1_CANCEL_SELL_IX_ACCOUNTS_LEN] +{ + fn from(accounts: Mip1CancelSellAccounts<'_, 'info>) -> Self { + [ + accounts.wallet.clone(), + accounts.notary.clone(), + accounts.program_as_signer.clone(), + accounts.token_ata.clone(), + accounts.token_mint.clone(), + accounts.metadata.clone(), + accounts.auction_house.clone(), + accounts.seller_trade_state.clone(), + accounts.token_account.clone(), + accounts.token_account_temp.clone(), + accounts.temp_token_record.clone(), + accounts.token_metadata_program.clone(), + accounts.edition.clone(), + accounts.authorization_rules_program.clone(), + accounts.authorization_rules.clone(), + accounts.owner_token_record.clone(), + accounts.destination_token_record.clone(), + accounts.instructions.clone(), + accounts.associated_token_program.clone(), + accounts.token_program.clone(), + accounts.system_program.clone(), + ] + } +} +impl<'me, 'info> From<&'me [AccountInfo<'info>; MIP1_CANCEL_SELL_IX_ACCOUNTS_LEN]> + for Mip1CancelSellAccounts<'me, 'info> +{ + fn from(arr: &'me [AccountInfo<'info>; MIP1_CANCEL_SELL_IX_ACCOUNTS_LEN]) -> Self { + Self { + wallet: &arr[0], + notary: &arr[1], + program_as_signer: &arr[2], + token_ata: &arr[3], + token_mint: &arr[4], + metadata: &arr[5], + auction_house: &arr[6], + seller_trade_state: &arr[7], + token_account: &arr[8], + token_account_temp: &arr[9], + temp_token_record: &arr[10], + token_metadata_program: &arr[11], + edition: &arr[12], + authorization_rules_program: &arr[13], + authorization_rules: &arr[14], + owner_token_record: &arr[15], + destination_token_record: &arr[16], + instructions: &arr[17], + associated_token_program: &arr[18], + token_program: &arr[19], + system_program: &arr[20], + } + } +} +pub const MIP1_CANCEL_SELL_IX_DISCM: [u8; 8] = [74, 190, 185, 225, 88, 105, 209, 156]; +#[derive(Clone, Debug, PartialEq)] +pub struct Mip1CancelSellIxData; +impl Mip1CancelSellIxData { + pub fn deserialize(buf: &[u8]) -> std::io::Result { + let mut reader = buf; + let mut maybe_discm = [0u8; 8]; + reader.read_exact(&mut maybe_discm)?; + if maybe_discm != MIP1_CANCEL_SELL_IX_DISCM { + return Err(std::io::Error::new( + std::io::ErrorKind::Other, + format!( + "discm does not match. Expected: {:?}. Received: {:?}", + MIP1_CANCEL_SELL_IX_DISCM, maybe_discm + ), + )); + } + Ok(Self) + } + pub fn serialize(&self, mut writer: W) -> std::io::Result<()> { + writer.write_all(&MIP1_CANCEL_SELL_IX_DISCM) + } + pub fn try_to_vec(&self) -> std::io::Result> { + let mut data = Vec::new(); + self.serialize(&mut data)?; + Ok(data) + } +} +pub fn mip1_cancel_sell_ix_with_program_id( + program_id: Pubkey, + keys: Mip1CancelSellKeys, +) -> std::io::Result { + let metas: [AccountMeta; MIP1_CANCEL_SELL_IX_ACCOUNTS_LEN] = keys.into(); + Ok(Instruction { + program_id, + accounts: Vec::from(metas), + data: Mip1CancelSellIxData.try_to_vec()?, + }) +} +pub fn mip1_cancel_sell_ix(keys: Mip1CancelSellKeys) -> std::io::Result { + mip1_cancel_sell_ix_with_program_id(crate::ID, keys) +} +pub fn mip1_cancel_sell_invoke_with_program_id( + program_id: Pubkey, + accounts: Mip1CancelSellAccounts<'_, '_>, +) -> ProgramResult { + let keys: Mip1CancelSellKeys = accounts.into(); + let ix = mip1_cancel_sell_ix_with_program_id(program_id, keys)?; + invoke_instruction(&ix, accounts) +} +pub fn mip1_cancel_sell_invoke(accounts: Mip1CancelSellAccounts<'_, '_>) -> ProgramResult { + mip1_cancel_sell_invoke_with_program_id(crate::ID, accounts) +} +pub fn mip1_cancel_sell_invoke_signed_with_program_id( + program_id: Pubkey, + accounts: Mip1CancelSellAccounts<'_, '_>, + seeds: &[&[&[u8]]], +) -> ProgramResult { + let keys: Mip1CancelSellKeys = accounts.into(); + let ix = mip1_cancel_sell_ix_with_program_id(program_id, keys)?; + invoke_instruction_signed(&ix, accounts, seeds) +} +pub fn mip1_cancel_sell_invoke_signed( + accounts: Mip1CancelSellAccounts<'_, '_>, + seeds: &[&[&[u8]]], +) -> ProgramResult { + mip1_cancel_sell_invoke_signed_with_program_id(crate::ID, accounts, seeds) +} +pub fn mip1_cancel_sell_verify_account_keys( + accounts: Mip1CancelSellAccounts<'_, '_>, + keys: Mip1CancelSellKeys, +) -> Result<(), (Pubkey, Pubkey)> { + for (actual, expected) in [ + (*accounts.wallet.key, keys.wallet), + (*accounts.notary.key, keys.notary), + (*accounts.program_as_signer.key, keys.program_as_signer), + (*accounts.token_ata.key, keys.token_ata), + (*accounts.token_mint.key, keys.token_mint), + (*accounts.metadata.key, keys.metadata), + (*accounts.auction_house.key, keys.auction_house), + (*accounts.seller_trade_state.key, keys.seller_trade_state), + (*accounts.token_account.key, keys.token_account), + (*accounts.token_account_temp.key, keys.token_account_temp), + (*accounts.temp_token_record.key, keys.temp_token_record), + ( + *accounts.token_metadata_program.key, + keys.token_metadata_program, + ), + (*accounts.edition.key, keys.edition), + ( + *accounts.authorization_rules_program.key, + keys.authorization_rules_program, + ), + (*accounts.authorization_rules.key, keys.authorization_rules), + (*accounts.owner_token_record.key, keys.owner_token_record), + ( + *accounts.destination_token_record.key, + keys.destination_token_record, + ), + (*accounts.instructions.key, keys.instructions), + ( + *accounts.associated_token_program.key, + keys.associated_token_program, + ), + (*accounts.token_program.key, keys.token_program), + (*accounts.system_program.key, keys.system_program), + ] { + if actual != expected { + return Err((actual, expected)); + } + } + Ok(()) +} +pub fn mip1_cancel_sell_verify_writable_privileges<'me, 'info>( + accounts: Mip1CancelSellAccounts<'me, 'info>, +) -> Result<(), (&'me AccountInfo<'info>, ProgramError)> { + for should_be_writable in [ + accounts.wallet, + accounts.token_ata, + accounts.metadata, + accounts.seller_trade_state, + accounts.token_account, + accounts.token_account_temp, + accounts.temp_token_record, + accounts.owner_token_record, + accounts.destination_token_record, + ] { + if !should_be_writable.is_writable { + return Err((should_be_writable, ProgramError::InvalidAccountData)); + } + } + Ok(()) +} +pub fn mip1_cancel_sell_verify_signer_privileges<'me, 'info>( + accounts: Mip1CancelSellAccounts<'me, 'info>, +) -> Result<(), (&'me AccountInfo<'info>, ProgramError)> { + for should_be_signer in [accounts.wallet, accounts.notary] { + if !should_be_signer.is_signer { + return Err((should_be_signer, ProgramError::MissingRequiredSignature)); + } + } + Ok(()) +} +pub fn mip1_cancel_sell_verify_account_privileges<'me, 'info>( + accounts: Mip1CancelSellAccounts<'me, 'info>, +) -> Result<(), (&'me AccountInfo<'info>, ProgramError)> { + mip1_cancel_sell_verify_writable_privileges(accounts)?; + mip1_cancel_sell_verify_signer_privileges(accounts)?; + Ok(()) +} +pub const WITHDRAW_BY_MMM_IX_ACCOUNTS_LEN: usize = 4; +#[derive(Copy, Clone, Debug)] +pub struct WithdrawByMmmAccounts<'me, 'info> { + pub mmm_pool: &'me AccountInfo<'info>, + pub to: &'me AccountInfo<'info>, + pub escrow_payment_account: &'me AccountInfo<'info>, + pub system_program: &'me AccountInfo<'info>, +} +#[derive(Copy, Clone, Debug, PartialEq)] +pub struct WithdrawByMmmKeys { + pub mmm_pool: Pubkey, + pub to: Pubkey, + pub escrow_payment_account: Pubkey, + pub system_program: Pubkey, +} +impl From> for WithdrawByMmmKeys { + fn from(accounts: WithdrawByMmmAccounts) -> Self { + Self { + mmm_pool: *accounts.mmm_pool.key, + to: *accounts.to.key, + escrow_payment_account: *accounts.escrow_payment_account.key, + system_program: *accounts.system_program.key, + } + } +} +impl From for [AccountMeta; WITHDRAW_BY_MMM_IX_ACCOUNTS_LEN] { + fn from(keys: WithdrawByMmmKeys) -> Self { + [ + AccountMeta { + pubkey: keys.mmm_pool, + is_signer: true, + is_writable: false, + }, + AccountMeta { + pubkey: keys.to, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.escrow_payment_account, + is_signer: false, + is_writable: true, + }, + AccountMeta { + pubkey: keys.system_program, + is_signer: false, + is_writable: false, + }, + ] + } +} +impl From<[Pubkey; WITHDRAW_BY_MMM_IX_ACCOUNTS_LEN]> for WithdrawByMmmKeys { + fn from(pubkeys: [Pubkey; WITHDRAW_BY_MMM_IX_ACCOUNTS_LEN]) -> Self { + Self { + mmm_pool: pubkeys[0], + to: pubkeys[1], + escrow_payment_account: pubkeys[2], + system_program: pubkeys[3], + } + } +} +impl<'info> From> + for [AccountInfo<'info>; WITHDRAW_BY_MMM_IX_ACCOUNTS_LEN] +{ + fn from(accounts: WithdrawByMmmAccounts<'_, 'info>) -> Self { + [ + accounts.mmm_pool.clone(), + accounts.to.clone(), + accounts.escrow_payment_account.clone(), + accounts.system_program.clone(), + ] + } +} +impl<'me, 'info> From<&'me [AccountInfo<'info>; WITHDRAW_BY_MMM_IX_ACCOUNTS_LEN]> + for WithdrawByMmmAccounts<'me, 'info> +{ + fn from(arr: &'me [AccountInfo<'info>; WITHDRAW_BY_MMM_IX_ACCOUNTS_LEN]) -> Self { + Self { + mmm_pool: &arr[0], + to: &arr[1], + escrow_payment_account: &arr[2], + system_program: &arr[3], + } + } +} +pub const WITHDRAW_BY_MMM_IX_DISCM: [u8; 8] = [35, 73, 133, 139, 32, 55, 213, 140]; +#[derive(BorshDeserialize, BorshSerialize, Clone, Debug, PartialEq)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +pub struct WithdrawByMmmIxArgs { + pub args: WithdrawByMMMArgs, +} +#[derive(Clone, Debug, PartialEq)] +pub struct WithdrawByMmmIxData(pub WithdrawByMmmIxArgs); +impl From for WithdrawByMmmIxData { + fn from(args: WithdrawByMmmIxArgs) -> Self { + Self(args) + } +} +impl WithdrawByMmmIxData { + pub fn deserialize(buf: &[u8]) -> std::io::Result { + let mut reader = buf; + let mut maybe_discm = [0u8; 8]; + reader.read_exact(&mut maybe_discm)?; + if maybe_discm != WITHDRAW_BY_MMM_IX_DISCM { + return Err(std::io::Error::new( + std::io::ErrorKind::Other, + format!( + "discm does not match. Expected: {:?}. Received: {:?}", + WITHDRAW_BY_MMM_IX_DISCM, maybe_discm + ), + )); + } + Ok(Self(WithdrawByMmmIxArgs::deserialize(&mut reader)?)) + } + pub fn serialize(&self, mut writer: W) -> std::io::Result<()> { + writer.write_all(&WITHDRAW_BY_MMM_IX_DISCM)?; + self.0.serialize(&mut writer) + } + pub fn try_to_vec(&self) -> std::io::Result> { + let mut data = Vec::new(); + self.serialize(&mut data)?; + Ok(data) + } +} +pub fn withdraw_by_mmm_ix_with_program_id( + program_id: Pubkey, + keys: WithdrawByMmmKeys, + args: WithdrawByMmmIxArgs, +) -> std::io::Result { + let metas: [AccountMeta; WITHDRAW_BY_MMM_IX_ACCOUNTS_LEN] = keys.into(); + let data: WithdrawByMmmIxData = args.into(); + Ok(Instruction { + program_id, + accounts: Vec::from(metas), + data: data.try_to_vec()?, + }) +} +pub fn withdraw_by_mmm_ix( + keys: WithdrawByMmmKeys, + args: WithdrawByMmmIxArgs, +) -> std::io::Result { + withdraw_by_mmm_ix_with_program_id(crate::ID, keys, args) +} +pub fn withdraw_by_mmm_invoke_with_program_id( + program_id: Pubkey, + accounts: WithdrawByMmmAccounts<'_, '_>, + args: WithdrawByMmmIxArgs, +) -> ProgramResult { + let keys: WithdrawByMmmKeys = accounts.into(); + let ix = withdraw_by_mmm_ix_with_program_id(program_id, keys, args)?; + invoke_instruction(&ix, accounts) +} +pub fn withdraw_by_mmm_invoke( + accounts: WithdrawByMmmAccounts<'_, '_>, + args: WithdrawByMmmIxArgs, +) -> ProgramResult { + withdraw_by_mmm_invoke_with_program_id(crate::ID, accounts, args) +} +pub fn withdraw_by_mmm_invoke_signed_with_program_id( + program_id: Pubkey, + accounts: WithdrawByMmmAccounts<'_, '_>, + args: WithdrawByMmmIxArgs, + seeds: &[&[&[u8]]], +) -> ProgramResult { + let keys: WithdrawByMmmKeys = accounts.into(); + let ix = withdraw_by_mmm_ix_with_program_id(program_id, keys, args)?; + invoke_instruction_signed(&ix, accounts, seeds) +} +pub fn withdraw_by_mmm_invoke_signed( + accounts: WithdrawByMmmAccounts<'_, '_>, + args: WithdrawByMmmIxArgs, + seeds: &[&[&[u8]]], +) -> ProgramResult { + withdraw_by_mmm_invoke_signed_with_program_id(crate::ID, accounts, args, seeds) +} +pub fn withdraw_by_mmm_verify_account_keys( + accounts: WithdrawByMmmAccounts<'_, '_>, + keys: WithdrawByMmmKeys, +) -> Result<(), (Pubkey, Pubkey)> { + for (actual, expected) in [ + (*accounts.mmm_pool.key, keys.mmm_pool), + (*accounts.to.key, keys.to), + ( + *accounts.escrow_payment_account.key, + keys.escrow_payment_account, + ), + (*accounts.system_program.key, keys.system_program), + ] { + if actual != expected { + return Err((actual, expected)); + } + } + Ok(()) +} +pub fn withdraw_by_mmm_verify_writable_privileges<'me, 'info>( + accounts: WithdrawByMmmAccounts<'me, 'info>, +) -> Result<(), (&'me AccountInfo<'info>, ProgramError)> { + for should_be_writable in [accounts.to, accounts.escrow_payment_account] { + if !should_be_writable.is_writable { + return Err((should_be_writable, ProgramError::InvalidAccountData)); + } + } + Ok(()) +} +pub fn withdraw_by_mmm_verify_signer_privileges<'me, 'info>( + accounts: WithdrawByMmmAccounts<'me, 'info>, +) -> Result<(), (&'me AccountInfo<'info>, ProgramError)> { + for should_be_signer in [accounts.mmm_pool] { + if !should_be_signer.is_signer { + return Err((should_be_signer, ProgramError::MissingRequiredSignature)); + } + } + Ok(()) +} +pub fn withdraw_by_mmm_verify_account_privileges<'me, 'info>( + accounts: WithdrawByMmmAccounts<'me, 'info>, +) -> Result<(), (&'me AccountInfo<'info>, ProgramError)> { + withdraw_by_mmm_verify_writable_privileges(accounts)?; + withdraw_by_mmm_verify_signer_privileges(accounts)?; + Ok(()) +} diff --git a/programs/m2_interface/src/lib.rs b/programs/m2_interface/src/lib.rs new file mode 100644 index 0000000..242d610 --- /dev/null +++ b/programs/m2_interface/src/lib.rs @@ -0,0 +1,9 @@ +solana_program::declare_id!("M2mx93ekt1fmXSVkTrUL9xVFHkmME8HTUi5Cyc5aF7K"); +pub mod accounts; +pub use accounts::*; +pub mod typedefs; +pub use typedefs::*; +pub mod instructions; +pub use instructions::*; +pub mod errors; +pub use errors::*; diff --git a/programs/m2_interface/src/typedefs.rs b/programs/m2_interface/src/typedefs.rs new file mode 100644 index 0000000..640eb2d --- /dev/null +++ b/programs/m2_interface/src/typedefs.rs @@ -0,0 +1,36 @@ +use borsh::{BorshDeserialize, BorshSerialize}; +use solana_program::pubkey::Pubkey; +#[derive(Clone, Debug, BorshDeserialize, BorshSerialize, PartialEq)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +pub struct WithdrawByMMMArgs { + pub wallet: Pubkey, + pub auction_house: Pubkey, + pub amount: u64, + pub mmm_pool_uuid: Pubkey, +} +#[derive(Clone, Debug, BorshDeserialize, BorshSerialize, PartialEq)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +pub struct MIP1ExecuteSaleV2Args { + pub price: u64, + pub maker_fee_bp: i16, + pub taker_fee_bp: u16, +} +#[derive(Clone, Debug, BorshDeserialize, BorshSerialize, PartialEq)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +pub struct MIP1SellArgs { + pub price: u64, + pub expiry: i64, +} +#[derive(Clone, Debug, BorshDeserialize, BorshSerialize, PartialEq)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +pub struct OCPExecuteSaleV2Args { + pub price: u64, + pub maker_fee_bp: i16, + pub taker_fee_bp: u16, +} +#[derive(Clone, Debug, BorshDeserialize, BorshSerialize, PartialEq)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +pub struct OCPSellArgs { + pub price: u64, + pub expiry: i64, +} diff --git a/programs/mmm/Cargo.toml b/programs/mmm/Cargo.toml index 70188c5..d928b58 100644 --- a/programs/mmm/Cargo.toml +++ b/programs/mmm/Cargo.toml @@ -2,8 +2,7 @@ name = "mmm" version = "0.2.0" description = "MMM is an open source and secure AMM protocol on Solana" -edition = "2018" -license = "AGPL-3.0" +edition = "2021" [lib] crate-type = ["cdylib", "lib"] @@ -28,3 +27,4 @@ spl-associated-token-account = { version = "2.2.0", features = [ "no-entrypoint", ] } spl-token-2022 = "0.9.0" +m2_interface = { path = "../m2_interface" } diff --git a/programs/mmm/src/constants.rs b/programs/mmm/src/constants.rs index 990f827..ae9b919 100644 --- a/programs/mmm/src/constants.rs +++ b/programs/mmm/src/constants.rs @@ -17,3 +17,7 @@ pub const CANCEL_AUTHORITY: Pubkey = if cfg!(feature = "anchor-test") { pubkey!("CNTuB1JiQD8Xh5SoRcEmF61yivN9F7uzdSaGnRex36wi") }; pub const MPL_TOKEN_AUTH_RULES: Pubkey = pubkey!("auth9SigNpDKz4sJJ1DfCTuZrZNSAgh9sFD3rboVmgg"); + +pub const M2_PROGRAM: Pubkey = pubkey!("M2mx93ekt1fmXSVkTrUL9xVFHkmME8HTUi5Cyc5aF7K"); +pub const M2_PREFIX: &str = "m2"; +pub const M2_AUCTION_HOUSE: Pubkey = pubkey!("E8cU1WiRWjanGxmn96ewBgk9vPTcL6AEZ1t6F6fkgUWe"); diff --git a/programs/mmm/src/errors.rs b/programs/mmm/src/errors.rs index 1bb81d4..4061e99 100644 --- a/programs/mmm/src/errors.rs +++ b/programs/mmm/src/errors.rs @@ -60,4 +60,6 @@ pub enum MMMErrorCode { InvalidTokenStandard, // 0x178b #[msg("Unexpected metadata uri")] UnexpectedMetadataUri, // 0x178c + #[msg("Invalid remaining accounts")] + InvalidRemainingAccounts, // 0x178d } diff --git a/programs/mmm/src/instructions/admin/mod.rs b/programs/mmm/src/instructions/admin/mod.rs index 0f8a503..1971980 100644 --- a/programs/mmm/src/instructions/admin/mod.rs +++ b/programs/mmm/src/instructions/admin/mod.rs @@ -3,11 +3,13 @@ use super::*; pub mod create_pool; +pub mod set_shared_escrow; pub mod sol_close_pool; pub mod update_allowlists; pub mod update_pool; pub use create_pool::*; +pub use set_shared_escrow::*; pub use sol_close_pool::*; pub use update_allowlists::*; pub use update_pool::*; diff --git a/programs/mmm/src/instructions/admin/set_shared_escrow.rs b/programs/mmm/src/instructions/admin/set_shared_escrow.rs new file mode 100644 index 0000000..c6d0ab8 --- /dev/null +++ b/programs/mmm/src/instructions/admin/set_shared_escrow.rs @@ -0,0 +1,59 @@ +use super::*; + +#[derive(AnchorSerialize, AnchorDeserialize)] +pub struct SetSharedEscrowArgs { + pub shared_escrow_count: u64, +} + +#[derive(Accounts)] +#[instruction(args:SetSharedEscrowArgs)] +pub struct SetSharedEscrow<'info> { + #[account(mut)] + pub owner: Signer<'info>, + pub cosigner: Signer<'info>, + #[account( + mut, + seeds = [POOL_PREFIX.as_bytes(), owner.key().as_ref(), pool.uuid.as_ref()], + bump, + has_one = owner @ MMMErrorCode::InvalidOwner, + has_one = cosigner @ MMMErrorCode::InvalidCosigner, + )] + pub pool: Box>, + /// CHECK: it's checked with seeds of M2's PDA seeds, and linked to the owner + #[account( + seeds = [ + M2_PREFIX.as_bytes(), + M2_AUCTION_HOUSE.as_ref(), + owner.key().as_ref(), + ], + bump, + seeds::program = M2_PROGRAM, + )] + pub shared_escrow_account: UncheckedAccount<'info>, +} + +pub fn handler(ctx: Context, args: SetSharedEscrowArgs) -> Result<()> { + let pool = &mut ctx.accounts.pool; + + // if there is any buyside payment, we can't set shared escrow + if pool.buyside_payment_amount > 0 { + return Err(MMMErrorCode::InvalidAccountState.into()); + } + + // if there is any sellside asset, we can't set shared escrow + if pool.sellside_asset_amount > 0 { + return Err(MMMErrorCode::InvalidAccountState.into()); + } + + // not support for reinvest yet, and we will start with collection offers + // for shared escrow first. + if pool.reinvest_fulfill_buy || pool.reinvest_fulfill_sell { + return Err(MMMErrorCode::InvalidAccountState.into()); + } + + pool.shared_escrow_account = ctx.accounts.shared_escrow_account.key(); + pool.shared_escrow_count = args.shared_escrow_count; + log_pool("post_set_shared_escrow", pool)?; + + Ok(()) +} diff --git a/programs/mmm/src/instructions/admin/update_pool.rs b/programs/mmm/src/instructions/admin/update_pool.rs index ade99f6..a936fd5 100644 --- a/programs/mmm/src/instructions/admin/update_pool.rs +++ b/programs/mmm/src/instructions/admin/update_pool.rs @@ -43,13 +43,18 @@ pub fn handler(ctx: Context, args: UpdatePoolArgs) -> Result<()> { pool.spot_price = args.spot_price; pool.curve_type = args.curve_type; pool.curve_delta = args.curve_delta; - pool.reinvest_fulfill_buy = args.reinvest_fulfill_buy; - pool.reinvest_fulfill_sell = args.reinvest_fulfill_sell; pool.expiry = args.expiry; pool.lp_fee_bp = args.lp_fee_bp; pool.referral = args.referral; pool.cosigner_annotation = args.cosigner_annotation; pool.buyside_creator_royalty_bp = args.buyside_creator_royalty_bp; + + // if we are using shared escrow, we can't change the reinvest setting + if !pool.using_shared_escrow() { + pool.reinvest_fulfill_buy = args.reinvest_fulfill_buy; + pool.reinvest_fulfill_sell = args.reinvest_fulfill_sell; + } + log_pool("post_update_pool", pool)?; Ok(()) diff --git a/programs/mmm/src/instructions/mip1/mip1_deposit_sell.rs b/programs/mmm/src/instructions/mip1/mip1_deposit_sell.rs index 5b51ff2..b84de87 100644 --- a/programs/mmm/src/instructions/mip1/mip1_deposit_sell.rs +++ b/programs/mmm/src/instructions/mip1/mip1_deposit_sell.rs @@ -123,6 +123,10 @@ pub fn handler(ctx: Context, args: DepositSellArgs) -> Result<( let authorization_rules_program = &ctx.accounts.authorization_rules_program; let token_metadata_program_ai = &ctx.accounts.token_metadata_program.to_account_info(); + if pool.using_shared_escrow() { + return Err(MMMErrorCode::InvalidAccountState.into()); + } + let parsed_metadata = check_allowlists_for_mint( &pool.allowlists, asset_mint, diff --git a/programs/mmm/src/instructions/mip1/sol_mip1_fulfill_buy.rs b/programs/mmm/src/instructions/mip1/sol_mip1_fulfill_buy.rs index eeb7b5c..9d02849 100644 --- a/programs/mmm/src/instructions/mip1/sol_mip1_fulfill_buy.rs +++ b/programs/mmm/src/instructions/mip1/sol_mip1_fulfill_buy.rs @@ -13,7 +13,10 @@ use crate::{ ata::init_if_needed_ata, constants::*, errors::MMMErrorCode, - instructions::sol_fulfill_buy::SolFulfillBuyArgs, + index_ra, + instructions::{ + check_remaining_accounts_for_m2, sol_fulfill_buy::SolFulfillBuyArgs, withdraw_m2, + }, state::{Pool, SellState}, util::{ assert_is_programmable, assert_valid_fees_bp, check_allowlists_for_mint, @@ -134,6 +137,13 @@ pub struct SolMip1FulfillBuy<'info> { pub token_program: Interface<'info, TokenInterface>, pub associated_token_program: Program<'info, AssociatedToken>, pub rent: Sysvar<'info, Rent>, + // Remaining accounts + // Branch: using shared escrow accounts + // 0: m2_program + // 1: shared_escrow_account + // 2+: creator accounts + // Branch: not using shared escrow accounts + // 0+: creator accounts } pub fn handler<'info>( @@ -145,6 +155,7 @@ pub fn handler<'info>( let pool = &mut ctx.accounts.pool; let sell_state = &mut ctx.accounts.sell_state; let owner = &ctx.accounts.owner; + let owner_key = &ctx.accounts.owner.key(); let referral = &ctx.accounts.referral; let payer = &ctx.accounts.payer; let payer_asset_account = &ctx.accounts.payer_asset_account; @@ -162,9 +173,11 @@ pub fn handler<'info>( let authorization_rules = &ctx.accounts.authorization_rules; let authorization_rules_program = &ctx.accounts.authorization_rules_program; let token_metadata_program_ai = &ctx.accounts.token_metadata_program.to_account_info(); + let remaining_accounts = ctx.remaining_accounts; let rent = &ctx.accounts.rent; let pool_key = pool.key(); + let pool_uuid = pool.uuid; let buyside_sol_escrow_account_seeds: &[&[&[u8]]] = &[&[ BUYSIDE_SOL_ESCROW_ACCOUNT_PREFIX.as_bytes(), pool_key.as_ref(), @@ -172,8 +185,8 @@ pub fn handler<'info>( ]]; let pool_seeds: &[&[&[u8]]] = &[&[ POOL_PREFIX.as_bytes(), - pool.owner.as_ref(), - pool.uuid.as_ref(), + owner_key.as_ref(), + pool_uuid.as_ref(), &[ctx.bumps.pool], ]]; @@ -205,6 +218,31 @@ pub fn handler<'info>( ) .map_err(|_| MMMErrorCode::NumericOverflow)?; + // check creator_accounts and verify the remaining accounts + let creator_accounts = if pool.using_shared_escrow() { + check_remaining_accounts_for_m2(remaining_accounts, &pool.owner.key())?; + + let amount: u64 = (total_price as i64 + maker_fee) as u64; + withdraw_m2( + pool, + ctx.bumps.pool, + buyside_sol_escrow_account, + index_ra!(remaining_accounts, 1), + system_program, + index_ra!(remaining_accounts, 0), + pool.owner, + amount, + )?; + pool.shared_escrow_count = pool + .shared_escrow_count + .checked_sub(args.asset_amount) + .ok_or(MMMErrorCode::NumericOverflow)?; + + &remaining_accounts[2..] + } else { + remaining_accounts + }; + // transfer to token account owned by pool let payload = Payload { map: HashMap::from([( @@ -244,6 +282,9 @@ pub fn handler<'info>( .invoke()?; if pool.reinvest_fulfill_buy { + if pool.using_shared_escrow() { + return Err(MMMErrorCode::InvalidAccountState.into()); + } pool.sellside_asset_amount = pool .sellside_asset_amount .checked_add(args.asset_amount) @@ -334,7 +375,7 @@ pub fn handler<'info>( 10000, seller_receives, &parsed_metadata, - ctx.remaining_accounts, + creator_accounts, buyside_sol_escrow_account.to_account_info(), metadata_royalty_bp, buyside_sol_escrow_account_seeds, @@ -415,7 +456,37 @@ pub fn handler<'info>( )?; try_close_sell_state(sell_state, payer.to_account_info())?; + // return the remaining per pool escrow balance to the shared escrow account + if pool.using_shared_escrow() { + let min_rent = Rent::get()?.minimum_balance(0); + let shared_escrow_account = index_ra!(remaining_accounts, 1).to_account_info(); + if shared_escrow_account.lamports() + buyside_sol_escrow_account.lamports() > min_rent + && buyside_sol_escrow_account.lamports() > 0 + { + anchor_lang::solana_program::program::invoke_signed( + &anchor_lang::solana_program::system_instruction::transfer( + buyside_sol_escrow_account.key, + shared_escrow_account.key, + buyside_sol_escrow_account.lamports(), + ), + &[ + buyside_sol_escrow_account.to_account_info(), + shared_escrow_account, + system_program.to_account_info(), + ], + buyside_sol_escrow_account_seeds, + )?; + } else { + try_close_escrow( + buyside_sol_escrow_account, + pool, + system_program, + buyside_sol_escrow_account_seeds, + )?; + } + } pool.buyside_payment_amount = buyside_sol_escrow_account.lamports(); + log_pool("post_sol_mip1_fulfill_buy", pool)?; try_close_pool(pool, owner.to_account_info())?; diff --git a/programs/mmm/src/instructions/mod.rs b/programs/mmm/src/instructions/mod.rs index b042e1e..b81d88e 100644 --- a/programs/mmm/src/instructions/mod.rs +++ b/programs/mmm/src/instructions/mod.rs @@ -1,5 +1,4 @@ #![allow(missing_docs)] -#![allow(ambiguous_glob_reexports)] pub mod admin; pub mod mip1; diff --git a/programs/mmm/src/instructions/ocp/ocp_deposit_sell.rs b/programs/mmm/src/instructions/ocp/ocp_deposit_sell.rs index c26ddcb..119b929 100644 --- a/programs/mmm/src/instructions/ocp/ocp_deposit_sell.rs +++ b/programs/mmm/src/instructions/ocp/ocp_deposit_sell.rs @@ -102,6 +102,10 @@ pub fn handler(ctx: Context, args: DepositSellArgs) -> Result<() let pool = &mut ctx.accounts.pool; let sell_state = &mut ctx.accounts.sell_state; + if pool.using_shared_escrow() { + return Err(MMMErrorCode::InvalidAccountState.into()); + } + check_allowlists_for_mint( &pool.allowlists, asset_mint, diff --git a/programs/mmm/src/instructions/ocp/sol_ocp_fulfill_buy.rs b/programs/mmm/src/instructions/ocp/sol_ocp_fulfill_buy.rs index 8b498db..826a5dd 100644 --- a/programs/mmm/src/instructions/ocp/sol_ocp_fulfill_buy.rs +++ b/programs/mmm/src/instructions/ocp/sol_ocp_fulfill_buy.rs @@ -11,7 +11,10 @@ use crate::{ ata::init_if_needed_ocp_ata, constants::*, errors::MMMErrorCode, - instructions::sol_fulfill_buy::SolFulfillBuyArgs, + index_ra, + instructions::{ + check_remaining_accounts_for_m2, sol_fulfill_buy::SolFulfillBuyArgs, withdraw_m2, + }, state::{Pool, SellState}, util::{ assert_valid_fees_bp, check_allowlists_for_mint, get_buyside_seller_receives, @@ -121,6 +124,13 @@ pub struct SolOcpFulfillBuy<'info> { pub token_program: Program<'info, Token>, pub associated_token_program: Program<'info, AssociatedToken>, pub rent: Sysvar<'info, Rent>, + // Remaining accounts + // Branch: using shared escrow accounts + // 0: m2_program + // 1: shared_escrow_account + // 2+: creator accounts + // Branch: not using shared escrow accounts + // 0+: creator accounts } pub fn handler<'info>( @@ -146,6 +156,7 @@ pub fn handler<'info>( pool_key.as_ref(), &[ctx.bumps.buyside_sol_escrow_account], ]]; + let remaining_accounts = ctx.remaining_accounts; let parsed_metadata = check_allowlists_for_mint( &pool.allowlists, @@ -175,6 +186,31 @@ pub fn handler<'info>( ) .map_err(|_| MMMErrorCode::NumericOverflow)?; + // check creator_accounts and verify the remaining accounts + let creator_accounts = if pool.using_shared_escrow() { + check_remaining_accounts_for_m2(remaining_accounts, &pool.owner.key())?; + + let amount: u64 = (total_price as i64 + maker_fee) as u64; + withdraw_m2( + pool, + ctx.bumps.pool, + buyside_sol_escrow_account, + index_ra!(remaining_accounts, 1), + system_program, + index_ra!(remaining_accounts, 0), + pool.owner, + amount, + )?; + pool.shared_escrow_count = pool + .shared_escrow_count + .checked_sub(args.asset_amount) + .ok_or(MMMErrorCode::NumericOverflow)?; + + &remaining_accounts[2..] + } else { + remaining_accounts + }; + let (target_token_account, target_authority) = if pool.reinvest_fulfill_buy { ( ctx.accounts.sellside_escrow_token_account.to_account_info(), @@ -265,7 +301,7 @@ pub fn handler<'info>( 10000, seller_receives, &parsed_metadata, - ctx.remaining_accounts, + creator_accounts, buyside_sol_escrow_account.to_account_info(), metadata_royalty_bp, buyside_sol_escrow_account_seeds, @@ -346,7 +382,37 @@ pub fn handler<'info>( )?; try_close_sell_state(sell_state, payer.to_account_info())?; + // return the remaining per pool escrow balance to the shared escrow account + if pool.using_shared_escrow() { + let min_rent = Rent::get()?.minimum_balance(0); + let shared_escrow_account = index_ra!(remaining_accounts, 1).to_account_info(); + if shared_escrow_account.lamports() + buyside_sol_escrow_account.lamports() > min_rent + && buyside_sol_escrow_account.lamports() > 0 + { + anchor_lang::solana_program::program::invoke_signed( + &anchor_lang::solana_program::system_instruction::transfer( + buyside_sol_escrow_account.key, + shared_escrow_account.key, + buyside_sol_escrow_account.lamports(), + ), + &[ + buyside_sol_escrow_account.to_account_info(), + shared_escrow_account, + system_program.to_account_info(), + ], + buyside_sol_escrow_account_seeds, + )?; + } else { + try_close_escrow( + buyside_sol_escrow_account, + pool, + system_program, + buyside_sol_escrow_account_seeds, + )?; + } + } pool.buyside_payment_amount = buyside_sol_escrow_account.lamports(); + log_pool("post_sol_ocp_fulfill_buy", pool)?; try_close_pool(pool, owner.to_account_info())?; diff --git a/programs/mmm/src/instructions/vanilla/deposit_sell.rs b/programs/mmm/src/instructions/vanilla/deposit_sell.rs index b816f8c..f364c6e 100644 --- a/programs/mmm/src/instructions/vanilla/deposit_sell.rs +++ b/programs/mmm/src/instructions/vanilla/deposit_sell.rs @@ -92,6 +92,10 @@ pub fn handler(ctx: Context, args: DepositSellArgs) -> Result<()> { let pool = &mut ctx.accounts.pool; let sell_state = &mut ctx.accounts.sell_state; + if pool.using_shared_escrow() { + return Err(MMMErrorCode::InvalidAccountState.into()); + } + check_allowlists_for_mint( &pool.allowlists, asset_mint, diff --git a/programs/mmm/src/instructions/vanilla/sol_deposit_buy.rs b/programs/mmm/src/instructions/vanilla/sol_deposit_buy.rs index ec287c8..1cdb833 100644 --- a/programs/mmm/src/instructions/vanilla/sol_deposit_buy.rs +++ b/programs/mmm/src/instructions/vanilla/sol_deposit_buy.rs @@ -39,6 +39,10 @@ pub fn handler(ctx: Context, args: SolDepositBuyArgs) -> Result<( let system_program = &ctx.accounts.system_program; let pool = &mut ctx.accounts.pool; + if pool.using_shared_escrow() { + return Err(MMMErrorCode::InvalidAccountState.into()); + } + anchor_lang::solana_program::program::invoke( &anchor_lang::solana_program::system_instruction::transfer( owner.key, diff --git a/programs/mmm/src/instructions/vanilla/sol_fulfill_buy.rs b/programs/mmm/src/instructions/vanilla/sol_fulfill_buy.rs index e97f362..38a2c20 100644 --- a/programs/mmm/src/instructions/vanilla/sol_fulfill_buy.rs +++ b/programs/mmm/src/instructions/vanilla/sol_fulfill_buy.rs @@ -9,6 +9,8 @@ use crate::{ ata::init_if_needed_ata, constants::*, errors::MMMErrorCode, + index_ra, + instructions::{check_remaining_accounts_for_m2, withdraw_m2}, state::{Pool, SellState}, util::{ assert_valid_fees_bp, check_allowlists_for_mint, get_buyside_seller_receives, @@ -107,6 +109,13 @@ pub struct SolFulfillBuy<'info> { pub token_program: Interface<'info, TokenInterface>, pub associated_token_program: Program<'info, AssociatedToken>, pub rent: Sysvar<'info, Rent>, + // Remaining accounts + // Branch: using shared escrow accounts + // 0: m2_program + // 1: shared_escrow_account + // 2+: creator accounts + // Branch: not using shared escrow accounts + // 0+: creator accounts } pub fn handler<'info>( @@ -133,6 +142,7 @@ pub fn handler<'info>( pool_key.as_ref(), &[ctx.bumps.buyside_sol_escrow_account], ]]; + let remaining_accounts = ctx.remaining_accounts; let parsed_metadata = check_allowlists_for_mint( &pool.allowlists, @@ -166,7 +176,35 @@ pub fn handler<'info>( ) .map_err(|_| MMMErrorCode::NumericOverflow)?; + // check creator_accounts and verify the remaining accounts + let creator_accounts = if pool.using_shared_escrow() { + check_remaining_accounts_for_m2(remaining_accounts, &pool.owner.key())?; + + let amount: u64 = (total_price as i64 + maker_fee) as u64; + withdraw_m2( + pool, + ctx.bumps.pool, + buyside_sol_escrow_account, + index_ra!(remaining_accounts, 1), + system_program, + index_ra!(remaining_accounts, 0), + pool.owner, + amount, + )?; + pool.shared_escrow_count = pool + .shared_escrow_count + .checked_sub(args.asset_amount) + .ok_or(MMMErrorCode::NumericOverflow)?; + + &remaining_accounts[2..] + } else { + remaining_accounts + }; + if pool.reinvest_fulfill_buy { + if pool.using_shared_escrow() { + return Err(MMMErrorCode::InvalidAccountState.into()); + } let sellside_escrow_token_account = ctx.accounts.sellside_escrow_token_account.to_account_info(); init_if_needed_ata( @@ -246,7 +284,7 @@ pub fn handler<'info>( pool.buyside_creator_royalty_bp, seller_receives, &parsed_metadata, - ctx.remaining_accounts, + creator_accounts, buyside_sol_escrow_account.to_account_info(), metadata_royalty_bp, buyside_sol_escrow_account_seeds, @@ -326,7 +364,37 @@ pub fn handler<'info>( )?; try_close_sell_state(sell_state, payer.to_account_info())?; + // return the remaining per pool escrow balance to the shared escrow account + if pool.using_shared_escrow() { + let min_rent = Rent::get()?.minimum_balance(0); + let shared_escrow_account = index_ra!(remaining_accounts, 1).to_account_info(); + if shared_escrow_account.lamports() + buyside_sol_escrow_account.lamports() > min_rent + && buyside_sol_escrow_account.lamports() > 0 + { + anchor_lang::solana_program::program::invoke_signed( + &anchor_lang::solana_program::system_instruction::transfer( + buyside_sol_escrow_account.key, + shared_escrow_account.key, + buyside_sol_escrow_account.lamports(), + ), + &[ + buyside_sol_escrow_account.to_account_info(), + shared_escrow_account, + system_program.to_account_info(), + ], + buyside_sol_escrow_account_seeds, + )?; + } else { + try_close_escrow( + buyside_sol_escrow_account, + pool, + system_program, + buyside_sol_escrow_account_seeds, + )?; + } + } pool.buyside_payment_amount = buyside_sol_escrow_account.lamports(); + log_pool("post_sol_fulfill_buy", pool)?; try_close_pool(pool, owner.to_account_info())?; diff --git a/programs/mmm/src/lib.rs b/programs/mmm/src/lib.rs index e875adb..8a1f76e 100644 --- a/programs/mmm/src/lib.rs +++ b/programs/mmm/src/lib.rs @@ -1,4 +1,5 @@ #![allow(clippy::result_large_err)] +#![allow(ambiguous_glob_reexports)] use anchor_lang::{prelude::*, AnchorDeserialize, AnchorSerialize}; @@ -116,4 +117,11 @@ pub mod mmm { pub fn close_if_balance_invalid(ctx: Context) -> Result<()> { instructions::close_if_balance_invalid::handler(ctx) } + + pub fn set_shared_escrow( + ctx: Context, + args: SetSharedEscrowArgs, + ) -> Result<()> { + instructions::set_shared_escrow::handler(ctx, args) + } } diff --git a/programs/mmm/src/state.rs b/programs/mmm/src/state.rs index e83ebab..569fdd2 100644 --- a/programs/mmm/src/state.rs +++ b/programs/mmm/src/state.rs @@ -78,6 +78,9 @@ pub struct Pool { pub payment_mint: Pubkey, pub allowlists: [Allowlist; ALLOWLIST_MAX_LEN], pub buyside_payment_amount: u64, + + pub shared_escrow_account: Pubkey, // this points to the shared escrow account PDA (usually M2) + pub shared_escrow_count: u64, // this means that how many times (count) the shared escrow account can be fulfilled, and it can be mutable } impl Pool { @@ -90,7 +93,13 @@ impl Pool { 2 + // bool 32 + // [u8; 32] 4 + (1 + 32) * ALLOWLIST_MAX_LEN + // Allowlist - 392; // padding + 32 + // Pubkey + 8 + // u64 + 352; // padding + + pub fn using_shared_escrow(&self) -> bool { + self.shared_escrow_account != Pubkey::default() + } } // seeds = [ diff --git a/programs/mmm/src/util.rs b/programs/mmm/src/util.rs index 50fffd8..6884288 100644 --- a/programs/mmm/src/util.rs +++ b/programs/mmm/src/util.rs @@ -1,20 +1,35 @@ use crate::{ constants::{ + BUYSIDE_SOL_ESCROW_ACCOUNT_PREFIX, M2_AUCTION_HOUSE, M2_PREFIX, M2_PROGRAM, MAX_METADATA_CREATOR_ROYALTY_BP, MAX_REFERRAL_FEE_BP, MAX_TOTAL_PRICE, - MIN_SOL_ESCROW_BALANCE_BP, + MIN_SOL_ESCROW_BALANCE_BP, POOL_PREFIX, }, errors::MMMErrorCode, state::*, + ID, }; use anchor_lang::{prelude::*, solana_program::log::sol_log_data}; use anchor_spl::token_interface::Mint; +use m2_interface::{ + withdraw_by_mmm_ix_with_program_id, WithdrawByMMMArgs, WithdrawByMmmIxArgs, WithdrawByMmmKeys, +}; use mpl_token_metadata::{ accounts::{MasterEdition, Metadata}, types::TokenStandard, }; use open_creator_protocol::state::Policy; +use solana_program::program::invoke_signed; use std::convert::TryFrom; +#[macro_export] +macro_rules! index_ra { + ($iter:ident, $i:expr) => { + $iter + .get($i) + .ok_or(MMMErrorCode::InvalidRemainingAccounts)? + }; +} + // copied from mpl-token-metadata fn check_master_edition(master_edition_account_info: &AccountInfo) -> bool { let version = master_edition_account_info.data.borrow()[0]; @@ -336,6 +351,10 @@ pub fn try_close_pool<'info>(pool: &Account<'info, Pool>, owner: AccountInfo<'in return Ok(()); } + if pool.using_shared_escrow() && pool.shared_escrow_count != 0 { + return Ok(()); + } + pool.to_account_info() .data .borrow_mut() @@ -547,3 +566,86 @@ pub fn assert_valid_fees_bp(maker_fee_bp: i16, taker_fee_bp: i16) -> Result<()> Ok(()) } + +#[allow(clippy::too_many_arguments)] +pub fn withdraw_m2<'info>( + pool: &Account<'info, Pool>, + pool_bump: u8, + to: &AccountInfo<'info>, + m2_buyer_escrow: &AccountInfo<'info>, + system_program: &AccountInfo<'info>, + m2_program: &AccountInfo<'info>, + wallet: Pubkey, + amount: u64, +) -> Result<()> { + let pool_seeds: &[&[&[u8]]] = &[&[ + POOL_PREFIX.as_bytes(), + pool.owner.as_ref(), + pool.uuid.as_ref(), + &[pool_bump], + ]]; + + let ix = withdraw_by_mmm_ix_with_program_id( + M2_PROGRAM, + WithdrawByMmmKeys { + mmm_pool: pool.key(), + to: to.key(), + escrow_payment_account: m2_buyer_escrow.key(), + system_program: system_program.key(), + }, + WithdrawByMmmIxArgs { + args: WithdrawByMMMArgs { + wallet, + auction_house: M2_AUCTION_HOUSE, + amount, + mmm_pool_uuid: pool.uuid, + }, + }, + )?; + + invoke_signed( + &ix, + &[ + pool.to_account_info(), + to.to_account_info(), + m2_buyer_escrow.to_account_info(), + system_program.to_account_info(), + m2_program.to_account_info(), + ], + pool_seeds, + )?; + + Ok(()) +} + +pub fn check_remaining_accounts_for_m2( + remaining_accounts: &[AccountInfo], + pool_owner: &Pubkey, +) -> Result<()> { + // check the remaining accounts at position 0 and 1 + // 0 has to be the m2_program + // 1 has to be the shared_escrow_account pda of the m2_program + if remaining_accounts.len() < 2 { + return Err(MMMErrorCode::InvalidRemainingAccounts.into()); + } + + if *remaining_accounts[0].key != M2_PROGRAM { + return Err(MMMErrorCode::InvalidRemainingAccounts.into()); + } + + let shared_escrow_account = &remaining_accounts[1]; + + let (m2_shared_escrow_pda, _) = Pubkey::find_program_address( + &[ + M2_PREFIX.as_bytes(), + M2_AUCTION_HOUSE.as_ref(), + pool_owner.as_ref(), + ], + &M2_PROGRAM, + ); + if m2_shared_escrow_pda != shared_escrow_account.key() { + return Err(MMMErrorCode::InvalidRemainingAccounts.into()); + } + + Ok(()) +} diff --git a/sdk/src/idl/mmm.ts b/sdk/src/idl/mmm.ts index 3ca8733..d590021 100644 --- a/sdk/src/idl/mmm.ts +++ b/sdk/src/idl/mmm.ts @@ -1568,6 +1568,39 @@ export type Mmm = { } ], "args": [] + }, + { + "name": "setSharedEscrow", + "accounts": [ + { + "name": "owner", + "isMut": true, + "isSigner": true + }, + { + "name": "cosigner", + "isMut": false, + "isSigner": true + }, + { + "name": "pool", + "isMut": true, + "isSigner": false + }, + { + "name": "sharedEscrowAccount", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "args", + "type": { + "defined": "SetSharedEscrowArgs" + } + } + ] } ], "accounts": [ @@ -1663,6 +1696,14 @@ export type Mmm = { { "name": "buysidePaymentAmount", "type": "u64" + }, + { + "name": "sharedEscrowAccount", + "type": "publicKey" + }, + { + "name": "sharedEscrowCount", + "type": "u64" } ] } @@ -1774,6 +1815,18 @@ export type Mmm = { ] } }, + { + "name": "SetSharedEscrowArgs", + "type": { + "kind": "struct", + "fields": [ + { + "name": "sharedEscrowCount", + "type": "u64" + } + ] + } + }, { "name": "UpdateAllowlistsArgs", "type": { @@ -2192,6 +2245,11 @@ export type Mmm = { "code": 6028, "name": "UnexpectedMetadataUri", "msg": "Unexpected metadata uri" + }, + { + "code": 6029, + "name": "InvalidRemainingAccounts", + "msg": "Invalid remaining accounts" } ] }; @@ -3766,6 +3824,39 @@ export const IDL: Mmm = { } ], "args": [] + }, + { + "name": "setSharedEscrow", + "accounts": [ + { + "name": "owner", + "isMut": true, + "isSigner": true + }, + { + "name": "cosigner", + "isMut": false, + "isSigner": true + }, + { + "name": "pool", + "isMut": true, + "isSigner": false + }, + { + "name": "sharedEscrowAccount", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "args", + "type": { + "defined": "SetSharedEscrowArgs" + } + } + ] } ], "accounts": [ @@ -3861,6 +3952,14 @@ export const IDL: Mmm = { { "name": "buysidePaymentAmount", "type": "u64" + }, + { + "name": "sharedEscrowAccount", + "type": "publicKey" + }, + { + "name": "sharedEscrowCount", + "type": "u64" } ] } @@ -3972,6 +4071,18 @@ export const IDL: Mmm = { ] } }, + { + "name": "SetSharedEscrowArgs", + "type": { + "kind": "struct", + "fields": [ + { + "name": "sharedEscrowCount", + "type": "u64" + } + ] + } + }, { "name": "UpdateAllowlistsArgs", "type": { @@ -4390,6 +4501,11 @@ export const IDL: Mmm = { "code": 6028, "name": "UnexpectedMetadataUri", "msg": "Unexpected metadata uri" + }, + { + "code": 6029, + "name": "InvalidRemainingAccounts", + "msg": "Invalid remaining accounts" } ] }; diff --git a/sdk/src/mmmClient.ts b/sdk/src/mmmClient.ts index 36907bb..afb6694 100644 --- a/sdk/src/mmmClient.ts +++ b/sdk/src/mmmClient.ts @@ -27,6 +27,7 @@ import { import { AllowlistKind } from './constants'; import { IDL, Mmm } from './idl/mmm'; import { + getM2BuyerSharedEscrow, getMMMBuysideSolEscrowPDA, getMMMPoolPDA, getMMMSellStatePDA, @@ -194,6 +195,19 @@ export class MMMClient { return await builder.instruction(); } + async getInsSetSharedEscrow( + args: anchor.IdlTypes['SetSharedEscrowArgs'], + ): Promise { + if (!this.poolData) throw MMMClient.ErrPoolDataEmpty; + let builder = this.program.methods.setSharedEscrow(args).accountsStrict({ + pool: this.poolData.pool, + owner: this.poolData.owner, + cosigner: this.poolData.cosigner, + sharedEscrowAccount: getM2BuyerSharedEscrow(this.poolData.owner).key, + }); + return await builder.instruction(); + } + async getInsSolDepositBuy( args: anchor.IdlTypes['SolDepositBuyArgs'], ): Promise { diff --git a/sdk/src/pda.ts b/sdk/src/pda.ts index 27ac160..64e3da1 100644 --- a/sdk/src/pda.ts +++ b/sdk/src/pda.ts @@ -52,3 +52,19 @@ export const getTokenRecordPDA = (mint: PublicKey, tokenAccount: PublicKey) => { return { key, bump }; }; + +export const M2_PREFIX = 'm2'; +export const M2_PROGRAM = new PublicKey( + 'M2mx93ekt1fmXSVkTrUL9xVFHkmME8HTUi5Cyc5aF7K', +); +export const M2_AUCTION_HOUSE = new PublicKey( + 'E8cU1WiRWjanGxmn96ewBgk9vPTcL6AEZ1t6F6fkgUWe', +); + +export function getM2BuyerSharedEscrow(wallet: PublicKey) { + const [key, bump] = PublicKey.findProgramAddressSync( + [Buffer.from(M2_PREFIX), M2_AUCTION_HOUSE.toBuffer(), wallet.toBuffer()], + M2_PROGRAM, + ); + return { key, bump }; +} diff --git a/tests/mmm-fulfill-shared-escrow.ts b/tests/mmm-fulfill-shared-escrow.ts new file mode 100644 index 0000000..88af6db --- /dev/null +++ b/tests/mmm-fulfill-shared-escrow.ts @@ -0,0 +1,610 @@ +import { PROGRAM_ID as AUTH_RULES_PROGRAM_ID } from '@metaplex-foundation/mpl-token-auth-rules'; +import { MPL_TOKEN_METADATA_PROGRAM_ID as TOKEN_METADATA_PROGRAM_ID } from '@metaplex-foundation/mpl-token-metadata'; +import * as anchor from '@project-serum/anchor'; +import { + ASSOCIATED_TOKEN_PROGRAM_ID, + TOKEN_PROGRAM_ID, + getAssociatedTokenAddress, + getAccount as getTokenAccount, +} from '@solana/spl-token'; +import { + ComputeBudgetProgram, + Keypair, + LAMPORTS_PER_SOL, + SYSVAR_INSTRUCTIONS_PUBKEY, + SYSVAR_RENT_PUBKEY, + SystemProgram, +} from '@solana/web3.js'; +import { assert } from 'chai'; +import { + AllowlistKind, + CurveKind, + IDL, + M2_PROGRAM, + MMMProgramID, + Mmm, + getM2BuyerSharedEscrow, + getMMMSellStatePDA, + getSolFulfillBuyPrices, + getTokenRecordPDA, +} from '../sdk/src'; +import { + MIP1_COMPUTE_UNITS, + SIGNATURE_FEE_LAMPORTS, + airdrop, + assertTx, + createDefaultTokenAuthorizationRules, + createPoolWithExampleDeposits, + createPoolWithExampleMip1Deposits, + getMetaplexInstance, + getSellStatePDARent, + getTokenAccountRent, + sendAndAssertTx, +} from './utils'; + +describe('shared-escrow mmm-fulfill-linear', () => { + const { connection } = anchor.AnchorProvider.env(); + const wallet = new anchor.Wallet(Keypair.generate()); + const provider = new anchor.AnchorProvider(connection, wallet, { + commitment: 'processed', + }); + const program = new anchor.Program( + IDL, + MMMProgramID, + provider, + ) as anchor.Program; + const cosigner = Keypair.generate(); + + beforeEach(async () => { + await airdrop(connection, wallet.publicKey, 50); + }); + + it('can fullfill buy with shared-escrow for vanila nfts', async () => { + const seller = Keypair.generate(); + const buyerSharedEscrow = getM2BuyerSharedEscrow(wallet.publicKey).key; + const metaplexInstance = getMetaplexInstance(connection); + const [poolData] = await Promise.all([ + createPoolWithExampleDeposits( + program, + connection, + [AllowlistKind.mcc], + { + owner: wallet.publicKey, + cosigner, + curveType: CurveKind.linear, + curveDelta: new anchor.BN(LAMPORTS_PER_SOL).div(new anchor.BN(10)), // 0.1 SOL + expiry: new anchor.BN(new Date().getTime() / 1000 + 1000), + referralBp: 200, + reinvestFulfillBuy: false, + reinvestFulfillSell: false, + }, + 'buy', + TOKEN_PROGRAM_ID, + seller.publicKey, + true, // sharedEscrow + 4, // can be fulfilled 4 times, one more than the sft amount to be tested + ), + airdrop(connection, seller.publicKey, 10), + airdrop(connection, buyerSharedEscrow, 10), + ]); + + const ownerExtraSftAtaAddress = await getAssociatedTokenAddress( + poolData.extraSft.mintAddress, + wallet.publicKey, + ); + let initWalletBalance = await connection.getBalance(wallet.publicKey); + let initReferralBalance = await connection.getBalance( + poolData.referral.publicKey, + ); + let initSellerBalance = await connection.getBalance(seller.publicKey); + let initBuyerSharedEscrowBalance = await connection.getBalance( + buyerSharedEscrow, + ); + let totalMakerFees = 0; + + { + const expectedTakerFees = 2.7 * LAMPORTS_PER_SOL * 0.04; + const { key: sellState } = getMMMSellStatePDA( + program.programId, + poolData.poolKey, + poolData.extraSft.mintAddress, + ); + const tx = await program.methods + .solFulfillBuy({ + assetAmount: new anchor.BN(3), + minPaymentAmount: new anchor.BN( + 2.7 * LAMPORTS_PER_SOL - expectedTakerFees, + ), + allowlistAux: '', + takerFeeBp: 400, + makerFeeBp: -100, + }) + .accountsStrict({ + payer: seller.publicKey, + owner: wallet.publicKey, + cosigner: cosigner.publicKey, + referral: poolData.referral.publicKey, + pool: poolData.poolKey, + buysideSolEscrowAccount: poolData.poolPaymentEscrow, + assetMetadata: poolData.extraSft.metadataAddress, + assetMasterEdition: metaplexInstance + .nfts() + .pdas() + .masterEdition({ mint: poolData.extraSft.mintAddress }), + assetMint: poolData.extraSft.mintAddress, + payerAssetAccount: poolData.extraSft.tokenAddress!, + sellsideEscrowTokenAccount: poolData.poolAtaExtraSft, + ownerTokenAccount: ownerExtraSftAtaAddress, + allowlistAuxAccount: SystemProgram.programId, + sellState, + systemProgram: SystemProgram.programId, + tokenProgram: TOKEN_PROGRAM_ID, + associatedTokenProgram: ASSOCIATED_TOKEN_PROGRAM_ID, + rent: SYSVAR_RENT_PUBKEY, + }) + .remainingAccounts([ + { + pubkey: M2_PROGRAM, + isWritable: false, + isSigner: false, + }, + { + pubkey: buyerSharedEscrow, + isWritable: true, + isSigner: false, + }, + ]) + .transaction(); + + const blockhashData = await connection.getLatestBlockhash(); + tx.feePayer = seller.publicKey; + tx.recentBlockhash = blockhashData.blockhash; + tx.partialSign(cosigner, seller); + + const txId = await connection.sendRawTransaction(tx.serialize(), { + skipPreflight: true, + }); + const confirmedTx = await connection.confirmTransaction( + { + signature: txId, + blockhash: blockhashData.blockhash, + lastValidBlockHeight: blockhashData.lastValidBlockHeight, + }, + 'processed', + ); + assertTx(txId, confirmedTx); + assert.equal(await connection.getBalance(sellState), 0); + } + + const tokenAccountRent = await getTokenAccountRent(connection); + const sellStatePDARent = await getSellStatePDARent(connection); + { + const expectedTakerFees = 2.7 * LAMPORTS_PER_SOL * 0.04; + const expectedMakerFees = 2.7 * LAMPORTS_PER_SOL * -0.01; + const expectedReferralFees = expectedTakerFees + expectedMakerFees; + totalMakerFees += expectedMakerFees; + const [ + sellerBalance, + referralBalance, + poolAtaBalance, + poolEscrowBalance, + afterWalletBalance, + afterSharedEscrowBalance, + ] = await Promise.all([ + connection.getBalance(seller.publicKey), + connection.getBalance(poolData.referral.publicKey), + connection.getBalance(poolData.poolAtaSft), + connection.getBalance(poolData.poolPaymentEscrow), + connection.getBalance(wallet.publicKey), + connection.getBalance(buyerSharedEscrow), + ]); + assert.equal( + sellerBalance, + initSellerBalance + + 2.7 * LAMPORTS_PER_SOL - + (SIGNATURE_FEE_LAMPORTS * 2 + tokenAccountRent) - + expectedTakerFees, + ); + assert.equal(referralBalance, initReferralBalance + expectedReferralFees); + assert.equal(poolAtaBalance, 0); + assert.equal(poolEscrowBalance, 0); // because it's shared escrow, so the pool escrow is empty + assert.equal(afterWalletBalance, initWalletBalance); + assert.notEqual(afterSharedEscrowBalance, 0); + assert.equal( + initBuyerSharedEscrowBalance - afterSharedEscrowBalance, + 2.7 * LAMPORTS_PER_SOL + expectedMakerFees, + ); + + initReferralBalance = referralBalance; + initSellerBalance = sellerBalance; + } + + let poolAccountInfo = await program.account.pool.fetch(poolData.poolKey); + assert.equal(poolAccountInfo.spotPrice.toNumber(), 0.7 * LAMPORTS_PER_SOL); + assert.equal(poolAccountInfo.lpFeeEarned.toNumber(), 0); + assert.equal(poolAccountInfo.sellsideAssetAmount.toNumber(), 0); + assert.equal(poolAccountInfo.buysidePaymentAmount.toNumber(), 0); + }); + + it('can fulfill buy with shared escrow for mip1 nfts', async () => { + const DEFAULT_ACCOUNTS = { + tokenMetadataProgram: TOKEN_METADATA_PROGRAM_ID, + authorizationRulesProgram: AUTH_RULES_PROGRAM_ID, + instructions: SYSVAR_INSTRUCTIONS_PUBKEY, + systemProgram: SystemProgram.programId, + tokenProgram: TOKEN_PROGRAM_ID, + associatedTokenProgram: ASSOCIATED_TOKEN_PROGRAM_ID, + rent: SYSVAR_RENT_PUBKEY, + }; + const seller = Keypair.generate(); + const nftCreator = Keypair.generate(); + await airdrop(connection, nftCreator.publicKey, 10); + const rulesRes = await createDefaultTokenAuthorizationRules( + connection, + nftCreator, + 'test', + ); + const defaultRules = rulesRes.ruleSetAddress; + const buyerSharedEscrow = getM2BuyerSharedEscrow(wallet.publicKey).key; + await airdrop(connection, buyerSharedEscrow, 10); + + const [poolData] = await Promise.all([ + createPoolWithExampleMip1Deposits( + program, + { + owner: wallet.publicKey, + cosigner, + spotPrice: new anchor.BN(2.2 * LAMPORTS_PER_SOL), + curveDelta: new anchor.BN(1 * LAMPORTS_PER_SOL), + curveType: CurveKind.linear, + reinvestFulfillBuy: false, + reinvestFulfillSell: false, + }, + 'buy', + nftCreator, + TOKEN_PROGRAM_ID, + seller.publicKey, + defaultRules, + true, // sharedEscrow + ), + airdrop(connection, seller.publicKey, 10), + ]); + + const [ + initSellerBalance, + initPaymentEscrowBalance, + initCreatorBalance, + initReferralBalance, + sellStateAccountRent, + initBuyerSharedEscrowBalance, + ] = await Promise.all([ + connection.getBalance(seller.publicKey), + connection.getBalance(poolData.poolPaymentEscrow), + connection.getBalance(poolData.nftCreator.publicKey), + connection.getBalance(poolData.referral.publicKey), + getSellStatePDARent(connection), + connection.getBalance(buyerSharedEscrow), + ]); + + const { key: sellState } = getMMMSellStatePDA( + program.programId, + poolData.poolKey, + poolData.extraNft.mintAddress, + ); + + const ownerExtraNftAtaAddress = await getAssociatedTokenAddress( + poolData.extraNft.mintAddress, + wallet.publicKey, + ); + + // sale price should be 2.2 SOL + // with taker fee and royalties should be 2.2 / (1 + 0.015) * (1 - 0.005) ~ 2.157 SOL + const expectedBuyPrices = getSolFulfillBuyPrices({ + totalPriceLamports: 2.2 * LAMPORTS_PER_SOL, + takerFeeBp: 50, + metadataRoyaltyBp: 150, + buysideCreatorRoyaltyBp: 10000, + lpFeeBp: 0, + makerFeeBp: 350, + }); + + const tx = await program.methods + .solMip1FulfillBuy({ + assetAmount: new anchor.BN(1), + minPaymentAmount: expectedBuyPrices.sellerReceives, + allowlistAux: null, + makerFeeBp: 350, + takerFeeBp: 50, + }) + .accountsStrict({ + payer: seller.publicKey, + owner: wallet.publicKey, + cosigner: cosigner.publicKey, + referral: poolData.referral.publicKey, + pool: poolData.poolKey, + buysideSolEscrowAccount: poolData.poolPaymentEscrow, + assetMetadata: poolData.extraNft.metadataAddress, + assetMint: poolData.extraNft.mintAddress, + assetMasterEdition: poolData.extraNft.masterEditionAddress, + payerAssetAccount: poolData.extraNft.tokenAddress, + sellsideEscrowTokenAccount: poolData.poolAtaExtraNft, + ownerTokenAccount: ownerExtraNftAtaAddress, + allowlistAuxAccount: SystemProgram.programId, + sellState, + tokenOwnerTokenRecord: getTokenRecordPDA( + poolData.extraNft.mintAddress, + poolData.extraNft.tokenAddress, + ).key, + poolTokenRecord: getTokenRecordPDA( + poolData.extraNft.mintAddress, + poolData.poolAtaExtraNft, + ).key, + poolOwnerTokenRecord: getTokenRecordPDA( + poolData.extraNft.mintAddress, + ownerExtraNftAtaAddress, + ).key, + authorizationRules: defaultRules, + ...DEFAULT_ACCOUNTS, + }) + .preInstructions([ + ComputeBudgetProgram.setComputeUnitLimit({ units: MIP1_COMPUTE_UNITS }), + ]) + .remainingAccounts([ + { + pubkey: M2_PROGRAM, + isWritable: false, + isSigner: false, + }, + { + pubkey: buyerSharedEscrow, + isWritable: true, + isSigner: false, + }, + { + pubkey: poolData.nftCreator.publicKey, + isSigner: false, + isWritable: true, + }, + ]) + .transaction(); + + const blockhashData = await connection.getLatestBlockhash(); + tx.feePayer = seller.publicKey; + tx.recentBlockhash = blockhashData.blockhash; + tx.partialSign(cosigner, seller); + await sendAndAssertTx(connection, tx, blockhashData, false); + + const expectedReferralFees = + expectedBuyPrices.makerFeePaid.toNumber() + + expectedBuyPrices.takerFeePaid.toNumber(); + const [ + sellerBalance, + paymentEscrowAccount, + paymentEscrowBalance, + creatorBalance, + referralBalance, + afterBuyerSharedEscrowBalance, + ] = await Promise.all([ + connection.getBalance(seller.publicKey), + connection.getAccountInfo(poolData.poolPaymentEscrow), + connection.getBalance(poolData.poolPaymentEscrow), + connection.getBalance(poolData.nftCreator.publicKey), + connection.getBalance(poolData.referral.publicKey), + connection.getBalance(buyerSharedEscrow), + ]); + + assert.equal( + sellerBalance, + initSellerBalance + + expectedBuyPrices.sellerReceives.toNumber() - + SIGNATURE_FEE_LAMPORTS * 2, + ); + assert.equal( + initBuyerSharedEscrowBalance - afterBuyerSharedEscrowBalance, + 2.2 * LAMPORTS_PER_SOL + expectedBuyPrices.makerFeePaid.toNumber(), + ); + assert.equal(paymentEscrowBalance, 0); + assert.isNull(paymentEscrowAccount); + assert.equal( + creatorBalance, + initCreatorBalance + expectedBuyPrices.royaltyPaid.toNumber(), + ); + assert.equal(referralBalance, initReferralBalance + expectedReferralFees); + + const poolAccountInfo = await program.account.pool.fetch(poolData.poolKey); + assert.equal(poolAccountInfo.sellsideAssetAmount.toNumber(), 0); + assert.equal(poolAccountInfo.spotPrice.toNumber(), 1.2 * LAMPORTS_PER_SOL); + }); + + it('can fulfill buy with shared escrow for mip1 nfts that will close the pool due to not enough cap', async () => { + const DEFAULT_ACCOUNTS = { + tokenMetadataProgram: TOKEN_METADATA_PROGRAM_ID, + authorizationRulesProgram: AUTH_RULES_PROGRAM_ID, + instructions: SYSVAR_INSTRUCTIONS_PUBKEY, + systemProgram: SystemProgram.programId, + tokenProgram: TOKEN_PROGRAM_ID, + associatedTokenProgram: ASSOCIATED_TOKEN_PROGRAM_ID, + rent: SYSVAR_RENT_PUBKEY, + }; + const seller = Keypair.generate(); + const nftCreator = Keypair.generate(); + await airdrop(connection, nftCreator.publicKey, 10); + const rulesRes = await createDefaultTokenAuthorizationRules( + connection, + nftCreator, + 'test', + ); + const defaultRules = rulesRes.ruleSetAddress; + const buyerSharedEscrow = getM2BuyerSharedEscrow(wallet.publicKey).key; + await airdrop(connection, buyerSharedEscrow, 10); + + const [poolData] = await Promise.all([ + createPoolWithExampleMip1Deposits( + program, + { + owner: wallet.publicKey, + cosigner, + spotPrice: new anchor.BN(2.2 * LAMPORTS_PER_SOL), + curveDelta: new anchor.BN(1 * LAMPORTS_PER_SOL), + curveType: CurveKind.linear, + reinvestFulfillBuy: false, + reinvestFulfillSell: false, + }, + 'buy', + nftCreator, + TOKEN_PROGRAM_ID, + seller.publicKey, + defaultRules, + true, // sharedEscrow + 1, // just enough sol to cover the first fulfilment + ), + airdrop(connection, seller.publicKey, 10), + ]); + + const [ + initSellerBalance, + initPaymentEscrowBalance, + initCreatorBalance, + initReferralBalance, + sellStateAccountRent, + initBuyerSharedEscrowBalance, + ] = await Promise.all([ + connection.getBalance(seller.publicKey), + connection.getBalance(poolData.poolPaymentEscrow), + connection.getBalance(poolData.nftCreator.publicKey), + connection.getBalance(poolData.referral.publicKey), + getSellStatePDARent(connection), + connection.getBalance(buyerSharedEscrow), + ]); + + const { key: sellState } = getMMMSellStatePDA( + program.programId, + poolData.poolKey, + poolData.extraNft.mintAddress, + ); + + const ownerExtraNftAtaAddress = await getAssociatedTokenAddress( + poolData.extraNft.mintAddress, + wallet.publicKey, + ); + + // sale price should be 2.2 SOL + // with taker fee and royalties should be 2.2 / (1 + 0.015) * (1 - 0.005) ~ 2.157 SOL + const expectedBuyPrices = getSolFulfillBuyPrices({ + totalPriceLamports: 2.2 * LAMPORTS_PER_SOL, + takerFeeBp: 50, + metadataRoyaltyBp: 150, + buysideCreatorRoyaltyBp: 10000, + lpFeeBp: 0, + makerFeeBp: 350, + }); + + const tx = await program.methods + .solMip1FulfillBuy({ + assetAmount: new anchor.BN(1), + minPaymentAmount: expectedBuyPrices.sellerReceives, + allowlistAux: null, + makerFeeBp: 350, + takerFeeBp: 50, + }) + .accountsStrict({ + payer: seller.publicKey, + owner: wallet.publicKey, + cosigner: cosigner.publicKey, + referral: poolData.referral.publicKey, + pool: poolData.poolKey, + buysideSolEscrowAccount: poolData.poolPaymentEscrow, + assetMetadata: poolData.extraNft.metadataAddress, + assetMint: poolData.extraNft.mintAddress, + assetMasterEdition: poolData.extraNft.masterEditionAddress, + payerAssetAccount: poolData.extraNft.tokenAddress, + sellsideEscrowTokenAccount: poolData.poolAtaExtraNft, + ownerTokenAccount: ownerExtraNftAtaAddress, + allowlistAuxAccount: SystemProgram.programId, + sellState, + tokenOwnerTokenRecord: getTokenRecordPDA( + poolData.extraNft.mintAddress, + poolData.extraNft.tokenAddress, + ).key, + poolTokenRecord: getTokenRecordPDA( + poolData.extraNft.mintAddress, + poolData.poolAtaExtraNft, + ).key, + poolOwnerTokenRecord: getTokenRecordPDA( + poolData.extraNft.mintAddress, + ownerExtraNftAtaAddress, + ).key, + authorizationRules: defaultRules, + ...DEFAULT_ACCOUNTS, + }) + .preInstructions([ + ComputeBudgetProgram.setComputeUnitLimit({ units: MIP1_COMPUTE_UNITS }), + ]) + .remainingAccounts([ + { + pubkey: M2_PROGRAM, + isWritable: false, + isSigner: false, + }, + { + pubkey: buyerSharedEscrow, + isWritable: true, + isSigner: false, + }, + { + pubkey: poolData.nftCreator.publicKey, + isSigner: false, + isWritable: true, + }, + ]) + .transaction(); + + const blockhashData = await connection.getLatestBlockhash(); + tx.feePayer = seller.publicKey; + tx.recentBlockhash = blockhashData.blockhash; + tx.partialSign(cosigner, seller); + await sendAndAssertTx(connection, tx, blockhashData, false); + + const expectedReferralFees = + expectedBuyPrices.makerFeePaid.toNumber() + + expectedBuyPrices.takerFeePaid.toNumber(); + const [ + sellerBalance, + paymentEscrowAccount, + paymentEscrowBalance, + creatorBalance, + referralBalance, + afterBuyerSharedEscrowBalance, + ] = await Promise.all([ + connection.getBalance(seller.publicKey), + connection.getAccountInfo(poolData.poolPaymentEscrow), + connection.getBalance(poolData.poolPaymentEscrow), + connection.getBalance(poolData.nftCreator.publicKey), + connection.getBalance(poolData.referral.publicKey), + connection.getBalance(buyerSharedEscrow), + ]); + + assert.equal( + sellerBalance, + initSellerBalance + + expectedBuyPrices.sellerReceives.toNumber() - + SIGNATURE_FEE_LAMPORTS * 2, + ); + assert.equal( + initBuyerSharedEscrowBalance - afterBuyerSharedEscrowBalance, + 2.2 * LAMPORTS_PER_SOL + expectedBuyPrices.makerFeePaid.toNumber(), + ); + assert.equal(paymentEscrowBalance, 0); + assert.isNull(paymentEscrowAccount); + assert.equal( + creatorBalance, + initCreatorBalance + expectedBuyPrices.royaltyPaid.toNumber(), + ); + assert.equal(referralBalance, initReferralBalance + expectedReferralFees); + + const poolAccountInfo = await program.account.pool.fetchNullable( + poolData.poolKey, + ); + assert.isNull(poolAccountInfo); + }); +}); diff --git a/tests/utils/mmm.ts b/tests/utils/mmm.ts index 9dc4cee..6803d64 100644 --- a/tests/utils/mmm.ts +++ b/tests/utils/mmm.ts @@ -51,6 +51,7 @@ import { PROGRAM_ID as AUTHORIZATION_RULES_PROGRAM_ID } from '@metaplex-foundati import { AllowlistKind, CurveKind, + getM2BuyerSharedEscrow, getMMMBuysideSolEscrowPDA, getMMMPoolPDA, getMMMSellStatePDA, @@ -58,6 +59,7 @@ import { Mmm, } from '../../sdk/src'; import { + airdrop, fillAllowlists, getEmptyAllowLists, getKeypair, @@ -164,6 +166,8 @@ export const createPoolWithExampleDeposits = async ( side: 'buy' | 'sell' | 'both', tokenProgramId: PublicKey, nftRecipient?: PublicKey, + sharedEscrow?: boolean, + sharedEscrowCount?: number, ) => { const metaplexInstance = getMetaplexInstance(connection); const creator = Keypair.generate(); @@ -362,7 +366,7 @@ export const createPoolWithExampleDeposits = async ( tokenProgramId, ); - if (side === 'both' || side === 'sell') { + if (!sharedEscrow && (side === 'both' || side === 'sell')) { const { key: sellState1 } = getMMMSellStatePDA( program.programId, poolKey, @@ -432,7 +436,7 @@ export const createPoolWithExampleDeposits = async ( program.programId, poolKey, ); - if (side === 'both' || side === 'buy') { + if (!sharedEscrow && (side === 'both' || side === 'buy')) { await program.methods .solDepositBuy({ paymentAmount: new anchor.BN(10 * LAMPORTS_PER_SOL) }) .accountsStrict({ @@ -446,6 +450,22 @@ export const createPoolWithExampleDeposits = async ( .rpc({ skipPreflight: true }); } + if (sharedEscrow) { + const sharedEscrowAccount = getM2BuyerSharedEscrow(poolArgs.owner).key; + await program.methods + .setSharedEscrow({ + sharedEscrowCount: new anchor.BN(sharedEscrowCount || 2), + }) + .accountsStrict({ + owner: poolArgs.owner, + cosigner: poolArgs.cosigner?.publicKey ?? poolArgs.owner, + pool: poolKey, + sharedEscrowAccount, + }) + .signers([...(poolArgs.cosigner ? [poolArgs.cosigner] : [])]) + .rpc(); + } + return { nft: nfts[0], sft: sfts[0], @@ -468,6 +488,8 @@ export const createPoolWithExampleOcpDeposits = async ( side: 'buy' | 'sell' | 'both', nftRecipient?: PublicKey, policy?: PublicKey, + sharedEscrow?: boolean, + sharedEscrowCount?: number, ) => { const creator = Keypair.generate(); @@ -508,7 +530,7 @@ export const createPoolWithExampleOcpDeposits = async ( true, ); - if (side === 'both' || side === 'sell') { + if (!sharedEscrow && (side === 'both' || side === 'sell')) { const { key: sellState } = getMMMSellStatePDA( program.programId, poolKey, @@ -552,7 +574,7 @@ export const createPoolWithExampleOcpDeposits = async ( program.programId, poolKey, ); - if (side === 'both' || side === 'buy') { + if (!sharedEscrow && (side === 'both' || side === 'buy')) { await program.methods .solDepositBuy({ paymentAmount: new anchor.BN(10 * LAMPORTS_PER_SOL) }) .accountsStrict({ @@ -566,6 +588,22 @@ export const createPoolWithExampleOcpDeposits = async ( .rpc({ skipPreflight: true }); } + if (sharedEscrow) { + const sharedEscrowAccount = getM2BuyerSharedEscrow(poolArgs.owner).key; + await program.methods + .setSharedEscrow({ + sharedEscrowCount: new anchor.BN(sharedEscrowCount || 2), + }) + .accountsStrict({ + owner: poolArgs.owner, + cosigner: poolArgs.cosigner?.publicKey ?? poolArgs.owner, + pool: poolKey, + sharedEscrowAccount, + }) + .signers([...(poolArgs.cosigner ? [poolArgs.cosigner] : [])]) + .rpc(); + } + return { nft: depositNft, extraNft, @@ -887,6 +925,8 @@ export const createPoolWithExampleMip1Deposits = async ( tokenProgramId: PublicKey, nftRecipient?: PublicKey, ruleset?: PublicKey, + sharedEscrow?: boolean, + sharedEscrowCount?: number, ) => { const umi = (await createUmi('http://127.0.0.1:8899')).use( mplTokenMetadata(), @@ -944,7 +984,7 @@ export const createPoolWithExampleMip1Deposits = async ( tokenProgramId, ); - if (side === 'both' || side === 'sell') { + if (!sharedEscrow && (side === 'both' || side === 'sell')) { const { key: sellState } = getMMMSellStatePDA( program.programId, poolKey, @@ -994,7 +1034,7 @@ export const createPoolWithExampleMip1Deposits = async ( program.programId, poolKey, ); - if (side === 'both' || side === 'buy') { + if (!sharedEscrow && (side === 'both' || side === 'buy')) { await program.methods .solDepositBuy({ paymentAmount: new anchor.BN(10 * LAMPORTS_PER_SOL) }) .accountsStrict({ @@ -1008,6 +1048,22 @@ export const createPoolWithExampleMip1Deposits = async ( .rpc({ skipPreflight: true }); } + if (sharedEscrow) { + const sharedEscrowAccount = getM2BuyerSharedEscrow(poolArgs.owner).key; + await program.methods + .setSharedEscrow({ + sharedEscrowCount: new anchor.BN(sharedEscrowCount || 2), + }) + .accountsStrict({ + owner: poolArgs.owner, + cosigner: poolArgs.cosigner?.publicKey ?? poolArgs.owner, + pool: poolKey, + sharedEscrowAccount, + }) + .signers([...(poolArgs.cosigner ? [poolArgs.cosigner] : [])]) + .rpc(); + } + return { nft: depositNft, extraNft,