diff --git a/README.md b/README.md index d736dbb..7f666f2 100644 --- a/README.md +++ b/README.md @@ -1,35 +1,42 @@ -# Sui Object Model Workshop +# Sui Object Model and PTBs Workshop When learning Sui Move, developers are encouraged to use best practices to utilize the Sui object model and ensure on-chain object composability. Developers learn to write composable move code in a timely manner, but struggle to verify their code by deploying and executing the functionality on chain. The key to mastering the Sui object model is to pair your Sui move development sessions with interacting with on-chain objects via PTBs (Programmable Transaction Blocks). This workshop will guide you through the process of writing Sui Move code, deploying it to the Sui blockchain, and interacting with on-chain objects via PTBs. # Table of Contents -- [Sui Object Model Workshop](#sui-object-model-workshop) +- [Sui Object Model and PTBs Workshop](#sui-object-model-and-ptbs-workshop) - [Table of Contents](#table-of-contents) - [Environment Setup](#environment-setup) - [Lessons](#lessons) - - [Handling Returned Objects](#handling-returned-objects) - - [Exercise](#exercise) - - [Objects as Input](#objects-as-input) - - [Exercise](#exercise-1) + - [Lesson 1: Handling Returned Objects](#lesson-1-handling-returned-objects) + - [Exercise 1: Handling Returned Sui NFT](#exercise-1-handling-returned-sui-nft) + - [Lesson 2: Objects as Input](#lesson-2-objects-as-input) + - [Exercise 2: Input Objects - Counter](#exercise-2-input-objects---counter) + - [Exercise 3: Scavenger Hunting with PTBs](#exercise-3-scavenger-hunting-with-ptbs) # Environment Setup -Before we start, we need to set up our environment. +Before we start, we need to set up our environment for our scripts. + +```bash +cd scripts && npm install +``` Navigate to the `scripts` directory and run the following command: ```bash -yarn init-keypair +npm run init-keypair ``` This will generate and fund a new keypair for you to use in the workshop. Make sure not to use this keypair in any production environments. -Sui Faucet: [https://faucet.sui.io/](https://faucet.sui.io/) OR [Discord faucet](https://discord.gg/cKx75xrRMq) - +Sui Faucet options: +- [n1stake faucet](https://faucet.n1stake.com) +- [Official Sui faucet](https://faucet.sui.io/) +- [Discord faucet](https://discord.gg/cKx75xrRMq) # Lessons -## Handling Returned Objects +## Lesson 1: Handling Returned Objects One of the best practices when writing Sui Move packages is to avoid self-transfers. In other words, avoid transferring objects to the sender of the transaction, and instead return the object from the current function. This allows a caller or programmable transaction block to use the object however they see fit. @@ -73,11 +80,22 @@ This is easy enough to do, but in most cases (when the object doesn't have the [ In this lesson, you learn how to handle returned objects properly. -### Exercise -View the contents [`banana.move`](./lessons/returning_objects/banana_without_display/sources/banana_without_display.move). There is a deployed instance of this package on the Sui blockchain. The address of the package is [`0xadfb946c8c887446d284dae80ac8501c02ec9b9157babb96ca884773bfbb7771`](https://suiscan.xyz/testnet/object/0xadfb946c8c887446d284dae80ac8501c02ec9b9157babb96ca884773bfbb7771/txs). Navigate to [`scripts/lessons/return_objects/exercise.ts`](./scripts/src/lessons/return_objects/exercise.ts) and complete the exercise. -## Objects as Input +### Exercise 1: Handling Returned Sui NFT + + +The package of the SUIII NFT is at [`0x83feeef5abcb1d5caca48f5e4e2259f8fbbcac88c10d82cc95ed58ff6f0dcd79`](https://suiscan.xyz/testnet/object/0x83feeef5abcb1d5caca48f5e4e2259f8fbbcac88c10d82cc95ed58ff6f0dcd79/tx-blocks) and the NFT object type is [`0x83feeef5abcb1d5caca48f5e4e2259f8fbbcac88c10d82cc95ed58ff6f0dcd79::sui_nft::SuiNFT`](https://suiscan.xyz/testnet/collection/0x83feeef5abcb1d5caca48f5e4e2259f8fbbcac88c10d82cc95ed58ff6f0dcd79::sui_nft::SuiNFT/items). + + +View the contract at [`sui_nft.move`](./lessons/returning_objects/sui_nft/sources/sui_nft.move). Try to mint an NFT to your account and view it at explorer with PTBs. + +Navigate to [`scripts/src/return_objects_exercise.ts`](./scripts/src/return_objects_exercise.ts) and complete the exercise. + +> Bonus Challenge: Can you deploy the [SUIII NFT package](./lessons/returning_objects/sui_nft) yourself and use different text and images for the NFT? +> [Install the Sui CLI](https://docs.sui.io/guides/developer/getting-started/sui-install), [Create Deployer Address](https://docs.sui.io/guides/developer/getting-started/get-address), and deposit gas coins from faucet, then use `sui client publish --skip-dependency-verification` to deploy! + +## Lesson 2: Objects as Input There are a lot of situations where one will want to interact with objects on Sui. Referencing and using objects in Sui Move is simple but nuanced. To reference an object in Sui Move, make the object a function parameter. For example, @@ -107,6 +125,24 @@ The `delete` function receives the actual instance of the `SimpleObject` and del This usage is straightforward, but tends to leave developers wondering what this looks out in a wider context. In this lesson, you learn how to use objects as inputs in PTBs. -### Exercise +### Exercise 2: Input Objects - Counter + +View the contents [`counter.move`](./lessons/input_objects/counter/sources/counter.move). There is a deployed instance of this package on the Sui blockchain. The address of the package is [`0x8f0b6cbef998d26f03daa8a9e90d17d57bce8d4b45cb90911662a828f903d323`](https://suiscan.xyz/testnet/object/0x8f0b6cbef998d26f03daa8a9e90d17d57bce8d4b45cb90911662a828f903d323/txs) and the counter object is [0x33a950ff57b782bc66f6416bf3fdf7d44de94a84fa823b9b9291f49d4b0270da](https://suiscan.xyz/testnet/object/0x33a950ff57b782bc66f6416bf3fdf7d44de94a84fa823b9b9291f49d4b0270da/fields). + + +Navigate to [`scripts/src/input_objects_exercise.ts`](./scripts/src/input_objects_exercise.ts) and complete the exercise. + + +### Exercise 3: Scavenger Hunting with PTBs + +In this exercise, you will try to get the `Bucket USD` coin in Testnet from the vault using a key created by PTBs. The deployed contract is at [`0x25dfcadb5927395b463a426e8d63425d654a6057affc368f4dc176e587f489a5`](https://suiscan.xyz/testnet/object/0x25dfcadb5927395b463a426e8d63425d654a6057affc368f4dc176e587f489a5/contracts). + +Navigate to [`scavenger`](./lessons/scavenger) to read the smart contract code. + +You will need to create a PTB to: +1. Create a key +2. Set the key code correctly +3. Use the key to withdraw the `Bucket USD` coin from the vault +4. Transfer the `Bucket USD` coin to your account -View the contents [`counter.move`](./lessons/input_objects/counter/sources/counter.move). There is a deployed instance of this package on the Sui blockchain. The address of the package is [`0xad3225e7d4827f81dc0686177067e1b458e8468ceabcff3456888ce3d806eb8c`](https://suiscan.xyz/testnet/object/0xad3225e7d4827f81dc0686177067e1b458e8468ceabcff3456888ce3d806eb8c/txs). Navigate to [`scripts/lessons/input_objects/exercise.ts`](./scripts/src/lessons/input_objects/exercise.ts) and complete the exercise. +Navigate to [`scripts/src/scavenger_hunt_exercise.ts`](./scripts/src/scavenger_hunt_exercise.ts) and complete the exercise. diff --git a/lessons/input_objects/counter/Move.lock b/lessons/input_objects/counter/Move.lock index ee51ac2..fe55f4a 100644 --- a/lessons/input_objects/counter/Move.lock +++ b/lessons/input_objects/counter/Move.lock @@ -1,27 +1,27 @@ # @generated by Move, please check-in and do not edit manually. [move] -version = 2 +version = 3 manifest_digest = "10944AA0F1590CA15650646C66BA027B77D532E5295D19E52CD4671090E69164" deps_digest = "F8BBB0CCB2491CA29A3DF03D6F92277A4F3574266507ACD77214D37ECA3F3082" dependencies = [ - { name = "Sui" }, + { id = "Sui", name = "Sui" }, ] [[move.package]] -name = "MoveStdlib" +id = "MoveStdlib" source = { git = "https://github.com/MystenLabs/sui.git", rev = "framework/testnet", subdir = "crates/sui-framework/packages/move-stdlib" } [[move.package]] -name = "Sui" +id = "Sui" source = { git = "https://github.com/MystenLabs/sui.git", rev = "framework/testnet", subdir = "crates/sui-framework/packages/sui-framework" } dependencies = [ - { name = "MoveStdlib" }, + { id = "MoveStdlib", name = "MoveStdlib" }, ] [move.toolchain-version] -compiler-version = "1.30.3" +compiler-version = "1.40.3" edition = "2024.beta" flavor = "sui" @@ -29,6 +29,6 @@ flavor = "sui" [env.testnet] chain-id = "4c78adac" -original-published-id = "0xad3225e7d4827f81dc0686177067e1b458e8468ceabcff3456888ce3d806eb8c" -latest-published-id = "0xad3225e7d4827f81dc0686177067e1b458e8468ceabcff3456888ce3d806eb8c" +original-published-id = "0x8f0b6cbef998d26f03daa8a9e90d17d57bce8d4b45cb90911662a828f903d323" +latest-published-id = "0x8f0b6cbef998d26f03daa8a9e90d17d57bce8d4b45cb90911662a828f903d323" published-version = "1" diff --git a/lessons/input_objects/counter/sources/counter.move b/lessons/input_objects/counter/sources/counter.move index 7f89cc8..8fcd111 100644 --- a/lessons/input_objects/counter/sources/counter.move +++ b/lessons/input_objects/counter/sources/counter.move @@ -1,41 +1,68 @@ -module counter::counter { +module counter::counter; - /* - Struct for defining the Counter object type +use sui::balance; +use sui::coin; +use sui::sui::SUI; - Abilities: - - key: allows this type to be an object on Sui +/* + Struct for defining the Counter object type - Attributes: - - id: The object id of this object (required when using key ability) - - count: The current value of the counter + Abilities: + - key: allows this type to be an object on Sui - Further reading: - - key ability: https://move-book.com/storage/key-ability.html?highlight=key#the-key-ability - */ - public struct Counter has key { - id: UID, + Attributes: + - id: The object id of this object (required when using key ability) + - count: The current value of the counter + - collected_fees: Balance of SUI tokens collected as fees + - creator: Address of the creator of the counter + - min_fee: Minimum fee required to increment the counter + + Further reading: + - key ability: https://docs.sui.ioonceptsbject-modelbject#object-capabilities + */ +public struct Counter has key { + id: UID, count: u64, - } - - /* - Init function that creates and shares a Counter object. - - This function will be called once and only once during the package deployment. - - Further reading: - - Shared objects: https://docs.sui.io/concepts/object-ownership/shared - */ - fun init(ctx: &mut TxContext) { - transfer::share_object( - Counter { - id: object::new(ctx), + collected_fees: balance::Balance, + creator: address, + min_fee: u64, +} + +/* + Init function that creates and shares a Counter object. + + This function will be called once and only once during the package deployment. + + Further reading: + - Shared objects: https://docs.sui.ioonceptsbject-ownershiphared + */ +fun init(ctx: &mut TxContext) { + transfer::share_object(Counter { + id: object::new(ctx), count: 0, - } - ); - } + collected_fees: balance::zero(), + creator: ctx.sender(), + min_fee: 10, + }); +} + +/* + Increment function that increases the counter value by 1. + + This function takes a mutable reference to a Counter object and a SUI coin as fee. + The fee must be at least equal to the minimum fee set in the Counter object. + The fee is added to the collected_fees balance in the Counter. + + Parameters: + - counter: Mutable reference to the Counter object to increment + - fee: SUI coin to pay as fee for incrementing + + Aborts: + - If the fee is less than the minimum required fee + */ - public fun increment(counter: &mut Counter) { +public fun increment(counter: &mut Counter, fee: coin::Coin) { counter.count = counter.count + 1; - } -} \ No newline at end of file + assert!(fee.value() >= counter.min_fee, 0); + counter.collected_fees.join(fee.into_balance()); +} diff --git a/lessons/returning_objects/banana/sources/banana.move b/lessons/returning_objects/banana/sources/banana.move deleted file mode 100644 index fcbf0ef..0000000 --- a/lessons/returning_objects/banana/sources/banana.move +++ /dev/null @@ -1,74 +0,0 @@ -module banana::banana { - - use sui::display; // https://docs.sui.io/references/framework/sui-framework/display - use sui::package; // https://docs.sui.io/references/framework/sui-framework/package - - /* - Struct for defining the Banana object type - - Abilities: - - key: allows this type to be an object on Sui - - store: allows this type to be freely transferrable by its owner and able to be wrapped in other objects - - Attributes: - - id: The object id of this object (required when using key ability) - - Further reading: - - key ability: https://move-book.com/storage/key-ability.html?highlight=key#the-key-ability - - store ability: https://move-book.com/storage/store-ability.html?highlight=store#ability-store - */ - public struct Banana has key, store { - id: UID, - } - - /* - Module's one-time witness to be used for setting up the display standard for the Banana type - - https://move-book.com/programmability/witness-pattern.html?highlight=one%20time#one-time-witness - */ - public struct BANANA has drop {} - - /* - Init function that sets up the display standard for the Banana object. This function will be called - once and only once during the package deployment. - - Further reading: - - Sui object display standard: https://docs.sui.io/standards/display - */ - fun init(otw: BANANA, ctx: &mut TxContext) { - let keys = vector[ - b"name".to_string(), - b"image_url".to_string(), - b"description".to_string(), - b"project_url".to_string(), - ]; - - let values = vector[ - b"banana".to_string(), - b"https://aggregator-devnet.walrus.space/v1/sSWivHob9Of1DTUgGUWt-Wk4pffzRdak5sN6Ld2VonE".to_string(), - b"Just a banana!".to_string(), - b"https://github.com/sui-foundation/sui-object-model-workshop".to_string(), - ]; - - let publisher = package::claim(otw, ctx); - - let mut display = display::new_with_fields( - &publisher, keys, values, ctx - ); - - display::update_version(&mut display); - - transfer::public_transfer(publisher, ctx.sender()); - transfer::public_transfer(display, ctx.sender()); - - } - - /* - Creates and returns a new Banana object. - */ - public fun new(ctx: &mut TxContext): Banana { - Banana { - id: object::new(ctx) - } - } -} \ No newline at end of file diff --git a/lessons/returning_objects/banana_without_display/Move.toml b/lessons/returning_objects/banana_without_display/Move.toml deleted file mode 100644 index 09fb665..0000000 --- a/lessons/returning_objects/banana_without_display/Move.toml +++ /dev/null @@ -1,37 +0,0 @@ -[package] -name = "banana_without_display" -edition = "2024.beta" # edition = "legacy" to use legacy (pre-2024) Move -# license = "" # e.g., "MIT", "GPL", "Apache 2.0" -# authors = ["..."] # e.g., ["Joe Smith (joesmith@noemail.com)", "John Snow (johnsnow@noemail.com)"] - -[dependencies] -Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "framework/testnet" } - -# For remote import, use the `{ git = "...", subdir = "...", rev = "..." }`. -# Revision can be a branch, a tag, and a commit hash. -# MyRemotePackage = { git = "https://some.remote/host.git", subdir = "remote/path", rev = "main" } - -# For local dependencies use `local = path`. Path is relative to the package root -# Local = { local = "../path/to" } - -# To resolve a version conflict and force a specific version for dependency -# override use `override = true` -# Override = { local = "../conflicting/version", override = true } - -[addresses] -banana_without_display = "0x0" - -# Named addresses will be accessible in Move as `@name`. They're also exported: -# for example, `std = "0x1"` is exported by the Standard Library. -# alice = "0xA11CE" - -[dev-dependencies] -# The dev-dependencies section allows overriding dependencies for `--test` and -# `--dev` modes. You can introduce test-only dependencies here. -# Local = { local = "../path/to/dev-build" } - -[dev-addresses] -# The dev-addresses section allows overwriting named addresses for the `--test` -# and `--dev` modes. -# alice = "0xB0B" - diff --git a/lessons/returning_objects/banana_without_display/sources/banana_without_display.move b/lessons/returning_objects/banana_without_display/sources/banana_without_display.move deleted file mode 100644 index f699ca5..0000000 --- a/lessons/returning_objects/banana_without_display/sources/banana_without_display.move +++ /dev/null @@ -1,29 +0,0 @@ -module banana_without_display::banana { - - /* - Struct for defining the Banana object type - - Abilities: - - key: allows this type to be an object on Sui - - store: allows this type to be freely transferrable by its owner and able to be wrapped in other objects - - Attributes: - - id: The object id of this object (required when using key ability) - - Further reading: - - key ability: https://move-book.com/storage/key-ability.html?highlight=key#the-key-ability - - store ability: https://move-book.com/storage/store-ability.html?highlight=store#ability-store - */ - public struct Banana has key, store { - id: UID, - } - - /* - Creates and returns a new Banana object. - */ - public fun new(ctx: &mut TxContext): Banana { - Banana { - id: object::new(ctx) - } - } -} \ No newline at end of file diff --git a/lessons/returning_objects/banana/Move.lock b/lessons/returning_objects/sui_nft/Move.lock similarity index 60% rename from lessons/returning_objects/banana/Move.lock rename to lessons/returning_objects/sui_nft/Move.lock index ba5872a..d060b92 100644 --- a/lessons/returning_objects/banana/Move.lock +++ b/lessons/returning_objects/sui_nft/Move.lock @@ -1,27 +1,27 @@ # @generated by Move, please check-in and do not edit manually. [move] -version = 2 -manifest_digest = "201CD322904BD2F4D57F86F368FCABDA675EB95CBFAD348B3A5AF3C605E92D1D" +version = 3 +manifest_digest = "CCFD73EDA7FC660FF9AC2F586A30517E74B2FAD88FA65DCB376A1925058EBF73" deps_digest = "F8BBB0CCB2491CA29A3DF03D6F92277A4F3574266507ACD77214D37ECA3F3082" dependencies = [ - { name = "Sui" }, + { id = "Sui", name = "Sui" }, ] [[move.package]] -name = "MoveStdlib" +id = "MoveStdlib" source = { git = "https://github.com/MystenLabs/sui.git", rev = "framework/testnet", subdir = "crates/sui-framework/packages/move-stdlib" } [[move.package]] -name = "Sui" +id = "Sui" source = { git = "https://github.com/MystenLabs/sui.git", rev = "framework/testnet", subdir = "crates/sui-framework/packages/sui-framework" } dependencies = [ - { name = "MoveStdlib" }, + { id = "MoveStdlib", name = "MoveStdlib" }, ] [move.toolchain-version] -compiler-version = "1.30.3" +compiler-version = "1.40.3" edition = "2024.beta" flavor = "sui" @@ -29,6 +29,6 @@ flavor = "sui" [env.testnet] chain-id = "4c78adac" -original-published-id = "0xadfb946c8c887446d284dae80ac8501c02ec9b9157babb96ca884773bfbb7771" -latest-published-id = "0xadfb946c8c887446d284dae80ac8501c02ec9b9157babb96ca884773bfbb7771" +original-published-id = "0x83feeef5abcb1d5caca48f5e4e2259f8fbbcac88c10d82cc95ed58ff6f0dcd79" +latest-published-id = "0x83feeef5abcb1d5caca48f5e4e2259f8fbbcac88c10d82cc95ed58ff6f0dcd79" published-version = "1" diff --git a/lessons/returning_objects/banana/Move.toml b/lessons/returning_objects/sui_nft/Move.toml similarity index 97% rename from lessons/returning_objects/banana/Move.toml rename to lessons/returning_objects/sui_nft/Move.toml index 7cd5ccd..19d016e 100644 --- a/lessons/returning_objects/banana/Move.toml +++ b/lessons/returning_objects/sui_nft/Move.toml @@ -1,5 +1,5 @@ [package] -name = "banana" +name = "sui_nft" edition = "2024.beta" # edition = "legacy" to use legacy (pre-2024) Move # license = "" # e.g., "MIT", "GPL", "Apache 2.0" # authors = ["..."] # e.g., ["Joe Smith (joesmith@noemail.com)", "John Snow (johnsnow@noemail.com)"] @@ -19,7 +19,7 @@ Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-fram # Override = { local = "../conflicting/version", override = true } [addresses] -banana = "0x0" +sui_nft = "0x0" # Named addresses will be accessible in Move as `@name`. They're also exported: # for example, `std = "0x1"` is exported by the Standard Library. @@ -34,4 +34,3 @@ banana = "0x0" # The dev-addresses section allows overwriting named addresses for the `--test` # and `--dev` modes. # alice = "0xB0B" - diff --git a/lessons/returning_objects/sui_nft/sources/sui_nft.move b/lessons/returning_objects/sui_nft/sources/sui_nft.move new file mode 100644 index 0000000..cda135b --- /dev/null +++ b/lessons/returning_objects/sui_nft/sources/sui_nft.move @@ -0,0 +1,68 @@ +module sui_nft::sui_nft; + +use sui::display; +use sui::package; + +/* + Struct for defining the Sui NFT object type + + Abilities: + - key: allows this type to be an object on Sui + - store: allows this type to be freely transferrable by its owner and able to be wrapped in other objects + + Attributes: + - id: The object id of this object (required when using key ability) + + Further reading: + - key ability: https://move-book.comtorageey-ability.html?highlight=key#the-key-ability + - store ability: https://move-book.comtoragetore-ability.html?highlight=store#ability-store + */ +public struct SuiNFT has key, store { + id: UID, +} + +/* + Module's one-time witness to be used for setting up the display standard for the Sui NFT type + + https://move-book.comrogrammabilityitness-pattern.html?highlight=one%20time#one-time-witness + */ +public struct SUI_NFT has drop {} + +/* + Init function that sets up the display standard for the Sui NFT object. This function will be called + once and only once during the package deployment. + + Further reading: + - Sui object display standard: https://docs.sui.iotandardsisplay + */ +fun init(otw: SUI_NFT, ctx: &mut TxContext) { + let keys = vector[ + b"name".to_string(), + b"image_url".to_string(), + b"description".to_string(), + b"project_url".to_string(), + ]; + + let values = vector[ + b"SUIIIII".to_string(), + b"https://media.tenor.com/t3eKwU-odDgAAAAM/sui-siu.gif".to_string(), + b"SUIIIII it out!".to_string(), + b"https://github.com/sui-foundation/sui-object-model-workshop".to_string(), + ]; + + let publisher = package::claim(otw, ctx); + + let mut display = display::new_with_fields(&publisher, keys, values, ctx); + + display::update_version(&mut display); + + transfer::public_transfer(publisher, ctx.sender()); + transfer::public_transfer(display, ctx.sender()); +} + +/* + Creates and returns a new SuiNFT object. + */ +public fun new(ctx: &mut TxContext): SuiNFT { + SuiNFT { id: object::new(ctx) } +} diff --git a/scavenger/Move.lock b/lessons/scavenger/Move.lock similarity index 74% rename from scavenger/Move.lock rename to lessons/scavenger/Move.lock index e34373f..5751d4a 100644 --- a/scavenger/Move.lock +++ b/lessons/scavenger/Move.lock @@ -1,27 +1,27 @@ # @generated by Move, please check-in and do not edit manually. [move] -version = 2 +version = 3 manifest_digest = "126734ECE6CB3DEAB0DC716ACD7D3114DBCCD48ED4122BDBCAFF81249A4DD637" deps_digest = "F8BBB0CCB2491CA29A3DF03D6F92277A4F3574266507ACD77214D37ECA3F3082" dependencies = [ - { name = "Sui" }, + { id = "Sui", name = "Sui" }, ] [[move.package]] -name = "MoveStdlib" +id = "MoveStdlib" source = { git = "https://github.com/MystenLabs/sui.git", rev = "framework/mainnet", subdir = "crates/sui-framework/packages/move-stdlib" } [[move.package]] -name = "Sui" +id = "Sui" source = { git = "https://github.com/MystenLabs/sui.git", rev = "framework/mainnet", subdir = "crates/sui-framework/packages/sui-framework" } dependencies = [ - { name = "MoveStdlib" }, + { id = "MoveStdlib", name = "MoveStdlib" }, ] [move.toolchain-version] -compiler-version = "1.33.0" +compiler-version = "1.40.3" edition = "2024.beta" flavor = "sui" @@ -29,8 +29,8 @@ flavor = "sui" [env.testnet] chain-id = "4c78adac" -original-published-id = "0xd198abee8def4735cb8b1848e50d5cde4f680ee62e881cb5e2638cf7bdef4512" -latest-published-id = "0xd198abee8def4735cb8b1848e50d5cde4f680ee62e881cb5e2638cf7bdef4512" +original-published-id = "0x25dfcadb5927395b463a426e8d63425d654a6057affc368f4dc176e587f489a5" +latest-published-id = "0x25dfcadb5927395b463a426e8d63425d654a6057affc368f4dc176e587f489a5" published-version = "1" [env.mainnet] diff --git a/scavenger/Move.toml b/lessons/scavenger/Move.toml similarity index 100% rename from scavenger/Move.toml rename to lessons/scavenger/Move.toml diff --git a/lessons/scavenger/sources/key.move b/lessons/scavenger/sources/key.move new file mode 100644 index 0000000..473290c --- /dev/null +++ b/lessons/scavenger/sources/key.move @@ -0,0 +1,25 @@ +module scavenger::key; + +public struct Key { + code: u64, +} + +public fun new(): Key { + Key { + code: 0, + } +} + +public fun set_code(key: &mut Key, new_code: u64) { + key.code = new_code; +} + +public fun get_code(key: &Key): u64 { + key.code +} + +public(package) fun delete(key: Key) { + let Key { + code: _, + } = key; +} diff --git a/lessons/scavenger/sources/test_buck.move b/lessons/scavenger/sources/test_buck.move new file mode 100644 index 0000000..fa9b45d --- /dev/null +++ b/lessons/scavenger/sources/test_buck.move @@ -0,0 +1,60 @@ +module scavenger::test_buck; + +use scavenger::vault; +use sui::coin; +use sui::url; + +// ----- Use Statements ----- + +// ----- Structs ----- + +/// One-time witness type for the TEST_BUCK coin +/// The 'drop' ability allows this type to be dropped after the init function completes +public struct TEST_BUCK has drop {} + +// ----- Init Functions ----- + +/// Module initializer, called once when the module is published +/// @param test_buck - One-time witness for the TEST_BUCK currency +/// @param ctx - Transaction context for accessing sender and creating objects +fun init(test_buck: TEST_BUCK, ctx: &mut tx_context::TxContext) { + // Create a new currency with the following parameters: + // - 9 decimals of precision + // - Symbol: BUCK + // - Name: Bucket USD + // - Description: Test token for the testnet + // - Icon URL: Link to the token's SVG image + let (mut treasury_cap, coin_metadata) = coin::create_currency( + test_buck, + 9, + b"BUCK", + b"Bucket USD", + b"Bucket USD at testnet for testing", + option::some( + url::new_unsafe_from_bytes( + b"https://bucket-cdn-eason.s3.us-west-1.amazonaws.com/BUCK.svg", + ), + ), + ctx, + ); + // Freeze the metadata to make it immutable + transfer::public_freeze_object(coin_metadata); + + // Mint 10^19 tokens (10 billion tokens with 9 decimal places) + let coin = coin::mint( + &mut treasury_cap, + 10000000000000000000, + ctx, + ); + // Freeze the treasury cap to prevent further minting + transfer::public_freeze_object(treasury_cap); + + // Create a new vault with: + // - The newly minted coins + // - Withdrawal amount of 10 billion (10^10) + // - Access code of 777 + let admin_cap = vault::new(coin, 10000000000, 777, ctx); + + // Transfer the admin capability to the transaction sender + transfer::public_transfer(admin_cap, tx_context::sender(ctx)); +} diff --git a/lessons/scavenger/sources/vault.move b/lessons/scavenger/sources/vault.move new file mode 100644 index 0000000..093cc1f --- /dev/null +++ b/lessons/scavenger/sources/vault.move @@ -0,0 +1,79 @@ +module scavenger::vault; + +use scavenger::key; +use sui::balance; +use sui::coin; + +public struct Vault has key { + id: UID, + balance: balance::Balance, + withdrawal_amount: u64, + code: u64, +} + +public struct AdminCap has key, store { + id: UID, + vault_id: ID, +} + +public fun new( + coins: coin::Coin, + withdrawal_amount: u64, + code: u64, + ctx: &mut TxContext, +): AdminCap { + let new_vault = Vault { + id: object::new(ctx), + balance: coin::into_balance(coins), + withdrawal_amount, + code, + }; + + let new_admin_cap = AdminCap { + id: object::new(ctx), + vault_id: new_vault.id.to_inner(), + }; + + transfer::share_object(new_vault); + + new_admin_cap +} + +public fun withdraw(vault: &mut Vault, key: key::Key, ctx: &mut TxContext): coin::Coin { + assert_valid_key_code(vault, &key); + key.delete(); + + let new_coin = coin::from_balance( + balance::split( + &mut vault.balance, + vault.withdrawal_amount, + ), + ctx, + ); + new_coin +} + +public fun empty(vault: Vault, admin_cap: AdminCap, ctx: &mut TxContext): coin::Coin { + assert_valid_admin_cap(&vault, &admin_cap); + + let AdminCap { id: admin_cap_id, vault_id: _ } = admin_cap; + admin_cap_id.delete(); + + let Vault { + id, + balance, + withdrawal_amount: _, + code: _, + } = vault; + id.delete(); + + coin::from_balance(balance, ctx) +} + +fun assert_valid_key_code(vault: &Vault, key: &key::Key) { + assert!(vault.code == key.get_code()); +} + +fun assert_valid_admin_cap(vault: &Vault, admin_cap: &AdminCap) { + assert!(vault.id.to_inner() == admin_cap.vault_id); +} diff --git a/scavenger/sources/key.move b/scavenger/sources/key.move deleted file mode 100644 index 516a470..0000000 --- a/scavenger/sources/key.move +++ /dev/null @@ -1,26 +0,0 @@ -module scavenger::key { - - public struct Key { - code: u64 - } - - public fun new(): Key { - Key { - code: 0 - } - } - - public fun set_code(key: &mut Key, new_code: u64) { - key.code = new_code; - } - - public fun get_code(key: &Key): u64 { - key.code - } - - public(package) fun delete(key: Key) { - let Key { - code: _, - } = key; - } -} \ No newline at end of file diff --git a/scavenger/sources/vault.move b/scavenger/sources/vault.move deleted file mode 100644 index 95fca18..0000000 --- a/scavenger/sources/vault.move +++ /dev/null @@ -1,91 +0,0 @@ -module scavenger::vault { - - use sui::coin; - use sui::balance; - use sui::sui::SUI; - - use scavenger::key; - - public struct Vault has key { - id: UID, - balance: balance::Balance, - withdrawal_amount: u64, - code: u64 - } - - public struct AdminCap has key, store { - id: UID, - vault_id: ID - } - - public fun new( - sui_coins: coin::Coin, - withdrawal_amount: u64, - code: u64, - ctx: &mut TxContext - ): AdminCap { - let new_vault = Vault { - id: object::new(ctx), - balance: coin::into_balance(sui_coins), - withdrawal_amount, - code - }; - - let new_admin_cap = AdminCap { - id: object::new(ctx), - vault_id: new_vault.id.to_inner() - }; - - transfer::share_object( - new_vault - ); - - new_admin_cap - } - - public fun withdraw(vault: &mut Vault, key: key::Key, ctx: &mut TxContext): coin::Coin { - - assert_valid_key_code(vault, &key); - - key.delete(); - let new_coin = coin::from_balance( - balance::split( - &mut vault.balance, - vault.withdrawal_amount - ), - ctx - ); - - new_coin - - } - - public fun empty(vault: Vault, admin_cap: AdminCap, ctx: &mut TxContext): coin::Coin { - assert_valid_admin_cap(&vault, &admin_cap); - - let AdminCap { - id: admin_cap_id, - vault_id: _ - } = admin_cap; - admin_cap_id.delete(); - - let Vault { - id, - balance, - withdrawal_amount: _, - code: _ - } = vault; - id.delete(); - - coin::from_balance(balance, ctx) - } - - fun assert_valid_key_code(vault: &Vault, key: &key::Key) { - assert!(vault.code == key.get_code()); - } - - fun assert_valid_admin_cap(vault: &Vault, admin_cap: &AdminCap) { - assert!(vault.id.to_inner() == admin_cap.vault_id); - } - -} \ No newline at end of file diff --git a/scripts/package-lock.json b/scripts/package-lock.json new file mode 100644 index 0000000..fd4335d --- /dev/null +++ b/scripts/package-lock.json @@ -0,0 +1,424 @@ +{ + "name": "scripts", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "scripts", + "version": "1.0.0", + "license": "MIT", + "dependencies": { + "@mysten/sui": "^1.8.0", + "dotenv": "^16.4.5" + }, + "devDependencies": { + "@types/node": "^22.5.2", + "ts-node": "^10.9.2", + "typescript": "^5.5.4" + } + }, + "node_modules/@0no-co/graphql.web": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@0no-co/graphql.web/-/graphql.web-1.1.2.tgz", + "integrity": "sha512-N2NGsU5FLBhT8NZ+3l2YrzZSHITjNXNuDhC4iDiikv0IujaJ0Xc6xIxQZ/Ek3Cb+rgPjnLHYyJm11tInuJn+cw==", + "peerDependencies": { + "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0" + }, + "peerDependenciesMeta": { + "graphql": { + "optional": true + } + } + }, + "node_modules/@0no-co/graphqlsp": { + "version": "1.12.16", + "resolved": "https://registry.npmjs.org/@0no-co/graphqlsp/-/graphqlsp-1.12.16.tgz", + "integrity": "sha512-B5pyYVH93Etv7xjT6IfB7QtMBdaaC07yjbhN6v8H7KgFStMkPvi+oWYBTibMFRMY89qwc9H8YixXg8SXDVgYWw==", + "dependencies": { + "@gql.tada/internal": "^1.0.0", + "graphql": "^15.5.0 || ^16.0.0 || ^17.0.0" + }, + "peerDependencies": { + "graphql": "^15.5.0 || ^16.0.0 || ^17.0.0", + "typescript": "^5.0.0" + } + }, + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@gql.tada/cli-utils": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/@gql.tada/cli-utils/-/cli-utils-1.6.3.tgz", + "integrity": "sha512-jFFSY8OxYeBxdKi58UzeMXG1tdm4FVjXa8WHIi66Gzu9JWtCE6mqom3a8xkmSw+mVaybFW5EN2WXf1WztJVNyQ==", + "dependencies": { + "@0no-co/graphqlsp": "^1.12.13", + "@gql.tada/internal": "1.0.8", + "graphql": "^15.5.0 || ^16.0.0 || ^17.0.0" + }, + "peerDependencies": { + "@0no-co/graphqlsp": "^1.12.13", + "@gql.tada/svelte-support": "1.0.1", + "@gql.tada/vue-support": "1.0.1", + "graphql": "^15.5.0 || ^16.0.0 || ^17.0.0", + "typescript": "^5.0.0" + }, + "peerDependenciesMeta": { + "@gql.tada/svelte-support": { + "optional": true + }, + "@gql.tada/vue-support": { + "optional": true + } + } + }, + "node_modules/@gql.tada/internal": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@gql.tada/internal/-/internal-1.0.8.tgz", + "integrity": "sha512-XYdxJhtHC5WtZfdDqtKjcQ4d7R1s0d1rnlSs3OcBEUbYiPoJJfZU7tWsVXuv047Z6msvmr4ompJ7eLSK5Km57g==", + "dependencies": { + "@0no-co/graphql.web": "^1.0.5" + }, + "peerDependencies": { + "graphql": "^15.5.0 || ^16.0.0 || ^17.0.0", + "typescript": "^5.0.0" + } + }, + "node_modules/@graphql-typed-document-node/core": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@graphql-typed-document-node/core/-/core-3.2.0.tgz", + "integrity": "sha512-mB9oAsNCm9aM3/SOv4YtBMqZbYj10R7dkq8byBqxGY/ncFwhf2oQzMV+LCRlWoDSEBJ3COiR1yeDvMtsoOsuFQ==", + "peerDependencies": { + "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "dev": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "node_modules/@mysten/bcs": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@mysten/bcs/-/bcs-1.6.0.tgz", + "integrity": "sha512-ydDRYdIkIFCpHCcPvAkMC91fVwumjzbTgjqds0KsphDQI3jUlH3jFG5lfYNTmV6V3pkhOiRk1fupLBcsQsiszg==", + "dependencies": { + "@scure/base": "^1.2.4" + } + }, + "node_modules/@mysten/sui": { + "version": "1.26.1", + "resolved": "https://registry.npmjs.org/@mysten/sui/-/sui-1.26.1.tgz", + "integrity": "sha512-bBVvn2wZKipAvuUkKzHwGhs1JiIM33+b97d0uIWg3T6dJH/n1nfnGrzkBQsMGpoBAFOIUnKQAZmDwT4qvJbKkg==", + "dependencies": { + "@graphql-typed-document-node/core": "^3.2.0", + "@mysten/bcs": "1.6.0", + "@noble/curves": "^1.8.1", + "@noble/hashes": "^1.7.1", + "@scure/base": "^1.2.4", + "@scure/bip32": "^1.6.2", + "@scure/bip39": "^1.5.4", + "gql.tada": "^1.8.2", + "graphql": "^16.9.0", + "poseidon-lite": "^0.2.0", + "valibot": "^0.36.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@noble/curves": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.8.1.tgz", + "integrity": "sha512-warwspo+UYUPep0Q+vtdVB4Ugn8GGQj8iyB3gnRWsztmUHTI3S1nhdiWNsPUGL0vud7JlRRk1XEu7Lq1KGTnMQ==", + "dependencies": { + "@noble/hashes": "1.7.1" + }, + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@noble/hashes": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.7.1.tgz", + "integrity": "sha512-B8XBPsn4vT/KJAGqDzbwztd+6Yte3P4V7iafm24bxgDe/mlRuK6xmWPuCNrKt2vDafZ8MfJLlchDG/vYafQEjQ==", + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/base": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.2.4.tgz", + "integrity": "sha512-5Yy9czTO47mqz+/J8GM6GIId4umdCk1wc1q8rKERQulIoc8VP9pzDcghv10Tl2E7R96ZUx/PhND3ESYUQX8NuQ==", + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip32": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.6.2.tgz", + "integrity": "sha512-t96EPDMbtGgtb7onKKqxRLfE5g05k7uHnHRM2xdE6BP/ZmxaLtPek4J4KfVn/90IQNrU1IOAqMgiDtUdtbe3nw==", + "dependencies": { + "@noble/curves": "~1.8.1", + "@noble/hashes": "~1.7.1", + "@scure/base": "~1.2.2" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip39": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.5.4.tgz", + "integrity": "sha512-TFM4ni0vKvCfBpohoh+/lY05i9gRbSwXWngAsF4CABQxoaOHijxuaZ2R6cStDQ5CHtHO9aGJTr4ksVJASRRyMA==", + "dependencies": { + "@noble/hashes": "~1.7.1", + "@scure/base": "~1.2.4" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@tsconfig/node10": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz", + "integrity": "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==", + "dev": true + }, + "node_modules/@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "dev": true + }, + "node_modules/@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "dev": true + }, + "node_modules/@tsconfig/node16": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", + "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", + "dev": true + }, + "node_modules/@types/node": { + "version": "22.14.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.14.0.tgz", + "integrity": "sha512-Kmpl+z84ILoG+3T/zQFyAJsU6EPTmOCj8/2+83fSN6djd6I4o7uOuGIH6vq3PrjY5BGitSbFuMN18j3iknubbA==", + "dev": true, + "dependencies": { + "undici-types": "~6.21.0" + } + }, + "node_modules/acorn": { + "version": "8.14.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.1.tgz", + "integrity": "sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-walk": { + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", + "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", + "dev": true, + "dependencies": { + "acorn": "^8.11.0" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true + }, + "node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true + }, + "node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/dotenv": { + "version": "16.4.7", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.7.tgz", + "integrity": "sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, + "node_modules/gql.tada": { + "version": "1.8.10", + "resolved": "https://registry.npmjs.org/gql.tada/-/gql.tada-1.8.10.tgz", + "integrity": "sha512-FrvSxgz838FYVPgZHGOSgbpOjhR+yq44rCzww3oOPJYi0OvBJjAgCiP6LEokZIYND2fUTXzQAyLgcvgw1yNP5A==", + "dependencies": { + "@0no-co/graphql.web": "^1.0.5", + "@0no-co/graphqlsp": "^1.12.13", + "@gql.tada/cli-utils": "1.6.3", + "@gql.tada/internal": "1.0.8" + }, + "bin": { + "gql-tada": "bin/cli.js", + "gql.tada": "bin/cli.js" + }, + "peerDependencies": { + "typescript": "^5.0.0" + } + }, + "node_modules/graphql": { + "version": "16.10.0", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.10.0.tgz", + "integrity": "sha512-AjqGKbDGUFRKIRCP9tCKiIGHyriz2oHEbPIbEtcSLSs4YjReZOIPQQWek4+6hjw62H9QShXHyaGivGiYVLeYFQ==", + "engines": { + "node": "^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0" + } + }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true + }, + "node_modules/poseidon-lite": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/poseidon-lite/-/poseidon-lite-0.2.1.tgz", + "integrity": "sha512-xIr+G6HeYfOhCuswdqcFpSX47SPhm0EpisWJ6h7fHlWwaVIvH3dLnejpatrtw6Xc6HaLrpq05y7VRfvDmDGIog==" + }, + "node_modules/ts-node": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", + "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", + "dev": true, + "dependencies": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } + } + }, + "node_modules/typescript": { + "version": "5.8.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.2.tgz", + "integrity": "sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/undici-types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", + "dev": true + }, + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true + }, + "node_modules/valibot": { + "version": "0.36.0", + "resolved": "https://registry.npmjs.org/valibot/-/valibot-0.36.0.tgz", + "integrity": "sha512-CjF1XN4sUce8sBK9TixrDqFM7RwNkuXdJu174/AwmQUB62QbCQADg5lLe8ldBalFgtj1uKj+pKwDJiNo4Mn+eQ==" + }, + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true, + "engines": { + "node": ">=6" + } + } + } +} diff --git a/scripts/package.json b/scripts/package.json index f2e96f3..8d97382 100644 --- a/scripts/package.json +++ b/scripts/package.json @@ -10,11 +10,12 @@ }, "scripts": { "init-keypair": "ts-node src/init.ts", - "return-objects": "ts-node src/lessons/return_objects/exercise.ts", - "input-objects": "ts-node src/lessons/input_objects/exercise.ts" + "return-objects": "ts-node src/return_objects_exercise.ts", + "input-objects": "ts-node src/input_objects_exercise.ts", + "scavenger-hunt": "ts-node src/scavenger_hunt_exercise.ts" }, "dependencies": { "@mysten/sui": "^1.8.0", "dotenv": "^16.4.5" } -} +} \ No newline at end of file diff --git a/scripts/src/helpers.ts b/scripts/src/helpers.ts index 7c4dba9..70687f5 100644 --- a/scripts/src/helpers.ts +++ b/scripts/src/helpers.ts @@ -1,7 +1,7 @@ import { writeFile } from "fs/promises"; export async function sleep(ms: number): Promise { - return new Promise(resolve => setTimeout(resolve, ms)); + return new Promise((resolve) => setTimeout(resolve, ms)); } // Asynchronous example @@ -9,6 +9,6 @@ export async function writeToFile(filename: string, content: string) { try { await writeFile(filename, content); } catch (error) { - console.error('Error writing file:', error); + console.error("Error writing file:", error); } -} \ No newline at end of file +} diff --git a/scripts/src/init.ts b/scripts/src/init.ts index 2a914cf..5da25a8 100644 --- a/scripts/src/init.ts +++ b/scripts/src/init.ts @@ -1,26 +1,29 @@ -import { Ed25519Keypair } from '@mysten/sui/keypairs/ed25519'; -import { sleep, writeToFile } from './helpers'; - +import { Ed25519Keypair } from "@mysten/sui/keypairs/ed25519"; +import { sleep, writeToFile } from "./helpers"; const main = async () => { - console.log('Generating KeyPair...'); + console.log("Generating KeyPair..."); await sleep(1000); const keypair = new Ed25519Keypair(); const publicAddress = keypair.getPublicKey().toSuiAddress(); - const privateKey = keypair.getSecretKey() + const privateKey = keypair.getSecretKey(); const keyPairConfig = { publicAddress, - privateKey + privateKey, }; - await writeToFile('keypair.json', JSON.stringify(keyPairConfig, null, 2)); - - console.log('\nKeyPair written to file successfully @ keypair.json'); - console.log(`\nView your Sui account at https://explorer.polymedia.app/address/${publicAddress}?network=testnet`) + await writeToFile("keypair.json", JSON.stringify(keyPairConfig, null, 2)); -} + console.log("\nKeyPair written to file successfully @ keypair.json"); + console.log( + `\nView your Sui account at https://suiscan.xyz/testnet/account/${publicAddress}` + ); + console.log("\nNext, please request tokens from alternative faucets:"); + console.log("- https://faucet.n1stake.com/"); + console.log("- https://faucet.sui.io/"); +}; -main(); \ No newline at end of file +main(); diff --git a/scripts/src/input_objects_exercise.ts b/scripts/src/input_objects_exercise.ts new file mode 100644 index 0000000..1f660d5 --- /dev/null +++ b/scripts/src/input_objects_exercise.ts @@ -0,0 +1,98 @@ +import { Transaction } from "@mysten/sui/transactions"; +import { Ed25519Keypair } from "@mysten/sui/keypairs/ed25519"; +import { getFullnodeUrl, SuiClient } from "@mysten/sui/client"; +import { decodeSuiPrivateKey } from "@mysten/sui/cryptography"; +import keyPairJson from "../keypair.json"; + +/** + * + * Global variables + * + * These variables are used throughout the exercise below. + * + */ +const { secretKey } = decodeSuiPrivateKey(keyPairJson.privateKey); +const keypair = Ed25519Keypair.fromSecretKey(secretKey); + +const PACKAGE_ID = `0x8f0b6cbef998d26f03daa8a9e90d17d57bce8d4b45cb90911662a828f903d323`; + +const COUNTER_OBJECT_ID = `0x33a950ff57b782bc66f6416bf3fdf7d44de94a84fa823b9b9291f49d4b0270da`; + +const rpcUrl = getFullnodeUrl("testnet"); +const suiClient = new SuiClient({ url: rpcUrl }); + +/** + * Objects as input: Exercise 1 + * + * In this exercise, you use Sui objects as inputs in a PTB to update the value of a shared object. + * + * When finished, run the following command in the scripts directory to test your solution: + * + * yarn input-objects + * + * RESOURCES: + * - https://sdk.mystenlabs.com/typescript/transaction-building/basics#transactions + */ +const main = async () => { + /** + * Task 1: + * + * Create a new Transaction instance from the @mysten/sui/transactions module. + */ + const tx = new Transaction(); + + /** + * Task 2: + * + * Create a coin to pay the fee for incrementing the counter. + * Based on the counter.move file, we need to provide a SUI coin with at least the minimum fee (10). + * We use the `splitCoins` function to create a coin with the minimum fee from our gas fee. + * + * Resources: + * - SplitCoins: https://sdk.mystenlabs.com/typescript/transaction-building/basics + */ + const [coin] = tx.splitCoins(tx.gas, [tx.pure.u64(10)]); + + /** + * Task 3: + * + * Execute the call to the `counter::increment` function to the transaction instance. + * + * The target should be in the format {package address}::{module name}::{function name}. The + * package address is provided above. The module name is `counter` and the function name is + * `increment`. + * + * Resources: + * - Object inputs: https://sdk.mystenlabs.com/typescript/transaction-building/basics#object-references + */ + + tx.moveCall({ + target: ``, // TODO: Add target here + arguments: [ + // TODO: Add arguments here + ], + }); + + /** + * Task 4: + * + * Sign and execute the transaction using the SuiClient instance created above. + * + * Print the result to the console. + * + * Resources: + * - Observing transaction results: https://sdk.mystenlabs.com/typescript/transaction-building/basics#observing-the-results-of-a-transaction + */ + const result = await suiClient.signAndExecuteTransaction({ + transaction: tx, + signer: keypair, + }); + await suiClient.waitForTransaction({ + digest: result.digest, + }); + console.log( + `[Success] view your transaction result at: https://suiscan.xyz/testnet/tx/${result.digest}` + ); +}; + +main(); diff --git a/scripts/src/lessons/input_objects/exercise.ts b/scripts/src/lessons/input_objects/exercise.ts deleted file mode 100644 index c069825..0000000 --- a/scripts/src/lessons/input_objects/exercise.ts +++ /dev/null @@ -1,68 +0,0 @@ -import { Transaction } from '@mysten/sui/transactions'; -import { Ed25519Keypair } from "@mysten/sui/keypairs/ed25519"; -import { getFullnodeUrl, SuiClient } from '@mysten/sui/client'; -import { decodeSuiPrivateKey } from '@mysten/sui/cryptography'; -import keyPairJson from '../../../keypair.json'; - - -/** - * - * Global variables - * - * These variables are used throughout the exercise below. - * - */ -const { secretKey } = decodeSuiPrivateKey(keyPairJson.privateKey); -const keypair = Ed25519Keypair.fromSecretKey(secretKey); - -const PACKAGE_ADDRESS = `0xad3225e7d4827f81dc0686177067e1b458e8468ceabcff3456888ce3d806eb8c`; - -const COUNTER_ADDRESS = `0x1feb03541d20064d1876c26cfa44514f2e029c8201a2fe12a60589842b9d391d` - -const rpcUrl = getFullnodeUrl("testnet"); -const suiClient = new SuiClient({ url: rpcUrl }); - -/** - * Objects as input: Exercise 1 - * - * In this exercise, you use Sui objects as inputs in a PTB to update the value of a shared object. - * - * When finished, run the following command in the scripts directory to test your solution: - * - * yarn input-objects - * - * RESOURCES: - * - https://sdk.mystenlabs.com/typescript/transaction-building/basics#transactions - */ -const main = async () => { - - /** - * Task 1: - * - * Create a new Transaction instance from the @mysten/sui/transactions module. - */ - - /** - * Task 2: - * - * Execute the call to the `counter::increment` function to the transaction instance. - * - * The target should be in the format {package address}::{module name}::{function name}. The - * package address is provided above. The module name is `counter` and the function name is - * `increment`. - * - * Resources: - * - Object inputs: https://sdk.mystenlabs.com/typescript/transaction-building/basics#object-references - */ - - /** - * Task 3: - * - * Sign and execute the transaction using the SuiClient instance created above. - * - * Print the result to the console. - */ - -} - -main(); \ No newline at end of file diff --git a/scripts/src/lessons/return_objects/exercise.ts b/scripts/src/return_objects_exercise.ts similarity index 51% rename from scripts/src/lessons/return_objects/exercise.ts rename to scripts/src/return_objects_exercise.ts index f535da3..d833a0c 100644 --- a/scripts/src/lessons/return_objects/exercise.ts +++ b/scripts/src/return_objects_exercise.ts @@ -1,80 +1,92 @@ -import { Transaction } from '@mysten/sui/transactions'; +import { Transaction } from "@mysten/sui/transactions"; import { Ed25519Keypair } from "@mysten/sui/keypairs/ed25519"; -import { getFullnodeUrl, SuiClient } from '@mysten/sui/client'; -import { decodeSuiPrivateKey } from '@mysten/sui/cryptography'; -import keyPairJson from '../../../keypair.json'; - +import { getFullnodeUrl, SuiClient } from "@mysten/sui/client"; +import { decodeSuiPrivateKey } from "@mysten/sui/cryptography"; +import keyPairJson from "../keypair.json"; /** - * + * * Global variables - * + * * These variables are used throughout the exercise below. - * + * */ const { secretKey } = decodeSuiPrivateKey(keyPairJson.privateKey); const keypair = Ed25519Keypair.fromSecretKey(secretKey); const suiAddress = keypair.getPublicKey().toSuiAddress(); -const PACKAGE_ADDRESS = `0xadfb946c8c887446d284dae80ac8501c02ec9b9157babb96ca884773bfbb7771`; +const PACKAGE_ID = `0x83feeef5abcb1d5caca48f5e4e2259f8fbbcac88c10d82cc95ed58ff6f0dcd79`; const rpcUrl = getFullnodeUrl("testnet"); const suiClient = new SuiClient({ url: rpcUrl }); /** * Returning Objects: Exercise 1 - * - * In this exercise, you will be returned a new object from a function and must transfer it to an - * address, otherwise, the transaction will abort. - * + * + * In this exercise, you will be returned a new object from a function and must transfer it to an + * address, otherwise, the transaction will abort. + * * When finished, run the following command in the scripts directory to test your solution: - * + * * yarn return-objects - * - * RESOURCES: + * + * RESOURCES: * - https://sdk.mystenlabs.com/typescript/transaction-building/basics#transactions */ const main = async () => { - /** - * Task 1: - * + * Task 1: + * * Create a new Transaction instance from the @mysten/sui/transactions module. */ - + const tx = new Transaction(); /** * Task 2: - * - * Execute the call to the `banana::new` function to the transaction instance. - * - * The target should be in the format {package address}::{module name}::{function name}. The - * package address is provided above. The module name is `banana` and the function name is `new`. - * - * HINT: The arguments and typeArguments arguments are optional since this function does not take + * + * Execute the call to the `sui_nft::new` function to the transaction instance. + * + * The target should be in the format {package address}::{module name}::{function name}. The + * package address is provided above. The module name is `sui_nft` and the function name is `new`. + * + * HINT: The arguments and typeArguments arguments are optional since this function does not take * any arguments or type arguments. */ + const nft = tx.moveCall({ + target: `${PACKAGE_ID}::sui_nft::new`, + }); /** - * Task 3: - * - * Transfer the newly created banana object to your address. - * + * Task 3: + * + * Transfer the newly created SuiNFT object to your address. + * * Use `tx.transferObjects(objects, address)` - Transfers a list of objects to the specified address. - * + * * HINT: Use `suiAddress`` to transfer the object to your address. */ + // TODO: Add transferObjects call here /** - * Task 4: - * + * Task 4: + * * Sign and execute the transaction using the SuiClient instance created above. - * + * * Print the result to the console. */ - -} -main(); \ No newline at end of file + const result = await suiClient.signAndExecuteTransaction({ + transaction: tx, + signer: keypair, + }); + await suiClient.waitForTransaction({ + digest: result.digest, + }); + console.log( + `[Success] view your transaction result at: https://suiscan.xyz/testnet/tx/${result.digest}` + ); +}; + +main(); diff --git a/scripts/src/scavenger_hunt_exercise.ts b/scripts/src/scavenger_hunt_exercise.ts new file mode 100644 index 0000000..2d28b82 --- /dev/null +++ b/scripts/src/scavenger_hunt_exercise.ts @@ -0,0 +1,80 @@ +import { Transaction } from "@mysten/sui/transactions"; +import { Ed25519Keypair } from "@mysten/sui/keypairs/ed25519"; +import { getFullnodeUrl, SuiClient } from "@mysten/sui/client"; +import { decodeSuiPrivateKey } from "@mysten/sui/cryptography"; +import keyPairJson from "../keypair.json"; + +/** + * + * Global variables + * + * These variables are used throughout the exercise below. + * + */ +const { secretKey } = decodeSuiPrivateKey(keyPairJson.privateKey); +const keypair = Ed25519Keypair.fromSecretKey(secretKey); + +const PACKAGE_ID = `0x25dfcadb5927395b463a426e8d63425d654a6057affc368f4dc176e587f489a5`; +const TEST_BUCK_TYPE = `0x25dfcadb5927395b463a426e8d63425d654a6057affc368f4dc176e587f489a5::test_buck::TEST_BUCK`; +const VAULT_ID = `0x46aad790c2b0ffe7951cab440641ea6a08169aac9e8e843899fd0a2d15aaa0e1`; + +const rpcUrl = getFullnodeUrl("testnet"); +const suiClient = new SuiClient({ url: rpcUrl }); + +/** + * Scavenger Hunt: Exercise 3 + * + * In this exercise, you use Sui objects as inputs in a PTB to update the value of a shared object. + * + * When finished, run the following command in the scripts directory to test your solution: + * + * yarn scavenger-hunt + * + * RESOURCES: + * - https://sdk.mystenlabs.com/typescript/transaction-building/basics#transactions + */ +const main = async () => { + /** + * Task 1: + * + * Create a new Transaction instance from the @mysten/sui/transactions module. + */ + // TODO: Create a new Transaction instance here + /** + * Task 2: + * + * Create a new key using the `key::new` function. + */ + // TODO: Create a new key here by calling the `key::new` function + /** + * Task 3: + * + * Set the key code correctly using the `key::set_code` function. + */ + // TODO: Set the key code correctly here by calling the `key::set_code` function + /** + * Task 4: + * + * Use the key to withdraw the `Bucket USD` coin from the vault using the `vault::withdraw` function. + */ + // TODO: Use the key to withdraw the `Bucket USD` coin from the vault using the `vault::withdraw` function + /** + * Task 5: + * + * Transfer the `Bucket USD` coin to your account. + */ + // TODO: Transfer the `Bucket USD` coin to your account + /** + * Task 6: + * + * Sign and execute the transaction using the SuiClient instance created above. + * + * Print the result to the console. + * + * Resources: + * - Observing transaction results: https://sdk.mystenlabs.com/typescript/transaction-building/basics#observing-the-results-of-a-transaction + */ + // TODO: Sign and execute the transaction here +}; + +main(); diff --git a/scripts/yarn.lock b/scripts/yarn.lock index 054b0e6..1957b47 100644 --- a/scripts/yarn.lock +++ b/scripts/yarn.lock @@ -3,227 +3,209 @@ "@0no-co/graphql.web@^1.0.5": - version "1.0.8" - resolved "https://registry.yarnpkg.com/@0no-co/graphql.web/-/graphql.web-1.0.8.tgz#20682c7839b0b5b7728ad944a8602ca46d983e75" - integrity sha512-8BG6woLtDMvXB9Ajb/uE+Zr/U7y4qJ3upXi0JQHZmsKUJa7HjF/gFvmL2f3/mSmfZoQGRr9VoY97LCX2uaFMzA== + version "1.1.2" + resolved "https://registry.npmjs.org/@0no-co/graphql.web/-/graphql.web-1.1.2.tgz" + integrity sha512-N2NGsU5FLBhT8NZ+3l2YrzZSHITjNXNuDhC4iDiikv0IujaJ0Xc6xIxQZ/Ek3Cb+rgPjnLHYyJm11tInuJn+cw== "@0no-co/graphqlsp@^1.12.13": - version "1.12.13" - resolved "https://registry.yarnpkg.com/@0no-co/graphqlsp/-/graphqlsp-1.12.13.tgz#306769fb96a596171c3b152fb0529823b6c3c9c4" - integrity sha512-/C9yXft+mq+VdoniBgWvA+iK5X6cB50KKThg1je4bFIhhBNccLJlNbWFxOglXseKuisq+h5oIY4ELTVKs6GhRQ== + version "1.12.16" + resolved "https://registry.npmjs.org/@0no-co/graphqlsp/-/graphqlsp-1.12.16.tgz" + integrity sha512-B5pyYVH93Etv7xjT6IfB7QtMBdaaC07yjbhN6v8H7KgFStMkPvi+oWYBTibMFRMY89qwc9H8YixXg8SXDVgYWw== dependencies: "@gql.tada/internal" "^1.0.0" graphql "^15.5.0 || ^16.0.0 || ^17.0.0" "@cspotcode/source-map-support@^0.8.0": version "0.8.1" - resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1" + resolved "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz" integrity sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw== dependencies: "@jridgewell/trace-mapping" "0.3.9" -"@gql.tada/cli-utils@1.6.1": - version "1.6.1" - resolved "https://registry.yarnpkg.com/@gql.tada/cli-utils/-/cli-utils-1.6.1.tgz#96bf13da9bcd9e9d34333a1870c65eed8a700d24" - integrity sha512-ZfYa5+rbK51c6ociTUL66qW1lyB9dXoAKNZMEAp2pWgPp16qZVBwopUaYxSKq4BML9eSiv0ocoJ7H6VW51ud7w== +"@gql.tada/cli-utils@1.6.3": + version "1.6.3" + resolved "https://registry.npmjs.org/@gql.tada/cli-utils/-/cli-utils-1.6.3.tgz" + integrity sha512-jFFSY8OxYeBxdKi58UzeMXG1tdm4FVjXa8WHIi66Gzu9JWtCE6mqom3a8xkmSw+mVaybFW5EN2WXf1WztJVNyQ== dependencies: "@0no-co/graphqlsp" "^1.12.13" - "@gql.tada/internal" "1.0.7" + "@gql.tada/internal" "1.0.8" graphql "^15.5.0 || ^16.0.0 || ^17.0.0" -"@gql.tada/internal@1.0.7", "@gql.tada/internal@^1.0.0": - version "1.0.7" - resolved "https://registry.yarnpkg.com/@gql.tada/internal/-/internal-1.0.7.tgz#4fa478bbe58d88162f512d52866626fde0e1b439" - integrity sha512-mI/7l7If7YR4rBlgnkXihh1qxD7eO41o8nf5ZYjwYl4s6FGFQFZY1E1reV3AgRy8tDXbiuMz1bIVLpnxPXxKIQ== +"@gql.tada/internal@^1.0.0", "@gql.tada/internal@1.0.8": + version "1.0.8" + resolved "https://registry.npmjs.org/@gql.tada/internal/-/internal-1.0.8.tgz" + integrity sha512-XYdxJhtHC5WtZfdDqtKjcQ4d7R1s0d1rnlSs3OcBEUbYiPoJJfZU7tWsVXuv047Z6msvmr4ompJ7eLSK5Km57g== dependencies: "@0no-co/graphql.web" "^1.0.5" "@graphql-typed-document-node/core@^3.2.0": version "3.2.0" - resolved "https://registry.yarnpkg.com/@graphql-typed-document-node/core/-/core-3.2.0.tgz#5f3d96ec6b2354ad6d8a28bf216a1d97b5426861" + resolved "https://registry.npmjs.org/@graphql-typed-document-node/core/-/core-3.2.0.tgz" integrity sha512-mB9oAsNCm9aM3/SOv4YtBMqZbYj10R7dkq8byBqxGY/ncFwhf2oQzMV+LCRlWoDSEBJ3COiR1yeDvMtsoOsuFQ== "@jridgewell/resolve-uri@^3.0.3": version "3.1.2" - resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6" + resolved "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz" integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw== "@jridgewell/sourcemap-codec@^1.4.10": version "1.5.0" - resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz#3188bcb273a414b0d215fd22a58540b989b9409a" + resolved "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz" integrity sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ== "@jridgewell/trace-mapping@0.3.9": version "0.3.9" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz#6534fd5933a53ba7cbf3a17615e273a0d1273ff9" + resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz" integrity sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ== dependencies: "@jridgewell/resolve-uri" "^3.0.3" "@jridgewell/sourcemap-codec" "^1.4.10" -"@mysten/bcs@1.0.4": - version "1.0.4" - resolved "https://registry.yarnpkg.com/@mysten/bcs/-/bcs-1.0.4.tgz#c8998ee7cb92d9e59e2fae735b69abe49d8037cb" - integrity sha512-6JoQi59GN/dVEBCNq8Rj4uOR0niDrJqDx/2gNQWXANwJakHIGH0AMniHrXP41B2dF+mZ3HVmh9Hi3otiEVQTrQ== +"@mysten/bcs@1.6.0": + version "1.6.0" + resolved "https://registry.npmjs.org/@mysten/bcs/-/bcs-1.6.0.tgz" + integrity sha512-ydDRYdIkIFCpHCcPvAkMC91fVwumjzbTgjqds0KsphDQI3jUlH3jFG5lfYNTmV6V3pkhOiRk1fupLBcsQsiszg== dependencies: - bs58 "^6.0.0" + "@scure/base" "^1.2.4" "@mysten/sui@^1.8.0": - version "1.8.0" - resolved "https://registry.yarnpkg.com/@mysten/sui/-/sui-1.8.0.tgz#e5f2363e9263578cf5ac4cc27231120ca0de0980" - integrity sha512-iL7yztpePS/GWFZ7yiD/Pl7ciuOD2ySyogJZmLFu4WxZfiIcXJX+U/U+Egq9VHvELk8+m+Z1OvvPlNQfuowMIg== + version "1.26.1" + resolved "https://registry.npmjs.org/@mysten/sui/-/sui-1.26.1.tgz" + integrity sha512-bBVvn2wZKipAvuUkKzHwGhs1JiIM33+b97d0uIWg3T6dJH/n1nfnGrzkBQsMGpoBAFOIUnKQAZmDwT4qvJbKkg== dependencies: "@graphql-typed-document-node/core" "^3.2.0" - "@mysten/bcs" "1.0.4" - "@noble/curves" "^1.4.2" - "@noble/hashes" "^1.4.0" - "@scure/bip32" "^1.4.0" - "@scure/bip39" "^1.3.0" - "@suchipi/femver" "^1.0.0" - bech32 "^2.0.0" + "@mysten/bcs" "1.6.0" + "@noble/curves" "^1.8.1" + "@noble/hashes" "^1.7.1" + "@scure/base" "^1.2.4" + "@scure/bip32" "^1.6.2" + "@scure/bip39" "^1.5.4" gql.tada "^1.8.2" graphql "^16.9.0" - tweetnacl "^1.0.3" + poseidon-lite "^0.2.0" valibot "^0.36.0" -"@noble/curves@^1.4.2", "@noble/curves@~1.6.0": - version "1.6.0" - resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.6.0.tgz#be5296ebcd5a1730fccea4786d420f87abfeb40b" - integrity sha512-TlaHRXDehJuRNR9TfZDNQ45mMEd5dwUwmicsafcIX4SsNiqnCHKjE/1alYPd/lDRVhxdhUAlv8uEhMCI5zjIJQ== +"@noble/curves@^1.8.1", "@noble/curves@~1.8.1": + version "1.8.1" + resolved "https://registry.npmjs.org/@noble/curves/-/curves-1.8.1.tgz" + integrity sha512-warwspo+UYUPep0Q+vtdVB4Ugn8GGQj8iyB3gnRWsztmUHTI3S1nhdiWNsPUGL0vud7JlRRk1XEu7Lq1KGTnMQ== dependencies: - "@noble/hashes" "1.5.0" - -"@noble/hashes@1.5.0", "@noble/hashes@^1.4.0", "@noble/hashes@~1.5.0": - version "1.5.0" - resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.5.0.tgz#abadc5ca20332db2b1b2aa3e496e9af1213570b0" - integrity sha512-1j6kQFb7QRru7eKN3ZDvRcP13rugwdxZqCjbiAVZfIJwgj2A65UmT4TgARXGlXgnRkORLTDTrO19ZErt7+QXgA== - -"@scure/base@~1.1.7", "@scure/base@~1.1.8": - version "1.1.8" - resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.8.tgz#8f23646c352f020c83bca750a82789e246d42b50" - integrity sha512-6CyAclxj3Nb0XT7GHK6K4zK6k2xJm6E4Ft0Ohjt4WgegiFUHEtFb2CGzmPmGBwoIhrLsqNLYfLr04Y1GePrzZg== - -"@scure/bip32@^1.4.0": - version "1.5.0" - resolved "https://registry.yarnpkg.com/@scure/bip32/-/bip32-1.5.0.tgz#dd4a2e1b8a9da60e012e776d954c4186db6328e6" - integrity sha512-8EnFYkqEQdnkuGBVpCzKxyIwDCBLDVj3oiX0EKUFre/tOjL/Hqba1D6n/8RcmaQy4f95qQFrO2A8Sr6ybh4NRw== + "@noble/hashes" "1.7.1" + +"@noble/hashes@^1.7.1", "@noble/hashes@~1.7.1", "@noble/hashes@1.7.1": + version "1.7.1" + resolved "https://registry.npmjs.org/@noble/hashes/-/hashes-1.7.1.tgz" + integrity sha512-B8XBPsn4vT/KJAGqDzbwztd+6Yte3P4V7iafm24bxgDe/mlRuK6xmWPuCNrKt2vDafZ8MfJLlchDG/vYafQEjQ== + +"@scure/base@^1.2.4", "@scure/base@~1.2.2", "@scure/base@~1.2.4": + version "1.2.4" + resolved "https://registry.npmjs.org/@scure/base/-/base-1.2.4.tgz" + integrity sha512-5Yy9czTO47mqz+/J8GM6GIId4umdCk1wc1q8rKERQulIoc8VP9pzDcghv10Tl2E7R96ZUx/PhND3ESYUQX8NuQ== + +"@scure/bip32@^1.6.2": + version "1.6.2" + resolved "https://registry.npmjs.org/@scure/bip32/-/bip32-1.6.2.tgz" + integrity sha512-t96EPDMbtGgtb7onKKqxRLfE5g05k7uHnHRM2xdE6BP/ZmxaLtPek4J4KfVn/90IQNrU1IOAqMgiDtUdtbe3nw== dependencies: - "@noble/curves" "~1.6.0" - "@noble/hashes" "~1.5.0" - "@scure/base" "~1.1.7" - -"@scure/bip39@^1.3.0": - version "1.4.0" - resolved "https://registry.yarnpkg.com/@scure/bip39/-/bip39-1.4.0.tgz#664d4f851564e2e1d4bffa0339f9546ea55960a6" - integrity sha512-BEEm6p8IueV/ZTfQLp/0vhw4NPnT9oWf5+28nvmeUICjP99f4vr2d+qc7AVGDDtwRep6ifR43Yed9ERVmiITzw== + "@noble/curves" "~1.8.1" + "@noble/hashes" "~1.7.1" + "@scure/base" "~1.2.2" + +"@scure/bip39@^1.5.4": + version "1.5.4" + resolved "https://registry.npmjs.org/@scure/bip39/-/bip39-1.5.4.tgz" + integrity sha512-TFM4ni0vKvCfBpohoh+/lY05i9gRbSwXWngAsF4CABQxoaOHijxuaZ2R6cStDQ5CHtHO9aGJTr4ksVJASRRyMA== dependencies: - "@noble/hashes" "~1.5.0" - "@scure/base" "~1.1.8" - -"@suchipi/femver@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@suchipi/femver/-/femver-1.0.0.tgz#4909dcc069695e07bd23a64c4bfe411d11d9692f" - integrity sha512-bprE8+K5V+DPX7q2e2K57ImqNBdfGHDIWaGI5xHxZoxbKOuQZn4wzPiUxOAHnsUr3w3xHrWXwN7gnG/iIuEMIg== + "@noble/hashes" "~1.7.1" + "@scure/base" "~1.2.4" "@tsconfig/node10@^1.0.7": version "1.0.11" - resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.11.tgz#6ee46400685f130e278128c7b38b7e031ff5b2f2" + resolved "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz" integrity sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw== "@tsconfig/node12@^1.0.7": version "1.0.11" - resolved "https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.11.tgz#ee3def1f27d9ed66dac6e46a295cffb0152e058d" + resolved "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz" integrity sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag== "@tsconfig/node14@^1.0.0": version "1.0.3" - resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.3.tgz#e4386316284f00b98435bf40f72f75a09dabf6c1" + resolved "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz" integrity sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow== "@tsconfig/node16@^1.0.2": version "1.0.4" - resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.4.tgz#0b92dcc0cc1c81f6f306a381f28e31b1a56536e9" + resolved "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz" integrity sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA== -"@types/node@^22.5.2": - version "22.5.2" - resolved "https://registry.yarnpkg.com/@types/node/-/node-22.5.2.tgz#e42344429702e69e28c839a7e16a8262a8086793" - integrity sha512-acJsPTEqYqulZS/Yp/S3GgeE6GZ0qYODUR8aVr/DkhHQ8l9nd4j5x1/ZJy9/gHrRlFMqkO6i0I3E27Alu4jjPg== +"@types/node@*", "@types/node@^22.5.2": + version "22.14.0" + resolved "https://registry.npmjs.org/@types/node/-/node-22.14.0.tgz" + integrity sha512-Kmpl+z84ILoG+3T/zQFyAJsU6EPTmOCj8/2+83fSN6djd6I4o7uOuGIH6vq3PrjY5BGitSbFuMN18j3iknubbA== dependencies: - undici-types "~6.19.2" + undici-types "~6.21.0" acorn-walk@^8.1.1: - version "8.3.3" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.3.tgz#9caeac29eefaa0c41e3d4c65137de4d6f34df43e" - integrity sha512-MxXdReSRhGO7VlFe1bRG/oI7/mdLV9B9JJT0N8vZOhF7gFRR5l3M8W9G8JxmKV+JC5mGqJ0QvqfSOLsCPa4nUw== + version "8.3.4" + resolved "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz" + integrity sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g== dependencies: acorn "^8.11.0" acorn@^8.11.0, acorn@^8.4.1: - version "8.12.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.12.1.tgz#71616bdccbe25e27a54439e0046e89ca76df2248" - integrity sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg== + version "8.14.1" + resolved "https://registry.npmjs.org/acorn/-/acorn-8.14.1.tgz" + integrity sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg== arg@^4.1.0: version "4.1.3" - resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" + resolved "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz" integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== -base-x@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/base-x/-/base-x-5.0.0.tgz#6d835ceae379130e1a4cb846a70ac4746f28ea9b" - integrity sha512-sMW3VGSX1QWVFA6l8U62MLKz29rRfpTlYdCqLdpLo1/Yd4zZwSbnUaDfciIAowAqvq7YFnWq9hrhdg1KYgc1lQ== - -bech32@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/bech32/-/bech32-2.0.0.tgz#078d3686535075c8c79709f054b1b226a133b355" - integrity sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg== - -bs58@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/bs58/-/bs58-6.0.0.tgz#a2cda0130558535dd281a2f8697df79caaf425d8" - integrity sha512-PD0wEnEYg6ijszw/u8s+iI3H17cTymlrwkKhDhPZq+Sokl3AU4htyBFTjAeNAlCCmg0f53g6ih3jATyCKftTfw== - dependencies: - base-x "^5.0.0" - create-require@^1.1.0: version "1.1.1" - resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" + resolved "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz" integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== diff@^4.0.1: version "4.0.2" - resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" + resolved "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz" integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== dotenv@^16.4.5: - version "16.4.5" - resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.4.5.tgz#cdd3b3b604cb327e286b4762e13502f717cb099f" - integrity sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg== + version "16.4.7" + resolved "https://registry.npmjs.org/dotenv/-/dotenv-16.4.7.tgz" + integrity sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ== gql.tada@^1.8.2: - version "1.8.6" - resolved "https://registry.yarnpkg.com/gql.tada/-/gql.tada-1.8.6.tgz#4466cd818490edf67890b58f55a5fb617fe80ea1" - integrity sha512-XyN/BkZVEJ5kxgK8oDjHluLwXBLdlUO6P4+u/AmYfknFDj5M5AnaZMm3pntMDO9tpaaEczy9pfXDEJ6tYuTlyA== + version "1.8.10" + resolved "https://registry.npmjs.org/gql.tada/-/gql.tada-1.8.10.tgz" + integrity sha512-FrvSxgz838FYVPgZHGOSgbpOjhR+yq44rCzww3oOPJYi0OvBJjAgCiP6LEokZIYND2fUTXzQAyLgcvgw1yNP5A== dependencies: "@0no-co/graphql.web" "^1.0.5" "@0no-co/graphqlsp" "^1.12.13" - "@gql.tada/cli-utils" "1.6.1" - "@gql.tada/internal" "1.0.7" + "@gql.tada/cli-utils" "1.6.3" + "@gql.tada/internal" "1.0.8" -"graphql@^15.5.0 || ^16.0.0 || ^17.0.0", graphql@^16.9.0: - version "16.9.0" - resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.9.0.tgz#1c310e63f16a49ce1fbb230bd0a000e99f6f115f" - integrity sha512-GGTKBX4SD7Wdb8mqeDLni2oaRGYQWjWHGKPQ24ZMnUtKfcsVoiv4uX8+LJr1K6U5VW2Lu1BwJnj7uiori0YtRw== +"graphql@^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0", "graphql@^14.0.0 || ^15.0.0 || ^16.0.0", "graphql@^15.5.0 || ^16.0.0 || ^17.0.0", graphql@^16.9.0: + version "16.10.0" + resolved "https://registry.npmjs.org/graphql/-/graphql-16.10.0.tgz" + integrity sha512-AjqGKbDGUFRKIRCP9tCKiIGHyriz2oHEbPIbEtcSLSs4YjReZOIPQQWek4+6hjw62H9QShXHyaGivGiYVLeYFQ== make-error@^1.1.1: version "1.3.6" - resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" + resolved "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz" integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== +poseidon-lite@^0.2.0: + version "0.2.1" + resolved "https://registry.npmjs.org/poseidon-lite/-/poseidon-lite-0.2.1.tgz" + integrity sha512-xIr+G6HeYfOhCuswdqcFpSX47SPhm0EpisWJ6h7fHlWwaVIvH3dLnejpatrtw6Xc6HaLrpq05y7VRfvDmDGIog== + ts-node@^10.9.2: version "10.9.2" - resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.2.tgz#70f021c9e185bccdca820e26dc413805c101c71f" + resolved "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz" integrity sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ== dependencies: "@cspotcode/source-map-support" "^0.8.0" @@ -240,32 +222,27 @@ ts-node@^10.9.2: v8-compile-cache-lib "^3.0.1" yn "3.1.1" -tweetnacl@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-1.0.3.tgz#ac0af71680458d8a6378d0d0d050ab1407d35596" - integrity sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw== - -typescript@^5.5.4: - version "5.5.4" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.5.4.tgz#d9852d6c82bad2d2eda4fd74a5762a8f5909e9ba" - integrity sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q== +typescript@^5.0.0, typescript@^5.5.4, typescript@>=2.7: + version "5.8.2" + resolved "https://registry.npmjs.org/typescript/-/typescript-5.8.2.tgz" + integrity sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ== -undici-types@~6.19.2: - version "6.19.8" - resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.19.8.tgz#35111c9d1437ab83a7cdc0abae2f26d88eda0a02" - integrity sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw== +undici-types@~6.21.0: + version "6.21.0" + resolved "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz" + integrity sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ== v8-compile-cache-lib@^3.0.1: version "3.0.1" - resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" + resolved "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz" integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== valibot@^0.36.0: version "0.36.0" - resolved "https://registry.yarnpkg.com/valibot/-/valibot-0.36.0.tgz#74e746694b1abcc1879e4393db551d4ce1e10578" + resolved "https://registry.npmjs.org/valibot/-/valibot-0.36.0.tgz" integrity sha512-CjF1XN4sUce8sBK9TixrDqFM7RwNkuXdJu174/AwmQUB62QbCQADg5lLe8ldBalFgtj1uKj+pKwDJiNo4Mn+eQ== yn@3.1.1: version "3.1.1" - resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" + resolved "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz" integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==