diff --git a/Cargo.lock b/Cargo.lock index b6f2f7b..d9bc196 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -234,7 +234,7 @@ dependencies = [ "derivative", "digest 0.10.7", "itertools 0.10.5", - "num-bigint 0.4.5", + "num-bigint 0.4.6", "num-traits", "paste", "rustc_version", @@ -257,7 +257,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" dependencies = [ - "num-bigint 0.4.5", + "num-bigint 0.4.6", "num-traits", "proc-macro2", "quote", @@ -286,7 +286,7 @@ dependencies = [ "ark-serialize-derive", "ark-std", "digest 0.10.7", - "num-bigint 0.4.5", + "num-bigint 0.4.6", ] [[package]] @@ -491,9 +491,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" dependencies = [ "serde", ] @@ -726,9 +726,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.100" +version = "1.0.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c891175c3fb232128f48de6590095e59198bbeb8620c310be349bfc3afd12c7b" +checksum = "ac367972e516d45567c7eafc73d24e1c193dcf200a8d94e9db7b3d38b349572d" dependencies = [ "jobserver", "libc", @@ -1150,9 +1150,9 @@ dependencies = [ "solana-program-test", "solana-sdk", "solana-zk-token-sdk", - "spl-associated-token-account", - "spl-token-2022", - "spl-token-metadata-interface", + "spl-associated-token-account 4.0.0", + "spl-token-2022 4.0.0", + "spl-token-metadata-interface 0.4.0", "thiserror", ] @@ -1168,8 +1168,8 @@ dependencies = [ "libsecp256k1 0.7.1", "solana-client", "solana-sdk", - "spl-associated-token-account", - "spl-token-2022", + "spl-associated-token-account 4.0.0", + "spl-token-2022 4.0.0", ] [[package]] @@ -1185,6 +1185,8 @@ dependencies = [ "solana-program", "solana-program-test", "solana-sdk", + "spl-associated-token-account 4.0.0", + "spl-token-2022 4.0.0", "thiserror", ] @@ -1197,7 +1199,7 @@ dependencies = [ "num-traits", "shank", "solana-program", - "spl-token-2022", + "spl-token-2022 4.0.0", "thiserror", ] @@ -1210,7 +1212,7 @@ dependencies = [ "asn1-rs", "displaydoc", "nom", - "num-bigint 0.4.5", + "num-bigint 0.4.6", "num-traits", "rusticata-macros", ] @@ -1384,9 +1386,9 @@ dependencies = [ [[package]] name = "either" -version = "1.12.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dca9240753cf90908d7e4aac30f630662b02aebaa1b58a3cadabdb23385b58b" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "encode_unicode" @@ -1429,7 +1431,7 @@ version = "3.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bf1fa3f06bbff1ea5b1a9c7b14aa992a39657db60a2759457328d7e058f49ee" dependencies = [ - "num-bigint 0.4.5", + "num-bigint 0.4.6", "num-traits", "proc-macro2", "quote", @@ -2232,7 +2234,7 @@ checksum = "3c9a85a9752c549ceb7578064b4ed891179d20acd85f27318573b64d2d7ee7ee" dependencies = [ "ark-bn254", "ark-ff", - "num-bigint 0.4.5", + "num-bigint 0.4.6", "thiserror", ] @@ -2254,9 +2256,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.21" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "lz4" @@ -2416,7 +2418,7 @@ version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "cfg-if", "cfg_aliases 0.1.1", "libc", @@ -2466,9 +2468,9 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c165a9ab64cf766f73521c0dd2cfdff64f488b8f0b3e621face3462d3db536d7" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" dependencies = [ "num-integer", "num-traits", @@ -3132,7 +3134,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c82cf8cff14456045f55ec4241383baeff27af886adb72ffb2162f99911de0fd" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", ] [[package]] @@ -3310,7 +3312,7 @@ version = "0.38.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "errno", "libc", "linux-raw-sys", @@ -3432,7 +3434,7 @@ version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "core-foundation", "core-foundation-sys", "libc", @@ -3475,9 +3477,9 @@ dependencies = [ [[package]] name = "serde_bytes" -version = "0.11.14" +version = "0.11.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b8497c313fd43ab992087548117643f6fcd935cbf36f176ffda0aacf9591734" +checksum = "387cc504cb06bb40a96c8e04e951fe01854cf6bc921053c954e4a606d9675c6a" dependencies = [ "serde", ] @@ -3495,9 +3497,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.117" +version = "1.0.118" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" +checksum = "d947f6b3163d8857ea16c4fa0dd4840d52f3041039a85decd46867eb1abef2e4" dependencies = [ "itoa", "ryu", @@ -3744,9 +3746,9 @@ dependencies = [ [[package]] name = "solana-account-decoder" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c55e6d9bc44f698bceca5c6bb9988bee85a2a7c58792a6ee2c15f844fad6ea3f" +checksum = "c6ad8e8ea9c15fef1ee50b65beb61c5a298d97600d63721c834658a5e7fb6564" dependencies = [ "Inflector", "base64 0.22.1", @@ -3759,19 +3761,19 @@ dependencies = [ "serde_json", "solana-config-program", "solana-sdk", - "spl-token", - "spl-token-2022", - "spl-token-group-interface", - "spl-token-metadata-interface", + "spl-token 4.0.1", + "spl-token-2022 3.0.2", + "spl-token-group-interface 0.2.3", + "spl-token-metadata-interface 0.3.3", "thiserror", "zstd", ] [[package]] name = "solana-accounts-db" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba0a38ecea8052d211c3c0c2c599a0a699a95e3542ed4be1e2035a6a27df5b87" +checksum = "6b00649af033269e2006c784e72f07d2fc40cd8dd9e49fa86f92c588cd5f1580" dependencies = [ "bincode", "blake3", @@ -3814,9 +3816,9 @@ dependencies = [ [[package]] name = "solana-address-lookup-table-program" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e50e01104280942ed42f78ab56661ee83bb338f2060232883a3ef48a84e05cfa" +checksum = "5cc56805c3d5e76d988ef2fd25d1138d2dbdffceef655c0e9e0bfbc32a53a9f1" dependencies = [ "bincode", "bytemuck", @@ -3832,9 +3834,9 @@ dependencies = [ [[package]] name = "solana-banks-client" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbe7739a588a28dccbd473449886b169cdbd06a2bda20156a1052aefa85139db" +checksum = "3e84e1dff8344acfa3dd98d59b0b256166c160ee816d7e9be90ba402870c74e3" dependencies = [ "borsh 1.5.1", "futures", @@ -3849,9 +3851,9 @@ dependencies = [ [[package]] name = "solana-banks-interface" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97ecfdb1fb6954f0574ddf26218e01b27ffc2845ef8397ddf5e094cea35c6fb8" +checksum = "63a46a278e7424b839876eb8b46f8558a2a9c0b0db167b55383fac197803a960" dependencies = [ "serde", "serde_derive", @@ -3861,9 +3863,9 @@ dependencies = [ [[package]] name = "solana-banks-server" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e8baa7a554ecb55943cd1a5bbe65ba2fd8e5dacf65257feae221254b3b352d9" +checksum = "5bb49aeaf0aa57df22cebc6803f584d1f89279f460cce94eefc03eef462e2189" dependencies = [ "bincode", "crossbeam-channel", @@ -3881,9 +3883,9 @@ dependencies = [ [[package]] name = "solana-bpf-loader-program" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "197674d85cee9aaf68b56dcf5c381eaebde0f2ef5fa57eb04873a6f7299e4b8f" +checksum = "3c6b77cfaed8bcef0a4b80dd18880974127cd0440919e1c8e1a66305d9886b03" dependencies = [ "bincode", "byteorder", @@ -3903,9 +3905,9 @@ dependencies = [ [[package]] name = "solana-bucket-map" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65ecb5bdb9c1d26235729cb7cd16ee1e45cde4f624f4363d2c3ceb8325cae371" +checksum = "65c7c4dd872c9797eff7d34587af4369012c9bd521c7e6ad68ac8e97e4c6343b" dependencies = [ "bv", "bytemuck", @@ -3922,9 +3924,9 @@ dependencies = [ [[package]] name = "solana-clap-utils" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bcaf1dad033e4559a82eba0e20af72d4c834be606a3b6b8c324b3916a2982c0" +checksum = "09e6f9acdd27a5ae888f7f3e1820f5b50bea4d74d60eb75d96e5f82fea58c8cc" dependencies = [ "chrono", "clap 2.34.0", @@ -3939,9 +3941,9 @@ dependencies = [ [[package]] name = "solana-client" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5fd67c44dada5a711cef4e6e5925598bacf077be91e1d8284a5b2688f94b156" +checksum = "e4d5c1fab1945962c380e1be11a6081e68ccabafe3bafead2c19393a132887ec" dependencies = [ "async-trait", "bincode", @@ -3972,9 +3974,9 @@ dependencies = [ [[package]] name = "solana-compute-budget" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "391b6150c94918fba476e3089f9bcad45893b9eb07909319165ca28615e336d9" +checksum = "d9c82354d659776e22807b3dfa6a1eb23dbf9f9a1a72b9a99ecb6a56f9a0e832" dependencies = [ "rustc_version", "solana-sdk", @@ -3982,9 +3984,9 @@ dependencies = [ [[package]] name = "solana-compute-budget-program" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bb4d28f584b60c7836f661b29c717e87e4f30623783df230a418824928512c7" +checksum = "41155db502f7ca5e981cc550f491bbe9a4cf85c717f7e3f569d2f57593fd7a8a" dependencies = [ "solana-program-runtime", "solana-sdk", @@ -3992,9 +3994,9 @@ dependencies = [ [[package]] name = "solana-config-program" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e110dda46d91a3a0faa8e781bfef6f557d1c7b2367a94413d8c02b2b46c5aadf" +checksum = "57b94efabb36a5f380632c6c7a3cd44b515c6ae4637464bb0f40d69581c1365d" dependencies = [ "bincode", "chrono", @@ -4006,9 +4008,9 @@ dependencies = [ [[package]] name = "solana-connection-cache" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1521aca8e0f2390e5536b3d6de0742a931a159467c2c4b8750919d6d2224743e" +checksum = "c020b32972894093ca5dacb8f67e649a6148cd7d7bf4c5ff61c5f4745cfb6b0a" dependencies = [ "async-trait", "bincode", @@ -4027,9 +4029,9 @@ dependencies = [ [[package]] name = "solana-cost-model" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e464d6d96864cd2e0711ae378d2201b3519ecd3d028807f9d336136b79e10ea9" +checksum = "db46334f743b8da3539d47657f951fb8a04922c3aef46d6866066e14efe7d37c" dependencies = [ "ahash", "lazy_static", @@ -4050,9 +4052,9 @@ dependencies = [ [[package]] name = "solana-curve25519" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb57042cc8e094a82d556db45b9a4dc28484e4241534c5cded444c9f5038cb48" +checksum = "c9c4692f4eeb32f6b1b968250f3301927590debb056841f1134f6d098d3c0ec5" dependencies = [ "bytemuck", "bytemuck_derive", @@ -4063,9 +4065,9 @@ dependencies = [ [[package]] name = "solana-inline-spl" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e1eb51b074fb17bcc71260cc9ed4298996f10a92db070a84700b9bf0a7c0b79" +checksum = "b5f6170e189fc780aea44b4dfca1fe63f2a0578d376afcb779bdd0514a6df385" dependencies = [ "bytemuck", "rustc_version", @@ -4074,9 +4076,9 @@ dependencies = [ [[package]] name = "solana-loader-v4-program" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da6f5cc41278ec9ea09f03f3c5186dc1bd189598fc3be4c64afed189c6861f7c" +checksum = "4287af733bf7ddd19a1596080d5fd1962a8ffd52389e38edb2f458c860323c60" dependencies = [ "log", "solana-compute-budget", @@ -4089,9 +4091,9 @@ dependencies = [ [[package]] name = "solana-logger" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a35060affcb1165707842f034d7eaa21ba84bde56250fcc9c93f993cee75fa2" +checksum = "6e7910af7fc8b30676c4a3e2f604ffd1aa75a4305fc76b66a3b1779fa8d532b0" dependencies = [ "env_logger", "lazy_static", @@ -4100,9 +4102,9 @@ dependencies = [ [[package]] name = "solana-measure" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c9c56745b38f666c12270858056e4b842e2f0ab65a6c8f7365f3b8b203f5384" +checksum = "7e6d5d143e70170098a614d96b5038c5820dce6ea1de636df47eee3f3ad1dfb8" dependencies = [ "log", "solana-sdk", @@ -4110,9 +4112,9 @@ dependencies = [ [[package]] name = "solana-metrics" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ea2877e1139bcf1c7f097d25a464b5e5b09bf6a2c29cd7d2df5b83d162558f4" +checksum = "0a0bfb194f5f80eada89b9169a2bbf22a238fb3c733b19f1dae08e6054fdd036" dependencies = [ "crossbeam-channel", "gethostname", @@ -4125,9 +4127,9 @@ dependencies = [ [[package]] name = "solana-net-utils" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b48732f8c78e1c7ae061728ed3a28c6dcccfc47d682ffb0498078c176599b893" +checksum = "a1e5caadd2e9be6ed83b2f219d731e4407dc1a6368103ac1bfc709d63de32a18" dependencies = [ "bincode", "clap 3.2.25", @@ -4154,9 +4156,9 @@ checksum = "8b8a731ed60e89177c8a7ab05fe0f1511cedd3e70e773f288f9de33a9cfdc21e" [[package]] name = "solana-perf" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12093f39b8e6f6e05209800a46e69ce4b8189240fd2b24a7524b2afc5d214560" +checksum = "ac09983091108c30e55d672e8a0690a1f2a952131aafa2e0e503fb4eb97b0f91" dependencies = [ "ahash", "bincode", @@ -4181,9 +4183,9 @@ dependencies = [ [[package]] name = "solana-poseidon" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b909e1b48a82394581d5b9d0e2020405fb2e0aadd0722151e43eb6ec8d02749" +checksum = "1e15c4b2704f84109ad8fb1b4b06d2a412e53344ed78926070c80bd6df758183" dependencies = [ "ark-bn254", "light-poseidon", @@ -4192,9 +4194,9 @@ dependencies = [ [[package]] name = "solana-program" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e40f0663c34e87e1aef55bec7a46c79ffc6d39355754af28297fdad81b09bf7a" +checksum = "9164e89e655a4689de62f0c8066f4a9496e16e5d38ca27c821fc812bac79fa34" dependencies = [ "ark-bn254", "ark-ec", @@ -4202,7 +4204,7 @@ dependencies = [ "ark-serialize", "base64 0.22.1", "bincode", - "bitflags 2.5.0", + "bitflags 2.6.0", "blake3", "borsh 0.10.3", "borsh 1.5.1", @@ -4219,7 +4221,7 @@ dependencies = [ "libsecp256k1 0.6.0", "log", "memoffset", - "num-bigint 0.4.5", + "num-bigint 0.4.6", "num-derive", "num-traits", "parking_lot", @@ -4238,9 +4240,9 @@ dependencies = [ [[package]] name = "solana-program-runtime" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25de9a89f5c6a0ad2082499bfd24645bc6a7d740f277e907ccb72c367f65da7f" +checksum = "7cf73f57b6bee272608c6835369cce8a3d9da82436c4b072eaf04d5623510cf8" dependencies = [ "base64 0.22.1", "bincode", @@ -4267,9 +4269,9 @@ dependencies = [ [[package]] name = "solana-program-test" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04e1a1af7df706972778defcc2ebc7e367b68ba2ce79bd113eb86a7f0d730acb" +checksum = "9d7bcef316c2d497315d08fada47765a12541760f054b51308dd7b811489d2af" dependencies = [ "assert_matches", "async-trait", @@ -4299,9 +4301,9 @@ dependencies = [ [[package]] name = "solana-pubsub-client" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81c7b08722d6a7664d52df552316bf34fd7ad6c08bb11238019adf374bd2715f" +checksum = "f572dae6680b15f42ee53505c0384a9f5be06424e6a62364449efb6f23cbde0b" dependencies = [ "crossbeam-channel", "futures-util", @@ -4324,9 +4326,9 @@ dependencies = [ [[package]] name = "solana-quic-client" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c460d20a73cdf6506493d28d384168cb51d88d6f3bab11d1fc3386701184aa" +checksum = "2b773efed5939b2c7c2b9490f529f5dc3f5f940dbac5b2f514050fe871333ce1" dependencies = [ "async-mutex", "async-trait", @@ -4350,9 +4352,9 @@ dependencies = [ [[package]] name = "solana-rayon-threadlimit" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e0b49496fc9f4b2cd7c4a6e76528d5f5dbf02b358063c1ce1902fc3a5544662" +checksum = "ccedf79026e11772482536696603a67eda3d07b497e1ec9eed6692e466a6bf37" dependencies = [ "lazy_static", "num_cpus", @@ -4360,9 +4362,9 @@ dependencies = [ [[package]] name = "solana-remote-wallet" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0d0b85d73b120a74e6b76e02c10d958cf6f785934dd3255d326ab160d20f35f" +checksum = "9c7c9dd69628898c5235810b2cdddb26f8c5a3176f6567971a72aac9538f2d32" dependencies = [ "console", "dialoguer", @@ -4379,9 +4381,9 @@ dependencies = [ [[package]] name = "solana-rpc-client" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c82d9271f6f77b7bac38ce441cd12861226ce169fa80bcaa2577c5f993ed114" +checksum = "5845db742a0bf27662c592750f8029fa25f0d1c2700798e9bdf8a664744d6df4" dependencies = [ "async-trait", "base64 0.22.1", @@ -4406,9 +4408,9 @@ dependencies = [ [[package]] name = "solana-rpc-client-api" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7854ed73e8fb4d7659154bb56936bae57a7fcddb72c985f90addbbd848e7a6b4" +checksum = "402af4866a7f9b96ffe45792932d43585504b7a92d0b75ae23a9a14fd1b1820f" dependencies = [ "anyhow", "base64 0.22.1", @@ -4430,9 +4432,9 @@ dependencies = [ [[package]] name = "solana-rpc-client-nonce-utils" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5b64e712e13e6e5227fc560ea3aeea8c5c9a6162fcbc81b27e29b37f83ae716" +checksum = "d75a1bb67541534c31b043e4fe5bfd3f4aaa04dca48e1c1e06b24c3e34f64f47" dependencies = [ "clap 2.34.0", "solana-clap-utils", @@ -4443,9 +4445,9 @@ dependencies = [ [[package]] name = "solana-runtime" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "517b7c8c733806cff9b71b42f17b910c3cc07262f3923d87994f4bdd690d4fa1" +checksum = "e6e2eeefe9c24d9021e7fc7c191d63ab7610bde4a4eabbb1fb0f3e041bf78399" dependencies = [ "aquamarine", "arrayref", @@ -4523,12 +4525,12 @@ dependencies = [ [[package]] name = "solana-sdk" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69f97d69fad09b8ae20b1f36ea76b57d10475b2c33d745c809274186d5a057d1" +checksum = "5f079f55dc33a4be11ddbc8b57c92ba4bb222a317c99c24b86a5190e354c1b49" dependencies = [ "bincode", - "bitflags 2.5.0", + "bitflags 2.6.0", "borsh 1.5.1", "bs58", "bytemuck", @@ -4572,9 +4574,9 @@ dependencies = [ [[package]] name = "solana-sdk-macro" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ebe207139d12a438f87f353792066340c5cb31b124561715b7edfd743456424" +checksum = "b34e8a090f0572191388412636f7682370ad944894dd2d20a8e616159fd8e1b6" dependencies = [ "bs58", "proc-macro2", @@ -4591,9 +4593,9 @@ checksum = "468aa43b7edb1f9b7b7b686d5c3aeb6630dc1708e86e31343499dd5c4d775183" [[package]] name = "solana-send-transaction-service" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fe2d69ffdf1483d74d4f17fcf9343bb636e45ef80c8b73287419c4a94242883" +checksum = "73080903b1df6971cc7d486488b7f990fa9bcf2e2d9d1dbbabac35864d804088" dependencies = [ "crossbeam-channel", "log", @@ -4607,9 +4609,9 @@ dependencies = [ [[package]] name = "solana-stake-program" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ee8d93ae4d7718df355eea9b40a1961ed4abb9ff239a1d9938e34cd6dc42eb6" +checksum = "02588aee6372c3e98a4d765efab6b98ea515e5ed51c1336ecc4e72e5cdf4ac75" dependencies = [ "bincode", "log", @@ -4623,9 +4625,9 @@ dependencies = [ [[package]] name = "solana-streamer" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efb2023bd1fff9d3f86331a5471c229dd166ba99405e3f1697a8ee83e909d92f" +checksum = "0be38cba86a24f96a4de90ff55d013e15e12e80bedb1cc5cac3f588a6d5e17ed" dependencies = [ "async-channel", "bytes", @@ -4657,9 +4659,9 @@ dependencies = [ [[package]] name = "solana-svm" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09bbef83e5f51a96574bf3c3df4949d1f74c004d399fa22be2af21f7115e4228" +checksum = "a923a2aacf962c0906cc5f7f39fa5e121543bb155b7c974ffdf6d7f0a39aec22" dependencies = [ "itertools 0.12.1", "log", @@ -4683,9 +4685,9 @@ dependencies = [ [[package]] name = "solana-system-program" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78a7b77af664c8d2ed23b8da80b7b6980e2a34825be830bc477beae8c4f8868e" +checksum = "075ab1fbbd7bdab68ea5761fca7a4a27278139db82b5bae999230ce340be03c5" dependencies = [ "bincode", "log", @@ -4698,9 +4700,9 @@ dependencies = [ [[package]] name = "solana-thin-client" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b34fe0c37051132d2f2e5cdffc1b1fdfc49831d578c7d4a9ddef242c27c78850" +checksum = "ace093fb66a27045b9026bb66273eea68fa93de6f9911caa6deb724c6ce6ef27" dependencies = [ "bincode", "log", @@ -4713,9 +4715,9 @@ dependencies = [ [[package]] name = "solana-tpu-client" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96465b880d0d8d04ec486bb8c8b962cae492aa347410699bdfac39def40d83a5" +checksum = "ee3f11bceb7cd61a607cbe45d76ac768106bfc6ca95ee4d0eaf9a9cd95de24c4" dependencies = [ "async-trait", "bincode", @@ -4737,9 +4739,9 @@ dependencies = [ [[package]] name = "solana-transaction-metrics-tracker" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72fa91e537d9cc848ef0e350234598cbd4b2e22fe522667ee856ab7dbe2cdfb8" +checksum = "d6ae0fea8d585c06692eaf09f2a042d5691a77016b7ea2eb7fde71eb75319bd0" dependencies = [ "Inflector", "base64 0.22.1", @@ -4753,9 +4755,9 @@ dependencies = [ [[package]] name = "solana-transaction-status" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a4d19dc5e2aa23e4f5db0e1d7e2ba5e4bba657480434b17e0dee89b2553a862" +checksum = "f91a8938f050c4e1db66ca95c7476d934e1d3ef0a6f78a212276cb6cd01cf8e5" dependencies = [ "Inflector", "base64 0.22.1", @@ -4769,20 +4771,20 @@ dependencies = [ "serde_json", "solana-account-decoder", "solana-sdk", - "spl-associated-token-account", - "spl-memo", - "spl-token", - "spl-token-2022", - "spl-token-group-interface", - "spl-token-metadata-interface", + "spl-associated-token-account 3.0.2", + "spl-memo 4.0.1", + "spl-token 4.0.1", + "spl-token-2022 3.0.2", + "spl-token-group-interface 0.2.3", + "spl-token-metadata-interface 0.3.3", "thiserror", ] [[package]] name = "solana-type-overrides" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7c7d6ff1f04c1e88a0e8e6b8e7120b1b2cb4bce20174073d525eaf9c0ba8e52" +checksum = "37a5a6db71f2b1d264e8b8d747ee0f43dc9ff41c5ca51647ed290bab4dd15f5c" dependencies = [ "lazy_static", "rand 0.8.5", @@ -4790,9 +4792,9 @@ dependencies = [ [[package]] name = "solana-udp-client" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31db6a2a087d8e7ed611b63da782b1a92de52d3ce5be459a2d2a97f9e6d084ec" +checksum = "a729615d5dfd1097dd1cbbd39c62d0e701b2efc20d43943f926c2dc6ed1f95a7" dependencies = [ "async-trait", "solana-connection-cache", @@ -4805,9 +4807,9 @@ dependencies = [ [[package]] name = "solana-version" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fffd50de0782f9dddbd4d38fde54ad54fc9c1e45e085be8a0b72b4c31dbb7b40" +checksum = "cc214c8fb792d7b01a014a7f1b5ebe1efc551c6ffa554dfa55107d75b7657b5b" dependencies = [ "log", "rustc_version", @@ -4819,9 +4821,9 @@ dependencies = [ [[package]] name = "solana-vote" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6030bbe862fc9e0784a94a125aa9c7313e8ce413d09be46738619cc270db49ae" +checksum = "b4f925206879ceca8dff96798d3ee54a827e1ec7afbc036c438cb386bc817881" dependencies = [ "itertools 0.12.1", "log", @@ -4834,9 +4836,9 @@ dependencies = [ [[package]] name = "solana-vote-program" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f39358335b843594a7500c55215368959f0ff441556c452de3a5e78bd1c582d" +checksum = "e80043ab279573f5f804c8e650956dd95587a12a38694a78e38c2e317bb635c1" dependencies = [ "bincode", "log", @@ -4854,9 +4856,9 @@ dependencies = [ [[package]] name = "solana-zk-elgamal-proof-program" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed28fed1b354551600978348528c3e4096efbc1c45dd28cd42bb8db60a42e39d" +checksum = "e08e4c68f1cd26c0d0bedeb4b7f216f0cfa92d8931949bcc7223275e082c3ae4" dependencies = [ "bytemuck", "num-derive", @@ -4868,9 +4870,9 @@ dependencies = [ [[package]] name = "solana-zk-sdk" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0201f503614a75a390e083f2b781b6730ecbeb605c9c99830c83ae0c92a18cd" +checksum = "93ba871fd3658717b0d97d58f847a3668bb44e39b68e62432b6c231b2342b188" dependencies = [ "aes-gcm-siv", "base64 0.22.1", @@ -4897,9 +4899,9 @@ dependencies = [ [[package]] name = "solana-zk-token-proof-program" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c9999be8fb9725b787d0127eca01c50eb2ec3e9349f94a4e5e230e6af51b3eb" +checksum = "40e2cf04674a3b3bec6dbc3300c8bc625677c54a535a50eefcf1c77f2fa05e59" dependencies = [ "bytemuck", "num-derive", @@ -4911,9 +4913,9 @@ dependencies = [ [[package]] name = "solana-zk-token-sdk" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce7a941b76d582857d388f96d3b0bdaf3adb6320756bca7334e34e573ab19445" +checksum = "729f832ad0cca51f73909b5a9d375ee77c0e608e7474155bf39da30a33abd778" dependencies = [ "aes-gcm-siv", "base64 0.22.1", @@ -4982,8 +4984,24 @@ dependencies = [ "num-derive", "num-traits", "solana-program", - "spl-token", - "spl-token-2022", + "spl-token 4.0.1", + "spl-token-2022 3.0.2", + "thiserror", +] + +[[package]] +name = "spl-associated-token-account" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68034596cf4804880d265f834af1ff2f821ad5293e41fa0f8f59086c181fc38e" +dependencies = [ + "assert_matches", + "borsh 1.5.1", + "num-derive", + "num-traits", + "solana-program", + "spl-token 6.0.0", + "spl-token-2022 4.0.0", "thiserror", ] @@ -4998,6 +5016,17 @@ dependencies = [ "spl-discriminator-derive", ] +[[package]] +name = "spl-discriminator" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a38ea8b6dedb7065887f12d62ed62c1743aa70749e8558f963609793f6fb12bc" +dependencies = [ + "bytemuck", + "solana-program", + "spl-discriminator-derive", +] + [[package]] name = "spl-discriminator-derive" version = "0.2.0" @@ -5031,6 +5060,15 @@ dependencies = [ "solana-program", ] +[[package]] +name = "spl-memo" +version = "5.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0dba2f2bb6419523405d21c301a32c9f9568354d4742552e7972af801f4bdb3" +dependencies = [ + "solana-program", +] + [[package]] name = "spl-pod" version = "0.2.2" @@ -5041,7 +5079,21 @@ dependencies = [ "bytemuck", "solana-program", "solana-zk-token-sdk", - "spl-program-error", + "spl-program-error 0.4.1", +] + +[[package]] +name = "spl-pod" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6166a591d93af33afd75bbd8573c5fd95fb1213f1bf254f0508c89fdb5ee156" +dependencies = [ + "borsh 1.5.1", + "bytemuck", + "bytemuck_derive", + "solana-program", + "solana-zk-token-sdk", + "spl-program-error 0.5.0", ] [[package]] @@ -5057,6 +5109,19 @@ dependencies = [ "thiserror", ] +[[package]] +name = "spl-program-error" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7b28bed65356558133751cc32b48a7a5ddfc59ac4e941314630bbed1ac10532" +dependencies = [ + "num-derive", + "num-traits", + "solana-program", + "spl-program-error-derive", + "thiserror", +] + [[package]] name = "spl-program-error-derive" version = "0.4.1" @@ -5077,10 +5142,24 @@ checksum = "cace91ba08984a41556efe49cbf2edca4db2f577b649da7827d3621161784bf8" dependencies = [ "bytemuck", "solana-program", - "spl-discriminator", - "spl-pod", - "spl-program-error", - "spl-type-length-value", + "spl-discriminator 0.2.2", + "spl-pod 0.2.2", + "spl-program-error 0.4.1", + "spl-type-length-value 0.4.3", +] + +[[package]] +name = "spl-tlv-account-resolution" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37a75a5f0fcc58126693ed78a17042e9dc53f07e357d6be91789f7d62aff61a4" +dependencies = [ + "bytemuck", + "solana-program", + "spl-discriminator 0.3.0", + "spl-pod 0.3.0", + "spl-program-error 0.5.0", + "spl-type-length-value 0.5.0", ] [[package]] @@ -5098,6 +5177,21 @@ dependencies = [ "thiserror", ] +[[package]] +name = "spl-token" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70a0f06ac7f23dc0984931b1fe309468f14ea58e32660439c1cef19456f5d0e3" +dependencies = [ + "arrayref", + "bytemuck", + "num-derive", + "num-traits", + "num_enum", + "solana-program", + "thiserror", +] + [[package]] name = "spl-token-2022" version = "3.0.2" @@ -5112,13 +5206,37 @@ dependencies = [ "solana-program", "solana-security-txt", "solana-zk-token-sdk", - "spl-memo", - "spl-pod", - "spl-token", - "spl-token-group-interface", - "spl-token-metadata-interface", - "spl-transfer-hook-interface", - "spl-type-length-value", + "spl-memo 4.0.1", + "spl-pod 0.2.2", + "spl-token 4.0.1", + "spl-token-group-interface 0.2.3", + "spl-token-metadata-interface 0.3.3", + "spl-transfer-hook-interface 0.6.3", + "spl-type-length-value 0.4.3", + "thiserror", +] + +[[package]] +name = "spl-token-2022" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c10f3483e48679619c76598d4e4aebb955bc49b0a5cc63323afbf44135c9bf" +dependencies = [ + "arrayref", + "bytemuck", + "num-derive", + "num-traits", + "num_enum", + "solana-program", + "solana-security-txt", + "solana-zk-token-sdk", + "spl-memo 5.0.0", + "spl-pod 0.3.0", + "spl-token 6.0.0", + "spl-token-group-interface 0.3.0", + "spl-token-metadata-interface 0.4.0", + "spl-transfer-hook-interface 0.7.0", + "spl-type-length-value 0.5.0", "thiserror", ] @@ -5130,9 +5248,22 @@ checksum = "d419b5cfa3ee8e0f2386fd7e02a33b3ec8a7db4a9c7064a2ea24849dc4a273b6" dependencies = [ "bytemuck", "solana-program", - "spl-discriminator", - "spl-pod", - "spl-program-error", + "spl-discriminator 0.2.2", + "spl-pod 0.2.2", + "spl-program-error 0.4.1", +] + +[[package]] +name = "spl-token-group-interface" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df8752b85a5ecc1d9f3a43bce3dd9a6a053673aacf5deb513d1cbb88d3534ffd" +dependencies = [ + "bytemuck", + "solana-program", + "spl-discriminator 0.3.0", + "spl-pod 0.3.0", + "spl-program-error 0.5.0", ] [[package]] @@ -5143,10 +5274,24 @@ checksum = "30179c47e93625680dabb620c6e7931bd12d62af390f447bc7beb4a3a9b5feee" dependencies = [ "borsh 1.5.1", "solana-program", - "spl-discriminator", - "spl-pod", - "spl-program-error", - "spl-type-length-value", + "spl-discriminator 0.2.2", + "spl-pod 0.2.2", + "spl-program-error 0.4.1", + "spl-type-length-value 0.4.3", +] + +[[package]] +name = "spl-token-metadata-interface" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6c2318ddff97e006ed9b1291ebec0750a78547f870f62a69c56fe3b46a5d8fc" +dependencies = [ + "borsh 1.5.1", + "solana-program", + "spl-discriminator 0.3.0", + "spl-pod 0.3.0", + "spl-program-error 0.5.0", + "spl-type-length-value 0.5.0", ] [[package]] @@ -5158,11 +5303,27 @@ dependencies = [ "arrayref", "bytemuck", "solana-program", - "spl-discriminator", - "spl-pod", - "spl-program-error", - "spl-tlv-account-resolution", - "spl-type-length-value", + "spl-discriminator 0.2.2", + "spl-pod 0.2.2", + "spl-program-error 0.4.1", + "spl-tlv-account-resolution 0.6.3", + "spl-type-length-value 0.4.3", +] + +[[package]] +name = "spl-transfer-hook-interface" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a110f33d941275d9f868b96daaa993f1e73b6806cc8836e43075b4d3ad8338a7" +dependencies = [ + "arrayref", + "bytemuck", + "solana-program", + "spl-discriminator 0.3.0", + "spl-pod 0.3.0", + "spl-program-error 0.5.0", + "spl-tlv-account-resolution 0.7.0", + "spl-type-length-value 0.5.0", ] [[package]] @@ -5173,9 +5334,22 @@ checksum = "422ce13429dbd41d2cee8a73931c05fda0b0c8ca156a8b0c19445642550bb61a" dependencies = [ "bytemuck", "solana-program", - "spl-discriminator", - "spl-pod", - "spl-program-error", + "spl-discriminator 0.2.2", + "spl-pod 0.2.2", + "spl-program-error 0.4.1", +] + +[[package]] +name = "spl-type-length-value" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdcd73ec187bc409464c60759232e309f83b52a18a9c5610bf281c9c6432918c" +dependencies = [ + "bytemuck", + "solana-program", + "spl-discriminator 0.3.0", + "spl-pod 0.3.0", + "spl-program-error 0.5.0", ] [[package]] @@ -5488,9 +5662,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.6.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +checksum = "c55115c6fbe2d2bef26eb09ad74bde02d8255476fc0c7b515ef09fbb35742d82" dependencies = [ "tinyvec_macros", ] diff --git a/Cargo.toml b/Cargo.toml index 1f0ae20..d77c1c7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,14 +22,14 @@ thiserror = "1.0.61" serde = "1.0.202" serde_with = "3.8.1" assert_matches = "1.5.0" -solana-program = "2.0.0" -solana-program-test = "2.0.0" -solana-sdk = "2.0.0" -solana-client = "2.0.0" -solana-zk-token-sdk = "2.0.0" -spl-associated-token-account = "3.0.2" -spl-token-2022 = "3.0.2" -spl-token-metadata-interface = "0.3.3" +solana-program = "2.0.1" +solana-program-test = "2.0.1" +solana-sdk = "2.0.1" +solana-client = "2.0.1" +solana-zk-token-sdk = "2.0.1" +spl-associated-token-account = "4.0.0" +spl-token-2022 = "4.0.0" +spl-token-metadata-interface = "0.4.0" ed25519-dalek = "1.0.1" libsecp256k1 = "0.7.1" clap = "4.5.4" diff --git a/clients/js/dist/src/index.js b/clients/js/dist/src/index.js index 88ca82a..d3dabf0 100644 --- a/clients/js/dist/src/index.js +++ b/clients/js/dist/src/index.js @@ -4,6 +4,21 @@ var web3_js = require('@solana/web3.js'); // env-shim.ts var __DEV__ = /* @__PURE__ */ (() => process["env"].NODE_ENV === "development")(); +async function findDeviceATokenPda(seeds, config = {}) { + const { + programAddress = "hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1" + } = config; + return await web3_js.getProgramDerivedAddress({ + programAddress, + seeds: [ + web3_js.getAddressEncoder().encode(seeds.ownerPubkey), + web3_js.getAddressEncoder().encode( + web3_js.address("TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb") + ), + web3_js.getAddressEncoder().encode(seeds.deviceMintPubkey) + ] + }); +} async function findDeviceMintPda(seeds, config = {}) { const { programAddress = "hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1" @@ -17,6 +32,21 @@ async function findDeviceMintPda(seeds, config = {}) { ] }); } +async function findProductATokenPda(seeds, config = {}) { + const { + programAddress = "hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1" + } = config; + return await web3_js.getProgramDerivedAddress({ + programAddress, + seeds: [ + web3_js.getAddressEncoder().encode(seeds.devicePubkey), + web3_js.getAddressEncoder().encode( + web3_js.address("TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb") + ), + web3_js.getAddressEncoder().encode(seeds.productMintPubkey) + ] + }); +} async function findProductMintPda(seeds, config = {}) { const { programAddress = "hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1" @@ -30,6 +60,15 @@ async function findProductMintPda(seeds, config = {}) { ] }); } +async function findProgramDataPda(config = {}) { + const { + programAddress = "hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1" + } = config; + return await web3_js.getProgramDerivedAddress({ + programAddress, + seeds: [web3_js.getUtf8Encoder().encode("DePHY_ID")] + }); +} async function findProgramDataAccountPda(config = {}) { const { programAddress = "hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1" @@ -190,13 +229,13 @@ function decodeProgramDataAccount(encodedAccount) { getProgramDataAccountDecoder() ); } -async function fetchProgramDataAccount(rpc, address, config) { - const maybeAccount = await fetchMaybeProgramDataAccount(rpc, address, config); +async function fetchProgramDataAccount(rpc, address3, config) { + const maybeAccount = await fetchMaybeProgramDataAccount(rpc, address3, config); web3_js.assertAccountExists(maybeAccount); return maybeAccount; } -async function fetchMaybeProgramDataAccount(rpc, address, config) { - const maybeAccount = await web3_js.fetchEncodedAccount(rpc, address, config); +async function fetchMaybeProgramDataAccount(rpc, address3, config) { + const maybeAccount = await web3_js.fetchEncodedAccount(rpc, address3, config); return decodeProgramDataAccount(maybeAccount); } async function fetchAllProgramDataAccount(rpc, addresses, config) { @@ -224,8 +263,8 @@ async function fetchProgramDataAccountFromSeeds(rpc, config = {}) { } async function fetchMaybeProgramDataAccountFromSeeds(rpc, config = {}) { const { programAddress, ...fetchConfig } = config; - const [address] = await findProgramDataAccountPda({ programAddress }); - return await fetchMaybeProgramDataAccount(rpc, address, fetchConfig); + const [address3] = await findProgramDataAccountPda({ programAddress }); + return await fetchMaybeProgramDataAccount(rpc, address3, fetchConfig); } // src/generated/errors/dephyId.ts @@ -309,6 +348,12 @@ function identifyDephyIdInstruction(instruction) { "The provided instruction could not be identified as a dephyId instruction." ); } +function expectSome(value) { + if (value == null) { + throw new Error("Expected a value but received null or undefined."); + } + return value; +} function expectAddress(value) { if (!value) { throw new Error("Expected a Address."); @@ -394,6 +439,9 @@ function getActivateDeviceInstruction(input) { if (!accounts.systemProgram.value) { accounts.systemProgram.value = "11111111111111111111111111111111"; } + if (!accounts.token2022Program.value) { + accounts.token2022Program.value = "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"; + } if (!accounts.ataProgram.value) { accounts.ataProgram.value = "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"; } @@ -517,9 +565,15 @@ function getCreateActivatedDeviceInstruction(input) { if (!accounts.systemProgram.value) { accounts.systemProgram.value = "11111111111111111111111111111111"; } + if (!accounts.token2022Program.value) { + accounts.token2022Program.value = "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"; + } if (!accounts.ataProgram.value) { accounts.ataProgram.value = "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"; } + if (!accounts.payer.value) { + accounts.payer.value = expectSome(accounts.vendor.value); + } const getAccountMeta = getAccountMetaFactory(programAddress); const instruction = { accounts: [ @@ -645,6 +699,9 @@ function getCreateDeviceInstruction(input) { if (!accounts.ataProgram.value) { accounts.ataProgram.value = "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"; } + if (!accounts.payer.value) { + accounts.payer.value = expectSome(accounts.vendor.value); + } const getAccountMeta = getAccountMetaFactory(programAddress); const instruction = { accounts: [ @@ -826,6 +883,9 @@ function getInitializeInstruction(input) { if (!accounts.systemProgram.value) { accounts.systemProgram.value = "11111111111111111111111111111111"; } + if (!accounts.payer.value) { + accounts.payer.value = expectSome(accounts.authority.value); + } const getAccountMeta = getAccountMetaFactory(programAddress); const instruction = { accounts: [ @@ -889,9 +949,12 @@ exports.fetchMaybeProgramDataAccount = fetchMaybeProgramDataAccount; exports.fetchMaybeProgramDataAccountFromSeeds = fetchMaybeProgramDataAccountFromSeeds; exports.fetchProgramDataAccount = fetchProgramDataAccount; exports.fetchProgramDataAccountFromSeeds = fetchProgramDataAccountFromSeeds; +exports.findDeviceATokenPda = findDeviceATokenPda; exports.findDeviceMintPda = findDeviceMintPda; +exports.findProductATokenPda = findProductATokenPda; exports.findProductMintPda = findProductMintPda; exports.findProgramDataAccountPda = findProgramDataAccountPda; +exports.findProgramDataPda = findProgramDataPda; exports.getActivateDeviceInstruction = getActivateDeviceInstruction; exports.getActivateDeviceInstructionDataCodec = getActivateDeviceInstructionDataCodec; exports.getActivateDeviceInstructionDataDecoder = getActivateDeviceInstructionDataDecoder; diff --git a/clients/js/dist/src/index.js.map b/clients/js/dist/src/index.js.map index 5a446c6..f213ef5 100644 --- a/clients/js/dist/src/index.js.map +++ b/clients/js/dist/src/index.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../env-shim.ts","../../src/generated/accounts/programDataAccount.ts","../../src/generated/pdas/deviceMint.ts","../../src/generated/pdas/productMint.ts","../../src/generated/pdas/programDataAccount.ts","../../src/generated/types/deviceActivationSignature.ts","../../src/generated/types/deviceSigningAlgorithm.ts","../../src/generated/types/key.ts","../../src/generated/types/programData.ts","../../src/generated/errors/dephyId.ts","../../src/generated/instructions/activateDevice.ts","../../src/generated/programs/dephyId.ts","../../src/generated/shared/index.ts","../../src/generated/instructions/createActivatedDevice.ts","../../src/generated/instructions/createDevice.ts","../../src/generated/instructions/createProduct.ts","../../src/generated/instructions/initialize.ts"],"names":["combineCodec","getAddressEncoder","getStructDecoder","getStructEncoder","getProgramDerivedAddress","getUtf8Encoder","DeviceSigningAlgorithm","getEnumDecoder","getEnumEncoder","Key","getU8Decoder","getU8Encoder","transformEncoder","DephyIdAccount","DephyIdInstruction","getTupleDecoder","getTupleEncoder","addDecoderSizePrefix","addEncoderSizePrefix","getArrayDecoder","getArrayEncoder","getU32Decoder","getU32Encoder","getUtf8Decoder"],"mappings":";AACO,IAAM,UAA2B,uBACrC,QAAgB,KAAU,EAAE,aAAa,eAAe;;;ACM3D;AAAA,EACE;AAAA,EACA;AAAA,EACA,gBAAAA;AAAA,EACA;AAAA,EACA;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;AAAA,MACrC,eAAe,SAAS,KAAK;AAAA,MAC7B,eAAe,SAAS,WAAW;AAAA,MACnC,eAAe,SAAS,SAAS;AAAA,IACnC;AAAA,IACA;AAAA,IACA,MAAM,oCAAoC,EAAE;AAAA,MAC1C;AAAA,IACF;AAAA,EACF;AAQA,SAAO;AACT;AAoBO,SAAS,2BAId,aAGsD;AACtD,MAAI,YAAY,SAAS,SAAS,GAAG;AAEnC,UAAM,IAAI,MAAM,qBAAqB;AAAA,EACvC;AACA,MAAI,eAAe;AACnB,QAAM,iBAAiB,MAAM;AAC3B,UAAM,cAAc,YAAY,SAAU,YAAY;AACtD,oBAAgB;AAChB,WAAO;AAAA,EACT;AACA,SAAO;AAAA,IACL,gBAAgB,YAAY;AAAA,IAC5B,UAAU;AAAA,MACR,eAAe,eAAe;AAAA,MAC9B,OAAO,eAAe;AAAA,MACtB,aAAa,eAAe;AAAA,MAC5B,WAAW,eAAe;AAAA,IAC5B;AAAA,IACA,MAAM,oCAAoC,EAAE,OAAO,YAAY,IAAI;AAAA,EACrE;AACF","sourcesContent":["// Clever obfuscation to prevent the build system from inlining the value of `NODE_ENV`\nexport const __DEV__ = /* @__PURE__ */ (() =>\n (process as any)['en' + 'v'].NODE_ENV === 'development')();\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport {\n assertAccountExists,\n assertAccountsExist,\n combineCodec,\n decodeAccount,\n fetchEncodedAccount,\n fetchEncodedAccounts,\n getAddressDecoder,\n getAddressEncoder,\n getStructDecoder,\n getStructEncoder,\n transformEncoder,\n type Account,\n type Address,\n type Codec,\n type Decoder,\n type EncodedAccount,\n type Encoder,\n type FetchAccountConfig,\n type FetchAccountsConfig,\n type MaybeAccount,\n type MaybeEncodedAccount,\n} from '@solana/web3.js';\nimport { findProgramDataAccountPda } from '../pdas';\nimport {\n Key,\n getKeyDecoder,\n getKeyEncoder,\n getProgramDataDecoder,\n getProgramDataEncoder,\n type ProgramData,\n type ProgramDataArgs,\n} from '../types';\n\nexport type ProgramDataAccount = {\n key: Key;\n authority: Address;\n data: ProgramData;\n};\n\nexport type ProgramDataAccountArgs = {\n authority: Address;\n data: ProgramDataArgs;\n};\n\nexport function getProgramDataAccountEncoder(): Encoder {\n return transformEncoder(\n getStructEncoder([\n ['key', getKeyEncoder()],\n ['authority', getAddressEncoder()],\n ['data', getProgramDataEncoder()],\n ]),\n (value) => ({ ...value, key: Key.ProgramDataAccount })\n );\n}\n\nexport function getProgramDataAccountDecoder(): Decoder {\n return getStructDecoder([\n ['key', getKeyDecoder()],\n ['authority', getAddressDecoder()],\n ['data', getProgramDataDecoder()],\n ]);\n}\n\nexport function getProgramDataAccountCodec(): Codec<\n ProgramDataAccountArgs,\n ProgramDataAccount\n> {\n return combineCodec(\n getProgramDataAccountEncoder(),\n getProgramDataAccountDecoder()\n );\n}\n\nexport function decodeProgramDataAccount(\n encodedAccount: EncodedAccount\n): Account;\nexport function decodeProgramDataAccount(\n encodedAccount: MaybeEncodedAccount\n): MaybeAccount;\nexport function decodeProgramDataAccount(\n encodedAccount: EncodedAccount | MaybeEncodedAccount\n):\n | Account\n | MaybeAccount {\n return decodeAccount(\n encodedAccount as MaybeEncodedAccount,\n getProgramDataAccountDecoder()\n );\n}\n\nexport async function fetchProgramDataAccount(\n rpc: Parameters[0],\n address: Address,\n config?: FetchAccountConfig\n): Promise> {\n const maybeAccount = await fetchMaybeProgramDataAccount(rpc, address, config);\n assertAccountExists(maybeAccount);\n return maybeAccount;\n}\n\nexport async function fetchMaybeProgramDataAccount<\n TAddress extends string = string,\n>(\n rpc: Parameters[0],\n address: Address,\n config?: FetchAccountConfig\n): Promise> {\n const maybeAccount = await fetchEncodedAccount(rpc, address, config);\n return decodeProgramDataAccount(maybeAccount);\n}\n\nexport async function fetchAllProgramDataAccount(\n rpc: Parameters[0],\n addresses: Array
,\n config?: FetchAccountsConfig\n): Promise[]> {\n const maybeAccounts = await fetchAllMaybeProgramDataAccount(\n rpc,\n addresses,\n config\n );\n assertAccountsExist(maybeAccounts);\n return maybeAccounts;\n}\n\nexport async function fetchAllMaybeProgramDataAccount(\n rpc: Parameters[0],\n addresses: Array
,\n config?: FetchAccountsConfig\n): Promise[]> {\n const maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);\n return maybeAccounts.map((maybeAccount) =>\n decodeProgramDataAccount(maybeAccount)\n );\n}\n\nexport function getProgramDataAccountSize(): number {\n return 34;\n}\n\nexport async function fetchProgramDataAccountFromSeeds(\n rpc: Parameters[0],\n config: FetchAccountConfig & { programAddress?: Address } = {}\n): Promise> {\n const maybeAccount = await fetchMaybeProgramDataAccountFromSeeds(rpc, config);\n assertAccountExists(maybeAccount);\n return maybeAccount;\n}\n\nexport async function fetchMaybeProgramDataAccountFromSeeds(\n rpc: Parameters[0],\n config: FetchAccountConfig & { programAddress?: Address } = {}\n): Promise> {\n const { programAddress, ...fetchConfig } = config;\n const [address] = await findProgramDataAccountPda({ programAddress });\n return await fetchMaybeProgramDataAccount(rpc, address, fetchConfig);\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport {\n getAddressEncoder,\n getProgramDerivedAddress,\n getUtf8Encoder,\n type Address,\n type ProgramDerivedAddress,\n} from '@solana/web3.js';\n\nexport type DeviceMintSeeds = {\n productMintPubkey: Address;\n\n devicePubkey: Address;\n};\n\nexport async function findDeviceMintPda(\n seeds: DeviceMintSeeds,\n config: { programAddress?: Address | undefined } = {}\n): Promise {\n const {\n programAddress = 'hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1' as Address<'hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1'>,\n } = config;\n return await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getUtf8Encoder().encode('DePHY_ID-DEVICE'),\n getAddressEncoder().encode(seeds.productMintPubkey),\n getAddressEncoder().encode(seeds.devicePubkey),\n ],\n });\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport {\n getAddressEncoder,\n getProgramDerivedAddress,\n getUtf8Encoder,\n type Address,\n type ProgramDerivedAddress,\n} from '@solana/web3.js';\n\nexport type ProductMintSeeds = {\n vendorPubkey: Address;\n\n productName: string;\n};\n\nexport async function findProductMintPda(\n seeds: ProductMintSeeds,\n config: { programAddress?: Address | undefined } = {}\n): Promise {\n const {\n programAddress = 'hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1' as Address<'hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1'>,\n } = config;\n return await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getUtf8Encoder().encode('DePHY_ID-PRODUCT'),\n getAddressEncoder().encode(seeds.vendorPubkey),\n getUtf8Encoder().encode(seeds.productName),\n ],\n });\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport {\n getProgramDerivedAddress,\n getUtf8Encoder,\n type Address,\n type ProgramDerivedAddress,\n} from '@solana/web3.js';\n\nexport async function findProgramDataAccountPda(\n config: { programAddress?: Address | undefined } = {}\n): Promise {\n const {\n programAddress = 'hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1' as Address<'hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1'>,\n } = config;\n return await getProgramDerivedAddress({\n programAddress,\n seeds: [getUtf8Encoder().encode('DePHY_ID')],\n });\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getBytesDecoder,\n getBytesEncoder,\n getDiscriminatedUnionDecoder,\n getDiscriminatedUnionEncoder,\n getStructDecoder,\n getStructEncoder,\n getTupleDecoder,\n getTupleEncoder,\n getU8Decoder,\n getU8Encoder,\n type Codec,\n type Decoder,\n type Encoder,\n type GetDiscriminatedUnionVariant,\n type GetDiscriminatedUnionVariantContent,\n type ReadonlyUint8Array,\n} from '@solana/web3.js';\n\nexport type DeviceActivationSignature =\n | { __kind: 'Ed25519'; fields: readonly [ReadonlyUint8Array] }\n | { __kind: 'Secp256k1'; fields: readonly [ReadonlyUint8Array, number] }\n | { __kind: 'EthSecp256k1'; fields: readonly [ReadonlyUint8Array, number] };\n\nexport type DeviceActivationSignatureArgs = DeviceActivationSignature;\n\nexport function getDeviceActivationSignatureEncoder(): Encoder {\n return getDiscriminatedUnionEncoder([\n [\n 'Ed25519',\n getStructEncoder([\n ['fields', getTupleEncoder([fixEncoderSize(getBytesEncoder(), 64)])],\n ]),\n ],\n [\n 'Secp256k1',\n getStructEncoder([\n [\n 'fields',\n getTupleEncoder([\n fixEncoderSize(getBytesEncoder(), 64),\n getU8Encoder(),\n ]),\n ],\n ]),\n ],\n [\n 'EthSecp256k1',\n getStructEncoder([\n [\n 'fields',\n getTupleEncoder([\n fixEncoderSize(getBytesEncoder(), 64),\n getU8Encoder(),\n ]),\n ],\n ]),\n ],\n ]);\n}\n\nexport function getDeviceActivationSignatureDecoder(): Decoder {\n return getDiscriminatedUnionDecoder([\n [\n 'Ed25519',\n getStructDecoder([\n ['fields', getTupleDecoder([fixDecoderSize(getBytesDecoder(), 64)])],\n ]),\n ],\n [\n 'Secp256k1',\n getStructDecoder([\n [\n 'fields',\n getTupleDecoder([\n fixDecoderSize(getBytesDecoder(), 64),\n getU8Decoder(),\n ]),\n ],\n ]),\n ],\n [\n 'EthSecp256k1',\n getStructDecoder([\n [\n 'fields',\n getTupleDecoder([\n fixDecoderSize(getBytesDecoder(), 64),\n getU8Decoder(),\n ]),\n ],\n ]),\n ],\n ]);\n}\n\nexport function getDeviceActivationSignatureCodec(): Codec<\n DeviceActivationSignatureArgs,\n DeviceActivationSignature\n> {\n return combineCodec(\n getDeviceActivationSignatureEncoder(),\n getDeviceActivationSignatureDecoder()\n );\n}\n\n// Data Enum Helpers.\nexport function deviceActivationSignature(\n kind: 'Ed25519',\n data: GetDiscriminatedUnionVariantContent<\n DeviceActivationSignatureArgs,\n '__kind',\n 'Ed25519'\n >['fields']\n): GetDiscriminatedUnionVariant<\n DeviceActivationSignatureArgs,\n '__kind',\n 'Ed25519'\n>;\nexport function deviceActivationSignature(\n kind: 'Secp256k1',\n data: GetDiscriminatedUnionVariantContent<\n DeviceActivationSignatureArgs,\n '__kind',\n 'Secp256k1'\n >['fields']\n): GetDiscriminatedUnionVariant<\n DeviceActivationSignatureArgs,\n '__kind',\n 'Secp256k1'\n>;\nexport function deviceActivationSignature(\n kind: 'EthSecp256k1',\n data: GetDiscriminatedUnionVariantContent<\n DeviceActivationSignatureArgs,\n '__kind',\n 'EthSecp256k1'\n >['fields']\n): GetDiscriminatedUnionVariant<\n DeviceActivationSignatureArgs,\n '__kind',\n 'EthSecp256k1'\n>;\nexport function deviceActivationSignature<\n K extends DeviceActivationSignatureArgs['__kind'],\n Data,\n>(kind: K, data?: Data) {\n return Array.isArray(data)\n ? { __kind: kind, fields: data }\n : { __kind: kind, ...(data ?? {}) };\n}\n\nexport function isDeviceActivationSignature<\n K extends DeviceActivationSignature['__kind'],\n>(\n kind: K,\n value: DeviceActivationSignature\n): value is DeviceActivationSignature & { __kind: K } {\n return value.__kind === kind;\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport {\n combineCodec,\n getEnumDecoder,\n getEnumEncoder,\n type Codec,\n type Decoder,\n type Encoder,\n} from '@solana/web3.js';\n\nexport enum DeviceSigningAlgorithm {\n Ed25519,\n Secp256k1,\n}\n\nexport type DeviceSigningAlgorithmArgs = DeviceSigningAlgorithm;\n\nexport function getDeviceSigningAlgorithmEncoder(): Encoder {\n return getEnumEncoder(DeviceSigningAlgorithm);\n}\n\nexport function getDeviceSigningAlgorithmDecoder(): Decoder {\n return getEnumDecoder(DeviceSigningAlgorithm);\n}\n\nexport function getDeviceSigningAlgorithmCodec(): Codec<\n DeviceSigningAlgorithmArgs,\n DeviceSigningAlgorithm\n> {\n return combineCodec(\n getDeviceSigningAlgorithmEncoder(),\n getDeviceSigningAlgorithmDecoder()\n );\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport {\n combineCodec,\n getEnumDecoder,\n getEnumEncoder,\n type Codec,\n type Decoder,\n type Encoder,\n} from '@solana/web3.js';\n\nexport enum Key {\n Uninitialized,\n ProgramDataAccount,\n}\n\nexport type KeyArgs = Key;\n\nexport function getKeyEncoder(): Encoder {\n return getEnumEncoder(Key);\n}\n\nexport function getKeyDecoder(): Decoder {\n return getEnumDecoder(Key);\n}\n\nexport function getKeyCodec(): Codec {\n return combineCodec(getKeyEncoder(), getKeyDecoder());\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport {\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU8Decoder,\n getU8Encoder,\n type Codec,\n type Decoder,\n type Encoder,\n} from '@solana/web3.js';\n\nexport type ProgramData = { bump: number };\n\nexport type ProgramDataArgs = ProgramData;\n\nexport function getProgramDataEncoder(): Encoder {\n return getStructEncoder([['bump', getU8Encoder()]]);\n}\n\nexport function getProgramDataDecoder(): Decoder {\n return getStructDecoder([['bump', getU8Decoder()]]);\n}\n\nexport function getProgramDataCodec(): Codec {\n return combineCodec(getProgramDataEncoder(), getProgramDataDecoder());\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\n/** DeserializationError: Error deserializing an account */\nexport const DEPHY_ID_ERROR__DESERIALIZATION_ERROR = 0x0; // 0\n/** SerializationError: Error serializing an account */\nexport const DEPHY_ID_ERROR__SERIALIZATION_ERROR = 0x1; // 1\n/** InvalidProgramOwner: Invalid program owner. This likely mean the provided account does not exist */\nexport const DEPHY_ID_ERROR__INVALID_PROGRAM_OWNER = 0x2; // 2\n/** InvalidPda: Invalid PDA derivation */\nexport const DEPHY_ID_ERROR__INVALID_PDA = 0x3; // 3\n/** ExpectedEmptyAccount: Expected empty account */\nexport const DEPHY_ID_ERROR__EXPECTED_EMPTY_ACCOUNT = 0x4; // 4\n/** ExpectedNonEmptyAccount: Expected non empty account */\nexport const DEPHY_ID_ERROR__EXPECTED_NON_EMPTY_ACCOUNT = 0x5; // 5\n/** ExpectedSignerAccount: Expected signer account */\nexport const DEPHY_ID_ERROR__EXPECTED_SIGNER_ACCOUNT = 0x6; // 6\n/** ExpectedWritableAccount: Expected writable account */\nexport const DEPHY_ID_ERROR__EXPECTED_WRITABLE_ACCOUNT = 0x7; // 7\n/** AccountMismatch: Account mismatch */\nexport const DEPHY_ID_ERROR__ACCOUNT_MISMATCH = 0x8; // 8\n/** InvalidAccountKey: Invalid account key */\nexport const DEPHY_ID_ERROR__INVALID_ACCOUNT_KEY = 0x9; // 9\n/** NumericalOverflow: Numerical overflow */\nexport const DEPHY_ID_ERROR__NUMERICAL_OVERFLOW = 0xa; // 10\n/** MissingInstruction: Missing instruction */\nexport const DEPHY_ID_ERROR__MISSING_INSTRUCTION = 0xb; // 11\n/** SignatureMismatch: Signature mismatch */\nexport const DEPHY_ID_ERROR__SIGNATURE_MISMATCH = 0xc; // 12\n\nexport type DephyIdError =\n | typeof DEPHY_ID_ERROR__ACCOUNT_MISMATCH\n | typeof DEPHY_ID_ERROR__DESERIALIZATION_ERROR\n | typeof DEPHY_ID_ERROR__EXPECTED_EMPTY_ACCOUNT\n | typeof DEPHY_ID_ERROR__EXPECTED_NON_EMPTY_ACCOUNT\n | typeof DEPHY_ID_ERROR__EXPECTED_SIGNER_ACCOUNT\n | typeof DEPHY_ID_ERROR__EXPECTED_WRITABLE_ACCOUNT\n | typeof DEPHY_ID_ERROR__INVALID_ACCOUNT_KEY\n | typeof DEPHY_ID_ERROR__INVALID_PDA\n | typeof DEPHY_ID_ERROR__INVALID_PROGRAM_OWNER\n | typeof DEPHY_ID_ERROR__MISSING_INSTRUCTION\n | typeof DEPHY_ID_ERROR__NUMERICAL_OVERFLOW\n | typeof DEPHY_ID_ERROR__SERIALIZATION_ERROR\n | typeof DEPHY_ID_ERROR__SIGNATURE_MISMATCH;\n\nlet dephyIdErrorMessages: Record | undefined;\nif (__DEV__) {\n dephyIdErrorMessages = {\n [DEPHY_ID_ERROR__ACCOUNT_MISMATCH]: `Account mismatch`,\n [DEPHY_ID_ERROR__DESERIALIZATION_ERROR]: `Error deserializing an account`,\n [DEPHY_ID_ERROR__EXPECTED_EMPTY_ACCOUNT]: `Expected empty account`,\n [DEPHY_ID_ERROR__EXPECTED_NON_EMPTY_ACCOUNT]: `Expected non empty account`,\n [DEPHY_ID_ERROR__EXPECTED_SIGNER_ACCOUNT]: `Expected signer account`,\n [DEPHY_ID_ERROR__EXPECTED_WRITABLE_ACCOUNT]: `Expected writable account`,\n [DEPHY_ID_ERROR__INVALID_ACCOUNT_KEY]: `Invalid account key`,\n [DEPHY_ID_ERROR__INVALID_PDA]: `Invalid PDA derivation`,\n [DEPHY_ID_ERROR__INVALID_PROGRAM_OWNER]: `Invalid program owner. This likely mean the provided account does not exist`,\n [DEPHY_ID_ERROR__MISSING_INSTRUCTION]: `Missing instruction`,\n [DEPHY_ID_ERROR__NUMERICAL_OVERFLOW]: `Numerical overflow`,\n [DEPHY_ID_ERROR__SERIALIZATION_ERROR]: `Error serializing an account`,\n [DEPHY_ID_ERROR__SIGNATURE_MISMATCH]: `Signature mismatch`,\n };\n}\n\nexport function getDephyIdErrorMessage(code: DephyIdError): string {\n if (__DEV__) {\n return (dephyIdErrorMessages as Record)[code];\n }\n\n return 'Error message not available in production bundles. Compile with `__DEV__` set to true to see more information.';\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport {\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU64Decoder,\n getU64Encoder,\n getU8Decoder,\n getU8Encoder,\n transformEncoder,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type IAccountMeta,\n type IAccountSignerMeta,\n type IInstruction,\n type IInstructionWithAccounts,\n type IInstructionWithData,\n type ReadonlyAccount,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/web3.js';\nimport { DEPHY_ID_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\nimport {\n getDeviceActivationSignatureDecoder,\n getDeviceActivationSignatureEncoder,\n type DeviceActivationSignature,\n type DeviceActivationSignatureArgs,\n} from '../types';\n\nexport type ActivateDeviceInstruction<\n TProgram extends string = typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountSystemProgram extends\n | string\n | IAccountMeta = '11111111111111111111111111111111',\n TAccountToken2022Program extends string | IAccountMeta = string,\n TAccountAtaProgram extends\n | string\n | IAccountMeta = 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n TAccountPayer extends string | IAccountMeta = string,\n TAccountVendor extends string | IAccountMeta = string,\n TAccountProductMint extends string | IAccountMeta = string,\n TAccountProductAssociatedToken extends string | IAccountMeta = string,\n TAccountDevice extends string | IAccountMeta = string,\n TAccountDeviceMint extends string | IAccountMeta = string,\n TAccountDeviceAssociatedToken extends string | IAccountMeta = string,\n TAccountOwner extends string | IAccountMeta = string,\n TRemainingAccounts extends readonly IAccountMeta[] = [],\n> = IInstruction &\n IInstructionWithData &\n IInstructionWithAccounts<\n [\n TAccountSystemProgram extends string\n ? ReadonlyAccount\n : TAccountSystemProgram,\n TAccountToken2022Program extends string\n ? ReadonlyAccount\n : TAccountToken2022Program,\n TAccountAtaProgram extends string\n ? ReadonlyAccount\n : TAccountAtaProgram,\n TAccountPayer extends string\n ? WritableSignerAccount &\n IAccountSignerMeta\n : TAccountPayer,\n TAccountVendor extends string\n ? ReadonlyAccount\n : TAccountVendor,\n TAccountProductMint extends string\n ? ReadonlyAccount\n : TAccountProductMint,\n TAccountProductAssociatedToken extends string\n ? ReadonlyAccount\n : TAccountProductAssociatedToken,\n TAccountDevice extends string\n ? ReadonlyAccount\n : TAccountDevice,\n TAccountDeviceMint extends string\n ? WritableAccount\n : TAccountDeviceMint,\n TAccountDeviceAssociatedToken extends string\n ? WritableAccount\n : TAccountDeviceAssociatedToken,\n TAccountOwner extends string\n ? ReadonlyAccount\n : TAccountOwner,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type ActivateDeviceInstructionData = {\n discriminator: number;\n signature: DeviceActivationSignature;\n timestamp: bigint;\n};\n\nexport type ActivateDeviceInstructionDataArgs = {\n signature: DeviceActivationSignatureArgs;\n timestamp: number | bigint;\n};\n\nexport function getActivateDeviceInstructionDataEncoder(): Encoder {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', getU8Encoder()],\n ['signature', getDeviceActivationSignatureEncoder()],\n ['timestamp', getU64Encoder()],\n ]),\n (value) => ({ ...value, discriminator: 3 })\n );\n}\n\nexport function getActivateDeviceInstructionDataDecoder(): Decoder {\n return getStructDecoder([\n ['discriminator', getU8Decoder()],\n ['signature', getDeviceActivationSignatureDecoder()],\n ['timestamp', getU64Decoder()],\n ]);\n}\n\nexport function getActivateDeviceInstructionDataCodec(): Codec<\n ActivateDeviceInstructionDataArgs,\n ActivateDeviceInstructionData\n> {\n return combineCodec(\n getActivateDeviceInstructionDataEncoder(),\n getActivateDeviceInstructionDataDecoder()\n );\n}\n\nexport type ActivateDeviceInput<\n TAccountSystemProgram extends string = string,\n TAccountToken2022Program extends string = string,\n TAccountAtaProgram extends string = string,\n TAccountPayer extends string = string,\n TAccountVendor extends string = string,\n TAccountProductMint extends string = string,\n TAccountProductAssociatedToken extends string = string,\n TAccountDevice extends string = string,\n TAccountDeviceMint extends string = string,\n TAccountDeviceAssociatedToken extends string = string,\n TAccountOwner extends string = string,\n> = {\n /** The system program */\n systemProgram?: Address;\n /** The SPL Token 2022 program */\n token2022Program: Address;\n /** The associated token program */\n ataProgram?: Address;\n /** The account paying for the storage fees */\n payer: TransactionSigner;\n /** The vendor */\n vendor: Address;\n /** The mint account for the product */\n productMint: Address;\n /** The associated token account for the product */\n productAssociatedToken: Address;\n /** The device */\n device: Address;\n /** The mint account for the device */\n deviceMint: Address;\n /** The associated token account for the device */\n deviceAssociatedToken: Address;\n /** The device's owner */\n owner: Address;\n signature: ActivateDeviceInstructionDataArgs['signature'];\n timestamp: ActivateDeviceInstructionDataArgs['timestamp'];\n};\n\nexport function getActivateDeviceInstruction<\n TAccountSystemProgram extends string,\n TAccountToken2022Program extends string,\n TAccountAtaProgram extends string,\n TAccountPayer extends string,\n TAccountVendor extends string,\n TAccountProductMint extends string,\n TAccountProductAssociatedToken extends string,\n TAccountDevice extends string,\n TAccountDeviceMint extends string,\n TAccountDeviceAssociatedToken extends string,\n TAccountOwner extends string,\n>(\n input: ActivateDeviceInput<\n TAccountSystemProgram,\n TAccountToken2022Program,\n TAccountAtaProgram,\n TAccountPayer,\n TAccountVendor,\n TAccountProductMint,\n TAccountProductAssociatedToken,\n TAccountDevice,\n TAccountDeviceMint,\n TAccountDeviceAssociatedToken,\n TAccountOwner\n >\n): ActivateDeviceInstruction<\n typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountSystemProgram,\n TAccountToken2022Program,\n TAccountAtaProgram,\n TAccountPayer,\n TAccountVendor,\n TAccountProductMint,\n TAccountProductAssociatedToken,\n TAccountDevice,\n TAccountDeviceMint,\n TAccountDeviceAssociatedToken,\n TAccountOwner\n> {\n // Program address.\n const programAddress = DEPHY_ID_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n token2022Program: {\n value: input.token2022Program ?? null,\n isWritable: false,\n },\n ataProgram: { value: input.ataProgram ?? null, isWritable: false },\n payer: { value: input.payer ?? null, isWritable: true },\n vendor: { value: input.vendor ?? null, isWritable: false },\n productMint: { value: input.productMint ?? null, isWritable: false },\n productAssociatedToken: {\n value: input.productAssociatedToken ?? null,\n isWritable: false,\n },\n device: { value: input.device ?? null, isWritable: false },\n deviceMint: { value: input.deviceMint ?? null, isWritable: true },\n deviceAssociatedToken: {\n value: input.deviceAssociatedToken ?? null,\n isWritable: true,\n },\n owner: { value: input.owner ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n if (!accounts.ataProgram.value) {\n accounts.ataProgram.value =\n 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.token2022Program),\n getAccountMeta(accounts.ataProgram),\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.vendor),\n getAccountMeta(accounts.productMint),\n getAccountMeta(accounts.productAssociatedToken),\n getAccountMeta(accounts.device),\n getAccountMeta(accounts.deviceMint),\n getAccountMeta(accounts.deviceAssociatedToken),\n getAccountMeta(accounts.owner),\n ],\n programAddress,\n data: getActivateDeviceInstructionDataEncoder().encode(\n args as ActivateDeviceInstructionDataArgs\n ),\n } as ActivateDeviceInstruction<\n typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountSystemProgram,\n TAccountToken2022Program,\n TAccountAtaProgram,\n TAccountPayer,\n TAccountVendor,\n TAccountProductMint,\n TAccountProductAssociatedToken,\n TAccountDevice,\n TAccountDeviceMint,\n TAccountDeviceAssociatedToken,\n TAccountOwner\n >;\n\n return instruction;\n}\n\nexport type ParsedActivateDeviceInstruction<\n TProgram extends string = typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[],\n> = {\n programAddress: Address;\n accounts: {\n /** The system program */\n systemProgram: TAccountMetas[0];\n /** The SPL Token 2022 program */\n token2022Program: TAccountMetas[1];\n /** The associated token program */\n ataProgram: TAccountMetas[2];\n /** The account paying for the storage fees */\n payer: TAccountMetas[3];\n /** The vendor */\n vendor: TAccountMetas[4];\n /** The mint account for the product */\n productMint: TAccountMetas[5];\n /** The associated token account for the product */\n productAssociatedToken: TAccountMetas[6];\n /** The device */\n device: TAccountMetas[7];\n /** The mint account for the device */\n deviceMint: TAccountMetas[8];\n /** The associated token account for the device */\n deviceAssociatedToken: TAccountMetas[9];\n /** The device's owner */\n owner: TAccountMetas[10];\n };\n data: ActivateDeviceInstructionData;\n};\n\nexport function parseActivateDeviceInstruction<\n TProgram extends string,\n TAccountMetas extends readonly IAccountMeta[],\n>(\n instruction: IInstruction &\n IInstructionWithAccounts &\n IInstructionWithData\n): ParsedActivateDeviceInstruction {\n if (instruction.accounts.length < 11) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n systemProgram: getNextAccount(),\n token2022Program: getNextAccount(),\n ataProgram: getNextAccount(),\n payer: getNextAccount(),\n vendor: getNextAccount(),\n productMint: getNextAccount(),\n productAssociatedToken: getNextAccount(),\n device: getNextAccount(),\n deviceMint: getNextAccount(),\n deviceAssociatedToken: getNextAccount(),\n owner: getNextAccount(),\n },\n data: getActivateDeviceInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport { containsBytes, getU8Encoder, type Address } from '@solana/web3.js';\nimport {\n type ParsedActivateDeviceInstruction,\n type ParsedCreateActivatedDeviceInstruction,\n type ParsedCreateDeviceInstruction,\n type ParsedCreateProductInstruction,\n type ParsedInitializeInstruction,\n} from '../instructions';\nimport { Key, getKeyEncoder } from '../types';\n\nexport const DEPHY_ID_PROGRAM_ADDRESS =\n 'hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1' as Address<'hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1'>;\n\nexport enum DephyIdAccount {\n ProgramDataAccount,\n}\n\nexport function identifyDephyIdAccount(\n account: { data: Uint8Array } | Uint8Array\n): DephyIdAccount {\n const data = account instanceof Uint8Array ? account : account.data;\n if (containsBytes(data, getKeyEncoder().encode(Key.ProgramDataAccount), 0)) {\n return DephyIdAccount.ProgramDataAccount;\n }\n throw new Error(\n 'The provided account could not be identified as a dephyId account.'\n );\n}\n\nexport enum DephyIdInstruction {\n Initialize,\n CreateProduct,\n CreateDevice,\n ActivateDevice,\n CreateActivatedDevice,\n}\n\nexport function identifyDephyIdInstruction(\n instruction: { data: Uint8Array } | Uint8Array\n): DephyIdInstruction {\n const data =\n instruction instanceof Uint8Array ? instruction : instruction.data;\n if (containsBytes(data, getU8Encoder().encode(0), 0)) {\n return DephyIdInstruction.Initialize;\n }\n if (containsBytes(data, getU8Encoder().encode(1), 0)) {\n return DephyIdInstruction.CreateProduct;\n }\n if (containsBytes(data, getU8Encoder().encode(2), 0)) {\n return DephyIdInstruction.CreateDevice;\n }\n if (containsBytes(data, getU8Encoder().encode(3), 0)) {\n return DephyIdInstruction.ActivateDevice;\n }\n if (containsBytes(data, getU8Encoder().encode(4), 0)) {\n return DephyIdInstruction.CreateActivatedDevice;\n }\n throw new Error(\n 'The provided instruction could not be identified as a dephyId instruction.'\n );\n}\n\nexport type ParsedDephyIdInstruction<\n TProgram extends string = 'hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1',\n> =\n | ({\n instructionType: DephyIdInstruction.Initialize;\n } & ParsedInitializeInstruction)\n | ({\n instructionType: DephyIdInstruction.CreateProduct;\n } & ParsedCreateProductInstruction)\n | ({\n instructionType: DephyIdInstruction.CreateDevice;\n } & ParsedCreateDeviceInstruction)\n | ({\n instructionType: DephyIdInstruction.ActivateDevice;\n } & ParsedActivateDeviceInstruction)\n | ({\n instructionType: DephyIdInstruction.CreateActivatedDevice;\n } & ParsedCreateActivatedDeviceInstruction);\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport {\n AccountRole,\n isProgramDerivedAddress,\n isTransactionSigner as web3JsIsTransactionSigner,\n type Address,\n type IAccountMeta,\n type IAccountSignerMeta,\n type ProgramDerivedAddress,\n type TransactionSigner,\n upgradeRoleToSigner,\n} from '@solana/web3.js';\n\n/**\n * Asserts that the given value is not null or undefined.\n * @internal\n */\nexport function expectSome(value: T | null | undefined): T {\n if (value == null) {\n throw new Error('Expected a value but received null or undefined.');\n }\n return value;\n}\n\n/**\n * Asserts that the given value is a PublicKey.\n * @internal\n */\nexport function expectAddress(\n value:\n | Address\n | ProgramDerivedAddress\n | TransactionSigner\n | null\n | undefined\n): Address {\n if (!value) {\n throw new Error('Expected a Address.');\n }\n if (typeof value === 'object' && 'address' in value) {\n return value.address;\n }\n if (Array.isArray(value)) {\n return value[0];\n }\n return value as Address;\n}\n\n/**\n * Asserts that the given value is a PDA.\n * @internal\n */\nexport function expectProgramDerivedAddress(\n value:\n | Address\n | ProgramDerivedAddress\n | TransactionSigner\n | null\n | undefined\n): ProgramDerivedAddress {\n if (!value || !Array.isArray(value) || !isProgramDerivedAddress(value)) {\n throw new Error('Expected a ProgramDerivedAddress.');\n }\n return value;\n}\n\n/**\n * Asserts that the given value is a TransactionSigner.\n * @internal\n */\nexport function expectTransactionSigner(\n value:\n | Address\n | ProgramDerivedAddress\n | TransactionSigner\n | null\n | undefined\n): TransactionSigner {\n if (!value || !isTransactionSigner(value)) {\n throw new Error('Expected a TransactionSigner.');\n }\n return value;\n}\n\n/**\n * Defines an instruction account to resolve.\n * @internal\n */\nexport type ResolvedAccount<\n T extends string = string,\n U extends\n | Address\n | ProgramDerivedAddress\n | TransactionSigner\n | null =\n | Address\n | ProgramDerivedAddress\n | TransactionSigner\n | null,\n> = {\n isWritable: boolean;\n value: U;\n};\n\n/**\n * Defines an instruction that stores additional bytes on-chain.\n * @internal\n */\nexport type IInstructionWithByteDelta = {\n byteDelta: number;\n};\n\n/**\n * Get account metas and signers from resolved accounts.\n * @internal\n */\nexport function getAccountMetaFactory(\n programAddress: Address,\n optionalAccountStrategy: 'omitted' | 'programId'\n) {\n return (\n account: ResolvedAccount\n ): IAccountMeta | IAccountSignerMeta | undefined => {\n if (!account.value) {\n if (optionalAccountStrategy === 'omitted') return;\n return Object.freeze({\n address: programAddress,\n role: AccountRole.READONLY,\n });\n }\n\n const writableRole = account.isWritable\n ? AccountRole.WRITABLE\n : AccountRole.READONLY;\n return Object.freeze({\n address: expectAddress(account.value),\n role: isTransactionSigner(account.value)\n ? upgradeRoleToSigner(writableRole)\n : writableRole,\n ...(isTransactionSigner(account.value) ? { signer: account.value } : {}),\n });\n };\n}\n\nexport function isTransactionSigner(\n value:\n | Address\n | ProgramDerivedAddress\n | TransactionSigner\n): value is TransactionSigner {\n return (\n !!value &&\n typeof value === 'object' &&\n 'address' in value &&\n web3JsIsTransactionSigner(value)\n );\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport {\n addDecoderSizePrefix,\n addEncoderSizePrefix,\n combineCodec,\n getArrayDecoder,\n getArrayEncoder,\n getStructDecoder,\n getStructEncoder,\n getTupleDecoder,\n getTupleEncoder,\n getU32Decoder,\n getU32Encoder,\n getU8Decoder,\n getU8Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n transformEncoder,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type IAccountMeta,\n type IAccountSignerMeta,\n type IInstruction,\n type IInstructionWithAccounts,\n type IInstructionWithData,\n type ReadonlyAccount,\n type ReadonlySignerAccount,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/web3.js';\nimport { DEPHY_ID_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\n\nexport type CreateActivatedDeviceInstruction<\n TProgram extends string = typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountSystemProgram extends\n | string\n | IAccountMeta = '11111111111111111111111111111111',\n TAccountToken2022Program extends string | IAccountMeta = string,\n TAccountAtaProgram extends\n | string\n | IAccountMeta = 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n TAccountPayer extends string | IAccountMeta = string,\n TAccountVendor extends string | IAccountMeta = string,\n TAccountProductMint extends string | IAccountMeta = string,\n TAccountProductAssociatedToken extends string | IAccountMeta = string,\n TAccountDevice extends string | IAccountMeta = string,\n TAccountDeviceMint extends string | IAccountMeta = string,\n TAccountDeviceAssociatedToken extends string | IAccountMeta = string,\n TAccountOwner extends string | IAccountMeta = string,\n TRemainingAccounts extends readonly IAccountMeta[] = [],\n> = IInstruction &\n IInstructionWithData &\n IInstructionWithAccounts<\n [\n TAccountSystemProgram extends string\n ? ReadonlyAccount\n : TAccountSystemProgram,\n TAccountToken2022Program extends string\n ? ReadonlyAccount\n : TAccountToken2022Program,\n TAccountAtaProgram extends string\n ? ReadonlyAccount\n : TAccountAtaProgram,\n TAccountPayer extends string\n ? WritableSignerAccount &\n IAccountSignerMeta\n : TAccountPayer,\n TAccountVendor extends string\n ? ReadonlyAccount\n : TAccountVendor,\n TAccountProductMint extends string\n ? ReadonlyAccount\n : TAccountProductMint,\n TAccountProductAssociatedToken extends string\n ? WritableAccount\n : TAccountProductAssociatedToken,\n TAccountDevice extends string\n ? ReadonlySignerAccount &\n IAccountSignerMeta\n : TAccountDevice,\n TAccountDeviceMint extends string\n ? WritableAccount\n : TAccountDeviceMint,\n TAccountDeviceAssociatedToken extends string\n ? WritableAccount\n : TAccountDeviceAssociatedToken,\n TAccountOwner extends string\n ? ReadonlyAccount\n : TAccountOwner,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type CreateActivatedDeviceInstructionData = {\n discriminator: number;\n name: string;\n uri: string;\n additionalMetadata: Array;\n};\n\nexport type CreateActivatedDeviceInstructionDataArgs = {\n name: string;\n uri: string;\n additionalMetadata: Array;\n};\n\nexport function getCreateActivatedDeviceInstructionDataEncoder(): Encoder {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', getU8Encoder()],\n ['name', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n ['uri', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n [\n 'additionalMetadata',\n getArrayEncoder(\n getTupleEncoder([\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n ])\n ),\n ],\n ]),\n (value) => ({ ...value, discriminator: 4 })\n );\n}\n\nexport function getCreateActivatedDeviceInstructionDataDecoder(): Decoder {\n return getStructDecoder([\n ['discriminator', getU8Decoder()],\n ['name', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n ['uri', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n [\n 'additionalMetadata',\n getArrayDecoder(\n getTupleDecoder([\n addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder()),\n addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder()),\n ])\n ),\n ],\n ]);\n}\n\nexport function getCreateActivatedDeviceInstructionDataCodec(): Codec<\n CreateActivatedDeviceInstructionDataArgs,\n CreateActivatedDeviceInstructionData\n> {\n return combineCodec(\n getCreateActivatedDeviceInstructionDataEncoder(),\n getCreateActivatedDeviceInstructionDataDecoder()\n );\n}\n\nexport type CreateActivatedDeviceInput<\n TAccountSystemProgram extends string = string,\n TAccountToken2022Program extends string = string,\n TAccountAtaProgram extends string = string,\n TAccountPayer extends string = string,\n TAccountVendor extends string = string,\n TAccountProductMint extends string = string,\n TAccountProductAssociatedToken extends string = string,\n TAccountDevice extends string = string,\n TAccountDeviceMint extends string = string,\n TAccountDeviceAssociatedToken extends string = string,\n TAccountOwner extends string = string,\n> = {\n /** The system program */\n systemProgram?: Address;\n /** The SPL Token 2022 program */\n token2022Program: Address;\n /** The associated token program */\n ataProgram?: Address;\n /** The account paying for the storage fees */\n payer: TransactionSigner;\n /** The vendor */\n vendor: Address;\n /** The mint account for the product */\n productMint: Address;\n /** The associated token account for the product */\n productAssociatedToken: Address;\n /** The device */\n device: TransactionSigner;\n /** The mint account for the device */\n deviceMint: Address;\n /** The associated token account for the device */\n deviceAssociatedToken: Address;\n /** The device's owner */\n owner: Address;\n name: CreateActivatedDeviceInstructionDataArgs['name'];\n uri: CreateActivatedDeviceInstructionDataArgs['uri'];\n additionalMetadata: CreateActivatedDeviceInstructionDataArgs['additionalMetadata'];\n};\n\nexport function getCreateActivatedDeviceInstruction<\n TAccountSystemProgram extends string,\n TAccountToken2022Program extends string,\n TAccountAtaProgram extends string,\n TAccountPayer extends string,\n TAccountVendor extends string,\n TAccountProductMint extends string,\n TAccountProductAssociatedToken extends string,\n TAccountDevice extends string,\n TAccountDeviceMint extends string,\n TAccountDeviceAssociatedToken extends string,\n TAccountOwner extends string,\n>(\n input: CreateActivatedDeviceInput<\n TAccountSystemProgram,\n TAccountToken2022Program,\n TAccountAtaProgram,\n TAccountPayer,\n TAccountVendor,\n TAccountProductMint,\n TAccountProductAssociatedToken,\n TAccountDevice,\n TAccountDeviceMint,\n TAccountDeviceAssociatedToken,\n TAccountOwner\n >\n): CreateActivatedDeviceInstruction<\n typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountSystemProgram,\n TAccountToken2022Program,\n TAccountAtaProgram,\n TAccountPayer,\n TAccountVendor,\n TAccountProductMint,\n TAccountProductAssociatedToken,\n TAccountDevice,\n TAccountDeviceMint,\n TAccountDeviceAssociatedToken,\n TAccountOwner\n> {\n // Program address.\n const programAddress = DEPHY_ID_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n token2022Program: {\n value: input.token2022Program ?? null,\n isWritable: false,\n },\n ataProgram: { value: input.ataProgram ?? null, isWritable: false },\n payer: { value: input.payer ?? null, isWritable: true },\n vendor: { value: input.vendor ?? null, isWritable: false },\n productMint: { value: input.productMint ?? null, isWritable: false },\n productAssociatedToken: {\n value: input.productAssociatedToken ?? null,\n isWritable: true,\n },\n device: { value: input.device ?? null, isWritable: false },\n deviceMint: { value: input.deviceMint ?? null, isWritable: true },\n deviceAssociatedToken: {\n value: input.deviceAssociatedToken ?? null,\n isWritable: true,\n },\n owner: { value: input.owner ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n if (!accounts.ataProgram.value) {\n accounts.ataProgram.value =\n 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.token2022Program),\n getAccountMeta(accounts.ataProgram),\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.vendor),\n getAccountMeta(accounts.productMint),\n getAccountMeta(accounts.productAssociatedToken),\n getAccountMeta(accounts.device),\n getAccountMeta(accounts.deviceMint),\n getAccountMeta(accounts.deviceAssociatedToken),\n getAccountMeta(accounts.owner),\n ],\n programAddress,\n data: getCreateActivatedDeviceInstructionDataEncoder().encode(\n args as CreateActivatedDeviceInstructionDataArgs\n ),\n } as CreateActivatedDeviceInstruction<\n typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountSystemProgram,\n TAccountToken2022Program,\n TAccountAtaProgram,\n TAccountPayer,\n TAccountVendor,\n TAccountProductMint,\n TAccountProductAssociatedToken,\n TAccountDevice,\n TAccountDeviceMint,\n TAccountDeviceAssociatedToken,\n TAccountOwner\n >;\n\n return instruction;\n}\n\nexport type ParsedCreateActivatedDeviceInstruction<\n TProgram extends string = typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[],\n> = {\n programAddress: Address;\n accounts: {\n /** The system program */\n systemProgram: TAccountMetas[0];\n /** The SPL Token 2022 program */\n token2022Program: TAccountMetas[1];\n /** The associated token program */\n ataProgram: TAccountMetas[2];\n /** The account paying for the storage fees */\n payer: TAccountMetas[3];\n /** The vendor */\n vendor: TAccountMetas[4];\n /** The mint account for the product */\n productMint: TAccountMetas[5];\n /** The associated token account for the product */\n productAssociatedToken: TAccountMetas[6];\n /** The device */\n device: TAccountMetas[7];\n /** The mint account for the device */\n deviceMint: TAccountMetas[8];\n /** The associated token account for the device */\n deviceAssociatedToken: TAccountMetas[9];\n /** The device's owner */\n owner: TAccountMetas[10];\n };\n data: CreateActivatedDeviceInstructionData;\n};\n\nexport function parseCreateActivatedDeviceInstruction<\n TProgram extends string,\n TAccountMetas extends readonly IAccountMeta[],\n>(\n instruction: IInstruction &\n IInstructionWithAccounts &\n IInstructionWithData\n): ParsedCreateActivatedDeviceInstruction {\n if (instruction.accounts.length < 11) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n systemProgram: getNextAccount(),\n token2022Program: getNextAccount(),\n ataProgram: getNextAccount(),\n payer: getNextAccount(),\n vendor: getNextAccount(),\n productMint: getNextAccount(),\n productAssociatedToken: getNextAccount(),\n device: getNextAccount(),\n deviceMint: getNextAccount(),\n deviceAssociatedToken: getNextAccount(),\n owner: getNextAccount(),\n },\n data: getCreateActivatedDeviceInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport {\n addDecoderSizePrefix,\n addEncoderSizePrefix,\n combineCodec,\n getArrayDecoder,\n getArrayEncoder,\n getStructDecoder,\n getStructEncoder,\n getTupleDecoder,\n getTupleEncoder,\n getU32Decoder,\n getU32Encoder,\n getU8Decoder,\n getU8Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n transformEncoder,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type IAccountMeta,\n type IAccountSignerMeta,\n type IInstruction,\n type IInstructionWithAccounts,\n type IInstructionWithData,\n type ReadonlyAccount,\n type ReadonlySignerAccount,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/web3.js';\nimport { DEPHY_ID_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\nimport {\n getDeviceSigningAlgorithmDecoder,\n getDeviceSigningAlgorithmEncoder,\n type DeviceSigningAlgorithm,\n type DeviceSigningAlgorithmArgs,\n} from '../types';\n\nexport type CreateDeviceInstruction<\n TProgram extends string = typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountSystemProgram extends\n | string\n | IAccountMeta = '11111111111111111111111111111111',\n TAccountToken2022Program extends\n | string\n | IAccountMeta = 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n TAccountAtaProgram extends\n | string\n | IAccountMeta = 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n TAccountPayer extends string | IAccountMeta = string,\n TAccountVendor extends string | IAccountMeta = string,\n TAccountProductMint extends string | IAccountMeta = string,\n TAccountProductAssociatedToken extends string | IAccountMeta = string,\n TAccountDevice extends string | IAccountMeta = string,\n TAccountDeviceMint extends string | IAccountMeta = string,\n TRemainingAccounts extends readonly IAccountMeta[] = [],\n> = IInstruction &\n IInstructionWithData &\n IInstructionWithAccounts<\n [\n TAccountSystemProgram extends string\n ? ReadonlyAccount\n : TAccountSystemProgram,\n TAccountToken2022Program extends string\n ? ReadonlyAccount\n : TAccountToken2022Program,\n TAccountAtaProgram extends string\n ? ReadonlyAccount\n : TAccountAtaProgram,\n TAccountPayer extends string\n ? WritableSignerAccount &\n IAccountSignerMeta\n : TAccountPayer,\n TAccountVendor extends string\n ? ReadonlySignerAccount &\n IAccountSignerMeta\n : TAccountVendor,\n TAccountProductMint extends string\n ? WritableAccount\n : TAccountProductMint,\n TAccountProductAssociatedToken extends string\n ? WritableAccount\n : TAccountProductAssociatedToken,\n TAccountDevice extends string\n ? ReadonlyAccount\n : TAccountDevice,\n TAccountDeviceMint extends string\n ? WritableAccount\n : TAccountDeviceMint,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type CreateDeviceInstructionData = {\n discriminator: number;\n name: string;\n uri: string;\n additionalMetadata: Array;\n signingAlg: DeviceSigningAlgorithm;\n};\n\nexport type CreateDeviceInstructionDataArgs = {\n name: string;\n uri: string;\n additionalMetadata: Array;\n signingAlg: DeviceSigningAlgorithmArgs;\n};\n\nexport function getCreateDeviceInstructionDataEncoder(): Encoder {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', getU8Encoder()],\n ['name', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n ['uri', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n [\n 'additionalMetadata',\n getArrayEncoder(\n getTupleEncoder([\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n ])\n ),\n ],\n ['signingAlg', getDeviceSigningAlgorithmEncoder()],\n ]),\n (value) => ({ ...value, discriminator: 2 })\n );\n}\n\nexport function getCreateDeviceInstructionDataDecoder(): Decoder {\n return getStructDecoder([\n ['discriminator', getU8Decoder()],\n ['name', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n ['uri', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n [\n 'additionalMetadata',\n getArrayDecoder(\n getTupleDecoder([\n addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder()),\n addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder()),\n ])\n ),\n ],\n ['signingAlg', getDeviceSigningAlgorithmDecoder()],\n ]);\n}\n\nexport function getCreateDeviceInstructionDataCodec(): Codec<\n CreateDeviceInstructionDataArgs,\n CreateDeviceInstructionData\n> {\n return combineCodec(\n getCreateDeviceInstructionDataEncoder(),\n getCreateDeviceInstructionDataDecoder()\n );\n}\n\nexport type CreateDeviceInput<\n TAccountSystemProgram extends string = string,\n TAccountToken2022Program extends string = string,\n TAccountAtaProgram extends string = string,\n TAccountPayer extends string = string,\n TAccountVendor extends string = string,\n TAccountProductMint extends string = string,\n TAccountProductAssociatedToken extends string = string,\n TAccountDevice extends string = string,\n TAccountDeviceMint extends string = string,\n> = {\n /** The system program */\n systemProgram?: Address;\n /** The SPL Token 2022 program */\n token2022Program?: Address;\n /** The associated token program */\n ataProgram?: Address;\n /** The account paying for the storage fees */\n payer: TransactionSigner;\n /** The vendor */\n vendor: TransactionSigner;\n /** The mint account of the product */\n productMint: Address;\n /** The associated token account of the product */\n productAssociatedToken: Address;\n /** The device */\n device: Address;\n /** The mint account of the device */\n deviceMint: Address;\n name: CreateDeviceInstructionDataArgs['name'];\n uri: CreateDeviceInstructionDataArgs['uri'];\n additionalMetadata: CreateDeviceInstructionDataArgs['additionalMetadata'];\n signingAlg: CreateDeviceInstructionDataArgs['signingAlg'];\n};\n\nexport function getCreateDeviceInstruction<\n TAccountSystemProgram extends string,\n TAccountToken2022Program extends string,\n TAccountAtaProgram extends string,\n TAccountPayer extends string,\n TAccountVendor extends string,\n TAccountProductMint extends string,\n TAccountProductAssociatedToken extends string,\n TAccountDevice extends string,\n TAccountDeviceMint extends string,\n>(\n input: CreateDeviceInput<\n TAccountSystemProgram,\n TAccountToken2022Program,\n TAccountAtaProgram,\n TAccountPayer,\n TAccountVendor,\n TAccountProductMint,\n TAccountProductAssociatedToken,\n TAccountDevice,\n TAccountDeviceMint\n >\n): CreateDeviceInstruction<\n typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountSystemProgram,\n TAccountToken2022Program,\n TAccountAtaProgram,\n TAccountPayer,\n TAccountVendor,\n TAccountProductMint,\n TAccountProductAssociatedToken,\n TAccountDevice,\n TAccountDeviceMint\n> {\n // Program address.\n const programAddress = DEPHY_ID_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n token2022Program: {\n value: input.token2022Program ?? null,\n isWritable: false,\n },\n ataProgram: { value: input.ataProgram ?? null, isWritable: false },\n payer: { value: input.payer ?? null, isWritable: true },\n vendor: { value: input.vendor ?? null, isWritable: false },\n productMint: { value: input.productMint ?? null, isWritable: true },\n productAssociatedToken: {\n value: input.productAssociatedToken ?? null,\n isWritable: true,\n },\n device: { value: input.device ?? null, isWritable: false },\n deviceMint: { value: input.deviceMint ?? null, isWritable: true },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n if (!accounts.token2022Program.value) {\n accounts.token2022Program.value =\n 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>;\n }\n if (!accounts.ataProgram.value) {\n accounts.ataProgram.value =\n 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.token2022Program),\n getAccountMeta(accounts.ataProgram),\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.vendor),\n getAccountMeta(accounts.productMint),\n getAccountMeta(accounts.productAssociatedToken),\n getAccountMeta(accounts.device),\n getAccountMeta(accounts.deviceMint),\n ],\n programAddress,\n data: getCreateDeviceInstructionDataEncoder().encode(\n args as CreateDeviceInstructionDataArgs\n ),\n } as CreateDeviceInstruction<\n typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountSystemProgram,\n TAccountToken2022Program,\n TAccountAtaProgram,\n TAccountPayer,\n TAccountVendor,\n TAccountProductMint,\n TAccountProductAssociatedToken,\n TAccountDevice,\n TAccountDeviceMint\n >;\n\n return instruction;\n}\n\nexport type ParsedCreateDeviceInstruction<\n TProgram extends string = typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[],\n> = {\n programAddress: Address;\n accounts: {\n /** The system program */\n systemProgram: TAccountMetas[0];\n /** The SPL Token 2022 program */\n token2022Program: TAccountMetas[1];\n /** The associated token program */\n ataProgram: TAccountMetas[2];\n /** The account paying for the storage fees */\n payer: TAccountMetas[3];\n /** The vendor */\n vendor: TAccountMetas[4];\n /** The mint account of the product */\n productMint: TAccountMetas[5];\n /** The associated token account of the product */\n productAssociatedToken: TAccountMetas[6];\n /** The device */\n device: TAccountMetas[7];\n /** The mint account of the device */\n deviceMint: TAccountMetas[8];\n };\n data: CreateDeviceInstructionData;\n};\n\nexport function parseCreateDeviceInstruction<\n TProgram extends string,\n TAccountMetas extends readonly IAccountMeta[],\n>(\n instruction: IInstruction &\n IInstructionWithAccounts &\n IInstructionWithData\n): ParsedCreateDeviceInstruction {\n if (instruction.accounts.length < 9) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n systemProgram: getNextAccount(),\n token2022Program: getNextAccount(),\n ataProgram: getNextAccount(),\n payer: getNextAccount(),\n vendor: getNextAccount(),\n productMint: getNextAccount(),\n productAssociatedToken: getNextAccount(),\n device: getNextAccount(),\n deviceMint: getNextAccount(),\n },\n data: getCreateDeviceInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport {\n addDecoderSizePrefix,\n addEncoderSizePrefix,\n combineCodec,\n getArrayDecoder,\n getArrayEncoder,\n getStructDecoder,\n getStructEncoder,\n getTupleDecoder,\n getTupleEncoder,\n getU32Decoder,\n getU32Encoder,\n getU8Decoder,\n getU8Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n transformEncoder,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type IAccountMeta,\n type IAccountSignerMeta,\n type IInstruction,\n type IInstructionWithAccounts,\n type IInstructionWithData,\n type ReadonlyAccount,\n type ReadonlySignerAccount,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/web3.js';\nimport { DEPHY_ID_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\n\nexport type CreateProductInstruction<\n TProgram extends string = typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountSystemProgram extends\n | string\n | IAccountMeta = '11111111111111111111111111111111',\n TAccountToken2022Program extends\n | string\n | IAccountMeta = 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n TAccountPayer extends string | IAccountMeta = string,\n TAccountVendor extends string | IAccountMeta = string,\n TAccountProductMint extends string | IAccountMeta = string,\n TRemainingAccounts extends readonly IAccountMeta[] = [],\n> = IInstruction &\n IInstructionWithData &\n IInstructionWithAccounts<\n [\n TAccountSystemProgram extends string\n ? ReadonlyAccount\n : TAccountSystemProgram,\n TAccountToken2022Program extends string\n ? ReadonlyAccount\n : TAccountToken2022Program,\n TAccountPayer extends string\n ? WritableSignerAccount &\n IAccountSignerMeta\n : TAccountPayer,\n TAccountVendor extends string\n ? ReadonlySignerAccount &\n IAccountSignerMeta\n : TAccountVendor,\n TAccountProductMint extends string\n ? WritableAccount\n : TAccountProductMint,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type CreateProductInstructionData = {\n discriminator: number;\n name: string;\n symbol: string;\n uri: string;\n additionalMetadata: Array;\n};\n\nexport type CreateProductInstructionDataArgs = {\n name: string;\n symbol: string;\n uri: string;\n additionalMetadata: Array;\n};\n\nexport function getCreateProductInstructionDataEncoder(): Encoder {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', getU8Encoder()],\n ['name', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n ['symbol', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n ['uri', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n [\n 'additionalMetadata',\n getArrayEncoder(\n getTupleEncoder([\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n ])\n ),\n ],\n ]),\n (value) => ({ ...value, discriminator: 1 })\n );\n}\n\nexport function getCreateProductInstructionDataDecoder(): Decoder {\n return getStructDecoder([\n ['discriminator', getU8Decoder()],\n ['name', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n ['symbol', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n ['uri', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n [\n 'additionalMetadata',\n getArrayDecoder(\n getTupleDecoder([\n addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder()),\n addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder()),\n ])\n ),\n ],\n ]);\n}\n\nexport function getCreateProductInstructionDataCodec(): Codec<\n CreateProductInstructionDataArgs,\n CreateProductInstructionData\n> {\n return combineCodec(\n getCreateProductInstructionDataEncoder(),\n getCreateProductInstructionDataDecoder()\n );\n}\n\nexport type CreateProductInput<\n TAccountSystemProgram extends string = string,\n TAccountToken2022Program extends string = string,\n TAccountPayer extends string = string,\n TAccountVendor extends string = string,\n TAccountProductMint extends string = string,\n> = {\n /** The system program */\n systemProgram?: Address;\n /** The SPL Token 2022 program */\n token2022Program?: Address;\n /** The account paying for the storage fees */\n payer: TransactionSigner;\n /** The vendor */\n vendor: TransactionSigner;\n /** The mint account of the product */\n productMint: Address;\n name: CreateProductInstructionDataArgs['name'];\n symbol: CreateProductInstructionDataArgs['symbol'];\n uri: CreateProductInstructionDataArgs['uri'];\n additionalMetadata: CreateProductInstructionDataArgs['additionalMetadata'];\n};\n\nexport function getCreateProductInstruction<\n TAccountSystemProgram extends string,\n TAccountToken2022Program extends string,\n TAccountPayer extends string,\n TAccountVendor extends string,\n TAccountProductMint extends string,\n>(\n input: CreateProductInput<\n TAccountSystemProgram,\n TAccountToken2022Program,\n TAccountPayer,\n TAccountVendor,\n TAccountProductMint\n >\n): CreateProductInstruction<\n typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountSystemProgram,\n TAccountToken2022Program,\n TAccountPayer,\n TAccountVendor,\n TAccountProductMint\n> {\n // Program address.\n const programAddress = DEPHY_ID_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n token2022Program: {\n value: input.token2022Program ?? null,\n isWritable: false,\n },\n payer: { value: input.payer ?? null, isWritable: true },\n vendor: { value: input.vendor ?? null, isWritable: false },\n productMint: { value: input.productMint ?? null, isWritable: true },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n if (!accounts.token2022Program.value) {\n accounts.token2022Program.value =\n 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.token2022Program),\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.vendor),\n getAccountMeta(accounts.productMint),\n ],\n programAddress,\n data: getCreateProductInstructionDataEncoder().encode(\n args as CreateProductInstructionDataArgs\n ),\n } as CreateProductInstruction<\n typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountSystemProgram,\n TAccountToken2022Program,\n TAccountPayer,\n TAccountVendor,\n TAccountProductMint\n >;\n\n return instruction;\n}\n\nexport type ParsedCreateProductInstruction<\n TProgram extends string = typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[],\n> = {\n programAddress: Address;\n accounts: {\n /** The system program */\n systemProgram: TAccountMetas[0];\n /** The SPL Token 2022 program */\n token2022Program: TAccountMetas[1];\n /** The account paying for the storage fees */\n payer: TAccountMetas[2];\n /** The vendor */\n vendor: TAccountMetas[3];\n /** The mint account of the product */\n productMint: TAccountMetas[4];\n };\n data: CreateProductInstructionData;\n};\n\nexport function parseCreateProductInstruction<\n TProgram extends string,\n TAccountMetas extends readonly IAccountMeta[],\n>(\n instruction: IInstruction &\n IInstructionWithAccounts &\n IInstructionWithData\n): ParsedCreateProductInstruction {\n if (instruction.accounts.length < 5) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n systemProgram: getNextAccount(),\n token2022Program: getNextAccount(),\n payer: getNextAccount(),\n vendor: getNextAccount(),\n productMint: getNextAccount(),\n },\n data: getCreateProductInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport {\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU8Decoder,\n getU8Encoder,\n transformEncoder,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type IAccountMeta,\n type IAccountSignerMeta,\n type IInstruction,\n type IInstructionWithAccounts,\n type IInstructionWithData,\n type ReadonlyAccount,\n type ReadonlySignerAccount,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/web3.js';\nimport { DEPHY_ID_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\n\nexport type InitializeInstruction<\n TProgram extends string = typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountSystemProgram extends\n | string\n | IAccountMeta = '11111111111111111111111111111111',\n TAccountPayer extends string | IAccountMeta = string,\n TAccountProgramData extends string | IAccountMeta = string,\n TAccountAuthority extends string | IAccountMeta = string,\n TRemainingAccounts extends readonly IAccountMeta[] = [],\n> = IInstruction &\n IInstructionWithData &\n IInstructionWithAccounts<\n [\n TAccountSystemProgram extends string\n ? ReadonlyAccount\n : TAccountSystemProgram,\n TAccountPayer extends string\n ? WritableSignerAccount &\n IAccountSignerMeta\n : TAccountPayer,\n TAccountProgramData extends string\n ? WritableAccount\n : TAccountProgramData,\n TAccountAuthority extends string\n ? ReadonlySignerAccount &\n IAccountSignerMeta\n : TAccountAuthority,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type InitializeInstructionData = { discriminator: number; bump: number };\n\nexport type InitializeInstructionDataArgs = { bump: number };\n\nexport function getInitializeInstructionDataEncoder(): Encoder {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', getU8Encoder()],\n ['bump', getU8Encoder()],\n ]),\n (value) => ({ ...value, discriminator: 0 })\n );\n}\n\nexport function getInitializeInstructionDataDecoder(): Decoder {\n return getStructDecoder([\n ['discriminator', getU8Decoder()],\n ['bump', getU8Decoder()],\n ]);\n}\n\nexport function getInitializeInstructionDataCodec(): Codec<\n InitializeInstructionDataArgs,\n InitializeInstructionData\n> {\n return combineCodec(\n getInitializeInstructionDataEncoder(),\n getInitializeInstructionDataDecoder()\n );\n}\n\nexport type InitializeInput<\n TAccountSystemProgram extends string = string,\n TAccountPayer extends string = string,\n TAccountProgramData extends string = string,\n TAccountAuthority extends string = string,\n> = {\n /** The system program */\n systemProgram?: Address;\n /** The account paying for the storage fees */\n payer: TransactionSigner;\n /** The program data account for the program */\n programData: Address;\n /** The authority account of the program */\n authority: TransactionSigner;\n bump: InitializeInstructionDataArgs['bump'];\n};\n\nexport function getInitializeInstruction<\n TAccountSystemProgram extends string,\n TAccountPayer extends string,\n TAccountProgramData extends string,\n TAccountAuthority extends string,\n>(\n input: InitializeInput<\n TAccountSystemProgram,\n TAccountPayer,\n TAccountProgramData,\n TAccountAuthority\n >\n): InitializeInstruction<\n typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountSystemProgram,\n TAccountPayer,\n TAccountProgramData,\n TAccountAuthority\n> {\n // Program address.\n const programAddress = DEPHY_ID_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n payer: { value: input.payer ?? null, isWritable: true },\n programData: { value: input.programData ?? null, isWritable: true },\n authority: { value: input.authority ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.programData),\n getAccountMeta(accounts.authority),\n ],\n programAddress,\n data: getInitializeInstructionDataEncoder().encode(\n args as InitializeInstructionDataArgs\n ),\n } as InitializeInstruction<\n typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountSystemProgram,\n TAccountPayer,\n TAccountProgramData,\n TAccountAuthority\n >;\n\n return instruction;\n}\n\nexport type ParsedInitializeInstruction<\n TProgram extends string = typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[],\n> = {\n programAddress: Address;\n accounts: {\n /** The system program */\n systemProgram: TAccountMetas[0];\n /** The account paying for the storage fees */\n payer: TAccountMetas[1];\n /** The program data account for the program */\n programData: TAccountMetas[2];\n /** The authority account of the program */\n authority: TAccountMetas[3];\n };\n data: InitializeInstructionData;\n};\n\nexport function parseInitializeInstruction<\n TProgram extends string,\n TAccountMetas extends readonly IAccountMeta[],\n>(\n instruction: IInstruction &\n IInstructionWithAccounts &\n IInstructionWithData\n): ParsedInitializeInstruction {\n if (instruction.accounts.length < 4) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n systemProgram: getNextAccount(),\n payer: getNextAccount(),\n programData: getNextAccount(),\n authority: getNextAccount(),\n },\n data: getInitializeInstructionDataDecoder().decode(instruction.data),\n };\n}\n"]} \ No newline at end of file +{"version":3,"sources":["../../env-shim.ts","../../src/generated/accounts/programDataAccount.ts","../../src/generated/pdas/deviceAToken.ts","../../src/generated/pdas/deviceMint.ts","../../src/generated/pdas/productAToken.ts","../../src/generated/pdas/productMint.ts","../../src/generated/pdas/programData.ts","../../src/generated/pdas/programDataAccount.ts","../../src/generated/types/deviceActivationSignature.ts","../../src/generated/types/deviceSigningAlgorithm.ts","../../src/generated/types/key.ts","../../src/generated/types/programData.ts","../../src/generated/errors/dephyId.ts","../../src/generated/instructions/activateDevice.ts","../../src/generated/programs/dephyId.ts","../../src/generated/shared/index.ts","../../src/generated/instructions/createActivatedDevice.ts","../../src/generated/instructions/createDevice.ts","../../src/generated/instructions/createProduct.ts","../../src/generated/instructions/initialize.ts"],"names":["combineCodec","getAddressEncoder","getStructDecoder","getStructEncoder","getProgramDerivedAddress","address","getUtf8Encoder","DeviceSigningAlgorithm","getEnumDecoder","getEnumEncoder","Key","getU8Decoder","getU8Encoder","transformEncoder","DephyIdAccount","DephyIdInstruction","getTupleDecoder","getTupleEncoder","addDecoderSizePrefix","addEncoderSizePrefix","getArrayDecoder","getArrayEnc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AY,IAAI;AAAA,EACrE;AACF","sourcesContent":["// Clever obfuscation to prevent the build system from inlining the value of `NODE_ENV`\nexport const __DEV__ = /* @__PURE__ */ (() =>\n (process as any)['en' + 'v'].NODE_ENV === 'development')();\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport {\n assertAccountExists,\n assertAccountsExist,\n combineCodec,\n decodeAccount,\n fetchEncodedAccount,\n fetchEncodedAccounts,\n getAddressDecoder,\n getAddressEncoder,\n getStructDecoder,\n getStructEncoder,\n transformEncoder,\n type Account,\n type Address,\n type Codec,\n type Decoder,\n type EncodedAccount,\n type Encoder,\n type FetchAccountConfig,\n type FetchAccountsConfig,\n type MaybeAccount,\n type MaybeEncodedAccount,\n} from '@solana/web3.js';\nimport { findProgramDataAccountPda } from '../pdas';\nimport {\n Key,\n getKeyDecoder,\n getKeyEncoder,\n getProgramDataDecoder,\n getProgramDataEncoder,\n type ProgramData,\n type ProgramDataArgs,\n} from '../types';\n\nexport type ProgramDataAccount = {\n key: Key;\n authority: Address;\n data: ProgramData;\n};\n\nexport type ProgramDataAccountArgs = {\n authority: Address;\n data: ProgramDataArgs;\n};\n\nexport function getProgramDataAccountEncoder(): Encoder {\n return transformEncoder(\n getStructEncoder([\n ['key', getKeyEncoder()],\n ['authority', getAddressEncoder()],\n ['data', getProgramDataEncoder()],\n ]),\n (value) => ({ ...value, key: Key.ProgramDataAccount })\n );\n}\n\nexport function getProgramDataAccountDecoder(): Decoder {\n return getStructDecoder([\n ['key', getKeyDecoder()],\n ['authority', getAddressDecoder()],\n ['data', getProgramDataDecoder()],\n ]);\n}\n\nexport function getProgramDataAccountCodec(): Codec<\n ProgramDataAccountArgs,\n ProgramDataAccount\n> {\n return combineCodec(\n getProgramDataAccountEncoder(),\n getProgramDataAccountDecoder()\n );\n}\n\nexport function decodeProgramDataAccount(\n encodedAccount: EncodedAccount\n): Account;\nexport function decodeProgramDataAccount(\n encodedAccount: MaybeEncodedAccount\n): MaybeAccount;\nexport function decodeProgramDataAccount(\n encodedAccount: EncodedAccount | MaybeEncodedAccount\n):\n | Account\n | MaybeAccount {\n return decodeAccount(\n encodedAccount as MaybeEncodedAccount,\n getProgramDataAccountDecoder()\n );\n}\n\nexport async function fetchProgramDataAccount(\n rpc: Parameters[0],\n address: Address,\n config?: FetchAccountConfig\n): Promise> {\n const maybeAccount = await fetchMaybeProgramDataAccount(rpc, address, config);\n assertAccountExists(maybeAccount);\n return maybeAccount;\n}\n\nexport async function fetchMaybeProgramDataAccount<\n TAddress extends string = string,\n>(\n rpc: Parameters[0],\n address: Address,\n config?: FetchAccountConfig\n): Promise> {\n const maybeAccount = await fetchEncodedAccount(rpc, address, config);\n return decodeProgramDataAccount(maybeAccount);\n}\n\nexport async function fetchAllProgramDataAccount(\n rpc: Parameters[0],\n addresses: Array
,\n config?: FetchAccountsConfig\n): Promise[]> {\n const maybeAccounts = await fetchAllMaybeProgramDataAccount(\n rpc,\n addresses,\n config\n );\n assertAccountsExist(maybeAccounts);\n return maybeAccounts;\n}\n\nexport async function fetchAllMaybeProgramDataAccount(\n rpc: Parameters[0],\n addresses: Array
,\n config?: FetchAccountsConfig\n): Promise[]> {\n const maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);\n return maybeAccounts.map((maybeAccount) =>\n decodeProgramDataAccount(maybeAccount)\n );\n}\n\nexport function getProgramDataAccountSize(): number {\n return 34;\n}\n\nexport async function fetchProgramDataAccountFromSeeds(\n rpc: Parameters[0],\n config: FetchAccountConfig & { programAddress?: Address } = {}\n): Promise> {\n const maybeAccount = await fetchMaybeProgramDataAccountFromSeeds(rpc, config);\n assertAccountExists(maybeAccount);\n return maybeAccount;\n}\n\nexport async function fetchMaybeProgramDataAccountFromSeeds(\n rpc: Parameters[0],\n config: FetchAccountConfig & { programAddress?: Address } = {}\n): Promise> {\n const { programAddress, ...fetchConfig } = config;\n const [address] = await findProgramDataAccountPda({ programAddress });\n return await fetchMaybeProgramDataAccount(rpc, address, fetchConfig);\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport {\n address,\n getAddressEncoder,\n getProgramDerivedAddress,\n type Address,\n type ProgramDerivedAddress,\n} from '@solana/web3.js';\n\nexport type DeviceATokenSeeds = {\n ownerPubkey: Address;\n\n deviceMintPubkey: Address;\n};\n\nexport async function findDeviceATokenPda(\n seeds: DeviceATokenSeeds,\n config: { programAddress?: Address | undefined } = {}\n): Promise {\n const {\n programAddress = 'hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1' as Address<'hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1'>,\n } = config;\n return await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getAddressEncoder().encode(seeds.ownerPubkey),\n getAddressEncoder().encode(\n address('TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb')\n ),\n getAddressEncoder().encode(seeds.deviceMintPubkey),\n ],\n });\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport {\n getAddressEncoder,\n getProgramDerivedAddress,\n getUtf8Encoder,\n type Address,\n type ProgramDerivedAddress,\n} from '@solana/web3.js';\n\nexport type DeviceMintSeeds = {\n productMintPubkey: Address;\n\n devicePubkey: Address;\n};\n\nexport async function findDeviceMintPda(\n seeds: DeviceMintSeeds,\n config: { programAddress?: Address | undefined } = {}\n): Promise {\n const {\n programAddress = 'hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1' as Address<'hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1'>,\n } = config;\n return await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getUtf8Encoder().encode('DePHY_ID-DEVICE'),\n getAddressEncoder().encode(seeds.productMintPubkey),\n getAddressEncoder().encode(seeds.devicePubkey),\n ],\n });\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport {\n address,\n getAddressEncoder,\n getProgramDerivedAddress,\n type Address,\n type ProgramDerivedAddress,\n} from '@solana/web3.js';\n\nexport type ProductATokenSeeds = {\n devicePubkey: Address;\n\n productMintPubkey: Address;\n};\n\nexport async function findProductATokenPda(\n seeds: ProductATokenSeeds,\n config: { programAddress?: Address | undefined } = {}\n): Promise {\n const {\n programAddress = 'hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1' as Address<'hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1'>,\n } = config;\n return await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getAddressEncoder().encode(seeds.devicePubkey),\n getAddressEncoder().encode(\n address('TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb')\n ),\n getAddressEncoder().encode(seeds.productMintPubkey),\n ],\n });\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport {\n getAddressEncoder,\n getProgramDerivedAddress,\n getUtf8Encoder,\n type Address,\n type ProgramDerivedAddress,\n} from '@solana/web3.js';\n\nexport type ProductMintSeeds = {\n vendorPubkey: Address;\n\n productName: string;\n};\n\nexport async function findProductMintPda(\n seeds: ProductMintSeeds,\n config: { programAddress?: Address | undefined } = {}\n): Promise {\n const {\n programAddress = 'hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1' as Address<'hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1'>,\n } = config;\n return await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getUtf8Encoder().encode('DePHY_ID-PRODUCT'),\n getAddressEncoder().encode(seeds.vendorPubkey),\n getUtf8Encoder().encode(seeds.productName),\n ],\n });\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport {\n getProgramDerivedAddress,\n getUtf8Encoder,\n type Address,\n type ProgramDerivedAddress,\n} from '@solana/web3.js';\n\nexport async function findProgramDataPda(\n config: { programAddress?: Address | undefined } = {}\n): Promise {\n const {\n programAddress = 'hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1' as Address<'hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1'>,\n } = config;\n return await getProgramDerivedAddress({\n programAddress,\n seeds: [getUtf8Encoder().encode('DePHY_ID')],\n });\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport {\n getProgramDerivedAddress,\n getUtf8Encoder,\n type Address,\n type ProgramDerivedAddress,\n} from '@solana/web3.js';\n\nexport async function findProgramDataAccountPda(\n config: { programAddress?: Address | undefined } = {}\n): Promise {\n const {\n programAddress = 'hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1' as Address<'hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1'>,\n } = config;\n return await getProgramDerivedAddress({\n programAddress,\n seeds: [getUtf8Encoder().encode('DePHY_ID')],\n });\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getBytesDecoder,\n getBytesEncoder,\n getDiscriminatedUnionDecoder,\n getDiscriminatedUnionEncoder,\n getStructDecoder,\n getStructEncoder,\n getTupleDecoder,\n getTupleEncoder,\n getU8Decoder,\n getU8Encoder,\n type Codec,\n type Decoder,\n type Encoder,\n type GetDiscriminatedUnionVariant,\n type GetDiscriminatedUnionVariantContent,\n type ReadonlyUint8Array,\n} from '@solana/web3.js';\n\nexport type DeviceActivationSignature =\n | { __kind: 'Ed25519'; fields: readonly [ReadonlyUint8Array] }\n | { __kind: 'Secp256k1'; fields: readonly [ReadonlyUint8Array, number] }\n | { __kind: 'EthSecp256k1'; fields: readonly [ReadonlyUint8Array, number] };\n\nexport type DeviceActivationSignatureArgs = DeviceActivationSignature;\n\nexport function getDeviceActivationSignatureEncoder(): Encoder {\n return getDiscriminatedUnionEncoder([\n [\n 'Ed25519',\n getStructEncoder([\n ['fields', getTupleEncoder([fixEncoderSize(getBytesEncoder(), 64)])],\n ]),\n ],\n [\n 'Secp256k1',\n getStructEncoder([\n [\n 'fields',\n getTupleEncoder([\n fixEncoderSize(getBytesEncoder(), 64),\n getU8Encoder(),\n ]),\n ],\n ]),\n ],\n [\n 'EthSecp256k1',\n getStructEncoder([\n [\n 'fields',\n getTupleEncoder([\n fixEncoderSize(getBytesEncoder(), 64),\n getU8Encoder(),\n ]),\n ],\n ]),\n ],\n ]);\n}\n\nexport function getDeviceActivationSignatureDecoder(): Decoder {\n return getDiscriminatedUnionDecoder([\n [\n 'Ed25519',\n getStructDecoder([\n ['fields', getTupleDecoder([fixDecoderSize(getBytesDecoder(), 64)])],\n ]),\n ],\n [\n 'Secp256k1',\n getStructDecoder([\n [\n 'fields',\n getTupleDecoder([\n fixDecoderSize(getBytesDecoder(), 64),\n getU8Decoder(),\n ]),\n ],\n ]),\n ],\n [\n 'EthSecp256k1',\n getStructDecoder([\n [\n 'fields',\n getTupleDecoder([\n fixDecoderSize(getBytesDecoder(), 64),\n getU8Decoder(),\n ]),\n ],\n ]),\n ],\n ]);\n}\n\nexport function getDeviceActivationSignatureCodec(): Codec<\n DeviceActivationSignatureArgs,\n DeviceActivationSignature\n> {\n return combineCodec(\n getDeviceActivationSignatureEncoder(),\n getDeviceActivationSignatureDecoder()\n );\n}\n\n// Data Enum Helpers.\nexport function deviceActivationSignature(\n kind: 'Ed25519',\n data: GetDiscriminatedUnionVariantContent<\n DeviceActivationSignatureArgs,\n '__kind',\n 'Ed25519'\n >['fields']\n): GetDiscriminatedUnionVariant<\n DeviceActivationSignatureArgs,\n '__kind',\n 'Ed25519'\n>;\nexport function deviceActivationSignature(\n kind: 'Secp256k1',\n data: GetDiscriminatedUnionVariantContent<\n DeviceActivationSignatureArgs,\n '__kind',\n 'Secp256k1'\n >['fields']\n): GetDiscriminatedUnionVariant<\n DeviceActivationSignatureArgs,\n '__kind',\n 'Secp256k1'\n>;\nexport function deviceActivationSignature(\n kind: 'EthSecp256k1',\n data: GetDiscriminatedUnionVariantContent<\n DeviceActivationSignatureArgs,\n '__kind',\n 'EthSecp256k1'\n >['fields']\n): GetDiscriminatedUnionVariant<\n DeviceActivationSignatureArgs,\n '__kind',\n 'EthSecp256k1'\n>;\nexport function deviceActivationSignature<\n K extends DeviceActivationSignatureArgs['__kind'],\n Data,\n>(kind: K, data?: Data) {\n return Array.isArray(data)\n ? { __kind: kind, fields: data }\n : { __kind: kind, ...(data ?? {}) };\n}\n\nexport function isDeviceActivationSignature<\n K extends DeviceActivationSignature['__kind'],\n>(\n kind: K,\n value: DeviceActivationSignature\n): value is DeviceActivationSignature & { __kind: K } {\n return value.__kind === kind;\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport {\n combineCodec,\n getEnumDecoder,\n getEnumEncoder,\n type Codec,\n type Decoder,\n type Encoder,\n} from '@solana/web3.js';\n\nexport enum DeviceSigningAlgorithm {\n Ed25519,\n Secp256k1,\n}\n\nexport type DeviceSigningAlgorithmArgs = DeviceSigningAlgorithm;\n\nexport function getDeviceSigningAlgorithmEncoder(): Encoder {\n return getEnumEncoder(DeviceSigningAlgorithm);\n}\n\nexport function getDeviceSigningAlgorithmDecoder(): Decoder {\n return getEnumDecoder(DeviceSigningAlgorithm);\n}\n\nexport function getDeviceSigningAlgorithmCodec(): Codec<\n DeviceSigningAlgorithmArgs,\n DeviceSigningAlgorithm\n> {\n return combineCodec(\n getDeviceSigningAlgorithmEncoder(),\n getDeviceSigningAlgorithmDecoder()\n );\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport {\n combineCodec,\n getEnumDecoder,\n getEnumEncoder,\n type Codec,\n type Decoder,\n type Encoder,\n} from '@solana/web3.js';\n\nexport enum Key {\n Uninitialized,\n ProgramDataAccount,\n}\n\nexport type KeyArgs = Key;\n\nexport function getKeyEncoder(): Encoder {\n return getEnumEncoder(Key);\n}\n\nexport function getKeyDecoder(): Decoder {\n return getEnumDecoder(Key);\n}\n\nexport function getKeyCodec(): Codec {\n return combineCodec(getKeyEncoder(), getKeyDecoder());\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport {\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU8Decoder,\n getU8Encoder,\n type Codec,\n type Decoder,\n type Encoder,\n} from '@solana/web3.js';\n\nexport type ProgramData = { bump: number };\n\nexport type ProgramDataArgs = ProgramData;\n\nexport function getProgramDataEncoder(): Encoder {\n return getStructEncoder([['bump', getU8Encoder()]]);\n}\n\nexport function getProgramDataDecoder(): Decoder {\n return getStructDecoder([['bump', getU8Decoder()]]);\n}\n\nexport function getProgramDataCodec(): Codec {\n return combineCodec(getProgramDataEncoder(), getProgramDataDecoder());\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\n/** DeserializationError: Error deserializing an account */\nexport const DEPHY_ID_ERROR__DESERIALIZATION_ERROR = 0x0; // 0\n/** SerializationError: Error serializing an account */\nexport const DEPHY_ID_ERROR__SERIALIZATION_ERROR = 0x1; // 1\n/** InvalidProgramOwner: Invalid program owner. This likely mean the provided account does not exist */\nexport const DEPHY_ID_ERROR__INVALID_PROGRAM_OWNER = 0x2; // 2\n/** InvalidPda: Invalid PDA derivation */\nexport const DEPHY_ID_ERROR__INVALID_PDA = 0x3; // 3\n/** ExpectedEmptyAccount: Expected empty account */\nexport const DEPHY_ID_ERROR__EXPECTED_EMPTY_ACCOUNT = 0x4; // 4\n/** ExpectedNonEmptyAccount: Expected non empty account */\nexport const DEPHY_ID_ERROR__EXPECTED_NON_EMPTY_ACCOUNT = 0x5; // 5\n/** ExpectedSignerAccount: Expected signer account */\nexport const DEPHY_ID_ERROR__EXPECTED_SIGNER_ACCOUNT = 0x6; // 6\n/** ExpectedWritableAccount: Expected writable account */\nexport const DEPHY_ID_ERROR__EXPECTED_WRITABLE_ACCOUNT = 0x7; // 7\n/** AccountMismatch: Account mismatch */\nexport const DEPHY_ID_ERROR__ACCOUNT_MISMATCH = 0x8; // 8\n/** InvalidAccountKey: Invalid account key */\nexport const DEPHY_ID_ERROR__INVALID_ACCOUNT_KEY = 0x9; // 9\n/** NumericalOverflow: Numerical overflow */\nexport const DEPHY_ID_ERROR__NUMERICAL_OVERFLOW = 0xa; // 10\n/** MissingInstruction: Missing instruction */\nexport const DEPHY_ID_ERROR__MISSING_INSTRUCTION = 0xb; // 11\n/** SignatureMismatch: Signature mismatch */\nexport const DEPHY_ID_ERROR__SIGNATURE_MISMATCH = 0xc; // 12\n\nexport type DephyIdError =\n | typeof DEPHY_ID_ERROR__ACCOUNT_MISMATCH\n | typeof DEPHY_ID_ERROR__DESERIALIZATION_ERROR\n | typeof DEPHY_ID_ERROR__EXPECTED_EMPTY_ACCOUNT\n | typeof DEPHY_ID_ERROR__EXPECTED_NON_EMPTY_ACCOUNT\n | typeof DEPHY_ID_ERROR__EXPECTED_SIGNER_ACCOUNT\n | typeof DEPHY_ID_ERROR__EXPECTED_WRITABLE_ACCOUNT\n | typeof DEPHY_ID_ERROR__INVALID_ACCOUNT_KEY\n | typeof DEPHY_ID_ERROR__INVALID_PDA\n | typeof DEPHY_ID_ERROR__INVALID_PROGRAM_OWNER\n | typeof DEPHY_ID_ERROR__MISSING_INSTRUCTION\n | typeof DEPHY_ID_ERROR__NUMERICAL_OVERFLOW\n | typeof DEPHY_ID_ERROR__SERIALIZATION_ERROR\n | typeof DEPHY_ID_ERROR__SIGNATURE_MISMATCH;\n\nlet dephyIdErrorMessages: Record | undefined;\nif (__DEV__) {\n dephyIdErrorMessages = {\n [DEPHY_ID_ERROR__ACCOUNT_MISMATCH]: `Account mismatch`,\n [DEPHY_ID_ERROR__DESERIALIZATION_ERROR]: `Error deserializing an account`,\n [DEPHY_ID_ERROR__EXPECTED_EMPTY_ACCOUNT]: `Expected empty account`,\n [DEPHY_ID_ERROR__EXPECTED_NON_EMPTY_ACCOUNT]: `Expected non empty account`,\n [DEPHY_ID_ERROR__EXPECTED_SIGNER_ACCOUNT]: `Expected signer account`,\n [DEPHY_ID_ERROR__EXPECTED_WRITABLE_ACCOUNT]: `Expected writable account`,\n [DEPHY_ID_ERROR__INVALID_ACCOUNT_KEY]: `Invalid account key`,\n [DEPHY_ID_ERROR__INVALID_PDA]: `Invalid PDA derivation`,\n [DEPHY_ID_ERROR__INVALID_PROGRAM_OWNER]: `Invalid program owner. This likely mean the provided account does not exist`,\n [DEPHY_ID_ERROR__MISSING_INSTRUCTION]: `Missing instruction`,\n [DEPHY_ID_ERROR__NUMERICAL_OVERFLOW]: `Numerical overflow`,\n [DEPHY_ID_ERROR__SERIALIZATION_ERROR]: `Error serializing an account`,\n [DEPHY_ID_ERROR__SIGNATURE_MISMATCH]: `Signature mismatch`,\n };\n}\n\nexport function getDephyIdErrorMessage(code: DephyIdError): string {\n if (__DEV__) {\n return (dephyIdErrorMessages as Record)[code];\n }\n\n return 'Error message not available in production bundles. Compile with `__DEV__` set to true to see more information.';\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport {\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU64Decoder,\n getU64Encoder,\n getU8Decoder,\n getU8Encoder,\n transformEncoder,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type IAccountMeta,\n type IAccountSignerMeta,\n type IInstruction,\n type IInstructionWithAccounts,\n type IInstructionWithData,\n type ReadonlyAccount,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/web3.js';\nimport { DEPHY_ID_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\nimport {\n getDeviceActivationSignatureDecoder,\n getDeviceActivationSignatureEncoder,\n type DeviceActivationSignature,\n type DeviceActivationSignatureArgs,\n} from '../types';\n\nexport type ActivateDeviceInstruction<\n TProgram extends string = typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountSystemProgram extends\n | string\n | IAccountMeta = '11111111111111111111111111111111',\n TAccountToken2022Program extends\n | string\n | IAccountMeta = 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n TAccountAtaProgram extends\n | string\n | IAccountMeta = 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n TAccountPayer extends string | IAccountMeta = string,\n TAccountVendor extends string | IAccountMeta = string,\n TAccountProductMint extends string | IAccountMeta = string,\n TAccountProductAssociatedToken extends string | IAccountMeta = string,\n TAccountDevice extends string | IAccountMeta = string,\n TAccountDeviceMint extends string | IAccountMeta = string,\n TAccountDeviceAssociatedToken extends string | IAccountMeta = string,\n TAccountOwner extends string | IAccountMeta = string,\n TRemainingAccounts extends readonly IAccountMeta[] = [],\n> = IInstruction &\n IInstructionWithData &\n IInstructionWithAccounts<\n [\n TAccountSystemProgram extends string\n ? ReadonlyAccount\n : TAccountSystemProgram,\n TAccountToken2022Program extends string\n ? ReadonlyAccount\n : TAccountToken2022Program,\n TAccountAtaProgram extends string\n ? ReadonlyAccount\n : TAccountAtaProgram,\n TAccountPayer extends string\n ? WritableSignerAccount &\n IAccountSignerMeta\n : TAccountPayer,\n TAccountVendor extends string\n ? ReadonlyAccount\n : TAccountVendor,\n TAccountProductMint extends string\n ? ReadonlyAccount\n : TAccountProductMint,\n TAccountProductAssociatedToken extends string\n ? ReadonlyAccount\n : TAccountProductAssociatedToken,\n TAccountDevice extends string\n ? ReadonlyAccount\n : TAccountDevice,\n TAccountDeviceMint extends string\n ? WritableAccount\n : TAccountDeviceMint,\n TAccountDeviceAssociatedToken extends string\n ? WritableAccount\n : TAccountDeviceAssociatedToken,\n TAccountOwner extends string\n ? ReadonlyAccount\n : TAccountOwner,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type ActivateDeviceInstructionData = {\n discriminator: number;\n signature: DeviceActivationSignature;\n timestamp: bigint;\n};\n\nexport type ActivateDeviceInstructionDataArgs = {\n signature: DeviceActivationSignatureArgs;\n timestamp: number | bigint;\n};\n\nexport function getActivateDeviceInstructionDataEncoder(): Encoder {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', getU8Encoder()],\n ['signature', getDeviceActivationSignatureEncoder()],\n ['timestamp', getU64Encoder()],\n ]),\n (value) => ({ ...value, discriminator: 3 })\n );\n}\n\nexport function getActivateDeviceInstructionDataDecoder(): Decoder {\n return getStructDecoder([\n ['discriminator', getU8Decoder()],\n ['signature', getDeviceActivationSignatureDecoder()],\n ['timestamp', getU64Decoder()],\n ]);\n}\n\nexport function getActivateDeviceInstructionDataCodec(): Codec<\n ActivateDeviceInstructionDataArgs,\n ActivateDeviceInstructionData\n> {\n return combineCodec(\n getActivateDeviceInstructionDataEncoder(),\n getActivateDeviceInstructionDataDecoder()\n );\n}\n\nexport type ActivateDeviceInput<\n TAccountSystemProgram extends string = string,\n TAccountToken2022Program extends string = string,\n TAccountAtaProgram extends string = string,\n TAccountPayer extends string = string,\n TAccountVendor extends string = string,\n TAccountProductMint extends string = string,\n TAccountProductAssociatedToken extends string = string,\n TAccountDevice extends string = string,\n TAccountDeviceMint extends string = string,\n TAccountDeviceAssociatedToken extends string = string,\n TAccountOwner extends string = string,\n> = {\n /** The system program */\n systemProgram?: Address;\n /** The SPL Token 2022 program */\n token2022Program?: Address;\n /** The associated token program */\n ataProgram?: Address;\n /** The account paying for the storage fees */\n payer: TransactionSigner;\n /** The vendor */\n vendor: Address;\n /** The mint account for the product */\n productMint: Address;\n /** The associated token account for the product */\n productAssociatedToken: Address;\n /** The device */\n device: Address;\n /** The mint account for the device */\n deviceMint: Address;\n /** The associated token account for the device */\n deviceAssociatedToken: Address;\n /** The device's owner */\n owner: Address;\n signature: ActivateDeviceInstructionDataArgs['signature'];\n timestamp: ActivateDeviceInstructionDataArgs['timestamp'];\n};\n\nexport function getActivateDeviceInstruction<\n TAccountSystemProgram extends string,\n TAccountToken2022Program extends string,\n TAccountAtaProgram extends string,\n TAccountPayer extends string,\n TAccountVendor extends string,\n TAccountProductMint extends string,\n TAccountProductAssociatedToken extends string,\n TAccountDevice extends string,\n TAccountDeviceMint extends string,\n TAccountDeviceAssociatedToken extends string,\n TAccountOwner extends string,\n>(\n input: ActivateDeviceInput<\n TAccountSystemProgram,\n TAccountToken2022Program,\n TAccountAtaProgram,\n TAccountPayer,\n TAccountVendor,\n TAccountProductMint,\n TAccountProductAssociatedToken,\n TAccountDevice,\n TAccountDeviceMint,\n TAccountDeviceAssociatedToken,\n TAccountOwner\n >\n): ActivateDeviceInstruction<\n typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountSystemProgram,\n TAccountToken2022Program,\n TAccountAtaProgram,\n TAccountPayer,\n TAccountVendor,\n TAccountProductMint,\n TAccountProductAssociatedToken,\n TAccountDevice,\n TAccountDeviceMint,\n TAccountDeviceAssociatedToken,\n TAccountOwner\n> {\n // Program address.\n const programAddress = DEPHY_ID_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n token2022Program: {\n value: input.token2022Program ?? null,\n isWritable: false,\n },\n ataProgram: { value: input.ataProgram ?? null, isWritable: false },\n payer: { value: input.payer ?? null, isWritable: true },\n vendor: { value: input.vendor ?? null, isWritable: false },\n productMint: { value: input.productMint ?? null, isWritable: false },\n productAssociatedToken: {\n value: input.productAssociatedToken ?? null,\n isWritable: false,\n },\n device: { value: input.device ?? null, isWritable: false },\n deviceMint: { value: input.deviceMint ?? null, isWritable: true },\n deviceAssociatedToken: {\n value: input.deviceAssociatedToken ?? null,\n isWritable: true,\n },\n owner: { value: input.owner ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n if (!accounts.token2022Program.value) {\n accounts.token2022Program.value =\n 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>;\n }\n if (!accounts.ataProgram.value) {\n accounts.ataProgram.value =\n 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.token2022Program),\n getAccountMeta(accounts.ataProgram),\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.vendor),\n getAccountMeta(accounts.productMint),\n getAccountMeta(accounts.productAssociatedToken),\n getAccountMeta(accounts.device),\n getAccountMeta(accounts.deviceMint),\n getAccountMeta(accounts.deviceAssociatedToken),\n getAccountMeta(accounts.owner),\n ],\n programAddress,\n data: getActivateDeviceInstructionDataEncoder().encode(\n args as ActivateDeviceInstructionDataArgs\n ),\n } as ActivateDeviceInstruction<\n typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountSystemProgram,\n TAccountToken2022Program,\n TAccountAtaProgram,\n TAccountPayer,\n TAccountVendor,\n TAccountProductMint,\n TAccountProductAssociatedToken,\n TAccountDevice,\n TAccountDeviceMint,\n TAccountDeviceAssociatedToken,\n TAccountOwner\n >;\n\n return instruction;\n}\n\nexport type ParsedActivateDeviceInstruction<\n TProgram extends string = typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[],\n> = {\n programAddress: Address;\n accounts: {\n /** The system program */\n systemProgram: TAccountMetas[0];\n /** The SPL Token 2022 program */\n token2022Program: TAccountMetas[1];\n /** The associated token program */\n ataProgram: TAccountMetas[2];\n /** The account paying for the storage fees */\n payer: TAccountMetas[3];\n /** The vendor */\n vendor: TAccountMetas[4];\n /** The mint account for the product */\n productMint: TAccountMetas[5];\n /** The associated token account for the product */\n productAssociatedToken: TAccountMetas[6];\n /** The device */\n device: TAccountMetas[7];\n /** The mint account for the device */\n deviceMint: TAccountMetas[8];\n /** The associated token account for the device */\n deviceAssociatedToken: TAccountMetas[9];\n /** The device's owner */\n owner: TAccountMetas[10];\n };\n data: ActivateDeviceInstructionData;\n};\n\nexport function parseActivateDeviceInstruction<\n TProgram extends string,\n TAccountMetas extends readonly IAccountMeta[],\n>(\n instruction: IInstruction &\n IInstructionWithAccounts &\n IInstructionWithData\n): ParsedActivateDeviceInstruction {\n if (instruction.accounts.length < 11) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n systemProgram: getNextAccount(),\n token2022Program: getNextAccount(),\n ataProgram: getNextAccount(),\n payer: getNextAccount(),\n vendor: getNextAccount(),\n productMint: getNextAccount(),\n productAssociatedToken: getNextAccount(),\n device: getNextAccount(),\n deviceMint: getNextAccount(),\n deviceAssociatedToken: getNextAccount(),\n owner: getNextAccount(),\n },\n data: getActivateDeviceInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport { containsBytes, getU8Encoder, type Address } from '@solana/web3.js';\nimport {\n type ParsedActivateDeviceInstruction,\n type ParsedCreateActivatedDeviceInstruction,\n type ParsedCreateDeviceInstruction,\n type ParsedCreateProductInstruction,\n type ParsedInitializeInstruction,\n} from '../instructions';\nimport { Key, getKeyEncoder } from '../types';\n\nexport const DEPHY_ID_PROGRAM_ADDRESS =\n 'hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1' as Address<'hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1'>;\n\nexport enum DephyIdAccount {\n ProgramDataAccount,\n}\n\nexport function identifyDephyIdAccount(\n account: { data: Uint8Array } | Uint8Array\n): DephyIdAccount {\n const data = account instanceof Uint8Array ? account : account.data;\n if (containsBytes(data, getKeyEncoder().encode(Key.ProgramDataAccount), 0)) {\n return DephyIdAccount.ProgramDataAccount;\n }\n throw new Error(\n 'The provided account could not be identified as a dephyId account.'\n );\n}\n\nexport enum DephyIdInstruction {\n Initialize,\n CreateProduct,\n CreateDevice,\n ActivateDevice,\n CreateActivatedDevice,\n}\n\nexport function identifyDephyIdInstruction(\n instruction: { data: Uint8Array } | Uint8Array\n): DephyIdInstruction {\n const data =\n instruction instanceof Uint8Array ? instruction : instruction.data;\n if (containsBytes(data, getU8Encoder().encode(0), 0)) {\n return DephyIdInstruction.Initialize;\n }\n if (containsBytes(data, getU8Encoder().encode(1), 0)) {\n return DephyIdInstruction.CreateProduct;\n }\n if (containsBytes(data, getU8Encoder().encode(2), 0)) {\n return DephyIdInstruction.CreateDevice;\n }\n if (containsBytes(data, getU8Encoder().encode(3), 0)) {\n return DephyIdInstruction.ActivateDevice;\n }\n if (containsBytes(data, getU8Encoder().encode(4), 0)) {\n return DephyIdInstruction.CreateActivatedDevice;\n }\n throw new Error(\n 'The provided instruction could not be identified as a dephyId instruction.'\n );\n}\n\nexport type ParsedDephyIdInstruction<\n TProgram extends string = 'hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1',\n> =\n | ({\n instructionType: DephyIdInstruction.Initialize;\n } & ParsedInitializeInstruction)\n | ({\n instructionType: DephyIdInstruction.CreateProduct;\n } & ParsedCreateProductInstruction)\n | ({\n instructionType: DephyIdInstruction.CreateDevice;\n } & ParsedCreateDeviceInstruction)\n | ({\n instructionType: DephyIdInstruction.ActivateDevice;\n } & ParsedActivateDeviceInstruction)\n | ({\n instructionType: DephyIdInstruction.CreateActivatedDevice;\n } & ParsedCreateActivatedDeviceInstruction);\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport {\n AccountRole,\n isProgramDerivedAddress,\n isTransactionSigner as web3JsIsTransactionSigner,\n type Address,\n type IAccountMeta,\n type IAccountSignerMeta,\n type ProgramDerivedAddress,\n type TransactionSigner,\n upgradeRoleToSigner,\n} from '@solana/web3.js';\n\n/**\n * Asserts that the given value is not null or undefined.\n * @internal\n */\nexport function expectSome(value: T | null | undefined): T {\n if (value == null) {\n throw new Error('Expected a value but received null or undefined.');\n }\n return value;\n}\n\n/**\n * Asserts that the given value is a PublicKey.\n * @internal\n */\nexport function expectAddress(\n value:\n | Address\n | ProgramDerivedAddress\n | TransactionSigner\n | null\n | undefined\n): Address {\n if (!value) {\n throw new Error('Expected a Address.');\n }\n if (typeof value === 'object' && 'address' in value) {\n return value.address;\n }\n if (Array.isArray(value)) {\n return value[0];\n }\n return value as Address;\n}\n\n/**\n * Asserts that the given value is a PDA.\n * @internal\n */\nexport function expectProgramDerivedAddress(\n value:\n | Address\n | ProgramDerivedAddress\n | TransactionSigner\n | null\n | undefined\n): ProgramDerivedAddress {\n if (!value || !Array.isArray(value) || !isProgramDerivedAddress(value)) {\n throw new Error('Expected a ProgramDerivedAddress.');\n }\n return value;\n}\n\n/**\n * Asserts that the given value is a TransactionSigner.\n * @internal\n */\nexport function expectTransactionSigner(\n value:\n | Address\n | ProgramDerivedAddress\n | TransactionSigner\n | null\n | undefined\n): TransactionSigner {\n if (!value || !isTransactionSigner(value)) {\n throw new Error('Expected a TransactionSigner.');\n }\n return value;\n}\n\n/**\n * Defines an instruction account to resolve.\n * @internal\n */\nexport type ResolvedAccount<\n T extends string = string,\n U extends\n | Address\n | ProgramDerivedAddress\n | TransactionSigner\n | null =\n | Address\n | ProgramDerivedAddress\n | TransactionSigner\n | null,\n> = {\n isWritable: boolean;\n value: U;\n};\n\n/**\n * Defines an instruction that stores additional bytes on-chain.\n * @internal\n */\nexport type IInstructionWithByteDelta = {\n byteDelta: number;\n};\n\n/**\n * Get account metas and signers from resolved accounts.\n * @internal\n */\nexport function getAccountMetaFactory(\n programAddress: Address,\n optionalAccountStrategy: 'omitted' | 'programId'\n) {\n return (\n account: ResolvedAccount\n ): IAccountMeta | IAccountSignerMeta | undefined => {\n if (!account.value) {\n if (optionalAccountStrategy === 'omitted') return;\n return Object.freeze({\n address: programAddress,\n role: AccountRole.READONLY,\n });\n }\n\n const writableRole = account.isWritable\n ? AccountRole.WRITABLE\n : AccountRole.READONLY;\n return Object.freeze({\n address: expectAddress(account.value),\n role: isTransactionSigner(account.value)\n ? upgradeRoleToSigner(writableRole)\n : writableRole,\n ...(isTransactionSigner(account.value) ? { signer: account.value } : {}),\n });\n };\n}\n\nexport function isTransactionSigner(\n value:\n | Address\n | ProgramDerivedAddress\n | TransactionSigner\n): value is TransactionSigner {\n return (\n !!value &&\n typeof value === 'object' &&\n 'address' in value &&\n web3JsIsTransactionSigner(value)\n );\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport {\n addDecoderSizePrefix,\n addEncoderSizePrefix,\n combineCodec,\n getArrayDecoder,\n getArrayEncoder,\n getStructDecoder,\n getStructEncoder,\n getTupleDecoder,\n getTupleEncoder,\n getU32Decoder,\n getU32Encoder,\n getU8Decoder,\n getU8Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n transformEncoder,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type IAccountMeta,\n type IAccountSignerMeta,\n type IInstruction,\n type IInstructionWithAccounts,\n type IInstructionWithData,\n type ReadonlyAccount,\n type ReadonlySignerAccount,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/web3.js';\nimport { DEPHY_ID_PROGRAM_ADDRESS } from '../programs';\nimport {\n expectSome,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from '../shared';\n\nexport type CreateActivatedDeviceInstruction<\n TProgram extends string = typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountSystemProgram extends\n | string\n | IAccountMeta = '11111111111111111111111111111111',\n TAccountToken2022Program extends\n | string\n | IAccountMeta = 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n TAccountAtaProgram extends\n | string\n | IAccountMeta = 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n TAccountPayer extends string | IAccountMeta = string,\n TAccountVendor extends string | IAccountMeta = string,\n TAccountProductMint extends string | IAccountMeta = string,\n TAccountProductAssociatedToken extends string | IAccountMeta = string,\n TAccountDevice extends string | IAccountMeta = string,\n TAccountDeviceMint extends string | IAccountMeta = string,\n TAccountDeviceAssociatedToken extends string | IAccountMeta = string,\n TAccountOwner extends string | IAccountMeta = string,\n TRemainingAccounts extends readonly IAccountMeta[] = [],\n> = IInstruction &\n IInstructionWithData &\n IInstructionWithAccounts<\n [\n TAccountSystemProgram extends string\n ? ReadonlyAccount\n : TAccountSystemProgram,\n TAccountToken2022Program extends string\n ? ReadonlyAccount\n : TAccountToken2022Program,\n TAccountAtaProgram extends string\n ? ReadonlyAccount\n : TAccountAtaProgram,\n TAccountPayer extends string\n ? WritableSignerAccount &\n IAccountSignerMeta\n : TAccountPayer,\n TAccountVendor extends string\n ? ReadonlyAccount\n : TAccountVendor,\n TAccountProductMint extends string\n ? ReadonlyAccount\n : TAccountProductMint,\n TAccountProductAssociatedToken extends string\n ? WritableAccount\n : TAccountProductAssociatedToken,\n TAccountDevice extends string\n ? ReadonlySignerAccount &\n IAccountSignerMeta\n : TAccountDevice,\n TAccountDeviceMint extends string\n ? WritableAccount\n : TAccountDeviceMint,\n TAccountDeviceAssociatedToken extends string\n ? WritableAccount\n : TAccountDeviceAssociatedToken,\n TAccountOwner extends string\n ? ReadonlyAccount\n : TAccountOwner,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type CreateActivatedDeviceInstructionData = {\n discriminator: number;\n name: string;\n uri: string;\n additionalMetadata: Array;\n};\n\nexport type CreateActivatedDeviceInstructionDataArgs = {\n name: string;\n uri: string;\n additionalMetadata: Array;\n};\n\nexport function getCreateActivatedDeviceInstructionDataEncoder(): Encoder {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', getU8Encoder()],\n ['name', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n ['uri', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n [\n 'additionalMetadata',\n getArrayEncoder(\n getTupleEncoder([\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n ])\n ),\n ],\n ]),\n (value) => ({ ...value, discriminator: 4 })\n );\n}\n\nexport function getCreateActivatedDeviceInstructionDataDecoder(): Decoder {\n return getStructDecoder([\n ['discriminator', getU8Decoder()],\n ['name', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n ['uri', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n [\n 'additionalMetadata',\n getArrayDecoder(\n getTupleDecoder([\n addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder()),\n addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder()),\n ])\n ),\n ],\n ]);\n}\n\nexport function getCreateActivatedDeviceInstructionDataCodec(): Codec<\n CreateActivatedDeviceInstructionDataArgs,\n CreateActivatedDeviceInstructionData\n> {\n return combineCodec(\n getCreateActivatedDeviceInstructionDataEncoder(),\n getCreateActivatedDeviceInstructionDataDecoder()\n );\n}\n\nexport type CreateActivatedDeviceInput<\n TAccountSystemProgram extends string = string,\n TAccountToken2022Program extends string = string,\n TAccountAtaProgram extends string = string,\n TAccountPayer extends string = string,\n TAccountVendor extends string = string,\n TAccountProductMint extends string = string,\n TAccountProductAssociatedToken extends string = string,\n TAccountDevice extends string = string,\n TAccountDeviceMint extends string = string,\n TAccountDeviceAssociatedToken extends string = string,\n TAccountOwner extends string = string,\n> = {\n /** The system program */\n systemProgram?: Address;\n /** The SPL Token 2022 program */\n token2022Program?: Address;\n /** The associated token program */\n ataProgram?: Address;\n /** The account paying for the storage fees */\n payer?: TransactionSigner;\n /** The vendor */\n vendor: Address;\n /** The mint account for the product */\n productMint: Address;\n /** The associated token account for the product */\n productAssociatedToken: Address;\n /** The device */\n device: TransactionSigner;\n /** The mint account for the device */\n deviceMint: Address;\n /** The associated token account for the device */\n deviceAssociatedToken: Address;\n /** The device's owner */\n owner: Address;\n name: CreateActivatedDeviceInstructionDataArgs['name'];\n uri: CreateActivatedDeviceInstructionDataArgs['uri'];\n additionalMetadata: CreateActivatedDeviceInstructionDataArgs['additionalMetadata'];\n};\n\nexport function getCreateActivatedDeviceInstruction<\n TAccountSystemProgram extends string,\n TAccountToken2022Program extends string,\n TAccountAtaProgram extends string,\n TAccountPayer extends string,\n TAccountVendor extends string,\n TAccountProductMint extends string,\n TAccountProductAssociatedToken extends string,\n TAccountDevice extends string,\n TAccountDeviceMint extends string,\n TAccountDeviceAssociatedToken extends string,\n TAccountOwner extends string,\n>(\n input: CreateActivatedDeviceInput<\n TAccountSystemProgram,\n TAccountToken2022Program,\n TAccountAtaProgram,\n TAccountPayer,\n TAccountVendor,\n TAccountProductMint,\n TAccountProductAssociatedToken,\n TAccountDevice,\n TAccountDeviceMint,\n TAccountDeviceAssociatedToken,\n TAccountOwner\n >\n): CreateActivatedDeviceInstruction<\n typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountSystemProgram,\n TAccountToken2022Program,\n TAccountAtaProgram,\n TAccountPayer,\n TAccountVendor,\n TAccountProductMint,\n TAccountProductAssociatedToken,\n TAccountDevice,\n TAccountDeviceMint,\n TAccountDeviceAssociatedToken,\n TAccountOwner\n> {\n // Program address.\n const programAddress = DEPHY_ID_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n token2022Program: {\n value: input.token2022Program ?? null,\n isWritable: false,\n },\n ataProgram: { value: input.ataProgram ?? null, isWritable: false },\n payer: { value: input.payer ?? null, isWritable: true },\n vendor: { value: input.vendor ?? null, isWritable: false },\n productMint: { value: input.productMint ?? null, isWritable: false },\n productAssociatedToken: {\n value: input.productAssociatedToken ?? null,\n isWritable: true,\n },\n device: { value: input.device ?? null, isWritable: false },\n deviceMint: { value: input.deviceMint ?? null, isWritable: true },\n deviceAssociatedToken: {\n value: input.deviceAssociatedToken ?? null,\n isWritable: true,\n },\n owner: { value: input.owner ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n if (!accounts.token2022Program.value) {\n accounts.token2022Program.value =\n 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>;\n }\n if (!accounts.ataProgram.value) {\n accounts.ataProgram.value =\n 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>;\n }\n if (!accounts.payer.value) {\n accounts.payer.value = expectSome(accounts.vendor.value);\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.token2022Program),\n getAccountMeta(accounts.ataProgram),\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.vendor),\n getAccountMeta(accounts.productMint),\n getAccountMeta(accounts.productAssociatedToken),\n getAccountMeta(accounts.device),\n getAccountMeta(accounts.deviceMint),\n getAccountMeta(accounts.deviceAssociatedToken),\n getAccountMeta(accounts.owner),\n ],\n programAddress,\n data: getCreateActivatedDeviceInstructionDataEncoder().encode(\n args as CreateActivatedDeviceInstructionDataArgs\n ),\n } as CreateActivatedDeviceInstruction<\n typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountSystemProgram,\n TAccountToken2022Program,\n TAccountAtaProgram,\n TAccountPayer,\n TAccountVendor,\n TAccountProductMint,\n TAccountProductAssociatedToken,\n TAccountDevice,\n TAccountDeviceMint,\n TAccountDeviceAssociatedToken,\n TAccountOwner\n >;\n\n return instruction;\n}\n\nexport type ParsedCreateActivatedDeviceInstruction<\n TProgram extends string = typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[],\n> = {\n programAddress: Address;\n accounts: {\n /** The system program */\n systemProgram: TAccountMetas[0];\n /** The SPL Token 2022 program */\n token2022Program: TAccountMetas[1];\n /** The associated token program */\n ataProgram: TAccountMetas[2];\n /** The account paying for the storage fees */\n payer: TAccountMetas[3];\n /** The vendor */\n vendor: TAccountMetas[4];\n /** The mint account for the product */\n productMint: TAccountMetas[5];\n /** The associated token account for the product */\n productAssociatedToken: TAccountMetas[6];\n /** The device */\n device: TAccountMetas[7];\n /** The mint account for the device */\n deviceMint: TAccountMetas[8];\n /** The associated token account for the device */\n deviceAssociatedToken: TAccountMetas[9];\n /** The device's owner */\n owner: TAccountMetas[10];\n };\n data: CreateActivatedDeviceInstructionData;\n};\n\nexport function parseCreateActivatedDeviceInstruction<\n TProgram extends string,\n TAccountMetas extends readonly IAccountMeta[],\n>(\n instruction: IInstruction &\n IInstructionWithAccounts &\n IInstructionWithData\n): ParsedCreateActivatedDeviceInstruction {\n if (instruction.accounts.length < 11) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n systemProgram: getNextAccount(),\n token2022Program: getNextAccount(),\n ataProgram: getNextAccount(),\n payer: getNextAccount(),\n vendor: getNextAccount(),\n productMint: getNextAccount(),\n productAssociatedToken: getNextAccount(),\n device: getNextAccount(),\n deviceMint: getNextAccount(),\n deviceAssociatedToken: getNextAccount(),\n owner: getNextAccount(),\n },\n data: getCreateActivatedDeviceInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport {\n addDecoderSizePrefix,\n addEncoderSizePrefix,\n combineCodec,\n getArrayDecoder,\n getArrayEncoder,\n getStructDecoder,\n getStructEncoder,\n getTupleDecoder,\n getTupleEncoder,\n getU32Decoder,\n getU32Encoder,\n getU8Decoder,\n getU8Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n transformEncoder,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type IAccountMeta,\n type IAccountSignerMeta,\n type IInstruction,\n type IInstructionWithAccounts,\n type IInstructionWithData,\n type ReadonlyAccount,\n type ReadonlySignerAccount,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/web3.js';\nimport { DEPHY_ID_PROGRAM_ADDRESS } from '../programs';\nimport {\n expectSome,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from '../shared';\nimport {\n getDeviceSigningAlgorithmDecoder,\n getDeviceSigningAlgorithmEncoder,\n type DeviceSigningAlgorithm,\n type DeviceSigningAlgorithmArgs,\n} from '../types';\n\nexport type CreateDeviceInstruction<\n TProgram extends string = typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountSystemProgram extends\n | string\n | IAccountMeta = '11111111111111111111111111111111',\n TAccountToken2022Program extends\n | string\n | IAccountMeta = 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n TAccountAtaProgram extends\n | string\n | IAccountMeta = 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n TAccountPayer extends string | IAccountMeta = string,\n TAccountVendor extends string | IAccountMeta = string,\n TAccountProductMint extends string | IAccountMeta = string,\n TAccountProductAssociatedToken extends string | IAccountMeta = string,\n TAccountDevice extends string | IAccountMeta = string,\n TAccountDeviceMint extends string | IAccountMeta = string,\n TRemainingAccounts extends readonly IAccountMeta[] = [],\n> = IInstruction &\n IInstructionWithData &\n IInstructionWithAccounts<\n [\n TAccountSystemProgram extends string\n ? ReadonlyAccount\n : TAccountSystemProgram,\n TAccountToken2022Program extends string\n ? ReadonlyAccount\n : TAccountToken2022Program,\n TAccountAtaProgram extends string\n ? ReadonlyAccount\n : TAccountAtaProgram,\n TAccountPayer extends string\n ? WritableSignerAccount &\n IAccountSignerMeta\n : TAccountPayer,\n TAccountVendor extends string\n ? ReadonlySignerAccount &\n IAccountSignerMeta\n : TAccountVendor,\n TAccountProductMint extends string\n ? WritableAccount\n : TAccountProductMint,\n TAccountProductAssociatedToken extends string\n ? WritableAccount\n : TAccountProductAssociatedToken,\n TAccountDevice extends string\n ? ReadonlyAccount\n : TAccountDevice,\n TAccountDeviceMint extends string\n ? WritableAccount\n : TAccountDeviceMint,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type CreateDeviceInstructionData = {\n discriminator: number;\n name: string;\n uri: string;\n additionalMetadata: Array;\n signingAlg: DeviceSigningAlgorithm;\n};\n\nexport type CreateDeviceInstructionDataArgs = {\n name: string;\n uri: string;\n additionalMetadata: Array;\n signingAlg: DeviceSigningAlgorithmArgs;\n};\n\nexport function getCreateDeviceInstructionDataEncoder(): Encoder {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', getU8Encoder()],\n ['name', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n ['uri', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n [\n 'additionalMetadata',\n getArrayEncoder(\n getTupleEncoder([\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n ])\n ),\n ],\n ['signingAlg', getDeviceSigningAlgorithmEncoder()],\n ]),\n (value) => ({ ...value, discriminator: 2 })\n );\n}\n\nexport function getCreateDeviceInstructionDataDecoder(): Decoder {\n return getStructDecoder([\n ['discriminator', getU8Decoder()],\n ['name', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n ['uri', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n [\n 'additionalMetadata',\n getArrayDecoder(\n getTupleDecoder([\n addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder()),\n addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder()),\n ])\n ),\n ],\n ['signingAlg', getDeviceSigningAlgorithmDecoder()],\n ]);\n}\n\nexport function getCreateDeviceInstructionDataCodec(): Codec<\n CreateDeviceInstructionDataArgs,\n CreateDeviceInstructionData\n> {\n return combineCodec(\n getCreateDeviceInstructionDataEncoder(),\n getCreateDeviceInstructionDataDecoder()\n );\n}\n\nexport type CreateDeviceInput<\n TAccountSystemProgram extends string = string,\n TAccountToken2022Program extends string = string,\n TAccountAtaProgram extends string = string,\n TAccountPayer extends string = string,\n TAccountVendor extends string = string,\n TAccountProductMint extends string = string,\n TAccountProductAssociatedToken extends string = string,\n TAccountDevice extends string = string,\n TAccountDeviceMint extends string = string,\n> = {\n /** The system program */\n systemProgram?: Address;\n /** The SPL Token 2022 program */\n token2022Program?: Address;\n /** The associated token program */\n ataProgram?: Address;\n /** The account paying for the storage fees */\n payer?: TransactionSigner;\n /** The vendor */\n vendor: TransactionSigner;\n /** The mint account of the product */\n productMint: Address;\n /** The associated token account of the product */\n productAssociatedToken: Address;\n /** The device */\n device: Address;\n /** The mint account of the device */\n deviceMint: Address;\n name: CreateDeviceInstructionDataArgs['name'];\n uri: CreateDeviceInstructionDataArgs['uri'];\n additionalMetadata: CreateDeviceInstructionDataArgs['additionalMetadata'];\n signingAlg: CreateDeviceInstructionDataArgs['signingAlg'];\n};\n\nexport function getCreateDeviceInstruction<\n TAccountSystemProgram extends string,\n TAccountToken2022Program extends string,\n TAccountAtaProgram extends string,\n TAccountPayer extends string,\n TAccountVendor extends string,\n TAccountProductMint extends string,\n TAccountProductAssociatedToken extends string,\n TAccountDevice extends string,\n TAccountDeviceMint extends string,\n>(\n input: CreateDeviceInput<\n TAccountSystemProgram,\n TAccountToken2022Program,\n TAccountAtaProgram,\n TAccountPayer,\n TAccountVendor,\n TAccountProductMint,\n TAccountProductAssociatedToken,\n TAccountDevice,\n TAccountDeviceMint\n >\n): CreateDeviceInstruction<\n typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountSystemProgram,\n TAccountToken2022Program,\n TAccountAtaProgram,\n TAccountPayer,\n TAccountVendor,\n TAccountProductMint,\n TAccountProductAssociatedToken,\n TAccountDevice,\n TAccountDeviceMint\n> {\n // Program address.\n const programAddress = DEPHY_ID_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n token2022Program: {\n value: input.token2022Program ?? null,\n isWritable: false,\n },\n ataProgram: { value: input.ataProgram ?? null, isWritable: false },\n payer: { value: input.payer ?? null, isWritable: true },\n vendor: { value: input.vendor ?? null, isWritable: false },\n productMint: { value: input.productMint ?? null, isWritable: true },\n productAssociatedToken: {\n value: input.productAssociatedToken ?? null,\n isWritable: true,\n },\n device: { value: input.device ?? null, isWritable: false },\n deviceMint: { value: input.deviceMint ?? null, isWritable: true },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n if (!accounts.token2022Program.value) {\n accounts.token2022Program.value =\n 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>;\n }\n if (!accounts.ataProgram.value) {\n accounts.ataProgram.value =\n 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>;\n }\n if (!accounts.payer.value) {\n accounts.payer.value = expectSome(accounts.vendor.value);\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.token2022Program),\n getAccountMeta(accounts.ataProgram),\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.vendor),\n getAccountMeta(accounts.productMint),\n getAccountMeta(accounts.productAssociatedToken),\n getAccountMeta(accounts.device),\n getAccountMeta(accounts.deviceMint),\n ],\n programAddress,\n data: getCreateDeviceInstructionDataEncoder().encode(\n args as CreateDeviceInstructionDataArgs\n ),\n } as CreateDeviceInstruction<\n typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountSystemProgram,\n TAccountToken2022Program,\n TAccountAtaProgram,\n TAccountPayer,\n TAccountVendor,\n TAccountProductMint,\n TAccountProductAssociatedToken,\n TAccountDevice,\n TAccountDeviceMint\n >;\n\n return instruction;\n}\n\nexport type ParsedCreateDeviceInstruction<\n TProgram extends string = typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[],\n> = {\n programAddress: Address;\n accounts: {\n /** The system program */\n systemProgram: TAccountMetas[0];\n /** The SPL Token 2022 program */\n token2022Program: TAccountMetas[1];\n /** The associated token program */\n ataProgram: TAccountMetas[2];\n /** The account paying for the storage fees */\n payer: TAccountMetas[3];\n /** The vendor */\n vendor: TAccountMetas[4];\n /** The mint account of the product */\n productMint: TAccountMetas[5];\n /** The associated token account of the product */\n productAssociatedToken: TAccountMetas[6];\n /** The device */\n device: TAccountMetas[7];\n /** The mint account of the device */\n deviceMint: TAccountMetas[8];\n };\n data: CreateDeviceInstructionData;\n};\n\nexport function parseCreateDeviceInstruction<\n TProgram extends string,\n TAccountMetas extends readonly IAccountMeta[],\n>(\n instruction: IInstruction &\n IInstructionWithAccounts &\n IInstructionWithData\n): ParsedCreateDeviceInstruction {\n if (instruction.accounts.length < 9) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n systemProgram: getNextAccount(),\n token2022Program: getNextAccount(),\n ataProgram: getNextAccount(),\n payer: getNextAccount(),\n vendor: getNextAccount(),\n productMint: getNextAccount(),\n productAssociatedToken: getNextAccount(),\n device: getNextAccount(),\n deviceMint: getNextAccount(),\n },\n data: getCreateDeviceInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport {\n addDecoderSizePrefix,\n addEncoderSizePrefix,\n combineCodec,\n getArrayDecoder,\n getArrayEncoder,\n getStructDecoder,\n getStructEncoder,\n getTupleDecoder,\n getTupleEncoder,\n getU32Decoder,\n getU32Encoder,\n getU8Decoder,\n getU8Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n transformEncoder,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type IAccountMeta,\n type IAccountSignerMeta,\n type IInstruction,\n type IInstructionWithAccounts,\n type IInstructionWithData,\n type ReadonlyAccount,\n type ReadonlySignerAccount,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/web3.js';\nimport { DEPHY_ID_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\n\nexport type CreateProductInstruction<\n TProgram extends string = typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountSystemProgram extends\n | string\n | IAccountMeta = '11111111111111111111111111111111',\n TAccountToken2022Program extends\n | string\n | IAccountMeta = 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n TAccountPayer extends string | IAccountMeta = string,\n TAccountVendor extends string | IAccountMeta = string,\n TAccountProductMint extends string | IAccountMeta = string,\n TRemainingAccounts extends readonly IAccountMeta[] = [],\n> = IInstruction &\n IInstructionWithData &\n IInstructionWithAccounts<\n [\n TAccountSystemProgram extends string\n ? ReadonlyAccount\n : TAccountSystemProgram,\n TAccountToken2022Program extends string\n ? ReadonlyAccount\n : TAccountToken2022Program,\n TAccountPayer extends string\n ? WritableSignerAccount &\n IAccountSignerMeta\n : TAccountPayer,\n TAccountVendor extends string\n ? ReadonlySignerAccount &\n IAccountSignerMeta\n : TAccountVendor,\n TAccountProductMint extends string\n ? WritableAccount\n : TAccountProductMint,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type CreateProductInstructionData = {\n discriminator: number;\n name: string;\n symbol: string;\n uri: string;\n additionalMetadata: Array;\n};\n\nexport type CreateProductInstructionDataArgs = {\n name: string;\n symbol: string;\n uri: string;\n additionalMetadata: Array;\n};\n\nexport function getCreateProductInstructionDataEncoder(): Encoder {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', getU8Encoder()],\n ['name', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n ['symbol', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n ['uri', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n [\n 'additionalMetadata',\n getArrayEncoder(\n getTupleEncoder([\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n ])\n ),\n ],\n ]),\n (value) => ({ ...value, discriminator: 1 })\n );\n}\n\nexport function getCreateProductInstructionDataDecoder(): Decoder {\n return getStructDecoder([\n ['discriminator', getU8Decoder()],\n ['name', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n ['symbol', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n ['uri', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n [\n 'additionalMetadata',\n getArrayDecoder(\n getTupleDecoder([\n addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder()),\n addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder()),\n ])\n ),\n ],\n ]);\n}\n\nexport function getCreateProductInstructionDataCodec(): Codec<\n CreateProductInstructionDataArgs,\n CreateProductInstructionData\n> {\n return combineCodec(\n getCreateProductInstructionDataEncoder(),\n getCreateProductInstructionDataDecoder()\n );\n}\n\nexport type CreateProductInput<\n TAccountSystemProgram extends string = string,\n TAccountToken2022Program extends string = string,\n TAccountPayer extends string = string,\n TAccountVendor extends string = string,\n TAccountProductMint extends string = string,\n> = {\n /** The system program */\n systemProgram?: Address;\n /** The SPL Token 2022 program */\n token2022Program?: Address;\n /** The account paying for the storage fees */\n payer: TransactionSigner;\n /** The vendor */\n vendor: TransactionSigner;\n /** The mint account of the product */\n productMint: Address;\n name: CreateProductInstructionDataArgs['name'];\n symbol: CreateProductInstructionDataArgs['symbol'];\n uri: CreateProductInstructionDataArgs['uri'];\n additionalMetadata: CreateProductInstructionDataArgs['additionalMetadata'];\n};\n\nexport function getCreateProductInstruction<\n TAccountSystemProgram extends string,\n TAccountToken2022Program extends string,\n TAccountPayer extends string,\n TAccountVendor extends string,\n TAccountProductMint extends string,\n>(\n input: CreateProductInput<\n TAccountSystemProgram,\n TAccountToken2022Program,\n TAccountPayer,\n TAccountVendor,\n TAccountProductMint\n >\n): CreateProductInstruction<\n typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountSystemProgram,\n TAccountToken2022Program,\n TAccountPayer,\n TAccountVendor,\n TAccountProductMint\n> {\n // Program address.\n const programAddress = DEPHY_ID_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n token2022Program: {\n value: input.token2022Program ?? null,\n isWritable: false,\n },\n payer: { value: input.payer ?? null, isWritable: true },\n vendor: { value: input.vendor ?? null, isWritable: false },\n productMint: { value: input.productMint ?? null, isWritable: true },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n if (!accounts.token2022Program.value) {\n accounts.token2022Program.value =\n 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.token2022Program),\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.vendor),\n getAccountMeta(accounts.productMint),\n ],\n programAddress,\n data: getCreateProductInstructionDataEncoder().encode(\n args as CreateProductInstructionDataArgs\n ),\n } as CreateProductInstruction<\n typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountSystemProgram,\n TAccountToken2022Program,\n TAccountPayer,\n TAccountVendor,\n TAccountProductMint\n >;\n\n return instruction;\n}\n\nexport type ParsedCreateProductInstruction<\n TProgram extends string = typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[],\n> = {\n programAddress: Address;\n accounts: {\n /** The system program */\n systemProgram: TAccountMetas[0];\n /** The SPL Token 2022 program */\n token2022Program: TAccountMetas[1];\n /** The account paying for the storage fees */\n payer: TAccountMetas[2];\n /** The vendor */\n vendor: TAccountMetas[3];\n /** The mint account of the product */\n productMint: TAccountMetas[4];\n };\n data: CreateProductInstructionData;\n};\n\nexport function parseCreateProductInstruction<\n TProgram extends string,\n TAccountMetas extends readonly IAccountMeta[],\n>(\n instruction: IInstruction &\n IInstructionWithAccounts &\n IInstructionWithData\n): ParsedCreateProductInstruction {\n if (instruction.accounts.length < 5) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n systemProgram: getNextAccount(),\n token2022Program: getNextAccount(),\n payer: getNextAccount(),\n vendor: getNextAccount(),\n productMint: getNextAccount(),\n },\n data: getCreateProductInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport {\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU8Decoder,\n getU8Encoder,\n transformEncoder,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type IAccountMeta,\n type IAccountSignerMeta,\n type IInstruction,\n type IInstructionWithAccounts,\n type IInstructionWithData,\n type ReadonlyAccount,\n type ReadonlySignerAccount,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/web3.js';\nimport { DEPHY_ID_PROGRAM_ADDRESS } from '../programs';\nimport {\n expectSome,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from '../shared';\n\nexport type InitializeInstruction<\n TProgram extends string = typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountSystemProgram extends\n | string\n | IAccountMeta = '11111111111111111111111111111111',\n TAccountPayer extends string | IAccountMeta = string,\n TAccountProgramData extends string | IAccountMeta = string,\n TAccountAuthority extends string | IAccountMeta = string,\n TRemainingAccounts extends readonly IAccountMeta[] = [],\n> = IInstruction &\n IInstructionWithData &\n IInstructionWithAccounts<\n [\n TAccountSystemProgram extends string\n ? ReadonlyAccount\n : TAccountSystemProgram,\n TAccountPayer extends string\n ? WritableSignerAccount &\n IAccountSignerMeta\n : TAccountPayer,\n TAccountProgramData extends string\n ? WritableAccount\n : TAccountProgramData,\n TAccountAuthority extends string\n ? ReadonlySignerAccount &\n IAccountSignerMeta\n : TAccountAuthority,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type InitializeInstructionData = { discriminator: number; bump: number };\n\nexport type InitializeInstructionDataArgs = { bump: number };\n\nexport function getInitializeInstructionDataEncoder(): Encoder {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', getU8Encoder()],\n ['bump', getU8Encoder()],\n ]),\n (value) => ({ ...value, discriminator: 0 })\n );\n}\n\nexport function getInitializeInstructionDataDecoder(): Decoder {\n return getStructDecoder([\n ['discriminator', getU8Decoder()],\n ['bump', getU8Decoder()],\n ]);\n}\n\nexport function getInitializeInstructionDataCodec(): Codec<\n InitializeInstructionDataArgs,\n InitializeInstructionData\n> {\n return combineCodec(\n getInitializeInstructionDataEncoder(),\n getInitializeInstructionDataDecoder()\n );\n}\n\nexport type InitializeInput<\n TAccountSystemProgram extends string = string,\n TAccountPayer extends string = string,\n TAccountProgramData extends string = string,\n TAccountAuthority extends string = string,\n> = {\n /** The system program */\n systemProgram?: Address;\n /** The account paying for the storage fees */\n payer?: TransactionSigner;\n /** The program data account for the program */\n programData: Address;\n /** The authority account of the program */\n authority: TransactionSigner;\n bump: InitializeInstructionDataArgs['bump'];\n};\n\nexport function getInitializeInstruction<\n TAccountSystemProgram extends string,\n TAccountPayer extends string,\n TAccountProgramData extends string,\n TAccountAuthority extends string,\n>(\n input: InitializeInput<\n TAccountSystemProgram,\n TAccountPayer,\n TAccountProgramData,\n TAccountAuthority\n >\n): InitializeInstruction<\n typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountSystemProgram,\n TAccountPayer,\n TAccountProgramData,\n TAccountAuthority\n> {\n // Program address.\n const programAddress = DEPHY_ID_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n payer: { value: input.payer ?? null, isWritable: true },\n programData: { value: input.programData ?? null, isWritable: true },\n authority: { value: input.authority ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n if (!accounts.payer.value) {\n accounts.payer.value = expectSome(accounts.authority.value);\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.programData),\n getAccountMeta(accounts.authority),\n ],\n programAddress,\n data: getInitializeInstructionDataEncoder().encode(\n args as InitializeInstructionDataArgs\n ),\n } as InitializeInstruction<\n typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountSystemProgram,\n TAccountPayer,\n TAccountProgramData,\n TAccountAuthority\n >;\n\n return instruction;\n}\n\nexport type ParsedInitializeInstruction<\n TProgram extends string = typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[],\n> = {\n programAddress: Address;\n accounts: {\n /** The system program */\n systemProgram: TAccountMetas[0];\n /** The account paying for the storage fees */\n payer: TAccountMetas[1];\n /** The program data account for the program */\n programData: TAccountMetas[2];\n /** The authority account of the program */\n authority: TAccountMetas[3];\n };\n data: InitializeInstructionData;\n};\n\nexport function parseInitializeInstruction<\n TProgram extends string,\n TAccountMetas extends readonly IAccountMeta[],\n>(\n instruction: IInstruction &\n IInstructionWithAccounts &\n IInstructionWithData\n): ParsedInitializeInstruction {\n if (instruction.accounts.length < 4) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n systemProgram: getNextAccount(),\n payer: getNextAccount(),\n programData: getNextAccount(),\n authority: getNextAccount(),\n },\n data: getInitializeInstructionDataDecoder().decode(instruction.data),\n };\n}\n"]} \ No newline at end of file diff --git a/clients/js/dist/src/index.mjs b/clients/js/dist/src/index.mjs index 6040aad..8e2f0b5 100644 --- a/clients/js/dist/src/index.mjs +++ b/clients/js/dist/src/index.mjs @@ -1,7 +1,22 @@ -import { getProgramDerivedAddress, getUtf8Encoder, getAddressEncoder, getDiscriminatedUnionEncoder, getStructEncoder, getTupleEncoder, fixEncoderSize, getBytesEncoder, getU8Encoder, getDiscriminatedUnionDecoder, getStructDecoder, getTupleDecoder, fixDecoderSize, getBytesDecoder, getU8Decoder, combineCodec, getEnumEncoder, getEnumDecoder, transformEncoder, getAddressDecoder, decodeAccount, assertAccountExists, fetchEncodedAccount, assertAccountsExist, fetchEncodedAccounts, containsBytes, getU64Encoder, getU64Decoder, addEncoderSizePrefix, getU32Encoder, getArrayEncoder, addDecoderSizePrefix, getUtf8Decoder, getU32Decoder, getArrayDecoder, AccountRole, upgradeRoleToSigner, isTransactionSigner as isTransactionSigner$1 } from '@solana/web3.js'; +import { getProgramDerivedAddress, getAddressEncoder, address, getUtf8Encoder, getDiscriminatedUnionEncoder, getStructEncoder, getTupleEncoder, fixEncoderSize, getBytesEncoder, getU8Encoder, getDiscriminatedUnionDecoder, getStructDecoder, getTupleDecoder, fixDecoderSize, getBytesDecoder, getU8Decoder, combineCodec, getEnumEncoder, getEnumDecoder, transformEncoder, getAddressDecoder, decodeAccount, assertAccountExists, fetchEncodedAccount, assertAccountsExist, fetchEncodedAccounts, containsBytes, getU64Encoder, getU64Decoder, addEncoderSizePrefix, getU32Encoder, getArrayEncoder, addDecoderSizePrefix, getUtf8Decoder, getU32Decoder, getArrayDecoder, AccountRole, upgradeRoleToSigner, isTransactionSigner as isTransactionSigner$1 } from '@solana/web3.js'; // env-shim.ts var __DEV__ = /* @__PURE__ */ (() => process["env"].NODE_ENV === "development")(); +async function findDeviceATokenPda(seeds, config = {}) { + const { + programAddress = "hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1" + } = config; + return await getProgramDerivedAddress({ + programAddress, + seeds: [ + getAddressEncoder().encode(seeds.ownerPubkey), + getAddressEncoder().encode( + address("TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb") + ), + getAddressEncoder().encode(seeds.deviceMintPubkey) + ] + }); +} async function findDeviceMintPda(seeds, config = {}) { const { programAddress = "hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1" @@ -15,6 +30,21 @@ async function findDeviceMintPda(seeds, config = {}) { ] }); } +async function findProductATokenPda(seeds, config = {}) { + const { + programAddress = "hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1" + } = config; + return await getProgramDerivedAddress({ + programAddress, + seeds: [ + getAddressEncoder().encode(seeds.devicePubkey), + getAddressEncoder().encode( + address("TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb") + ), + getAddressEncoder().encode(seeds.productMintPubkey) + ] + }); +} async function findProductMintPda(seeds, config = {}) { const { programAddress = "hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1" @@ -28,6 +58,15 @@ async function findProductMintPda(seeds, config = {}) { ] }); } +async function findProgramDataPda(config = {}) { + const { + programAddress = "hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1" + } = config; + return await getProgramDerivedAddress({ + programAddress, + seeds: [getUtf8Encoder().encode("DePHY_ID")] + }); +} async function findProgramDataAccountPda(config = {}) { const { programAddress = "hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1" @@ -188,13 +227,13 @@ function decodeProgramDataAccount(encodedAccount) { getProgramDataAccountDecoder() ); } -async function fetchProgramDataAccount(rpc, address, config) { - const maybeAccount = await fetchMaybeProgramDataAccount(rpc, address, config); +async function fetchProgramDataAccount(rpc, address3, config) { + const maybeAccount = await fetchMaybeProgramDataAccount(rpc, address3, config); assertAccountExists(maybeAccount); return maybeAccount; } -async function fetchMaybeProgramDataAccount(rpc, address, config) { - const maybeAccount = await fetchEncodedAccount(rpc, address, config); +async function fetchMaybeProgramDataAccount(rpc, address3, config) { + const maybeAccount = await fetchEncodedAccount(rpc, address3, config); return decodeProgramDataAccount(maybeAccount); } async function fetchAllProgramDataAccount(rpc, addresses, config) { @@ -222,8 +261,8 @@ async function fetchProgramDataAccountFromSeeds(rpc, config = {}) { } async function fetchMaybeProgramDataAccountFromSeeds(rpc, config = {}) { const { programAddress, ...fetchConfig } = config; - const [address] = await findProgramDataAccountPda({ programAddress }); - return await fetchMaybeProgramDataAccount(rpc, address, fetchConfig); + const [address3] = await findProgramDataAccountPda({ programAddress }); + return await fetchMaybeProgramDataAccount(rpc, address3, fetchConfig); } // src/generated/errors/dephyId.ts @@ -307,6 +346,12 @@ function identifyDephyIdInstruction(instruction) { "The provided instruction could not be identified as a dephyId instruction." ); } +function expectSome(value) { + if (value == null) { + throw new Error("Expected a value but received null or undefined."); + } + return value; +} function expectAddress(value) { if (!value) { throw new Error("Expected a Address."); @@ -392,6 +437,9 @@ function getActivateDeviceInstruction(input) { if (!accounts.systemProgram.value) { accounts.systemProgram.value = "11111111111111111111111111111111"; } + if (!accounts.token2022Program.value) { + accounts.token2022Program.value = "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"; + } if (!accounts.ataProgram.value) { accounts.ataProgram.value = "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"; } @@ -515,9 +563,15 @@ function getCreateActivatedDeviceInstruction(input) { if (!accounts.systemProgram.value) { accounts.systemProgram.value = "11111111111111111111111111111111"; } + if (!accounts.token2022Program.value) { + accounts.token2022Program.value = "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"; + } if (!accounts.ataProgram.value) { accounts.ataProgram.value = "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"; } + if (!accounts.payer.value) { + accounts.payer.value = expectSome(accounts.vendor.value); + } const getAccountMeta = getAccountMetaFactory(programAddress); const instruction = { accounts: [ @@ -643,6 +697,9 @@ function getCreateDeviceInstruction(input) { if (!accounts.ataProgram.value) { accounts.ataProgram.value = "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"; } + if (!accounts.payer.value) { + accounts.payer.value = expectSome(accounts.vendor.value); + } const getAccountMeta = getAccountMetaFactory(programAddress); const instruction = { accounts: [ @@ -824,6 +881,9 @@ function getInitializeInstruction(input) { if (!accounts.systemProgram.value) { accounts.systemProgram.value = "11111111111111111111111111111111"; } + if (!accounts.payer.value) { + accounts.payer.value = expectSome(accounts.authority.value); + } const getAccountMeta = getAccountMetaFactory(programAddress); const instruction = { accounts: [ @@ -861,6 +921,6 @@ function parseInitializeInstruction(instruction) { }; } -export { DEPHY_ID_ERROR__ACCOUNT_MISMATCH, DEPHY_ID_ERROR__DESERIALIZATION_ERROR, DEPHY_ID_ERROR__EXPECTED_EMPTY_ACCOUNT, DEPHY_ID_ERROR__EXPECTED_NON_EMPTY_ACCOUNT, DEPHY_ID_ERROR__EXPECTED_SIGNER_ACCOUNT, DEPHY_ID_ERROR__EXPECTED_WRITABLE_ACCOUNT, DEPHY_ID_ERROR__INVALID_ACCOUNT_KEY, DEPHY_ID_ERROR__INVALID_PDA, DEPHY_ID_ERROR__INVALID_PROGRAM_OWNER, DEPHY_ID_ERROR__MISSING_INSTRUCTION, DEPHY_ID_ERROR__NUMERICAL_OVERFLOW, DEPHY_ID_ERROR__SERIALIZATION_ERROR, DEPHY_ID_ERROR__SIGNATURE_MISMATCH, DEPHY_ID_PROGRAM_ADDRESS, DephyIdAccount, DephyIdInstruction, DeviceSigningAlgorithm, Key, decodeProgramDataAccount, deviceActivationSignature, fetchAllMaybeProgramDataAccount, fetchAllProgramDataAccount, fetchMaybeProgramDataAccount, fetchMaybeProgramDataAccountFromSeeds, fetchProgramDataAccount, fetchProgramDataAccountFromSeeds, findDeviceMintPda, findProductMintPda, findProgramDataAccountPda, getActivateDeviceInstruction, getActivateDeviceInstructionDataCodec, getActivateDeviceInstructionDataDecoder, getActivateDeviceInstructionDataEncoder, getCreateActivatedDeviceInstruction, getCreateActivatedDeviceInstructionDataCodec, getCreateActivatedDeviceInstructionDataDecoder, getCreateActivatedDeviceInstructionDataEncoder, getCreateDeviceInstruction, getCreateDeviceInstructionDataCodec, getCreateDeviceInstructionDataDecoder, getCreateDeviceInstructionDataEncoder, getCreateProductInstruction, getCreateProductInstructionDataCodec, getCreateProductInstructionDataDecoder, getCreateProductInstructionDataEncoder, getDephyIdErrorMessage, getDeviceActivationSignatureCodec, getDeviceActivationSignatureDecoder, getDeviceActivationSignatureEncoder, getDeviceSigningAlgorithmCodec, getDeviceSigningAlgorithmDecoder, getDeviceSigningAlgorithmEncoder, getInitializeInstruction, getInitializeInstructionDataCodec, getInitializeInstructionDataDecoder, getInitializeInstructionDataEncoder, getKeyCodec, getKeyDecoder, getKeyEncoder, getProgramDataAccountCodec, getProgramDataAccountDecoder, getProgramDataAccountEncoder, getProgramDataAccountSize, getProgramDataCodec, getProgramDataDecoder, getProgramDataEncoder, identifyDephyIdAccount, identifyDephyIdInstruction, isDeviceActivationSignature, parseActivateDeviceInstruction, parseCreateActivatedDeviceInstruction, parseCreateDeviceInstruction, parseCreateProductInstruction, parseInitializeInstruction }; +export { DEPHY_ID_ERROR__ACCOUNT_MISMATCH, DEPHY_ID_ERROR__DESERIALIZATION_ERROR, DEPHY_ID_ERROR__EXPECTED_EMPTY_ACCOUNT, DEPHY_ID_ERROR__EXPECTED_NON_EMPTY_ACCOUNT, DEPHY_ID_ERROR__EXPECTED_SIGNER_ACCOUNT, DEPHY_ID_ERROR__EXPECTED_WRITABLE_ACCOUNT, DEPHY_ID_ERROR__INVALID_ACCOUNT_KEY, DEPHY_ID_ERROR__INVALID_PDA, DEPHY_ID_ERROR__INVALID_PROGRAM_OWNER, DEPHY_ID_ERROR__MISSING_INSTRUCTION, DEPHY_ID_ERROR__NUMERICAL_OVERFLOW, DEPHY_ID_ERROR__SERIALIZATION_ERROR, DEPHY_ID_ERROR__SIGNATURE_MISMATCH, DEPHY_ID_PROGRAM_ADDRESS, DephyIdAccount, DephyIdInstruction, DeviceSigningAlgorithm, Key, decodeProgramDataAccount, deviceActivationSignature, fetchAllMaybeProgramDataAccount, fetchAllProgramDataAccount, fetchMaybeProgramDataAccount, fetchMaybeProgramDataAccountFromSeeds, fetchProgramDataAccount, fetchProgramDataAccountFromSeeds, findDeviceATokenPda, findDeviceMintPda, findProductATokenPda, findProductMintPda, findProgramDataAccountPda, findProgramDataPda, getActivateDeviceInstruction, getActivateDeviceInstructionDataCodec, getActivateDeviceInstructionDataDecoder, getActivateDeviceInstructionDataEncoder, getCreateActivatedDeviceInstruction, getCreateActivatedDeviceInstructionDataCodec, getCreateActivatedDeviceInstructionDataDecoder, getCreateActivatedDeviceInstructionDataEncoder, getCreateDeviceInstruction, getCreateDeviceInstructionDataCodec, getCreateDeviceInstructionDataDecoder, getCreateDeviceInstructionDataEncoder, getCreateProductInstruction, getCreateProductInstructionDataCodec, getCreateProductInstructionDataDecoder, getCreateProductInstructionDataEncoder, getDephyIdErrorMessage, getDeviceActivationSignatureCodec, getDeviceActivationSignatureDecoder, getDeviceActivationSignatureEncoder, getDeviceSigningAlgorithmCodec, getDeviceSigningAlgorithmDecoder, getDeviceSigningAlgorithmEncoder, getInitializeInstruction, getInitializeInstructionDataCodec, getInitializeInstructionDataDecoder, getInitializeInstructionDataEncoder, getKeyCodec, getKeyDecoder, getKeyEncoder, getProgramDataAccountCodec, getProgramDataAccountDecoder, getProgramDataAccountEncoder, getProgramDataAccountSize, getProgramDataCodec, getProgramDataDecoder, getProgramDataEncoder, identifyDephyIdAccount, identifyDephyIdInstruction, isDeviceActivationSignature, parseActivateDeviceInstruction, parseCreateActivatedDeviceInstruction, parseCreateDeviceInstruction, parseCreateProductInstruction, parseInitializeInstruction }; //# sourceMappingURL=out.js.map //# sourceMappingURL=index.mjs.map \ No newline at end of file diff --git a/clients/js/dist/src/index.mjs.map b/clients/js/dist/src/index.mjs.map index 5a446c6..f213ef5 100644 --- a/clients/js/dist/src/index.mjs.map +++ b/clients/js/dist/src/index.mjs.map @@ -1 +1 @@ -{"version":3,"sources":["../../env-shim.ts","../../src/generated/accounts/programDataAccount.ts","../../src/generated/pdas/deviceMint.ts","../../src/generated/pdas/productMint.ts","../../src/generated/pdas/programDataAccount.ts","../../src/generated/types/deviceActivationSignature.ts","../../src/generated/types/deviceSigningAlgorithm.ts","../../src/generated/types/key.ts","../../src/generated/types/programData.ts","../../src/generated/errors/dephyId.ts","../../src/generated/instructions/activateDevice.ts","../../src/generated/programs/dephyId.ts","../../src/generated/shared/index.ts","../../src/generated/instructions/createActivatedDevice.ts","../../src/generated/instructions/createDevice.ts","../../src/generated/instructions/createProduct.ts","../../src/generated/instructions/initialize.ts"],"names":["combineCodec","getAddressEncoder","getStructDecoder","getStructEncoder","getProgramDerivedAddress","getUtf8Encoder","DeviceSigningAlgorithm","getEnumDecoder","getEnumEncoder","Key","getU8Decoder","getU8Encoder","transformEncoder","DephyIdAccount","DephyIdInstruction","getTupleDecoder","getTupleEncoder","addDecoderSizePrefix","addEncoderSizePrefix","getArrayDecoder","getArrayEncoder","getU32Decoder","getU32Encoder","getUtf8Decoder"],"mappings":";AACO,IAAM,UAA2B,uBACrC,QAAgB,KAAU,EAAE,aAAa,eAAe;;;ACM3D;AAAA,EACE;AAAA,EACA;AAAA,EACA,gBAAAA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,qBAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,oBAAAC;AAAA,EACA;AAAA,OAWK;;;ACtBP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AAQP,eAAsB,kBACpB,OACA,SAAmD,CAAC,GACpB;AAChC,QAAM;AAAA,IACJ,iBAAiB;AAAA,EACnB,IAAI;AACJ,SAAO,MAAM,yBAAyB;AAAA,IACpC;AAAA,IACA,OAAO;AAAA,MACL,eAAe,EAAE,OAAO,iBAAiB;AAAA,MACzC,kBAAkB,EAAE,OAAO,MAAM,iBAAiB;AAAA,MAClD,kBAAkB,EAAE,OAAO,MAAM,YAAY;AAAA,IAC/C;AAAA,EACF,CAAC;AACH;;;AC7BA;AAAA,EACE,qBAAAF;AAAA,EACA,4BAAAG;AAAA,EACA,kBAAAC;AAAA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Aa,eAAe;AAAA,MAC5B,WAAW,eAAe;AAAA,IAC5B;AAAA,IACA,MAAM,oCAAoC,EAAE,OAAO,YAAY,IAAI;AAAA,EACrE;AACF","sourcesContent":["// Clever obfuscation to prevent the build system from inlining the value of `NODE_ENV`\nexport const __DEV__ = /* @__PURE__ */ (() =>\n (process as any)['en' + 'v'].NODE_ENV === 'development')();\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport {\n assertAccountExists,\n assertAccountsExist,\n combineCodec,\n decodeAccount,\n fetchEncodedAccount,\n fetchEncodedAccounts,\n getAddressDecoder,\n getAddressEncoder,\n getStructDecoder,\n getStructEncoder,\n transformEncoder,\n type Account,\n type Address,\n type Codec,\n type Decoder,\n type EncodedAccount,\n type Encoder,\n type FetchAccountConfig,\n type FetchAccountsConfig,\n type MaybeAccount,\n type MaybeEncodedAccount,\n} from '@solana/web3.js';\nimport { findProgramDataAccountPda } from '../pdas';\nimport {\n Key,\n getKeyDecoder,\n getKeyEncoder,\n getProgramDataDecoder,\n getProgramDataEncoder,\n type ProgramData,\n type ProgramDataArgs,\n} from '../types';\n\nexport type ProgramDataAccount = {\n key: Key;\n authority: Address;\n data: ProgramData;\n};\n\nexport type ProgramDataAccountArgs = {\n authority: Address;\n data: ProgramDataArgs;\n};\n\nexport function getProgramDataAccountEncoder(): Encoder {\n return transformEncoder(\n getStructEncoder([\n ['key', getKeyEncoder()],\n ['authority', getAddressEncoder()],\n ['data', getProgramDataEncoder()],\n ]),\n (value) => ({ ...value, key: Key.ProgramDataAccount })\n );\n}\n\nexport function getProgramDataAccountDecoder(): Decoder {\n return getStructDecoder([\n ['key', getKeyDecoder()],\n ['authority', getAddressDecoder()],\n ['data', getProgramDataDecoder()],\n ]);\n}\n\nexport function getProgramDataAccountCodec(): Codec<\n ProgramDataAccountArgs,\n ProgramDataAccount\n> {\n return combineCodec(\n getProgramDataAccountEncoder(),\n getProgramDataAccountDecoder()\n );\n}\n\nexport function decodeProgramDataAccount(\n encodedAccount: EncodedAccount\n): Account;\nexport function decodeProgramDataAccount(\n encodedAccount: MaybeEncodedAccount\n): MaybeAccount;\nexport function decodeProgramDataAccount(\n encodedAccount: EncodedAccount | MaybeEncodedAccount\n):\n | Account\n | MaybeAccount {\n return decodeAccount(\n encodedAccount as MaybeEncodedAccount,\n getProgramDataAccountDecoder()\n );\n}\n\nexport async function fetchProgramDataAccount(\n rpc: Parameters[0],\n address: Address,\n config?: FetchAccountConfig\n): Promise> {\n const maybeAccount = await fetchMaybeProgramDataAccount(rpc, address, config);\n assertAccountExists(maybeAccount);\n return maybeAccount;\n}\n\nexport async function fetchMaybeProgramDataAccount<\n TAddress extends string = string,\n>(\n rpc: Parameters[0],\n address: Address,\n config?: FetchAccountConfig\n): Promise> {\n const maybeAccount = await fetchEncodedAccount(rpc, address, config);\n return decodeProgramDataAccount(maybeAccount);\n}\n\nexport async function fetchAllProgramDataAccount(\n rpc: Parameters[0],\n addresses: Array
,\n config?: FetchAccountsConfig\n): Promise[]> {\n const maybeAccounts = await fetchAllMaybeProgramDataAccount(\n rpc,\n addresses,\n config\n );\n assertAccountsExist(maybeAccounts);\n return maybeAccounts;\n}\n\nexport async function fetchAllMaybeProgramDataAccount(\n rpc: Parameters[0],\n addresses: Array
,\n config?: FetchAccountsConfig\n): Promise[]> {\n const maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);\n return maybeAccounts.map((maybeAccount) =>\n decodeProgramDataAccount(maybeAccount)\n );\n}\n\nexport function getProgramDataAccountSize(): number {\n return 34;\n}\n\nexport async function fetchProgramDataAccountFromSeeds(\n rpc: Parameters[0],\n config: FetchAccountConfig & { programAddress?: Address } = {}\n): Promise> {\n const maybeAccount = await fetchMaybeProgramDataAccountFromSeeds(rpc, config);\n assertAccountExists(maybeAccount);\n return maybeAccount;\n}\n\nexport async function fetchMaybeProgramDataAccountFromSeeds(\n rpc: Parameters[0],\n config: FetchAccountConfig & { programAddress?: Address } = {}\n): Promise> {\n const { programAddress, ...fetchConfig } = config;\n const [address] = await findProgramDataAccountPda({ programAddress });\n return await fetchMaybeProgramDataAccount(rpc, address, fetchConfig);\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport {\n getAddressEncoder,\n getProgramDerivedAddress,\n getUtf8Encoder,\n type Address,\n type ProgramDerivedAddress,\n} from '@solana/web3.js';\n\nexport type DeviceMintSeeds = {\n productMintPubkey: Address;\n\n devicePubkey: Address;\n};\n\nexport async function findDeviceMintPda(\n seeds: DeviceMintSeeds,\n config: { programAddress?: Address | undefined } = {}\n): Promise {\n const {\n programAddress = 'hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1' as Address<'hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1'>,\n } = config;\n return await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getUtf8Encoder().encode('DePHY_ID-DEVICE'),\n getAddressEncoder().encode(seeds.productMintPubkey),\n getAddressEncoder().encode(seeds.devicePubkey),\n ],\n });\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport {\n getAddressEncoder,\n getProgramDerivedAddress,\n getUtf8Encoder,\n type Address,\n type ProgramDerivedAddress,\n} from '@solana/web3.js';\n\nexport type ProductMintSeeds = {\n vendorPubkey: Address;\n\n productName: string;\n};\n\nexport async function findProductMintPda(\n seeds: ProductMintSeeds,\n config: { programAddress?: Address | undefined } = {}\n): Promise {\n const {\n programAddress = 'hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1' as Address<'hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1'>,\n } = config;\n return await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getUtf8Encoder().encode('DePHY_ID-PRODUCT'),\n getAddressEncoder().encode(seeds.vendorPubkey),\n getUtf8Encoder().encode(seeds.productName),\n ],\n });\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport {\n getProgramDerivedAddress,\n getUtf8Encoder,\n type Address,\n type ProgramDerivedAddress,\n} from '@solana/web3.js';\n\nexport async function findProgramDataAccountPda(\n config: { programAddress?: Address | undefined } = {}\n): Promise {\n const {\n programAddress = 'hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1' as Address<'hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1'>,\n } = config;\n return await getProgramDerivedAddress({\n programAddress,\n seeds: [getUtf8Encoder().encode('DePHY_ID')],\n });\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getBytesDecoder,\n getBytesEncoder,\n getDiscriminatedUnionDecoder,\n getDiscriminatedUnionEncoder,\n getStructDecoder,\n getStructEncoder,\n getTupleDecoder,\n getTupleEncoder,\n getU8Decoder,\n getU8Encoder,\n type Codec,\n type Decoder,\n type Encoder,\n type GetDiscriminatedUnionVariant,\n type GetDiscriminatedUnionVariantContent,\n type ReadonlyUint8Array,\n} from '@solana/web3.js';\n\nexport type DeviceActivationSignature =\n | { __kind: 'Ed25519'; fields: readonly [ReadonlyUint8Array] }\n | { __kind: 'Secp256k1'; fields: readonly [ReadonlyUint8Array, number] }\n | { __kind: 'EthSecp256k1'; fields: readonly [ReadonlyUint8Array, number] };\n\nexport type DeviceActivationSignatureArgs = DeviceActivationSignature;\n\nexport function getDeviceActivationSignatureEncoder(): Encoder {\n return getDiscriminatedUnionEncoder([\n [\n 'Ed25519',\n getStructEncoder([\n ['fields', getTupleEncoder([fixEncoderSize(getBytesEncoder(), 64)])],\n ]),\n ],\n [\n 'Secp256k1',\n getStructEncoder([\n [\n 'fields',\n getTupleEncoder([\n fixEncoderSize(getBytesEncoder(), 64),\n getU8Encoder(),\n ]),\n ],\n ]),\n ],\n [\n 'EthSecp256k1',\n getStructEncoder([\n [\n 'fields',\n getTupleEncoder([\n fixEncoderSize(getBytesEncoder(), 64),\n getU8Encoder(),\n ]),\n ],\n ]),\n ],\n ]);\n}\n\nexport function getDeviceActivationSignatureDecoder(): Decoder {\n return getDiscriminatedUnionDecoder([\n [\n 'Ed25519',\n getStructDecoder([\n ['fields', getTupleDecoder([fixDecoderSize(getBytesDecoder(), 64)])],\n ]),\n ],\n [\n 'Secp256k1',\n getStructDecoder([\n [\n 'fields',\n getTupleDecoder([\n fixDecoderSize(getBytesDecoder(), 64),\n getU8Decoder(),\n ]),\n ],\n ]),\n ],\n [\n 'EthSecp256k1',\n getStructDecoder([\n [\n 'fields',\n getTupleDecoder([\n fixDecoderSize(getBytesDecoder(), 64),\n getU8Decoder(),\n ]),\n ],\n ]),\n ],\n ]);\n}\n\nexport function getDeviceActivationSignatureCodec(): Codec<\n DeviceActivationSignatureArgs,\n DeviceActivationSignature\n> {\n return combineCodec(\n getDeviceActivationSignatureEncoder(),\n getDeviceActivationSignatureDecoder()\n );\n}\n\n// Data Enum Helpers.\nexport function deviceActivationSignature(\n kind: 'Ed25519',\n data: GetDiscriminatedUnionVariantContent<\n DeviceActivationSignatureArgs,\n '__kind',\n 'Ed25519'\n >['fields']\n): GetDiscriminatedUnionVariant<\n DeviceActivationSignatureArgs,\n '__kind',\n 'Ed25519'\n>;\nexport function deviceActivationSignature(\n kind: 'Secp256k1',\n data: GetDiscriminatedUnionVariantContent<\n DeviceActivationSignatureArgs,\n '__kind',\n 'Secp256k1'\n >['fields']\n): GetDiscriminatedUnionVariant<\n DeviceActivationSignatureArgs,\n '__kind',\n 'Secp256k1'\n>;\nexport function deviceActivationSignature(\n kind: 'EthSecp256k1',\n data: GetDiscriminatedUnionVariantContent<\n DeviceActivationSignatureArgs,\n '__kind',\n 'EthSecp256k1'\n >['fields']\n): GetDiscriminatedUnionVariant<\n DeviceActivationSignatureArgs,\n '__kind',\n 'EthSecp256k1'\n>;\nexport function deviceActivationSignature<\n K extends DeviceActivationSignatureArgs['__kind'],\n Data,\n>(kind: K, data?: Data) {\n return Array.isArray(data)\n ? { __kind: kind, fields: data }\n : { __kind: kind, ...(data ?? {}) };\n}\n\nexport function isDeviceActivationSignature<\n K extends DeviceActivationSignature['__kind'],\n>(\n kind: K,\n value: DeviceActivationSignature\n): value is DeviceActivationSignature & { __kind: K } {\n return value.__kind === kind;\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport {\n combineCodec,\n getEnumDecoder,\n getEnumEncoder,\n type Codec,\n type Decoder,\n type Encoder,\n} from '@solana/web3.js';\n\nexport enum DeviceSigningAlgorithm {\n Ed25519,\n Secp256k1,\n}\n\nexport type DeviceSigningAlgorithmArgs = DeviceSigningAlgorithm;\n\nexport function getDeviceSigningAlgorithmEncoder(): Encoder {\n return getEnumEncoder(DeviceSigningAlgorithm);\n}\n\nexport function getDeviceSigningAlgorithmDecoder(): Decoder {\n return getEnumDecoder(DeviceSigningAlgorithm);\n}\n\nexport function getDeviceSigningAlgorithmCodec(): Codec<\n DeviceSigningAlgorithmArgs,\n DeviceSigningAlgorithm\n> {\n return combineCodec(\n getDeviceSigningAlgorithmEncoder(),\n getDeviceSigningAlgorithmDecoder()\n );\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport {\n combineCodec,\n getEnumDecoder,\n getEnumEncoder,\n type Codec,\n type Decoder,\n type Encoder,\n} from '@solana/web3.js';\n\nexport enum Key {\n Uninitialized,\n ProgramDataAccount,\n}\n\nexport type KeyArgs = Key;\n\nexport function getKeyEncoder(): Encoder {\n return getEnumEncoder(Key);\n}\n\nexport function getKeyDecoder(): Decoder {\n return getEnumDecoder(Key);\n}\n\nexport function getKeyCodec(): Codec {\n return combineCodec(getKeyEncoder(), getKeyDecoder());\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport {\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU8Decoder,\n getU8Encoder,\n type Codec,\n type Decoder,\n type Encoder,\n} from '@solana/web3.js';\n\nexport type ProgramData = { bump: number };\n\nexport type ProgramDataArgs = ProgramData;\n\nexport function getProgramDataEncoder(): Encoder {\n return getStructEncoder([['bump', getU8Encoder()]]);\n}\n\nexport function getProgramDataDecoder(): Decoder {\n return getStructDecoder([['bump', getU8Decoder()]]);\n}\n\nexport function getProgramDataCodec(): Codec {\n return combineCodec(getProgramDataEncoder(), getProgramDataDecoder());\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\n/** DeserializationError: Error deserializing an account */\nexport const DEPHY_ID_ERROR__DESERIALIZATION_ERROR = 0x0; // 0\n/** SerializationError: Error serializing an account */\nexport const DEPHY_ID_ERROR__SERIALIZATION_ERROR = 0x1; // 1\n/** InvalidProgramOwner: Invalid program owner. This likely mean the provided account does not exist */\nexport const DEPHY_ID_ERROR__INVALID_PROGRAM_OWNER = 0x2; // 2\n/** InvalidPda: Invalid PDA derivation */\nexport const DEPHY_ID_ERROR__INVALID_PDA = 0x3; // 3\n/** ExpectedEmptyAccount: Expected empty account */\nexport const DEPHY_ID_ERROR__EXPECTED_EMPTY_ACCOUNT = 0x4; // 4\n/** ExpectedNonEmptyAccount: Expected non empty account */\nexport const DEPHY_ID_ERROR__EXPECTED_NON_EMPTY_ACCOUNT = 0x5; // 5\n/** ExpectedSignerAccount: Expected signer account */\nexport const DEPHY_ID_ERROR__EXPECTED_SIGNER_ACCOUNT = 0x6; // 6\n/** ExpectedWritableAccount: Expected writable account */\nexport const DEPHY_ID_ERROR__EXPECTED_WRITABLE_ACCOUNT = 0x7; // 7\n/** AccountMismatch: Account mismatch */\nexport const DEPHY_ID_ERROR__ACCOUNT_MISMATCH = 0x8; // 8\n/** InvalidAccountKey: Invalid account key */\nexport const DEPHY_ID_ERROR__INVALID_ACCOUNT_KEY = 0x9; // 9\n/** NumericalOverflow: Numerical overflow */\nexport const DEPHY_ID_ERROR__NUMERICAL_OVERFLOW = 0xa; // 10\n/** MissingInstruction: Missing instruction */\nexport const DEPHY_ID_ERROR__MISSING_INSTRUCTION = 0xb; // 11\n/** SignatureMismatch: Signature mismatch */\nexport const DEPHY_ID_ERROR__SIGNATURE_MISMATCH = 0xc; // 12\n\nexport type DephyIdError =\n | typeof DEPHY_ID_ERROR__ACCOUNT_MISMATCH\n | typeof DEPHY_ID_ERROR__DESERIALIZATION_ERROR\n | typeof DEPHY_ID_ERROR__EXPECTED_EMPTY_ACCOUNT\n | typeof DEPHY_ID_ERROR__EXPECTED_NON_EMPTY_ACCOUNT\n | typeof DEPHY_ID_ERROR__EXPECTED_SIGNER_ACCOUNT\n | typeof DEPHY_ID_ERROR__EXPECTED_WRITABLE_ACCOUNT\n | typeof DEPHY_ID_ERROR__INVALID_ACCOUNT_KEY\n | typeof DEPHY_ID_ERROR__INVALID_PDA\n | typeof DEPHY_ID_ERROR__INVALID_PROGRAM_OWNER\n | typeof DEPHY_ID_ERROR__MISSING_INSTRUCTION\n | typeof DEPHY_ID_ERROR__NUMERICAL_OVERFLOW\n | typeof DEPHY_ID_ERROR__SERIALIZATION_ERROR\n | typeof DEPHY_ID_ERROR__SIGNATURE_MISMATCH;\n\nlet dephyIdErrorMessages: Record | undefined;\nif (__DEV__) {\n dephyIdErrorMessages = {\n [DEPHY_ID_ERROR__ACCOUNT_MISMATCH]: `Account mismatch`,\n [DEPHY_ID_ERROR__DESERIALIZATION_ERROR]: `Error deserializing an account`,\n [DEPHY_ID_ERROR__EXPECTED_EMPTY_ACCOUNT]: `Expected empty account`,\n [DEPHY_ID_ERROR__EXPECTED_NON_EMPTY_ACCOUNT]: `Expected non empty account`,\n [DEPHY_ID_ERROR__EXPECTED_SIGNER_ACCOUNT]: `Expected signer account`,\n [DEPHY_ID_ERROR__EXPECTED_WRITABLE_ACCOUNT]: `Expected writable account`,\n [DEPHY_ID_ERROR__INVALID_ACCOUNT_KEY]: `Invalid account key`,\n [DEPHY_ID_ERROR__INVALID_PDA]: `Invalid PDA derivation`,\n [DEPHY_ID_ERROR__INVALID_PROGRAM_OWNER]: `Invalid program owner. This likely mean the provided account does not exist`,\n [DEPHY_ID_ERROR__MISSING_INSTRUCTION]: `Missing instruction`,\n [DEPHY_ID_ERROR__NUMERICAL_OVERFLOW]: `Numerical overflow`,\n [DEPHY_ID_ERROR__SERIALIZATION_ERROR]: `Error serializing an account`,\n [DEPHY_ID_ERROR__SIGNATURE_MISMATCH]: `Signature mismatch`,\n };\n}\n\nexport function getDephyIdErrorMessage(code: DephyIdError): string {\n if (__DEV__) {\n return (dephyIdErrorMessages as Record)[code];\n }\n\n return 'Error message not available in production bundles. Compile with `__DEV__` set to true to see more information.';\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport {\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU64Decoder,\n getU64Encoder,\n getU8Decoder,\n getU8Encoder,\n transformEncoder,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type IAccountMeta,\n type IAccountSignerMeta,\n type IInstruction,\n type IInstructionWithAccounts,\n type IInstructionWithData,\n type ReadonlyAccount,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/web3.js';\nimport { DEPHY_ID_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\nimport {\n getDeviceActivationSignatureDecoder,\n getDeviceActivationSignatureEncoder,\n type DeviceActivationSignature,\n type DeviceActivationSignatureArgs,\n} from '../types';\n\nexport type ActivateDeviceInstruction<\n TProgram extends string = typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountSystemProgram extends\n | string\n | IAccountMeta = '11111111111111111111111111111111',\n TAccountToken2022Program extends string | IAccountMeta = string,\n TAccountAtaProgram extends\n | string\n | IAccountMeta = 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n TAccountPayer extends string | IAccountMeta = string,\n TAccountVendor extends string | IAccountMeta = string,\n TAccountProductMint extends string | IAccountMeta = string,\n TAccountProductAssociatedToken extends string | IAccountMeta = string,\n TAccountDevice extends string | IAccountMeta = string,\n TAccountDeviceMint extends string | IAccountMeta = string,\n TAccountDeviceAssociatedToken extends string | IAccountMeta = string,\n TAccountOwner extends string | IAccountMeta = string,\n TRemainingAccounts extends readonly IAccountMeta[] = [],\n> = IInstruction &\n IInstructionWithData &\n IInstructionWithAccounts<\n [\n TAccountSystemProgram extends string\n ? ReadonlyAccount\n : TAccountSystemProgram,\n TAccountToken2022Program extends string\n ? ReadonlyAccount\n : TAccountToken2022Program,\n TAccountAtaProgram extends string\n ? ReadonlyAccount\n : TAccountAtaProgram,\n TAccountPayer extends string\n ? WritableSignerAccount &\n IAccountSignerMeta\n : TAccountPayer,\n TAccountVendor extends string\n ? ReadonlyAccount\n : TAccountVendor,\n TAccountProductMint extends string\n ? ReadonlyAccount\n : TAccountProductMint,\n TAccountProductAssociatedToken extends string\n ? ReadonlyAccount\n : TAccountProductAssociatedToken,\n TAccountDevice extends string\n ? ReadonlyAccount\n : TAccountDevice,\n TAccountDeviceMint extends string\n ? WritableAccount\n : TAccountDeviceMint,\n TAccountDeviceAssociatedToken extends string\n ? WritableAccount\n : TAccountDeviceAssociatedToken,\n TAccountOwner extends string\n ? ReadonlyAccount\n : TAccountOwner,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type ActivateDeviceInstructionData = {\n discriminator: number;\n signature: DeviceActivationSignature;\n timestamp: bigint;\n};\n\nexport type ActivateDeviceInstructionDataArgs = {\n signature: DeviceActivationSignatureArgs;\n timestamp: number | bigint;\n};\n\nexport function getActivateDeviceInstructionDataEncoder(): Encoder {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', getU8Encoder()],\n ['signature', getDeviceActivationSignatureEncoder()],\n ['timestamp', getU64Encoder()],\n ]),\n (value) => ({ ...value, discriminator: 3 })\n );\n}\n\nexport function getActivateDeviceInstructionDataDecoder(): Decoder {\n return getStructDecoder([\n ['discriminator', getU8Decoder()],\n ['signature', getDeviceActivationSignatureDecoder()],\n ['timestamp', getU64Decoder()],\n ]);\n}\n\nexport function getActivateDeviceInstructionDataCodec(): Codec<\n ActivateDeviceInstructionDataArgs,\n ActivateDeviceInstructionData\n> {\n return combineCodec(\n getActivateDeviceInstructionDataEncoder(),\n getActivateDeviceInstructionDataDecoder()\n );\n}\n\nexport type ActivateDeviceInput<\n TAccountSystemProgram extends string = string,\n TAccountToken2022Program extends string = string,\n TAccountAtaProgram extends string = string,\n TAccountPayer extends string = string,\n TAccountVendor extends string = string,\n TAccountProductMint extends string = string,\n TAccountProductAssociatedToken extends string = string,\n TAccountDevice extends string = string,\n TAccountDeviceMint extends string = string,\n TAccountDeviceAssociatedToken extends string = string,\n TAccountOwner extends string = string,\n> = {\n /** The system program */\n systemProgram?: Address;\n /** The SPL Token 2022 program */\n token2022Program: Address;\n /** The associated token program */\n ataProgram?: Address;\n /** The account paying for the storage fees */\n payer: TransactionSigner;\n /** The vendor */\n vendor: Address;\n /** The mint account for the product */\n productMint: Address;\n /** The associated token account for the product */\n productAssociatedToken: Address;\n /** The device */\n device: Address;\n /** The mint account for the device */\n deviceMint: Address;\n /** The associated token account for the device */\n deviceAssociatedToken: Address;\n /** The device's owner */\n owner: Address;\n signature: ActivateDeviceInstructionDataArgs['signature'];\n timestamp: ActivateDeviceInstructionDataArgs['timestamp'];\n};\n\nexport function getActivateDeviceInstruction<\n TAccountSystemProgram extends string,\n TAccountToken2022Program extends string,\n TAccountAtaProgram extends string,\n TAccountPayer extends string,\n TAccountVendor extends string,\n TAccountProductMint extends string,\n TAccountProductAssociatedToken extends string,\n TAccountDevice extends string,\n TAccountDeviceMint extends string,\n TAccountDeviceAssociatedToken extends string,\n TAccountOwner extends string,\n>(\n input: ActivateDeviceInput<\n TAccountSystemProgram,\n TAccountToken2022Program,\n TAccountAtaProgram,\n TAccountPayer,\n TAccountVendor,\n TAccountProductMint,\n TAccountProductAssociatedToken,\n TAccountDevice,\n TAccountDeviceMint,\n TAccountDeviceAssociatedToken,\n TAccountOwner\n >\n): ActivateDeviceInstruction<\n typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountSystemProgram,\n TAccountToken2022Program,\n TAccountAtaProgram,\n TAccountPayer,\n TAccountVendor,\n TAccountProductMint,\n TAccountProductAssociatedToken,\n TAccountDevice,\n TAccountDeviceMint,\n TAccountDeviceAssociatedToken,\n TAccountOwner\n> {\n // Program address.\n const programAddress = DEPHY_ID_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n token2022Program: {\n value: input.token2022Program ?? null,\n isWritable: false,\n },\n ataProgram: { value: input.ataProgram ?? null, isWritable: false },\n payer: { value: input.payer ?? null, isWritable: true },\n vendor: { value: input.vendor ?? null, isWritable: false },\n productMint: { value: input.productMint ?? null, isWritable: false },\n productAssociatedToken: {\n value: input.productAssociatedToken ?? null,\n isWritable: false,\n },\n device: { value: input.device ?? null, isWritable: false },\n deviceMint: { value: input.deviceMint ?? null, isWritable: true },\n deviceAssociatedToken: {\n value: input.deviceAssociatedToken ?? null,\n isWritable: true,\n },\n owner: { value: input.owner ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n if (!accounts.ataProgram.value) {\n accounts.ataProgram.value =\n 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.token2022Program),\n getAccountMeta(accounts.ataProgram),\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.vendor),\n getAccountMeta(accounts.productMint),\n getAccountMeta(accounts.productAssociatedToken),\n getAccountMeta(accounts.device),\n getAccountMeta(accounts.deviceMint),\n getAccountMeta(accounts.deviceAssociatedToken),\n getAccountMeta(accounts.owner),\n ],\n programAddress,\n data: getActivateDeviceInstructionDataEncoder().encode(\n args as ActivateDeviceInstructionDataArgs\n ),\n } as ActivateDeviceInstruction<\n typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountSystemProgram,\n TAccountToken2022Program,\n TAccountAtaProgram,\n TAccountPayer,\n TAccountVendor,\n TAccountProductMint,\n TAccountProductAssociatedToken,\n TAccountDevice,\n TAccountDeviceMint,\n TAccountDeviceAssociatedToken,\n TAccountOwner\n >;\n\n return instruction;\n}\n\nexport type ParsedActivateDeviceInstruction<\n TProgram extends string = typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[],\n> = {\n programAddress: Address;\n accounts: {\n /** The system program */\n systemProgram: TAccountMetas[0];\n /** The SPL Token 2022 program */\n token2022Program: TAccountMetas[1];\n /** The associated token program */\n ataProgram: TAccountMetas[2];\n /** The account paying for the storage fees */\n payer: TAccountMetas[3];\n /** The vendor */\n vendor: TAccountMetas[4];\n /** The mint account for the product */\n productMint: TAccountMetas[5];\n /** The associated token account for the product */\n productAssociatedToken: TAccountMetas[6];\n /** The device */\n device: TAccountMetas[7];\n /** The mint account for the device */\n deviceMint: TAccountMetas[8];\n /** The associated token account for the device */\n deviceAssociatedToken: TAccountMetas[9];\n /** The device's owner */\n owner: TAccountMetas[10];\n };\n data: ActivateDeviceInstructionData;\n};\n\nexport function parseActivateDeviceInstruction<\n TProgram extends string,\n TAccountMetas extends readonly IAccountMeta[],\n>(\n instruction: IInstruction &\n IInstructionWithAccounts &\n IInstructionWithData\n): ParsedActivateDeviceInstruction {\n if (instruction.accounts.length < 11) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n systemProgram: getNextAccount(),\n token2022Program: getNextAccount(),\n ataProgram: getNextAccount(),\n payer: getNextAccount(),\n vendor: getNextAccount(),\n productMint: getNextAccount(),\n productAssociatedToken: getNextAccount(),\n device: getNextAccount(),\n deviceMint: getNextAccount(),\n deviceAssociatedToken: getNextAccount(),\n owner: getNextAccount(),\n },\n data: getActivateDeviceInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport { containsBytes, getU8Encoder, type Address } from '@solana/web3.js';\nimport {\n type ParsedActivateDeviceInstruction,\n type ParsedCreateActivatedDeviceInstruction,\n type ParsedCreateDeviceInstruction,\n type ParsedCreateProductInstruction,\n type ParsedInitializeInstruction,\n} from '../instructions';\nimport { Key, getKeyEncoder } from '../types';\n\nexport const DEPHY_ID_PROGRAM_ADDRESS =\n 'hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1' as Address<'hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1'>;\n\nexport enum DephyIdAccount {\n ProgramDataAccount,\n}\n\nexport function identifyDephyIdAccount(\n account: { data: Uint8Array } | Uint8Array\n): DephyIdAccount {\n const data = account instanceof Uint8Array ? account : account.data;\n if (containsBytes(data, getKeyEncoder().encode(Key.ProgramDataAccount), 0)) {\n return DephyIdAccount.ProgramDataAccount;\n }\n throw new Error(\n 'The provided account could not be identified as a dephyId account.'\n );\n}\n\nexport enum DephyIdInstruction {\n Initialize,\n CreateProduct,\n CreateDevice,\n ActivateDevice,\n CreateActivatedDevice,\n}\n\nexport function identifyDephyIdInstruction(\n instruction: { data: Uint8Array } | Uint8Array\n): DephyIdInstruction {\n const data =\n instruction instanceof Uint8Array ? instruction : instruction.data;\n if (containsBytes(data, getU8Encoder().encode(0), 0)) {\n return DephyIdInstruction.Initialize;\n }\n if (containsBytes(data, getU8Encoder().encode(1), 0)) {\n return DephyIdInstruction.CreateProduct;\n }\n if (containsBytes(data, getU8Encoder().encode(2), 0)) {\n return DephyIdInstruction.CreateDevice;\n }\n if (containsBytes(data, getU8Encoder().encode(3), 0)) {\n return DephyIdInstruction.ActivateDevice;\n }\n if (containsBytes(data, getU8Encoder().encode(4), 0)) {\n return DephyIdInstruction.CreateActivatedDevice;\n }\n throw new Error(\n 'The provided instruction could not be identified as a dephyId instruction.'\n );\n}\n\nexport type ParsedDephyIdInstruction<\n TProgram extends string = 'hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1',\n> =\n | ({\n instructionType: DephyIdInstruction.Initialize;\n } & ParsedInitializeInstruction)\n | ({\n instructionType: DephyIdInstruction.CreateProduct;\n } & ParsedCreateProductInstruction)\n | ({\n instructionType: DephyIdInstruction.CreateDevice;\n } & ParsedCreateDeviceInstruction)\n | ({\n instructionType: DephyIdInstruction.ActivateDevice;\n } & ParsedActivateDeviceInstruction)\n | ({\n instructionType: DephyIdInstruction.CreateActivatedDevice;\n } & ParsedCreateActivatedDeviceInstruction);\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport {\n AccountRole,\n isProgramDerivedAddress,\n isTransactionSigner as web3JsIsTransactionSigner,\n type Address,\n type IAccountMeta,\n type IAccountSignerMeta,\n type ProgramDerivedAddress,\n type TransactionSigner,\n upgradeRoleToSigner,\n} from '@solana/web3.js';\n\n/**\n * Asserts that the given value is not null or undefined.\n * @internal\n */\nexport function expectSome(value: T | null | undefined): T {\n if (value == null) {\n throw new Error('Expected a value but received null or undefined.');\n }\n return value;\n}\n\n/**\n * Asserts that the given value is a PublicKey.\n * @internal\n */\nexport function expectAddress(\n value:\n | Address\n | ProgramDerivedAddress\n | TransactionSigner\n | null\n | undefined\n): Address {\n if (!value) {\n throw new Error('Expected a Address.');\n }\n if (typeof value === 'object' && 'address' in value) {\n return value.address;\n }\n if (Array.isArray(value)) {\n return value[0];\n }\n return value as Address;\n}\n\n/**\n * Asserts that the given value is a PDA.\n * @internal\n */\nexport function expectProgramDerivedAddress(\n value:\n | Address\n | ProgramDerivedAddress\n | TransactionSigner\n | null\n | undefined\n): ProgramDerivedAddress {\n if (!value || !Array.isArray(value) || !isProgramDerivedAddress(value)) {\n throw new Error('Expected a ProgramDerivedAddress.');\n }\n return value;\n}\n\n/**\n * Asserts that the given value is a TransactionSigner.\n * @internal\n */\nexport function expectTransactionSigner(\n value:\n | Address\n | ProgramDerivedAddress\n | TransactionSigner\n | null\n | undefined\n): TransactionSigner {\n if (!value || !isTransactionSigner(value)) {\n throw new Error('Expected a TransactionSigner.');\n }\n return value;\n}\n\n/**\n * Defines an instruction account to resolve.\n * @internal\n */\nexport type ResolvedAccount<\n T extends string = string,\n U extends\n | Address\n | ProgramDerivedAddress\n | TransactionSigner\n | null =\n | Address\n | ProgramDerivedAddress\n | TransactionSigner\n | null,\n> = {\n isWritable: boolean;\n value: U;\n};\n\n/**\n * Defines an instruction that stores additional bytes on-chain.\n * @internal\n */\nexport type IInstructionWithByteDelta = {\n byteDelta: number;\n};\n\n/**\n * Get account metas and signers from resolved accounts.\n * @internal\n */\nexport function getAccountMetaFactory(\n programAddress: Address,\n optionalAccountStrategy: 'omitted' | 'programId'\n) {\n return (\n account: ResolvedAccount\n ): IAccountMeta | IAccountSignerMeta | undefined => {\n if (!account.value) {\n if (optionalAccountStrategy === 'omitted') return;\n return Object.freeze({\n address: programAddress,\n role: AccountRole.READONLY,\n });\n }\n\n const writableRole = account.isWritable\n ? AccountRole.WRITABLE\n : AccountRole.READONLY;\n return Object.freeze({\n address: expectAddress(account.value),\n role: isTransactionSigner(account.value)\n ? upgradeRoleToSigner(writableRole)\n : writableRole,\n ...(isTransactionSigner(account.value) ? { signer: account.value } : {}),\n });\n };\n}\n\nexport function isTransactionSigner(\n value:\n | Address\n | ProgramDerivedAddress\n | TransactionSigner\n): value is TransactionSigner {\n return (\n !!value &&\n typeof value === 'object' &&\n 'address' in value &&\n web3JsIsTransactionSigner(value)\n );\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport {\n addDecoderSizePrefix,\n addEncoderSizePrefix,\n combineCodec,\n getArrayDecoder,\n getArrayEncoder,\n getStructDecoder,\n getStructEncoder,\n getTupleDecoder,\n getTupleEncoder,\n getU32Decoder,\n getU32Encoder,\n getU8Decoder,\n getU8Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n transformEncoder,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type IAccountMeta,\n type IAccountSignerMeta,\n type IInstruction,\n type IInstructionWithAccounts,\n type IInstructionWithData,\n type ReadonlyAccount,\n type ReadonlySignerAccount,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/web3.js';\nimport { DEPHY_ID_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\n\nexport type CreateActivatedDeviceInstruction<\n TProgram extends string = typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountSystemProgram extends\n | string\n | IAccountMeta = '11111111111111111111111111111111',\n TAccountToken2022Program extends string | IAccountMeta = string,\n TAccountAtaProgram extends\n | string\n | IAccountMeta = 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n TAccountPayer extends string | IAccountMeta = string,\n TAccountVendor extends string | IAccountMeta = string,\n TAccountProductMint extends string | IAccountMeta = string,\n TAccountProductAssociatedToken extends string | IAccountMeta = string,\n TAccountDevice extends string | IAccountMeta = string,\n TAccountDeviceMint extends string | IAccountMeta = string,\n TAccountDeviceAssociatedToken extends string | IAccountMeta = string,\n TAccountOwner extends string | IAccountMeta = string,\n TRemainingAccounts extends readonly IAccountMeta[] = [],\n> = IInstruction &\n IInstructionWithData &\n IInstructionWithAccounts<\n [\n TAccountSystemProgram extends string\n ? ReadonlyAccount\n : TAccountSystemProgram,\n TAccountToken2022Program extends string\n ? ReadonlyAccount\n : TAccountToken2022Program,\n TAccountAtaProgram extends string\n ? ReadonlyAccount\n : TAccountAtaProgram,\n TAccountPayer extends string\n ? WritableSignerAccount &\n IAccountSignerMeta\n : TAccountPayer,\n TAccountVendor extends string\n ? ReadonlyAccount\n : TAccountVendor,\n TAccountProductMint extends string\n ? ReadonlyAccount\n : TAccountProductMint,\n TAccountProductAssociatedToken extends string\n ? WritableAccount\n : TAccountProductAssociatedToken,\n TAccountDevice extends string\n ? ReadonlySignerAccount &\n IAccountSignerMeta\n : TAccountDevice,\n TAccountDeviceMint extends string\n ? WritableAccount\n : TAccountDeviceMint,\n TAccountDeviceAssociatedToken extends string\n ? WritableAccount\n : TAccountDeviceAssociatedToken,\n TAccountOwner extends string\n ? ReadonlyAccount\n : TAccountOwner,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type CreateActivatedDeviceInstructionData = {\n discriminator: number;\n name: string;\n uri: string;\n additionalMetadata: Array;\n};\n\nexport type CreateActivatedDeviceInstructionDataArgs = {\n name: string;\n uri: string;\n additionalMetadata: Array;\n};\n\nexport function getCreateActivatedDeviceInstructionDataEncoder(): Encoder {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', getU8Encoder()],\n ['name', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n ['uri', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n [\n 'additionalMetadata',\n getArrayEncoder(\n getTupleEncoder([\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n ])\n ),\n ],\n ]),\n (value) => ({ ...value, discriminator: 4 })\n );\n}\n\nexport function getCreateActivatedDeviceInstructionDataDecoder(): Decoder {\n return getStructDecoder([\n ['discriminator', getU8Decoder()],\n ['name', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n ['uri', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n [\n 'additionalMetadata',\n getArrayDecoder(\n getTupleDecoder([\n addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder()),\n addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder()),\n ])\n ),\n ],\n ]);\n}\n\nexport function getCreateActivatedDeviceInstructionDataCodec(): Codec<\n CreateActivatedDeviceInstructionDataArgs,\n CreateActivatedDeviceInstructionData\n> {\n return combineCodec(\n getCreateActivatedDeviceInstructionDataEncoder(),\n getCreateActivatedDeviceInstructionDataDecoder()\n );\n}\n\nexport type CreateActivatedDeviceInput<\n TAccountSystemProgram extends string = string,\n TAccountToken2022Program extends string = string,\n TAccountAtaProgram extends string = string,\n TAccountPayer extends string = string,\n TAccountVendor extends string = string,\n TAccountProductMint extends string = string,\n TAccountProductAssociatedToken extends string = string,\n TAccountDevice extends string = string,\n TAccountDeviceMint extends string = string,\n TAccountDeviceAssociatedToken extends string = string,\n TAccountOwner extends string = string,\n> = {\n /** The system program */\n systemProgram?: Address;\n /** The SPL Token 2022 program */\n token2022Program: Address;\n /** The associated token program */\n ataProgram?: Address;\n /** The account paying for the storage fees */\n payer: TransactionSigner;\n /** The vendor */\n vendor: Address;\n /** The mint account for the product */\n productMint: Address;\n /** The associated token account for the product */\n productAssociatedToken: Address;\n /** The device */\n device: TransactionSigner;\n /** The mint account for the device */\n deviceMint: Address;\n /** The associated token account for the device */\n deviceAssociatedToken: Address;\n /** The device's owner */\n owner: Address;\n name: CreateActivatedDeviceInstructionDataArgs['name'];\n uri: CreateActivatedDeviceInstructionDataArgs['uri'];\n additionalMetadata: CreateActivatedDeviceInstructionDataArgs['additionalMetadata'];\n};\n\nexport function getCreateActivatedDeviceInstruction<\n TAccountSystemProgram extends string,\n TAccountToken2022Program extends string,\n TAccountAtaProgram extends string,\n TAccountPayer extends string,\n TAccountVendor extends string,\n TAccountProductMint extends string,\n TAccountProductAssociatedToken extends string,\n TAccountDevice extends string,\n TAccountDeviceMint extends string,\n TAccountDeviceAssociatedToken extends string,\n TAccountOwner extends string,\n>(\n input: CreateActivatedDeviceInput<\n TAccountSystemProgram,\n TAccountToken2022Program,\n TAccountAtaProgram,\n TAccountPayer,\n TAccountVendor,\n TAccountProductMint,\n TAccountProductAssociatedToken,\n TAccountDevice,\n TAccountDeviceMint,\n TAccountDeviceAssociatedToken,\n TAccountOwner\n >\n): CreateActivatedDeviceInstruction<\n typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountSystemProgram,\n TAccountToken2022Program,\n TAccountAtaProgram,\n TAccountPayer,\n TAccountVendor,\n TAccountProductMint,\n TAccountProductAssociatedToken,\n TAccountDevice,\n TAccountDeviceMint,\n TAccountDeviceAssociatedToken,\n TAccountOwner\n> {\n // Program address.\n const programAddress = DEPHY_ID_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n token2022Program: {\n value: input.token2022Program ?? null,\n isWritable: false,\n },\n ataProgram: { value: input.ataProgram ?? null, isWritable: false },\n payer: { value: input.payer ?? null, isWritable: true },\n vendor: { value: input.vendor ?? null, isWritable: false },\n productMint: { value: input.productMint ?? null, isWritable: false },\n productAssociatedToken: {\n value: input.productAssociatedToken ?? null,\n isWritable: true,\n },\n device: { value: input.device ?? null, isWritable: false },\n deviceMint: { value: input.deviceMint ?? null, isWritable: true },\n deviceAssociatedToken: {\n value: input.deviceAssociatedToken ?? null,\n isWritable: true,\n },\n owner: { value: input.owner ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n if (!accounts.ataProgram.value) {\n accounts.ataProgram.value =\n 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.token2022Program),\n getAccountMeta(accounts.ataProgram),\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.vendor),\n getAccountMeta(accounts.productMint),\n getAccountMeta(accounts.productAssociatedToken),\n getAccountMeta(accounts.device),\n getAccountMeta(accounts.deviceMint),\n getAccountMeta(accounts.deviceAssociatedToken),\n getAccountMeta(accounts.owner),\n ],\n programAddress,\n data: getCreateActivatedDeviceInstructionDataEncoder().encode(\n args as CreateActivatedDeviceInstructionDataArgs\n ),\n } as CreateActivatedDeviceInstruction<\n typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountSystemProgram,\n TAccountToken2022Program,\n TAccountAtaProgram,\n TAccountPayer,\n TAccountVendor,\n TAccountProductMint,\n TAccountProductAssociatedToken,\n TAccountDevice,\n TAccountDeviceMint,\n TAccountDeviceAssociatedToken,\n TAccountOwner\n >;\n\n return instruction;\n}\n\nexport type ParsedCreateActivatedDeviceInstruction<\n TProgram extends string = typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[],\n> = {\n programAddress: Address;\n accounts: {\n /** The system program */\n systemProgram: TAccountMetas[0];\n /** The SPL Token 2022 program */\n token2022Program: TAccountMetas[1];\n /** The associated token program */\n ataProgram: TAccountMetas[2];\n /** The account paying for the storage fees */\n payer: TAccountMetas[3];\n /** The vendor */\n vendor: TAccountMetas[4];\n /** The mint account for the product */\n productMint: TAccountMetas[5];\n /** The associated token account for the product */\n productAssociatedToken: TAccountMetas[6];\n /** The device */\n device: TAccountMetas[7];\n /** The mint account for the device */\n deviceMint: TAccountMetas[8];\n /** The associated token account for the device */\n deviceAssociatedToken: TAccountMetas[9];\n /** The device's owner */\n owner: TAccountMetas[10];\n };\n data: CreateActivatedDeviceInstructionData;\n};\n\nexport function parseCreateActivatedDeviceInstruction<\n TProgram extends string,\n TAccountMetas extends readonly IAccountMeta[],\n>(\n instruction: IInstruction &\n IInstructionWithAccounts &\n IInstructionWithData\n): ParsedCreateActivatedDeviceInstruction {\n if (instruction.accounts.length < 11) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n systemProgram: getNextAccount(),\n token2022Program: getNextAccount(),\n ataProgram: getNextAccount(),\n payer: getNextAccount(),\n vendor: getNextAccount(),\n productMint: getNextAccount(),\n productAssociatedToken: getNextAccount(),\n device: getNextAccount(),\n deviceMint: getNextAccount(),\n deviceAssociatedToken: getNextAccount(),\n owner: getNextAccount(),\n },\n data: getCreateActivatedDeviceInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport {\n addDecoderSizePrefix,\n addEncoderSizePrefix,\n combineCodec,\n getArrayDecoder,\n getArrayEncoder,\n getStructDecoder,\n getStructEncoder,\n getTupleDecoder,\n getTupleEncoder,\n getU32Decoder,\n getU32Encoder,\n getU8Decoder,\n getU8Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n transformEncoder,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type IAccountMeta,\n type IAccountSignerMeta,\n type IInstruction,\n type IInstructionWithAccounts,\n type IInstructionWithData,\n type ReadonlyAccount,\n type ReadonlySignerAccount,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/web3.js';\nimport { DEPHY_ID_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\nimport {\n getDeviceSigningAlgorithmDecoder,\n getDeviceSigningAlgorithmEncoder,\n type DeviceSigningAlgorithm,\n type DeviceSigningAlgorithmArgs,\n} from '../types';\n\nexport type CreateDeviceInstruction<\n TProgram extends string = typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountSystemProgram extends\n | string\n | IAccountMeta = '11111111111111111111111111111111',\n TAccountToken2022Program extends\n | string\n | IAccountMeta = 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n TAccountAtaProgram extends\n | string\n | IAccountMeta = 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n TAccountPayer extends string | IAccountMeta = string,\n TAccountVendor extends string | IAccountMeta = string,\n TAccountProductMint extends string | IAccountMeta = string,\n TAccountProductAssociatedToken extends string | IAccountMeta = string,\n TAccountDevice extends string | IAccountMeta = string,\n TAccountDeviceMint extends string | IAccountMeta = string,\n TRemainingAccounts extends readonly IAccountMeta[] = [],\n> = IInstruction &\n IInstructionWithData &\n IInstructionWithAccounts<\n [\n TAccountSystemProgram extends string\n ? ReadonlyAccount\n : TAccountSystemProgram,\n TAccountToken2022Program extends string\n ? ReadonlyAccount\n : TAccountToken2022Program,\n TAccountAtaProgram extends string\n ? ReadonlyAccount\n : TAccountAtaProgram,\n TAccountPayer extends string\n ? WritableSignerAccount &\n IAccountSignerMeta\n : TAccountPayer,\n TAccountVendor extends string\n ? ReadonlySignerAccount &\n IAccountSignerMeta\n : TAccountVendor,\n TAccountProductMint extends string\n ? WritableAccount\n : TAccountProductMint,\n TAccountProductAssociatedToken extends string\n ? WritableAccount\n : TAccountProductAssociatedToken,\n TAccountDevice extends string\n ? ReadonlyAccount\n : TAccountDevice,\n TAccountDeviceMint extends string\n ? WritableAccount\n : TAccountDeviceMint,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type CreateDeviceInstructionData = {\n discriminator: number;\n name: string;\n uri: string;\n additionalMetadata: Array;\n signingAlg: DeviceSigningAlgorithm;\n};\n\nexport type CreateDeviceInstructionDataArgs = {\n name: string;\n uri: string;\n additionalMetadata: Array;\n signingAlg: DeviceSigningAlgorithmArgs;\n};\n\nexport function getCreateDeviceInstructionDataEncoder(): Encoder {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', getU8Encoder()],\n ['name', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n ['uri', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n [\n 'additionalMetadata',\n getArrayEncoder(\n getTupleEncoder([\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n ])\n ),\n ],\n ['signingAlg', getDeviceSigningAlgorithmEncoder()],\n ]),\n (value) => ({ ...value, discriminator: 2 })\n );\n}\n\nexport function getCreateDeviceInstructionDataDecoder(): Decoder {\n return getStructDecoder([\n ['discriminator', getU8Decoder()],\n ['name', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n ['uri', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n [\n 'additionalMetadata',\n getArrayDecoder(\n getTupleDecoder([\n addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder()),\n addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder()),\n ])\n ),\n ],\n ['signingAlg', getDeviceSigningAlgorithmDecoder()],\n ]);\n}\n\nexport function getCreateDeviceInstructionDataCodec(): Codec<\n CreateDeviceInstructionDataArgs,\n CreateDeviceInstructionData\n> {\n return combineCodec(\n getCreateDeviceInstructionDataEncoder(),\n getCreateDeviceInstructionDataDecoder()\n );\n}\n\nexport type CreateDeviceInput<\n TAccountSystemProgram extends string = string,\n TAccountToken2022Program extends string = string,\n TAccountAtaProgram extends string = string,\n TAccountPayer extends string = string,\n TAccountVendor extends string = string,\n TAccountProductMint extends string = string,\n TAccountProductAssociatedToken extends string = string,\n TAccountDevice extends string = string,\n TAccountDeviceMint extends string = string,\n> = {\n /** The system program */\n systemProgram?: Address;\n /** The SPL Token 2022 program */\n token2022Program?: Address;\n /** The associated token program */\n ataProgram?: Address;\n /** The account paying for the storage fees */\n payer: TransactionSigner;\n /** The vendor */\n vendor: TransactionSigner;\n /** The mint account of the product */\n productMint: Address;\n /** The associated token account of the product */\n productAssociatedToken: Address;\n /** The device */\n device: Address;\n /** The mint account of the device */\n deviceMint: Address;\n name: CreateDeviceInstructionDataArgs['name'];\n uri: CreateDeviceInstructionDataArgs['uri'];\n additionalMetadata: CreateDeviceInstructionDataArgs['additionalMetadata'];\n signingAlg: CreateDeviceInstructionDataArgs['signingAlg'];\n};\n\nexport function getCreateDeviceInstruction<\n TAccountSystemProgram extends string,\n TAccountToken2022Program extends string,\n TAccountAtaProgram extends string,\n TAccountPayer extends string,\n TAccountVendor extends string,\n TAccountProductMint extends string,\n TAccountProductAssociatedToken extends string,\n TAccountDevice extends string,\n TAccountDeviceMint extends string,\n>(\n input: CreateDeviceInput<\n TAccountSystemProgram,\n TAccountToken2022Program,\n TAccountAtaProgram,\n TAccountPayer,\n TAccountVendor,\n TAccountProductMint,\n TAccountProductAssociatedToken,\n TAccountDevice,\n TAccountDeviceMint\n >\n): CreateDeviceInstruction<\n typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountSystemProgram,\n TAccountToken2022Program,\n TAccountAtaProgram,\n TAccountPayer,\n TAccountVendor,\n TAccountProductMint,\n TAccountProductAssociatedToken,\n TAccountDevice,\n TAccountDeviceMint\n> {\n // Program address.\n const programAddress = DEPHY_ID_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n token2022Program: {\n value: input.token2022Program ?? null,\n isWritable: false,\n },\n ataProgram: { value: input.ataProgram ?? null, isWritable: false },\n payer: { value: input.payer ?? null, isWritable: true },\n vendor: { value: input.vendor ?? null, isWritable: false },\n productMint: { value: input.productMint ?? null, isWritable: true },\n productAssociatedToken: {\n value: input.productAssociatedToken ?? null,\n isWritable: true,\n },\n device: { value: input.device ?? null, isWritable: false },\n deviceMint: { value: input.deviceMint ?? null, isWritable: true },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n if (!accounts.token2022Program.value) {\n accounts.token2022Program.value =\n 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>;\n }\n if (!accounts.ataProgram.value) {\n accounts.ataProgram.value =\n 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.token2022Program),\n getAccountMeta(accounts.ataProgram),\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.vendor),\n getAccountMeta(accounts.productMint),\n getAccountMeta(accounts.productAssociatedToken),\n getAccountMeta(accounts.device),\n getAccountMeta(accounts.deviceMint),\n ],\n programAddress,\n data: getCreateDeviceInstructionDataEncoder().encode(\n args as CreateDeviceInstructionDataArgs\n ),\n } as CreateDeviceInstruction<\n typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountSystemProgram,\n TAccountToken2022Program,\n TAccountAtaProgram,\n TAccountPayer,\n TAccountVendor,\n TAccountProductMint,\n TAccountProductAssociatedToken,\n TAccountDevice,\n TAccountDeviceMint\n >;\n\n return instruction;\n}\n\nexport type ParsedCreateDeviceInstruction<\n TProgram extends string = typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[],\n> = {\n programAddress: Address;\n accounts: {\n /** The system program */\n systemProgram: TAccountMetas[0];\n /** The SPL Token 2022 program */\n token2022Program: TAccountMetas[1];\n /** The associated token program */\n ataProgram: TAccountMetas[2];\n /** The account paying for the storage fees */\n payer: TAccountMetas[3];\n /** The vendor */\n vendor: TAccountMetas[4];\n /** The mint account of the product */\n productMint: TAccountMetas[5];\n /** The associated token account of the product */\n productAssociatedToken: TAccountMetas[6];\n /** The device */\n device: TAccountMetas[7];\n /** The mint account of the device */\n deviceMint: TAccountMetas[8];\n };\n data: CreateDeviceInstructionData;\n};\n\nexport function parseCreateDeviceInstruction<\n TProgram extends string,\n TAccountMetas extends readonly IAccountMeta[],\n>(\n instruction: IInstruction &\n IInstructionWithAccounts &\n IInstructionWithData\n): ParsedCreateDeviceInstruction {\n if (instruction.accounts.length < 9) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n systemProgram: getNextAccount(),\n token2022Program: getNextAccount(),\n ataProgram: getNextAccount(),\n payer: getNextAccount(),\n vendor: getNextAccount(),\n productMint: getNextAccount(),\n productAssociatedToken: getNextAccount(),\n device: getNextAccount(),\n deviceMint: getNextAccount(),\n },\n data: getCreateDeviceInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport {\n addDecoderSizePrefix,\n addEncoderSizePrefix,\n combineCodec,\n getArrayDecoder,\n getArrayEncoder,\n getStructDecoder,\n getStructEncoder,\n getTupleDecoder,\n getTupleEncoder,\n getU32Decoder,\n getU32Encoder,\n getU8Decoder,\n getU8Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n transformEncoder,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type IAccountMeta,\n type IAccountSignerMeta,\n type IInstruction,\n type IInstructionWithAccounts,\n type IInstructionWithData,\n type ReadonlyAccount,\n type ReadonlySignerAccount,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/web3.js';\nimport { DEPHY_ID_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\n\nexport type CreateProductInstruction<\n TProgram extends string = typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountSystemProgram extends\n | string\n | IAccountMeta = '11111111111111111111111111111111',\n TAccountToken2022Program extends\n | string\n | IAccountMeta = 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n TAccountPayer extends string | IAccountMeta = string,\n TAccountVendor extends string | IAccountMeta = string,\n TAccountProductMint extends string | IAccountMeta = string,\n TRemainingAccounts extends readonly IAccountMeta[] = [],\n> = IInstruction &\n IInstructionWithData &\n IInstructionWithAccounts<\n [\n TAccountSystemProgram extends string\n ? ReadonlyAccount\n : TAccountSystemProgram,\n TAccountToken2022Program extends string\n ? ReadonlyAccount\n : TAccountToken2022Program,\n TAccountPayer extends string\n ? WritableSignerAccount &\n IAccountSignerMeta\n : TAccountPayer,\n TAccountVendor extends string\n ? ReadonlySignerAccount &\n IAccountSignerMeta\n : TAccountVendor,\n TAccountProductMint extends string\n ? WritableAccount\n : TAccountProductMint,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type CreateProductInstructionData = {\n discriminator: number;\n name: string;\n symbol: string;\n uri: string;\n additionalMetadata: Array;\n};\n\nexport type CreateProductInstructionDataArgs = {\n name: string;\n symbol: string;\n uri: string;\n additionalMetadata: Array;\n};\n\nexport function getCreateProductInstructionDataEncoder(): Encoder {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', getU8Encoder()],\n ['name', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n ['symbol', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n ['uri', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n [\n 'additionalMetadata',\n getArrayEncoder(\n getTupleEncoder([\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n ])\n ),\n ],\n ]),\n (value) => ({ ...value, discriminator: 1 })\n );\n}\n\nexport function getCreateProductInstructionDataDecoder(): Decoder {\n return getStructDecoder([\n ['discriminator', getU8Decoder()],\n ['name', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n ['symbol', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n ['uri', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n [\n 'additionalMetadata',\n getArrayDecoder(\n getTupleDecoder([\n addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder()),\n addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder()),\n ])\n ),\n ],\n ]);\n}\n\nexport function getCreateProductInstructionDataCodec(): Codec<\n CreateProductInstructionDataArgs,\n CreateProductInstructionData\n> {\n return combineCodec(\n getCreateProductInstructionDataEncoder(),\n getCreateProductInstructionDataDecoder()\n );\n}\n\nexport type CreateProductInput<\n TAccountSystemProgram extends string = string,\n TAccountToken2022Program extends string = string,\n TAccountPayer extends string = string,\n TAccountVendor extends string = string,\n TAccountProductMint extends string = string,\n> = {\n /** The system program */\n systemProgram?: Address;\n /** The SPL Token 2022 program */\n token2022Program?: Address;\n /** The account paying for the storage fees */\n payer: TransactionSigner;\n /** The vendor */\n vendor: TransactionSigner;\n /** The mint account of the product */\n productMint: Address;\n name: CreateProductInstructionDataArgs['name'];\n symbol: CreateProductInstructionDataArgs['symbol'];\n uri: CreateProductInstructionDataArgs['uri'];\n additionalMetadata: CreateProductInstructionDataArgs['additionalMetadata'];\n};\n\nexport function getCreateProductInstruction<\n TAccountSystemProgram extends string,\n TAccountToken2022Program extends string,\n TAccountPayer extends string,\n TAccountVendor extends string,\n TAccountProductMint extends string,\n>(\n input: CreateProductInput<\n TAccountSystemProgram,\n TAccountToken2022Program,\n TAccountPayer,\n TAccountVendor,\n TAccountProductMint\n >\n): CreateProductInstruction<\n typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountSystemProgram,\n TAccountToken2022Program,\n TAccountPayer,\n TAccountVendor,\n TAccountProductMint\n> {\n // Program address.\n const programAddress = DEPHY_ID_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n token2022Program: {\n value: input.token2022Program ?? null,\n isWritable: false,\n },\n payer: { value: input.payer ?? null, isWritable: true },\n vendor: { value: input.vendor ?? null, isWritable: false },\n productMint: { value: input.productMint ?? null, isWritable: true },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n if (!accounts.token2022Program.value) {\n accounts.token2022Program.value =\n 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.token2022Program),\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.vendor),\n getAccountMeta(accounts.productMint),\n ],\n programAddress,\n data: getCreateProductInstructionDataEncoder().encode(\n args as CreateProductInstructionDataArgs\n ),\n } as CreateProductInstruction<\n typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountSystemProgram,\n TAccountToken2022Program,\n TAccountPayer,\n TAccountVendor,\n TAccountProductMint\n >;\n\n return instruction;\n}\n\nexport type ParsedCreateProductInstruction<\n TProgram extends string = typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[],\n> = {\n programAddress: Address;\n accounts: {\n /** The system program */\n systemProgram: TAccountMetas[0];\n /** The SPL Token 2022 program */\n token2022Program: TAccountMetas[1];\n /** The account paying for the storage fees */\n payer: TAccountMetas[2];\n /** The vendor */\n vendor: TAccountMetas[3];\n /** The mint account of the product */\n productMint: TAccountMetas[4];\n };\n data: CreateProductInstructionData;\n};\n\nexport function parseCreateProductInstruction<\n TProgram extends string,\n TAccountMetas extends readonly IAccountMeta[],\n>(\n instruction: IInstruction &\n IInstructionWithAccounts &\n IInstructionWithData\n): ParsedCreateProductInstruction {\n if (instruction.accounts.length < 5) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n systemProgram: getNextAccount(),\n token2022Program: getNextAccount(),\n payer: getNextAccount(),\n vendor: getNextAccount(),\n productMint: getNextAccount(),\n },\n data: getCreateProductInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport {\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU8Decoder,\n getU8Encoder,\n transformEncoder,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type IAccountMeta,\n type IAccountSignerMeta,\n type IInstruction,\n type IInstructionWithAccounts,\n type IInstructionWithData,\n type ReadonlyAccount,\n type ReadonlySignerAccount,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/web3.js';\nimport { DEPHY_ID_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\n\nexport type InitializeInstruction<\n TProgram extends string = typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountSystemProgram extends\n | string\n | IAccountMeta = '11111111111111111111111111111111',\n TAccountPayer extends string | IAccountMeta = string,\n TAccountProgramData extends string | IAccountMeta = string,\n TAccountAuthority extends string | IAccountMeta = string,\n TRemainingAccounts extends readonly IAccountMeta[] = [],\n> = IInstruction &\n IInstructionWithData &\n IInstructionWithAccounts<\n [\n TAccountSystemProgram extends string\n ? ReadonlyAccount\n : TAccountSystemProgram,\n TAccountPayer extends string\n ? WritableSignerAccount &\n IAccountSignerMeta\n : TAccountPayer,\n TAccountProgramData extends string\n ? WritableAccount\n : TAccountProgramData,\n TAccountAuthority extends string\n ? ReadonlySignerAccount &\n IAccountSignerMeta\n : TAccountAuthority,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type InitializeInstructionData = { discriminator: number; bump: number };\n\nexport type InitializeInstructionDataArgs = { bump: number };\n\nexport function getInitializeInstructionDataEncoder(): Encoder {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', getU8Encoder()],\n ['bump', getU8Encoder()],\n ]),\n (value) => ({ ...value, discriminator: 0 })\n );\n}\n\nexport function getInitializeInstructionDataDecoder(): Decoder {\n return getStructDecoder([\n ['discriminator', getU8Decoder()],\n ['bump', getU8Decoder()],\n ]);\n}\n\nexport function getInitializeInstructionDataCodec(): Codec<\n InitializeInstructionDataArgs,\n InitializeInstructionData\n> {\n return combineCodec(\n getInitializeInstructionDataEncoder(),\n getInitializeInstructionDataDecoder()\n );\n}\n\nexport type InitializeInput<\n TAccountSystemProgram extends string = string,\n TAccountPayer extends string = string,\n TAccountProgramData extends string = string,\n TAccountAuthority extends string = string,\n> = {\n /** The system program */\n systemProgram?: Address;\n /** The account paying for the storage fees */\n payer: TransactionSigner;\n /** The program data account for the program */\n programData: Address;\n /** The authority account of the program */\n authority: TransactionSigner;\n bump: InitializeInstructionDataArgs['bump'];\n};\n\nexport function getInitializeInstruction<\n TAccountSystemProgram extends string,\n TAccountPayer extends string,\n TAccountProgramData extends string,\n TAccountAuthority extends string,\n>(\n input: InitializeInput<\n TAccountSystemProgram,\n TAccountPayer,\n TAccountProgramData,\n TAccountAuthority\n >\n): InitializeInstruction<\n typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountSystemProgram,\n TAccountPayer,\n TAccountProgramData,\n TAccountAuthority\n> {\n // Program address.\n const programAddress = DEPHY_ID_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n payer: { value: input.payer ?? null, isWritable: true },\n programData: { value: input.programData ?? null, isWritable: true },\n authority: { value: input.authority ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.programData),\n getAccountMeta(accounts.authority),\n ],\n programAddress,\n data: getInitializeInstructionDataEncoder().encode(\n args as InitializeInstructionDataArgs\n ),\n } as InitializeInstruction<\n typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountSystemProgram,\n TAccountPayer,\n TAccountProgramData,\n TAccountAuthority\n >;\n\n return instruction;\n}\n\nexport type ParsedInitializeInstruction<\n TProgram extends string = typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[],\n> = {\n programAddress: Address;\n accounts: {\n /** The system program */\n systemProgram: TAccountMetas[0];\n /** The account paying for the storage fees */\n payer: TAccountMetas[1];\n /** The program data account for the program */\n programData: TAccountMetas[2];\n /** The authority account of the program */\n authority: TAccountMetas[3];\n };\n data: InitializeInstructionData;\n};\n\nexport function parseInitializeInstruction<\n TProgram extends string,\n TAccountMetas extends readonly IAccountMeta[],\n>(\n instruction: IInstruction &\n IInstructionWithAccounts &\n IInstructionWithData\n): ParsedInitializeInstruction {\n if (instruction.accounts.length < 4) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n systemProgram: getNextAccount(),\n payer: getNextAccount(),\n programData: getNextAccount(),\n authority: getNextAccount(),\n },\n data: getInitializeInstructionDataDecoder().decode(instruction.data),\n };\n}\n"]} \ No newline at end of file +{"version":3,"sources":["../../env-shim.ts","../../src/generated/accounts/programDataAccount.ts","../../src/generated/pdas/deviceAToken.ts","../../src/generated/pdas/deviceMint.ts","../../src/generated/pdas/productAToken.ts","../../src/generated/pdas/productMint.ts","../../src/generated/pdas/programData.ts","../../src/generated/pdas/programDataAccount.ts","../../src/generated/types/deviceActivationSignature.ts","../../src/generated/types/deviceSigningAlgorithm.ts","../../src/generated/types/key.ts","../../src/generated/types/programData.ts","../../src/generated/errors/dephyId.ts","../../src/generated/instructions/activateDevice.ts","../../src/generated/programs/dephyId.ts","../../src/generated/shared/index.ts","../../src/generated/instructions/createActivatedDevice.ts","../../src/generated/instructions/createDevice.ts","../../src/generated/instructions/createProduct.ts","../../src/generated/instructions/initialize.ts"],"names":["combineCodec","getAddressEncoder","getStructDecoder","getStructEncoder","getProgramDerivedAddress","address","getUtf8Encoder","DeviceSigningAlgorithm","getEnumDecoder","getEnumEncoder","Key","getU8Decoder","getU8Encoder","transformEncoder","DephyIdAccount","DephyIdInstruction","getTupleDecoder","getTupleEncoder","addDecoderSizePrefix","addEncoderSizePrefix","getArrayDecoder","getArrayEncoder","getU32Decoder","getU32Encoder","getUtf8Decoder"],"mappings":";AACO,IAAM,UAA2B,uBACrC,QAAgB,KAAU,EAAE,aAAa,eAAe;;;ACM3D;AAAA,EACE;AAAA,EACA;AAAA,EACA,gBAAAA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,qBAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,oBAAAC;AAAA,EACA;AAAA,OAWK;;;ACtBP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AAQP,eAAsB,oBACpB,OACA,SAAmD,CAAC,GACpB;AAChC,QAAM;AAAA,IACJ,iBAAiB;AAAA,EACnB,IAAI;AACJ,SAAO,MAAM,yBAAyB;AAAA,IACpC;AAAA,IACA,OAAO;AAAA,MACL,kBAAkB,EAAE,OAAO,MAAM,WAAW;AAAA,MAC5C,kBAAkB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,QAAM,cAAc;AAAA,IAClB,UAAU;AAAA,MACR,eAAe,SAAS,aAAa;AAAA,MACrC,eAAe,SAAS,KAAK;AAAA,MAC7B,eAAe,SAAS,WAAW;AAAA,MACnC,eAAe,SAAS,SAAS;AAAA,IACnC;AAAA,IACA;AAAA,IACA,MAAM,oCAAoC,EAAE;AAAA,MAC1C;AAAA,IACF;AAAA,EACF;AAQA,SAAO;AACT;AAoBO,SAAS,2BAId,aAGsD;AACtD,MAAI,YAAY,SAAS,SAAS,GAAG;AAEnC,UAAM,IAAI,MAAM,qBAAqB;AAAA,EACvC;AACA,MAAI,eAAe;AACnB,QAAM,iBAAiB,MAAM;AAC3B,UAAM,cAAc,YAAY,SAAU,YAAY;AACtD,oBAAgB;AAChB,WAAO;AAAA,EACT;AACA,SAAO;AAAA,IACL,gBAAgB,YAAY;AAAA,IAC5B,UAAU;AAAA,MACR,eAAe,eAAe;AAAA,MAC9B,OAAO,eAAe;AAAA,MACtB,aAAa,eAAe;AAAA,MAC5B,WAAW,eAAe;AAAA,IAC5B;AAAA,IACA,MAAM,oCAAoC,EAAE,OAAO,YAAY,IAAI;AAAA,EACrE;AACF","sourcesContent":["// Clever obfuscation to prevent the build system from inlining the value of `NODE_ENV`\nexport const __DEV__ = /* @__PURE__ */ (() =>\n (process as any)['en' + 'v'].NODE_ENV === 'development')();\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport {\n assertAccountExists,\n assertAccountsExist,\n combineCodec,\n decodeAccount,\n fetchEncodedAccount,\n fetchEncodedAccounts,\n getAddressDecoder,\n getAddressEncoder,\n getStructDecoder,\n getStructEncoder,\n transformEncoder,\n type Account,\n type Address,\n type Codec,\n type Decoder,\n type EncodedAccount,\n type Encoder,\n type FetchAccountConfig,\n type FetchAccountsConfig,\n type MaybeAccount,\n type MaybeEncodedAccount,\n} from '@solana/web3.js';\nimport { findProgramDataAccountPda } from '../pdas';\nimport {\n Key,\n getKeyDecoder,\n getKeyEncoder,\n getProgramDataDecoder,\n getProgramDataEncoder,\n type ProgramData,\n type ProgramDataArgs,\n} from '../types';\n\nexport type ProgramDataAccount = {\n key: Key;\n authority: Address;\n data: ProgramData;\n};\n\nexport type ProgramDataAccountArgs = {\n authority: Address;\n data: ProgramDataArgs;\n};\n\nexport function getProgramDataAccountEncoder(): Encoder {\n return transformEncoder(\n getStructEncoder([\n ['key', getKeyEncoder()],\n ['authority', getAddressEncoder()],\n ['data', getProgramDataEncoder()],\n ]),\n (value) => ({ ...value, key: Key.ProgramDataAccount })\n );\n}\n\nexport function getProgramDataAccountDecoder(): Decoder {\n return getStructDecoder([\n ['key', getKeyDecoder()],\n ['authority', getAddressDecoder()],\n ['data', getProgramDataDecoder()],\n ]);\n}\n\nexport function getProgramDataAccountCodec(): Codec<\n ProgramDataAccountArgs,\n ProgramDataAccount\n> {\n return combineCodec(\n getProgramDataAccountEncoder(),\n getProgramDataAccountDecoder()\n );\n}\n\nexport function decodeProgramDataAccount(\n encodedAccount: EncodedAccount\n): Account;\nexport function decodeProgramDataAccount(\n encodedAccount: MaybeEncodedAccount\n): MaybeAccount;\nexport function decodeProgramDataAccount(\n encodedAccount: EncodedAccount | MaybeEncodedAccount\n):\n | Account\n | MaybeAccount {\n return decodeAccount(\n encodedAccount as MaybeEncodedAccount,\n getProgramDataAccountDecoder()\n );\n}\n\nexport async function fetchProgramDataAccount(\n rpc: Parameters[0],\n address: Address,\n config?: FetchAccountConfig\n): Promise> {\n const maybeAccount = await fetchMaybeProgramDataAccount(rpc, address, config);\n assertAccountExists(maybeAccount);\n return maybeAccount;\n}\n\nexport async function fetchMaybeProgramDataAccount<\n TAddress extends string = string,\n>(\n rpc: Parameters[0],\n address: Address,\n config?: FetchAccountConfig\n): Promise> {\n const maybeAccount = await fetchEncodedAccount(rpc, address, config);\n return decodeProgramDataAccount(maybeAccount);\n}\n\nexport async function fetchAllProgramDataAccount(\n rpc: Parameters[0],\n addresses: Array
,\n config?: FetchAccountsConfig\n): Promise[]> {\n const maybeAccounts = await fetchAllMaybeProgramDataAccount(\n rpc,\n addresses,\n config\n );\n assertAccountsExist(maybeAccounts);\n return maybeAccounts;\n}\n\nexport async function fetchAllMaybeProgramDataAccount(\n rpc: Parameters[0],\n addresses: Array
,\n config?: FetchAccountsConfig\n): Promise[]> {\n const maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);\n return maybeAccounts.map((maybeAccount) =>\n decodeProgramDataAccount(maybeAccount)\n );\n}\n\nexport function getProgramDataAccountSize(): number {\n return 34;\n}\n\nexport async function fetchProgramDataAccountFromSeeds(\n rpc: Parameters[0],\n config: FetchAccountConfig & { programAddress?: Address } = {}\n): Promise> {\n const maybeAccount = await fetchMaybeProgramDataAccountFromSeeds(rpc, config);\n assertAccountExists(maybeAccount);\n return maybeAccount;\n}\n\nexport async function fetchMaybeProgramDataAccountFromSeeds(\n rpc: Parameters[0],\n config: FetchAccountConfig & { programAddress?: Address } = {}\n): Promise> {\n const { programAddress, ...fetchConfig } = config;\n const [address] = await findProgramDataAccountPda({ programAddress });\n return await fetchMaybeProgramDataAccount(rpc, address, fetchConfig);\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport {\n address,\n getAddressEncoder,\n getProgramDerivedAddress,\n type Address,\n type ProgramDerivedAddress,\n} from '@solana/web3.js';\n\nexport type DeviceATokenSeeds = {\n ownerPubkey: Address;\n\n deviceMintPubkey: Address;\n};\n\nexport async function findDeviceATokenPda(\n seeds: DeviceATokenSeeds,\n config: { programAddress?: Address | undefined } = {}\n): Promise {\n const {\n programAddress = 'hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1' as Address<'hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1'>,\n } = config;\n return await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getAddressEncoder().encode(seeds.ownerPubkey),\n getAddressEncoder().encode(\n address('TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb')\n ),\n getAddressEncoder().encode(seeds.deviceMintPubkey),\n ],\n });\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport {\n getAddressEncoder,\n getProgramDerivedAddress,\n getUtf8Encoder,\n type Address,\n type ProgramDerivedAddress,\n} from '@solana/web3.js';\n\nexport type DeviceMintSeeds = {\n productMintPubkey: Address;\n\n devicePubkey: Address;\n};\n\nexport async function findDeviceMintPda(\n seeds: DeviceMintSeeds,\n config: { programAddress?: Address | undefined } = {}\n): Promise {\n const {\n programAddress = 'hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1' as Address<'hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1'>,\n } = config;\n return await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getUtf8Encoder().encode('DePHY_ID-DEVICE'),\n getAddressEncoder().encode(seeds.productMintPubkey),\n getAddressEncoder().encode(seeds.devicePubkey),\n ],\n });\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport {\n address,\n getAddressEncoder,\n getProgramDerivedAddress,\n type Address,\n type ProgramDerivedAddress,\n} from '@solana/web3.js';\n\nexport type ProductATokenSeeds = {\n devicePubkey: Address;\n\n productMintPubkey: Address;\n};\n\nexport async function findProductATokenPda(\n seeds: ProductATokenSeeds,\n config: { programAddress?: Address | undefined } = {}\n): Promise {\n const {\n programAddress = 'hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1' as Address<'hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1'>,\n } = config;\n return await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getAddressEncoder().encode(seeds.devicePubkey),\n getAddressEncoder().encode(\n address('TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb')\n ),\n getAddressEncoder().encode(seeds.productMintPubkey),\n ],\n });\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport {\n getAddressEncoder,\n getProgramDerivedAddress,\n getUtf8Encoder,\n type Address,\n type ProgramDerivedAddress,\n} from '@solana/web3.js';\n\nexport type ProductMintSeeds = {\n vendorPubkey: Address;\n\n productName: string;\n};\n\nexport async function findProductMintPda(\n seeds: ProductMintSeeds,\n config: { programAddress?: Address | undefined } = {}\n): Promise {\n const {\n programAddress = 'hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1' as Address<'hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1'>,\n } = config;\n return await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getUtf8Encoder().encode('DePHY_ID-PRODUCT'),\n getAddressEncoder().encode(seeds.vendorPubkey),\n getUtf8Encoder().encode(seeds.productName),\n ],\n });\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport {\n getProgramDerivedAddress,\n getUtf8Encoder,\n type Address,\n type ProgramDerivedAddress,\n} from '@solana/web3.js';\n\nexport async function findProgramDataPda(\n config: { programAddress?: Address | undefined } = {}\n): Promise {\n const {\n programAddress = 'hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1' as Address<'hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1'>,\n } = config;\n return await getProgramDerivedAddress({\n programAddress,\n seeds: [getUtf8Encoder().encode('DePHY_ID')],\n });\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport {\n getProgramDerivedAddress,\n getUtf8Encoder,\n type Address,\n type ProgramDerivedAddress,\n} from '@solana/web3.js';\n\nexport async function findProgramDataAccountPda(\n config: { programAddress?: Address | undefined } = {}\n): Promise {\n const {\n programAddress = 'hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1' as Address<'hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1'>,\n } = config;\n return await getProgramDerivedAddress({\n programAddress,\n seeds: [getUtf8Encoder().encode('DePHY_ID')],\n });\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getBytesDecoder,\n getBytesEncoder,\n getDiscriminatedUnionDecoder,\n getDiscriminatedUnionEncoder,\n getStructDecoder,\n getStructEncoder,\n getTupleDecoder,\n getTupleEncoder,\n getU8Decoder,\n getU8Encoder,\n type Codec,\n type Decoder,\n type Encoder,\n type GetDiscriminatedUnionVariant,\n type GetDiscriminatedUnionVariantContent,\n type ReadonlyUint8Array,\n} from '@solana/web3.js';\n\nexport type DeviceActivationSignature =\n | { __kind: 'Ed25519'; fields: readonly [ReadonlyUint8Array] }\n | { __kind: 'Secp256k1'; fields: readonly [ReadonlyUint8Array, number] }\n | { __kind: 'EthSecp256k1'; fields: readonly [ReadonlyUint8Array, number] };\n\nexport type DeviceActivationSignatureArgs = DeviceActivationSignature;\n\nexport function getDeviceActivationSignatureEncoder(): Encoder {\n return getDiscriminatedUnionEncoder([\n [\n 'Ed25519',\n getStructEncoder([\n ['fields', getTupleEncoder([fixEncoderSize(getBytesEncoder(), 64)])],\n ]),\n ],\n [\n 'Secp256k1',\n getStructEncoder([\n [\n 'fields',\n getTupleEncoder([\n fixEncoderSize(getBytesEncoder(), 64),\n getU8Encoder(),\n ]),\n ],\n ]),\n ],\n [\n 'EthSecp256k1',\n getStructEncoder([\n [\n 'fields',\n getTupleEncoder([\n fixEncoderSize(getBytesEncoder(), 64),\n getU8Encoder(),\n ]),\n ],\n ]),\n ],\n ]);\n}\n\nexport function getDeviceActivationSignatureDecoder(): Decoder {\n return getDiscriminatedUnionDecoder([\n [\n 'Ed25519',\n getStructDecoder([\n ['fields', getTupleDecoder([fixDecoderSize(getBytesDecoder(), 64)])],\n ]),\n ],\n [\n 'Secp256k1',\n getStructDecoder([\n [\n 'fields',\n getTupleDecoder([\n fixDecoderSize(getBytesDecoder(), 64),\n getU8Decoder(),\n ]),\n ],\n ]),\n ],\n [\n 'EthSecp256k1',\n getStructDecoder([\n [\n 'fields',\n getTupleDecoder([\n fixDecoderSize(getBytesDecoder(), 64),\n getU8Decoder(),\n ]),\n ],\n ]),\n ],\n ]);\n}\n\nexport function getDeviceActivationSignatureCodec(): Codec<\n DeviceActivationSignatureArgs,\n DeviceActivationSignature\n> {\n return combineCodec(\n getDeviceActivationSignatureEncoder(),\n getDeviceActivationSignatureDecoder()\n );\n}\n\n// Data Enum Helpers.\nexport function deviceActivationSignature(\n kind: 'Ed25519',\n data: GetDiscriminatedUnionVariantContent<\n DeviceActivationSignatureArgs,\n '__kind',\n 'Ed25519'\n >['fields']\n): GetDiscriminatedUnionVariant<\n DeviceActivationSignatureArgs,\n '__kind',\n 'Ed25519'\n>;\nexport function deviceActivationSignature(\n kind: 'Secp256k1',\n data: GetDiscriminatedUnionVariantContent<\n DeviceActivationSignatureArgs,\n '__kind',\n 'Secp256k1'\n >['fields']\n): GetDiscriminatedUnionVariant<\n DeviceActivationSignatureArgs,\n '__kind',\n 'Secp256k1'\n>;\nexport function deviceActivationSignature(\n kind: 'EthSecp256k1',\n data: GetDiscriminatedUnionVariantContent<\n DeviceActivationSignatureArgs,\n '__kind',\n 'EthSecp256k1'\n >['fields']\n): GetDiscriminatedUnionVariant<\n DeviceActivationSignatureArgs,\n '__kind',\n 'EthSecp256k1'\n>;\nexport function deviceActivationSignature<\n K extends DeviceActivationSignatureArgs['__kind'],\n Data,\n>(kind: K, data?: Data) {\n return Array.isArray(data)\n ? { __kind: kind, fields: data }\n : { __kind: kind, ...(data ?? {}) };\n}\n\nexport function isDeviceActivationSignature<\n K extends DeviceActivationSignature['__kind'],\n>(\n kind: K,\n value: DeviceActivationSignature\n): value is DeviceActivationSignature & { __kind: K } {\n return value.__kind === kind;\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport {\n combineCodec,\n getEnumDecoder,\n getEnumEncoder,\n type Codec,\n type Decoder,\n type Encoder,\n} from '@solana/web3.js';\n\nexport enum DeviceSigningAlgorithm {\n Ed25519,\n Secp256k1,\n}\n\nexport type DeviceSigningAlgorithmArgs = DeviceSigningAlgorithm;\n\nexport function getDeviceSigningAlgorithmEncoder(): Encoder {\n return getEnumEncoder(DeviceSigningAlgorithm);\n}\n\nexport function getDeviceSigningAlgorithmDecoder(): Decoder {\n return getEnumDecoder(DeviceSigningAlgorithm);\n}\n\nexport function getDeviceSigningAlgorithmCodec(): Codec<\n DeviceSigningAlgorithmArgs,\n DeviceSigningAlgorithm\n> {\n return combineCodec(\n getDeviceSigningAlgorithmEncoder(),\n getDeviceSigningAlgorithmDecoder()\n );\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport {\n combineCodec,\n getEnumDecoder,\n getEnumEncoder,\n type Codec,\n type Decoder,\n type Encoder,\n} from '@solana/web3.js';\n\nexport enum Key {\n Uninitialized,\n ProgramDataAccount,\n}\n\nexport type KeyArgs = Key;\n\nexport function getKeyEncoder(): Encoder {\n return getEnumEncoder(Key);\n}\n\nexport function getKeyDecoder(): Decoder {\n return getEnumDecoder(Key);\n}\n\nexport function getKeyCodec(): Codec {\n return combineCodec(getKeyEncoder(), getKeyDecoder());\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport {\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU8Decoder,\n getU8Encoder,\n type Codec,\n type Decoder,\n type Encoder,\n} from '@solana/web3.js';\n\nexport type ProgramData = { bump: number };\n\nexport type ProgramDataArgs = ProgramData;\n\nexport function getProgramDataEncoder(): Encoder {\n return getStructEncoder([['bump', getU8Encoder()]]);\n}\n\nexport function getProgramDataDecoder(): Decoder {\n return getStructDecoder([['bump', getU8Decoder()]]);\n}\n\nexport function getProgramDataCodec(): Codec {\n return combineCodec(getProgramDataEncoder(), getProgramDataDecoder());\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\n/** DeserializationError: Error deserializing an account */\nexport const DEPHY_ID_ERROR__DESERIALIZATION_ERROR = 0x0; // 0\n/** SerializationError: Error serializing an account */\nexport const DEPHY_ID_ERROR__SERIALIZATION_ERROR = 0x1; // 1\n/** InvalidProgramOwner: Invalid program owner. This likely mean the provided account does not exist */\nexport const DEPHY_ID_ERROR__INVALID_PROGRAM_OWNER = 0x2; // 2\n/** InvalidPda: Invalid PDA derivation */\nexport const DEPHY_ID_ERROR__INVALID_PDA = 0x3; // 3\n/** ExpectedEmptyAccount: Expected empty account */\nexport const DEPHY_ID_ERROR__EXPECTED_EMPTY_ACCOUNT = 0x4; // 4\n/** ExpectedNonEmptyAccount: Expected non empty account */\nexport const DEPHY_ID_ERROR__EXPECTED_NON_EMPTY_ACCOUNT = 0x5; // 5\n/** ExpectedSignerAccount: Expected signer account */\nexport const DEPHY_ID_ERROR__EXPECTED_SIGNER_ACCOUNT = 0x6; // 6\n/** ExpectedWritableAccount: Expected writable account */\nexport const DEPHY_ID_ERROR__EXPECTED_WRITABLE_ACCOUNT = 0x7; // 7\n/** AccountMismatch: Account mismatch */\nexport const DEPHY_ID_ERROR__ACCOUNT_MISMATCH = 0x8; // 8\n/** InvalidAccountKey: Invalid account key */\nexport const DEPHY_ID_ERROR__INVALID_ACCOUNT_KEY = 0x9; // 9\n/** NumericalOverflow: Numerical overflow */\nexport const DEPHY_ID_ERROR__NUMERICAL_OVERFLOW = 0xa; // 10\n/** MissingInstruction: Missing instruction */\nexport const DEPHY_ID_ERROR__MISSING_INSTRUCTION = 0xb; // 11\n/** SignatureMismatch: Signature mismatch */\nexport const DEPHY_ID_ERROR__SIGNATURE_MISMATCH = 0xc; // 12\n\nexport type DephyIdError =\n | typeof DEPHY_ID_ERROR__ACCOUNT_MISMATCH\n | typeof DEPHY_ID_ERROR__DESERIALIZATION_ERROR\n | typeof DEPHY_ID_ERROR__EXPECTED_EMPTY_ACCOUNT\n | typeof DEPHY_ID_ERROR__EXPECTED_NON_EMPTY_ACCOUNT\n | typeof DEPHY_ID_ERROR__EXPECTED_SIGNER_ACCOUNT\n | typeof DEPHY_ID_ERROR__EXPECTED_WRITABLE_ACCOUNT\n | typeof DEPHY_ID_ERROR__INVALID_ACCOUNT_KEY\n | typeof DEPHY_ID_ERROR__INVALID_PDA\n | typeof DEPHY_ID_ERROR__INVALID_PROGRAM_OWNER\n | typeof DEPHY_ID_ERROR__MISSING_INSTRUCTION\n | typeof DEPHY_ID_ERROR__NUMERICAL_OVERFLOW\n | typeof DEPHY_ID_ERROR__SERIALIZATION_ERROR\n | typeof DEPHY_ID_ERROR__SIGNATURE_MISMATCH;\n\nlet dephyIdErrorMessages: Record | undefined;\nif (__DEV__) {\n dephyIdErrorMessages = {\n [DEPHY_ID_ERROR__ACCOUNT_MISMATCH]: `Account mismatch`,\n [DEPHY_ID_ERROR__DESERIALIZATION_ERROR]: `Error deserializing an account`,\n [DEPHY_ID_ERROR__EXPECTED_EMPTY_ACCOUNT]: `Expected empty account`,\n [DEPHY_ID_ERROR__EXPECTED_NON_EMPTY_ACCOUNT]: `Expected non empty account`,\n [DEPHY_ID_ERROR__EXPECTED_SIGNER_ACCOUNT]: `Expected signer account`,\n [DEPHY_ID_ERROR__EXPECTED_WRITABLE_ACCOUNT]: `Expected writable account`,\n [DEPHY_ID_ERROR__INVALID_ACCOUNT_KEY]: `Invalid account key`,\n [DEPHY_ID_ERROR__INVALID_PDA]: `Invalid PDA derivation`,\n [DEPHY_ID_ERROR__INVALID_PROGRAM_OWNER]: `Invalid program owner. This likely mean the provided account does not exist`,\n [DEPHY_ID_ERROR__MISSING_INSTRUCTION]: `Missing instruction`,\n [DEPHY_ID_ERROR__NUMERICAL_OVERFLOW]: `Numerical overflow`,\n [DEPHY_ID_ERROR__SERIALIZATION_ERROR]: `Error serializing an account`,\n [DEPHY_ID_ERROR__SIGNATURE_MISMATCH]: `Signature mismatch`,\n };\n}\n\nexport function getDephyIdErrorMessage(code: DephyIdError): string {\n if (__DEV__) {\n return (dephyIdErrorMessages as Record)[code];\n }\n\n return 'Error message not available in production bundles. Compile with `__DEV__` set to true to see more information.';\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport {\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU64Decoder,\n getU64Encoder,\n getU8Decoder,\n getU8Encoder,\n transformEncoder,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type IAccountMeta,\n type IAccountSignerMeta,\n type IInstruction,\n type IInstructionWithAccounts,\n type IInstructionWithData,\n type ReadonlyAccount,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/web3.js';\nimport { DEPHY_ID_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\nimport {\n getDeviceActivationSignatureDecoder,\n getDeviceActivationSignatureEncoder,\n type DeviceActivationSignature,\n type DeviceActivationSignatureArgs,\n} from '../types';\n\nexport type ActivateDeviceInstruction<\n TProgram extends string = typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountSystemProgram extends\n | string\n | IAccountMeta = '11111111111111111111111111111111',\n TAccountToken2022Program extends\n | string\n | IAccountMeta = 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n TAccountAtaProgram extends\n | string\n | IAccountMeta = 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n TAccountPayer extends string | IAccountMeta = string,\n TAccountVendor extends string | IAccountMeta = string,\n TAccountProductMint extends string | IAccountMeta = string,\n TAccountProductAssociatedToken extends string | IAccountMeta = string,\n TAccountDevice extends string | IAccountMeta = string,\n TAccountDeviceMint extends string | IAccountMeta = string,\n TAccountDeviceAssociatedToken extends string | IAccountMeta = string,\n TAccountOwner extends string | IAccountMeta = string,\n TRemainingAccounts extends readonly IAccountMeta[] = [],\n> = IInstruction &\n IInstructionWithData &\n IInstructionWithAccounts<\n [\n TAccountSystemProgram extends string\n ? ReadonlyAccount\n : TAccountSystemProgram,\n TAccountToken2022Program extends string\n ? ReadonlyAccount\n : TAccountToken2022Program,\n TAccountAtaProgram extends string\n ? ReadonlyAccount\n : TAccountAtaProgram,\n TAccountPayer extends string\n ? WritableSignerAccount &\n IAccountSignerMeta\n : TAccountPayer,\n TAccountVendor extends string\n ? ReadonlyAccount\n : TAccountVendor,\n TAccountProductMint extends string\n ? ReadonlyAccount\n : TAccountProductMint,\n TAccountProductAssociatedToken extends string\n ? ReadonlyAccount\n : TAccountProductAssociatedToken,\n TAccountDevice extends string\n ? ReadonlyAccount\n : TAccountDevice,\n TAccountDeviceMint extends string\n ? WritableAccount\n : TAccountDeviceMint,\n TAccountDeviceAssociatedToken extends string\n ? WritableAccount\n : TAccountDeviceAssociatedToken,\n TAccountOwner extends string\n ? ReadonlyAccount\n : TAccountOwner,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type ActivateDeviceInstructionData = {\n discriminator: number;\n signature: DeviceActivationSignature;\n timestamp: bigint;\n};\n\nexport type ActivateDeviceInstructionDataArgs = {\n signature: DeviceActivationSignatureArgs;\n timestamp: number | bigint;\n};\n\nexport function getActivateDeviceInstructionDataEncoder(): Encoder {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', getU8Encoder()],\n ['signature', getDeviceActivationSignatureEncoder()],\n ['timestamp', getU64Encoder()],\n ]),\n (value) => ({ ...value, discriminator: 3 })\n );\n}\n\nexport function getActivateDeviceInstructionDataDecoder(): Decoder {\n return getStructDecoder([\n ['discriminator', getU8Decoder()],\n ['signature', getDeviceActivationSignatureDecoder()],\n ['timestamp', getU64Decoder()],\n ]);\n}\n\nexport function getActivateDeviceInstructionDataCodec(): Codec<\n ActivateDeviceInstructionDataArgs,\n ActivateDeviceInstructionData\n> {\n return combineCodec(\n getActivateDeviceInstructionDataEncoder(),\n getActivateDeviceInstructionDataDecoder()\n );\n}\n\nexport type ActivateDeviceInput<\n TAccountSystemProgram extends string = string,\n TAccountToken2022Program extends string = string,\n TAccountAtaProgram extends string = string,\n TAccountPayer extends string = string,\n TAccountVendor extends string = string,\n TAccountProductMint extends string = string,\n TAccountProductAssociatedToken extends string = string,\n TAccountDevice extends string = string,\n TAccountDeviceMint extends string = string,\n TAccountDeviceAssociatedToken extends string = string,\n TAccountOwner extends string = string,\n> = {\n /** The system program */\n systemProgram?: Address;\n /** The SPL Token 2022 program */\n token2022Program?: Address;\n /** The associated token program */\n ataProgram?: Address;\n /** The account paying for the storage fees */\n payer: TransactionSigner;\n /** The vendor */\n vendor: Address;\n /** The mint account for the product */\n productMint: Address;\n /** The associated token account for the product */\n productAssociatedToken: Address;\n /** The device */\n device: Address;\n /** The mint account for the device */\n deviceMint: Address;\n /** The associated token account for the device */\n deviceAssociatedToken: Address;\n /** The device's owner */\n owner: Address;\n signature: ActivateDeviceInstructionDataArgs['signature'];\n timestamp: ActivateDeviceInstructionDataArgs['timestamp'];\n};\n\nexport function getActivateDeviceInstruction<\n TAccountSystemProgram extends string,\n TAccountToken2022Program extends string,\n TAccountAtaProgram extends string,\n TAccountPayer extends string,\n TAccountVendor extends string,\n TAccountProductMint extends string,\n TAccountProductAssociatedToken extends string,\n TAccountDevice extends string,\n TAccountDeviceMint extends string,\n TAccountDeviceAssociatedToken extends string,\n TAccountOwner extends string,\n>(\n input: ActivateDeviceInput<\n TAccountSystemProgram,\n TAccountToken2022Program,\n TAccountAtaProgram,\n TAccountPayer,\n TAccountVendor,\n TAccountProductMint,\n TAccountProductAssociatedToken,\n TAccountDevice,\n TAccountDeviceMint,\n TAccountDeviceAssociatedToken,\n TAccountOwner\n >\n): ActivateDeviceInstruction<\n typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountSystemProgram,\n TAccountToken2022Program,\n TAccountAtaProgram,\n TAccountPayer,\n TAccountVendor,\n TAccountProductMint,\n TAccountProductAssociatedToken,\n TAccountDevice,\n TAccountDeviceMint,\n TAccountDeviceAssociatedToken,\n TAccountOwner\n> {\n // Program address.\n const programAddress = DEPHY_ID_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n token2022Program: {\n value: input.token2022Program ?? null,\n isWritable: false,\n },\n ataProgram: { value: input.ataProgram ?? null, isWritable: false },\n payer: { value: input.payer ?? null, isWritable: true },\n vendor: { value: input.vendor ?? null, isWritable: false },\n productMint: { value: input.productMint ?? null, isWritable: false },\n productAssociatedToken: {\n value: input.productAssociatedToken ?? null,\n isWritable: false,\n },\n device: { value: input.device ?? null, isWritable: false },\n deviceMint: { value: input.deviceMint ?? null, isWritable: true },\n deviceAssociatedToken: {\n value: input.deviceAssociatedToken ?? null,\n isWritable: true,\n },\n owner: { value: input.owner ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n if (!accounts.token2022Program.value) {\n accounts.token2022Program.value =\n 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>;\n }\n if (!accounts.ataProgram.value) {\n accounts.ataProgram.value =\n 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.token2022Program),\n getAccountMeta(accounts.ataProgram),\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.vendor),\n getAccountMeta(accounts.productMint),\n getAccountMeta(accounts.productAssociatedToken),\n getAccountMeta(accounts.device),\n getAccountMeta(accounts.deviceMint),\n getAccountMeta(accounts.deviceAssociatedToken),\n getAccountMeta(accounts.owner),\n ],\n programAddress,\n data: getActivateDeviceInstructionDataEncoder().encode(\n args as ActivateDeviceInstructionDataArgs\n ),\n } as ActivateDeviceInstruction<\n typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountSystemProgram,\n TAccountToken2022Program,\n TAccountAtaProgram,\n TAccountPayer,\n TAccountVendor,\n TAccountProductMint,\n TAccountProductAssociatedToken,\n TAccountDevice,\n TAccountDeviceMint,\n TAccountDeviceAssociatedToken,\n TAccountOwner\n >;\n\n return instruction;\n}\n\nexport type ParsedActivateDeviceInstruction<\n TProgram extends string = typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[],\n> = {\n programAddress: Address;\n accounts: {\n /** The system program */\n systemProgram: TAccountMetas[0];\n /** The SPL Token 2022 program */\n token2022Program: TAccountMetas[1];\n /** The associated token program */\n ataProgram: TAccountMetas[2];\n /** The account paying for the storage fees */\n payer: TAccountMetas[3];\n /** The vendor */\n vendor: TAccountMetas[4];\n /** The mint account for the product */\n productMint: TAccountMetas[5];\n /** The associated token account for the product */\n productAssociatedToken: TAccountMetas[6];\n /** The device */\n device: TAccountMetas[7];\n /** The mint account for the device */\n deviceMint: TAccountMetas[8];\n /** The associated token account for the device */\n deviceAssociatedToken: TAccountMetas[9];\n /** The device's owner */\n owner: TAccountMetas[10];\n };\n data: ActivateDeviceInstructionData;\n};\n\nexport function parseActivateDeviceInstruction<\n TProgram extends string,\n TAccountMetas extends readonly IAccountMeta[],\n>(\n instruction: IInstruction &\n IInstructionWithAccounts &\n IInstructionWithData\n): ParsedActivateDeviceInstruction {\n if (instruction.accounts.length < 11) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n systemProgram: getNextAccount(),\n token2022Program: getNextAccount(),\n ataProgram: getNextAccount(),\n payer: getNextAccount(),\n vendor: getNextAccount(),\n productMint: getNextAccount(),\n productAssociatedToken: getNextAccount(),\n device: getNextAccount(),\n deviceMint: getNextAccount(),\n deviceAssociatedToken: getNextAccount(),\n owner: getNextAccount(),\n },\n data: getActivateDeviceInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport { containsBytes, getU8Encoder, type Address } from '@solana/web3.js';\nimport {\n type ParsedActivateDeviceInstruction,\n type ParsedCreateActivatedDeviceInstruction,\n type ParsedCreateDeviceInstruction,\n type ParsedCreateProductInstruction,\n type ParsedInitializeInstruction,\n} from '../instructions';\nimport { Key, getKeyEncoder } from '../types';\n\nexport const DEPHY_ID_PROGRAM_ADDRESS =\n 'hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1' as Address<'hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1'>;\n\nexport enum DephyIdAccount {\n ProgramDataAccount,\n}\n\nexport function identifyDephyIdAccount(\n account: { data: Uint8Array } | Uint8Array\n): DephyIdAccount {\n const data = account instanceof Uint8Array ? account : account.data;\n if (containsBytes(data, getKeyEncoder().encode(Key.ProgramDataAccount), 0)) {\n return DephyIdAccount.ProgramDataAccount;\n }\n throw new Error(\n 'The provided account could not be identified as a dephyId account.'\n );\n}\n\nexport enum DephyIdInstruction {\n Initialize,\n CreateProduct,\n CreateDevice,\n ActivateDevice,\n CreateActivatedDevice,\n}\n\nexport function identifyDephyIdInstruction(\n instruction: { data: Uint8Array } | Uint8Array\n): DephyIdInstruction {\n const data =\n instruction instanceof Uint8Array ? instruction : instruction.data;\n if (containsBytes(data, getU8Encoder().encode(0), 0)) {\n return DephyIdInstruction.Initialize;\n }\n if (containsBytes(data, getU8Encoder().encode(1), 0)) {\n return DephyIdInstruction.CreateProduct;\n }\n if (containsBytes(data, getU8Encoder().encode(2), 0)) {\n return DephyIdInstruction.CreateDevice;\n }\n if (containsBytes(data, getU8Encoder().encode(3), 0)) {\n return DephyIdInstruction.ActivateDevice;\n }\n if (containsBytes(data, getU8Encoder().encode(4), 0)) {\n return DephyIdInstruction.CreateActivatedDevice;\n }\n throw new Error(\n 'The provided instruction could not be identified as a dephyId instruction.'\n );\n}\n\nexport type ParsedDephyIdInstruction<\n TProgram extends string = 'hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1',\n> =\n | ({\n instructionType: DephyIdInstruction.Initialize;\n } & ParsedInitializeInstruction)\n | ({\n instructionType: DephyIdInstruction.CreateProduct;\n } & ParsedCreateProductInstruction)\n | ({\n instructionType: DephyIdInstruction.CreateDevice;\n } & ParsedCreateDeviceInstruction)\n | ({\n instructionType: DephyIdInstruction.ActivateDevice;\n } & ParsedActivateDeviceInstruction)\n | ({\n instructionType: DephyIdInstruction.CreateActivatedDevice;\n } & ParsedCreateActivatedDeviceInstruction);\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport {\n AccountRole,\n isProgramDerivedAddress,\n isTransactionSigner as web3JsIsTransactionSigner,\n type Address,\n type IAccountMeta,\n type IAccountSignerMeta,\n type ProgramDerivedAddress,\n type TransactionSigner,\n upgradeRoleToSigner,\n} from '@solana/web3.js';\n\n/**\n * Asserts that the given value is not null or undefined.\n * @internal\n */\nexport function expectSome(value: T | null | undefined): T {\n if (value == null) {\n throw new Error('Expected a value but received null or undefined.');\n }\n return value;\n}\n\n/**\n * Asserts that the given value is a PublicKey.\n * @internal\n */\nexport function expectAddress(\n value:\n | Address\n | ProgramDerivedAddress\n | TransactionSigner\n | null\n | undefined\n): Address {\n if (!value) {\n throw new Error('Expected a Address.');\n }\n if (typeof value === 'object' && 'address' in value) {\n return value.address;\n }\n if (Array.isArray(value)) {\n return value[0];\n }\n return value as Address;\n}\n\n/**\n * Asserts that the given value is a PDA.\n * @internal\n */\nexport function expectProgramDerivedAddress(\n value:\n | Address\n | ProgramDerivedAddress\n | TransactionSigner\n | null\n | undefined\n): ProgramDerivedAddress {\n if (!value || !Array.isArray(value) || !isProgramDerivedAddress(value)) {\n throw new Error('Expected a ProgramDerivedAddress.');\n }\n return value;\n}\n\n/**\n * Asserts that the given value is a TransactionSigner.\n * @internal\n */\nexport function expectTransactionSigner(\n value:\n | Address\n | ProgramDerivedAddress\n | TransactionSigner\n | null\n | undefined\n): TransactionSigner {\n if (!value || !isTransactionSigner(value)) {\n throw new Error('Expected a TransactionSigner.');\n }\n return value;\n}\n\n/**\n * Defines an instruction account to resolve.\n * @internal\n */\nexport type ResolvedAccount<\n T extends string = string,\n U extends\n | Address\n | ProgramDerivedAddress\n | TransactionSigner\n | null =\n | Address\n | ProgramDerivedAddress\n | TransactionSigner\n | null,\n> = {\n isWritable: boolean;\n value: U;\n};\n\n/**\n * Defines an instruction that stores additional bytes on-chain.\n * @internal\n */\nexport type IInstructionWithByteDelta = {\n byteDelta: number;\n};\n\n/**\n * Get account metas and signers from resolved accounts.\n * @internal\n */\nexport function getAccountMetaFactory(\n programAddress: Address,\n optionalAccountStrategy: 'omitted' | 'programId'\n) {\n return (\n account: ResolvedAccount\n ): IAccountMeta | IAccountSignerMeta | undefined => {\n if (!account.value) {\n if (optionalAccountStrategy === 'omitted') return;\n return Object.freeze({\n address: programAddress,\n role: AccountRole.READONLY,\n });\n }\n\n const writableRole = account.isWritable\n ? AccountRole.WRITABLE\n : AccountRole.READONLY;\n return Object.freeze({\n address: expectAddress(account.value),\n role: isTransactionSigner(account.value)\n ? upgradeRoleToSigner(writableRole)\n : writableRole,\n ...(isTransactionSigner(account.value) ? { signer: account.value } : {}),\n });\n };\n}\n\nexport function isTransactionSigner(\n value:\n | Address\n | ProgramDerivedAddress\n | TransactionSigner\n): value is TransactionSigner {\n return (\n !!value &&\n typeof value === 'object' &&\n 'address' in value &&\n web3JsIsTransactionSigner(value)\n );\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport {\n addDecoderSizePrefix,\n addEncoderSizePrefix,\n combineCodec,\n getArrayDecoder,\n getArrayEncoder,\n getStructDecoder,\n getStructEncoder,\n getTupleDecoder,\n getTupleEncoder,\n getU32Decoder,\n getU32Encoder,\n getU8Decoder,\n getU8Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n transformEncoder,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type IAccountMeta,\n type IAccountSignerMeta,\n type IInstruction,\n type IInstructionWithAccounts,\n type IInstructionWithData,\n type ReadonlyAccount,\n type ReadonlySignerAccount,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/web3.js';\nimport { DEPHY_ID_PROGRAM_ADDRESS } from '../programs';\nimport {\n expectSome,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from '../shared';\n\nexport type CreateActivatedDeviceInstruction<\n TProgram extends string = typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountSystemProgram extends\n | string\n | IAccountMeta = '11111111111111111111111111111111',\n TAccountToken2022Program extends\n | string\n | IAccountMeta = 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n TAccountAtaProgram extends\n | string\n | IAccountMeta = 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n TAccountPayer extends string | IAccountMeta = string,\n TAccountVendor extends string | IAccountMeta = string,\n TAccountProductMint extends string | IAccountMeta = string,\n TAccountProductAssociatedToken extends string | IAccountMeta = string,\n TAccountDevice extends string | IAccountMeta = string,\n TAccountDeviceMint extends string | IAccountMeta = string,\n TAccountDeviceAssociatedToken extends string | IAccountMeta = string,\n TAccountOwner extends string | IAccountMeta = string,\n TRemainingAccounts extends readonly IAccountMeta[] = [],\n> = IInstruction &\n IInstructionWithData &\n IInstructionWithAccounts<\n [\n TAccountSystemProgram extends string\n ? ReadonlyAccount\n : TAccountSystemProgram,\n TAccountToken2022Program extends string\n ? ReadonlyAccount\n : TAccountToken2022Program,\n TAccountAtaProgram extends string\n ? ReadonlyAccount\n : TAccountAtaProgram,\n TAccountPayer extends string\n ? WritableSignerAccount &\n IAccountSignerMeta\n : TAccountPayer,\n TAccountVendor extends string\n ? ReadonlyAccount\n : TAccountVendor,\n TAccountProductMint extends string\n ? ReadonlyAccount\n : TAccountProductMint,\n TAccountProductAssociatedToken extends string\n ? WritableAccount\n : TAccountProductAssociatedToken,\n TAccountDevice extends string\n ? ReadonlySignerAccount &\n IAccountSignerMeta\n : TAccountDevice,\n TAccountDeviceMint extends string\n ? WritableAccount\n : TAccountDeviceMint,\n TAccountDeviceAssociatedToken extends string\n ? WritableAccount\n : TAccountDeviceAssociatedToken,\n TAccountOwner extends string\n ? ReadonlyAccount\n : TAccountOwner,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type CreateActivatedDeviceInstructionData = {\n discriminator: number;\n name: string;\n uri: string;\n additionalMetadata: Array;\n};\n\nexport type CreateActivatedDeviceInstructionDataArgs = {\n name: string;\n uri: string;\n additionalMetadata: Array;\n};\n\nexport function getCreateActivatedDeviceInstructionDataEncoder(): Encoder {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', getU8Encoder()],\n ['name', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n ['uri', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n [\n 'additionalMetadata',\n getArrayEncoder(\n getTupleEncoder([\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n ])\n ),\n ],\n ]),\n (value) => ({ ...value, discriminator: 4 })\n );\n}\n\nexport function getCreateActivatedDeviceInstructionDataDecoder(): Decoder {\n return getStructDecoder([\n ['discriminator', getU8Decoder()],\n ['name', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n ['uri', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n [\n 'additionalMetadata',\n getArrayDecoder(\n getTupleDecoder([\n addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder()),\n addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder()),\n ])\n ),\n ],\n ]);\n}\n\nexport function getCreateActivatedDeviceInstructionDataCodec(): Codec<\n CreateActivatedDeviceInstructionDataArgs,\n CreateActivatedDeviceInstructionData\n> {\n return combineCodec(\n getCreateActivatedDeviceInstructionDataEncoder(),\n getCreateActivatedDeviceInstructionDataDecoder()\n );\n}\n\nexport type CreateActivatedDeviceInput<\n TAccountSystemProgram extends string = string,\n TAccountToken2022Program extends string = string,\n TAccountAtaProgram extends string = string,\n TAccountPayer extends string = string,\n TAccountVendor extends string = string,\n TAccountProductMint extends string = string,\n TAccountProductAssociatedToken extends string = string,\n TAccountDevice extends string = string,\n TAccountDeviceMint extends string = string,\n TAccountDeviceAssociatedToken extends string = string,\n TAccountOwner extends string = string,\n> = {\n /** The system program */\n systemProgram?: Address;\n /** The SPL Token 2022 program */\n token2022Program?: Address;\n /** The associated token program */\n ataProgram?: Address;\n /** The account paying for the storage fees */\n payer?: TransactionSigner;\n /** The vendor */\n vendor: Address;\n /** The mint account for the product */\n productMint: Address;\n /** The associated token account for the product */\n productAssociatedToken: Address;\n /** The device */\n device: TransactionSigner;\n /** The mint account for the device */\n deviceMint: Address;\n /** The associated token account for the device */\n deviceAssociatedToken: Address;\n /** The device's owner */\n owner: Address;\n name: CreateActivatedDeviceInstructionDataArgs['name'];\n uri: CreateActivatedDeviceInstructionDataArgs['uri'];\n additionalMetadata: CreateActivatedDeviceInstructionDataArgs['additionalMetadata'];\n};\n\nexport function getCreateActivatedDeviceInstruction<\n TAccountSystemProgram extends string,\n TAccountToken2022Program extends string,\n TAccountAtaProgram extends string,\n TAccountPayer extends string,\n TAccountVendor extends string,\n TAccountProductMint extends string,\n TAccountProductAssociatedToken extends string,\n TAccountDevice extends string,\n TAccountDeviceMint extends string,\n TAccountDeviceAssociatedToken extends string,\n TAccountOwner extends string,\n>(\n input: CreateActivatedDeviceInput<\n TAccountSystemProgram,\n TAccountToken2022Program,\n TAccountAtaProgram,\n TAccountPayer,\n TAccountVendor,\n TAccountProductMint,\n TAccountProductAssociatedToken,\n TAccountDevice,\n TAccountDeviceMint,\n TAccountDeviceAssociatedToken,\n TAccountOwner\n >\n): CreateActivatedDeviceInstruction<\n typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountSystemProgram,\n TAccountToken2022Program,\n TAccountAtaProgram,\n TAccountPayer,\n TAccountVendor,\n TAccountProductMint,\n TAccountProductAssociatedToken,\n TAccountDevice,\n TAccountDeviceMint,\n TAccountDeviceAssociatedToken,\n TAccountOwner\n> {\n // Program address.\n const programAddress = DEPHY_ID_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n token2022Program: {\n value: input.token2022Program ?? null,\n isWritable: false,\n },\n ataProgram: { value: input.ataProgram ?? null, isWritable: false },\n payer: { value: input.payer ?? null, isWritable: true },\n vendor: { value: input.vendor ?? null, isWritable: false },\n productMint: { value: input.productMint ?? null, isWritable: false },\n productAssociatedToken: {\n value: input.productAssociatedToken ?? null,\n isWritable: true,\n },\n device: { value: input.device ?? null, isWritable: false },\n deviceMint: { value: input.deviceMint ?? null, isWritable: true },\n deviceAssociatedToken: {\n value: input.deviceAssociatedToken ?? null,\n isWritable: true,\n },\n owner: { value: input.owner ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n if (!accounts.token2022Program.value) {\n accounts.token2022Program.value =\n 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>;\n }\n if (!accounts.ataProgram.value) {\n accounts.ataProgram.value =\n 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>;\n }\n if (!accounts.payer.value) {\n accounts.payer.value = expectSome(accounts.vendor.value);\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.token2022Program),\n getAccountMeta(accounts.ataProgram),\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.vendor),\n getAccountMeta(accounts.productMint),\n getAccountMeta(accounts.productAssociatedToken),\n getAccountMeta(accounts.device),\n getAccountMeta(accounts.deviceMint),\n getAccountMeta(accounts.deviceAssociatedToken),\n getAccountMeta(accounts.owner),\n ],\n programAddress,\n data: getCreateActivatedDeviceInstructionDataEncoder().encode(\n args as CreateActivatedDeviceInstructionDataArgs\n ),\n } as CreateActivatedDeviceInstruction<\n typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountSystemProgram,\n TAccountToken2022Program,\n TAccountAtaProgram,\n TAccountPayer,\n TAccountVendor,\n TAccountProductMint,\n TAccountProductAssociatedToken,\n TAccountDevice,\n TAccountDeviceMint,\n TAccountDeviceAssociatedToken,\n TAccountOwner\n >;\n\n return instruction;\n}\n\nexport type ParsedCreateActivatedDeviceInstruction<\n TProgram extends string = typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[],\n> = {\n programAddress: Address;\n accounts: {\n /** The system program */\n systemProgram: TAccountMetas[0];\n /** The SPL Token 2022 program */\n token2022Program: TAccountMetas[1];\n /** The associated token program */\n ataProgram: TAccountMetas[2];\n /** The account paying for the storage fees */\n payer: TAccountMetas[3];\n /** The vendor */\n vendor: TAccountMetas[4];\n /** The mint account for the product */\n productMint: TAccountMetas[5];\n /** The associated token account for the product */\n productAssociatedToken: TAccountMetas[6];\n /** The device */\n device: TAccountMetas[7];\n /** The mint account for the device */\n deviceMint: TAccountMetas[8];\n /** The associated token account for the device */\n deviceAssociatedToken: TAccountMetas[9];\n /** The device's owner */\n owner: TAccountMetas[10];\n };\n data: CreateActivatedDeviceInstructionData;\n};\n\nexport function parseCreateActivatedDeviceInstruction<\n TProgram extends string,\n TAccountMetas extends readonly IAccountMeta[],\n>(\n instruction: IInstruction &\n IInstructionWithAccounts &\n IInstructionWithData\n): ParsedCreateActivatedDeviceInstruction {\n if (instruction.accounts.length < 11) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n systemProgram: getNextAccount(),\n token2022Program: getNextAccount(),\n ataProgram: getNextAccount(),\n payer: getNextAccount(),\n vendor: getNextAccount(),\n productMint: getNextAccount(),\n productAssociatedToken: getNextAccount(),\n device: getNextAccount(),\n deviceMint: getNextAccount(),\n deviceAssociatedToken: getNextAccount(),\n owner: getNextAccount(),\n },\n data: getCreateActivatedDeviceInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport {\n addDecoderSizePrefix,\n addEncoderSizePrefix,\n combineCodec,\n getArrayDecoder,\n getArrayEncoder,\n getStructDecoder,\n getStructEncoder,\n getTupleDecoder,\n getTupleEncoder,\n getU32Decoder,\n getU32Encoder,\n getU8Decoder,\n getU8Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n transformEncoder,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type IAccountMeta,\n type IAccountSignerMeta,\n type IInstruction,\n type IInstructionWithAccounts,\n type IInstructionWithData,\n type ReadonlyAccount,\n type ReadonlySignerAccount,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/web3.js';\nimport { DEPHY_ID_PROGRAM_ADDRESS } from '../programs';\nimport {\n expectSome,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from '../shared';\nimport {\n getDeviceSigningAlgorithmDecoder,\n getDeviceSigningAlgorithmEncoder,\n type DeviceSigningAlgorithm,\n type DeviceSigningAlgorithmArgs,\n} from '../types';\n\nexport type CreateDeviceInstruction<\n TProgram extends string = typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountSystemProgram extends\n | string\n | IAccountMeta = '11111111111111111111111111111111',\n TAccountToken2022Program extends\n | string\n | IAccountMeta = 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n TAccountAtaProgram extends\n | string\n | IAccountMeta = 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n TAccountPayer extends string | IAccountMeta = string,\n TAccountVendor extends string | IAccountMeta = string,\n TAccountProductMint extends string | IAccountMeta = string,\n TAccountProductAssociatedToken extends string | IAccountMeta = string,\n TAccountDevice extends string | IAccountMeta = string,\n TAccountDeviceMint extends string | IAccountMeta = string,\n TRemainingAccounts extends readonly IAccountMeta[] = [],\n> = IInstruction &\n IInstructionWithData &\n IInstructionWithAccounts<\n [\n TAccountSystemProgram extends string\n ? ReadonlyAccount\n : TAccountSystemProgram,\n TAccountToken2022Program extends string\n ? ReadonlyAccount\n : TAccountToken2022Program,\n TAccountAtaProgram extends string\n ? ReadonlyAccount\n : TAccountAtaProgram,\n TAccountPayer extends string\n ? WritableSignerAccount &\n IAccountSignerMeta\n : TAccountPayer,\n TAccountVendor extends string\n ? ReadonlySignerAccount &\n IAccountSignerMeta\n : TAccountVendor,\n TAccountProductMint extends string\n ? WritableAccount\n : TAccountProductMint,\n TAccountProductAssociatedToken extends string\n ? WritableAccount\n : TAccountProductAssociatedToken,\n TAccountDevice extends string\n ? ReadonlyAccount\n : TAccountDevice,\n TAccountDeviceMint extends string\n ? WritableAccount\n : TAccountDeviceMint,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type CreateDeviceInstructionData = {\n discriminator: number;\n name: string;\n uri: string;\n additionalMetadata: Array;\n signingAlg: DeviceSigningAlgorithm;\n};\n\nexport type CreateDeviceInstructionDataArgs = {\n name: string;\n uri: string;\n additionalMetadata: Array;\n signingAlg: DeviceSigningAlgorithmArgs;\n};\n\nexport function getCreateDeviceInstructionDataEncoder(): Encoder {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', getU8Encoder()],\n ['name', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n ['uri', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n [\n 'additionalMetadata',\n getArrayEncoder(\n getTupleEncoder([\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n ])\n ),\n ],\n ['signingAlg', getDeviceSigningAlgorithmEncoder()],\n ]),\n (value) => ({ ...value, discriminator: 2 })\n );\n}\n\nexport function getCreateDeviceInstructionDataDecoder(): Decoder {\n return getStructDecoder([\n ['discriminator', getU8Decoder()],\n ['name', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n ['uri', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n [\n 'additionalMetadata',\n getArrayDecoder(\n getTupleDecoder([\n addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder()),\n addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder()),\n ])\n ),\n ],\n ['signingAlg', getDeviceSigningAlgorithmDecoder()],\n ]);\n}\n\nexport function getCreateDeviceInstructionDataCodec(): Codec<\n CreateDeviceInstructionDataArgs,\n CreateDeviceInstructionData\n> {\n return combineCodec(\n getCreateDeviceInstructionDataEncoder(),\n getCreateDeviceInstructionDataDecoder()\n );\n}\n\nexport type CreateDeviceInput<\n TAccountSystemProgram extends string = string,\n TAccountToken2022Program extends string = string,\n TAccountAtaProgram extends string = string,\n TAccountPayer extends string = string,\n TAccountVendor extends string = string,\n TAccountProductMint extends string = string,\n TAccountProductAssociatedToken extends string = string,\n TAccountDevice extends string = string,\n TAccountDeviceMint extends string = string,\n> = {\n /** The system program */\n systemProgram?: Address;\n /** The SPL Token 2022 program */\n token2022Program?: Address;\n /** The associated token program */\n ataProgram?: Address;\n /** The account paying for the storage fees */\n payer?: TransactionSigner;\n /** The vendor */\n vendor: TransactionSigner;\n /** The mint account of the product */\n productMint: Address;\n /** The associated token account of the product */\n productAssociatedToken: Address;\n /** The device */\n device: Address;\n /** The mint account of the device */\n deviceMint: Address;\n name: CreateDeviceInstructionDataArgs['name'];\n uri: CreateDeviceInstructionDataArgs['uri'];\n additionalMetadata: CreateDeviceInstructionDataArgs['additionalMetadata'];\n signingAlg: CreateDeviceInstructionDataArgs['signingAlg'];\n};\n\nexport function getCreateDeviceInstruction<\n TAccountSystemProgram extends string,\n TAccountToken2022Program extends string,\n TAccountAtaProgram extends string,\n TAccountPayer extends string,\n TAccountVendor extends string,\n TAccountProductMint extends string,\n TAccountProductAssociatedToken extends string,\n TAccountDevice extends string,\n TAccountDeviceMint extends string,\n>(\n input: CreateDeviceInput<\n TAccountSystemProgram,\n TAccountToken2022Program,\n TAccountAtaProgram,\n TAccountPayer,\n TAccountVendor,\n TAccountProductMint,\n TAccountProductAssociatedToken,\n TAccountDevice,\n TAccountDeviceMint\n >\n): CreateDeviceInstruction<\n typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountSystemProgram,\n TAccountToken2022Program,\n TAccountAtaProgram,\n TAccountPayer,\n TAccountVendor,\n TAccountProductMint,\n TAccountProductAssociatedToken,\n TAccountDevice,\n TAccountDeviceMint\n> {\n // Program address.\n const programAddress = DEPHY_ID_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n token2022Program: {\n value: input.token2022Program ?? null,\n isWritable: false,\n },\n ataProgram: { value: input.ataProgram ?? null, isWritable: false },\n payer: { value: input.payer ?? null, isWritable: true },\n vendor: { value: input.vendor ?? null, isWritable: false },\n productMint: { value: input.productMint ?? null, isWritable: true },\n productAssociatedToken: {\n value: input.productAssociatedToken ?? null,\n isWritable: true,\n },\n device: { value: input.device ?? null, isWritable: false },\n deviceMint: { value: input.deviceMint ?? null, isWritable: true },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n if (!accounts.token2022Program.value) {\n accounts.token2022Program.value =\n 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>;\n }\n if (!accounts.ataProgram.value) {\n accounts.ataProgram.value =\n 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>;\n }\n if (!accounts.payer.value) {\n accounts.payer.value = expectSome(accounts.vendor.value);\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.token2022Program),\n getAccountMeta(accounts.ataProgram),\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.vendor),\n getAccountMeta(accounts.productMint),\n getAccountMeta(accounts.productAssociatedToken),\n getAccountMeta(accounts.device),\n getAccountMeta(accounts.deviceMint),\n ],\n programAddress,\n data: getCreateDeviceInstructionDataEncoder().encode(\n args as CreateDeviceInstructionDataArgs\n ),\n } as CreateDeviceInstruction<\n typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountSystemProgram,\n TAccountToken2022Program,\n TAccountAtaProgram,\n TAccountPayer,\n TAccountVendor,\n TAccountProductMint,\n TAccountProductAssociatedToken,\n TAccountDevice,\n TAccountDeviceMint\n >;\n\n return instruction;\n}\n\nexport type ParsedCreateDeviceInstruction<\n TProgram extends string = typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[],\n> = {\n programAddress: Address;\n accounts: {\n /** The system program */\n systemProgram: TAccountMetas[0];\n /** The SPL Token 2022 program */\n token2022Program: TAccountMetas[1];\n /** The associated token program */\n ataProgram: TAccountMetas[2];\n /** The account paying for the storage fees */\n payer: TAccountMetas[3];\n /** The vendor */\n vendor: TAccountMetas[4];\n /** The mint account of the product */\n productMint: TAccountMetas[5];\n /** The associated token account of the product */\n productAssociatedToken: TAccountMetas[6];\n /** The device */\n device: TAccountMetas[7];\n /** The mint account of the device */\n deviceMint: TAccountMetas[8];\n };\n data: CreateDeviceInstructionData;\n};\n\nexport function parseCreateDeviceInstruction<\n TProgram extends string,\n TAccountMetas extends readonly IAccountMeta[],\n>(\n instruction: IInstruction &\n IInstructionWithAccounts &\n IInstructionWithData\n): ParsedCreateDeviceInstruction {\n if (instruction.accounts.length < 9) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n systemProgram: getNextAccount(),\n token2022Program: getNextAccount(),\n ataProgram: getNextAccount(),\n payer: getNextAccount(),\n vendor: getNextAccount(),\n productMint: getNextAccount(),\n productAssociatedToken: getNextAccount(),\n device: getNextAccount(),\n deviceMint: getNextAccount(),\n },\n data: getCreateDeviceInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport {\n addDecoderSizePrefix,\n addEncoderSizePrefix,\n combineCodec,\n getArrayDecoder,\n getArrayEncoder,\n getStructDecoder,\n getStructEncoder,\n getTupleDecoder,\n getTupleEncoder,\n getU32Decoder,\n getU32Encoder,\n getU8Decoder,\n getU8Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n transformEncoder,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type IAccountMeta,\n type IAccountSignerMeta,\n type IInstruction,\n type IInstructionWithAccounts,\n type IInstructionWithData,\n type ReadonlyAccount,\n type ReadonlySignerAccount,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/web3.js';\nimport { DEPHY_ID_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\n\nexport type CreateProductInstruction<\n TProgram extends string = typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountSystemProgram extends\n | string\n | IAccountMeta = '11111111111111111111111111111111',\n TAccountToken2022Program extends\n | string\n | IAccountMeta = 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n TAccountPayer extends string | IAccountMeta = string,\n TAccountVendor extends string | IAccountMeta = string,\n TAccountProductMint extends string | IAccountMeta = string,\n TRemainingAccounts extends readonly IAccountMeta[] = [],\n> = IInstruction &\n IInstructionWithData &\n IInstructionWithAccounts<\n [\n TAccountSystemProgram extends string\n ? ReadonlyAccount\n : TAccountSystemProgram,\n TAccountToken2022Program extends string\n ? ReadonlyAccount\n : TAccountToken2022Program,\n TAccountPayer extends string\n ? WritableSignerAccount &\n IAccountSignerMeta\n : TAccountPayer,\n TAccountVendor extends string\n ? ReadonlySignerAccount &\n IAccountSignerMeta\n : TAccountVendor,\n TAccountProductMint extends string\n ? WritableAccount\n : TAccountProductMint,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type CreateProductInstructionData = {\n discriminator: number;\n name: string;\n symbol: string;\n uri: string;\n additionalMetadata: Array;\n};\n\nexport type CreateProductInstructionDataArgs = {\n name: string;\n symbol: string;\n uri: string;\n additionalMetadata: Array;\n};\n\nexport function getCreateProductInstructionDataEncoder(): Encoder {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', getU8Encoder()],\n ['name', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n ['symbol', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n ['uri', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n [\n 'additionalMetadata',\n getArrayEncoder(\n getTupleEncoder([\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n ])\n ),\n ],\n ]),\n (value) => ({ ...value, discriminator: 1 })\n );\n}\n\nexport function getCreateProductInstructionDataDecoder(): Decoder {\n return getStructDecoder([\n ['discriminator', getU8Decoder()],\n ['name', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n ['symbol', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n ['uri', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n [\n 'additionalMetadata',\n getArrayDecoder(\n getTupleDecoder([\n addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder()),\n addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder()),\n ])\n ),\n ],\n ]);\n}\n\nexport function getCreateProductInstructionDataCodec(): Codec<\n CreateProductInstructionDataArgs,\n CreateProductInstructionData\n> {\n return combineCodec(\n getCreateProductInstructionDataEncoder(),\n getCreateProductInstructionDataDecoder()\n );\n}\n\nexport type CreateProductInput<\n TAccountSystemProgram extends string = string,\n TAccountToken2022Program extends string = string,\n TAccountPayer extends string = string,\n TAccountVendor extends string = string,\n TAccountProductMint extends string = string,\n> = {\n /** The system program */\n systemProgram?: Address;\n /** The SPL Token 2022 program */\n token2022Program?: Address;\n /** The account paying for the storage fees */\n payer: TransactionSigner;\n /** The vendor */\n vendor: TransactionSigner;\n /** The mint account of the product */\n productMint: Address;\n name: CreateProductInstructionDataArgs['name'];\n symbol: CreateProductInstructionDataArgs['symbol'];\n uri: CreateProductInstructionDataArgs['uri'];\n additionalMetadata: CreateProductInstructionDataArgs['additionalMetadata'];\n};\n\nexport function getCreateProductInstruction<\n TAccountSystemProgram extends string,\n TAccountToken2022Program extends string,\n TAccountPayer extends string,\n TAccountVendor extends string,\n TAccountProductMint extends string,\n>(\n input: CreateProductInput<\n TAccountSystemProgram,\n TAccountToken2022Program,\n TAccountPayer,\n TAccountVendor,\n TAccountProductMint\n >\n): CreateProductInstruction<\n typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountSystemProgram,\n TAccountToken2022Program,\n TAccountPayer,\n TAccountVendor,\n TAccountProductMint\n> {\n // Program address.\n const programAddress = DEPHY_ID_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n token2022Program: {\n value: input.token2022Program ?? null,\n isWritable: false,\n },\n payer: { value: input.payer ?? null, isWritable: true },\n vendor: { value: input.vendor ?? null, isWritable: false },\n productMint: { value: input.productMint ?? null, isWritable: true },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n if (!accounts.token2022Program.value) {\n accounts.token2022Program.value =\n 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.token2022Program),\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.vendor),\n getAccountMeta(accounts.productMint),\n ],\n programAddress,\n data: getCreateProductInstructionDataEncoder().encode(\n args as CreateProductInstructionDataArgs\n ),\n } as CreateProductInstruction<\n typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountSystemProgram,\n TAccountToken2022Program,\n TAccountPayer,\n TAccountVendor,\n TAccountProductMint\n >;\n\n return instruction;\n}\n\nexport type ParsedCreateProductInstruction<\n TProgram extends string = typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[],\n> = {\n programAddress: Address;\n accounts: {\n /** The system program */\n systemProgram: TAccountMetas[0];\n /** The SPL Token 2022 program */\n token2022Program: TAccountMetas[1];\n /** The account paying for the storage fees */\n payer: TAccountMetas[2];\n /** The vendor */\n vendor: TAccountMetas[3];\n /** The mint account of the product */\n productMint: TAccountMetas[4];\n };\n data: CreateProductInstructionData;\n};\n\nexport function parseCreateProductInstruction<\n TProgram extends string,\n TAccountMetas extends readonly IAccountMeta[],\n>(\n instruction: IInstruction &\n IInstructionWithAccounts &\n IInstructionWithData\n): ParsedCreateProductInstruction {\n if (instruction.accounts.length < 5) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n systemProgram: getNextAccount(),\n token2022Program: getNextAccount(),\n payer: getNextAccount(),\n vendor: getNextAccount(),\n productMint: getNextAccount(),\n },\n data: getCreateProductInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/kinobi-so/kinobi\n */\n\nimport {\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU8Decoder,\n getU8Encoder,\n transformEncoder,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type IAccountMeta,\n type IAccountSignerMeta,\n type IInstruction,\n type IInstructionWithAccounts,\n type IInstructionWithData,\n type ReadonlyAccount,\n type ReadonlySignerAccount,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/web3.js';\nimport { DEPHY_ID_PROGRAM_ADDRESS } from '../programs';\nimport {\n expectSome,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from '../shared';\n\nexport type InitializeInstruction<\n TProgram extends string = typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountSystemProgram extends\n | string\n | IAccountMeta = '11111111111111111111111111111111',\n TAccountPayer extends string | IAccountMeta = string,\n TAccountProgramData extends string | IAccountMeta = string,\n TAccountAuthority extends string | IAccountMeta = string,\n TRemainingAccounts extends readonly IAccountMeta[] = [],\n> = IInstruction &\n IInstructionWithData &\n IInstructionWithAccounts<\n [\n TAccountSystemProgram extends string\n ? ReadonlyAccount\n : TAccountSystemProgram,\n TAccountPayer extends string\n ? WritableSignerAccount &\n IAccountSignerMeta\n : TAccountPayer,\n TAccountProgramData extends string\n ? WritableAccount\n : TAccountProgramData,\n TAccountAuthority extends string\n ? ReadonlySignerAccount &\n IAccountSignerMeta\n : TAccountAuthority,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type InitializeInstructionData = { discriminator: number; bump: number };\n\nexport type InitializeInstructionDataArgs = { bump: number };\n\nexport function getInitializeInstructionDataEncoder(): Encoder {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', getU8Encoder()],\n ['bump', getU8Encoder()],\n ]),\n (value) => ({ ...value, discriminator: 0 })\n );\n}\n\nexport function getInitializeInstructionDataDecoder(): Decoder {\n return getStructDecoder([\n ['discriminator', getU8Decoder()],\n ['bump', getU8Decoder()],\n ]);\n}\n\nexport function getInitializeInstructionDataCodec(): Codec<\n InitializeInstructionDataArgs,\n InitializeInstructionData\n> {\n return combineCodec(\n getInitializeInstructionDataEncoder(),\n getInitializeInstructionDataDecoder()\n );\n}\n\nexport type InitializeInput<\n TAccountSystemProgram extends string = string,\n TAccountPayer extends string = string,\n TAccountProgramData extends string = string,\n TAccountAuthority extends string = string,\n> = {\n /** The system program */\n systemProgram?: Address;\n /** The account paying for the storage fees */\n payer?: TransactionSigner;\n /** The program data account for the program */\n programData: Address;\n /** The authority account of the program */\n authority: TransactionSigner;\n bump: InitializeInstructionDataArgs['bump'];\n};\n\nexport function getInitializeInstruction<\n TAccountSystemProgram extends string,\n TAccountPayer extends string,\n TAccountProgramData extends string,\n TAccountAuthority extends string,\n>(\n input: InitializeInput<\n TAccountSystemProgram,\n TAccountPayer,\n TAccountProgramData,\n TAccountAuthority\n >\n): InitializeInstruction<\n typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountSystemProgram,\n TAccountPayer,\n TAccountProgramData,\n TAccountAuthority\n> {\n // Program address.\n const programAddress = DEPHY_ID_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n payer: { value: input.payer ?? null, isWritable: true },\n programData: { value: input.programData ?? null, isWritable: true },\n authority: { value: input.authority ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n if (!accounts.payer.value) {\n accounts.payer.value = expectSome(accounts.authority.value);\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.programData),\n getAccountMeta(accounts.authority),\n ],\n programAddress,\n data: getInitializeInstructionDataEncoder().encode(\n args as InitializeInstructionDataArgs\n ),\n } as InitializeInstruction<\n typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountSystemProgram,\n TAccountPayer,\n TAccountProgramData,\n TAccountAuthority\n >;\n\n return instruction;\n}\n\nexport type ParsedInitializeInstruction<\n TProgram extends string = typeof DEPHY_ID_PROGRAM_ADDRESS,\n TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[],\n> = {\n programAddress: Address;\n accounts: {\n /** The system program */\n systemProgram: TAccountMetas[0];\n /** The account paying for the storage fees */\n payer: TAccountMetas[1];\n /** The program data account for the program */\n programData: TAccountMetas[2];\n /** The authority account of the program */\n authority: TAccountMetas[3];\n };\n data: InitializeInstructionData;\n};\n\nexport function parseInitializeInstruction<\n TProgram extends string,\n TAccountMetas extends readonly IAccountMeta[],\n>(\n instruction: IInstruction &\n IInstructionWithAccounts &\n IInstructionWithData\n): ParsedInitializeInstruction {\n if (instruction.accounts.length < 4) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n systemProgram: getNextAccount(),\n payer: getNextAccount(),\n programData: getNextAccount(),\n authority: getNextAccount(),\n },\n data: getInitializeInstructionDataDecoder().decode(instruction.data),\n };\n}\n"]} \ No newline at end of file diff --git a/clients/js/dist/test/_setup.js.map b/clients/js/dist/test/_setup.js.map index 1df374a..9cf6b32 100644 --- a/clients/js/dist/test/_setup.js.map +++ b/clients/js/dist/test/_setup.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../test/_setup.ts"],"names":[],"mappings":"AAAA;AAAA,EAUE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAOA,MAAM,4BAA4B,MAAc;AACrD,QAAM,MAAM,gBAAgB,uBAAuB;AACnD,QAAM,mBAAmB,6BAA6B,qBAAqB;AAC3E,SAAO,EAAE,KAAK,iBAAiB;AACjC;AAEO,MAAM,+BAA+B,OAC1C,QACA,mBAA2B,gBACxB;AACH,QAAM,SAAS,MAAM,sBAAsB;AAC3C,QAAM,eAAe,MAAM,EAAE;AAAA,IAC3B,kBAAkB,OAAO;AAAA,IACzB,UAAU,SAAS,gBAAgB;AAAA,IACnC,YAAY;AAAA,EACd,CAAC;AACD,SAAO;AACT;AAEO,MAAM,2BAA2B,OACtC,QACA,aACG;AACH,QAAM,EAAE,OAAO,gBAAgB,IAAI,MAAM,OAAO,IAC7C,mBAAmB,EACnB,KAAK;AACR,SAAO;AAAA,IACL,yBAAyB,EAAE,SAAS,EAAE,CAAC;AAAA,IACvC,CAAC,OAAO,oCAAoC,UAAU,EAAE;AAAA,IACxD,CAAC,OAAO,4CAA4C,iBAAiB,EAAE;AAAA,EACzE;AACF;AAEO,MAAM,yBAAyB,OACpC,QACA,oBAEA,aAAyB,gBACtB;AACH,QAAM,oBACJ,MAAM,kCAAkC,kBAAkB;AAC5D,QAAM,YAAY,4BAA4B,iBAAiB;AAC/D,QAAM,iCAAiC,MAAM,EAAE,mBAAmB;AAAA,IAChE;AAAA,EACF,CAAC;AACD,SAAO;AACT;AAEO,MAAM,aAAa,OAAO,QAAgB,aAC9C,MAAM,OAAO,IAAI,WAAW,SAAS,EAAE,YAAY,YAAY,CAAC,EAAE,KAAK,GACrE","sourcesContent":["import {\n Address,\n Commitment,\n CompilableTransactionMessage,\n TransactionMessageWithBlockhashLifetime,\n Rpc,\n RpcSubscriptions,\n SolanaRpcApi,\n SolanaRpcSubscriptionsApi,\n TransactionSigner,\n airdropFactory,\n createSolanaRpc,\n createSolanaRpcSubscriptions,\n createTransactionMessage,\n generateKeyPairSigner,\n getSignatureFromTransaction,\n lamports,\n pipe,\n sendAndConfirmTransactionFactory,\n setTransactionMessageFeePayerSigner,\n setTransactionMessageLifetimeUsingBlockhash,\n signTransactionMessageWithSigners,\n} from '@solana/web3.js';\n\ntype Client = {\n rpc: Rpc;\n rpcSubscriptions: RpcSubscriptions;\n};\n\nexport const createDefaultSolanaClient = (): Client => {\n const rpc = createSolanaRpc('http://127.0.0.1:8899');\n const rpcSubscriptions = createSolanaRpcSubscriptions('ws://127.0.0.1:8900');\n return { rpc, rpcSubscriptions };\n};\n\nexport const generateKeyPairSignerWithSol = async (\n client: Client,\n putativeLamports: bigint = 1_000_000_000n\n) => {\n const signer = await generateKeyPairSigner();\n await airdropFactory(client)({\n recipientAddress: signer.address,\n lamports: lamports(putativeLamports),\n commitment: 'confirmed',\n });\n return signer;\n};\n\nexport const createDefaultTransaction = async (\n client: Client,\n feePayer: TransactionSigner\n) => {\n const { value: latestBlockhash } = await client.rpc\n .getLatestBlockhash()\n .send();\n return pipe(\n createTransactionMessage({ version: 0 }),\n (tx) => setTransactionMessageFeePayerSigner(feePayer, tx),\n (tx) => setTransactionMessageLifetimeUsingBlockhash(latestBlockhash, tx)\n );\n};\n\nexport const signAndSendTransaction = async (\n client: Client,\n transactionMessage: CompilableTransactionMessage &\n TransactionMessageWithBlockhashLifetime,\n commitment: Commitment = 'confirmed'\n) => {\n const signedTransaction =\n await signTransactionMessageWithSigners(transactionMessage);\n const signature = getSignatureFromTransaction(signedTransaction);\n await sendAndConfirmTransactionFactory(client)(signedTransaction, {\n commitment,\n });\n return signature;\n};\n\nexport const getBalance = async (client: Client, address: Address) =>\n (await client.rpc.getBalance(address, { commitment: 'confirmed' }).send())\n .value;\n"]} \ No newline at end of file +{"version":3,"sources":["../../test/_setup.ts"],"names":[],"mappings":"AAAA;AAAA,EAWE;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAQA,MAAM,4BAA4B,MAAc;AACrD,QAAM,MAAM,gBAAgB,uBAAuB;AACnD,QAAM,mBAAmB,6BAA6B,qBAAqB;AAC3E,SAAO,EAAE,KAAK,iBAAiB;AACjC;AAEO,MAAM,+BAA+B,OAC1C,QACA,mBAA2B,gBACxB;AACH,QAAM,SAAS,MAAM,sBAAsB;AAC3C,QAAM,eAAe,MAAM,EAAE;AAAA,IAC3B,kBAAkB,OAAO;AAAA,IACzB,UAAU,SAAS,gBAAgB;AAAA,IACnC,YAAY;AAAA,EACd,CAAC;AACD,SAAO;AACT;AAEO,MAAM,2BAA2B,OACtC,QACA,aACG;AACH,QAAM,EAAE,OAAO,gBAAgB,IAAI,MAAM,OAAO,IAC7C,mBAAmB,EACnB,KAAK;AACR,SAAO;AAAA,IACL,yBAAyB,EAAE,SAAS,EAAE,CAAC;AAAA,IACvC,CAAC,OAAO,oCAAoC,UAAU,EAAE;AAAA,IACxD,CAAC,OAAO,4CAA4C,iBAAiB,EAAE;AAAA,EACzE;AACF;AAEO,MAAM,yBAAyB,OACpC,QACA,oBAEA,aAAyB,gBACtB;AACH,QAAM,oBACJ,MAAM,kCAAkC,kBAAkB;AAC5D,QAAM,YAAY,4BAA4B,iBAAiB;AAC/D,QAAM,iCAAiC,MAAM,EAAE,mBAAmB;AAAA,IAChE;AAAA,EACF,CAAC;AACD,SAAO;AACT;AAEO,MAAM,aAAa,OAAO,QAAgB,aAC9C,MAAM,OAAO,IAAI,WAAW,SAAS,EAAE,YAAY,YAAY,CAAC,EAAE,KAAK,GACrE","sourcesContent":["import {\n Address,\n Commitment,\n CompilableTransactionMessage,\n TransactionMessageWithBlockhashLifetime,\n ProgramDerivedAddress,\n Rpc,\n RpcSubscriptions,\n SolanaRpcApi,\n SolanaRpcSubscriptionsApi,\n TransactionSigner,\n airdropFactory,\n appendTransactionMessageInstruction,\n createSolanaRpc,\n createSolanaRpcSubscriptions,\n createTransactionMessage,\n generateKeyPairSigner,\n getSignatureFromTransaction,\n lamports,\n pipe,\n sendAndConfirmTransactionFactory,\n setTransactionMessageFeePayerSigner,\n setTransactionMessageLifetimeUsingBlockhash,\n signTransactionMessageWithSigners,\n} from '@solana/web3.js';\n// import { findCounterPda, getCreateInstructionAsync } from '../src';\n\ntype Client = {\n rpc: Rpc;\n rpcSubscriptions: RpcSubscriptions;\n};\n\nexport const createDefaultSolanaClient = (): Client => {\n const rpc = createSolanaRpc('http://127.0.0.1:8899');\n const rpcSubscriptions = createSolanaRpcSubscriptions('ws://127.0.0.1:8900');\n return { rpc, rpcSubscriptions };\n};\n\nexport const generateKeyPairSignerWithSol = async (\n client: Client,\n putativeLamports: bigint = 1_000_000_000n\n) => {\n const signer = await generateKeyPairSigner();\n await airdropFactory(client)({\n recipientAddress: signer.address,\n lamports: lamports(putativeLamports),\n commitment: 'confirmed',\n });\n return signer;\n};\n\nexport const createDefaultTransaction = async (\n client: Client,\n feePayer: TransactionSigner\n) => {\n const { value: latestBlockhash } = await client.rpc\n .getLatestBlockhash()\n .send();\n return pipe(\n createTransactionMessage({ version: 0 }),\n (tx) => setTransactionMessageFeePayerSigner(feePayer, tx),\n (tx) => setTransactionMessageLifetimeUsingBlockhash(latestBlockhash, tx)\n );\n};\n\nexport const signAndSendTransaction = async (\n client: Client,\n transactionMessage: CompilableTransactionMessage &\n TransactionMessageWithBlockhashLifetime,\n commitment: Commitment = 'confirmed'\n) => {\n const signedTransaction =\n await signTransactionMessageWithSigners(transactionMessage);\n const signature = getSignatureFromTransaction(signedTransaction);\n await sendAndConfirmTransactionFactory(client)(signedTransaction, {\n commitment,\n });\n return signature;\n};\n\nexport const getBalance = async (client: Client, address: Address) =>\n (await client.rpc.getBalance(address, { commitment: 'confirmed' }).send())\n .value;\n\n// export const createCounterForAuthority = async (\n// client: Client,\n// authority: TransactionSigner\n// ): Promise => {\n// const [transaction, counterPda, createIx] = await Promise.all([\n// createDefaultTransaction(client, authority),\n// findCounterPda({ authority: authority.address }),\n// getCreateInstructionAsync({ authority }),\n// ]);\n// await pipe(\n// transaction,\n// (tx) => appendTransactionMessageInstruction(createIx, tx),\n// (tx) => signAndSendTransaction(client, tx)\n// );\n// return counterPda;\n// };\n"]} \ No newline at end of file diff --git a/clients/js/dist/test/create.test.js b/clients/js/dist/test/create.test.js new file mode 100644 index 0000000..fc06e8e --- /dev/null +++ b/clients/js/dist/test/create.test.js @@ -0,0 +1,53 @@ +'use strict'; + +var web3_js = require('@solana/web3.js'); +var test = require('ava'); +var src = require('../src'); +var _setup = require('./_setup'); + +function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; } + +var test__default = /*#__PURE__*/_interopDefault(test); + +var __getOwnPropNames = Object.getOwnPropertyNames; +var __esm = (fn, res) => function __init() { + return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res; +}; +var __commonJS = (cb, mod) => function __require() { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; +}; +var init_env_shim = __esm({ + "env-shim.ts"() { + } +}); +var require_create_test = __commonJS({ + "test/create.test.ts"() { + init_env_shim(); + test__default.default("it creates a new DePHY account", async (t) => { + const client = _setup.createDefaultSolanaClient(); + const authority = await _setup.generateKeyPairSignerWithSol(client); + const createIx = await getCreateInstructionAsync({ authority }); + await web3_js.pipe( + await _setup.createDefaultTransaction(client, authority), + (tx) => web3_js.appendTransactionMessageInstruction(createIx, tx), + (tx) => _setup.signAndSendTransaction(client, tx) + ); + const counter = await src.fetchProgramDataAccountFromSeeds(client.rpc, { + authority: authority.address + }); + t.like(counter, { + data: { + authority: authority.address, + data: { + bump: 0 + } + } + }); + }); + } +}); +var create_test = require_create_test(); + +module.exports = create_test; +//# sourceMappingURL=out.js.map +//# sourceMappingURL=create.test.js.map \ No newline at end of file diff --git a/clients/js/dist/test/create.test.js.map b/clients/js/dist/test/create.test.js.map new file mode 100644 index 0000000..4a3144e --- /dev/null +++ b/clients/js/dist/test/create.test.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../env-shim.ts","../../test/create.test.ts"],"names":[],"mappings":";;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA;AAAA,EAEE;AAAA,EACA;AAAA,OACK;AACP,OAAO,UAAU;AACjB;AAAA,EAEE;AAAA,OAGK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAjBP;AAAA;AAAA;AAmBA,SAAK,kCAAkC,OAAO,MAAM;AAElD,YAAM,SAAS,0BAA0B;AACzC,YAAM,YAAY,MAAM,6BAA6B,MAAM;AAG3D,YAAM,WAAW,MAAM,0BAA0B,EAAE,UAAU,CAAC;AAC9D,YAAM;AAAA,QACJ,MAAM,yBAAyB,QAAQ,SAAS;AAAA,QAChD,CAAC,OAAO,oCAAoC,UAAU,EAAE;AAAA,QACxD,CAAC,OAAO,uBAAuB,QAAQ,EAAE;AAAA,MAC3C;AAGA,YAAM,UAAU,MAAM,iCAAiC,OAAO,KAAK;AAAA,QACjE,WAAW,UAAU;AAAA,MACvB,CAAC;AACD,QAAE,KAAK,SAAkC;AAAA,QACvC,MAAM;AAAA,UACJ,WAAW,UAAU;AAAA,UACrB,MAAM;AAAA,YACJ,MAAM;AAAA,UACR;AAAA,QACF;AAAA,MACF,CAAC;AAAA,IACH,CAAC;AAAA;AAAA","sourcesContent":["// Clever obfuscation to prevent the build system from inlining the value of `NODE_ENV`\nexport const __DEV__ = /* @__PURE__ */ (() =>\n (process as any)['en' + 'v'].NODE_ENV === 'development')();\n","import {\n Account,\n appendTransactionMessageInstruction,\n pipe,\n} from '@solana/web3.js';\nimport test from 'ava';\nimport {\n DephyIdAccount,\n fetchProgramDataAccountFromSeeds\n // fetchCounterFromSeeds,\n // getCreateInstructionAsync,\n} from '../src';\nimport {\n createDefaultSolanaClient,\n createDefaultTransaction,\n generateKeyPairSignerWithSol,\n signAndSendTransaction,\n} from './_setup';\n\ntest('it creates a new DePHY account', async (t) => {\n // Given an authority key pair with some SOL.\n const client = createDefaultSolanaClient();\n const authority = await generateKeyPairSignerWithSol(client);\n\n // When we create a new counter account.\n const createIx = await getCreateInstructionAsync({ authority });\n await pipe(\n await createDefaultTransaction(client, authority),\n (tx) => appendTransactionMessageInstruction(createIx, tx),\n (tx) => signAndSendTransaction(client, tx)\n );\n\n // Then we expect the counter account to exist and have a value of 0.\n const counter = await fetchProgramDataAccountFromSeeds(client.rpc, {\n authority: authority.address,\n });\n t.like(counter, >{\n data: {\n authority: authority.address,\n data: {\n bump: 0,\n }\n },\n });\n});\n"]} \ No newline at end of file diff --git a/clients/js/dist/types/generated/instructions/activateDevice.d.ts b/clients/js/dist/types/generated/instructions/activateDevice.d.ts index 2784c8b..1135ef7 100644 --- a/clients/js/dist/types/generated/instructions/activateDevice.d.ts +++ b/clients/js/dist/types/generated/instructions/activateDevice.d.ts @@ -8,7 +8,7 @@ import { type Address, type Codec, type Decoder, type Encoder, type IAccountMeta, type IAccountSignerMeta, type IInstruction, type IInstructionWithAccounts, type IInstructionWithData, type ReadonlyAccount, type TransactionSigner, type WritableAccount, type WritableSignerAccount } from '@solana/web3.js'; import { DEPHY_ID_PROGRAM_ADDRESS } from '../programs'; import { type DeviceActivationSignature, type DeviceActivationSignatureArgs } from '../types'; -export type ActivateDeviceInstruction = '11111111111111111111111111111111', TAccountToken2022Program extends string | IAccountMeta = string, TAccountAtaProgram extends string | IAccountMeta = 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL', TAccountPayer extends string | IAccountMeta = string, TAccountVendor extends string | IAccountMeta = string, TAccountProductMint extends string | IAccountMeta = string, TAccountProductAssociatedToken extends string | IAccountMeta = string, TAccountDevice extends string | IAccountMeta = string, TAccountDeviceMint extends string | IAccountMeta = string, TAccountDeviceAssociatedToken extends string | IAccountMeta = string, TAccountOwner extends string | IAccountMeta = string, TRemainingAccounts extends readonly IAccountMeta[] = []> = IInstruction & IInstructionWithData & IInstructionWithAccounts<[ +export type ActivateDeviceInstruction = '11111111111111111111111111111111', TAccountToken2022Program extends string | IAccountMeta = 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb', TAccountAtaProgram extends string | IAccountMeta = 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL', TAccountPayer extends string | IAccountMeta = string, TAccountVendor extends string | IAccountMeta = string, TAccountProductMint extends string | IAccountMeta = string, TAccountProductAssociatedToken extends string | IAccountMeta = string, TAccountDevice extends string | IAccountMeta = string, TAccountDeviceMint extends string | IAccountMeta = string, TAccountDeviceAssociatedToken extends string | IAccountMeta = string, TAccountOwner extends string | IAccountMeta = string, TRemainingAccounts extends readonly IAccountMeta[] = []> = IInstruction & IInstructionWithData & IInstructionWithAccounts<[ TAccountSystemProgram extends string ? ReadonlyAccount : TAccountSystemProgram, TAccountToken2022Program extends string ? ReadonlyAccount : TAccountToken2022Program, TAccountAtaProgram extends string ? ReadonlyAccount : TAccountAtaProgram, @@ -38,7 +38,7 @@ export type ActivateDeviceInput; /** The SPL Token 2022 program */ - token2022Program: Address; + token2022Program?: Address; /** The associated token program */ ataProgram?: Address; /** The account paying for the storage fees */ diff --git a/clients/js/dist/types/generated/instructions/activateDevice.d.ts.map b/clients/js/dist/types/generated/instructions/activateDevice.d.ts.map index 8e82e22..82573e5 100644 --- a/clients/js/dist/types/generated/instructions/activateDevice.d.ts.map +++ b/clients/js/dist/types/generated/instructions/activateDevice.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"activateDevice.d.ts","sourceRoot":"","sources":["../../../../src/generated/instructions/activateDevice.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EASL,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,YAAY,EACjB,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC3B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAEvD,OAAO,EAGL,KAAK,yBAAyB,EAC9B,KAAK,6BAA6B,EACnC,MAAM,UAAU,CAAC;AAElB,MAAM,MAAM,yBAAyB,CACnC,QAAQ,SAAS,MAAM,GAAG,OAAO,wBAAwB,EACzD,qBAAqB,SACjB,MAAM,GACN,YAAY,CAAC,MAAM,CAAC,GAAG,kCAAkC,EAC7D,wBAAwB,SAAS,MAAM,GAAG,YAAY,CAAC,MAAM,CAAC,GAAG,MAAM,EACvE,kBAAkB,SACd,MAAM,GAC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CAAC,EAAE,CAAC,CAAC;KAC1B,CAAC;IACF,IAAI,EAAE,6BAA6B,CAAC;CACrC,CAAC;AAEF,wBAAgB,8BAA8B,CAC5C,QAAQ,SAAS,MAAM,EACvB,aAAa,SAAS,SAAS,YAAY,EAAE,EAE7C,WAAW,EAAE,YAAY,CAAC,QAAQ,CAAC,GACjC,wBAAwB,CAAC,aAAa,CAAC,GACvC,oBAAoB,CAAC,UAAU,CAAC,GACjC,+BAA+B,CAAC,QAAQ,EAAE,aAAa,CAAC,CA4B1D"} \ No newline at end of file +{"version":3,"file":"activateDevice.d.ts","sourceRoot":"","sources":["../../../../src/generated/instructions/activateDevice.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EASL,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,YAAY,EACjB,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC3B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAEvD,OAAO,EAGL,KAAK,yBAAyB,EAC9B,KAAK,6BAA6B,EACnC,MAAM,UAAU,CAAC;AAElB,MAAM,MAAM,yBAAyB,CACnC,QAAQ,SAAS,MAAM,GAAG,OAAO,wBAAwB,EACzD,qBAAqB,SACjB,MAAM,GACN,YAAY,CAAC,MAAM,CAAC,GAAG,kCAAkC,EAC7D,wBAAwB,SACpB,MAAM,GACN,YAAY,CAAC,MAAM,CAAC,GAAG,6CAA6C,EACxE,kBAAkB,SACd,MAAM,GACN,YAAY,CAAC,MAAM,CAAC,GAAG,8CAA8C,EACzE,aAAa,SAAS,MAAM,GAAG,YAAY,CAAC,MAAM,CAAC,GAAG,MAAM,EAC5D,cAAc,SAAS,MAAM,G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M,EACvB,aAAa,SAAS,SAAS,YAAY,EAAE,EAE7C,WAAW,EAAE,YAAY,CAAC,QAAQ,CAAC,GACjC,wBAAwB,CAAC,aAAa,CAAC,GACvC,oBAAoB,CAAC,UAAU,CAAC,GACjC,+BAA+B,CAAC,QAAQ,EAAE,aAAa,CAAC,CA4B1D"} \ No newline at end of file diff --git a/clients/js/dist/types/generated/instructions/createActivatedDevice.d.ts b/clients/js/dist/types/generated/instructions/createActivatedDevice.d.ts index f2c068a..66f7680 100644 --- a/clients/js/dist/types/generated/instructions/createActivatedDevice.d.ts +++ b/clients/js/dist/types/generated/instructions/createActivatedDevice.d.ts @@ -7,7 +7,7 @@ */ import { type Address, type Codec, type Decoder, type Encoder, type IAccountMeta, type IAccountSignerMeta, type IInstruction, type IInstructionWithAccounts, type IInstructionWithData, type ReadonlyAccount, type ReadonlySignerAccount, type TransactionSigner, type WritableAccount, type WritableSignerAccount } from '@solana/web3.js'; import { DEPHY_ID_PROGRAM_ADDRESS } from '../programs'; -export type CreateActivatedDeviceInstruction = '11111111111111111111111111111111', TAccountToken2022Program extends string | IAccountMeta = string, TAccountAtaProgram extends string | IAccountMeta = 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL', TAccountPayer extends string | IAccountMeta = string, TAccountVendor extends string | IAccountMeta = string, TAccountProductMint extends string | IAccountMeta = string, TAccountProductAssociatedToken extends string | IAccountMeta = string, TAccountDevice extends string | IAccountMeta = string, TAccountDeviceMint extends string | IAccountMeta = string, TAccountDeviceAssociatedToken extends string | IAccountMeta = string, TAccountOwner extends string | IAccountMeta = string, TRemainingAccounts extends readonly IAccountMeta[] = []> = IInstruction & IInstructionWithData & IInstructionWithAccounts<[ +export type CreateActivatedDeviceInstruction = '11111111111111111111111111111111', TAccountToken2022Program extends string | IAccountMeta = 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb', TAccountAtaProgram extends string | IAccountMeta = 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL', TAccountPayer extends string | IAccountMeta = string, TAccountVendor extends string | IAccountMeta = string, TAccountProductMint extends string | IAccountMeta = string, TAccountProductAssociatedToken extends string | IAccountMeta = string, TAccountDevice extends string | IAccountMeta = string, TAccountDeviceMint extends string | IAccountMeta = string, TAccountDeviceAssociatedToken extends string | IAccountMeta = string, TAccountOwner extends string | IAccountMeta = string, TRemainingAccounts extends readonly IAccountMeta[] = []> = IInstruction & IInstructionWithData & IInstructionWithAccounts<[ TAccountSystemProgram extends string ? ReadonlyAccount : TAccountSystemProgram, TAccountToken2022Program extends string ? ReadonlyAccount : TAccountToken2022Program, TAccountAtaProgram extends string ? ReadonlyAccount : TAccountAtaProgram, @@ -39,11 +39,11 @@ export type CreateActivatedDeviceInput; /** The SPL Token 2022 program */ - token2022Program: Address; + token2022Program?: Address; /** The associated token program */ ataProgram?: Address; /** The account paying for the storage fees */ - payer: TransactionSigner; + payer?: TransactionSigner; /** The vendor */ vendor: Address; /** The mint account for the product */ diff --git a/clients/js/dist/types/generated/instructions/createActivatedDevice.d.ts.map b/clients/js/dist/types/generated/instructions/createActivatedDevice.d.ts.map index 9d792a0..3e72014 100644 --- a/clients/js/dist/types/generated/instructions/createActivatedDevice.d.ts.map +++ b/clients/js/dist/types/generated/instructions/createActivatedDevice.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"createActivatedDevice.d.ts","sourceRoot":"","sources":["../../../../src/generated/instructions/createActivatedDevice.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAiBL,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,YAAY,EACjB,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC3B,M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mC;QACnC,UAAU,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QAC7B,8CAA8C;QAC9C,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QACxB,iBAAiB;QACjB,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QACzB,uCAAuC;QACvC,WAAW,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QAC9B,mDAAmD;QACnD,sBAAsB,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QACzC,iBAAiB;QACjB,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QACzB,sCAAsC;QACtC,UAAU,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QAC7B,kDAAkD;QAClD,qBAAqB,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QACxC,yBAAyB;QACzB,KAAK,EAAE,aAAa,CAAC,EAAE,CAAC,CAAC;KAC1B,CAAC;IACF,IAAI,EAAE,oCAAoC,CAAC;CAC5C,CAAC;AAEF,wBAAgB,qCAAqC,CACnD,QAAQ,SAAS,MAAM,EACvB,aAAa,SAAS,SAAS,YAAY,EAAE,EAE7C,WAAW,EAAE,YAAY,CAAC,QAAQ,CAAC,GACjC,wBAAwB,CAAC,aAAa,CAAC,GACvC,oBAAoB,CAAC,UAAU,CAAC,GACjC,sCAAsC,CAAC,QAAQ,EAAE,aAAa,CAAC,CA8BjE"} \ No newline at end of file +{"version":3,"file":"createActivatedDevice.d.ts","sourceRoot":"","sources":["../../../../src/generated/instructions/createActivatedDevice.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAiBL,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,YAAY,EACjB,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,E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jC,gBAAgB,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QACnC,mCAAmC;QACnC,UAAU,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QAC7B,8CAA8C;QAC9C,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QACxB,iBAAiB;QACjB,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QACzB,uCAAuC;QACvC,WAAW,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QAC9B,mDAAmD;QACnD,sBAAsB,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QACzC,iBAAiB;QACjB,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QACzB,sCAAsC;QACtC,UAAU,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QAC7B,kDAAkD;QAClD,qBAAqB,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QACxC,yBAAyB;QACzB,KAAK,EAAE,aAAa,CAAC,EAAE,CAAC,CAAC;KAC1B,CAAC;IACF,IAAI,EAAE,oCAAoC,CAAC;CAC5C,CAAC;AAEF,wBAAgB,qCAAqC,CACnD,QAAQ,SAAS,MAAM,EACvB,aAAa,SAAS,SAAS,YAAY,EAAE,EAE7C,WAAW,EAAE,YAAY,CAAC,QAAQ,CAAC,GACjC,wBAAwB,CAAC,aAAa,CAAC,GACvC,oBAAoB,CAAC,UAAU,CAAC,GACjC,sCAAsC,CAAC,QAAQ,EAAE,aAAa,CAAC,CA8BjE"} \ No newline at end of file diff --git a/clients/js/dist/types/generated/instructions/createDevice.d.ts b/clients/js/dist/types/generated/instructions/createDevice.d.ts index 6219a1c..9ffd613 100644 --- a/clients/js/dist/types/generated/instructions/createDevice.d.ts +++ b/clients/js/dist/types/generated/instructions/createDevice.d.ts @@ -44,7 +44,7 @@ export type CreateDeviceInput; /** The account paying for the storage fees */ - payer: TransactionSigner; + payer?: TransactionSigner; /** The vendor */ vendor: TransactionSigner; /** The mint account of the product */ diff --git a/clients/js/dist/types/generated/instructions/createDevice.d.ts.map b/clients/js/dist/types/generated/instructions/createDevice.d.ts.map index f8987a2..3c0c07c 100644 --- a/clients/js/dist/types/generated/instructions/createDevice.d.ts.map +++ b/clients/js/dist/types/generated/instructions/createDevice.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"createDevice.d.ts","sourceRoot":"","sources":["../../../../src/generated/instructions/createDevice.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAiBL,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,YAAY,EACjB,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC3B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAEvD,OAAO,EAGL,KAAK,sBAAsB,EAC3B,KAAK,0BAA0B,EAChC,MAAM,UAAU,CAAC;AAElB,MAAM,MAAM,uBAAuB,CACjC,QAAQ,SAAS,MAAM,GAAG,OAAO,wBAAwB,EACzD,qBAAqB,SACjB,MAAM,GACN,YAAY,CAAC,MAAM,CAAC,GAAG,kCAAkC,EAC7D,wBAAwB,SACpB,MAAM,GACN,YAAY,CAAC,MAAM,CAAC,GAAG,6CAA6C,EACxE,kBAAkB,SACd,MAAM,GACN,YAAY,CAAC,MAAM,CAAC,GAAG,8CAA8C,EACzE,aAAa,SAAS,MAAM,GAAG,YAAY,CAAC,MAAM,CAAC,GAAG,MAAM,EAC5D,cAAc,SAAS,MAAM,GAAG,YAAY,CAAC,MAAM,CAAC,GAAG,MAAM,EAC7D,mBAAmB,SAAS,MAAM,GAAG,YAAY,CAAC,MAAM,CAAC,GAAG,MAAM,EAClE,8BAA8B,SAAS,MAAM,GA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OAAO,CAAC,QAAQ,CAAC,CAAC;IAClC,QAAQ,EAAE;QACR,yBAAyB;QACzB,aAAa,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QAChC,iCAAiC;QACjC,gBAAgB,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QACnC,mCAAmC;QACnC,UAAU,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QAC7B,8CAA8C;QAC9C,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QACxB,iBAAiB;QACjB,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QACzB,sCAAsC;QACtC,WAAW,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QAC9B,kDAAkD;QAClD,sBAAsB,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QACzC,iBAAiB;QACjB,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QACzB,qCAAqC;QACrC,UAAU,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;KAC9B,CAAC;IACF,IAAI,EAAE,2BAA2B,CAAC;CACnC,CAAC;AAEF,wBAAgB,4BAA4B,CAC1C,QAAQ,SAAS,MAAM,EACvB,aAAa,SAAS,SAAS,YAAY,EAAE,EAE7C,WAAW,EAAE,YAAY,CAAC,QAAQ,CAAC,GACjC,wBAAwB,CAAC,aAAa,CAAC,GACvC,oBAAoB,CAAC,UAAU,CAAC,GACjC,6BAA6B,CAAC,QAAQ,EAAE,aAAa,CAAC,CA0BxD"} \ No newline at end of file +{"version":3,"file":"createDevice.d.ts","sourceRoot":"","sources":["../../../../src/generated/instructions/createDevice.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAiBL,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,YAAY,EACjB,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,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Aa,CAAC,CAAC,CAAC,CAAC;QACzC,iBAAiB;QACjB,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QACzB,qCAAqC;QACrC,UAAU,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;KAC9B,CAAC;IACF,IAAI,EAAE,2BAA2B,CAAC;CACnC,CAAC;AAEF,wBAAgB,4BAA4B,CAC1C,QAAQ,SAAS,MAAM,EACvB,aAAa,SAAS,SAAS,YAAY,EAAE,EAE7C,WAAW,EAAE,YAAY,CAAC,QAAQ,CAAC,GACjC,wBAAwB,CAAC,aAAa,CAAC,GACvC,oBAAoB,CAAC,UAAU,CAAC,GACjC,6BAA6B,CAAC,QAAQ,EAAE,aAAa,CAAC,CA0BxD"} \ No newline at end of file diff --git a/clients/js/dist/types/generated/instructions/initialize.d.ts b/clients/js/dist/types/generated/instructions/initialize.d.ts index 0c54ec6..3129439 100644 --- a/clients/js/dist/types/generated/instructions/initialize.d.ts +++ b/clients/js/dist/types/generated/instructions/initialize.d.ts @@ -28,7 +28,7 @@ export type InitializeInput; /** The account paying for the storage fees */ - payer: TransactionSigner; + payer?: TransactionSigner; /** The program data account for the program */ programData: Address; /** The authority account of the program */ diff --git a/clients/js/dist/types/generated/instructions/initialize.d.ts.map b/clients/js/dist/types/generated/instructions/initialize.d.ts.map index d9f772c..1098d02 100644 --- a/clients/js/dist/types/generated/instructions/initialize.d.ts.map +++ b/clients/js/dist/types/generated/instructions/initialize.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"initialize.d.ts","sourceRoot":"","sources":["../../../../src/generated/instructions/initialize.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAOL,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,YAAY,EACjB,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACpB,KAAK,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,EAAE;QACR,yBAAyB;QACzB,aAAa,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QAChC,8CAA8C;QAC9C,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QACxB,+CAA+C;QAC/C,WAAW,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QAC9B,2CAA2C;QAC3C,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;KAC7B,CAAC;IACF,IAAI,EAAE,yBAAyB,CAAC;CACjC,CAAC;AAEF,wBAAgB,0BAA0B,CACxC,QAAQ,SAAS,MAAM,EACvB,aAAa,SAAS,SAAS,YAAY,EAAE,EAE7C,WAAW,EAAE,YAAY,CAAC,QAAQ,CAAC,GACjC,wBAAwB,CAAC,aAAa,CAAC,GACvC,oBAAoB,CAAC,UAAU,CAAC,GACjC,2BAA2B,CAAC,QAAQ,EAAE,aAAa,CAAC,CAqBtD"} \ No newline at end of file +{"version":3,"file":"initialize.d.ts","sourceRoot":"","sources":["../../../../src/generated/instructions/initialize.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAOL,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,YAAY,EACjB,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC3B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAOvD,MAAM,MAAM,qBAAqB,CAC/B,QAAQ,SAAS,MAAM,GAAG,OAAO,wBAAwB,EACzD,qBAAqB,SACjB,MAAM,GACN,YAAY,CAAC,MAAM,CAAC,GAAG,kCAAkC,EAC7D,aAAa,SAAS,MAAM,GAAG,YAAY,CAAC,MAAM,CAAC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B,CACxC,QAAQ,SAAS,MAAM,EACvB,aAAa,SAAS,SAAS,YAAY,EAAE,EAE7C,WAAW,EAAE,YAAY,CAAC,QAAQ,CAAC,GACjC,wBAAwB,CAAC,aAAa,CAAC,GACvC,oBAAoB,CAAC,UAAU,CAAC,GACjC,2BAA2B,CAAC,QAAQ,EAAE,aAAa,CAAC,CAqBtD"} \ No newline at end of file diff --git a/clients/js/dist/types/generated/pdas/deviceAToken.d.ts b/clients/js/dist/types/generated/pdas/deviceAToken.d.ts new file mode 100644 index 0000000..bf0a7cd --- /dev/null +++ b/clients/js/dist/types/generated/pdas/deviceAToken.d.ts @@ -0,0 +1,16 @@ +/** + * This code was AUTOGENERATED using the kinobi library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun kinobi to update it. + * + * @see https://github.com/kinobi-so/kinobi + */ +import { type Address, type ProgramDerivedAddress } from '@solana/web3.js'; +export type DeviceATokenSeeds = { + ownerPubkey: Address; + deviceMintPubkey: Address; +}; +export declare function findDeviceATokenPda(seeds: DeviceATokenSeeds, config?: { + programAddress?: Address | undefined; +}): Promise; +//# sourceMappingURL=deviceAToken.d.ts.map \ No newline at end of file diff --git a/clients/js/dist/types/generated/pdas/deviceAToken.d.ts.map b/clients/js/dist/types/generated/pdas/deviceAToken.d.ts.map new file mode 100644 index 0000000..aad2a89 --- /dev/null +++ b/clients/js/dist/types/generated/pdas/deviceAToken.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"deviceAToken.d.ts","sourceRoot":"","sources":["../../../../src/generated/pdas/deviceAToken.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAIL,KAAK,OAAO,EACZ,KAAK,qBAAqB,EAC3B,MAAM,iBAAiB,CAAC;AAEzB,MAAM,MAAM,iBAAiB,GAAG;IAC9B,WAAW,EAAE,OAAO,CAAC;IAErB,gBAAgB,EAAE,OAAO,CAAC;CAC3B,CAAC;AAEF,wBAAsB,mBAAmB,CACvC,KAAK,EAAE,iBAAiB,EACxB,MAAM,GAAE;IAAE,cAAc,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAAO,GACpD,OAAO,CAAC,qBAAqB,CAAC,CAchC"} \ No newline at end of file diff --git a/clients/js/dist/types/generated/pdas/index.d.ts b/clients/js/dist/types/generated/pdas/index.d.ts index 69984a7..2d9e57e 100644 --- a/clients/js/dist/types/generated/pdas/index.d.ts +++ b/clients/js/dist/types/generated/pdas/index.d.ts @@ -5,7 +5,10 @@ * * @see https://github.com/kinobi-so/kinobi */ +export * from './deviceAToken'; export * from './deviceMint'; +export * from './productAToken'; export * from './productMint'; +export * from './programData'; export * from './programDataAccount'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/clients/js/dist/types/generated/pdas/index.d.ts.map b/clients/js/dist/types/generated/pdas/index.d.ts.map index 1334a58..b32d807 100644 --- a/clients/js/dist/types/generated/pdas/index.d.ts.map +++ b/clients/js/dist/types/generated/pdas/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/generated/pdas/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC"} \ No newline at end of file +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/generated/pdas/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC"} \ No newline at end of file diff --git a/clients/js/dist/types/generated/pdas/productAToken.d.ts b/clients/js/dist/types/generated/pdas/productAToken.d.ts new file mode 100644 index 0000000..5c27721 --- /dev/null +++ b/clients/js/dist/types/generated/pdas/productAToken.d.ts @@ -0,0 +1,16 @@ +/** + * This code was AUTOGENERATED using the kinobi library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun kinobi to update it. + * + * @see https://github.com/kinobi-so/kinobi + */ +import { type Address, type ProgramDerivedAddress } from '@solana/web3.js'; +export type ProductATokenSeeds = { + devicePubkey: Address; + productMintPubkey: Address; +}; +export declare function findProductATokenPda(seeds: ProductATokenSeeds, config?: { + programAddress?: Address | undefined; +}): Promise; +//# sourceMappingURL=productAToken.d.ts.map \ No newline at end of file diff --git a/clients/js/dist/types/generated/pdas/productAToken.d.ts.map b/clients/js/dist/types/generated/pdas/productAToken.d.ts.map new file mode 100644 index 0000000..ded4baa --- /dev/null +++ b/clients/js/dist/types/generated/pdas/productAToken.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"productAToken.d.ts","sourceRoot":"","sources":["../../../../src/generated/pdas/productAToken.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAIL,KAAK,OAAO,EACZ,KAAK,qBAAqB,EAC3B,MAAM,iBAAiB,CAAC;AAEzB,MAAM,MAAM,kBAAkB,GAAG;IAC/B,YAAY,EAAE,OAAO,CAAC;IAEtB,iBAAiB,EAAE,OAAO,CAAC;CAC5B,CAAC;AAEF,wBAAsB,oBAAoB,CACxC,KAAK,EAAE,kBAAkB,EACzB,MAAM,GAAE;IAAE,cAAc,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAAO,GACpD,OAAO,CAAC,qBAAqB,CAAC,CAchC"} \ No newline at end of file diff --git a/clients/js/dist/types/generated/pdas/programData.d.ts b/clients/js/dist/types/generated/pdas/programData.d.ts new file mode 100644 index 0000000..fc534f4 --- /dev/null +++ b/clients/js/dist/types/generated/pdas/programData.d.ts @@ -0,0 +1,12 @@ +/** + * This code was AUTOGENERATED using the kinobi library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun kinobi to update it. + * + * @see https://github.com/kinobi-so/kinobi + */ +import { type Address, type ProgramDerivedAddress } from '@solana/web3.js'; +export declare function findProgramDataPda(config?: { + programAddress?: Address | undefined; +}): Promise; +//# sourceMappingURL=programData.d.ts.map \ No newline at end of file diff --git a/clients/js/dist/types/generated/pdas/programData.d.ts.map b/clients/js/dist/types/generated/pdas/programData.d.ts.map new file mode 100644 index 0000000..bf5c041 --- /dev/null +++ b/clients/js/dist/types/generated/pdas/programData.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"programData.d.ts","sourceRoot":"","sources":["../../../../src/generated/pdas/programData.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAGL,KAAK,OAAO,EACZ,KAAK,qBAAqB,EAC3B,MAAM,iBAAiB,CAAC;AAEzB,wBAAsB,kBAAkB,CACtC,MAAM,GAAE;IAAE,cAAc,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAAO,GACpD,OAAO,CAAC,qBAAqB,CAAC,CAQhC"} \ No newline at end of file diff --git a/clients/js/dist/types/generated/programs/dephyId.d.ts.map b/clients/js/dist/types/generated/programs/dephyId.d.ts.map index ca806aa..b2bf8d0 100644 --- a/clients/js/dist/types/generated/programs/dephyId.d.ts.map +++ b/clients/js/dist/types/generated/programs/dephyId.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"dephyId.d.ts","sourceRoot":"","sources":["../../../../src/generated/programs/dephyId.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAA+B,KAAK,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EACL,KAAK,+BAA+B,EACpC,KAAK,sCAAsC,EAC3C,KAAK,6BAA6B,EAClC,KAAK,8BAA8B,EACnC,KAAK,2BAA2B,EACjC,MAAM,iBAAiB,CAAC;AAGzB,eAAO,MAAM,wBAAwB,wDACoE,CAAC;AAE1G,oBAAY,cAAc;IACxB,kBAAkB,IAAA;CACnB;AAED,wBAAgB,sBAAsB,CACpC,OAAO,EAAE;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,GAAG,UAAU,GACzC,cAAc,CAQhB;AAED,oBAAY,kBAAkB;IAC5B,UAAU,IAAA;IACV,aAAa,IAAA;IACb,YAAY,IAAA;IACZ,cAAc,IAAA;IACd,qBAAqB,IAAA;CACtB;AAED,wBAAgB,0BAA0B,CACxC,WAAW,EAAE;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,GAAG,UAAU,GAC7C,kBAAkB,CAqBpB;AAED,MAAM,MAAM,wBAAwB,CAClC,QAAQ,SAAS,MAAM,GAAG,6CAA6C,IAErE,CAAC;IACC,eAAe,EAAE,kBAAkB,CAAC,UAAU,CAAC;CAChD,GAAG,2BAA2B,CAAC,QAAQ,CAAC,CAAC,GAC1C,CAAC;IACC,eAAe,EAAE,kBAAkB,CAAC,aAAa,CAAC;CACnD,GAAG,8BAA8B,CAAC,QAAQ,CAAC,CAAC,GAC7C,CAAC;IACC,eAAe,EAAE,kBAAkB,CAAC,YAAY,CAAC;CAClD,GAAG,6BAA6B,CAAC,QAAQ,CAAC,CAAC,GAC5C,CAAC;IACC,eAAe,EAAE,kBAAkB,CAAC,cAAc,CAAC;CACpD,GAAG,+BAA+B,CAAC,QAAQ,CAAC,CAAC,GAC9C,CAAC;IACC,eAAe,EAAE,kBAAkB,CAAC,qBAAqB,CAAC;CAC3D,GAAG,sCAAsC,CAAC,QAAQ,CAAC,CAAC,CAAC"} \ No newline at end of file +{"version":3,"file":"dephyId.d.ts","sourceRoot":"","sources":["../../../../src/generated/programs/dephyId.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAA+B,KAAK,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EACL,KAAK,+BAA+B,EACpC,KAAK,sCAAsC,EAC3C,KAAK,6BAA6B,EAClC,KAAK,8BAA8B,EACnC,KAAK,2BAA2B,EACjC,MAAM,iBAAiB,CAAC;AAGzB,eAAO,MAAM,wBAAwB,EACc,OAAO,CAAC,6CAA6C,CAAC,CAAC;AAE1G,oBAAY,cAAc;IACxB,kBAAkB,IAAA;CACnB;AAED,wBAAgB,sBAAsB,CACpC,OAAO,EAAE;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,GAAG,UAAU,GACzC,cAAc,CAQhB;AAED,oBAAY,kBAAkB;IAC5B,UAAU,IAAA;IACV,aAAa,IAAA;IACb,YAAY,IAAA;IACZ,cAAc,IAAA;IACd,qBAAqB,IAAA;CACtB;AAED,wBAAgB,0BAA0B,CACxC,WAAW,EAAE;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,GAAG,UAAU,GAC7C,kBAAkB,CAqBpB;AAED,MAAM,MAAM,wBAAwB,CAClC,QAAQ,SAAS,MAAM,GAAG,6CAA6C,IAErE,CAAC;IACC,eAAe,EAAE,kBAAkB,CAAC,UAAU,CAAC;CAChD,GAAG,2BAA2B,CAAC,QAAQ,CAAC,CAAC,GAC1C,CAAC;IACC,eAAe,EAAE,kBAAkB,CAAC,aAAa,CAAC;CACnD,GAAG,8BAA8B,CAAC,QAAQ,CAAC,CAAC,GAC7C,CAAC;IACC,eAAe,EAAE,kBAAkB,CAAC,YAAY,CAAC;CAClD,GAAG,6BAA6B,CAAC,QAAQ,CAAC,CAAC,GAC5C,CAAC;IACC,eAAe,EAAE,kBAAkB,CAAC,cAAc,CAAC;CACpD,GAAG,+BAA+B,CAAC,QAAQ,CAAC,CAAC,GAC9C,CAAC;IACC,eAAe,EAAE,kBAAkB,CAAC,qBAAqB,CAAC;CAC3D,GAAG,sCAAsC,CAAC,QAAQ,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/clients/js/package.json b/clients/js/package.json index a4c695b..3273db8 100644 --- a/clients/js/package.json +++ b/clients/js/package.json @@ -45,14 +45,15 @@ "@typescript-eslint/parser": "^6.21.0", "ava": "^6.1.3", "eslint": "^8.57.0", - "prettier": "^3.2.5", + "prettier": "^3.3.2", "rimraf": "^5.0.7", - "tsup": "^8.0.2", + "tsup": "^8.1.0", "typedoc": "^0.25.13", - "typedoc-plugin-missing-exports": "^2.2.0", - "typescript": "^5.4.5" + "typedoc-plugin-missing-exports": "^2.3.0", + "typescript": "^5.5.2" }, "ava": { + "nodeArguments": ["--no-warnings"], "require": [ "@solana/webcrypto-ed25519-polyfill" ], @@ -63,5 +64,5 @@ } } }, - "packageManager": "pnpm@9.1.2" + "packageManager": "pnpm@9.4.0" } diff --git a/clients/js/pnpm-lock.yaml b/clients/js/pnpm-lock.yaml index 69e1140..c11b181 100644 --- a/clients/js/pnpm-lock.yaml +++ b/clients/js/pnpm-lock.yaml @@ -13,7 +13,7 @@ importers: version: 5.0.0 '@solana/eslint-config-solana': specifier: ^3.0.3 - version: 3.0.3(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5))(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint-plugin-jest@27.9.0(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5))(eslint-plugin-react-hooks@4.6.2(eslint@8.57.0))(eslint-plugin-simple-import-sort@10.0.0(eslint@8.57.0))(eslint-plugin-sort-keys-fix@1.1.2)(eslint-plugin-typescript-sort-keys@3.2.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5) + version: 3.0.3(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.2))(eslint@8.57.0)(typescript@5.5.2))(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.2))(eslint-plugin-jest@27.9.0(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.2))(eslint@8.57.0)(typescript@5.5.2))(eslint@8.57.0)(typescript@5.5.2))(eslint-plugin-react-hooks@4.6.2(eslint@8.57.0))(eslint-plugin-simple-import-sort@10.0.0(eslint@8.57.0))(eslint-plugin-sort-keys-fix@1.1.2)(eslint-plugin-typescript-sort-keys@3.2.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.2))(eslint@8.57.0)(typescript@5.5.2))(eslint@8.57.0)(typescript@5.5.2) '@solana/web3.js': specifier: 2.0.0-preview.3 version: 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22)(ws@8.17.0) @@ -22,10 +22,10 @@ importers: version: 2.0.0-preview.3 '@typescript-eslint/eslint-plugin': specifier: ^6.21.0 - version: 6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5) + version: 6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.2))(eslint@8.57.0)(typescript@5.5.2) '@typescript-eslint/parser': specifier: ^6.21.0 - version: 6.21.0(eslint@8.57.0)(typescript@5.4.5) + version: 6.21.0(eslint@8.57.0)(typescript@5.5.2) ava: specifier: ^6.1.3 version: 6.1.3(@ava/typescript@5.0.0) @@ -33,23 +33,23 @@ importers: specifier: ^8.57.0 version: 8.57.0 prettier: - specifier: ^3.2.5 - version: 3.2.5 + specifier: ^3.3.2 + version: 3.3.2 rimraf: specifier: ^5.0.7 version: 5.0.7 tsup: - specifier: ^8.0.2 - version: 8.0.2(typescript@5.4.5) + specifier: ^8.1.0 + version: 8.1.0(typescript@5.5.2) typedoc: specifier: ^0.25.13 - version: 0.25.13(typescript@5.4.5) + version: 0.25.13(typescript@5.5.2) typedoc-plugin-missing-exports: - specifier: ^2.2.0 - version: 2.2.0(typedoc@0.25.13(typescript@5.4.5)) + specifier: ^2.3.0 + version: 2.3.0(typedoc@0.25.13(typescript@5.5.2)) typescript: - specifier: ^5.4.5 - version: 5.4.5 + specifier: ^5.5.2 + version: 5.5.2 packages: @@ -57,140 +57,140 @@ packages: resolution: {integrity: sha512-2twsQz2fUd95QK1MtKuEnjkiN47SKHZfi/vWj040EN6Eo2ZW3SNcAwncJqXXoMTYZTWtBRXYp3Fg8z+JkFI9aQ==} engines: {node: ^18.18 || ^20.8 || ^21 || ^22} - '@esbuild/aix-ppc64@0.19.12': - resolution: {integrity: sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==} + '@esbuild/aix-ppc64@0.21.5': + resolution: {integrity: sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==} engines: {node: '>=12'} cpu: [ppc64] os: [aix] - '@esbuild/android-arm64@0.19.12': - resolution: {integrity: sha512-P0UVNGIienjZv3f5zq0DP3Nt2IE/3plFzuaS96vihvD0Hd6H/q4WXUGpCxD/E8YrSXfNyRPbpTq+T8ZQioSuPA==} + '@esbuild/android-arm64@0.21.5': + resolution: {integrity: sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==} engines: {node: '>=12'} cpu: [arm64] os: [android] - '@esbuild/android-arm@0.19.12': - resolution: {integrity: sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w==} + '@esbuild/android-arm@0.21.5': + resolution: {integrity: sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==} engines: {node: '>=12'} cpu: [arm] os: [android] - '@esbuild/android-x64@0.19.12': - resolution: {integrity: sha512-3k7ZoUW6Q6YqhdhIaq/WZ7HwBpnFBlW905Fa4s4qWJyiNOgT1dOqDiVAQFwBH7gBRZr17gLrlFCRzF6jFh7Kew==} + '@esbuild/android-x64@0.21.5': + resolution: {integrity: sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==} engines: {node: '>=12'} cpu: [x64] os: [android] - '@esbuild/darwin-arm64@0.19.12': - resolution: {integrity: sha512-B6IeSgZgtEzGC42jsI+YYu9Z3HKRxp8ZT3cqhvliEHovq8HSX2YX8lNocDn79gCKJXOSaEot9MVYky7AKjCs8g==} + '@esbuild/darwin-arm64@0.21.5': + resolution: {integrity: sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==} engines: {node: '>=12'} cpu: [arm64] os: [darwin] - '@esbuild/darwin-x64@0.19.12': - resolution: {integrity: sha512-hKoVkKzFiToTgn+41qGhsUJXFlIjxI/jSYeZf3ugemDYZldIXIxhvwN6erJGlX4t5h417iFuheZ7l+YVn05N3A==} + '@esbuild/darwin-x64@0.21.5': + resolution: {integrity: sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==} engines: {node: '>=12'} cpu: [x64] os: [darwin] - '@esbuild/freebsd-arm64@0.19.12': - resolution: {integrity: sha512-4aRvFIXmwAcDBw9AueDQ2YnGmz5L6obe5kmPT8Vd+/+x/JMVKCgdcRwH6APrbpNXsPz+K653Qg8HB/oXvXVukA==} + '@esbuild/freebsd-arm64@0.21.5': + resolution: {integrity: sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==} engines: {node: '>=12'} cpu: [arm64] os: [freebsd] - '@esbuild/freebsd-x64@0.19.12': - resolution: {integrity: sha512-EYoXZ4d8xtBoVN7CEwWY2IN4ho76xjYXqSXMNccFSx2lgqOG/1TBPW0yPx1bJZk94qu3tX0fycJeeQsKovA8gg==} + '@esbuild/freebsd-x64@0.21.5': + resolution: {integrity: sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==} engines: {node: '>=12'} cpu: [x64] os: [freebsd] - '@esbuild/linux-arm64@0.19.12': - resolution: {integrity: sha512-EoTjyYyLuVPfdPLsGVVVC8a0p1BFFvtpQDB/YLEhaXyf/5bczaGeN15QkR+O4S5LeJ92Tqotve7i1jn35qwvdA==} + '@esbuild/linux-arm64@0.21.5': + resolution: {integrity: sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==} engines: {node: '>=12'} cpu: [arm64] os: [linux] - '@esbuild/linux-arm@0.19.12': - resolution: {integrity: sha512-J5jPms//KhSNv+LO1S1TX1UWp1ucM6N6XuL6ITdKWElCu8wXP72l9MM0zDTzzeikVyqFE6U8YAV9/tFyj0ti+w==} + '@esbuild/linux-arm@0.21.5': + resolution: {integrity: sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==} engines: {node: '>=12'} cpu: [arm] os: [linux] - '@esbuild/linux-ia32@0.19.12': - resolution: {integrity: sha512-Thsa42rrP1+UIGaWz47uydHSBOgTUnwBwNq59khgIwktK6x60Hivfbux9iNR0eHCHzOLjLMLfUMLCypBkZXMHA==} + '@esbuild/linux-ia32@0.21.5': + resolution: {integrity: sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==} engines: {node: '>=12'} cpu: [ia32] os: [linux] - '@esbuild/linux-loong64@0.19.12': - resolution: {integrity: sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA==} + '@esbuild/linux-loong64@0.21.5': + resolution: {integrity: sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==} engines: {node: '>=12'} cpu: [loong64] os: [linux] - '@esbuild/linux-mips64el@0.19.12': - resolution: {integrity: sha512-fEnAuj5VGTanfJ07ff0gOA6IPsvrVHLVb6Lyd1g2/ed67oU1eFzL0r9WL7ZzscD+/N6i3dWumGE1Un4f7Amf+w==} + '@esbuild/linux-mips64el@0.21.5': + resolution: {integrity: sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==} engines: {node: '>=12'} cpu: [mips64el] os: [linux] - '@esbuild/linux-ppc64@0.19.12': - resolution: {integrity: sha512-nYJA2/QPimDQOh1rKWedNOe3Gfc8PabU7HT3iXWtNUbRzXS9+vgB0Fjaqr//XNbd82mCxHzik2qotuI89cfixg==} + '@esbuild/linux-ppc64@0.21.5': + resolution: {integrity: sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==} engines: {node: '>=12'} cpu: [ppc64] os: [linux] - '@esbuild/linux-riscv64@0.19.12': - resolution: {integrity: sha512-2MueBrlPQCw5dVJJpQdUYgeqIzDQgw3QtiAHUC4RBz9FXPrskyyU3VI1hw7C0BSKB9OduwSJ79FTCqtGMWqJHg==} + '@esbuild/linux-riscv64@0.21.5': + resolution: {integrity: sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==} engines: {node: '>=12'} cpu: [riscv64] os: [linux] - '@esbuild/linux-s390x@0.19.12': - resolution: {integrity: sha512-+Pil1Nv3Umes4m3AZKqA2anfhJiVmNCYkPchwFJNEJN5QxmTs1uzyy4TvmDrCRNT2ApwSari7ZIgrPeUx4UZDg==} + '@esbuild/linux-s390x@0.21.5': + resolution: {integrity: sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==} engines: {node: '>=12'} cpu: [s390x] os: [linux] - '@esbuild/linux-x64@0.19.12': - resolution: {integrity: sha512-B71g1QpxfwBvNrfyJdVDexenDIt1CiDN1TIXLbhOw0KhJzE78KIFGX6OJ9MrtC0oOqMWf+0xop4qEU8JrJTwCg==} + '@esbuild/linux-x64@0.21.5': + resolution: {integrity: sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==} engines: {node: '>=12'} cpu: [x64] os: [linux] - '@esbuild/netbsd-x64@0.19.12': - resolution: {integrity: sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA==} + '@esbuild/netbsd-x64@0.21.5': + resolution: {integrity: sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==} engines: {node: '>=12'} cpu: [x64] os: [netbsd] - '@esbuild/openbsd-x64@0.19.12': - resolution: {integrity: sha512-RbrfTB9SWsr0kWmb9srfF+L933uMDdu9BIzdA7os2t0TXhCRjrQyCeOt6wVxr79CKD4c+p+YhCj31HBkYcXebw==} + '@esbuild/openbsd-x64@0.21.5': + resolution: {integrity: sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==} engines: {node: '>=12'} cpu: [x64] os: [openbsd] - '@esbuild/sunos-x64@0.19.12': - resolution: {integrity: sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA==} + '@esbuild/sunos-x64@0.21.5': + resolution: {integrity: sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==} engines: {node: '>=12'} cpu: [x64] os: [sunos] - '@esbuild/win32-arm64@0.19.12': - resolution: {integrity: sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A==} + '@esbuild/win32-arm64@0.21.5': + resolution: {integrity: sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==} engines: {node: '>=12'} cpu: [arm64] os: [win32] - '@esbuild/win32-ia32@0.19.12': - resolution: {integrity: sha512-+ZOE6pUkMOJfmxmBZElNOx72NKpIa/HFOMGzu8fqzQJ5kgf6aTGrcJaFsNiVMH4JKpMipyK+7k0n2UXN7a8YKQ==} + '@esbuild/win32-ia32@0.21.5': + resolution: {integrity: sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==} engines: {node: '>=12'} cpu: [ia32] os: [win32] - '@esbuild/win32-x64@0.19.12': - resolution: {integrity: sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA==} + '@esbuild/win32-x64@0.21.5': + resolution: {integrity: sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==} engines: {node: '>=12'} cpu: [x64] os: [win32] @@ -201,8 +201,8 @@ packages: peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - '@eslint-community/regexpp@4.10.0': - resolution: {integrity: sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==} + '@eslint-community/regexpp@4.10.1': + resolution: {integrity: sha512-Zm2NGpWELsQAD1xsJzGQpYfvICSsFkEpU0jxBjfdC6uNEWXcHnfs9hScFWtXVDVl+rBQJGrl4g1vcKIejpH9dA==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} '@eslint/eslintrc@2.1.4': @@ -216,6 +216,7 @@ packages: '@humanwhocodes/config-array@0.11.14': resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} engines: {node: '>=10.10.0'} + deprecated: Use @eslint/config-array instead '@humanwhocodes/module-importer@1.0.1': resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} @@ -223,6 +224,7 @@ packages: '@humanwhocodes/object-schema@2.0.3': resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} + deprecated: Use @eslint/object-schema instead '@isaacs/cliui@8.0.2': resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} @@ -273,83 +275,83 @@ packages: resolution: {integrity: sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==} engines: {node: '>= 8.0.0'} - '@rollup/rollup-android-arm-eabi@4.17.2': - resolution: {integrity: sha512-NM0jFxY8bB8QLkoKxIQeObCaDlJKewVlIEkuyYKm5An1tdVZ966w2+MPQ2l8LBZLjR+SgyV+nRkTIunzOYBMLQ==} + '@rollup/rollup-android-arm-eabi@4.18.0': + resolution: {integrity: sha512-Tya6xypR10giZV1XzxmH5wr25VcZSncG0pZIjfePT0OVBvqNEurzValetGNarVrGiq66EBVAFn15iYX4w6FKgQ==} cpu: [arm] os: [android] - '@rollup/rollup-android-arm64@4.17.2': - resolution: {integrity: sha512-yeX/Usk7daNIVwkq2uGoq2BYJKZY1JfyLTaHO/jaiSwi/lsf8fTFoQW/n6IdAsx5tx+iotu2zCJwz8MxI6D/Bw==} + '@rollup/rollup-android-arm64@4.18.0': + resolution: {integrity: sha512-avCea0RAP03lTsDhEyfy+hpfr85KfyTctMADqHVhLAF3MlIkq83CP8UfAHUssgXTYd+6er6PaAhx/QGv4L1EiA==} cpu: [arm64] os: [android] - '@rollup/rollup-darwin-arm64@4.17.2': - resolution: {integrity: sha512-kcMLpE6uCwls023+kknm71ug7MZOrtXo+y5p/tsg6jltpDtgQY1Eq5sGfHcQfb+lfuKwhBmEURDga9N0ol4YPw==} + '@rollup/rollup-darwin-arm64@4.18.0': + resolution: {integrity: sha512-IWfdwU7KDSm07Ty0PuA/W2JYoZ4iTj3TUQjkVsO/6U+4I1jN5lcR71ZEvRh52sDOERdnNhhHU57UITXz5jC1/w==} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-x64@4.17.2': - resolution: {integrity: sha512-AtKwD0VEx0zWkL0ZjixEkp5tbNLzX+FCqGG1SvOu993HnSz4qDI6S4kGzubrEJAljpVkhRSlg5bzpV//E6ysTQ==} + '@rollup/rollup-darwin-x64@4.18.0': + resolution: {integrity: sha512-n2LMsUz7Ynu7DoQrSQkBf8iNrjOGyPLrdSg802vk6XT3FtsgX6JbE8IHRvposskFm9SNxzkLYGSq9QdpLYpRNA==} cpu: [x64] os: [darwin] - '@rollup/rollup-linux-arm-gnueabihf@4.17.2': - resolution: {integrity: sha512-3reX2fUHqN7sffBNqmEyMQVj/CKhIHZd4y631duy0hZqI8Qoqf6lTtmAKvJFYa6bhU95B1D0WgzHkmTg33In0A==} + '@rollup/rollup-linux-arm-gnueabihf@4.18.0': + resolution: {integrity: sha512-C/zbRYRXFjWvz9Z4haRxcTdnkPt1BtCkz+7RtBSuNmKzMzp3ZxdM28Mpccn6pt28/UWUCTXa+b0Mx1k3g6NOMA==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm-musleabihf@4.17.2': - resolution: {integrity: sha512-uSqpsp91mheRgw96xtyAGP9FW5ChctTFEoXP0r5FAzj/3ZRv3Uxjtc7taRQSaQM/q85KEKjKsZuiZM3GyUivRg==} + '@rollup/rollup-linux-arm-musleabihf@4.18.0': + resolution: {integrity: sha512-l3m9ewPgjQSXrUMHg93vt0hYCGnrMOcUpTz6FLtbwljo2HluS4zTXFy2571YQbisTnfTKPZ01u/ukJdQTLGh9A==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm64-gnu@4.17.2': - resolution: {integrity: sha512-EMMPHkiCRtE8Wdk3Qhtciq6BndLtstqZIroHiiGzB3C5LDJmIZcSzVtLRbwuXuUft1Cnv+9fxuDtDxz3k3EW2A==} + '@rollup/rollup-linux-arm64-gnu@4.18.0': + resolution: {integrity: sha512-rJ5D47d8WD7J+7STKdCUAgmQk49xuFrRi9pZkWoRD1UeSMakbcepWXPF8ycChBoAqs1pb2wzvbY6Q33WmN2ftw==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-arm64-musl@4.17.2': - resolution: {integrity: sha512-NMPylUUZ1i0z/xJUIx6VUhISZDRT+uTWpBcjdv0/zkp7b/bQDF+NfnfdzuTiB1G6HTodgoFa93hp0O1xl+/UbA==} + '@rollup/rollup-linux-arm64-musl@4.18.0': + resolution: {integrity: sha512-be6Yx37b24ZwxQ+wOQXXLZqpq4jTckJhtGlWGZs68TgdKXJgw54lUUoFYrg6Zs/kjzAQwEwYbp8JxZVzZLRepQ==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-powerpc64le-gnu@4.17.2': - resolution: {integrity: sha512-T19My13y8uYXPw/L/k0JYaX1fJKFT/PWdXiHr8mTbXWxjVF1t+8Xl31DgBBvEKclw+1b00Chg0hxE2O7bTG7GQ==} + '@rollup/rollup-linux-powerpc64le-gnu@4.18.0': + resolution: {integrity: sha512-hNVMQK+qrA9Todu9+wqrXOHxFiD5YmdEi3paj6vP02Kx1hjd2LLYR2eaN7DsEshg09+9uzWi2W18MJDlG0cxJA==} cpu: [ppc64] os: [linux] - '@rollup/rollup-linux-riscv64-gnu@4.17.2': - resolution: {integrity: sha512-BOaNfthf3X3fOWAB+IJ9kxTgPmMqPPH5f5k2DcCsRrBIbWnaJCgX2ll77dV1TdSy9SaXTR5iDXRL8n7AnoP5cg==} + '@rollup/rollup-linux-riscv64-gnu@4.18.0': + resolution: {integrity: sha512-ROCM7i+m1NfdrsmvwSzoxp9HFtmKGHEqu5NNDiZWQtXLA8S5HBCkVvKAxJ8U+CVctHwV2Gb5VUaK7UAkzhDjlg==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-s390x-gnu@4.17.2': - resolution: {integrity: sha512-W0UP/x7bnn3xN2eYMql2T/+wpASLE5SjObXILTMPUBDB/Fg/FxC+gX4nvCfPBCbNhz51C+HcqQp2qQ4u25ok6g==} + '@rollup/rollup-linux-s390x-gnu@4.18.0': + resolution: {integrity: sha512-0UyyRHyDN42QL+NbqevXIIUnKA47A+45WyasO+y2bGJ1mhQrfrtXUpTxCOrfxCR4esV3/RLYyucGVPiUsO8xjg==} cpu: [s390x] os: [linux] - '@rollup/rollup-linux-x64-gnu@4.17.2': - resolution: {integrity: sha512-Hy7pLwByUOuyaFC6mAr7m+oMC+V7qyifzs/nW2OJfC8H4hbCzOX07Ov0VFk/zP3kBsELWNFi7rJtgbKYsav9QQ==} + '@rollup/rollup-linux-x64-gnu@4.18.0': + resolution: {integrity: sha512-xuglR2rBVHA5UsI8h8UbX4VJ470PtGCf5Vpswh7p2ukaqBGFTnsfzxUBetoWBWymHMxbIG0Cmx7Y9qDZzr648w==} cpu: [x64] os: [linux] - '@rollup/rollup-linux-x64-musl@4.17.2': - resolution: {integrity: sha512-h1+yTWeYbRdAyJ/jMiVw0l6fOOm/0D1vNLui9iPuqgRGnXA0u21gAqOyB5iHjlM9MMfNOm9RHCQ7zLIzT0x11Q==} + '@rollup/rollup-linux-x64-musl@4.18.0': + resolution: {integrity: sha512-LKaqQL9osY/ir2geuLVvRRs+utWUNilzdE90TpyoX0eNqPzWjRm14oMEE+YLve4k/NAqCdPkGYDaDF5Sw+xBfg==} cpu: [x64] os: [linux] - '@rollup/rollup-win32-arm64-msvc@4.17.2': - resolution: {integrity: sha512-tmdtXMfKAjy5+IQsVtDiCfqbynAQE/TQRpWdVataHmhMb9DCoJxp9vLcCBjEQWMiUYxO1QprH/HbY9ragCEFLA==} + '@rollup/rollup-win32-arm64-msvc@4.18.0': + resolution: {integrity: sha512-7J6TkZQFGo9qBKH0pk2cEVSRhJbL6MtfWxth7Y5YmZs57Pi+4x6c2dStAUvaQkHQLnEQv1jzBUW43GvZW8OFqA==} cpu: [arm64] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.17.2': - resolution: {integrity: sha512-7II/QCSTAHuE5vdZaQEwJq2ZACkBpQDOmQsE6D6XUbnBHW8IAhm4eTufL6msLJorzrHDFv3CF8oCA/hSIRuZeQ==} + '@rollup/rollup-win32-ia32-msvc@4.18.0': + resolution: {integrity: sha512-Txjh+IxBPbkUB9+SXZMpv+b/vnTEtFyfWZgJ6iyCmt2tdx0OF5WhFowLmnh8ENGNpfUlUZkdI//4IEmhwPieNg==} cpu: [ia32] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.17.2': - resolution: {integrity: sha512-TGGO7v7qOq4CYmSBVEYpI1Y5xDuCEnbVC5Vth8mOsW0gDSzxNrVERPc790IGHsrT2dQSimgMr9Ub3Y1Jci5/8w==} + '@rollup/rollup-win32-x64-msvc@4.18.0': + resolution: {integrity: sha512-UOo5FdvOL0+eIVTgS4tIdbW+TtnBLWg1YBCcU2KWM7nuNwRz9bksDX1bekJJCpu25N1DVWaCwnT39dVQxzqS8g==} cpu: [x64] os: [win32] @@ -595,8 +597,8 @@ packages: peerDependencies: acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 - acorn-walk@8.3.2: - resolution: {integrity: sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==} + acorn-walk@8.3.3: + resolution: {integrity: sha512-MxXdReSRhGO7VlFe1bRG/oI7/mdLV9B9JJT0N8vZOhF7gFRR5l3M8W9G8JxmKV+JC5mGqJ0QvqfSOLsCPa4nUw==} engines: {node: '>=0.4.0'} acorn@7.4.1: @@ -604,8 +606,8 @@ packages: engines: {node: '>=0.4.0'} hasBin: true - acorn@8.11.3: - resolution: {integrity: sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==} + acorn@8.12.0: + resolution: {integrity: sha512-RTvkC4w+KNXrM39/lWCUaG0IbRkWdCv7W/IOW9oU6SawyxulvkQy5HQPVTKxEjczcUvapcrw3cFx/60VN/NRNw==} engines: {node: '>=0.4.0'} hasBin: true @@ -704,12 +706,12 @@ packages: brace-expansion@2.0.1: resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} - braces@3.0.2: - resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} + braces@3.0.3: + resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} engines: {node: '>=8'} - bundle-require@4.1.0: - resolution: {integrity: sha512-FeArRFM+ziGkRViKRnSTbHZc35dgmR9yNog05Kn0+ItI59pOAISGvnnIwW1WgFZQW59IxD9QpJnUPkdIPfZuXg==} + bundle-require@4.2.1: + resolution: {integrity: sha512-7Q/6vkyYAwOmQNRw75x+4yRtZCZJXUDmHHlFdkiV0wgv/reNjtJwpu1jPJ0w2kbEpIM0uoKI3S4/f39dU7AjSA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} peerDependencies: esbuild: '>=0.17' @@ -816,8 +818,8 @@ packages: resolution: {integrity: sha512-uqCUKXE5q1PNBXjPqvwhwJf9SwMoAHBgWJ6DcrnS5o+W2JOiIILl0JEdVD8SGujrNS02GGxgwAg2PN2zONgtjg==} engines: {node: '>=6'} - debug@4.3.4: - resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} + debug@4.3.5: + resolution: {integrity: sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==} engines: {node: '>=6.0'} peerDependencies: supports-color: '*' @@ -859,8 +861,8 @@ packages: emoji-regex@9.2.2: resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} - esbuild@0.19.12: - resolution: {integrity: sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==} + esbuild@0.21.5: + resolution: {integrity: sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==} engines: {node: '>=12'} hasBin: true @@ -1014,8 +1016,8 @@ packages: file-uri-to-path@1.0.0: resolution: {integrity: sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==} - fill-range@7.0.1: - resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} + fill-range@7.1.1: + resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} engines: {node: '>=8'} find-up-simple@1.0.0: @@ -1033,8 +1035,8 @@ packages: flatted@3.3.1: resolution: {integrity: sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==} - foreground-child@3.1.1: - resolution: {integrity: sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==} + foreground-child@3.2.1: + resolution: {integrity: sha512-PXUUyLqrR2XCWICfv6ukppP96sdFwWbNEnfEMt7jNsISjMsvaLNinAHNDYyvkyU+SZG2BTSbT5NjG+vZslfGTA==} engines: {node: '>=14'} fs-minipass@2.1.0: @@ -1078,8 +1080,8 @@ packages: resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} engines: {node: '>=10.13.0'} - glob@10.3.15: - resolution: {integrity: sha512-0c6RlJt1TICLyvJYIApxb8GsXoai0KUP7AxKKAtsYXdgJR1mGEUa7DgwShbdk1nly0PYoZj01xd4hzbq3fsjpw==} + glob@10.4.2: + resolution: {integrity: sha512-GwMlUF6PkPo3Gk21UxkCohOv0PLcIXVtKyLlpEI28R/cO/4eNOdmLk3CMW1wROV/WR/EsZOWAfBbBOqYvs88/w==} engines: {node: '>=16 || 14 >=14.18'} hasBin: true @@ -1205,8 +1207,8 @@ packages: isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} - jackspeak@2.3.6: - resolution: {integrity: sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==} + jackspeak@3.4.0: + resolution: {integrity: sha512-JVYhQnN59LVPFCEcVa2C3CrEKYacvjRfqIQl+h8oi91aLYQVWRYbxjPcv1bUiUy/kLmQaANrYfNMCO3kuEDHfw==} engines: {node: '>=14'} joycon@3.1.1: @@ -1237,8 +1239,8 @@ packages: json-stable-stringify-without-jsonify@1.0.1: resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} - jsonc-parser@3.2.1: - resolution: {integrity: sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA==} + jsonc-parser@3.3.1: + resolution: {integrity: sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==} keyv@4.5.4: resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} @@ -1247,8 +1249,8 @@ packages: resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} engines: {node: '>= 0.8.0'} - lilconfig@3.1.1: - resolution: {integrity: sha512-O18pf7nyvHTckunPWCV1XUNXU1piu01y2b7ATJ0ppkUkk8ocqVWBrYjJBCwHDjD/ZWcfyrA0P4gKhzWGi5EINQ==} + lilconfig@3.1.2: + resolution: {integrity: sha512-eop+wDAvpItUys0FWkHIKeC9ybYrTGbU41U5K7+bttZZeohvnY7M9dZ5kB21GNWiFT2q1OoPTvncPCgSOVO5ow==} engines: {node: '>=14'} lines-and-columns@1.2.4: @@ -1310,8 +1312,8 @@ packages: resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} engines: {node: '>= 8'} - micromatch@4.0.5: - resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} + micromatch@4.0.7: + resolution: {integrity: sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==} engines: {node: '>=8.6'} mimic-fn@2.1.0: @@ -1333,8 +1335,8 @@ packages: resolution: {integrity: sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==} engines: {node: '>=16 || 14 >=14.17'} - minimatch@9.0.4: - resolution: {integrity: sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==} + minimatch@9.0.5: + resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} engines: {node: '>=16 || 14 >=14.17'} minipass@3.3.6: @@ -1345,8 +1347,8 @@ packages: resolution: {integrity: sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==} engines: {node: '>=8'} - minipass@7.1.1: - resolution: {integrity: sha512-UZ7eQ+h8ywIRAW1hIEl2AqdwzJucU/Kp59+8kkZeSvafXhZjul247BvIJjEVFVeON6d7lM46XX1HXCduKAS8VA==} + minipass@7.1.2: + resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} engines: {node: '>=16 || 14 >=14.17'} minizlib@2.1.2: @@ -1446,6 +1448,9 @@ packages: resolution: {integrity: sha512-GYTTew2slBcYdvRHqjhwaaydVMvn/qrGC323+nKclYioNSLTDUM/lGgtGTgyHVtYcozb+XkE8CNhwcraOmZ9Mg==} engines: {node: '>=18'} + package-json-from-dist@1.0.0: + resolution: {integrity: sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==} + parent-module@1.0.1: resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} engines: {node: '>=6'} @@ -1514,8 +1519,8 @@ packages: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} - prettier@3.2.5: - resolution: {integrity: sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==} + prettier@3.3.2: + resolution: {integrity: sha512-rAVeHYMcv8ATV5d508CFdn+8/pHPpXeIid1DdrPwXnaAdH7cqjVbpJaT5eq4yRAFU/lsbwYwSF/n5iNrdJHPQA==} engines: {node: '>=14'} hasBin: true @@ -1572,8 +1577,8 @@ packages: engines: {node: '>=14.18'} hasBin: true - rollup@4.17.2: - resolution: {integrity: sha512-/9ClTJPByC0U4zNLowV1tMBe8yMEAxewtR3cUNX5BoEpGH3dQEWpJLr6CLp0fPdYRF/fzVOgvDb1zXuakwF5kQ==} + rollup@4.18.0: + resolution: {integrity: sha512-QmJz14PX3rzbJCN1SG4Xe/bAAX2a6NpCP8ab2vfu2GiUr8AQcr2nCV/oEO3yneFarB67zk8ShlIyWb2LGTb3Sg==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true @@ -1736,8 +1741,8 @@ packages: tslib@1.14.1: resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} - tsup@8.0.2: - resolution: {integrity: sha512-NY8xtQXdH7hDUAZwcQdY/Vzlw9johQsaqf7iwZ6g1DOUlFYQ5/AtVAjTvihhEyeRlGo4dLRVHtrRaL35M1daqQ==} + tsup@8.1.0: + resolution: {integrity: sha512-UFdfCAXukax+U6KzeTNO2kAARHcWxmKsnvSPXUcfA1D+kU05XDccCrkffCQpFaWDsZfV0jMyTsxU39VfCp6EOg==} engines: {node: '>=18'} hasBin: true peerDependencies: @@ -1773,8 +1778,8 @@ packages: resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} engines: {node: '>=10'} - typedoc-plugin-missing-exports@2.2.0: - resolution: {integrity: sha512-2+XR1IcyQ5UwXZVJe9NE6HrLmNufT9i5OwoIuuj79VxuA3eYq+Y6itS9rnNV1D7UeQnUSH8kISYD73gHE5zw+w==} + typedoc-plugin-missing-exports@2.3.0: + resolution: {integrity: sha512-iI9ITNNLlbsLCBBeYDyu0Qqp3GN/9AGyWNKg8bctRXuZEPT7G1L+0+MNWG9MsHcf/BFmNbXL0nQ8mC/tXRicog==} peerDependencies: typedoc: 0.24.x || 0.25.x @@ -1785,13 +1790,13 @@ packages: peerDependencies: typescript: 4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x - typescript@5.4.5: - resolution: {integrity: sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==} + typescript@5.5.2: + resolution: {integrity: sha512-NcRtPEOsPFFWjobJEtfihkLCZCXZt/os3zf8nTxjVH3RvTSxjrCamJpbExGvYOF+tFHc3pA65qpdwPbzjohhew==} engines: {node: '>=14.17'} hasBin: true - undici-types@6.18.0: - resolution: {integrity: sha512-w2f2PnG0PfXFkk+liTJUyfE+laxp1o7RFgDC+wQszkUqOwwAcUWp1vxa3YHV8bkx6cA/lhedJT4x9q+rv7Q3zw==} + undici-types@6.19.2: + resolution: {integrity: sha512-jvI+p8VJnrOIQ8AU4PyB1ytW68EyrLnI2xvCO3e5umm3nmhNjpugMD1wo+X994PyvUT9dWS/k3vO1wwRIh730Q==} unicorn-magic@0.1.0: resolution: {integrity: sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==} @@ -1871,8 +1876,8 @@ packages: yallist@4.0.0: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} - yaml@2.4.2: - resolution: {integrity: sha512-B3VqDZ+JAg1nZpaEmWtTXUlBneoGx6CPM9b0TENK6aoSu5t73dItudwdgmi6tHlIZZId4dZ9skcAQ2UbcyAeVA==} + yaml@2.4.5: + resolution: {integrity: sha512-aBx2bnqDzVOyNKfsysjA2ms5ZlnjSAW2eG3/L5G/CSujfjLJTJsEw1bGw8kCf04KodQWk1pxlGnZ56CRxiawmg==} engines: {node: '>= 14'} hasBin: true @@ -1895,73 +1900,73 @@ snapshots: escape-string-regexp: 5.0.0 execa: 8.0.1 - '@esbuild/aix-ppc64@0.19.12': + '@esbuild/aix-ppc64@0.21.5': optional: true - '@esbuild/android-arm64@0.19.12': + '@esbuild/android-arm64@0.21.5': optional: true - '@esbuild/android-arm@0.19.12': + '@esbuild/android-arm@0.21.5': optional: true - '@esbuild/android-x64@0.19.12': + '@esbuild/android-x64@0.21.5': optional: true - '@esbuild/darwin-arm64@0.19.12': + '@esbuild/darwin-arm64@0.21.5': optional: true - '@esbuild/darwin-x64@0.19.12': + '@esbuild/darwin-x64@0.21.5': optional: true - '@esbuild/freebsd-arm64@0.19.12': + '@esbuild/freebsd-arm64@0.21.5': optional: true - '@esbuild/freebsd-x64@0.19.12': + '@esbuild/freebsd-x64@0.21.5': optional: true - '@esbuild/linux-arm64@0.19.12': + '@esbuild/linux-arm64@0.21.5': optional: true - '@esbuild/linux-arm@0.19.12': + '@esbuild/linux-arm@0.21.5': optional: true - '@esbuild/linux-ia32@0.19.12': + '@esbuild/linux-ia32@0.21.5': optional: true - '@esbuild/linux-loong64@0.19.12': + '@esbuild/linux-loong64@0.21.5': optional: true - '@esbuild/linux-mips64el@0.19.12': + '@esbuild/linux-mips64el@0.21.5': optional: true - '@esbuild/linux-ppc64@0.19.12': + '@esbuild/linux-ppc64@0.21.5': optional: true - '@esbuild/linux-riscv64@0.19.12': + '@esbuild/linux-riscv64@0.21.5': optional: true - '@esbuild/linux-s390x@0.19.12': + '@esbuild/linux-s390x@0.21.5': optional: true - '@esbuild/linux-x64@0.19.12': + '@esbuild/linux-x64@0.21.5': optional: true - '@esbuild/netbsd-x64@0.19.12': + '@esbuild/netbsd-x64@0.21.5': optional: true - '@esbuild/openbsd-x64@0.19.12': + '@esbuild/openbsd-x64@0.21.5': optional: true - '@esbuild/sunos-x64@0.19.12': + '@esbuild/sunos-x64@0.21.5': optional: true - '@esbuild/win32-arm64@0.19.12': + '@esbuild/win32-arm64@0.21.5': optional: true - '@esbuild/win32-ia32@0.19.12': + '@esbuild/win32-ia32@0.21.5': optional: true - '@esbuild/win32-x64@0.19.12': + '@esbuild/win32-x64@0.21.5': optional: true '@eslint-community/eslint-utils@4.4.0(eslint@8.57.0)': @@ -1969,12 +1974,12 @@ snapshots: eslint: 8.57.0 eslint-visitor-keys: 3.4.3 - '@eslint-community/regexpp@4.10.0': {} + '@eslint-community/regexpp@4.10.1': {} '@eslint/eslintrc@2.1.4': dependencies: ajv: 6.12.6 - debug: 4.3.4 + debug: 4.3.5 espree: 9.6.1 globals: 13.24.0 ignore: 5.3.1 @@ -1990,7 +1995,7 @@ snapshots: '@humanwhocodes/config-array@0.11.14': dependencies: '@humanwhocodes/object-schema': 2.0.3 - debug: 4.3.4 + debug: 4.3.5 minimatch: 3.1.2 transitivePeerDependencies: - supports-color @@ -2062,52 +2067,52 @@ snapshots: estree-walker: 2.0.2 picomatch: 2.3.1 - '@rollup/rollup-android-arm-eabi@4.17.2': + '@rollup/rollup-android-arm-eabi@4.18.0': optional: true - '@rollup/rollup-android-arm64@4.17.2': + '@rollup/rollup-android-arm64@4.18.0': optional: true - '@rollup/rollup-darwin-arm64@4.17.2': + '@rollup/rollup-darwin-arm64@4.18.0': optional: true - '@rollup/rollup-darwin-x64@4.17.2': + '@rollup/rollup-darwin-x64@4.18.0': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.17.2': + '@rollup/rollup-linux-arm-gnueabihf@4.18.0': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.17.2': + '@rollup/rollup-linux-arm-musleabihf@4.18.0': optional: true - '@rollup/rollup-linux-arm64-gnu@4.17.2': + '@rollup/rollup-linux-arm64-gnu@4.18.0': optional: true - '@rollup/rollup-linux-arm64-musl@4.17.2': + '@rollup/rollup-linux-arm64-musl@4.18.0': optional: true - '@rollup/rollup-linux-powerpc64le-gnu@4.17.2': + '@rollup/rollup-linux-powerpc64le-gnu@4.18.0': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.17.2': + '@rollup/rollup-linux-riscv64-gnu@4.18.0': optional: true - '@rollup/rollup-linux-s390x-gnu@4.17.2': + '@rollup/rollup-linux-s390x-gnu@4.18.0': optional: true - '@rollup/rollup-linux-x64-gnu@4.17.2': + '@rollup/rollup-linux-x64-gnu@4.18.0': optional: true - '@rollup/rollup-linux-x64-musl@4.17.2': + '@rollup/rollup-linux-x64-musl@4.18.0': optional: true - '@rollup/rollup-win32-arm64-msvc@4.17.2': + '@rollup/rollup-win32-arm64-msvc@4.18.0': optional: true - '@rollup/rollup-win32-ia32-msvc@4.17.2': + '@rollup/rollup-win32-ia32-msvc@4.18.0': optional: true - '@rollup/rollup-win32-x64-msvc@4.17.2': + '@rollup/rollup-win32-x64-msvc@4.18.0': optional: true '@sindresorhus/merge-streams@2.3.0': {} @@ -2173,17 +2178,17 @@ snapshots: chalk: 5.3.0 commander: 12.1.0 - '@solana/eslint-config-solana@3.0.3(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5))(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint-plugin-jest@27.9.0(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5))(eslint-plugin-react-hooks@4.6.2(eslint@8.57.0))(eslint-plugin-simple-import-sort@10.0.0(eslint@8.57.0))(eslint-plugin-sort-keys-fix@1.1.2)(eslint-plugin-typescript-sort-keys@3.2.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5)': + '@solana/eslint-config-solana@3.0.3(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.2))(eslint@8.57.0)(typescript@5.5.2))(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.2))(eslint-plugin-jest@27.9.0(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.2))(eslint@8.57.0)(typescript@5.5.2))(eslint@8.57.0)(typescript@5.5.2))(eslint-plugin-react-hooks@4.6.2(eslint@8.57.0))(eslint-plugin-simple-import-sort@10.0.0(eslint@8.57.0))(eslint-plugin-sort-keys-fix@1.1.2)(eslint-plugin-typescript-sort-keys@3.2.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.2))(eslint@8.57.0)(typescript@5.5.2))(eslint@8.57.0)(typescript@5.5.2)': dependencies: - '@typescript-eslint/eslint-plugin': 6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/parser': 6.21.0(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/eslint-plugin': 6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.2))(eslint@8.57.0)(typescript@5.5.2) + '@typescript-eslint/parser': 6.21.0(eslint@8.57.0)(typescript@5.5.2) eslint: 8.57.0 - eslint-plugin-jest: 27.9.0(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5) + eslint-plugin-jest: 27.9.0(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.2))(eslint@8.57.0)(typescript@5.5.2))(eslint@8.57.0)(typescript@5.5.2) eslint-plugin-react-hooks: 4.6.2(eslint@8.57.0) eslint-plugin-simple-import-sort: 10.0.0(eslint@8.57.0) eslint-plugin-sort-keys-fix: 1.1.2 - eslint-plugin-typescript-sort-keys: 3.2.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5) - typescript: 5.4.5 + eslint-plugin-typescript-sort-keys: 3.2.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.2))(eslint@8.57.0)(typescript@5.5.2) + typescript: 5.5.2 '@solana/fast-stable-stringify@2.0.0-preview.3': {} @@ -2294,7 +2299,7 @@ snapshots: dependencies: '@solana/errors': 2.0.0-preview.3 '@solana/rpc-spec': 2.0.0-preview.3 - undici-types: 6.18.0 + undici-types: 6.19.2 '@solana/rpc-types@2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22)': dependencies: @@ -2406,44 +2411,44 @@ snapshots: '@types/semver@7.5.8': {} - '@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5)': + '@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.2))(eslint@8.57.0)(typescript@5.5.2)': dependencies: - '@eslint-community/regexpp': 4.10.0 - '@typescript-eslint/parser': 6.21.0(eslint@8.57.0)(typescript@5.4.5) + '@eslint-community/regexpp': 4.10.1 + '@typescript-eslint/parser': 6.21.0(eslint@8.57.0)(typescript@5.5.2) '@typescript-eslint/scope-manager': 6.21.0 - '@typescript-eslint/type-utils': 6.21.0(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/utils': 6.21.0(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/type-utils': 6.21.0(eslint@8.57.0)(typescript@5.5.2) + '@typescript-eslint/utils': 6.21.0(eslint@8.57.0)(typescript@5.5.2) '@typescript-eslint/visitor-keys': 6.21.0 - debug: 4.3.4 + debug: 4.3.5 eslint: 8.57.0 graphemer: 1.4.0 ignore: 5.3.1 natural-compare: 1.4.0 semver: 7.6.2 - ts-api-utils: 1.3.0(typescript@5.4.5) + ts-api-utils: 1.3.0(typescript@5.5.2) optionalDependencies: - typescript: 5.4.5 + typescript: 5.5.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/experimental-utils@5.62.0(eslint@8.57.0)(typescript@5.4.5)': + '@typescript-eslint/experimental-utils@5.62.0(eslint@8.57.0)(typescript@5.5.2)': dependencies: - '@typescript-eslint/utils': 5.62.0(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/utils': 5.62.0(eslint@8.57.0)(typescript@5.5.2) eslint: 8.57.0 transitivePeerDependencies: - supports-color - typescript - '@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5)': + '@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.2)': dependencies: '@typescript-eslint/scope-manager': 6.21.0 '@typescript-eslint/types': 6.21.0 - '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.4.5) + '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.5.2) '@typescript-eslint/visitor-keys': 6.21.0 - debug: 4.3.4 + debug: 4.3.5 eslint: 8.57.0 optionalDependencies: - typescript: 5.4.5 + typescript: 5.5.2 transitivePeerDependencies: - supports-color @@ -2457,15 +2462,15 @@ snapshots: '@typescript-eslint/types': 6.21.0 '@typescript-eslint/visitor-keys': 6.21.0 - '@typescript-eslint/type-utils@6.21.0(eslint@8.57.0)(typescript@5.4.5)': + '@typescript-eslint/type-utils@6.21.0(eslint@8.57.0)(typescript@5.5.2)': dependencies: - '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.4.5) - '@typescript-eslint/utils': 6.21.0(eslint@8.57.0)(typescript@5.4.5) - debug: 4.3.4 + '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.5.2) + '@typescript-eslint/utils': 6.21.0(eslint@8.57.0)(typescript@5.5.2) + debug: 4.3.5 eslint: 8.57.0 - ts-api-utils: 1.3.0(typescript@5.4.5) + ts-api-utils: 1.3.0(typescript@5.5.2) optionalDependencies: - typescript: 5.4.5 + typescript: 5.5.2 transitivePeerDependencies: - supports-color @@ -2473,43 +2478,43 @@ snapshots: '@typescript-eslint/types@6.21.0': {} - '@typescript-eslint/typescript-estree@5.62.0(typescript@5.4.5)': + '@typescript-eslint/typescript-estree@5.62.0(typescript@5.5.2)': dependencies: '@typescript-eslint/types': 5.62.0 '@typescript-eslint/visitor-keys': 5.62.0 - debug: 4.3.4 + debug: 4.3.5 globby: 11.1.0 is-glob: 4.0.3 semver: 7.6.2 - tsutils: 3.21.0(typescript@5.4.5) + tsutils: 3.21.0(typescript@5.5.2) optionalDependencies: - typescript: 5.4.5 + typescript: 5.5.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/typescript-estree@6.21.0(typescript@5.4.5)': + '@typescript-eslint/typescript-estree@6.21.0(typescript@5.5.2)': dependencies: '@typescript-eslint/types': 6.21.0 '@typescript-eslint/visitor-keys': 6.21.0 - debug: 4.3.4 + debug: 4.3.5 globby: 11.1.0 is-glob: 4.0.3 minimatch: 9.0.3 semver: 7.6.2 - ts-api-utils: 1.3.0(typescript@5.4.5) + ts-api-utils: 1.3.0(typescript@5.5.2) optionalDependencies: - typescript: 5.4.5 + typescript: 5.5.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@5.62.0(eslint@8.57.0)(typescript@5.4.5)': + '@typescript-eslint/utils@5.62.0(eslint@8.57.0)(typescript@5.5.2)': dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) '@types/json-schema': 7.0.15 '@types/semver': 7.5.8 '@typescript-eslint/scope-manager': 5.62.0 '@typescript-eslint/types': 5.62.0 - '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.4.5) + '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.5.2) eslint: 8.57.0 eslint-scope: 5.1.1 semver: 7.6.2 @@ -2517,14 +2522,14 @@ snapshots: - supports-color - typescript - '@typescript-eslint/utils@6.21.0(eslint@8.57.0)(typescript@5.4.5)': + '@typescript-eslint/utils@6.21.0(eslint@8.57.0)(typescript@5.5.2)': dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) '@types/json-schema': 7.0.15 '@types/semver': 7.5.8 '@typescript-eslint/scope-manager': 6.21.0 '@typescript-eslint/types': 6.21.0 - '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.4.5) + '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.5.2) eslint: 8.57.0 semver: 7.6.2 transitivePeerDependencies: @@ -2547,14 +2552,14 @@ snapshots: dependencies: '@mapbox/node-pre-gyp': 1.0.11 '@rollup/pluginutils': 4.2.1 - acorn: 8.11.3 - acorn-import-attributes: 1.9.5(acorn@8.11.3) + acorn: 8.12.0 + acorn-import-attributes: 1.9.5(acorn@8.12.0) async-sema: 3.1.1 bindings: 1.5.0 estree-walker: 2.0.2 glob: 7.2.3 graceful-fs: 4.2.11 - micromatch: 4.0.5 + micromatch: 4.0.7 node-gyp-build: 4.8.1 resolve-from: 5.0.0 transitivePeerDependencies: @@ -2563,27 +2568,29 @@ snapshots: abbrev@1.1.1: {} - acorn-import-attributes@1.9.5(acorn@8.11.3): + acorn-import-attributes@1.9.5(acorn@8.12.0): dependencies: - acorn: 8.11.3 + acorn: 8.12.0 acorn-jsx@5.3.2(acorn@7.4.1): dependencies: acorn: 7.4.1 - acorn-jsx@5.3.2(acorn@8.11.3): + acorn-jsx@5.3.2(acorn@8.12.0): dependencies: - acorn: 8.11.3 + acorn: 8.12.0 - acorn-walk@8.3.2: {} + acorn-walk@8.3.3: + dependencies: + acorn: 8.12.0 acorn@7.4.1: {} - acorn@8.11.3: {} + acorn@8.12.0: {} agent-base@6.0.2: dependencies: - debug: 4.3.4 + debug: 4.3.5 transitivePeerDependencies: - supports-color @@ -2639,8 +2646,8 @@ snapshots: ava@6.1.3(@ava/typescript@5.0.0): dependencies: '@vercel/nft': 0.26.5 - acorn: 8.11.3 - acorn-walk: 8.3.2 + acorn: 8.12.0 + acorn-walk: 8.3.3 ansi-styles: 6.2.1 arrgv: 1.0.2 arrify: 3.0.0 @@ -2655,7 +2662,7 @@ snapshots: common-path-prefix: 3.0.0 concordance: 5.0.4 currently-unhandled: 0.4.1 - debug: 4.3.4 + debug: 4.3.5 emittery: 1.0.3 figures: 6.1.0 globby: 14.0.1 @@ -2703,13 +2710,13 @@ snapshots: dependencies: balanced-match: 1.0.2 - braces@3.0.2: + braces@3.0.3: dependencies: - fill-range: 7.0.1 + fill-range: 7.1.1 - bundle-require@4.1.0(esbuild@0.19.12): + bundle-require@4.2.1(esbuild@0.21.5): dependencies: - esbuild: 0.19.12 + esbuild: 0.21.5 load-tsconfig: 0.2.5 cac@6.7.14: {} @@ -2732,7 +2739,7 @@ snapshots: chokidar@3.6.0: dependencies: anymatch: 3.1.3 - braces: 3.0.2 + braces: 3.0.3 glob-parent: 5.1.2 is-binary-path: 2.1.0 is-glob: 4.0.3 @@ -2809,7 +2816,7 @@ snapshots: dependencies: time-zone: 1.0.0 - debug@4.3.4: + debug@4.3.5: dependencies: ms: 2.1.2 @@ -2837,31 +2844,31 @@ snapshots: emoji-regex@9.2.2: {} - esbuild@0.19.12: + esbuild@0.21.5: optionalDependencies: - '@esbuild/aix-ppc64': 0.19.12 - '@esbuild/android-arm': 0.19.12 - '@esbuild/android-arm64': 0.19.12 - '@esbuild/android-x64': 0.19.12 - '@esbuild/darwin-arm64': 0.19.12 - '@esbuild/darwin-x64': 0.19.12 - '@esbuild/freebsd-arm64': 0.19.12 - '@esbuild/freebsd-x64': 0.19.12 - '@esbuild/linux-arm': 0.19.12 - '@esbuild/linux-arm64': 0.19.12 - '@esbuild/linux-ia32': 0.19.12 - '@esbuild/linux-loong64': 0.19.12 - '@esbuild/linux-mips64el': 0.19.12 - '@esbuild/linux-ppc64': 0.19.12 - '@esbuild/linux-riscv64': 0.19.12 - '@esbuild/linux-s390x': 0.19.12 - '@esbuild/linux-x64': 0.19.12 - '@esbuild/netbsd-x64': 0.19.12 - '@esbuild/openbsd-x64': 0.19.12 - '@esbuild/sunos-x64': 0.19.12 - '@esbuild/win32-arm64': 0.19.12 - '@esbuild/win32-ia32': 0.19.12 - '@esbuild/win32-x64': 0.19.12 + '@esbuild/aix-ppc64': 0.21.5 + '@esbuild/android-arm': 0.21.5 + '@esbuild/android-arm64': 0.21.5 + '@esbuild/android-x64': 0.21.5 + '@esbuild/darwin-arm64': 0.21.5 + '@esbuild/darwin-x64': 0.21.5 + '@esbuild/freebsd-arm64': 0.21.5 + '@esbuild/freebsd-x64': 0.21.5 + '@esbuild/linux-arm': 0.21.5 + '@esbuild/linux-arm64': 0.21.5 + '@esbuild/linux-ia32': 0.21.5 + '@esbuild/linux-loong64': 0.21.5 + '@esbuild/linux-mips64el': 0.21.5 + '@esbuild/linux-ppc64': 0.21.5 + '@esbuild/linux-riscv64': 0.21.5 + '@esbuild/linux-s390x': 0.21.5 + '@esbuild/linux-x64': 0.21.5 + '@esbuild/netbsd-x64': 0.21.5 + '@esbuild/openbsd-x64': 0.21.5 + '@esbuild/sunos-x64': 0.21.5 + '@esbuild/win32-arm64': 0.21.5 + '@esbuild/win32-ia32': 0.21.5 + '@esbuild/win32-x64': 0.21.5 escalade@3.1.2: {} @@ -2871,12 +2878,12 @@ snapshots: escape-string-regexp@5.0.0: {} - eslint-plugin-jest@27.9.0(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5): + eslint-plugin-jest@27.9.0(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.2))(eslint@8.57.0)(typescript@5.5.2))(eslint@8.57.0)(typescript@5.5.2): dependencies: - '@typescript-eslint/utils': 5.62.0(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/utils': 5.62.0(eslint@8.57.0)(typescript@5.5.2) eslint: 8.57.0 optionalDependencies: - '@typescript-eslint/eslint-plugin': 6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/eslint-plugin': 6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.2))(eslint@8.57.0)(typescript@5.5.2) transitivePeerDependencies: - supports-color - typescript @@ -2896,14 +2903,14 @@ snapshots: natural-compare: 1.4.0 requireindex: 1.2.0 - eslint-plugin-typescript-sort-keys@3.2.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5): + eslint-plugin-typescript-sort-keys@3.2.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.2))(eslint@8.57.0)(typescript@5.5.2): dependencies: - '@typescript-eslint/experimental-utils': 5.62.0(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/parser': 6.21.0(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/experimental-utils': 5.62.0(eslint@8.57.0)(typescript@5.5.2) + '@typescript-eslint/parser': 6.21.0(eslint@8.57.0)(typescript@5.5.2) eslint: 8.57.0 json-schema: 0.4.0 natural-compare-lite: 1.4.0 - typescript: 5.4.5 + typescript: 5.5.2 transitivePeerDependencies: - supports-color @@ -2924,7 +2931,7 @@ snapshots: eslint@8.57.0: dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) - '@eslint-community/regexpp': 4.10.0 + '@eslint-community/regexpp': 4.10.1 '@eslint/eslintrc': 2.1.4 '@eslint/js': 8.57.0 '@humanwhocodes/config-array': 0.11.14 @@ -2934,7 +2941,7 @@ snapshots: ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 - debug: 4.3.4 + debug: 4.3.5 doctrine: 3.0.0 escape-string-regexp: 4.0.0 eslint-scope: 7.2.2 @@ -2972,8 +2979,8 @@ snapshots: espree@9.6.1: dependencies: - acorn: 8.11.3 - acorn-jsx: 5.3.2(acorn@8.11.3) + acorn: 8.12.0 + acorn-jsx: 5.3.2(acorn@8.12.0) eslint-visitor-keys: 3.4.3 esprima@4.0.1: {} @@ -3028,7 +3035,7 @@ snapshots: '@nodelib/fs.walk': 1.2.8 glob-parent: 5.1.2 merge2: 1.4.1 - micromatch: 4.0.5 + micromatch: 4.0.7 fast-json-stable-stringify@2.1.0: {} @@ -3050,7 +3057,7 @@ snapshots: file-uri-to-path@1.0.0: {} - fill-range@7.0.1: + fill-range@7.1.1: dependencies: to-regex-range: 5.0.1 @@ -3069,7 +3076,7 @@ snapshots: flatted@3.3.1: {} - foreground-child@3.1.1: + foreground-child@3.2.1: dependencies: cross-spawn: 7.0.3 signal-exit: 4.1.0 @@ -3111,12 +3118,13 @@ snapshots: dependencies: is-glob: 4.0.3 - glob@10.3.15: + glob@10.4.2: dependencies: - foreground-child: 3.1.1 - jackspeak: 2.3.6 - minimatch: 9.0.4 - minipass: 7.1.1 + foreground-child: 3.2.1 + jackspeak: 3.4.0 + minimatch: 9.0.5 + minipass: 7.1.2 + package-json-from-dist: 1.0.0 path-scurry: 1.11.1 glob@7.2.3: @@ -3161,7 +3169,7 @@ snapshots: https-proxy-agent@5.0.1: dependencies: agent-base: 6.0.2 - debug: 4.3.4 + debug: 4.3.5 transitivePeerDependencies: - supports-color @@ -3221,7 +3229,7 @@ snapshots: isexe@2.0.0: {} - jackspeak@2.3.6: + jackspeak@3.4.0: dependencies: '@isaacs/cliui': 8.0.2 optionalDependencies: @@ -3248,7 +3256,7 @@ snapshots: json-stable-stringify-without-jsonify@1.0.1: {} - jsonc-parser@3.2.1: {} + jsonc-parser@3.3.1: {} keyv@4.5.4: dependencies: @@ -3259,7 +3267,7 @@ snapshots: prelude-ls: 1.2.1 type-check: 0.4.0 - lilconfig@3.1.1: {} + lilconfig@3.1.2: {} lines-and-columns@1.2.4: {} @@ -3303,9 +3311,9 @@ snapshots: merge2@1.4.1: {} - micromatch@4.0.5: + micromatch@4.0.7: dependencies: - braces: 3.0.2 + braces: 3.0.3 picomatch: 2.3.1 mimic-fn@2.1.0: {} @@ -3322,7 +3330,7 @@ snapshots: dependencies: brace-expansion: 2.0.1 - minimatch@9.0.4: + minimatch@9.0.5: dependencies: brace-expansion: 2.0.1 @@ -3332,7 +3340,7 @@ snapshots: minipass@5.0.0: {} - minipass@7.1.1: {} + minipass@7.1.2: {} minizlib@2.1.2: dependencies: @@ -3422,6 +3430,8 @@ snapshots: find-up-simple: 1.0.0 load-json-file: 7.0.1 + package-json-from-dist@1.0.0: {} + parent-module@1.0.1: dependencies: callsites: 3.1.0 @@ -3439,7 +3449,7 @@ snapshots: path-scurry@1.11.1: dependencies: lru-cache: 10.2.2 - minipass: 7.1.1 + minipass: 7.1.2 path-type@4.0.0: {} @@ -3457,12 +3467,12 @@ snapshots: postcss-load-config@4.0.2: dependencies: - lilconfig: 3.1.1 - yaml: 2.4.2 + lilconfig: 3.1.2 + yaml: 2.4.5 prelude-ls@1.2.1: {} - prettier@3.2.5: {} + prettier@3.3.2: {} pretty-ms@9.0.0: dependencies: @@ -3502,28 +3512,28 @@ snapshots: rimraf@5.0.7: dependencies: - glob: 10.3.15 + glob: 10.4.2 - rollup@4.17.2: + rollup@4.18.0: dependencies: '@types/estree': 1.0.5 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.17.2 - '@rollup/rollup-android-arm64': 4.17.2 - '@rollup/rollup-darwin-arm64': 4.17.2 - '@rollup/rollup-darwin-x64': 4.17.2 - '@rollup/rollup-linux-arm-gnueabihf': 4.17.2 - '@rollup/rollup-linux-arm-musleabihf': 4.17.2 - '@rollup/rollup-linux-arm64-gnu': 4.17.2 - '@rollup/rollup-linux-arm64-musl': 4.17.2 - '@rollup/rollup-linux-powerpc64le-gnu': 4.17.2 - '@rollup/rollup-linux-riscv64-gnu': 4.17.2 - '@rollup/rollup-linux-s390x-gnu': 4.17.2 - '@rollup/rollup-linux-x64-gnu': 4.17.2 - '@rollup/rollup-linux-x64-musl': 4.17.2 - '@rollup/rollup-win32-arm64-msvc': 4.17.2 - '@rollup/rollup-win32-ia32-msvc': 4.17.2 - '@rollup/rollup-win32-x64-msvc': 4.17.2 + '@rollup/rollup-android-arm-eabi': 4.18.0 + '@rollup/rollup-android-arm64': 4.18.0 + '@rollup/rollup-darwin-arm64': 4.18.0 + '@rollup/rollup-darwin-x64': 4.18.0 + '@rollup/rollup-linux-arm-gnueabihf': 4.18.0 + '@rollup/rollup-linux-arm-musleabihf': 4.18.0 + '@rollup/rollup-linux-arm64-gnu': 4.18.0 + '@rollup/rollup-linux-arm64-musl': 4.18.0 + '@rollup/rollup-linux-powerpc64le-gnu': 4.18.0 + '@rollup/rollup-linux-riscv64-gnu': 4.18.0 + '@rollup/rollup-linux-s390x-gnu': 4.18.0 + '@rollup/rollup-linux-x64-gnu': 4.18.0 + '@rollup/rollup-linux-x64-musl': 4.18.0 + '@rollup/rollup-win32-arm64-msvc': 4.18.0 + '@rollup/rollup-win32-ia32-msvc': 4.18.0 + '@rollup/rollup-win32-x64-msvc': 4.18.0 fsevents: 2.3.3 run-parallel@1.2.0: @@ -3551,7 +3561,7 @@ snapshots: shiki@0.14.7: dependencies: ansi-sequence-parser: 1.1.1 - jsonc-parser: 3.2.1 + jsonc-parser: 3.3.1 vscode-oniguruma: 1.7.0 vscode-textmate: 8.0.0 @@ -3618,7 +3628,7 @@ snapshots: dependencies: '@jridgewell/gen-mapping': 0.3.5 commander: 4.1.1 - glob: 10.3.15 + glob: 10.4.2 lines-and-columns: 1.2.4 mz: 2.7.0 pirates: 4.0.6 @@ -3670,40 +3680,40 @@ snapshots: tree-kill@1.2.2: {} - ts-api-utils@1.3.0(typescript@5.4.5): + ts-api-utils@1.3.0(typescript@5.5.2): dependencies: - typescript: 5.4.5 + typescript: 5.5.2 ts-interface-checker@0.1.13: {} tslib@1.14.1: {} - tsup@8.0.2(typescript@5.4.5): + tsup@8.1.0(typescript@5.5.2): dependencies: - bundle-require: 4.1.0(esbuild@0.19.12) + bundle-require: 4.2.1(esbuild@0.21.5) cac: 6.7.14 chokidar: 3.6.0 - debug: 4.3.4 - esbuild: 0.19.12 + debug: 4.3.5 + esbuild: 0.21.5 execa: 5.1.1 globby: 11.1.0 joycon: 3.1.1 postcss-load-config: 4.0.2 resolve-from: 5.0.0 - rollup: 4.17.2 + rollup: 4.18.0 source-map: 0.8.0-beta.0 sucrase: 3.35.0 tree-kill: 1.2.2 optionalDependencies: - typescript: 5.4.5 + typescript: 5.5.2 transitivePeerDependencies: - supports-color - ts-node - tsutils@3.21.0(typescript@5.4.5): + tsutils@3.21.0(typescript@5.5.2): dependencies: tslib: 1.14.1 - typescript: 5.4.5 + typescript: 5.5.2 type-check@0.4.0: dependencies: @@ -3713,21 +3723,21 @@ snapshots: type-fest@0.20.2: {} - typedoc-plugin-missing-exports@2.2.0(typedoc@0.25.13(typescript@5.4.5)): + typedoc-plugin-missing-exports@2.3.0(typedoc@0.25.13(typescript@5.5.2)): dependencies: - typedoc: 0.25.13(typescript@5.4.5) + typedoc: 0.25.13(typescript@5.5.2) - typedoc@0.25.13(typescript@5.4.5): + typedoc@0.25.13(typescript@5.5.2): dependencies: lunr: 2.3.9 marked: 4.3.0 - minimatch: 9.0.4 + minimatch: 9.0.5 shiki: 0.14.7 - typescript: 5.4.5 + typescript: 5.5.2 - typescript@5.4.5: {} + typescript@5.5.2: {} - undici-types@6.18.0: {} + undici-types@6.19.2: {} unicorn-magic@0.1.0: {} @@ -3793,7 +3803,7 @@ snapshots: yallist@4.0.0: {} - yaml@2.4.2: {} + yaml@2.4.5: {} yargs-parser@21.1.1: {} diff --git a/clients/js/src/generated/instructions/activateDevice.ts b/clients/js/src/generated/instructions/activateDevice.ts index d454655..bb66702 100644 --- a/clients/js/src/generated/instructions/activateDevice.ts +++ b/clients/js/src/generated/instructions/activateDevice.ts @@ -43,7 +43,9 @@ export type ActivateDeviceInstruction< TAccountSystemProgram extends | string | IAccountMeta = '11111111111111111111111111111111', - TAccountToken2022Program extends string | IAccountMeta = string, + TAccountToken2022Program extends + | string + | IAccountMeta = 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb', TAccountAtaProgram extends | string | IAccountMeta = 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL', @@ -154,7 +156,7 @@ export type ActivateDeviceInput< /** The system program */ systemProgram?: Address; /** The SPL Token 2022 program */ - token2022Program: Address; + token2022Program?: Address; /** The associated token program */ ataProgram?: Address; /** The account paying for the storage fees */ @@ -256,6 +258,10 @@ export function getActivateDeviceInstruction< accounts.systemProgram.value = '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>; } + if (!accounts.token2022Program.value) { + accounts.token2022Program.value = + 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>; + } if (!accounts.ataProgram.value) { accounts.ataProgram.value = 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>; diff --git a/clients/js/src/generated/instructions/createActivatedDevice.ts b/clients/js/src/generated/instructions/createActivatedDevice.ts index 8ca089a..54321f5 100644 --- a/clients/js/src/generated/instructions/createActivatedDevice.ts +++ b/clients/js/src/generated/instructions/createActivatedDevice.ts @@ -39,14 +39,20 @@ import { type WritableSignerAccount, } from '@solana/web3.js'; import { DEPHY_ID_PROGRAM_ADDRESS } from '../programs'; -import { getAccountMetaFactory, type ResolvedAccount } from '../shared'; +import { + expectSome, + getAccountMetaFactory, + type ResolvedAccount, +} from '../shared'; export type CreateActivatedDeviceInstruction< TProgram extends string = typeof DEPHY_ID_PROGRAM_ADDRESS, TAccountSystemProgram extends | string | IAccountMeta = '11111111111111111111111111111111', - TAccountToken2022Program extends string | IAccountMeta = string, + TAccountToken2022Program extends + | string + | IAccountMeta = 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb', TAccountAtaProgram extends | string | IAccountMeta = 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL', @@ -178,11 +184,11 @@ export type CreateActivatedDeviceInput< /** The system program */ systemProgram?: Address; /** The SPL Token 2022 program */ - token2022Program: Address; + token2022Program?: Address; /** The associated token program */ ataProgram?: Address; /** The account paying for the storage fees */ - payer: TransactionSigner; + payer?: TransactionSigner; /** The vendor */ vendor: Address; /** The mint account for the product */ @@ -281,10 +287,17 @@ export function getCreateActivatedDeviceInstruction< accounts.systemProgram.value = '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>; } + if (!accounts.token2022Program.value) { + accounts.token2022Program.value = + 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>; + } if (!accounts.ataProgram.value) { accounts.ataProgram.value = 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>; } + if (!accounts.payer.value) { + accounts.payer.value = expectSome(accounts.vendor.value); + } const getAccountMeta = getAccountMetaFactory(programAddress, 'programId'); const instruction = { diff --git a/clients/js/src/generated/instructions/createDevice.ts b/clients/js/src/generated/instructions/createDevice.ts index 63a9aaa..b08d3f7 100644 --- a/clients/js/src/generated/instructions/createDevice.ts +++ b/clients/js/src/generated/instructions/createDevice.ts @@ -39,7 +39,11 @@ import { type WritableSignerAccount, } from '@solana/web3.js'; import { DEPHY_ID_PROGRAM_ADDRESS } from '../programs'; -import { getAccountMetaFactory, type ResolvedAccount } from '../shared'; +import { + expectSome, + getAccountMetaFactory, + type ResolvedAccount, +} from '../shared'; import { getDeviceSigningAlgorithmDecoder, getDeviceSigningAlgorithmEncoder, @@ -184,7 +188,7 @@ export type CreateDeviceInput< /** The associated token program */ ataProgram?: Address; /** The account paying for the storage fees */ - payer: TransactionSigner; + payer?: TransactionSigner; /** The vendor */ vendor: TransactionSigner; /** The mint account of the product */ @@ -277,6 +281,9 @@ export function getCreateDeviceInstruction< accounts.ataProgram.value = 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>; } + if (!accounts.payer.value) { + accounts.payer.value = expectSome(accounts.vendor.value); + } const getAccountMeta = getAccountMetaFactory(programAddress, 'programId'); const instruction = { diff --git a/clients/js/src/generated/instructions/initialize.ts b/clients/js/src/generated/instructions/initialize.ts index c413a20..72e8533 100644 --- a/clients/js/src/generated/instructions/initialize.ts +++ b/clients/js/src/generated/instructions/initialize.ts @@ -29,7 +29,11 @@ import { type WritableSignerAccount, } from '@solana/web3.js'; import { DEPHY_ID_PROGRAM_ADDRESS } from '../programs'; -import { getAccountMetaFactory, type ResolvedAccount } from '../shared'; +import { + expectSome, + getAccountMetaFactory, + type ResolvedAccount, +} from '../shared'; export type InitializeInstruction< TProgram extends string = typeof DEPHY_ID_PROGRAM_ADDRESS, @@ -102,7 +106,7 @@ export type InitializeInput< /** The system program */ systemProgram?: Address; /** The account paying for the storage fees */ - payer: TransactionSigner; + payer?: TransactionSigner; /** The program data account for the program */ programData: Address; /** The authority account of the program */ @@ -152,6 +156,9 @@ export function getInitializeInstruction< accounts.systemProgram.value = '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>; } + if (!accounts.payer.value) { + accounts.payer.value = expectSome(accounts.authority.value); + } const getAccountMeta = getAccountMetaFactory(programAddress, 'programId'); const instruction = { diff --git a/clients/js/src/generated/pdas/deviceAToken.ts b/clients/js/src/generated/pdas/deviceAToken.ts new file mode 100644 index 0000000..f44cb28 --- /dev/null +++ b/clients/js/src/generated/pdas/deviceAToken.ts @@ -0,0 +1,40 @@ +/** + * This code was AUTOGENERATED using the kinobi library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun kinobi to update it. + * + * @see https://github.com/kinobi-so/kinobi + */ + +import { + address, + getAddressEncoder, + getProgramDerivedAddress, + type Address, + type ProgramDerivedAddress, +} from '@solana/web3.js'; + +export type DeviceATokenSeeds = { + ownerPubkey: Address; + + deviceMintPubkey: Address; +}; + +export async function findDeviceATokenPda( + seeds: DeviceATokenSeeds, + config: { programAddress?: Address | undefined } = {} +): Promise { + const { + programAddress = 'hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1' as Address<'hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1'>, + } = config; + return await getProgramDerivedAddress({ + programAddress, + seeds: [ + getAddressEncoder().encode(seeds.ownerPubkey), + getAddressEncoder().encode( + address('TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb') + ), + getAddressEncoder().encode(seeds.deviceMintPubkey), + ], + }); +} diff --git a/clients/js/src/generated/pdas/index.ts b/clients/js/src/generated/pdas/index.ts index 3855049..75b5e9a 100644 --- a/clients/js/src/generated/pdas/index.ts +++ b/clients/js/src/generated/pdas/index.ts @@ -6,6 +6,9 @@ * @see https://github.com/kinobi-so/kinobi */ +export * from './deviceAToken'; export * from './deviceMint'; +export * from './productAToken'; export * from './productMint'; +export * from './programData'; export * from './programDataAccount'; diff --git a/clients/js/src/generated/pdas/productAToken.ts b/clients/js/src/generated/pdas/productAToken.ts new file mode 100644 index 0000000..18e41ef --- /dev/null +++ b/clients/js/src/generated/pdas/productAToken.ts @@ -0,0 +1,40 @@ +/** + * This code was AUTOGENERATED using the kinobi library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun kinobi to update it. + * + * @see https://github.com/kinobi-so/kinobi + */ + +import { + address, + getAddressEncoder, + getProgramDerivedAddress, + type Address, + type ProgramDerivedAddress, +} from '@solana/web3.js'; + +export type ProductATokenSeeds = { + devicePubkey: Address; + + productMintPubkey: Address; +}; + +export async function findProductATokenPda( + seeds: ProductATokenSeeds, + config: { programAddress?: Address | undefined } = {} +): Promise { + const { + programAddress = 'hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1' as Address<'hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1'>, + } = config; + return await getProgramDerivedAddress({ + programAddress, + seeds: [ + getAddressEncoder().encode(seeds.devicePubkey), + getAddressEncoder().encode( + address('TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb') + ), + getAddressEncoder().encode(seeds.productMintPubkey), + ], + }); +} diff --git a/clients/js/src/generated/pdas/programData.ts b/clients/js/src/generated/pdas/programData.ts new file mode 100644 index 0000000..0ef6604 --- /dev/null +++ b/clients/js/src/generated/pdas/programData.ts @@ -0,0 +1,26 @@ +/** + * This code was AUTOGENERATED using the kinobi library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun kinobi to update it. + * + * @see https://github.com/kinobi-so/kinobi + */ + +import { + getProgramDerivedAddress, + getUtf8Encoder, + type Address, + type ProgramDerivedAddress, +} from '@solana/web3.js'; + +export async function findProgramDataPda( + config: { programAddress?: Address | undefined } = {} +): Promise { + const { + programAddress = 'hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1' as Address<'hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1'>, + } = config; + return await getProgramDerivedAddress({ + programAddress, + seeds: [getUtf8Encoder().encode('DePHY_ID')], + }); +} diff --git a/clients/rust/Cargo.toml b/clients/rust/Cargo.toml index c131b4f..2126ec9 100644 --- a/clients/rust/Cargo.toml +++ b/clients/rust/Cargo.toml @@ -18,6 +18,8 @@ serde = { workspace = true, optional = true, features = ["derive"] } serde_with = { workspace = true, optional = true } solana-program = { workspace = true } thiserror = { workspace = true } +spl-token-2022 = { workspace = true } +spl-associated-token-account = { workspace = true } [dev-dependencies] assert_matches = { workspace = true } diff --git a/clients/rust/src/generated/instructions/activate_device.rs b/clients/rust/src/generated/instructions/activate_device.rs index 1295986..3ec515a 100644 --- a/clients/rust/src/generated/instructions/activate_device.rs +++ b/clients/rust/src/generated/instructions/activate_device.rs @@ -133,7 +133,7 @@ pub struct ActivateDeviceInstructionArgs { /// ### Accounts: /// /// 0. `[optional]` system_program (default to `11111111111111111111111111111111`) -/// 1. `[]` token2022_program +/// 1. `[optional]` token2022_program (default to `TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb`) /// 2. `[optional]` ata_program (default to `ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL`) /// 3. `[writable, signer]` payer /// 4. `[]` vendor @@ -172,6 +172,7 @@ impl ActivateDeviceBuilder { self.system_program = Some(system_program); self } + /// `[optional account, default to 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb']` /// The SPL Token 2022 program #[inline(always)] pub fn token2022_program( @@ -276,9 +277,9 @@ impl ActivateDeviceBuilder { system_program: self .system_program .unwrap_or(solana_program::pubkey!("11111111111111111111111111111111")), - token2022_program: self - .token2022_program - .expect("token2022_program is not set"), + token2022_program: self.token2022_program.unwrap_or(solana_program::pubkey!( + "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb" + )), ata_program: self.ata_program.unwrap_or(solana_program::pubkey!( "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL" )), diff --git a/clients/rust/src/generated/instructions/create_activated_device.rs b/clients/rust/src/generated/instructions/create_activated_device.rs index f369e40..da43b43 100644 --- a/clients/rust/src/generated/instructions/create_activated_device.rs +++ b/clients/rust/src/generated/instructions/create_activated_device.rs @@ -133,7 +133,7 @@ pub struct CreateActivatedDeviceInstructionArgs { /// ### Accounts: /// /// 0. `[optional]` system_program (default to `11111111111111111111111111111111`) -/// 1. `[]` token2022_program +/// 1. `[optional]` token2022_program (default to `TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb`) /// 2. `[optional]` ata_program (default to `ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL`) /// 3. `[writable, signer]` payer /// 4. `[]` vendor @@ -173,6 +173,7 @@ impl CreateActivatedDeviceBuilder { self.system_program = Some(system_program); self } + /// `[optional account, default to 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb']` /// The SPL Token 2022 program #[inline(always)] pub fn token2022_program( @@ -282,9 +283,9 @@ impl CreateActivatedDeviceBuilder { system_program: self .system_program .unwrap_or(solana_program::pubkey!("11111111111111111111111111111111")), - token2022_program: self - .token2022_program - .expect("token2022_program is not set"), + token2022_program: self.token2022_program.unwrap_or(solana_program::pubkey!( + "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb" + )), ata_program: self.ata_program.unwrap_or(solana_program::pubkey!( "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL" )), diff --git a/clients/rust/src/utils.rs b/clients/rust/src/utils.rs index 0969bb3..7228592 100644 --- a/clients/rust/src/utils.rs +++ b/clients/rust/src/utils.rs @@ -31,3 +31,19 @@ pub fn find_product_mint( program_id, ) } + +pub fn get_product_atoken(product_mint: &Pubkey, device: &Pubkey) -> Pubkey { + spl_associated_token_account::get_associated_token_address_with_program_id( + &device, + &product_mint, + &spl_token_2022::id(), + ) +} + +pub fn get_device_atoken(user: &Pubkey, device_mint: &Pubkey) -> Pubkey { + spl_associated_token_account::get_associated_token_address_with_program_id( + &user, + &device_mint, + &spl_token_2022::id(), + ) +} diff --git a/program/tests/lib.rs b/program/tests/lib.rs index 6e9b088..cde7568 100644 --- a/program/tests/lib.rs +++ b/program/tests/lib.rs @@ -2,13 +2,8 @@ use dephy_id_program::{ instruction::{ - ActivateDeviceArgs, CreateDeviceArgs, CreateProductArgs, DeviceActivationSignature, - DeviceSigningAlgorithm, InitializeArgs, Instruction, - }, - state::ProgramDataAccount, - DEVICE_MESSAGE_PREFIX, EIP191_MESSAGE_PREFIX, - DEVICE_MINT_SEED_PREFIX, PRODUCT_MINT_SEED_PREFIX, - PROGRAM_PDA_SEED_PREFIX, + ActivateDeviceArgs, CreateActivatedDeviceArgs, CreateDeviceArgs, CreateProductArgs, DeviceActivationSignature, DeviceSigningAlgorithm, InitializeArgs, Instruction + }, state::ProgramDataAccount, DEVICE_MESSAGE_PREFIX, DEVICE_MINT_SEED_PREFIX, EIP191_MESSAGE_PREFIX, PRODUCT_MINT_SEED_PREFIX, PROGRAM_PDA_SEED_PREFIX }; use ed25519_dalek::ed25519::signature::SignerMut; use solana_program::pubkey::Pubkey; @@ -127,6 +122,18 @@ async fn test_smoke() { 2_000, ) .await; + + + let device3 = Keypair::new(); + + test_create_activated_device( + program_id, + &mut ctx, + &vendor, + product_name.as_ref(), + &device3, + &user1, + ).await; } async fn test_create_product( @@ -417,3 +424,102 @@ async fn test_activate_device( let device_ata_data = StateWithExtensions::::unpack(device_ata.data()).unwrap(); assert_eq!(device_ata_data.base.amount, 1, "Token amount is 1"); } + + +async fn test_create_activated_device( + program_id: Pubkey, + ctx: &mut ProgramTestContext, + vendor: &Keypair, + product_name: &[u8], + device: &Keypair, + owner: &Keypair, +) { + ctx.warp_forward_force_reward_interval_end().unwrap(); + + let (product_mint_pubkey, _) = Pubkey::find_program_address( + &[ + PRODUCT_MINT_SEED_PREFIX, + vendor.pubkey().as_ref(), + product_name, + ], + &program_id, + ); + + let device_pubkey = device.pubkey(); + + let (device_mint_pubkey, _device_mint_bump) = Pubkey::find_program_address( + &[ + DEVICE_MINT_SEED_PREFIX, + product_mint_pubkey.as_ref(), + device_pubkey.as_ref(), + ], + &program_id, + ); + + let product_ata_pubkey = + spl_associated_token_account::get_associated_token_address_with_program_id( + &device_pubkey, + &product_mint_pubkey, + &spl_token_2022::id(), + ); + + let device_ata_pubkey = + spl_associated_token_account::get_associated_token_address_with_program_id( + &owner.pubkey(), + &device_mint_pubkey, + &spl_token_2022::id(), + ); + + let create_activated_device_ix = SolanaInstruction::new_with_borsh( + program_id, + &Instruction::CreateActivatedDevice(CreateActivatedDeviceArgs { + name: "Test Device".to_string(), + uri: "https://example.com".to_string(), + additional_metadata: vec![], + }), + vec![ + // #[account(0, name="system_program", desc="The system program")] + AccountMeta::new(system_program::id(), false), + // #[account(1, name="token_2022_program", desc="The SPL Token 2022 program")] + AccountMeta::new(spl_token_2022::id(), false), + // #[account(2, name="ata_program", desc="The associated token program")] + AccountMeta::new(spl_associated_token_account::id(), false), + // #[account(3, writable, signer, name="payer", desc="The account paying for the storage fees")] + AccountMeta::new(ctx.payer.pubkey(), true), + // #[account(4, name="vendor", desc="The vendor")] + AccountMeta::new(vendor.pubkey(), false), + // #[account(5, name="product_program_data", desc="The PDA for the product to store mint data")] + AccountMeta::new(product_mint_pubkey, false), + // #[account(6, name="product_associated_token", desc="The ATA for the product")] + AccountMeta::new(product_ata_pubkey, false), + // #[account(7, name="device", desc="The device")] + AccountMeta::new(device_pubkey, true), + // #[account(8, writable, name="device_program_data", desc="The PDA for the device to store mint data")] + AccountMeta::new(device_mint_pubkey, false), + // #[account(9, writable, name="device_associated_token", desc="The ATA for the device")] + AccountMeta::new(device_ata_pubkey, false), + // #[account(10, name="owner", desc="The device's owner")] + AccountMeta::new(owner.pubkey(), true), + ], + ); + + let mut transaction = + Transaction::new_with_payer(&[create_activated_device_ix.clone()], Some(&ctx.payer.pubkey())); + + ctx.warp_forward_force_reward_interval_end().unwrap(); + transaction.sign(&[&ctx.payer, &device, &owner], ctx.last_blockhash); + ctx.banks_client + .process_transaction(transaction) + .await + .unwrap(); + + let device_ata = ctx + .banks_client + .get_account(device_ata_pubkey) + .await + .expect("get_account") + .expect("atoken account not none"); + let device_ata_data = StateWithExtensions::::unpack(device_ata.data()).unwrap(); + assert_eq!(device_ata_data.base.amount, 1, "Token amount is 1"); +} + diff --git a/scripts/generate-clients.mjs b/scripts/generate-clients.mjs index 776fa7b..a8ec16d 100644 --- a/scripts/generate-clients.mjs +++ b/scripts/generate-clients.mjs @@ -9,8 +9,8 @@ import {getAllProgramIdls, workingDirectory} from "./utils.mjs"; import {renderVisitor as renderUmiVisitor} from "@kinobi-so/renderers-js-umi"; // Instanciate Kinobi. -const [idl, ...additionalIdls] = getAllProgramIdls().filter(fs.existsSync).map(idl => rootNodeFromAnchor(require(idl))) -const kinobi = k.createFromRoot(idl, additionalIdls); +const idls = getAllProgramIdls().filter(fs.existsSync).map(idl => rootNodeFromAnchor(require(idl))) +const kinobi = k.createFromRoot(idls.find(idl => idl.program.name == 'dephyIdProgram')) // Update programs. kinobi.update( @@ -33,6 +33,11 @@ kinobi.update( kinobi.update( k.addPdasVisitor({ dephyId: [{ + name: 'programData', + seeds: [ + k.constantPdaSeedNodeFromString('utf8', "DePHY_ID"), + ] + }, { name: 'productMint', seeds: [ k.constantPdaSeedNodeFromString('utf8', "DePHY_ID-PRODUCT"), @@ -46,6 +51,22 @@ kinobi.update( k.variablePdaSeedNode('product_mint_pubkey', k.publicKeyTypeNode()), k.variablePdaSeedNode('device_pubkey', k.publicKeyTypeNode()), ] + }, { + name: 'productAToken', + // programAddress: 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL', + seeds: [ + k.variablePdaSeedNode('device_pubkey', k.publicKeyTypeNode()), + k.constantPdaSeedNode(k.publicKeyTypeNode(), k.publicKeyValueNode('TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb')), + k.variablePdaSeedNode('product_mint_pubkey', k.publicKeyTypeNode()), + ] + }, { + name: 'deviceAToken', + // programAddress: 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL', + seeds: [ + k.variablePdaSeedNode('owner_pubkey', k.publicKeyTypeNode()), + k.constantPdaSeedNode(k.publicKeyTypeNode(), k.publicKeyValueNode('TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb')), + k.variablePdaSeedNode('device_mint_pubkey', k.publicKeyTypeNode()), + ] }] }) ); @@ -54,6 +75,11 @@ kinobi.update( // Update instructions. kinobi.update( k.updateInstructionsVisitor({ + initialize: { + accounts: { + payer: { defaultValue: k.accountValueNode("authority") }, + }, + }, createProduct: { accounts: { token2022Program: { defaultValue: k.publicKeyValueNode('TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb') }, @@ -69,8 +95,20 @@ kinobi.update( createDevice: { accounts: { token2022Program: { defaultValue: k.publicKeyValueNode('TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb') }, + payer: { defaultValue: k.accountValueNode("vendor") }, }, }, + activateDevice: { + accounts: { + token2022Program: { defaultValue: k.publicKeyValueNode('TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb') }, + }, + }, + createActivatedDevice: { + accounts: { + token2022Program: { defaultValue: k.publicKeyValueNode('TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb') }, + payer: { defaultValue: k.accountValueNode("vendor") }, + }, + } }) ); diff --git a/ui/package.json b/ui/package.json index 1483db1..e7b52e1 100644 --- a/ui/package.json +++ b/ui/package.json @@ -4,18 +4,18 @@ "dephy-ui": "imba serve --esm ./index.html" }, "dependencies": { - "@metaplex-foundation/umi": "^0.9.1", - "@metaplex-foundation/umi-bundle-defaults": "^0.9.1", - "@metaplex-foundation/umi-signer-wallet-adapters": "^0.9.1", - "@metaplex-foundation/umi-web3js-adapters": "^0.9.1", + "@metaplex-foundation/umi": "^0.9.2", + "@metaplex-foundation/umi-bundle-defaults": "^0.9.2", + "@metaplex-foundation/umi-signer-wallet-adapters": "^0.9.2", + "@metaplex-foundation/umi-web3js-adapters": "^0.9.2", "@solana/wallet-adapter-phantom": "^0.9.24", - "@solana/web3.js": "^1.92.1", - "graphql": "^16.8.1", - "graphql-request": "^7.0.1" + "@solana/web3.js": "^1.94.0", + "graphql": "^16.9.0", + "graphql-request": "^7.1.0" }, "devDependencies": { "@graphql-codegen/cli": "^5.0.2", "imba": "^2.0.0-alpha.235", - "typescript": "^5.4.5" + "typescript": "^5.5.2" } } diff --git a/wallet/Cargo.lock b/wallet/Cargo.lock new file mode 100644 index 0000000..413a0c8 --- /dev/null +++ b/wallet/Cargo.lock @@ -0,0 +1,2117 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "aead" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" +dependencies = [ + "crypto-common", + "generic-array", +] + +[[package]] +name = "aes" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" +dependencies = [ + "cfg-if", + "cipher", + "cpufeatures", +] + +[[package]] +name = "aes-gcm-siv" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae0784134ba9375416d469ec31e7c5f9fa94405049cf08c5ce5b4698be673e0d" +dependencies = [ + "aead", + "aes", + "cipher", + "ctr", + "polyval", + "subtle", + "zeroize", +] + +[[package]] +name = "ahash" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "anyhow" +version = "1.0.86" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" + +[[package]] +name = "ark-bn254" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a22f4561524cd949590d78d7d4c5df8f592430d221f7f3c9497bbafd8972120f" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-std", +] + +[[package]] +name = "ark-ec" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" +dependencies = [ + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", + "itertools 0.10.5", + "num-traits", + "zeroize", +] + +[[package]] +name = "ark-ff" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" +dependencies = [ + "ark-ff-asm", + "ark-ff-macros", + "ark-serialize", + "ark-std", + "derivative", + "digest 0.10.7", + "itertools 0.10.5", + "num-bigint", + "num-traits", + "paste", + "rustc_version", + "zeroize", +] + +[[package]] +name = "ark-ff-asm" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" +dependencies = [ + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-poly" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" +dependencies = [ + "ark-ff", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", +] + +[[package]] +name = "ark-serialize" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" +dependencies = [ + "ark-serialize-derive", + "ark-std", + "digest 0.10.7", + "num-bigint", +] + +[[package]] +name = "ark-serialize-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-std" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + +[[package]] +name = "arrayref" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" + +[[package]] +name = "arrayvec" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" + +[[package]] +name = "assert_matches" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" + +[[package]] +name = "autocfg" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" + +[[package]] +name = "base64" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "bincode" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +dependencies = [ + "serde", +] + +[[package]] +name = "bitflags" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +dependencies = [ + "serde", +] + +[[package]] +name = "blake3" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30cca6d3674597c30ddf2c587bf8d9d65c9a84d2326d941cc79c9842dfe0ef52" +dependencies = [ + "arrayref", + "arrayvec", + "cc", + "cfg-if", + "constant_time_eq", + "digest 0.10.7", +] + +[[package]] +name = "block-buffer" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +dependencies = [ + "block-padding", + "generic-array", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "block-padding" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" + +[[package]] +name = "borsh" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4114279215a005bc675e386011e594e1d9b800918cea18fcadadcce864a2046b" +dependencies = [ + "borsh-derive 0.10.3", + "hashbrown 0.13.2", +] + +[[package]] +name = "borsh" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6362ed55def622cddc70a4746a68554d7b687713770de539e59a739b249f8ed" +dependencies = [ + "borsh-derive 1.5.1", + "cfg_aliases", +] + +[[package]] +name = "borsh-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0754613691538d51f329cce9af41d7b7ca150bc973056f1156611489475f54f7" +dependencies = [ + "borsh-derive-internal", + "borsh-schema-derive-internal", + "proc-macro-crate 0.1.5", + "proc-macro2", + "syn 1.0.109", +] + +[[package]] +name = "borsh-derive" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3ef8005764f53cd4dca619f5bf64cafd4664dada50ece25e4d81de54c80cc0b" +dependencies = [ + "once_cell", + "proc-macro-crate 3.1.0", + "proc-macro2", + "quote", + "syn 2.0.68", + "syn_derive", +] + +[[package]] +name = "borsh-derive-internal" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afb438156919598d2c7bad7e1c0adf3d26ed3840dbc010db1a882a65583ca2fb" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "borsh-schema-derive-internal" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "634205cc43f74a1b9046ef87c4540ebda95696ec0f315024860cad7c5b0f5ccd" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "bs58" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "bumpalo" +version = "3.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" + +[[package]] +name = "bv" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8834bb1d8ee5dc048ee3124f2c7c1afcc6bc9aed03f11e9dfd8c69470a5db340" +dependencies = [ + "feature-probe", + "serde", +] + +[[package]] +name = "bytemuck" +version = "1.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b236fc92302c97ed75b38da1f4917b5cdda4984745740f153a5d3059e48d725e" +dependencies = [ + "bytemuck_derive", +] + +[[package]] +name = "bytemuck_derive" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ee891b04274a59bd38b412188e24b849617b2e45a0fd8d057deb63e7403761b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.68", +] + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "cc" +version = "1.0.101" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac367972e516d45567c7eafc73d24e1c193dcf200a8d94e9db7b3d38b349572d" + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + +[[package]] +name = "chrono" +version = "0.4.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" +dependencies = [ + "num-traits", +] + +[[package]] +name = "cipher" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" +dependencies = [ + "crypto-common", + "inout", +] + +[[package]] +name = "console_error_panic_hook" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" +dependencies = [ + "cfg-if", + "wasm-bindgen", +] + +[[package]] +name = "console_log" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89f72f65e8501878b8a004d5a1afb780987e2ce2b4532c562e367a72c57499f" +dependencies = [ + "log", + "web-sys", +] + +[[package]] +name = "constant_time_eq" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" + +[[package]] +name = "cpufeatures" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +dependencies = [ + "libc", +] + +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "rand_core 0.6.4", + "typenum", +] + +[[package]] +name = "crypto-mac" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" +dependencies = [ + "generic-array", + "subtle", +] + +[[package]] +name = "ctr" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" +dependencies = [ + "cipher", +] + +[[package]] +name = "curve25519-dalek" +version = "3.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90f9d052967f590a76e62eb387bd0bbb1b000182c3cefe5364db6b7211651bc0" +dependencies = [ + "byteorder", + "digest 0.9.0", + "rand_core 0.5.1", + "serde", + "subtle", + "zeroize", +] + +[[package]] +name = "darling" +version = "0.20.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83b2eb4d90d12bdda5ed17de686c2acb4c57914f8f921b8da7e112b5a36f3fe1" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.20.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "622687fe0bac72a04e5599029151f5796111b90f1baaa9b544d807a5e31cd120" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.68", +] + +[[package]] +name = "darling_macro" +version = "0.20.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "733cabb43482b1a1b53eee8583c2b9e8684d592215ea83efd305dd31bc2f0178" +dependencies = [ + "darling_core", + "quote", + "syn 2.0.68", +] + +[[package]] +name = "dephy-id-program-client" +version = "0.0.1" +dependencies = [ + "borsh 1.5.1", + "num-derive", + "num-traits", + "solana-program", + "spl-associated-token-account", + "spl-token-2022", + "thiserror", +] + +[[package]] +name = "dephy-id-wallet" +version = "0.0.0" +dependencies = [ + "borsh 1.5.1", + "dephy-id-program-client", + "num-derive", + "num-traits", + "shank", + "solana-program", + "spl-associated-token-account", + "spl-token-2022", + "spl-token-metadata-interface", + "thiserror", +] + +[[package]] +name = "derivation-path" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e5c37193a1db1d8ed868c03ec7b152175f26160a5b740e5e484143877e0adf0" + +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "digest" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +dependencies = [ + "generic-array", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer 0.10.4", + "crypto-common", + "subtle", +] + +[[package]] +name = "ed25519" +version = "1.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" +dependencies = [ + "signature", +] + +[[package]] +name = "ed25519-dalek" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" +dependencies = [ + "curve25519-dalek", + "ed25519", + "rand 0.7.3", + "serde", + "sha2 0.9.9", + "zeroize", +] + +[[package]] +name = "ed25519-dalek-bip32" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d2be62a4061b872c8c0873ee4fc6f101ce7b889d039f019c5fa2af471a59908" +dependencies = [ + "derivation-path", + "ed25519-dalek", + "hmac 0.12.1", + "sha2 0.10.8", +] + +[[package]] +name = "either" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "feature-probe" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835a3dc7d1ec9e75e2b5fb4ba75396837112d2060b03f7d43bc1897c7f7211da" + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "serde", + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", + "wasm-bindgen", +] + +[[package]] +name = "getrandom" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", + "wasm-bindgen", +] + +[[package]] +name = "hashbrown" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +dependencies = [ + "ahash", +] + +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" + +[[package]] +name = "hmac" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" +dependencies = [ + "crypto-mac", + "digest 0.9.0", +] + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "hmac-drbg" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" +dependencies = [ + "digest 0.9.0", + "generic-array", + "hmac 0.8.1", +] + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "indexmap" +version = "2.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +dependencies = [ + "equivalent", + "hashbrown 0.14.5", +] + +[[package]] +name = "inout" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" +dependencies = [ + "generic-array", +] + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" + +[[package]] +name = "js-sys" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "keccak" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" +dependencies = [ + "cpufeatures", +] + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" + +[[package]] +name = "libc" +version = "0.2.155" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" + +[[package]] +name = "libsecp256k1" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9d220bc1feda2ac231cb78c3d26f27676b8cf82c96971f7aeef3d0cf2797c73" +dependencies = [ + "arrayref", + "base64 0.12.3", + "digest 0.9.0", + "hmac-drbg", + "libsecp256k1-core", + "libsecp256k1-gen-ecmult", + "libsecp256k1-gen-genmult", + "rand 0.7.3", + "serde", + "sha2 0.9.9", + "typenum", +] + +[[package]] +name = "libsecp256k1-core" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0f6ab710cec28cef759c5f18671a27dae2a5f952cdaaee1d8e2908cb2478a80" +dependencies = [ + "crunchy", + "digest 0.9.0", + "subtle", +] + +[[package]] +name = "libsecp256k1-gen-ecmult" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccab96b584d38fac86a83f07e659f0deafd0253dc096dab5a36d53efe653c5c3" +dependencies = [ + "libsecp256k1-core", +] + +[[package]] +name = "libsecp256k1-gen-genmult" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67abfe149395e3aa1c48a2beb32b068e2334402df8181f818d3aee2b304c4f5d" +dependencies = [ + "libsecp256k1-core", +] + +[[package]] +name = "lock_api" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" + +[[package]] +name = "memchr" +version = "2.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" + +[[package]] +name = "memmap2" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" +dependencies = [ + "libc", +] + +[[package]] +name = "memoffset" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" +dependencies = [ + "autocfg", +] + +[[package]] +name = "merlin" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58c38e2799fc0978b65dfff8023ec7843e2330bb462f19198840b34b6582397d" +dependencies = [ + "byteorder", + "keccak", + "rand_core 0.6.4", + "zeroize", +] + +[[package]] +name = "num-bigint" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" +dependencies = [ + "num-integer", + "num-traits", +] + +[[package]] +name = "num-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.68", +] + +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_enum" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02339744ee7253741199f897151b38e72257d13802d4ee837285cc2990a90845" +dependencies = [ + "num_enum_derive", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" +dependencies = [ + "proc-macro-crate 3.1.0", + "proc-macro2", + "quote", + "syn 2.0.68", +] + +[[package]] +name = "once_cell" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + +[[package]] +name = "opaque-debug" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" + +[[package]] +name = "parking_lot" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-targets", +] + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[package]] +name = "pbkdf2" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "percent-encoding" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "polyval" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25" +dependencies = [ + "cfg-if", + "cpufeatures", + "opaque-debug", + "universal-hash", +] + +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "proc-macro-crate" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" +dependencies = [ + "toml", +] + +[[package]] +name = "proc-macro-crate" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" +dependencies = [ + "toml_edit", +] + +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2", + "quote", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2", + "quote", + "version_check", +] + +[[package]] +name = "proc-macro2" +version = "1.0.86" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "qstring" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d464fae65fff2680baf48019211ce37aaec0c78e9264c84a3e484717f965104e" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "quote" +version = "1.0.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "rand" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +dependencies = [ + "getrandom 0.1.16", + "libc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc", +] + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +dependencies = [ + "ppv-lite86", + "rand_core 0.5.1", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +dependencies = [ + "getrandom 0.1.16", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.15", +] + +[[package]] +name = "rand_hc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +dependencies = [ + "rand_core 0.5.1", +] + +[[package]] +name = "redox_syscall" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c82cf8cff14456045f55ec4241383baeff27af886adb72ffb2162f99911de0fd" +dependencies = [ + "bitflags", +] + +[[package]] +name = "rustc_version" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +dependencies = [ + "semver", +] + +[[package]] +name = "rustversion" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" + +[[package]] +name = "ryu" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "semver" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" + +[[package]] +name = "serde" +version = "1.0.203" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_bytes" +version = "0.11.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "387cc504cb06bb40a96c8e04e951fe01854cf6bc921053c954e4a606d9675c6a" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_derive" +version = "1.0.203" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.68", +] + +[[package]] +name = "serde_json" +version = "1.0.118" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d947f6b3163d8857ea16c4fa0dd4840d52f3041039a85decd46867eb1abef2e4" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_with" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07ff71d2c147a7b57362cead5e22f772cd52f6ab31cfcd9edcd7f6aeb2a0afbe" +dependencies = [ + "serde", + "serde_with_macros", +] + +[[package]] +name = "serde_with_macros" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "881b6f881b17d13214e5d494c939ebab463d01264ce1811e9d4ac3a882e7695f" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 2.0.68", +] + +[[package]] +name = "sha2" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" +dependencies = [ + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", + "digest 0.9.0", + "opaque-debug", +] + +[[package]] +name = "sha2" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha3" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f81199417d4e5de3f04b1e871023acea7389672c4135918f05aa9cbf2f2fa809" +dependencies = [ + "block-buffer 0.9.0", + "digest 0.9.0", + "keccak", + "opaque-debug", +] + +[[package]] +name = "sha3" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" +dependencies = [ + "digest 0.10.7", + "keccak", +] + +[[package]] +name = "shank" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23d894855493d4ce613b25550fe1ed1c62d0af5486b984579ba55e3f8c9631d5" +dependencies = [ + "shank_macro", +] + +[[package]] +name = "shank_macro" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9bf2645f8eebde043da69200195058e7b59806705104f908a31d05ca82844ce" +dependencies = [ + "proc-macro2", + "quote", + "shank_macro_impl", + "shank_render", + "syn 1.0.109", +] + +[[package]] +name = "shank_macro_impl" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d0593f48acb0a722906416b1f6b8926f6571eb9af16d566a7c65427f269f50" +dependencies = [ + "anyhow", + "proc-macro2", + "quote", + "serde", + "syn 1.0.109", +] + +[[package]] +name = "shank_render" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "121175ba61809189f888dc5822ebfd30fa0d91e1e1f61d25a4d40b0847b3075e" +dependencies = [ + "proc-macro2", + "quote", + "shank_macro_impl", +] + +[[package]] +name = "signature" +version = "1.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" + +[[package]] +name = "siphasher" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" + +[[package]] +name = "smallvec" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" + +[[package]] +name = "solana-curve25519" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9c4692f4eeb32f6b1b968250f3301927590debb056841f1134f6d098d3c0ec5" +dependencies = [ + "bytemuck", + "bytemuck_derive", + "curve25519-dalek", + "solana-program", + "thiserror", +] + +[[package]] +name = "solana-program" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9164e89e655a4689de62f0c8066f4a9496e16e5d38ca27c821fc812bac79fa34" +dependencies = [ + "ark-bn254", + "ark-ec", + "ark-ff", + "ark-serialize", + "base64 0.22.1", + "bincode", + "bitflags", + "blake3", + "borsh 0.10.3", + "borsh 1.5.1", + "bs58", + "bv", + "bytemuck", + "bytemuck_derive", + "console_error_panic_hook", + "console_log", + "curve25519-dalek", + "getrandom 0.2.15", + "js-sys", + "lazy_static", + "libsecp256k1", + "log", + "memoffset", + "num-bigint", + "num-derive", + "num-traits", + "parking_lot", + "rand 0.8.5", + "rustc_version", + "rustversion", + "serde", + "serde_bytes", + "serde_derive", + "sha2 0.10.8", + "sha3 0.10.8", + "solana-sdk-macro", + "thiserror", + "wasm-bindgen", +] + +[[package]] +name = "solana-sdk" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f079f55dc33a4be11ddbc8b57c92ba4bb222a317c99c24b86a5190e354c1b49" +dependencies = [ + "bincode", + "bitflags", + "borsh 1.5.1", + "bs58", + "bytemuck", + "bytemuck_derive", + "byteorder", + "chrono", + "derivation-path", + "digest 0.10.7", + "ed25519-dalek", + "ed25519-dalek-bip32", + "generic-array", + "getrandom 0.1.16", + "hmac 0.12.1", + "itertools 0.12.1", + "js-sys", + "lazy_static", + "libsecp256k1", + "log", + "memmap2", + "num_enum", + "pbkdf2", + "qstring", + "rand 0.7.3", + "rand 0.8.5", + "rustc_version", + "rustversion", + "serde", + "serde_bytes", + "serde_derive", + "serde_json", + "serde_with", + "sha2 0.10.8", + "sha3 0.10.8", + "siphasher", + "solana-program", + "solana-sdk-macro", + "thiserror", + "uriparse", + "wasm-bindgen", +] + +[[package]] +name = "solana-sdk-macro" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b34e8a090f0572191388412636f7682370ad944894dd2d20a8e616159fd8e1b6" +dependencies = [ + "bs58", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.68", +] + +[[package]] +name = "solana-security-txt" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "468aa43b7edb1f9b7b7b686d5c3aeb6630dc1708e86e31343499dd5c4d775183" + +[[package]] +name = "solana-zk-token-sdk" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "729f832ad0cca51f73909b5a9d375ee77c0e608e7474155bf39da30a33abd778" +dependencies = [ + "aes-gcm-siv", + "base64 0.22.1", + "bincode", + "bytemuck", + "bytemuck_derive", + "byteorder", + "curve25519-dalek", + "itertools 0.12.1", + "lazy_static", + "merlin", + "num-derive", + "num-traits", + "rand 0.7.3", + "serde", + "serde_derive", + "serde_json", + "sha3 0.9.1", + "solana-curve25519", + "solana-program", + "solana-sdk", + "subtle", + "thiserror", + "zeroize", +] + +[[package]] +name = "spl-associated-token-account" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68034596cf4804880d265f834af1ff2f821ad5293e41fa0f8f59086c181fc38e" +dependencies = [ + "assert_matches", + "borsh 1.5.1", + "num-derive", + "num-traits", + "solana-program", + "spl-token", + "spl-token-2022", + "thiserror", +] + +[[package]] +name = "spl-discriminator" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a38ea8b6dedb7065887f12d62ed62c1743aa70749e8558f963609793f6fb12bc" +dependencies = [ + "bytemuck", + "solana-program", + "spl-discriminator-derive", +] + +[[package]] +name = "spl-discriminator-derive" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9e8418ea6269dcfb01c712f0444d2c75542c04448b480e87de59d2865edc750" +dependencies = [ + "quote", + "spl-discriminator-syn", + "syn 2.0.68", +] + +[[package]] +name = "spl-discriminator-syn" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c1f05593b7ca9eac7caca309720f2eafb96355e037e6d373b909a80fe7b69b9" +dependencies = [ + "proc-macro2", + "quote", + "sha2 0.10.8", + "syn 2.0.68", + "thiserror", +] + +[[package]] +name = "spl-memo" +version = "5.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0dba2f2bb6419523405d21c301a32c9f9568354d4742552e7972af801f4bdb3" +dependencies = [ + "solana-program", +] + +[[package]] +name = "spl-pod" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6166a591d93af33afd75bbd8573c5fd95fb1213f1bf254f0508c89fdb5ee156" +dependencies = [ + "borsh 1.5.1", + "bytemuck", + "bytemuck_derive", + "solana-program", + "solana-zk-token-sdk", + "spl-program-error", +] + +[[package]] +name = "spl-program-error" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7b28bed65356558133751cc32b48a7a5ddfc59ac4e941314630bbed1ac10532" +dependencies = [ + "num-derive", + "num-traits", + "solana-program", + "spl-program-error-derive", + "thiserror", +] + +[[package]] +name = "spl-program-error-derive" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d375dd76c517836353e093c2dbb490938ff72821ab568b545fd30ab3256b3e" +dependencies = [ + "proc-macro2", + "quote", + "sha2 0.10.8", + "syn 2.0.68", +] + +[[package]] +name = "spl-tlv-account-resolution" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37a75a5f0fcc58126693ed78a17042e9dc53f07e357d6be91789f7d62aff61a4" +dependencies = [ + "bytemuck", + "solana-program", + "spl-discriminator", + "spl-pod", + "spl-program-error", + "spl-type-length-value", +] + +[[package]] +name = "spl-token" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70a0f06ac7f23dc0984931b1fe309468f14ea58e32660439c1cef19456f5d0e3" +dependencies = [ + "arrayref", + "bytemuck", + "num-derive", + "num-traits", + "num_enum", + "solana-program", + "thiserror", +] + +[[package]] +name = "spl-token-2022" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c10f3483e48679619c76598d4e4aebb955bc49b0a5cc63323afbf44135c9bf" +dependencies = [ + "arrayref", + "bytemuck", + "num-derive", + "num-traits", + "num_enum", + "solana-program", + "solana-security-txt", + "solana-zk-token-sdk", + "spl-memo", + "spl-pod", + "spl-token", + "spl-token-group-interface", + "spl-token-metadata-interface", + "spl-transfer-hook-interface", + "spl-type-length-value", + "thiserror", +] + +[[package]] +name = "spl-token-group-interface" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df8752b85a5ecc1d9f3a43bce3dd9a6a053673aacf5deb513d1cbb88d3534ffd" +dependencies = [ + "bytemuck", + "solana-program", + "spl-discriminator", + "spl-pod", + "spl-program-error", +] + +[[package]] +name = "spl-token-metadata-interface" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6c2318ddff97e006ed9b1291ebec0750a78547f870f62a69c56fe3b46a5d8fc" +dependencies = [ + "borsh 1.5.1", + "solana-program", + "spl-discriminator", + "spl-pod", + "spl-program-error", + "spl-type-length-value", +] + +[[package]] +name = "spl-transfer-hook-interface" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a110f33d941275d9f868b96daaa993f1e73b6806cc8836e43075b4d3ad8338a7" +dependencies = [ + "arrayref", + "bytemuck", + "solana-program", + "spl-discriminator", + "spl-pod", + "spl-program-error", + "spl-tlv-account-resolution", + "spl-type-length-value", +] + +[[package]] +name = "spl-type-length-value" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdcd73ec187bc409464c60759232e309f83b52a18a9c5610bf281c9c6432918c" +dependencies = [ + "bytemuck", + "solana-program", + "spl-discriminator", + "spl-pod", + "spl-program-error", +] + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.68" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "901fa70d88b9d6c98022e23b4136f9f3e54e4662c3bc1bd1d84a42a9a0f0c1e9" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn_derive" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1329189c02ff984e9736652b1631330da25eaa6bc639089ed4915d25446cbe7b" +dependencies = [ + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.68", +] + +[[package]] +name = "thiserror" +version = "1.0.61" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.61" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.68", +] + +[[package]] +name = "tinyvec" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c55115c6fbe2d2bef26eb09ad74bde02d8255476fc0c7b515ef09fbb35742d82" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "toml" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_datetime" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" + +[[package]] +name = "toml_edit" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" +dependencies = [ + "indexmap", + "toml_datetime", + "winnow", +] + +[[package]] +name = "typenum" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" + +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + +[[package]] +name = "universal-hash" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" +dependencies = [ + "crypto-common", + "subtle", +] + +[[package]] +name = "uriparse" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0200d0fc04d809396c2ad43f3c95da3582a2556eba8d453c1087f4120ee352ff" +dependencies = [ + "fnv", + "lazy_static", +] + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn 2.0.68", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.68", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" + +[[package]] +name = "web-sys" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "windows-targets" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" + +[[package]] +name = "winnow" +version = "0.5.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", +] + +[[package]] +name = "zerocopy" +version = "0.7.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae87e3fcd617500e5d106f0380cf7b77f3c6092aae37191433159dda23cfb087" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.68", +] + +[[package]] +name = "zeroize" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4756f7db3f7b5574938c3eb1c117038b8e07f95ee6718c0efad4ac21508f1efd" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.68", +] diff --git a/wallet/Cargo.toml b/wallet/Cargo.toml new file mode 100644 index 0000000..ed9f7f0 --- /dev/null +++ b/wallet/Cargo.toml @@ -0,0 +1,6 @@ +[workspace] +resolver = "2" +members = ["program"] + +[workspace.metadata.solana] +external-programs-output = "../target/deploy" diff --git a/wallet/README.md b/wallet/README.md new file mode 100644 index 0000000..2dba813 --- /dev/null +++ b/wallet/README.md @@ -0,0 +1,21 @@ +# DePHY ID wallet + +## Test + +```sh +# if `../target/deploy/dephy_id_program.so` not exist, build it in parent first +cd .. +cargo build-sbf + +# build wallet program +cd wallet +cargo build-sbf + +# if updated `dephy-id-program-client`, regenerate client +bun install +bun generate + +# test with local validator +bun clients:js:test +``` + diff --git a/wallet/clients/js/.gitignore b/wallet/clients/js/.gitignore new file mode 100644 index 0000000..3c3629e --- /dev/null +++ b/wallet/clients/js/.gitignore @@ -0,0 +1 @@ +node_modules diff --git a/wallet/clients/js/.prettierrc.json b/wallet/clients/js/.prettierrc.json new file mode 100644 index 0000000..254c729 --- /dev/null +++ b/wallet/clients/js/.prettierrc.json @@ -0,0 +1,9 @@ +{ + "semi": true, + "singleQuote": true, + "trailingComma": "es5", + "useTabs": false, + "tabWidth": 2, + "arrowParens": "always", + "printWidth": 80 +} diff --git a/wallet/clients/js/env-shim.ts b/wallet/clients/js/env-shim.ts new file mode 100644 index 0000000..8963d75 --- /dev/null +++ b/wallet/clients/js/env-shim.ts @@ -0,0 +1,3 @@ +// Clever obfuscation to prevent the build system from inlining the value of `NODE_ENV` +export const __DEV__ = /* @__PURE__ */ (() => + (process as any)['en' + 'v'].NODE_ENV === 'development')(); diff --git a/wallet/clients/js/package.json b/wallet/clients/js/package.json new file mode 100644 index 0000000..7e28a17 --- /dev/null +++ b/wallet/clients/js/package.json @@ -0,0 +1,34 @@ +{ + "name": "@dephy-io/dephy-id-wallet-client", + "scripts": { + "build": "rimraf dist && tsup && tsc -p ./tsconfig.declarations.json", + "test": "ava" + }, + "dependencies": { + "@solana/web3.js": "2.0.0-preview.3", + "@dephy-io/dephy-id-program-client": "file:../../../clients/js" + }, + "devDependencies": { + "@ava/typescript": "^5.0.0", + "@solana-program/system": "^0.3.3", + "@solana/webcrypto-ed25519-polyfill": "2.0.0-preview.3", + "ava": "^6.1.3", + "eslint": "^8.57.0", + "prettier": "^3.3.2", + "rimraf": "^5.0.7", + "tsup": "^8.1.0", + "typescript": "^5.5.2" + }, + "ava": { + "nodeArguments": ["--no-warnings"], + "require": [ + "@solana/webcrypto-ed25519-polyfill" + ], + "typescript": { + "compile": false, + "rewritePaths": { + "test/": "dist/test/" + } + } + } +} diff --git a/wallet/clients/js/pnpm-lock.yaml b/wallet/clients/js/pnpm-lock.yaml new file mode 100644 index 0000000..de5ca9f --- /dev/null +++ b/wallet/clients/js/pnpm-lock.yaml @@ -0,0 +1,3327 @@ +lockfileVersion: '9.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +importers: + + .: + dependencies: + '@dephy-io/dephy-id-program-client': + specifier: file:../../../clients/js + version: file:../../../clients/js(@solana/web3.js@2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22)(ws@8.17.1)) + '@solana/web3.js': + specifier: 2.0.0-preview.3 + version: 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22)(ws@8.17.1) + devDependencies: + '@ava/typescript': + specifier: ^5.0.0 + version: 5.0.0 + '@solana/webcrypto-ed25519-polyfill': + specifier: 2.0.0-preview.3 + version: 2.0.0-preview.3 + ava: + specifier: ^6.1.3 + version: 6.1.3(@ava/typescript@5.0.0) + eslint: + specifier: ^8.57.0 + version: 8.57.0 + prettier: + specifier: ^3.2.5 + version: 3.3.2 + rimraf: + specifier: ^5.0.7 + version: 5.0.7 + tsup: + specifier: ^8.0.2 + version: 8.1.0(typescript@5.5.2) + typescript: + specifier: ^5.4.5 + version: 5.5.2 + +packages: + + '@ava/typescript@5.0.0': + resolution: {integrity: sha512-2twsQz2fUd95QK1MtKuEnjkiN47SKHZfi/vWj040EN6Eo2ZW3SNcAwncJqXXoMTYZTWtBRXYp3Fg8z+JkFI9aQ==} + engines: {node: ^18.18 || ^20.8 || ^21 || ^22} + + '@dephy-io/dephy-id-program-client@file:../../../clients/js': + resolution: {directory: ../../../clients/js, type: directory} + peerDependencies: + '@solana/web3.js': 2.0.0-preview.3 + + '@esbuild/aix-ppc64@0.21.5': + resolution: {integrity: sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [aix] + + '@esbuild/android-arm64@0.21.5': + resolution: {integrity: sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + + '@esbuild/android-arm@0.21.5': + resolution: {integrity: sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + + '@esbuild/android-x64@0.21.5': + resolution: {integrity: sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + + '@esbuild/darwin-arm64@0.21.5': + resolution: {integrity: sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + + '@esbuild/darwin-x64@0.21.5': + resolution: {integrity: sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + + '@esbuild/freebsd-arm64@0.21.5': + resolution: {integrity: sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + + '@esbuild/freebsd-x64@0.21.5': + resolution: {integrity: sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + + '@esbuild/linux-arm64@0.21.5': + resolution: {integrity: sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + + '@esbuild/linux-arm@0.21.5': + resolution: {integrity: sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + + '@esbuild/linux-ia32@0.21.5': + resolution: {integrity: sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + + '@esbuild/linux-loong64@0.21.5': + resolution: {integrity: sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + + '@esbuild/linux-mips64el@0.21.5': + resolution: {integrity: sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + + '@esbuild/linux-ppc64@0.21.5': + resolution: {integrity: sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + + '@esbuild/linux-riscv64@0.21.5': + resolution: {integrity: sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + + '@esbuild/linux-s390x@0.21.5': + resolution: {integrity: sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + + '@esbuild/linux-x64@0.21.5': + resolution: {integrity: sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + + '@esbuild/netbsd-x64@0.21.5': + resolution: {integrity: sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + + '@esbuild/openbsd-x64@0.21.5': + resolution: {integrity: sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + + '@esbuild/sunos-x64@0.21.5': + resolution: {integrity: sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + + '@esbuild/win32-arm64@0.21.5': + resolution: {integrity: sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + + '@esbuild/win32-ia32@0.21.5': + resolution: {integrity: sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + + '@esbuild/win32-x64@0.21.5': + resolution: {integrity: sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + + '@eslint-community/eslint-utils@4.4.0': + resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 + + '@eslint-community/regexpp@4.11.0': + resolution: {integrity: sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==} + engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + + '@eslint/eslintrc@2.1.4': + resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + '@eslint/js@8.57.0': + resolution: {integrity: sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + '@humanwhocodes/config-array@0.11.14': + resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} + engines: {node: '>=10.10.0'} + deprecated: Use @eslint/config-array instead + + '@humanwhocodes/module-importer@1.0.1': + resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} + engines: {node: '>=12.22'} + + '@humanwhocodes/object-schema@2.0.3': + resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} + deprecated: Use @eslint/object-schema instead + + '@isaacs/cliui@8.0.2': + resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} + engines: {node: '>=12'} + + '@jridgewell/gen-mapping@0.3.5': + resolution: {integrity: sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==} + engines: {node: '>=6.0.0'} + + '@jridgewell/resolve-uri@3.1.2': + resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} + engines: {node: '>=6.0.0'} + + '@jridgewell/set-array@1.2.1': + resolution: {integrity: sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==} + engines: {node: '>=6.0.0'} + + '@jridgewell/sourcemap-codec@1.4.15': + resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} + + '@jridgewell/trace-mapping@0.3.25': + resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} + + '@mapbox/node-pre-gyp@1.0.11': + resolution: {integrity: sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ==} + hasBin: true + + '@noble/ed25519@2.1.0': + resolution: {integrity: sha512-KM4qTyXPinyCgMzeYJH/UudpdL+paJXtY3CHtHYZQtBkS8MZoPr4rOikZllIutJe0d06QDQKisyn02gxZ8TcQA==} + + '@nodelib/fs.scandir@2.1.5': + resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} + engines: {node: '>= 8'} + + '@nodelib/fs.stat@2.0.5': + resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} + engines: {node: '>= 8'} + + '@nodelib/fs.walk@1.2.8': + resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} + engines: {node: '>= 8'} + + '@pkgjs/parseargs@0.11.0': + resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} + engines: {node: '>=14'} + + '@rollup/pluginutils@4.2.1': + resolution: {integrity: sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==} + engines: {node: '>= 8.0.0'} + + '@rollup/rollup-android-arm-eabi@4.18.0': + resolution: {integrity: sha512-Tya6xypR10giZV1XzxmH5wr25VcZSncG0pZIjfePT0OVBvqNEurzValetGNarVrGiq66EBVAFn15iYX4w6FKgQ==} + cpu: [arm] + os: [android] + + '@rollup/rollup-android-arm64@4.18.0': + resolution: {integrity: sha512-avCea0RAP03lTsDhEyfy+hpfr85KfyTctMADqHVhLAF3MlIkq83CP8UfAHUssgXTYd+6er6PaAhx/QGv4L1EiA==} + cpu: [arm64] + os: [android] + + '@rollup/rollup-darwin-arm64@4.18.0': + resolution: {integrity: sha512-IWfdwU7KDSm07Ty0PuA/W2JYoZ4iTj3TUQjkVsO/6U+4I1jN5lcR71ZEvRh52sDOERdnNhhHU57UITXz5jC1/w==} + cpu: [arm64] + os: [darwin] + + '@rollup/rollup-darwin-x64@4.18.0': + resolution: {integrity: sha512-n2LMsUz7Ynu7DoQrSQkBf8iNrjOGyPLrdSg802vk6XT3FtsgX6JbE8IHRvposskFm9SNxzkLYGSq9QdpLYpRNA==} + cpu: [x64] + os: [darwin] + + '@rollup/rollup-linux-arm-gnueabihf@4.18.0': + resolution: {integrity: sha512-C/zbRYRXFjWvz9Z4haRxcTdnkPt1BtCkz+7RtBSuNmKzMzp3ZxdM28Mpccn6pt28/UWUCTXa+b0Mx1k3g6NOMA==} + cpu: [arm] + os: [linux] + + '@rollup/rollup-linux-arm-musleabihf@4.18.0': + resolution: {integrity: sha512-l3m9ewPgjQSXrUMHg93vt0hYCGnrMOcUpTz6FLtbwljo2HluS4zTXFy2571YQbisTnfTKPZ01u/ukJdQTLGh9A==} + cpu: [arm] + os: [linux] + + '@rollup/rollup-linux-arm64-gnu@4.18.0': + resolution: {integrity: sha512-rJ5D47d8WD7J+7STKdCUAgmQk49xuFrRi9pZkWoRD1UeSMakbcepWXPF8ycChBoAqs1pb2wzvbY6Q33WmN2ftw==} + cpu: [arm64] + os: [linux] + + '@rollup/rollup-linux-arm64-musl@4.18.0': + resolution: {integrity: sha512-be6Yx37b24ZwxQ+wOQXXLZqpq4jTckJhtGlWGZs68TgdKXJgw54lUUoFYrg6Zs/kjzAQwEwYbp8JxZVzZLRepQ==} + cpu: [arm64] + os: [linux] + + '@rollup/rollup-linux-powerpc64le-gnu@4.18.0': + resolution: {integrity: sha512-hNVMQK+qrA9Todu9+wqrXOHxFiD5YmdEi3paj6vP02Kx1hjd2LLYR2eaN7DsEshg09+9uzWi2W18MJDlG0cxJA==} + cpu: [ppc64] + os: [linux] + + '@rollup/rollup-linux-riscv64-gnu@4.18.0': + resolution: {integrity: sha512-ROCM7i+m1NfdrsmvwSzoxp9HFtmKGHEqu5NNDiZWQtXLA8S5HBCkVvKAxJ8U+CVctHwV2Gb5VUaK7UAkzhDjlg==} + cpu: [riscv64] + os: [linux] + + '@rollup/rollup-linux-s390x-gnu@4.18.0': + resolution: {integrity: sha512-0UyyRHyDN42QL+NbqevXIIUnKA47A+45WyasO+y2bGJ1mhQrfrtXUpTxCOrfxCR4esV3/RLYyucGVPiUsO8xjg==} + cpu: [s390x] + os: [linux] + + '@rollup/rollup-linux-x64-gnu@4.18.0': + resolution: {integrity: sha512-xuglR2rBVHA5UsI8h8UbX4VJ470PtGCf5Vpswh7p2ukaqBGFTnsfzxUBetoWBWymHMxbIG0Cmx7Y9qDZzr648w==} + cpu: [x64] + os: [linux] + + '@rollup/rollup-linux-x64-musl@4.18.0': + resolution: {integrity: sha512-LKaqQL9osY/ir2geuLVvRRs+utWUNilzdE90TpyoX0eNqPzWjRm14oMEE+YLve4k/NAqCdPkGYDaDF5Sw+xBfg==} + cpu: [x64] + os: [linux] + + '@rollup/rollup-win32-arm64-msvc@4.18.0': + resolution: {integrity: sha512-7J6TkZQFGo9qBKH0pk2cEVSRhJbL6MtfWxth7Y5YmZs57Pi+4x6c2dStAUvaQkHQLnEQv1jzBUW43GvZW8OFqA==} + cpu: [arm64] + os: [win32] + + '@rollup/rollup-win32-ia32-msvc@4.18.0': + resolution: {integrity: sha512-Txjh+IxBPbkUB9+SXZMpv+b/vnTEtFyfWZgJ6iyCmt2tdx0OF5WhFowLmnh8ENGNpfUlUZkdI//4IEmhwPieNg==} + cpu: [ia32] + os: [win32] + + '@rollup/rollup-win32-x64-msvc@4.18.0': + resolution: {integrity: sha512-UOo5FdvOL0+eIVTgS4tIdbW+TtnBLWg1YBCcU2KWM7nuNwRz9bksDX1bekJJCpu25N1DVWaCwnT39dVQxzqS8g==} + cpu: [x64] + os: [win32] + + '@sindresorhus/merge-streams@2.3.0': + resolution: {integrity: sha512-LtoMMhxAlorcGhmFYI+LhPgbPZCkgP6ra1YL604EeF6U98pLlQ3iWIGMdWSC+vWmPBWBNgmDBAhnAobLROJmwg==} + engines: {node: '>=18'} + + '@solana/accounts@2.0.0-preview.3': + resolution: {integrity: sha512-30GCO7SF3VRYqsumfCTW4bJ1fK67KwX62ZSi6nlU3+6ni4ZmmCT4jPYcqoBgO1kUzDJ4UORNeh/PbdFfbCA0FA==} + + '@solana/addresses@2.0.0-preview.3': + resolution: {integrity: sha512-JjiPOsVddQibd9EdzYEOiZtMSeveNHI7R6s9UADWVMvlIAqN9+uACficM0/XAdZmycZnvqKzS+Io0CNJClofUA==} + + '@solana/assertions@2.0.0-preview.3': + resolution: {integrity: sha512-K8ZwlDwuVJKeKOggejy524UoaTDGk6sthW1KvEQXOkIPqJdtST3I9Rco4Xh4hL2w/RnhKXqsQUa3bg+if2ifEg==} + + '@solana/codecs-core@2.0.0-preview.3': + resolution: {integrity: sha512-xQz6USSBs82lUNoVa/wwnm6wa2y2eWtGwPLUwF/NOGGpR+QH9EODijXvJ8wuC9llyqerqdC+5mrmx9C8VSMNYg==} + + '@solana/codecs-data-structures@2.0.0-preview.3': + resolution: {integrity: sha512-PfXvZCf9qDF+Dv4WG6cb4xZoY9tj117bmZWS17iKimuNSsvuFSHpzERy0mmX2hwYEAM4CnQBd/9dgx+eAeMAsg==} + + '@solana/codecs-numbers@2.0.0-preview.3': + resolution: {integrity: sha512-cjsHexVAj4GveDtG0+WjW121TKMbWN7AkOvGlf1qauOJgzJvX3V7KXHWuEg8wGGfRiLiXKEgh7KieQiB17EI3Q==} + + '@solana/codecs-strings@2.0.0-preview.3': + resolution: {integrity: sha512-CUij3XgdoqbrEYncyy+kHCIXRHjqkcjiyJhf4hWVjMXM5nu2jreehhBiLFHFjlFw2U3vp1gig5QNxji8SjpQzw==} + peerDependencies: + fastestsmallesttextencoderdecoder: ^1.0.22 + + '@solana/codecs@2.0.0-preview.3': + resolution: {integrity: sha512-uB0GMAY1VrNoJxZ9S4F1RBL57gI+8YwxnV9DD5EP5rU8iD7Wq4wbaB2IPcENyJi7rmzytIjKJg0MI6i2bBr+0w==} + + '@solana/errors@2.0.0-preview.3': + resolution: {integrity: sha512-IZAUMcKaV3Hn0QTfzlGmVsDaH1mVUq0uURJi+tm8K3n37cKrvXyS2GQsHtIMRaLdOVp1IbTtIc5YF3+qATlpyw==} + hasBin: true + + '@solana/fast-stable-stringify@2.0.0-preview.3': + resolution: {integrity: sha512-JBx++3mFJ6WwvMtn6sZihtSicbD2pIP95tJ4hP2go18p6e2gFWRDpAmicKHhg0AT3qSkD6HdpfXtth+OQNnI2A==} + + '@solana/functional@2.0.0-preview.3': + resolution: {integrity: sha512-Zf305CAzEPRcaGLQdXq9SilxBnPcbUQk46jztOpkNzNMqL4Ipw7sIYHdbn/O+RhM2d7mDnthz2IGcYVyMaseKg==} + + '@solana/instructions@2.0.0-preview.3': + resolution: {integrity: sha512-P6Nkt++I/Ph7DFluVDAlgEYtFLtcvGFhRnqEa/BkkzRjbl28+HyDKRXcUPkP3o00+zuAqPjJ08qRxjywBOHPxg==} + + '@solana/keys@2.0.0-preview.3': + resolution: {integrity: sha512-TwQ0MQCafbKy277tDl4Q0CbIVuGAcd7NnlnrGXakhgNgO47N+vkEBhP+Zdw6YHWZwnuc30kdcXlaXSXPAMP2jQ==} + + '@solana/options@2.0.0-preview.3': + resolution: {integrity: sha512-tT5O1CCJVE+rzo4VeeivYLNUL4L/2BjIeiy0MRh04lPxieiR346vUOPC1uCWGD6WqyTOOVUL0tsY4saYLmCTtA==} + + '@solana/programs@2.0.0-preview.3': + resolution: {integrity: sha512-lGbXyAdoSu9a6GjMK34fUvm2id8dFY++ktOnOfJ9hiJ6JS9nK1CKzJUDNRESdF8B/y9t8Es4YzxF0VlDFy9QnQ==} + + '@solana/rpc-api@2.0.0-preview.3': + resolution: {integrity: sha512-L6AQBPzR1n45tk2t0ROp4XPSUFQTPv2jjb6LwIkn/+ocrmzLgfvMA4EfYG3TqdLkDQqouN7Z5H/k3u7g0Tt6Fg==} + + '@solana/rpc-parsed-types@2.0.0-preview.3': + resolution: {integrity: sha512-FCGDUUM4rNTwoXGVNZ1m94f5piKY0xuTEFevUsrzHV+gdNQT57JoA6riz0tcdWJQ8vkYdh5oZSrnngxRfhrevg==} + + '@solana/rpc-spec-types@2.0.0-preview.3': + resolution: {integrity: sha512-u56NbeoYpBc1ingOT6Fu5nIDYoNfF0wbzCXA7X2iCv6qOTf2gI6yP18OZHDbxB1QWTrd+cgeCC79ZZGuN1oXng==} + + '@solana/rpc-spec@2.0.0-preview.3': + resolution: {integrity: sha512-WA7L3v5CPNuhtyaQSQWJ9DI6VRLIxm7uyKbiaFQLSd6XGRq/4aJTICwklftqyKgKRnLoXfbFth0y1ddlboCnrg==} + + '@solana/rpc-subscriptions-api@2.0.0-preview.3': + resolution: {integrity: sha512-DVc17PVRTtrq2Y4B/KoOq5MpvQsmD4qijfv6rauZS9j/1Zp/ifNv3wlQT1ZPR5D7O3iG7YrZ9pPr8G/xUvhR7w==} + + '@solana/rpc-subscriptions-spec@2.0.0-preview.3': + resolution: {integrity: sha512-hdZJzcJe6qWW1lOP2scmsByh0D6D88PUI8MHbvJPvJcN2YtH05NTkA4zZERpn71YC8kLmEz7yYRncb1YgGeLCg==} + + '@solana/rpc-subscriptions-transport-websocket@2.0.0-preview.3': + resolution: {integrity: sha512-lDdS8tZRssobOsWNlB46hTqP755ddIRwI9l6B3b16pORxKhWbKav5+9VMs81hJi8NIE8Yidy90NqrIgXnkavAw==} + peerDependencies: + ws: ^8.14.0 + + '@solana/rpc-subscriptions@2.0.0-preview.3': + resolution: {integrity: sha512-TDMrA1io0ch2OlhM6ZU1hDPYl8v4uXdiqb1oC2YsRkP8Ee6hFSroYk21WEbM0ozlTmJslr4pEEM2eFKB8kPR7A==} + + '@solana/rpc-transformers@2.0.0-preview.3': + resolution: {integrity: sha512-6JdtzomieglDGrktDywCc5C+jjnailrrlEiS8+6aoysVkvFFBWBS+er/jr0U7MI3v3khcAXokkzHePc+yC2jOg==} + + '@solana/rpc-transport-http@2.0.0-preview.3': + resolution: {integrity: sha512-mv6aK9aQ85lE0bMH+V9nU0HU5S7vCn3P805sEl+UPEVzZ/P74VWYZSx13hf/+0uirXG84Qx6GGpmY1nMAKn8DA==} + + '@solana/rpc-types@2.0.0-preview.3': + resolution: {integrity: sha512-c58YHqG92BqElH0ISXnh1nKDEr1fg0K4g6Z+HjadbvBp45P3iPwCrS4nbGMzNrKgk6YoGWixSQYzw1Tg7vQs6A==} + + '@solana/rpc@2.0.0-preview.3': + resolution: {integrity: sha512-cMqaILF1R/L71f1WVWKMP8mhkZKuHTo0wSbya2BZwK+6Kw4PngHNyjEzshej5NO0E72RhaXFdFzs3L7ezNiG2g==} + + '@solana/signers@2.0.0-preview.3': + resolution: {integrity: sha512-j9k8KrivoFMxuNk9+vgDxRLXQzC+ZwDzUntfqaNhg6T6TqIiT9NITrQO5SqDfv1/Rj1nw+JLrtl8S1nrYR9w/A==} + + '@solana/transaction-confirmation@2.0.0-preview.3': + resolution: {integrity: sha512-QCd1NutYo1kL7rUBxEQK1tM4OfdeOH6SzMY4luANduGzrPDOEnK1taatzNybZrrDt1VBz21N7ke2/WdQlKvMVg==} + + '@solana/transaction-messages@2.0.0-preview.3': + resolution: {integrity: sha512-8nfSMUe9L3CmD7D5iNVe4A9lu7d20OG5w1LhkkJNXpvenmK4IQ9WlwjWjD7gR+MzVgywICgPbw+e8FwTUFCKog==} + + '@solana/transactions@2.0.0-preview.3': + resolution: {integrity: sha512-OJ7GDzWb/eA9iFNh1hYOn9tuiZqzIr1NDLQktOdR1DeiCAGrnuweEWLLYHCA1QyZ5J/X50lX8lasMFXYtzt6zA==} + + '@solana/web3.js@2.0.0-preview.3': + resolution: {integrity: sha512-BivbEWn49waNJV3FLlyd9mYsm960snRZbj+i8PVKbYTVOejLeKyI7KEfUnz+BwbFQl+35PEO3CUp/xpdca3KOA==} + + '@solana/webcrypto-ed25519-polyfill@2.0.0-preview.3': + resolution: {integrity: sha512-MaV4swf8QJr+H7BVr9hJiZxn/nWedvCMSJB53GtHse5/EC+STdBMzfELICKXiQtycWC5V4vC9LKTOHIjx2zXhg==} + + '@types/estree@1.0.5': + resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} + + '@ungap/structured-clone@1.2.0': + resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} + + '@vercel/nft@0.26.5': + resolution: {integrity: sha512-NHxohEqad6Ra/r4lGknO52uc/GrWILXAMs1BB4401GTqww0fw1bAqzpG1XHuDO+dprg4GvsD9ZLLSsdo78p9hQ==} + engines: {node: '>=16'} + hasBin: true + + abbrev@1.1.1: + resolution: {integrity: sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==} + + acorn-import-attributes@1.9.5: + resolution: {integrity: sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==} + peerDependencies: + acorn: ^8 + + acorn-jsx@5.3.2: + resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} + peerDependencies: + acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 + + acorn-walk@8.3.3: + resolution: {integrity: sha512-MxXdReSRhGO7VlFe1bRG/oI7/mdLV9B9JJT0N8vZOhF7gFRR5l3M8W9G8JxmKV+JC5mGqJ0QvqfSOLsCPa4nUw==} + engines: {node: '>=0.4.0'} + + acorn@8.12.0: + resolution: {integrity: sha512-RTvkC4w+KNXrM39/lWCUaG0IbRkWdCv7W/IOW9oU6SawyxulvkQy5HQPVTKxEjczcUvapcrw3cFx/60VN/NRNw==} + engines: {node: '>=0.4.0'} + hasBin: true + + agent-base@6.0.2: + resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} + engines: {node: '>= 6.0.0'} + + ajv@6.12.6: + resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} + + ansi-regex@5.0.1: + resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} + engines: {node: '>=8'} + + ansi-regex@6.0.1: + resolution: {integrity: sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==} + engines: {node: '>=12'} + + ansi-styles@4.3.0: + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} + engines: {node: '>=8'} + + ansi-styles@6.2.1: + resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==} + engines: {node: '>=12'} + + any-promise@1.3.0: + resolution: {integrity: sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==} + + anymatch@3.1.3: + resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} + engines: {node: '>= 8'} + + aproba@2.0.0: + resolution: {integrity: sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==} + + are-we-there-yet@2.0.0: + resolution: {integrity: sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==} + engines: {node: '>=10'} + deprecated: This package is no longer supported. + + argparse@1.0.10: + resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} + + argparse@2.0.1: + resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + + array-find-index@1.0.2: + resolution: {integrity: sha512-M1HQyIXcBGtVywBt8WVdim+lrNaK7VHp99Qt5pSNziXznKHViIBbXWtfRTpEFpF/c4FdfxNAsCCwPp5phBYJtw==} + engines: {node: '>=0.10.0'} + + array-union@2.1.0: + resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} + engines: {node: '>=8'} + + arrgv@1.0.2: + resolution: {integrity: sha512-a4eg4yhp7mmruZDQFqVMlxNRFGi/i1r87pt8SDHy0/I8PqSXoUTlWZRdAZo0VXgvEARcujbtTk8kiZRi1uDGRw==} + engines: {node: '>=8.0.0'} + + arrify@3.0.0: + resolution: {integrity: sha512-tLkvA81vQG/XqE2mjDkGQHoOINtMHtysSnemrmoGe6PydDPMRbVugqyk4A6V/WDWEfm3l+0d8anA9r8cv/5Jaw==} + engines: {node: '>=12'} + + async-sema@3.1.1: + resolution: {integrity: sha512-tLRNUXati5MFePdAk8dw7Qt7DpxPB60ofAgn8WRhW6a2rcimZnYBP9oxHiv0OHy+Wz7kPMG+t4LGdt31+4EmGg==} + + ava@6.1.3: + resolution: {integrity: sha512-tkKbpF1pIiC+q09wNU9OfyTDYZa8yuWvU2up3+lFJ3lr1RmnYh2GBpPwzYUEB0wvTPIUysGjcZLNZr7STDviRA==} + engines: {node: ^18.18 || ^20.8 || ^21 || ^22} + hasBin: true + peerDependencies: + '@ava/typescript': '*' + peerDependenciesMeta: + '@ava/typescript': + optional: true + + balanced-match@1.0.2: + resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + + binary-extensions@2.3.0: + resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==} + engines: {node: '>=8'} + + bindings@1.5.0: + resolution: {integrity: sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==} + + blueimp-md5@2.19.0: + resolution: {integrity: sha512-DRQrD6gJyy8FbiE4s+bDoXS9hiW3Vbx5uCdwvcCf3zLHL+Iv7LtGHLpr+GZV8rHG8tK766FGYBwRbu8pELTt+w==} + + brace-expansion@1.1.11: + resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} + + brace-expansion@2.0.1: + resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} + + braces@3.0.3: + resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} + engines: {node: '>=8'} + + bundle-require@4.2.1: + resolution: {integrity: sha512-7Q/6vkyYAwOmQNRw75x+4yRtZCZJXUDmHHlFdkiV0wgv/reNjtJwpu1jPJ0w2kbEpIM0uoKI3S4/f39dU7AjSA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + peerDependencies: + esbuild: '>=0.17' + + cac@6.7.14: + resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} + engines: {node: '>=8'} + + callsites@3.1.0: + resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} + engines: {node: '>=6'} + + callsites@4.1.0: + resolution: {integrity: sha512-aBMbD1Xxay75ViYezwT40aQONfr+pSXTHwNKvIXhXD6+LY3F1dLIcceoC5OZKBVHbXcysz1hL9D2w0JJIMXpUw==} + engines: {node: '>=12.20'} + + cbor@9.0.2: + resolution: {integrity: sha512-JPypkxsB10s9QOWwa6zwPzqE1Md3vqpPc+cai4sAecuCsRyAtAl/pMyhPlMbT/xtPnm2dznJZYRLui57qiRhaQ==} + engines: {node: '>=16'} + + chalk@4.1.2: + resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} + engines: {node: '>=10'} + + chalk@5.3.0: + resolution: {integrity: sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==} + engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} + + chokidar@3.6.0: + resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} + engines: {node: '>= 8.10.0'} + + chownr@2.0.0: + resolution: {integrity: sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==} + engines: {node: '>=10'} + + chunkd@2.0.1: + resolution: {integrity: sha512-7d58XsFmOq0j6el67Ug9mHf9ELUXsQXYJBkyxhH/k+6Ke0qXRnv0kbemx+Twc6fRJ07C49lcbdgm9FL1Ei/6SQ==} + + ci-info@4.0.0: + resolution: {integrity: sha512-TdHqgGf9odd8SXNuxtUBVx8Nv+qZOejE6qyqiy5NtbYYQOeFa6zmHkxlPzmaLxWWHsU6nJmB7AETdVPi+2NBUg==} + engines: {node: '>=8'} + + ci-parallel-vars@1.0.1: + resolution: {integrity: sha512-uvzpYrpmidaoxvIQHM+rKSrigjOe9feHYbw4uOI2gdfe1C3xIlxO+kVXq83WQWNniTf8bAxVpy+cQeFQsMERKg==} + + cli-truncate@4.0.0: + resolution: {integrity: sha512-nPdaFdQ0h/GEigbPClz11D0v/ZJEwxmeVZGeMo3Z5StPtUTkA9o1lD6QwoirYiSDzbcwn2XcjwmCp68W1IS4TA==} + engines: {node: '>=18'} + + cliui@8.0.1: + resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} + engines: {node: '>=12'} + + code-excerpt@4.0.0: + resolution: {integrity: sha512-xxodCmBen3iy2i0WtAK8FlFNrRzjUqjRsMfho58xT/wvZU1YTM3fCnRjcy1gJPMepaRlgm/0e6w8SpWHpn3/cA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + + color-convert@2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} + + color-name@1.1.4: + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + + color-support@1.1.3: + resolution: {integrity: sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==} + hasBin: true + + commander@12.1.0: + resolution: {integrity: sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==} + engines: {node: '>=18'} + + commander@4.1.1: + resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==} + engines: {node: '>= 6'} + + common-path-prefix@3.0.0: + resolution: {integrity: sha512-QE33hToZseCH3jS0qN96O/bSh3kaw/h+Tq7ngyY9eWDUnTlTNUyqfqvCXioLe5Na5jFsL78ra/wuBU4iuEgd4w==} + + concat-map@0.0.1: + resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + + concordance@5.0.4: + resolution: {integrity: sha512-OAcsnTEYu1ARJqWVGwf4zh4JDfHZEaSNlNccFmt8YjB2l/n19/PF2viLINHc57vO4FKIAFl2FWASIGZZWZ2Kxw==} + engines: {node: '>=10.18.0 <11 || >=12.14.0 <13 || >=14'} + + console-control-strings@1.1.0: + resolution: {integrity: sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==} + + convert-to-spaces@2.0.1: + resolution: {integrity: sha512-rcQ1bsQO9799wq24uE5AM2tAILy4gXGIK/njFWcVQkGNZ96edlpY+A7bjwvzjYvLDyzmG1MmMLZhpcsb+klNMQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + + cross-spawn@7.0.3: + resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} + engines: {node: '>= 8'} + + currently-unhandled@0.4.1: + resolution: {integrity: sha512-/fITjgjGU50vjQ4FH6eUoYu+iUoUKIXws2hL15JJpIR+BbTxaXQsMuuyjtNh2WqsSBS5nsaZHFsFecyw5CCAng==} + engines: {node: '>=0.10.0'} + + date-time@3.1.0: + resolution: {integrity: sha512-uqCUKXE5q1PNBXjPqvwhwJf9SwMoAHBgWJ6DcrnS5o+W2JOiIILl0JEdVD8SGujrNS02GGxgwAg2PN2zONgtjg==} + engines: {node: '>=6'} + + debug@4.3.5: + resolution: {integrity: sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + + deep-is@0.1.4: + resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} + + delegates@1.0.0: + resolution: {integrity: sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==} + + detect-libc@2.0.3: + resolution: {integrity: sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==} + engines: {node: '>=8'} + + dir-glob@3.0.1: + resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} + engines: {node: '>=8'} + + doctrine@3.0.0: + resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} + engines: {node: '>=6.0.0'} + + eastasianwidth@0.2.0: + resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} + + emittery@1.0.3: + resolution: {integrity: sha512-tJdCJitoy2lrC2ldJcqN4vkqJ00lT+tOWNT1hBJjO/3FDMJa5TTIiYGCKGkn/WfCyOzUMObeohbVTj00fhiLiA==} + engines: {node: '>=14.16'} + + emoji-regex@10.3.0: + resolution: {integrity: sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==} + + emoji-regex@8.0.0: + resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + + emoji-regex@9.2.2: + resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} + + esbuild@0.21.5: + resolution: {integrity: sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==} + engines: {node: '>=12'} + hasBin: true + + escalade@3.1.2: + resolution: {integrity: sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==} + engines: {node: '>=6'} + + escape-string-regexp@2.0.0: + resolution: {integrity: sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==} + engines: {node: '>=8'} + + escape-string-regexp@4.0.0: + resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} + engines: {node: '>=10'} + + escape-string-regexp@5.0.0: + resolution: {integrity: sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==} + engines: {node: '>=12'} + + eslint-scope@7.2.2: + resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + eslint-visitor-keys@3.4.3: + resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + eslint@8.57.0: + resolution: {integrity: sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + hasBin: true + + espree@9.6.1: + resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + esprima@4.0.1: + resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} + engines: {node: '>=4'} + hasBin: true + + esquery@1.5.0: + resolution: {integrity: sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==} + engines: {node: '>=0.10'} + + esrecurse@4.3.0: + resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} + engines: {node: '>=4.0'} + + estraverse@5.3.0: + resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} + engines: {node: '>=4.0'} + + estree-walker@2.0.2: + resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} + + esutils@2.0.3: + resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} + engines: {node: '>=0.10.0'} + + execa@5.1.1: + resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==} + engines: {node: '>=10'} + + execa@8.0.1: + resolution: {integrity: sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==} + engines: {node: '>=16.17'} + + fast-deep-equal@3.1.3: + resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} + + fast-diff@1.3.0: + resolution: {integrity: sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==} + + fast-glob@3.3.2: + resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==} + engines: {node: '>=8.6.0'} + + fast-json-stable-stringify@2.1.0: + resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} + + fast-levenshtein@2.0.6: + resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} + + fastestsmallesttextencoderdecoder@1.0.22: + resolution: {integrity: sha512-Pb8d48e+oIuY4MaM64Cd7OW1gt4nxCHs7/ddPPZ/Ic3sg8yVGM7O9wDvZ7us6ScaUupzM+pfBolwtYhN1IxBIw==} + + fastq@1.17.1: + resolution: {integrity: sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==} + + figures@6.1.0: + resolution: {integrity: sha512-d+l3qxjSesT4V7v2fh+QnmFnUWv9lSpjarhShNTgBOfA0ttejbQUAlHLitbjkoRiDulW0OPoQPYIGhIC8ohejg==} + engines: {node: '>=18'} + + file-entry-cache@6.0.1: + resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} + engines: {node: ^10.12.0 || >=12.0.0} + + file-uri-to-path@1.0.0: + resolution: {integrity: sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==} + + fill-range@7.1.1: + resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} + engines: {node: '>=8'} + + find-up-simple@1.0.0: + resolution: {integrity: sha512-q7Us7kcjj2VMePAa02hDAF6d+MzsdsAWEwYyOpwUtlerRBkOEPBCRZrAV4XfcSN8fHAgaD0hP7miwoay6DCprw==} + engines: {node: '>=18'} + + find-up@5.0.0: + resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} + engines: {node: '>=10'} + + flat-cache@3.2.0: + resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} + engines: {node: ^10.12.0 || >=12.0.0} + + flatted@3.3.1: + resolution: {integrity: sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==} + + foreground-child@3.2.1: + resolution: {integrity: sha512-PXUUyLqrR2XCWICfv6ukppP96sdFwWbNEnfEMt7jNsISjMsvaLNinAHNDYyvkyU+SZG2BTSbT5NjG+vZslfGTA==} + engines: {node: '>=14'} + + fs-minipass@2.1.0: + resolution: {integrity: sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==} + engines: {node: '>= 8'} + + fs.realpath@1.0.0: + resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} + + fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + + gauge@3.0.2: + resolution: {integrity: sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==} + engines: {node: '>=10'} + deprecated: This package is no longer supported. + + get-caller-file@2.0.5: + resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} + engines: {node: 6.* || 8.* || >= 10.*} + + get-east-asian-width@1.2.0: + resolution: {integrity: sha512-2nk+7SIVb14QrgXFHcm84tD4bKQz0RxPuMT8Ag5KPOq7J5fEmAg0UbXdTOSHqNuHSU28k55qnceesxXRZGzKWA==} + engines: {node: '>=18'} + + get-stream@6.0.1: + resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} + engines: {node: '>=10'} + + get-stream@8.0.1: + resolution: {integrity: sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==} + engines: {node: '>=16'} + + glob-parent@5.1.2: + resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} + engines: {node: '>= 6'} + + glob-parent@6.0.2: + resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} + engines: {node: '>=10.13.0'} + + glob@10.4.2: + resolution: {integrity: sha512-GwMlUF6PkPo3Gk21UxkCohOv0PLcIXVtKyLlpEI28R/cO/4eNOdmLk3CMW1wROV/WR/EsZOWAfBbBOqYvs88/w==} + engines: {node: '>=16 || 14 >=14.18'} + hasBin: true + + glob@7.2.3: + resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} + deprecated: Glob versions prior to v9 are no longer supported + + globals@13.24.0: + resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} + engines: {node: '>=8'} + + globby@11.1.0: + resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} + engines: {node: '>=10'} + + globby@14.0.1: + resolution: {integrity: sha512-jOMLD2Z7MAhyG8aJpNOpmziMOP4rPLcc95oQPKXBazW82z+CEgPFBQvEpRUa1KeIMUJo4Wsm+q6uzO/Q/4BksQ==} + engines: {node: '>=18'} + + graceful-fs@4.2.11: + resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + + graphemer@1.4.0: + resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} + + has-flag@4.0.0: + resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} + engines: {node: '>=8'} + + has-unicode@2.0.1: + resolution: {integrity: sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==} + + https-proxy-agent@5.0.1: + resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==} + engines: {node: '>= 6'} + + human-signals@2.1.0: + resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} + engines: {node: '>=10.17.0'} + + human-signals@5.0.0: + resolution: {integrity: sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==} + engines: {node: '>=16.17.0'} + + ignore-by-default@2.1.0: + resolution: {integrity: sha512-yiWd4GVmJp0Q6ghmM2B/V3oZGRmjrKLXvHR3TE1nfoXsmoggllfZUQe74EN0fJdPFZu2NIvNdrMMLm3OsV7Ohw==} + engines: {node: '>=10 <11 || >=12 <13 || >=14'} + + ignore@5.3.1: + resolution: {integrity: sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==} + engines: {node: '>= 4'} + + import-fresh@3.3.0: + resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} + engines: {node: '>=6'} + + imurmurhash@0.1.4: + resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} + engines: {node: '>=0.8.19'} + + indent-string@5.0.0: + resolution: {integrity: sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==} + engines: {node: '>=12'} + + inflight@1.0.6: + resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} + deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. + + inherits@2.0.4: + resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + + irregular-plurals@3.5.0: + resolution: {integrity: sha512-1ANGLZ+Nkv1ptFb2pa8oG8Lem4krflKuX/gINiHJHjJUKaJHk/SXk5x6K3J+39/p0h1RQ2saROclJJ+QLvETCQ==} + engines: {node: '>=8'} + + is-binary-path@2.1.0: + resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} + engines: {node: '>=8'} + + is-extglob@2.1.1: + resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} + engines: {node: '>=0.10.0'} + + is-fullwidth-code-point@3.0.0: + resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} + engines: {node: '>=8'} + + is-fullwidth-code-point@4.0.0: + resolution: {integrity: sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==} + engines: {node: '>=12'} + + is-glob@4.0.3: + resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} + engines: {node: '>=0.10.0'} + + is-number@7.0.0: + resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} + engines: {node: '>=0.12.0'} + + is-path-inside@3.0.3: + resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} + engines: {node: '>=8'} + + is-plain-object@5.0.0: + resolution: {integrity: sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==} + engines: {node: '>=0.10.0'} + + is-promise@4.0.0: + resolution: {integrity: sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==} + + is-stream@2.0.1: + resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} + engines: {node: '>=8'} + + is-stream@3.0.0: + resolution: {integrity: sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + + is-unicode-supported@2.0.0: + resolution: {integrity: sha512-FRdAyx5lusK1iHG0TWpVtk9+1i+GjrzRffhDg4ovQ7mcidMQ6mj+MhKPmvh7Xwyv5gIS06ns49CA7Sqg7lC22Q==} + engines: {node: '>=18'} + + isexe@2.0.0: + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + + jackspeak@3.4.0: + resolution: {integrity: sha512-JVYhQnN59LVPFCEcVa2C3CrEKYacvjRfqIQl+h8oi91aLYQVWRYbxjPcv1bUiUy/kLmQaANrYfNMCO3kuEDHfw==} + engines: {node: '>=14'} + + joycon@3.1.1: + resolution: {integrity: sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==} + engines: {node: '>=10'} + + js-string-escape@1.0.1: + resolution: {integrity: sha512-Smw4xcfIQ5LVjAOuJCvN/zIodzA/BBSsluuoSykP+lUvScIi4U6RJLfwHet5cxFnCswUjISV8oAXaqaJDY3chg==} + engines: {node: '>= 0.8'} + + js-yaml@3.14.1: + resolution: {integrity: sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==} + hasBin: true + + js-yaml@4.1.0: + resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} + hasBin: true + + json-buffer@3.0.1: + resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} + + json-schema-traverse@0.4.1: + resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} + + json-stable-stringify-without-jsonify@1.0.1: + resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} + + keyv@4.5.4: + resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} + + levn@0.4.1: + resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} + engines: {node: '>= 0.8.0'} + + lilconfig@3.1.2: + resolution: {integrity: sha512-eop+wDAvpItUys0FWkHIKeC9ybYrTGbU41U5K7+bttZZeohvnY7M9dZ5kB21GNWiFT2q1OoPTvncPCgSOVO5ow==} + engines: {node: '>=14'} + + lines-and-columns@1.2.4: + resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} + + load-json-file@7.0.1: + resolution: {integrity: sha512-Gnxj3ev3mB5TkVBGad0JM6dmLiQL+o0t23JPBZ9sd+yvSLk05mFoqKBw5N8gbbkU4TNXyqCgIrl/VM17OgUIgQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + + load-tsconfig@0.2.5: + resolution: {integrity: sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + + locate-path@6.0.0: + resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} + engines: {node: '>=10'} + + lodash.merge@4.6.2: + resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} + + lodash.sortby@4.7.0: + resolution: {integrity: sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==} + + lodash@4.17.21: + resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} + + lru-cache@10.3.0: + resolution: {integrity: sha512-CQl19J/g+Hbjbv4Y3mFNNXFEL/5t/KCg8POCuUqd4rMKjGG+j1ybER83hxV58zL+dFI1PTkt3GNFSHRt+d8qEQ==} + engines: {node: 14 || >=16.14} + + make-dir@3.1.0: + resolution: {integrity: sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==} + engines: {node: '>=8'} + + matcher@5.0.0: + resolution: {integrity: sha512-s2EMBOWtXFc8dgqvoAzKJXxNHibcdJMV0gwqKUaw9E2JBJuGUK7DrNKrA6g/i+v72TT16+6sVm5mS3thaMLQUw==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + + md5-hex@3.0.1: + resolution: {integrity: sha512-BUiRtTtV39LIJwinWBjqVsU9xhdnz7/i889V859IBFpuqGAj6LuOvHv5XLbgZ2R7ptJoJaEcxkv88/h25T7Ciw==} + engines: {node: '>=8'} + + memoize@10.0.0: + resolution: {integrity: sha512-H6cBLgsi6vMWOcCpvVCdFFnl3kerEXbrYh9q+lY6VXvQSmM6CkmV08VOwT+WE2tzIEqRPFfAq3fm4v/UIW6mSA==} + engines: {node: '>=18'} + + merge-stream@2.0.0: + resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} + + merge2@1.4.1: + resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} + engines: {node: '>= 8'} + + micromatch@4.0.7: + resolution: {integrity: sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==} + engines: {node: '>=8.6'} + + mimic-fn@2.1.0: + resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} + engines: {node: '>=6'} + + mimic-fn@4.0.0: + resolution: {integrity: sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==} + engines: {node: '>=12'} + + mimic-function@5.0.1: + resolution: {integrity: sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==} + engines: {node: '>=18'} + + minimatch@3.1.2: + resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} + + minimatch@9.0.5: + resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} + engines: {node: '>=16 || 14 >=14.17'} + + minipass@3.3.6: + resolution: {integrity: sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==} + engines: {node: '>=8'} + + minipass@5.0.0: + resolution: {integrity: sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==} + engines: {node: '>=8'} + + minipass@7.1.2: + resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} + engines: {node: '>=16 || 14 >=14.17'} + + minizlib@2.1.2: + resolution: {integrity: sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==} + engines: {node: '>= 8'} + + mkdirp@1.0.4: + resolution: {integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==} + engines: {node: '>=10'} + hasBin: true + + ms@2.1.2: + resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} + + ms@2.1.3: + resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + + mz@2.7.0: + resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==} + + natural-compare@1.4.0: + resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} + + node-fetch@2.7.0: + resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} + engines: {node: 4.x || >=6.0.0} + peerDependencies: + encoding: ^0.1.0 + peerDependenciesMeta: + encoding: + optional: true + + node-gyp-build@4.8.1: + resolution: {integrity: sha512-OSs33Z9yWr148JZcbZd5WiAXhh/n9z8TxQcdMhIOlpN9AhWpLfvVFO73+m77bBABQMaY9XSvIa+qk0jlI7Gcaw==} + hasBin: true + + nofilter@3.1.0: + resolution: {integrity: sha512-l2NNj07e9afPnhAhvgVrCD/oy2Ai1yfLpuo3EpiO1jFTsB4sFz6oIfAfSZyQzVpkZQ9xS8ZS5g1jCBgq4Hwo0g==} + engines: {node: '>=12.19'} + + nopt@5.0.0: + resolution: {integrity: sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==} + engines: {node: '>=6'} + hasBin: true + + normalize-path@3.0.0: + resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} + engines: {node: '>=0.10.0'} + + npm-run-path@4.0.1: + resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==} + engines: {node: '>=8'} + + npm-run-path@5.3.0: + resolution: {integrity: sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + + npmlog@5.0.1: + resolution: {integrity: sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==} + deprecated: This package is no longer supported. + + object-assign@4.1.1: + resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} + engines: {node: '>=0.10.0'} + + once@1.4.0: + resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} + + onetime@5.1.2: + resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==} + engines: {node: '>=6'} + + onetime@6.0.0: + resolution: {integrity: sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==} + engines: {node: '>=12'} + + optionator@0.9.4: + resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} + engines: {node: '>= 0.8.0'} + + p-limit@3.1.0: + resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} + engines: {node: '>=10'} + + p-locate@5.0.0: + resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} + engines: {node: '>=10'} + + p-map@7.0.2: + resolution: {integrity: sha512-z4cYYMMdKHzw4O5UkWJImbZynVIo0lSGTXc7bzB1e/rrDqkgGUNysK/o4bTr+0+xKvvLoTyGqYC4Fgljy9qe1Q==} + engines: {node: '>=18'} + + package-config@5.0.0: + resolution: {integrity: sha512-GYTTew2slBcYdvRHqjhwaaydVMvn/qrGC323+nKclYioNSLTDUM/lGgtGTgyHVtYcozb+XkE8CNhwcraOmZ9Mg==} + engines: {node: '>=18'} + + package-json-from-dist@1.0.0: + resolution: {integrity: sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==} + + parent-module@1.0.1: + resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} + engines: {node: '>=6'} + + parse-ms@4.0.0: + resolution: {integrity: sha512-TXfryirbmq34y8QBwgqCVLi+8oA3oWx2eAnSn62ITyEhEYaWRlVZ2DvMM9eZbMs/RfxPu/PK/aBLyGj4IrqMHw==} + engines: {node: '>=18'} + + path-exists@4.0.0: + resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} + engines: {node: '>=8'} + + path-is-absolute@1.0.1: + resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} + engines: {node: '>=0.10.0'} + + path-key@3.1.1: + resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} + engines: {node: '>=8'} + + path-key@4.0.0: + resolution: {integrity: sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==} + engines: {node: '>=12'} + + path-scurry@1.11.1: + resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==} + engines: {node: '>=16 || 14 >=14.18'} + + path-type@4.0.0: + resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} + engines: {node: '>=8'} + + path-type@5.0.0: + resolution: {integrity: sha512-5HviZNaZcfqP95rwpv+1HDgUamezbqdSYTyzjTvwtJSnIH+3vnbmWsItli8OFEndS984VT55M3jduxZbX351gg==} + engines: {node: '>=12'} + + picomatch@2.3.1: + resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} + engines: {node: '>=8.6'} + + picomatch@3.0.1: + resolution: {integrity: sha512-I3EurrIQMlRc9IaAZnqRR044Phh2DXY+55o7uJ0V+hYZAcQYSuFWsc9q5PvyDHUSCe1Qxn/iBz+78s86zWnGag==} + engines: {node: '>=10'} + + pirates@4.0.6: + resolution: {integrity: sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==} + engines: {node: '>= 6'} + + plur@5.1.0: + resolution: {integrity: sha512-VP/72JeXqak2KiOzjgKtQen5y3IZHn+9GOuLDafPv0eXa47xq0At93XahYBs26MsifCQ4enGKwbjBTKgb9QJXg==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + + postcss-load-config@4.0.2: + resolution: {integrity: sha512-bSVhyJGL00wMVoPUzAVAnbEoWyqRxkjv64tUl427SKnPrENtq6hJwUojroMz2VB+Q1edmi4IfrAPpami5VVgMQ==} + engines: {node: '>= 14'} + peerDependencies: + postcss: '>=8.0.9' + ts-node: '>=9.0.0' + peerDependenciesMeta: + postcss: + optional: true + ts-node: + optional: true + + prelude-ls@1.2.1: + resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} + engines: {node: '>= 0.8.0'} + + prettier@3.3.2: + resolution: {integrity: sha512-rAVeHYMcv8ATV5d508CFdn+8/pHPpXeIid1DdrPwXnaAdH7cqjVbpJaT5eq4yRAFU/lsbwYwSF/n5iNrdJHPQA==} + engines: {node: '>=14'} + hasBin: true + + pretty-ms@9.0.0: + resolution: {integrity: sha512-E9e9HJ9R9NasGOgPaPE8VMeiPKAyWR5jcFpNnwIejslIhWqdqOrb2wShBsncMPUb+BcCd2OPYfh7p2W6oemTng==} + engines: {node: '>=18'} + + punycode@2.3.1: + resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} + engines: {node: '>=6'} + + queue-microtask@1.2.3: + resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} + + readable-stream@3.6.2: + resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} + engines: {node: '>= 6'} + + readdirp@3.6.0: + resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} + engines: {node: '>=8.10.0'} + + require-directory@2.1.1: + resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} + engines: {node: '>=0.10.0'} + + resolve-cwd@3.0.0: + resolution: {integrity: sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==} + engines: {node: '>=8'} + + resolve-from@4.0.0: + resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} + engines: {node: '>=4'} + + resolve-from@5.0.0: + resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} + engines: {node: '>=8'} + + reusify@1.0.4: + resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} + engines: {iojs: '>=1.0.0', node: '>=0.10.0'} + + rimraf@3.0.2: + resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} + deprecated: Rimraf versions prior to v4 are no longer supported + hasBin: true + + rimraf@5.0.7: + resolution: {integrity: sha512-nV6YcJo5wbLW77m+8KjH8aB/7/rxQy9SZ0HY5shnwULfS+9nmTtVXAJET5NdZmCzA4fPI/Hm1wo/Po/4mopOdg==} + engines: {node: '>=14.18'} + hasBin: true + + rollup@4.18.0: + resolution: {integrity: sha512-QmJz14PX3rzbJCN1SG4Xe/bAAX2a6NpCP8ab2vfu2GiUr8AQcr2nCV/oEO3yneFarB67zk8ShlIyWb2LGTb3Sg==} + engines: {node: '>=18.0.0', npm: '>=8.0.0'} + hasBin: true + + run-parallel@1.2.0: + resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} + + safe-buffer@5.2.1: + resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} + + semver@6.3.1: + resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} + hasBin: true + + semver@7.6.2: + resolution: {integrity: sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==} + engines: {node: '>=10'} + hasBin: true + + serialize-error@7.0.1: + resolution: {integrity: sha512-8I8TjW5KMOKsZQTvoxjuSIa7foAwPWGOts+6o7sgjz41/qMD9VQHEDxi6PBvK2l0MXUmqZyNpUK+T2tQaaElvw==} + engines: {node: '>=10'} + + set-blocking@2.0.0: + resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==} + + shebang-command@2.0.0: + resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} + engines: {node: '>=8'} + + shebang-regex@3.0.0: + resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} + engines: {node: '>=8'} + + signal-exit@3.0.7: + resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} + + signal-exit@4.1.0: + resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} + engines: {node: '>=14'} + + slash@3.0.0: + resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} + engines: {node: '>=8'} + + slash@5.1.0: + resolution: {integrity: sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==} + engines: {node: '>=14.16'} + + slice-ansi@5.0.0: + resolution: {integrity: sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==} + engines: {node: '>=12'} + + source-map@0.8.0-beta.0: + resolution: {integrity: sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA==} + engines: {node: '>= 8'} + + sprintf-js@1.0.3: + resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} + + stack-utils@2.0.6: + resolution: {integrity: sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==} + engines: {node: '>=10'} + + string-width@4.2.3: + resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} + engines: {node: '>=8'} + + string-width@5.1.2: + resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} + engines: {node: '>=12'} + + string-width@7.1.0: + resolution: {integrity: sha512-SEIJCWiX7Kg4c129n48aDRwLbFb2LJmXXFrWBG4NGaRtMQ3myKPKbwrD1BKqQn74oCoNMBVrfDEr5M9YxCsrkw==} + engines: {node: '>=18'} + + string_decoder@1.3.0: + resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} + + strip-ansi@6.0.1: + resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} + engines: {node: '>=8'} + + strip-ansi@7.1.0: + resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==} + engines: {node: '>=12'} + + strip-final-newline@2.0.0: + resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==} + engines: {node: '>=6'} + + strip-final-newline@3.0.0: + resolution: {integrity: sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==} + engines: {node: '>=12'} + + strip-json-comments@3.1.1: + resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} + engines: {node: '>=8'} + + sucrase@3.35.0: + resolution: {integrity: sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==} + engines: {node: '>=16 || 14 >=14.17'} + hasBin: true + + supertap@3.0.1: + resolution: {integrity: sha512-u1ZpIBCawJnO+0QePsEiOknOfCRq0yERxiAchT0i4li0WHNUJbf0evXXSXOcCAR4M8iMDoajXYmstm/qO81Isw==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + + supports-color@7.2.0: + resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} + engines: {node: '>=8'} + + tar@6.2.1: + resolution: {integrity: sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==} + engines: {node: '>=10'} + + temp-dir@3.0.0: + resolution: {integrity: sha512-nHc6S/bwIilKHNRgK/3jlhDoIHcp45YgyiwcAk46Tr0LfEqGBVpmiAyuiuxeVE44m3mXnEeVhaipLOEWmH+Njw==} + engines: {node: '>=14.16'} + + text-table@0.2.0: + resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} + + thenify-all@1.6.0: + resolution: {integrity: sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==} + engines: {node: '>=0.8'} + + thenify@3.3.1: + resolution: {integrity: sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==} + + time-zone@1.0.0: + resolution: {integrity: sha512-TIsDdtKo6+XrPtiTm1ssmMngN1sAhyKnTO2kunQWqNPWIVvCm15Wmw4SWInwTVgJ5u/Tr04+8Ei9TNcw4x4ONA==} + engines: {node: '>=4'} + + to-regex-range@5.0.1: + resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} + engines: {node: '>=8.0'} + + tr46@0.0.3: + resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} + + tr46@1.0.1: + resolution: {integrity: sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA==} + + tree-kill@1.2.2: + resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==} + hasBin: true + + ts-interface-checker@0.1.13: + resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} + + tsup@8.1.0: + resolution: {integrity: sha512-UFdfCAXukax+U6KzeTNO2kAARHcWxmKsnvSPXUcfA1D+kU05XDccCrkffCQpFaWDsZfV0jMyTsxU39VfCp6EOg==} + engines: {node: '>=18'} + hasBin: true + peerDependencies: + '@microsoft/api-extractor': ^7.36.0 + '@swc/core': ^1 + postcss: ^8.4.12 + typescript: '>=4.5.0' + peerDependenciesMeta: + '@microsoft/api-extractor': + optional: true + '@swc/core': + optional: true + postcss: + optional: true + typescript: + optional: true + + type-check@0.4.0: + resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} + engines: {node: '>= 0.8.0'} + + type-fest@0.13.1: + resolution: {integrity: sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==} + engines: {node: '>=10'} + + type-fest@0.20.2: + resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} + engines: {node: '>=10'} + + typescript@5.5.2: + resolution: {integrity: sha512-NcRtPEOsPFFWjobJEtfihkLCZCXZt/os3zf8nTxjVH3RvTSxjrCamJpbExGvYOF+tFHc3pA65qpdwPbzjohhew==} + engines: {node: '>=14.17'} + hasBin: true + + undici-types@6.19.2: + resolution: {integrity: sha512-jvI+p8VJnrOIQ8AU4PyB1ytW68EyrLnI2xvCO3e5umm3nmhNjpugMD1wo+X994PyvUT9dWS/k3vO1wwRIh730Q==} + + unicorn-magic@0.1.0: + resolution: {integrity: sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==} + engines: {node: '>=18'} + + uri-js@4.4.1: + resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} + + util-deprecate@1.0.2: + resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} + + webidl-conversions@3.0.1: + resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} + + webidl-conversions@4.0.2: + resolution: {integrity: sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==} + + well-known-symbols@2.0.0: + resolution: {integrity: sha512-ZMjC3ho+KXo0BfJb7JgtQ5IBuvnShdlACNkKkdsqBmYw3bPAaJfPeYUo6tLUaT5tG/Gkh7xkpBhKRQ9e7pyg9Q==} + engines: {node: '>=6'} + + whatwg-url@5.0.0: + resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} + + whatwg-url@7.1.0: + resolution: {integrity: sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==} + + which@2.0.2: + resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} + engines: {node: '>= 8'} + hasBin: true + + wide-align@1.1.5: + resolution: {integrity: sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==} + + word-wrap@1.2.5: + resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} + engines: {node: '>=0.10.0'} + + wrap-ansi@7.0.0: + resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} + engines: {node: '>=10'} + + wrap-ansi@8.1.0: + resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} + engines: {node: '>=12'} + + wrappy@1.0.2: + resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} + + write-file-atomic@5.0.1: + resolution: {integrity: sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + + ws@8.17.1: + resolution: {integrity: sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==} + 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 + + y18n@5.0.8: + resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} + engines: {node: '>=10'} + + yallist@4.0.0: + resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} + + yaml@2.4.5: + resolution: {integrity: sha512-aBx2bnqDzVOyNKfsysjA2ms5ZlnjSAW2eG3/L5G/CSujfjLJTJsEw1bGw8kCf04KodQWk1pxlGnZ56CRxiawmg==} + engines: {node: '>= 14'} + hasBin: true + + yargs-parser@21.1.1: + resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} + engines: {node: '>=12'} + + yargs@17.7.2: + resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} + engines: {node: '>=12'} + + yocto-queue@0.1.0: + resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} + engines: {node: '>=10'} + +snapshots: + + '@ava/typescript@5.0.0': + dependencies: + escape-string-regexp: 5.0.0 + execa: 8.0.1 + + '@dephy-io/dephy-id-program-client@file:../../../clients/js(@solana/web3.js@2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22)(ws@8.17.1))': + dependencies: + '@solana/web3.js': 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22)(ws@8.17.1) + + '@esbuild/aix-ppc64@0.21.5': + optional: true + + '@esbuild/android-arm64@0.21.5': + optional: true + + '@esbuild/android-arm@0.21.5': + optional: true + + '@esbuild/android-x64@0.21.5': + optional: true + + '@esbuild/darwin-arm64@0.21.5': + optional: true + + '@esbuild/darwin-x64@0.21.5': + optional: true + + '@esbuild/freebsd-arm64@0.21.5': + optional: true + + '@esbuild/freebsd-x64@0.21.5': + optional: true + + '@esbuild/linux-arm64@0.21.5': + optional: true + + '@esbuild/linux-arm@0.21.5': + optional: true + + '@esbuild/linux-ia32@0.21.5': + optional: true + + '@esbuild/linux-loong64@0.21.5': + optional: true + + '@esbuild/linux-mips64el@0.21.5': + optional: true + + '@esbuild/linux-ppc64@0.21.5': + optional: true + + '@esbuild/linux-riscv64@0.21.5': + optional: true + + '@esbuild/linux-s390x@0.21.5': + optional: true + + '@esbuild/linux-x64@0.21.5': + optional: true + + '@esbuild/netbsd-x64@0.21.5': + optional: true + + '@esbuild/openbsd-x64@0.21.5': + optional: true + + '@esbuild/sunos-x64@0.21.5': + optional: true + + '@esbuild/win32-arm64@0.21.5': + optional: true + + '@esbuild/win32-ia32@0.21.5': + optional: true + + '@esbuild/win32-x64@0.21.5': + optional: true + + '@eslint-community/eslint-utils@4.4.0(eslint@8.57.0)': + dependencies: + eslint: 8.57.0 + eslint-visitor-keys: 3.4.3 + + '@eslint-community/regexpp@4.11.0': {} + + '@eslint/eslintrc@2.1.4': + dependencies: + ajv: 6.12.6 + debug: 4.3.5 + espree: 9.6.1 + globals: 13.24.0 + ignore: 5.3.1 + import-fresh: 3.3.0 + js-yaml: 4.1.0 + minimatch: 3.1.2 + strip-json-comments: 3.1.1 + transitivePeerDependencies: + - supports-color + + '@eslint/js@8.57.0': {} + + '@humanwhocodes/config-array@0.11.14': + dependencies: + '@humanwhocodes/object-schema': 2.0.3 + debug: 4.3.5 + minimatch: 3.1.2 + transitivePeerDependencies: + - supports-color + + '@humanwhocodes/module-importer@1.0.1': {} + + '@humanwhocodes/object-schema@2.0.3': {} + + '@isaacs/cliui@8.0.2': + dependencies: + string-width: 5.1.2 + string-width-cjs: string-width@4.2.3 + strip-ansi: 7.1.0 + strip-ansi-cjs: strip-ansi@6.0.1 + wrap-ansi: 8.1.0 + wrap-ansi-cjs: wrap-ansi@7.0.0 + + '@jridgewell/gen-mapping@0.3.5': + dependencies: + '@jridgewell/set-array': 1.2.1 + '@jridgewell/sourcemap-codec': 1.4.15 + '@jridgewell/trace-mapping': 0.3.25 + + '@jridgewell/resolve-uri@3.1.2': {} + + '@jridgewell/set-array@1.2.1': {} + + '@jridgewell/sourcemap-codec@1.4.15': {} + + '@jridgewell/trace-mapping@0.3.25': + dependencies: + '@jridgewell/resolve-uri': 3.1.2 + '@jridgewell/sourcemap-codec': 1.4.15 + + '@mapbox/node-pre-gyp@1.0.11': + dependencies: + detect-libc: 2.0.3 + https-proxy-agent: 5.0.1 + make-dir: 3.1.0 + node-fetch: 2.7.0 + nopt: 5.0.0 + npmlog: 5.0.1 + rimraf: 3.0.2 + semver: 7.6.2 + tar: 6.2.1 + transitivePeerDependencies: + - encoding + - supports-color + + '@noble/ed25519@2.1.0': {} + + '@nodelib/fs.scandir@2.1.5': + dependencies: + '@nodelib/fs.stat': 2.0.5 + run-parallel: 1.2.0 + + '@nodelib/fs.stat@2.0.5': {} + + '@nodelib/fs.walk@1.2.8': + dependencies: + '@nodelib/fs.scandir': 2.1.5 + fastq: 1.17.1 + + '@pkgjs/parseargs@0.11.0': + optional: true + + '@rollup/pluginutils@4.2.1': + dependencies: + estree-walker: 2.0.2 + picomatch: 2.3.1 + + '@rollup/rollup-android-arm-eabi@4.18.0': + optional: true + + '@rollup/rollup-android-arm64@4.18.0': + optional: true + + '@rollup/rollup-darwin-arm64@4.18.0': + optional: true + + '@rollup/rollup-darwin-x64@4.18.0': + optional: true + + '@rollup/rollup-linux-arm-gnueabihf@4.18.0': + optional: true + + '@rollup/rollup-linux-arm-musleabihf@4.18.0': + optional: true + + '@rollup/rollup-linux-arm64-gnu@4.18.0': + optional: true + + '@rollup/rollup-linux-arm64-musl@4.18.0': + optional: true + + '@rollup/rollup-linux-powerpc64le-gnu@4.18.0': + optional: true + + '@rollup/rollup-linux-riscv64-gnu@4.18.0': + optional: true + + '@rollup/rollup-linux-s390x-gnu@4.18.0': + optional: true + + '@rollup/rollup-linux-x64-gnu@4.18.0': + optional: true + + '@rollup/rollup-linux-x64-musl@4.18.0': + optional: true + + '@rollup/rollup-win32-arm64-msvc@4.18.0': + optional: true + + '@rollup/rollup-win32-ia32-msvc@4.18.0': + optional: true + + '@rollup/rollup-win32-x64-msvc@4.18.0': + optional: true + + '@sindresorhus/merge-streams@2.3.0': {} + + '@solana/accounts@2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22)': + dependencies: + '@solana/addresses': 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22) + '@solana/codecs-core': 2.0.0-preview.3 + '@solana/codecs-strings': 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22) + '@solana/errors': 2.0.0-preview.3 + '@solana/rpc-spec': 2.0.0-preview.3 + '@solana/rpc-types': 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22) + transitivePeerDependencies: + - fastestsmallesttextencoderdecoder + + '@solana/addresses@2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22)': + dependencies: + '@solana/assertions': 2.0.0-preview.3 + '@solana/codecs-core': 2.0.0-preview.3 + '@solana/codecs-strings': 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22) + '@solana/errors': 2.0.0-preview.3 + transitivePeerDependencies: + - fastestsmallesttextencoderdecoder + + '@solana/assertions@2.0.0-preview.3': + dependencies: + '@solana/errors': 2.0.0-preview.3 + + '@solana/codecs-core@2.0.0-preview.3': + dependencies: + '@solana/errors': 2.0.0-preview.3 + + '@solana/codecs-data-structures@2.0.0-preview.3': + dependencies: + '@solana/codecs-core': 2.0.0-preview.3 + '@solana/codecs-numbers': 2.0.0-preview.3 + '@solana/errors': 2.0.0-preview.3 + + '@solana/codecs-numbers@2.0.0-preview.3': + dependencies: + '@solana/codecs-core': 2.0.0-preview.3 + '@solana/errors': 2.0.0-preview.3 + + '@solana/codecs-strings@2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22)': + dependencies: + '@solana/codecs-core': 2.0.0-preview.3 + '@solana/codecs-numbers': 2.0.0-preview.3 + '@solana/errors': 2.0.0-preview.3 + fastestsmallesttextencoderdecoder: 1.0.22 + + '@solana/codecs@2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22)': + dependencies: + '@solana/codecs-core': 2.0.0-preview.3 + '@solana/codecs-data-structures': 2.0.0-preview.3 + '@solana/codecs-numbers': 2.0.0-preview.3 + '@solana/codecs-strings': 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22) + '@solana/options': 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22) + transitivePeerDependencies: + - fastestsmallesttextencoderdecoder + + '@solana/errors@2.0.0-preview.3': + dependencies: + chalk: 5.3.0 + commander: 12.1.0 + + '@solana/fast-stable-stringify@2.0.0-preview.3': {} + + '@solana/functional@2.0.0-preview.3': {} + + '@solana/instructions@2.0.0-preview.3': + dependencies: + '@solana/errors': 2.0.0-preview.3 + + '@solana/keys@2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22)': + dependencies: + '@solana/assertions': 2.0.0-preview.3 + '@solana/codecs-core': 2.0.0-preview.3 + '@solana/codecs-strings': 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22) + '@solana/errors': 2.0.0-preview.3 + transitivePeerDependencies: + - fastestsmallesttextencoderdecoder + + '@solana/options@2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22)': + dependencies: + '@solana/codecs-core': 2.0.0-preview.3 + '@solana/codecs-data-structures': 2.0.0-preview.3 + '@solana/codecs-numbers': 2.0.0-preview.3 + '@solana/codecs-strings': 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22) + '@solana/errors': 2.0.0-preview.3 + transitivePeerDependencies: + - fastestsmallesttextencoderdecoder + + '@solana/programs@2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22)': + dependencies: + '@solana/addresses': 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22) + '@solana/errors': 2.0.0-preview.3 + transitivePeerDependencies: + - fastestsmallesttextencoderdecoder + + '@solana/rpc-api@2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22)': + dependencies: + '@solana/addresses': 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22) + '@solana/codecs-core': 2.0.0-preview.3 + '@solana/codecs-strings': 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22) + '@solana/errors': 2.0.0-preview.3 + '@solana/keys': 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22) + '@solana/rpc-parsed-types': 2.0.0-preview.3 + '@solana/rpc-spec': 2.0.0-preview.3 + '@solana/rpc-transformers': 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22) + '@solana/rpc-types': 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22) + '@solana/transaction-messages': 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22) + '@solana/transactions': 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22) + transitivePeerDependencies: + - fastestsmallesttextencoderdecoder + + '@solana/rpc-parsed-types@2.0.0-preview.3': {} + + '@solana/rpc-spec-types@2.0.0-preview.3': {} + + '@solana/rpc-spec@2.0.0-preview.3': + dependencies: + '@solana/errors': 2.0.0-preview.3 + '@solana/rpc-spec-types': 2.0.0-preview.3 + + '@solana/rpc-subscriptions-api@2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22)': + dependencies: + '@solana/addresses': 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22) + '@solana/keys': 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22) + '@solana/rpc-subscriptions-spec': 2.0.0-preview.3 + '@solana/rpc-transformers': 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22) + '@solana/rpc-types': 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22) + '@solana/transaction-messages': 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22) + '@solana/transactions': 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22) + transitivePeerDependencies: + - fastestsmallesttextencoderdecoder + + '@solana/rpc-subscriptions-spec@2.0.0-preview.3': + dependencies: + '@solana/errors': 2.0.0-preview.3 + '@solana/rpc-spec-types': 2.0.0-preview.3 + + '@solana/rpc-subscriptions-transport-websocket@2.0.0-preview.3(ws@8.17.1)': + dependencies: + '@solana/errors': 2.0.0-preview.3 + '@solana/rpc-subscriptions-spec': 2.0.0-preview.3 + ws: 8.17.1 + + '@solana/rpc-subscriptions@2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22)(ws@8.17.1)': + dependencies: + '@solana/errors': 2.0.0-preview.3 + '@solana/fast-stable-stringify': 2.0.0-preview.3 + '@solana/functional': 2.0.0-preview.3 + '@solana/rpc-subscriptions-api': 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22) + '@solana/rpc-subscriptions-spec': 2.0.0-preview.3 + '@solana/rpc-subscriptions-transport-websocket': 2.0.0-preview.3(ws@8.17.1) + '@solana/rpc-transformers': 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22) + '@solana/rpc-types': 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22) + transitivePeerDependencies: + - fastestsmallesttextencoderdecoder + - ws + + '@solana/rpc-transformers@2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22)': + dependencies: + '@solana/functional': 2.0.0-preview.3 + '@solana/rpc-spec': 2.0.0-preview.3 + '@solana/rpc-subscriptions-spec': 2.0.0-preview.3 + '@solana/rpc-types': 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22) + transitivePeerDependencies: + - fastestsmallesttextencoderdecoder + + '@solana/rpc-transport-http@2.0.0-preview.3': + dependencies: + '@solana/errors': 2.0.0-preview.3 + '@solana/rpc-spec': 2.0.0-preview.3 + undici-types: 6.19.2 + + '@solana/rpc-types@2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22)': + dependencies: + '@solana/addresses': 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22) + '@solana/codecs-core': 2.0.0-preview.3 + '@solana/codecs-numbers': 2.0.0-preview.3 + '@solana/codecs-strings': 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22) + '@solana/errors': 2.0.0-preview.3 + transitivePeerDependencies: + - fastestsmallesttextencoderdecoder + + '@solana/rpc@2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22)': + dependencies: + '@solana/errors': 2.0.0-preview.3 + '@solana/fast-stable-stringify': 2.0.0-preview.3 + '@solana/functional': 2.0.0-preview.3 + '@solana/rpc-api': 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22) + '@solana/rpc-spec': 2.0.0-preview.3 + '@solana/rpc-transformers': 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22) + '@solana/rpc-transport-http': 2.0.0-preview.3 + '@solana/rpc-types': 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22) + transitivePeerDependencies: + - fastestsmallesttextencoderdecoder + + '@solana/signers@2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22)': + dependencies: + '@solana/addresses': 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22) + '@solana/errors': 2.0.0-preview.3 + '@solana/instructions': 2.0.0-preview.3 + '@solana/keys': 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22) + '@solana/transaction-messages': 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22) + '@solana/transactions': 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22) + transitivePeerDependencies: + - fastestsmallesttextencoderdecoder + + '@solana/transaction-confirmation@2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22)(ws@8.17.1)': + dependencies: + '@solana/addresses': 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22) + '@solana/codecs-strings': 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22) + '@solana/errors': 2.0.0-preview.3 + '@solana/keys': 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22) + '@solana/rpc': 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22) + '@solana/rpc-subscriptions': 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22)(ws@8.17.1) + '@solana/rpc-types': 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22) + '@solana/transaction-messages': 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22) + '@solana/transactions': 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22) + transitivePeerDependencies: + - fastestsmallesttextencoderdecoder + - ws + + '@solana/transaction-messages@2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22)': + dependencies: + '@solana/addresses': 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22) + '@solana/codecs-core': 2.0.0-preview.3 + '@solana/codecs-data-structures': 2.0.0-preview.3 + '@solana/codecs-numbers': 2.0.0-preview.3 + '@solana/errors': 2.0.0-preview.3 + '@solana/functional': 2.0.0-preview.3 + '@solana/instructions': 2.0.0-preview.3 + '@solana/rpc-types': 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22) + transitivePeerDependencies: + - fastestsmallesttextencoderdecoder + + '@solana/transactions@2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22)': + dependencies: + '@solana/addresses': 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22) + '@solana/codecs-core': 2.0.0-preview.3 + '@solana/codecs-data-structures': 2.0.0-preview.3 + '@solana/codecs-numbers': 2.0.0-preview.3 + '@solana/codecs-strings': 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22) + '@solana/errors': 2.0.0-preview.3 + '@solana/functional': 2.0.0-preview.3 + '@solana/instructions': 2.0.0-preview.3 + '@solana/keys': 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22) + '@solana/rpc-types': 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22) + '@solana/transaction-messages': 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22) + transitivePeerDependencies: + - fastestsmallesttextencoderdecoder + + '@solana/web3.js@2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22)(ws@8.17.1)': + dependencies: + '@solana/accounts': 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22) + '@solana/addresses': 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22) + '@solana/codecs': 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22) + '@solana/errors': 2.0.0-preview.3 + '@solana/functional': 2.0.0-preview.3 + '@solana/instructions': 2.0.0-preview.3 + '@solana/keys': 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22) + '@solana/programs': 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22) + '@solana/rpc': 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22) + '@solana/rpc-parsed-types': 2.0.0-preview.3 + '@solana/rpc-subscriptions': 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22)(ws@8.17.1) + '@solana/rpc-types': 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22) + '@solana/signers': 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22) + '@solana/transaction-confirmation': 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22)(ws@8.17.1) + '@solana/transaction-messages': 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22) + '@solana/transactions': 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22) + transitivePeerDependencies: + - fastestsmallesttextencoderdecoder + - ws + + '@solana/webcrypto-ed25519-polyfill@2.0.0-preview.3': + dependencies: + '@noble/ed25519': 2.1.0 + + '@types/estree@1.0.5': {} + + '@ungap/structured-clone@1.2.0': {} + + '@vercel/nft@0.26.5': + dependencies: + '@mapbox/node-pre-gyp': 1.0.11 + '@rollup/pluginutils': 4.2.1 + acorn: 8.12.0 + acorn-import-attributes: 1.9.5(acorn@8.12.0) + async-sema: 3.1.1 + bindings: 1.5.0 + estree-walker: 2.0.2 + glob: 7.2.3 + graceful-fs: 4.2.11 + micromatch: 4.0.7 + node-gyp-build: 4.8.1 + resolve-from: 5.0.0 + transitivePeerDependencies: + - encoding + - supports-color + + abbrev@1.1.1: {} + + acorn-import-attributes@1.9.5(acorn@8.12.0): + dependencies: + acorn: 8.12.0 + + acorn-jsx@5.3.2(acorn@8.12.0): + dependencies: + acorn: 8.12.0 + + acorn-walk@8.3.3: + dependencies: + acorn: 8.12.0 + + acorn@8.12.0: {} + + agent-base@6.0.2: + dependencies: + debug: 4.3.5 + transitivePeerDependencies: + - supports-color + + ajv@6.12.6: + dependencies: + fast-deep-equal: 3.1.3 + fast-json-stable-stringify: 2.1.0 + json-schema-traverse: 0.4.1 + uri-js: 4.4.1 + + ansi-regex@5.0.1: {} + + ansi-regex@6.0.1: {} + + ansi-styles@4.3.0: + dependencies: + color-convert: 2.0.1 + + ansi-styles@6.2.1: {} + + any-promise@1.3.0: {} + + anymatch@3.1.3: + dependencies: + normalize-path: 3.0.0 + picomatch: 2.3.1 + + aproba@2.0.0: {} + + are-we-there-yet@2.0.0: + dependencies: + delegates: 1.0.0 + readable-stream: 3.6.2 + + argparse@1.0.10: + dependencies: + sprintf-js: 1.0.3 + + argparse@2.0.1: {} + + array-find-index@1.0.2: {} + + array-union@2.1.0: {} + + arrgv@1.0.2: {} + + arrify@3.0.0: {} + + async-sema@3.1.1: {} + + ava@6.1.3(@ava/typescript@5.0.0): + dependencies: + '@vercel/nft': 0.26.5 + acorn: 8.12.0 + acorn-walk: 8.3.3 + ansi-styles: 6.2.1 + arrgv: 1.0.2 + arrify: 3.0.0 + callsites: 4.1.0 + cbor: 9.0.2 + chalk: 5.3.0 + chunkd: 2.0.1 + ci-info: 4.0.0 + ci-parallel-vars: 1.0.1 + cli-truncate: 4.0.0 + code-excerpt: 4.0.0 + common-path-prefix: 3.0.0 + concordance: 5.0.4 + currently-unhandled: 0.4.1 + debug: 4.3.5 + emittery: 1.0.3 + figures: 6.1.0 + globby: 14.0.1 + ignore-by-default: 2.1.0 + indent-string: 5.0.0 + is-plain-object: 5.0.0 + is-promise: 4.0.0 + matcher: 5.0.0 + memoize: 10.0.0 + ms: 2.1.3 + p-map: 7.0.2 + package-config: 5.0.0 + picomatch: 3.0.1 + plur: 5.1.0 + pretty-ms: 9.0.0 + resolve-cwd: 3.0.0 + stack-utils: 2.0.6 + strip-ansi: 7.1.0 + supertap: 3.0.1 + temp-dir: 3.0.0 + write-file-atomic: 5.0.1 + yargs: 17.7.2 + optionalDependencies: + '@ava/typescript': 5.0.0 + transitivePeerDependencies: + - encoding + - supports-color + + balanced-match@1.0.2: {} + + binary-extensions@2.3.0: {} + + bindings@1.5.0: + dependencies: + file-uri-to-path: 1.0.0 + + blueimp-md5@2.19.0: {} + + brace-expansion@1.1.11: + dependencies: + balanced-match: 1.0.2 + concat-map: 0.0.1 + + brace-expansion@2.0.1: + dependencies: + balanced-match: 1.0.2 + + braces@3.0.3: + dependencies: + fill-range: 7.1.1 + + bundle-require@4.2.1(esbuild@0.21.5): + dependencies: + esbuild: 0.21.5 + load-tsconfig: 0.2.5 + + cac@6.7.14: {} + + callsites@3.1.0: {} + + callsites@4.1.0: {} + + cbor@9.0.2: + dependencies: + nofilter: 3.1.0 + + chalk@4.1.2: + dependencies: + ansi-styles: 4.3.0 + supports-color: 7.2.0 + + chalk@5.3.0: {} + + chokidar@3.6.0: + dependencies: + anymatch: 3.1.3 + braces: 3.0.3 + glob-parent: 5.1.2 + is-binary-path: 2.1.0 + is-glob: 4.0.3 + normalize-path: 3.0.0 + readdirp: 3.6.0 + optionalDependencies: + fsevents: 2.3.3 + + chownr@2.0.0: {} + + chunkd@2.0.1: {} + + ci-info@4.0.0: {} + + ci-parallel-vars@1.0.1: {} + + cli-truncate@4.0.0: + dependencies: + slice-ansi: 5.0.0 + string-width: 7.1.0 + + cliui@8.0.1: + dependencies: + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi: 7.0.0 + + code-excerpt@4.0.0: + dependencies: + convert-to-spaces: 2.0.1 + + color-convert@2.0.1: + dependencies: + color-name: 1.1.4 + + color-name@1.1.4: {} + + color-support@1.1.3: {} + + commander@12.1.0: {} + + commander@4.1.1: {} + + common-path-prefix@3.0.0: {} + + concat-map@0.0.1: {} + + concordance@5.0.4: + dependencies: + date-time: 3.1.0 + esutils: 2.0.3 + fast-diff: 1.3.0 + js-string-escape: 1.0.1 + lodash: 4.17.21 + md5-hex: 3.0.1 + semver: 7.6.2 + well-known-symbols: 2.0.0 + + console-control-strings@1.1.0: {} + + convert-to-spaces@2.0.1: {} + + cross-spawn@7.0.3: + dependencies: + path-key: 3.1.1 + shebang-command: 2.0.0 + which: 2.0.2 + + currently-unhandled@0.4.1: + dependencies: + array-find-index: 1.0.2 + + date-time@3.1.0: + dependencies: + time-zone: 1.0.0 + + debug@4.3.5: + dependencies: + ms: 2.1.2 + + deep-is@0.1.4: {} + + delegates@1.0.0: {} + + detect-libc@2.0.3: {} + + dir-glob@3.0.1: + dependencies: + path-type: 4.0.0 + + doctrine@3.0.0: + dependencies: + esutils: 2.0.3 + + eastasianwidth@0.2.0: {} + + emittery@1.0.3: {} + + emoji-regex@10.3.0: {} + + emoji-regex@8.0.0: {} + + emoji-regex@9.2.2: {} + + esbuild@0.21.5: + optionalDependencies: + '@esbuild/aix-ppc64': 0.21.5 + '@esbuild/android-arm': 0.21.5 + '@esbuild/android-arm64': 0.21.5 + '@esbuild/android-x64': 0.21.5 + '@esbuild/darwin-arm64': 0.21.5 + '@esbuild/darwin-x64': 0.21.5 + '@esbuild/freebsd-arm64': 0.21.5 + '@esbuild/freebsd-x64': 0.21.5 + '@esbuild/linux-arm': 0.21.5 + '@esbuild/linux-arm64': 0.21.5 + '@esbuild/linux-ia32': 0.21.5 + '@esbuild/linux-loong64': 0.21.5 + '@esbuild/linux-mips64el': 0.21.5 + '@esbuild/linux-ppc64': 0.21.5 + '@esbuild/linux-riscv64': 0.21.5 + '@esbuild/linux-s390x': 0.21.5 + '@esbuild/linux-x64': 0.21.5 + '@esbuild/netbsd-x64': 0.21.5 + '@esbuild/openbsd-x64': 0.21.5 + '@esbuild/sunos-x64': 0.21.5 + '@esbuild/win32-arm64': 0.21.5 + '@esbuild/win32-ia32': 0.21.5 + '@esbuild/win32-x64': 0.21.5 + + escalade@3.1.2: {} + + escape-string-regexp@2.0.0: {} + + escape-string-regexp@4.0.0: {} + + escape-string-regexp@5.0.0: {} + + eslint-scope@7.2.2: + dependencies: + esrecurse: 4.3.0 + estraverse: 5.3.0 + + eslint-visitor-keys@3.4.3: {} + + eslint@8.57.0: + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) + '@eslint-community/regexpp': 4.11.0 + '@eslint/eslintrc': 2.1.4 + '@eslint/js': 8.57.0 + '@humanwhocodes/config-array': 0.11.14 + '@humanwhocodes/module-importer': 1.0.1 + '@nodelib/fs.walk': 1.2.8 + '@ungap/structured-clone': 1.2.0 + ajv: 6.12.6 + chalk: 4.1.2 + cross-spawn: 7.0.3 + debug: 4.3.5 + doctrine: 3.0.0 + escape-string-regexp: 4.0.0 + eslint-scope: 7.2.2 + eslint-visitor-keys: 3.4.3 + espree: 9.6.1 + esquery: 1.5.0 + esutils: 2.0.3 + fast-deep-equal: 3.1.3 + file-entry-cache: 6.0.1 + find-up: 5.0.0 + glob-parent: 6.0.2 + globals: 13.24.0 + graphemer: 1.4.0 + ignore: 5.3.1 + imurmurhash: 0.1.4 + is-glob: 4.0.3 + is-path-inside: 3.0.3 + js-yaml: 4.1.0 + json-stable-stringify-without-jsonify: 1.0.1 + levn: 0.4.1 + lodash.merge: 4.6.2 + minimatch: 3.1.2 + natural-compare: 1.4.0 + optionator: 0.9.4 + strip-ansi: 6.0.1 + text-table: 0.2.0 + transitivePeerDependencies: + - supports-color + + espree@9.6.1: + dependencies: + acorn: 8.12.0 + acorn-jsx: 5.3.2(acorn@8.12.0) + eslint-visitor-keys: 3.4.3 + + esprima@4.0.1: {} + + esquery@1.5.0: + dependencies: + estraverse: 5.3.0 + + esrecurse@4.3.0: + dependencies: + estraverse: 5.3.0 + + estraverse@5.3.0: {} + + estree-walker@2.0.2: {} + + esutils@2.0.3: {} + + execa@5.1.1: + dependencies: + cross-spawn: 7.0.3 + get-stream: 6.0.1 + human-signals: 2.1.0 + is-stream: 2.0.1 + merge-stream: 2.0.0 + npm-run-path: 4.0.1 + onetime: 5.1.2 + signal-exit: 3.0.7 + strip-final-newline: 2.0.0 + + execa@8.0.1: + dependencies: + cross-spawn: 7.0.3 + get-stream: 8.0.1 + human-signals: 5.0.0 + is-stream: 3.0.0 + merge-stream: 2.0.0 + npm-run-path: 5.3.0 + onetime: 6.0.0 + signal-exit: 4.1.0 + strip-final-newline: 3.0.0 + + fast-deep-equal@3.1.3: {} + + fast-diff@1.3.0: {} + + fast-glob@3.3.2: + dependencies: + '@nodelib/fs.stat': 2.0.5 + '@nodelib/fs.walk': 1.2.8 + glob-parent: 5.1.2 + merge2: 1.4.1 + micromatch: 4.0.7 + + fast-json-stable-stringify@2.1.0: {} + + fast-levenshtein@2.0.6: {} + + fastestsmallesttextencoderdecoder@1.0.22: {} + + fastq@1.17.1: + dependencies: + reusify: 1.0.4 + + figures@6.1.0: + dependencies: + is-unicode-supported: 2.0.0 + + file-entry-cache@6.0.1: + dependencies: + flat-cache: 3.2.0 + + file-uri-to-path@1.0.0: {} + + fill-range@7.1.1: + dependencies: + to-regex-range: 5.0.1 + + find-up-simple@1.0.0: {} + + find-up@5.0.0: + dependencies: + locate-path: 6.0.0 + path-exists: 4.0.0 + + flat-cache@3.2.0: + dependencies: + flatted: 3.3.1 + keyv: 4.5.4 + rimraf: 3.0.2 + + flatted@3.3.1: {} + + foreground-child@3.2.1: + dependencies: + cross-spawn: 7.0.3 + signal-exit: 4.1.0 + + fs-minipass@2.1.0: + dependencies: + minipass: 3.3.6 + + fs.realpath@1.0.0: {} + + fsevents@2.3.3: + optional: true + + gauge@3.0.2: + dependencies: + aproba: 2.0.0 + color-support: 1.1.3 + console-control-strings: 1.1.0 + has-unicode: 2.0.1 + object-assign: 4.1.1 + signal-exit: 3.0.7 + string-width: 4.2.3 + strip-ansi: 6.0.1 + wide-align: 1.1.5 + + get-caller-file@2.0.5: {} + + get-east-asian-width@1.2.0: {} + + get-stream@6.0.1: {} + + get-stream@8.0.1: {} + + glob-parent@5.1.2: + dependencies: + is-glob: 4.0.3 + + glob-parent@6.0.2: + dependencies: + is-glob: 4.0.3 + + glob@10.4.2: + dependencies: + foreground-child: 3.2.1 + jackspeak: 3.4.0 + minimatch: 9.0.5 + minipass: 7.1.2 + package-json-from-dist: 1.0.0 + path-scurry: 1.11.1 + + glob@7.2.3: + dependencies: + fs.realpath: 1.0.0 + inflight: 1.0.6 + inherits: 2.0.4 + minimatch: 3.1.2 + once: 1.4.0 + path-is-absolute: 1.0.1 + + globals@13.24.0: + dependencies: + type-fest: 0.20.2 + + globby@11.1.0: + dependencies: + array-union: 2.1.0 + dir-glob: 3.0.1 + fast-glob: 3.3.2 + ignore: 5.3.1 + merge2: 1.4.1 + slash: 3.0.0 + + globby@14.0.1: + dependencies: + '@sindresorhus/merge-streams': 2.3.0 + fast-glob: 3.3.2 + ignore: 5.3.1 + path-type: 5.0.0 + slash: 5.1.0 + unicorn-magic: 0.1.0 + + graceful-fs@4.2.11: {} + + graphemer@1.4.0: {} + + has-flag@4.0.0: {} + + has-unicode@2.0.1: {} + + https-proxy-agent@5.0.1: + dependencies: + agent-base: 6.0.2 + debug: 4.3.5 + transitivePeerDependencies: + - supports-color + + human-signals@2.1.0: {} + + human-signals@5.0.0: {} + + ignore-by-default@2.1.0: {} + + ignore@5.3.1: {} + + import-fresh@3.3.0: + dependencies: + parent-module: 1.0.1 + resolve-from: 4.0.0 + + imurmurhash@0.1.4: {} + + indent-string@5.0.0: {} + + inflight@1.0.6: + dependencies: + once: 1.4.0 + wrappy: 1.0.2 + + inherits@2.0.4: {} + + irregular-plurals@3.5.0: {} + + is-binary-path@2.1.0: + dependencies: + binary-extensions: 2.3.0 + + is-extglob@2.1.1: {} + + is-fullwidth-code-point@3.0.0: {} + + is-fullwidth-code-point@4.0.0: {} + + is-glob@4.0.3: + dependencies: + is-extglob: 2.1.1 + + is-number@7.0.0: {} + + is-path-inside@3.0.3: {} + + is-plain-object@5.0.0: {} + + is-promise@4.0.0: {} + + is-stream@2.0.1: {} + + is-stream@3.0.0: {} + + is-unicode-supported@2.0.0: {} + + isexe@2.0.0: {} + + jackspeak@3.4.0: + dependencies: + '@isaacs/cliui': 8.0.2 + optionalDependencies: + '@pkgjs/parseargs': 0.11.0 + + joycon@3.1.1: {} + + js-string-escape@1.0.1: {} + + js-yaml@3.14.1: + dependencies: + argparse: 1.0.10 + esprima: 4.0.1 + + js-yaml@4.1.0: + dependencies: + argparse: 2.0.1 + + json-buffer@3.0.1: {} + + json-schema-traverse@0.4.1: {} + + json-stable-stringify-without-jsonify@1.0.1: {} + + keyv@4.5.4: + dependencies: + json-buffer: 3.0.1 + + levn@0.4.1: + dependencies: + prelude-ls: 1.2.1 + type-check: 0.4.0 + + lilconfig@3.1.2: {} + + lines-and-columns@1.2.4: {} + + load-json-file@7.0.1: {} + + load-tsconfig@0.2.5: {} + + locate-path@6.0.0: + dependencies: + p-locate: 5.0.0 + + lodash.merge@4.6.2: {} + + lodash.sortby@4.7.0: {} + + lodash@4.17.21: {} + + lru-cache@10.3.0: {} + + make-dir@3.1.0: + dependencies: + semver: 6.3.1 + + matcher@5.0.0: + dependencies: + escape-string-regexp: 5.0.0 + + md5-hex@3.0.1: + dependencies: + blueimp-md5: 2.19.0 + + memoize@10.0.0: + dependencies: + mimic-function: 5.0.1 + + merge-stream@2.0.0: {} + + merge2@1.4.1: {} + + micromatch@4.0.7: + dependencies: + braces: 3.0.3 + picomatch: 2.3.1 + + mimic-fn@2.1.0: {} + + mimic-fn@4.0.0: {} + + mimic-function@5.0.1: {} + + minimatch@3.1.2: + dependencies: + brace-expansion: 1.1.11 + + minimatch@9.0.5: + dependencies: + brace-expansion: 2.0.1 + + minipass@3.3.6: + dependencies: + yallist: 4.0.0 + + minipass@5.0.0: {} + + minipass@7.1.2: {} + + minizlib@2.1.2: + dependencies: + minipass: 3.3.6 + yallist: 4.0.0 + + mkdirp@1.0.4: {} + + ms@2.1.2: {} + + ms@2.1.3: {} + + mz@2.7.0: + dependencies: + any-promise: 1.3.0 + object-assign: 4.1.1 + thenify-all: 1.6.0 + + natural-compare@1.4.0: {} + + node-fetch@2.7.0: + dependencies: + whatwg-url: 5.0.0 + + node-gyp-build@4.8.1: {} + + nofilter@3.1.0: {} + + nopt@5.0.0: + dependencies: + abbrev: 1.1.1 + + normalize-path@3.0.0: {} + + npm-run-path@4.0.1: + dependencies: + path-key: 3.1.1 + + npm-run-path@5.3.0: + dependencies: + path-key: 4.0.0 + + npmlog@5.0.1: + dependencies: + are-we-there-yet: 2.0.0 + console-control-strings: 1.1.0 + gauge: 3.0.2 + set-blocking: 2.0.0 + + object-assign@4.1.1: {} + + once@1.4.0: + dependencies: + wrappy: 1.0.2 + + onetime@5.1.2: + dependencies: + mimic-fn: 2.1.0 + + onetime@6.0.0: + dependencies: + mimic-fn: 4.0.0 + + optionator@0.9.4: + dependencies: + deep-is: 0.1.4 + fast-levenshtein: 2.0.6 + levn: 0.4.1 + prelude-ls: 1.2.1 + type-check: 0.4.0 + word-wrap: 1.2.5 + + p-limit@3.1.0: + dependencies: + yocto-queue: 0.1.0 + + p-locate@5.0.0: + dependencies: + p-limit: 3.1.0 + + p-map@7.0.2: {} + + package-config@5.0.0: + dependencies: + find-up-simple: 1.0.0 + load-json-file: 7.0.1 + + package-json-from-dist@1.0.0: {} + + parent-module@1.0.1: + dependencies: + callsites: 3.1.0 + + parse-ms@4.0.0: {} + + path-exists@4.0.0: {} + + path-is-absolute@1.0.1: {} + + path-key@3.1.1: {} + + path-key@4.0.0: {} + + path-scurry@1.11.1: + dependencies: + lru-cache: 10.3.0 + minipass: 7.1.2 + + path-type@4.0.0: {} + + path-type@5.0.0: {} + + picomatch@2.3.1: {} + + picomatch@3.0.1: {} + + pirates@4.0.6: {} + + plur@5.1.0: + dependencies: + irregular-plurals: 3.5.0 + + postcss-load-config@4.0.2: + dependencies: + lilconfig: 3.1.2 + yaml: 2.4.5 + + prelude-ls@1.2.1: {} + + prettier@3.3.2: {} + + pretty-ms@9.0.0: + dependencies: + parse-ms: 4.0.0 + + punycode@2.3.1: {} + + queue-microtask@1.2.3: {} + + readable-stream@3.6.2: + dependencies: + inherits: 2.0.4 + string_decoder: 1.3.0 + util-deprecate: 1.0.2 + + readdirp@3.6.0: + dependencies: + picomatch: 2.3.1 + + require-directory@2.1.1: {} + + resolve-cwd@3.0.0: + dependencies: + resolve-from: 5.0.0 + + resolve-from@4.0.0: {} + + resolve-from@5.0.0: {} + + reusify@1.0.4: {} + + rimraf@3.0.2: + dependencies: + glob: 7.2.3 + + rimraf@5.0.7: + dependencies: + glob: 10.4.2 + + rollup@4.18.0: + dependencies: + '@types/estree': 1.0.5 + optionalDependencies: + '@rollup/rollup-android-arm-eabi': 4.18.0 + '@rollup/rollup-android-arm64': 4.18.0 + '@rollup/rollup-darwin-arm64': 4.18.0 + '@rollup/rollup-darwin-x64': 4.18.0 + '@rollup/rollup-linux-arm-gnueabihf': 4.18.0 + '@rollup/rollup-linux-arm-musleabihf': 4.18.0 + '@rollup/rollup-linux-arm64-gnu': 4.18.0 + '@rollup/rollup-linux-arm64-musl': 4.18.0 + '@rollup/rollup-linux-powerpc64le-gnu': 4.18.0 + '@rollup/rollup-linux-riscv64-gnu': 4.18.0 + '@rollup/rollup-linux-s390x-gnu': 4.18.0 + '@rollup/rollup-linux-x64-gnu': 4.18.0 + '@rollup/rollup-linux-x64-musl': 4.18.0 + '@rollup/rollup-win32-arm64-msvc': 4.18.0 + '@rollup/rollup-win32-ia32-msvc': 4.18.0 + '@rollup/rollup-win32-x64-msvc': 4.18.0 + fsevents: 2.3.3 + + run-parallel@1.2.0: + dependencies: + queue-microtask: 1.2.3 + + safe-buffer@5.2.1: {} + + semver@6.3.1: {} + + semver@7.6.2: {} + + serialize-error@7.0.1: + dependencies: + type-fest: 0.13.1 + + set-blocking@2.0.0: {} + + shebang-command@2.0.0: + dependencies: + shebang-regex: 3.0.0 + + shebang-regex@3.0.0: {} + + signal-exit@3.0.7: {} + + signal-exit@4.1.0: {} + + slash@3.0.0: {} + + slash@5.1.0: {} + + slice-ansi@5.0.0: + dependencies: + ansi-styles: 6.2.1 + is-fullwidth-code-point: 4.0.0 + + source-map@0.8.0-beta.0: + dependencies: + whatwg-url: 7.1.0 + + sprintf-js@1.0.3: {} + + stack-utils@2.0.6: + dependencies: + escape-string-regexp: 2.0.0 + + string-width@4.2.3: + dependencies: + emoji-regex: 8.0.0 + is-fullwidth-code-point: 3.0.0 + strip-ansi: 6.0.1 + + string-width@5.1.2: + dependencies: + eastasianwidth: 0.2.0 + emoji-regex: 9.2.2 + strip-ansi: 7.1.0 + + string-width@7.1.0: + dependencies: + emoji-regex: 10.3.0 + get-east-asian-width: 1.2.0 + strip-ansi: 7.1.0 + + string_decoder@1.3.0: + dependencies: + safe-buffer: 5.2.1 + + strip-ansi@6.0.1: + dependencies: + ansi-regex: 5.0.1 + + strip-ansi@7.1.0: + dependencies: + ansi-regex: 6.0.1 + + strip-final-newline@2.0.0: {} + + strip-final-newline@3.0.0: {} + + strip-json-comments@3.1.1: {} + + sucrase@3.35.0: + dependencies: + '@jridgewell/gen-mapping': 0.3.5 + commander: 4.1.1 + glob: 10.4.2 + lines-and-columns: 1.2.4 + mz: 2.7.0 + pirates: 4.0.6 + ts-interface-checker: 0.1.13 + + supertap@3.0.1: + dependencies: + indent-string: 5.0.0 + js-yaml: 3.14.1 + serialize-error: 7.0.1 + strip-ansi: 7.1.0 + + supports-color@7.2.0: + dependencies: + has-flag: 4.0.0 + + tar@6.2.1: + dependencies: + chownr: 2.0.0 + fs-minipass: 2.1.0 + minipass: 5.0.0 + minizlib: 2.1.2 + mkdirp: 1.0.4 + yallist: 4.0.0 + + temp-dir@3.0.0: {} + + text-table@0.2.0: {} + + thenify-all@1.6.0: + dependencies: + thenify: 3.3.1 + + thenify@3.3.1: + dependencies: + any-promise: 1.3.0 + + time-zone@1.0.0: {} + + to-regex-range@5.0.1: + dependencies: + is-number: 7.0.0 + + tr46@0.0.3: {} + + tr46@1.0.1: + dependencies: + punycode: 2.3.1 + + tree-kill@1.2.2: {} + + ts-interface-checker@0.1.13: {} + + tsup@8.1.0(typescript@5.5.2): + dependencies: + bundle-require: 4.2.1(esbuild@0.21.5) + cac: 6.7.14 + chokidar: 3.6.0 + debug: 4.3.5 + esbuild: 0.21.5 + execa: 5.1.1 + globby: 11.1.0 + joycon: 3.1.1 + postcss-load-config: 4.0.2 + resolve-from: 5.0.0 + rollup: 4.18.0 + source-map: 0.8.0-beta.0 + sucrase: 3.35.0 + tree-kill: 1.2.2 + optionalDependencies: + typescript: 5.5.2 + transitivePeerDependencies: + - supports-color + - ts-node + + type-check@0.4.0: + dependencies: + prelude-ls: 1.2.1 + + type-fest@0.13.1: {} + + type-fest@0.20.2: {} + + typescript@5.5.2: {} + + undici-types@6.19.2: {} + + unicorn-magic@0.1.0: {} + + uri-js@4.4.1: + dependencies: + punycode: 2.3.1 + + util-deprecate@1.0.2: {} + + webidl-conversions@3.0.1: {} + + webidl-conversions@4.0.2: {} + + well-known-symbols@2.0.0: {} + + whatwg-url@5.0.0: + dependencies: + tr46: 0.0.3 + webidl-conversions: 3.0.1 + + whatwg-url@7.1.0: + dependencies: + lodash.sortby: 4.7.0 + tr46: 1.0.1 + webidl-conversions: 4.0.2 + + which@2.0.2: + dependencies: + isexe: 2.0.0 + + wide-align@1.1.5: + dependencies: + string-width: 4.2.3 + + word-wrap@1.2.5: {} + + wrap-ansi@7.0.0: + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + + wrap-ansi@8.1.0: + dependencies: + ansi-styles: 6.2.1 + string-width: 5.1.2 + strip-ansi: 7.1.0 + + wrappy@1.0.2: {} + + write-file-atomic@5.0.1: + dependencies: + imurmurhash: 0.1.4 + signal-exit: 4.1.0 + + ws@8.17.1: {} + + y18n@5.0.8: {} + + yallist@4.0.0: {} + + yaml@2.4.5: {} + + yargs-parser@21.1.1: {} + + yargs@17.7.2: + dependencies: + cliui: 8.0.1 + escalade: 3.1.2 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + string-width: 4.2.3 + y18n: 5.0.8 + yargs-parser: 21.1.1 + + yocto-queue@0.1.0: {} diff --git a/wallet/clients/js/src/generated/accounts/index.ts b/wallet/clients/js/src/generated/accounts/index.ts new file mode 100644 index 0000000..5757400 --- /dev/null +++ b/wallet/clients/js/src/generated/accounts/index.ts @@ -0,0 +1,9 @@ +/** + * This code was AUTOGENERATED using the kinobi library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun kinobi to update it. + * + * @see https://github.com/kinobi-so/kinobi + */ + +export * from './wallet'; diff --git a/wallet/clients/js/src/generated/accounts/wallet.ts b/wallet/clients/js/src/generated/accounts/wallet.ts new file mode 100644 index 0000000..a92ee7a --- /dev/null +++ b/wallet/clients/js/src/generated/accounts/wallet.ts @@ -0,0 +1,154 @@ +/** + * This code was AUTOGENERATED using the kinobi library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun kinobi to update it. + * + * @see https://github.com/kinobi-so/kinobi + */ + +import { + assertAccountExists, + assertAccountsExist, + combineCodec, + decodeAccount, + fetchEncodedAccount, + fetchEncodedAccounts, + getAddressDecoder, + getAddressEncoder, + getStructDecoder, + getStructEncoder, + getU8Decoder, + getU8Encoder, + transformEncoder, + type Account, + type Address, + type Codec, + type Decoder, + type EncodedAccount, + type Encoder, + type FetchAccountConfig, + type FetchAccountsConfig, + type MaybeAccount, + type MaybeEncodedAccount, +} from '@solana/web3.js'; +import { WalletSeeds, findWalletPda } from '../pdas'; +import { Key, getKeyDecoder, getKeyEncoder } from '../types'; + +export type Wallet = { + key: Key; + authority: Address; + device: Address; + vault: Address; + vaultBump: number; +}; + +export type WalletArgs = { + authority: Address; + device: Address; + vault: Address; + vaultBump: number; +}; + +export function getWalletEncoder(): Encoder { + return transformEncoder( + getStructEncoder([ + ['key', getKeyEncoder()], + ['authority', getAddressEncoder()], + ['device', getAddressEncoder()], + ['vault', getAddressEncoder()], + ['vaultBump', getU8Encoder()], + ]), + (value) => ({ ...value, key: Key.Wallet }) + ); +} + +export function getWalletDecoder(): Decoder { + return getStructDecoder([ + ['key', getKeyDecoder()], + ['authority', getAddressDecoder()], + ['device', getAddressDecoder()], + ['vault', getAddressDecoder()], + ['vaultBump', getU8Decoder()], + ]); +} + +export function getWalletCodec(): Codec { + return combineCodec(getWalletEncoder(), getWalletDecoder()); +} + +export function decodeWallet( + encodedAccount: EncodedAccount +): Account; +export function decodeWallet( + encodedAccount: MaybeEncodedAccount +): MaybeAccount; +export function decodeWallet( + encodedAccount: EncodedAccount | MaybeEncodedAccount +): Account | MaybeAccount { + return decodeAccount( + encodedAccount as MaybeEncodedAccount, + getWalletDecoder() + ); +} + +export async function fetchWallet( + rpc: Parameters[0], + address: Address, + config?: FetchAccountConfig +): Promise> { + const maybeAccount = await fetchMaybeWallet(rpc, address, config); + assertAccountExists(maybeAccount); + return maybeAccount; +} + +export async function fetchMaybeWallet( + rpc: Parameters[0], + address: Address, + config?: FetchAccountConfig +): Promise> { + const maybeAccount = await fetchEncodedAccount(rpc, address, config); + return decodeWallet(maybeAccount); +} + +export async function fetchAllWallet( + rpc: Parameters[0], + addresses: Array
, + config?: FetchAccountsConfig +): Promise[]> { + const maybeAccounts = await fetchAllMaybeWallet(rpc, addresses, config); + assertAccountsExist(maybeAccounts); + return maybeAccounts; +} + +export async function fetchAllMaybeWallet( + rpc: Parameters[0], + addresses: Array
, + config?: FetchAccountsConfig +): Promise[]> { + const maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config); + return maybeAccounts.map((maybeAccount) => decodeWallet(maybeAccount)); +} + +export function getWalletSize(): number { + return 98; +} + +export async function fetchWalletFromSeeds( + rpc: Parameters[0], + seeds: WalletSeeds, + config: FetchAccountConfig & { programAddress?: Address } = {} +): Promise> { + const maybeAccount = await fetchMaybeWalletFromSeeds(rpc, seeds, config); + assertAccountExists(maybeAccount); + return maybeAccount; +} + +export async function fetchMaybeWalletFromSeeds( + rpc: Parameters[0], + seeds: WalletSeeds, + config: FetchAccountConfig & { programAddress?: Address } = {} +): Promise> { + const { programAddress, ...fetchConfig } = config; + const [address] = await findWalletPda(seeds, { programAddress }); + return await fetchMaybeWallet(rpc, address, fetchConfig); +} diff --git a/wallet/clients/js/src/generated/errors/dephyIdWallet.ts b/wallet/clients/js/src/generated/errors/dephyIdWallet.ts new file mode 100644 index 0000000..3df6736 --- /dev/null +++ b/wallet/clients/js/src/generated/errors/dephyIdWallet.ts @@ -0,0 +1,70 @@ +/** + * This code was AUTOGENERATED using the kinobi library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun kinobi to update it. + * + * @see https://github.com/kinobi-so/kinobi + */ + +/** DeserializationError: Error deserializing an account */ +export const DEPHY_ID_WALLET_ERROR__DESERIALIZATION_ERROR = 0x0; // 0 +/** SerializationError: Error serializing an account */ +export const DEPHY_ID_WALLET_ERROR__SERIALIZATION_ERROR = 0x1; // 1 +/** InvalidProgramOwner: Invalid program owner. This likely mean the provided account does not exist */ +export const DEPHY_ID_WALLET_ERROR__INVALID_PROGRAM_OWNER = 0x2; // 2 +/** InvalidPda: Invalid PDA derivation */ +export const DEPHY_ID_WALLET_ERROR__INVALID_PDA = 0x3; // 3 +/** ExpectedEmptyAccount: Expected empty account */ +export const DEPHY_ID_WALLET_ERROR__EXPECTED_EMPTY_ACCOUNT = 0x4; // 4 +/** ExpectedNonEmptyAccount: Expected non empty account */ +export const DEPHY_ID_WALLET_ERROR__EXPECTED_NON_EMPTY_ACCOUNT = 0x5; // 5 +/** ExpectedSignerAccount: Expected signer account */ +export const DEPHY_ID_WALLET_ERROR__EXPECTED_SIGNER_ACCOUNT = 0x6; // 6 +/** ExpectedWritableAccount: Expected writable account */ +export const DEPHY_ID_WALLET_ERROR__EXPECTED_WRITABLE_ACCOUNT = 0x7; // 7 +/** AccountMismatch: Account mismatch */ +export const DEPHY_ID_WALLET_ERROR__ACCOUNT_MISMATCH = 0x8; // 8 +/** InvalidAccountKey: Invalid account key */ +export const DEPHY_ID_WALLET_ERROR__INVALID_ACCOUNT_KEY = 0x9; // 9 +/** NumericalOverflow: Numerical overflow */ +export const DEPHY_ID_WALLET_ERROR__NUMERICAL_OVERFLOW = 0xa; // 10 + +export type DephyIdWalletError = + | typeof DEPHY_ID_WALLET_ERROR__ACCOUNT_MISMATCH + | typeof DEPHY_ID_WALLET_ERROR__DESERIALIZATION_ERROR + | typeof DEPHY_ID_WALLET_ERROR__EXPECTED_EMPTY_ACCOUNT + | typeof DEPHY_ID_WALLET_ERROR__EXPECTED_NON_EMPTY_ACCOUNT + | typeof DEPHY_ID_WALLET_ERROR__EXPECTED_SIGNER_ACCOUNT + | typeof DEPHY_ID_WALLET_ERROR__EXPECTED_WRITABLE_ACCOUNT + | typeof DEPHY_ID_WALLET_ERROR__INVALID_ACCOUNT_KEY + | typeof DEPHY_ID_WALLET_ERROR__INVALID_PDA + | typeof DEPHY_ID_WALLET_ERROR__INVALID_PROGRAM_OWNER + | typeof DEPHY_ID_WALLET_ERROR__NUMERICAL_OVERFLOW + | typeof DEPHY_ID_WALLET_ERROR__SERIALIZATION_ERROR; + +let dephyIdWalletErrorMessages: Record | undefined; +if (__DEV__) { + dephyIdWalletErrorMessages = { + [DEPHY_ID_WALLET_ERROR__ACCOUNT_MISMATCH]: `Account mismatch`, + [DEPHY_ID_WALLET_ERROR__DESERIALIZATION_ERROR]: `Error deserializing an account`, + [DEPHY_ID_WALLET_ERROR__EXPECTED_EMPTY_ACCOUNT]: `Expected empty account`, + [DEPHY_ID_WALLET_ERROR__EXPECTED_NON_EMPTY_ACCOUNT]: `Expected non empty account`, + [DEPHY_ID_WALLET_ERROR__EXPECTED_SIGNER_ACCOUNT]: `Expected signer account`, + [DEPHY_ID_WALLET_ERROR__EXPECTED_WRITABLE_ACCOUNT]: `Expected writable account`, + [DEPHY_ID_WALLET_ERROR__INVALID_ACCOUNT_KEY]: `Invalid account key`, + [DEPHY_ID_WALLET_ERROR__INVALID_PDA]: `Invalid PDA derivation`, + [DEPHY_ID_WALLET_ERROR__INVALID_PROGRAM_OWNER]: `Invalid program owner. This likely mean the provided account does not exist`, + [DEPHY_ID_WALLET_ERROR__NUMERICAL_OVERFLOW]: `Numerical overflow`, + [DEPHY_ID_WALLET_ERROR__SERIALIZATION_ERROR]: `Error serializing an account`, + }; +} + +export function getDephyIdWalletErrorMessage(code: DephyIdWalletError): string { + if (__DEV__) { + return (dephyIdWalletErrorMessages as Record)[ + code + ]; + } + + return 'Error message not available in production bundles. Compile with `__DEV__` set to true to see more information.'; +} diff --git a/wallet/clients/js/src/generated/errors/index.ts b/wallet/clients/js/src/generated/errors/index.ts new file mode 100644 index 0000000..2c8ac33 --- /dev/null +++ b/wallet/clients/js/src/generated/errors/index.ts @@ -0,0 +1,9 @@ +/** + * This code was AUTOGENERATED using the kinobi library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun kinobi to update it. + * + * @see https://github.com/kinobi-so/kinobi + */ + +export * from './dephyIdWallet'; diff --git a/wallet/clients/js/src/generated/global.d.ts b/wallet/clients/js/src/generated/global.d.ts new file mode 100644 index 0000000..549103c --- /dev/null +++ b/wallet/clients/js/src/generated/global.d.ts @@ -0,0 +1,11 @@ +/** + * This code was AUTOGENERATED using the kinobi library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun kinobi to update it. + * + * @see https://github.com/kinobi-so/kinobi + */ + +/** Global variable provided by bundlers telling us if we are building for production or not. */ +// eslint-disable-next-line @typescript-eslint/naming-convention +declare const __DEV__: boolean; diff --git a/wallet/clients/js/src/generated/index.ts b/wallet/clients/js/src/generated/index.ts new file mode 100644 index 0000000..a640c1f --- /dev/null +++ b/wallet/clients/js/src/generated/index.ts @@ -0,0 +1,14 @@ +/** + * This code was AUTOGENERATED using the kinobi library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun kinobi to update it. + * + * @see https://github.com/kinobi-so/kinobi + */ + +export * from './accounts'; +export * from './errors'; +export * from './instructions'; +export * from './pdas'; +export * from './programs'; +export * from './types'; diff --git a/wallet/clients/js/src/generated/instructions/create.ts b/wallet/clients/js/src/generated/instructions/create.ts new file mode 100644 index 0000000..5a4d3a4 --- /dev/null +++ b/wallet/clients/js/src/generated/instructions/create.ts @@ -0,0 +1,624 @@ +/** + * This code was AUTOGENERATED using the kinobi library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun kinobi to update it. + * + * @see https://github.com/kinobi-so/kinobi + */ + +import { + findDeviceMintPda, + findProductMintPda, +} from '@dephy-io/dephy-id-program-client'; +import { + combineCodec, + getStructDecoder, + getStructEncoder, + getU8Decoder, + getU8Encoder, + transformEncoder, + type Address, + type Codec, + type Decoder, + type Encoder, + type IAccountMeta, + type IAccountSignerMeta, + type IInstruction, + type IInstructionWithAccounts, + type IInstructionWithData, + type ProgramDerivedAddress, + type ReadonlyAccount, + type ReadonlySignerAccount, + type TransactionSigner, + type WritableAccount, + type WritableSignerAccount, +} from '@solana/web3.js'; +import { findVaultPda, findWalletPda } from '../pdas'; +import { DEPHY_ID_WALLET_PROGRAM_ADDRESS } from '../programs'; +import { + expectAddress, + expectProgramDerivedAddress, + expectSome, + getAccountMetaFactory, + type ResolvedAccount, +} from '../shared'; + +export type CreateInstruction< + TProgram extends string = typeof DEPHY_ID_WALLET_PROGRAM_ADDRESS, + TAccountWallet extends string | IAccountMeta = string, + TAccountAuthority extends string | IAccountMeta = string, + TAccountVault extends string | IAccountMeta = string, + TAccountVendor extends string | IAccountMeta = string, + TAccountProductMint extends string | IAccountMeta = string, + TAccountProductAssociatedToken extends string | IAccountMeta = string, + TAccountDevice extends string | IAccountMeta = string, + TAccountDeviceMint extends string | IAccountMeta = string, + TAccountDeviceAssociatedToken extends string | IAccountMeta = string, + TAccountPayer extends string | IAccountMeta = string, + TAccountSystemProgram extends + | string + | IAccountMeta = '11111111111111111111111111111111', + TAccountToken2022Program extends + | string + | IAccountMeta = 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb', + TAccountAtaProgram extends + | string + | IAccountMeta = 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL', + TRemainingAccounts extends readonly IAccountMeta[] = [], +> = IInstruction & + IInstructionWithData & + IInstructionWithAccounts< + [ + TAccountWallet extends string + ? WritableAccount + : TAccountWallet, + TAccountAuthority extends string + ? ReadonlySignerAccount & + IAccountSignerMeta + : TAccountAuthority, + TAccountVault extends string + ? ReadonlyAccount + : TAccountVault, + TAccountVendor extends string + ? ReadonlyAccount + : TAccountVendor, + TAccountProductMint extends string + ? ReadonlyAccount + : TAccountProductMint, + TAccountProductAssociatedToken extends string + ? ReadonlyAccount + : TAccountProductAssociatedToken, + TAccountDevice extends string + ? ReadonlyAccount + : TAccountDevice, + TAccountDeviceMint extends string + ? ReadonlyAccount + : TAccountDeviceMint, + TAccountDeviceAssociatedToken extends string + ? ReadonlyAccount + : TAccountDeviceAssociatedToken, + TAccountPayer extends string + ? WritableSignerAccount & + IAccountSignerMeta + : TAccountPayer, + TAccountSystemProgram extends string + ? ReadonlyAccount + : TAccountSystemProgram, + TAccountToken2022Program extends string + ? ReadonlyAccount + : TAccountToken2022Program, + TAccountAtaProgram extends string + ? ReadonlyAccount + : TAccountAtaProgram, + ...TRemainingAccounts, + ] + >; + +export type CreateInstructionData = { discriminator: number; bump: number }; + +export type CreateInstructionDataArgs = { bump: number }; + +export function getCreateInstructionDataEncoder(): Encoder { + return transformEncoder( + getStructEncoder([ + ['discriminator', getU8Encoder()], + ['bump', getU8Encoder()], + ]), + (value) => ({ ...value, discriminator: 0 }) + ); +} + +export function getCreateInstructionDataDecoder(): Decoder { + return getStructDecoder([ + ['discriminator', getU8Decoder()], + ['bump', getU8Decoder()], + ]); +} + +export function getCreateInstructionDataCodec(): Codec< + CreateInstructionDataArgs, + CreateInstructionData +> { + return combineCodec( + getCreateInstructionDataEncoder(), + getCreateInstructionDataDecoder() + ); +} + +export type CreateInstructionExtraArgs = { productName: string }; + +export type CreateAsyncInput< + TAccountWallet extends string = string, + TAccountAuthority extends string = string, + TAccountVault extends string = string, + TAccountVendor extends string = string, + TAccountProductMint extends string = string, + TAccountProductAssociatedToken extends string = string, + TAccountDevice extends string = string, + TAccountDeviceMint extends string = string, + TAccountDeviceAssociatedToken extends string = string, + TAccountPayer extends string = string, + TAccountSystemProgram extends string = string, + TAccountToken2022Program extends string = string, + TAccountAtaProgram extends string = string, +> = { + /** The program derived address of the wallet account to create (seeds: ['WALLET', authority]) */ + wallet?: ProgramDerivedAddress; + /** The authority of the wallet */ + authority: TransactionSigner; + /** The wallet vault (seeds: ['VAULT', wallet]) */ + vault?: Address; + /** The vendor */ + vendor: Address; + /** The mint account for the product */ + productMint?: Address; + /** The associated token account for the product */ + productAssociatedToken: Address; + /** The device */ + device: Address; + /** The mint account for the device */ + deviceMint?: Address; + /** DID associated token owned by authority */ + deviceAssociatedToken: Address; + /** The account paying for the storage fees */ + payer?: TransactionSigner; + /** The system program */ + systemProgram?: Address; + /** The SPL Token 2022 program */ + token2022Program?: Address; + /** The associated token program */ + ataProgram?: Address; + bump?: CreateInstructionDataArgs['bump']; + productName: CreateInstructionExtraArgs['productName']; +}; + +export async function getCreateInstructionAsync< + TAccountWallet extends string, + TAccountAuthority extends string, + TAccountVault extends string, + TAccountVendor extends string, + TAccountProductMint extends string, + TAccountProductAssociatedToken extends string, + TAccountDevice extends string, + TAccountDeviceMint extends string, + TAccountDeviceAssociatedToken extends string, + TAccountPayer extends string, + TAccountSystemProgram extends string, + TAccountToken2022Program extends string, + TAccountAtaProgram extends string, +>( + input: CreateAsyncInput< + TAccountWallet, + TAccountAuthority, + TAccountVault, + TAccountVendor, + TAccountProductMint, + TAccountProductAssociatedToken, + TAccountDevice, + TAccountDeviceMint, + TAccountDeviceAssociatedToken, + TAccountPayer, + TAccountSystemProgram, + TAccountToken2022Program, + TAccountAtaProgram + > +): Promise< + CreateInstruction< + typeof DEPHY_ID_WALLET_PROGRAM_ADDRESS, + TAccountWallet, + TAccountAuthority, + TAccountVault, + TAccountVendor, + TAccountProductMint, + TAccountProductAssociatedToken, + TAccountDevice, + TAccountDeviceMint, + TAccountDeviceAssociatedToken, + TAccountPayer, + TAccountSystemProgram, + TAccountToken2022Program, + TAccountAtaProgram + > +> { + // Program address. + const programAddress = DEPHY_ID_WALLET_PROGRAM_ADDRESS; + + // Original accounts. + const originalAccounts = { + wallet: { value: input.wallet ?? null, isWritable: true }, + authority: { value: input.authority ?? null, isWritable: false }, + vault: { value: input.vault ?? null, isWritable: false }, + vendor: { value: input.vendor ?? null, isWritable: false }, + productMint: { value: input.productMint ?? null, isWritable: false }, + productAssociatedToken: { + value: input.productAssociatedToken ?? null, + isWritable: false, + }, + device: { value: input.device ?? null, isWritable: false }, + deviceMint: { value: input.deviceMint ?? null, isWritable: false }, + deviceAssociatedToken: { + value: input.deviceAssociatedToken ?? null, + isWritable: false, + }, + payer: { value: input.payer ?? null, isWritable: true }, + systemProgram: { value: input.systemProgram ?? null, isWritable: false }, + token2022Program: { + value: input.token2022Program ?? null, + isWritable: false, + }, + ataProgram: { value: input.ataProgram ?? null, isWritable: false }, + }; + const accounts = originalAccounts as Record< + keyof typeof originalAccounts, + ResolvedAccount + >; + + // Original args. + const args = { ...input }; + + // Resolve default values. + if (!accounts.wallet.value) { + accounts.wallet.value = await findWalletPda({ + device: expectAddress(accounts.device.value), + authority: expectAddress(accounts.authority.value), + }); + } + if (!accounts.vault.value) { + accounts.vault.value = await findVaultPda({ + wallet: expectAddress(accounts.wallet.value), + }); + } + if (!accounts.productMint.value) { + accounts.productMint.value = await findProductMintPda({ + vendorPubkey: expectAddress(accounts.vendor.value), + productName: expectSome(args.productName), + }); + } + if (!accounts.deviceMint.value) { + accounts.deviceMint.value = await findDeviceMintPda({ + productMintPubkey: expectAddress(accounts.productMint.value), + devicePubkey: expectAddress(accounts.device.value), + }); + } + if (!accounts.payer.value) { + accounts.payer.value = expectSome(accounts.authority.value); + } + if (!accounts.systemProgram.value) { + accounts.systemProgram.value = + '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>; + } + if (!accounts.token2022Program.value) { + accounts.token2022Program.value = + 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>; + } + if (!accounts.ataProgram.value) { + accounts.ataProgram.value = + 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>; + } + if (!args.bump) { + args.bump = expectProgramDerivedAddress(accounts.wallet.value)[1]; + } + + const getAccountMeta = getAccountMetaFactory(programAddress, 'programId'); + const instruction = { + accounts: [ + getAccountMeta(accounts.wallet), + getAccountMeta(accounts.authority), + getAccountMeta(accounts.vault), + getAccountMeta(accounts.vendor), + getAccountMeta(accounts.productMint), + getAccountMeta(accounts.productAssociatedToken), + getAccountMeta(accounts.device), + getAccountMeta(accounts.deviceMint), + getAccountMeta(accounts.deviceAssociatedToken), + getAccountMeta(accounts.payer), + getAccountMeta(accounts.systemProgram), + getAccountMeta(accounts.token2022Program), + getAccountMeta(accounts.ataProgram), + ], + programAddress, + data: getCreateInstructionDataEncoder().encode( + args as CreateInstructionDataArgs + ), + } as CreateInstruction< + typeof DEPHY_ID_WALLET_PROGRAM_ADDRESS, + TAccountWallet, + TAccountAuthority, + TAccountVault, + TAccountVendor, + TAccountProductMint, + TAccountProductAssociatedToken, + TAccountDevice, + TAccountDeviceMint, + TAccountDeviceAssociatedToken, + TAccountPayer, + TAccountSystemProgram, + TAccountToken2022Program, + TAccountAtaProgram + >; + + return instruction; +} + +export type CreateInput< + TAccountWallet extends string = string, + TAccountAuthority extends string = string, + TAccountVault extends string = string, + TAccountVendor extends string = string, + TAccountProductMint extends string = string, + TAccountProductAssociatedToken extends string = string, + TAccountDevice extends string = string, + TAccountDeviceMint extends string = string, + TAccountDeviceAssociatedToken extends string = string, + TAccountPayer extends string = string, + TAccountSystemProgram extends string = string, + TAccountToken2022Program extends string = string, + TAccountAtaProgram extends string = string, +> = { + /** The program derived address of the wallet account to create (seeds: ['WALLET', authority]) */ + wallet: ProgramDerivedAddress; + /** The authority of the wallet */ + authority: TransactionSigner; + /** The wallet vault (seeds: ['VAULT', wallet]) */ + vault: Address; + /** The vendor */ + vendor: Address; + /** The mint account for the product */ + productMint: Address; + /** The associated token account for the product */ + productAssociatedToken: Address; + /** The device */ + device: Address; + /** The mint account for the device */ + deviceMint: Address; + /** DID associated token owned by authority */ + deviceAssociatedToken: Address; + /** The account paying for the storage fees */ + payer?: TransactionSigner; + /** The system program */ + systemProgram?: Address; + /** The SPL Token 2022 program */ + token2022Program?: Address; + /** The associated token program */ + ataProgram?: Address; + bump?: CreateInstructionDataArgs['bump']; + productName: CreateInstructionExtraArgs['productName']; +}; + +export function getCreateInstruction< + TAccountWallet extends string, + TAccountAuthority extends string, + TAccountVault extends string, + TAccountVendor extends string, + TAccountProductMint extends string, + TAccountProductAssociatedToken extends string, + TAccountDevice extends string, + TAccountDeviceMint extends string, + TAccountDeviceAssociatedToken extends string, + TAccountPayer extends string, + TAccountSystemProgram extends string, + TAccountToken2022Program extends string, + TAccountAtaProgram extends string, +>( + input: CreateInput< + TAccountWallet, + TAccountAuthority, + TAccountVault, + TAccountVendor, + TAccountProductMint, + TAccountProductAssociatedToken, + TAccountDevice, + TAccountDeviceMint, + TAccountDeviceAssociatedToken, + TAccountPayer, + TAccountSystemProgram, + TAccountToken2022Program, + TAccountAtaProgram + > +): CreateInstruction< + typeof DEPHY_ID_WALLET_PROGRAM_ADDRESS, + TAccountWallet, + TAccountAuthority, + TAccountVault, + TAccountVendor, + TAccountProductMint, + TAccountProductAssociatedToken, + TAccountDevice, + TAccountDeviceMint, + TAccountDeviceAssociatedToken, + TAccountPayer, + TAccountSystemProgram, + TAccountToken2022Program, + TAccountAtaProgram +> { + // Program address. + const programAddress = DEPHY_ID_WALLET_PROGRAM_ADDRESS; + + // Original accounts. + const originalAccounts = { + wallet: { value: input.wallet ?? null, isWritable: true }, + authority: { value: input.authority ?? null, isWritable: false }, + vault: { value: input.vault ?? null, isWritable: false }, + vendor: { value: input.vendor ?? null, isWritable: false }, + productMint: { value: input.productMint ?? null, isWritable: false }, + productAssociatedToken: { + value: input.productAssociatedToken ?? null, + isWritable: false, + }, + device: { value: input.device ?? null, isWritable: false }, + deviceMint: { value: input.deviceMint ?? null, isWritable: false }, + deviceAssociatedToken: { + value: input.deviceAssociatedToken ?? null, + isWritable: false, + }, + payer: { value: input.payer ?? null, isWritable: true }, + systemProgram: { value: input.systemProgram ?? null, isWritable: false }, + token2022Program: { + value: input.token2022Program ?? null, + isWritable: false, + }, + ataProgram: { value: input.ataProgram ?? null, isWritable: false }, + }; + const accounts = originalAccounts as Record< + keyof typeof originalAccounts, + ResolvedAccount + >; + + // Original args. + const args = { ...input }; + + // Resolve default values. + if (!accounts.payer.value) { + accounts.payer.value = expectSome(accounts.authority.value); + } + if (!accounts.systemProgram.value) { + accounts.systemProgram.value = + '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>; + } + if (!accounts.token2022Program.value) { + accounts.token2022Program.value = + 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>; + } + if (!accounts.ataProgram.value) { + accounts.ataProgram.value = + 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>; + } + if (!args.bump) { + args.bump = expectProgramDerivedAddress(accounts.wallet.value)[1]; + } + + const getAccountMeta = getAccountMetaFactory(programAddress, 'programId'); + const instruction = { + accounts: [ + getAccountMeta(accounts.wallet), + getAccountMeta(accounts.authority), + getAccountMeta(accounts.vault), + getAccountMeta(accounts.vendor), + getAccountMeta(accounts.productMint), + getAccountMeta(accounts.productAssociatedToken), + getAccountMeta(accounts.device), + getAccountMeta(accounts.deviceMint), + getAccountMeta(accounts.deviceAssociatedToken), + getAccountMeta(accounts.payer), + getAccountMeta(accounts.systemProgram), + getAccountMeta(accounts.token2022Program), + getAccountMeta(accounts.ataProgram), + ], + programAddress, + data: getCreateInstructionDataEncoder().encode( + args as CreateInstructionDataArgs + ), + } as CreateInstruction< + typeof DEPHY_ID_WALLET_PROGRAM_ADDRESS, + TAccountWallet, + TAccountAuthority, + TAccountVault, + TAccountVendor, + TAccountProductMint, + TAccountProductAssociatedToken, + TAccountDevice, + TAccountDeviceMint, + TAccountDeviceAssociatedToken, + TAccountPayer, + TAccountSystemProgram, + TAccountToken2022Program, + TAccountAtaProgram + >; + + return instruction; +} + +export type ParsedCreateInstruction< + TProgram extends string = typeof DEPHY_ID_WALLET_PROGRAM_ADDRESS, + TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[], +> = { + programAddress: Address; + accounts: { + /** The program derived address of the wallet account to create (seeds: ['WALLET', authority]) */ + wallet: TAccountMetas[0]; + /** The authority of the wallet */ + authority: TAccountMetas[1]; + /** The wallet vault (seeds: ['VAULT', wallet]) */ + vault: TAccountMetas[2]; + /** The vendor */ + vendor: TAccountMetas[3]; + /** The mint account for the product */ + productMint: TAccountMetas[4]; + /** The associated token account for the product */ + productAssociatedToken: TAccountMetas[5]; + /** The device */ + device: TAccountMetas[6]; + /** The mint account for the device */ + deviceMint: TAccountMetas[7]; + /** DID associated token owned by authority */ + deviceAssociatedToken: TAccountMetas[8]; + /** The account paying for the storage fees */ + payer: TAccountMetas[9]; + /** The system program */ + systemProgram: TAccountMetas[10]; + /** The SPL Token 2022 program */ + token2022Program: TAccountMetas[11]; + /** The associated token program */ + ataProgram: TAccountMetas[12]; + }; + data: CreateInstructionData; +}; + +export function parseCreateInstruction< + TProgram extends string, + TAccountMetas extends readonly IAccountMeta[], +>( + instruction: IInstruction & + IInstructionWithAccounts & + IInstructionWithData +): ParsedCreateInstruction { + if (instruction.accounts.length < 13) { + // TODO: Coded error. + throw new Error('Not enough accounts'); + } + let accountIndex = 0; + const getNextAccount = () => { + const accountMeta = instruction.accounts![accountIndex]!; + accountIndex += 1; + return accountMeta; + }; + return { + programAddress: instruction.programAddress, + accounts: { + wallet: getNextAccount(), + authority: getNextAccount(), + vault: getNextAccount(), + vendor: getNextAccount(), + productMint: getNextAccount(), + productAssociatedToken: getNextAccount(), + device: getNextAccount(), + deviceMint: getNextAccount(), + deviceAssociatedToken: getNextAccount(), + payer: getNextAccount(), + systemProgram: getNextAccount(), + token2022Program: getNextAccount(), + ataProgram: getNextAccount(), + }, + data: getCreateInstructionDataDecoder().decode(instruction.data), + }; +} diff --git a/wallet/clients/js/src/generated/instructions/index.ts b/wallet/clients/js/src/generated/instructions/index.ts new file mode 100644 index 0000000..cebdca8 --- /dev/null +++ b/wallet/clients/js/src/generated/instructions/index.ts @@ -0,0 +1,10 @@ +/** + * This code was AUTOGENERATED using the kinobi library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun kinobi to update it. + * + * @see https://github.com/kinobi-so/kinobi + */ + +export * from './create'; +export * from './proxyCall'; diff --git a/wallet/clients/js/src/generated/instructions/proxyCall.ts b/wallet/clients/js/src/generated/instructions/proxyCall.ts new file mode 100644 index 0000000..6b0fa67 --- /dev/null +++ b/wallet/clients/js/src/generated/instructions/proxyCall.ts @@ -0,0 +1,315 @@ +/** + * This code was AUTOGENERATED using the kinobi library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun kinobi to update it. + * + * @see https://github.com/kinobi-so/kinobi + */ + +import { + addDecoderSizePrefix, + addEncoderSizePrefix, + combineCodec, + getBytesDecoder, + getBytesEncoder, + getStructDecoder, + getStructEncoder, + getU32Decoder, + getU32Encoder, + getU8Decoder, + getU8Encoder, + transformEncoder, + type Address, + type Codec, + type Decoder, + type Encoder, + type IAccountMeta, + type IAccountSignerMeta, + type IInstruction, + type IInstructionWithAccounts, + type IInstructionWithData, + type ReadonlyAccount, + type ReadonlySignerAccount, + type ReadonlyUint8Array, + type TransactionSigner, +} from '@solana/web3.js'; +import { findVaultPda } from '../pdas'; +import { DEPHY_ID_WALLET_PROGRAM_ADDRESS } from '../programs'; +import { + expectAddress, + getAccountMetaFactory, + type ResolvedAccount, +} from '../shared'; + +export type ProxyCallInstruction< + TProgram extends string = typeof DEPHY_ID_WALLET_PROGRAM_ADDRESS, + TAccountWallet extends string | IAccountMeta = string, + TAccountAuthority extends string | IAccountMeta = string, + TAccountVault extends string | IAccountMeta = string, + TAccountTargetProgram extends string | IAccountMeta = string, + TRemainingAccounts extends readonly IAccountMeta[] = [], +> = IInstruction & + IInstructionWithData & + IInstructionWithAccounts< + [ + TAccountWallet extends string + ? ReadonlyAccount + : TAccountWallet, + TAccountAuthority extends string + ? ReadonlySignerAccount & + IAccountSignerMeta + : TAccountAuthority, + TAccountVault extends string + ? ReadonlyAccount + : TAccountVault, + TAccountTargetProgram extends string + ? ReadonlyAccount + : TAccountTargetProgram, + ...TRemainingAccounts, + ] + >; + +export type ProxyCallInstructionData = { + discriminator: number; + ixData: ReadonlyUint8Array; +}; + +export type ProxyCallInstructionDataArgs = { ixData: ReadonlyUint8Array }; + +export function getProxyCallInstructionDataEncoder(): Encoder { + return transformEncoder( + getStructEncoder([ + ['discriminator', getU8Encoder()], + ['ixData', addEncoderSizePrefix(getBytesEncoder(), getU32Encoder())], + ]), + (value) => ({ ...value, discriminator: 1 }) + ); +} + +export function getProxyCallInstructionDataDecoder(): Decoder { + return getStructDecoder([ + ['discriminator', getU8Decoder()], + ['ixData', addDecoderSizePrefix(getBytesDecoder(), getU32Decoder())], + ]); +} + +export function getProxyCallInstructionDataCodec(): Codec< + ProxyCallInstructionDataArgs, + ProxyCallInstructionData +> { + return combineCodec( + getProxyCallInstructionDataEncoder(), + getProxyCallInstructionDataDecoder() + ); +} + +export type ProxyCallAsyncInput< + TAccountWallet extends string = string, + TAccountAuthority extends string = string, + TAccountVault extends string = string, + TAccountTargetProgram extends string = string, +> = { + /** The program derived address of the wallet account to increment (seeds: ['WALLET', authority]) */ + wallet: Address; + /** The authority of the wallet */ + authority: TransactionSigner; + /** The wallet vault (seeds: ['VAULT', wallet]) */ + vault?: Address; + /** The proxy called program */ + targetProgram: Address; + ixData: ProxyCallInstructionDataArgs['ixData']; +}; + +export async function getProxyCallInstructionAsync< + TAccountWallet extends string, + TAccountAuthority extends string, + TAccountVault extends string, + TAccountTargetProgram extends string, +>( + input: ProxyCallAsyncInput< + TAccountWallet, + TAccountAuthority, + TAccountVault, + TAccountTargetProgram + > +): Promise< + ProxyCallInstruction< + typeof DEPHY_ID_WALLET_PROGRAM_ADDRESS, + TAccountWallet, + TAccountAuthority, + TAccountVault, + TAccountTargetProgram + > +> { + // Program address. + const programAddress = DEPHY_ID_WALLET_PROGRAM_ADDRESS; + + // Original accounts. + const originalAccounts = { + wallet: { value: input.wallet ?? null, isWritable: false }, + authority: { value: input.authority ?? null, isWritable: false }, + vault: { value: input.vault ?? null, isWritable: false }, + targetProgram: { value: input.targetProgram ?? null, isWritable: false }, + }; + const accounts = originalAccounts as Record< + keyof typeof originalAccounts, + ResolvedAccount + >; + + // Original args. + const args = { ...input }; + + // Resolve default values. + if (!accounts.vault.value) { + accounts.vault.value = await findVaultPda({ + wallet: expectAddress(accounts.wallet.value), + }); + } + + const getAccountMeta = getAccountMetaFactory(programAddress, 'programId'); + const instruction = { + accounts: [ + getAccountMeta(accounts.wallet), + getAccountMeta(accounts.authority), + getAccountMeta(accounts.vault), + getAccountMeta(accounts.targetProgram), + ], + programAddress, + data: getProxyCallInstructionDataEncoder().encode( + args as ProxyCallInstructionDataArgs + ), + } as ProxyCallInstruction< + typeof DEPHY_ID_WALLET_PROGRAM_ADDRESS, + TAccountWallet, + TAccountAuthority, + TAccountVault, + TAccountTargetProgram + >; + + return instruction; +} + +export type ProxyCallInput< + TAccountWallet extends string = string, + TAccountAuthority extends string = string, + TAccountVault extends string = string, + TAccountTargetProgram extends string = string, +> = { + /** The program derived address of the wallet account to increment (seeds: ['WALLET', authority]) */ + wallet: Address; + /** The authority of the wallet */ + authority: TransactionSigner; + /** The wallet vault (seeds: ['VAULT', wallet]) */ + vault: Address; + /** The proxy called program */ + targetProgram: Address; + ixData: ProxyCallInstructionDataArgs['ixData']; +}; + +export function getProxyCallInstruction< + TAccountWallet extends string, + TAccountAuthority extends string, + TAccountVault extends string, + TAccountTargetProgram extends string, +>( + input: ProxyCallInput< + TAccountWallet, + TAccountAuthority, + TAccountVault, + TAccountTargetProgram + > +): ProxyCallInstruction< + typeof DEPHY_ID_WALLET_PROGRAM_ADDRESS, + TAccountWallet, + TAccountAuthority, + TAccountVault, + TAccountTargetProgram +> { + // Program address. + const programAddress = DEPHY_ID_WALLET_PROGRAM_ADDRESS; + + // Original accounts. + const originalAccounts = { + wallet: { value: input.wallet ?? null, isWritable: false }, + authority: { value: input.authority ?? null, isWritable: false }, + vault: { value: input.vault ?? null, isWritable: false }, + targetProgram: { value: input.targetProgram ?? null, isWritable: false }, + }; + const accounts = originalAccounts as Record< + keyof typeof originalAccounts, + ResolvedAccount + >; + + // Original args. + const args = { ...input }; + + const getAccountMeta = getAccountMetaFactory(programAddress, 'programId'); + const instruction = { + accounts: [ + getAccountMeta(accounts.wallet), + getAccountMeta(accounts.authority), + getAccountMeta(accounts.vault), + getAccountMeta(accounts.targetProgram), + ], + programAddress, + data: getProxyCallInstructionDataEncoder().encode( + args as ProxyCallInstructionDataArgs + ), + } as ProxyCallInstruction< + typeof DEPHY_ID_WALLET_PROGRAM_ADDRESS, + TAccountWallet, + TAccountAuthority, + TAccountVault, + TAccountTargetProgram + >; + + return instruction; +} + +export type ParsedProxyCallInstruction< + TProgram extends string = typeof DEPHY_ID_WALLET_PROGRAM_ADDRESS, + TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[], +> = { + programAddress: Address; + accounts: { + /** The program derived address of the wallet account to increment (seeds: ['WALLET', authority]) */ + wallet: TAccountMetas[0]; + /** The authority of the wallet */ + authority: TAccountMetas[1]; + /** The wallet vault (seeds: ['VAULT', wallet]) */ + vault: TAccountMetas[2]; + /** The proxy called program */ + targetProgram: TAccountMetas[3]; + }; + data: ProxyCallInstructionData; +}; + +export function parseProxyCallInstruction< + TProgram extends string, + TAccountMetas extends readonly IAccountMeta[], +>( + instruction: IInstruction & + IInstructionWithAccounts & + IInstructionWithData +): ParsedProxyCallInstruction { + if (instruction.accounts.length < 4) { + // TODO: Coded error. + throw new Error('Not enough accounts'); + } + let accountIndex = 0; + const getNextAccount = () => { + const accountMeta = instruction.accounts![accountIndex]!; + accountIndex += 1; + return accountMeta; + }; + return { + programAddress: instruction.programAddress, + accounts: { + wallet: getNextAccount(), + authority: getNextAccount(), + vault: getNextAccount(), + targetProgram: getNextAccount(), + }, + data: getProxyCallInstructionDataDecoder().decode(instruction.data), + }; +} diff --git a/wallet/clients/js/src/generated/pdas/index.ts b/wallet/clients/js/src/generated/pdas/index.ts new file mode 100644 index 0000000..de89080 --- /dev/null +++ b/wallet/clients/js/src/generated/pdas/index.ts @@ -0,0 +1,10 @@ +/** + * This code was AUTOGENERATED using the kinobi library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun kinobi to update it. + * + * @see https://github.com/kinobi-so/kinobi + */ + +export * from './vault'; +export * from './wallet'; diff --git a/wallet/clients/js/src/generated/pdas/vault.ts b/wallet/clients/js/src/generated/pdas/vault.ts new file mode 100644 index 0000000..ae98e55 --- /dev/null +++ b/wallet/clients/js/src/generated/pdas/vault.ts @@ -0,0 +1,35 @@ +/** + * This code was AUTOGENERATED using the kinobi library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun kinobi to update it. + * + * @see https://github.com/kinobi-so/kinobi + */ + +import { + getAddressEncoder, + getProgramDerivedAddress, + getUtf8Encoder, + type Address, + type ProgramDerivedAddress, +} from '@solana/web3.js'; + +export type VaultSeeds = { + wallet: Address; +}; + +export async function findVaultPda( + seeds: VaultSeeds, + config: { programAddress?: Address | undefined } = {} +): Promise { + const { + programAddress = '5ZYZAwmhpkVUbXQWmzEnBCBRxiWdEcYYykwyApWJdEUv' as Address<'5ZYZAwmhpkVUbXQWmzEnBCBRxiWdEcYYykwyApWJdEUv'>, + } = config; + return await getProgramDerivedAddress({ + programAddress, + seeds: [ + getUtf8Encoder().encode('VAULT'), + getAddressEncoder().encode(seeds.wallet), + ], + }); +} diff --git a/wallet/clients/js/src/generated/pdas/wallet.ts b/wallet/clients/js/src/generated/pdas/wallet.ts new file mode 100644 index 0000000..e69fec7 --- /dev/null +++ b/wallet/clients/js/src/generated/pdas/wallet.ts @@ -0,0 +1,39 @@ +/** + * This code was AUTOGENERATED using the kinobi library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun kinobi to update it. + * + * @see https://github.com/kinobi-so/kinobi + */ + +import { + getAddressEncoder, + getProgramDerivedAddress, + getUtf8Encoder, + type Address, + type ProgramDerivedAddress, +} from '@solana/web3.js'; + +export type WalletSeeds = { + /** The device of the wallet account */ + device: Address; + /** The authority of the wallet account */ + authority: Address; +}; + +export async function findWalletPda( + seeds: WalletSeeds, + config: { programAddress?: Address | undefined } = {} +): Promise { + const { + programAddress = '5ZYZAwmhpkVUbXQWmzEnBCBRxiWdEcYYykwyApWJdEUv' as Address<'5ZYZAwmhpkVUbXQWmzEnBCBRxiWdEcYYykwyApWJdEUv'>, + } = config; + return await getProgramDerivedAddress({ + programAddress, + seeds: [ + getUtf8Encoder().encode('WALLET'), + getAddressEncoder().encode(seeds.device), + getAddressEncoder().encode(seeds.authority), + ], + }); +} diff --git a/wallet/clients/js/src/generated/programs/dephyIdWallet.ts b/wallet/clients/js/src/generated/programs/dephyIdWallet.ts new file mode 100644 index 0000000..ccc100b --- /dev/null +++ b/wallet/clients/js/src/generated/programs/dephyIdWallet.ts @@ -0,0 +1,64 @@ +/** + * This code was AUTOGENERATED using the kinobi library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun kinobi to update it. + * + * @see https://github.com/kinobi-so/kinobi + */ + +import { containsBytes, getU8Encoder, type Address } from '@solana/web3.js'; +import { + type ParsedCreateInstruction, + type ParsedProxyCallInstruction, +} from '../instructions'; +import { Key, getKeyEncoder } from '../types'; + +export const DEPHY_ID_WALLET_PROGRAM_ADDRESS = + '5ZYZAwmhpkVUbXQWmzEnBCBRxiWdEcYYykwyApWJdEUv' as Address<'5ZYZAwmhpkVUbXQWmzEnBCBRxiWdEcYYykwyApWJdEUv'>; + +export enum DephyIdWalletAccount { + Wallet, +} + +export function identifyDephyIdWalletAccount( + account: { data: Uint8Array } | Uint8Array +): DephyIdWalletAccount { + const data = account instanceof Uint8Array ? account : account.data; + if (containsBytes(data, getKeyEncoder().encode(Key.Wallet), 0)) { + return DephyIdWalletAccount.Wallet; + } + throw new Error( + 'The provided account could not be identified as a dephyIdWallet account.' + ); +} + +export enum DephyIdWalletInstruction { + Create, + ProxyCall, +} + +export function identifyDephyIdWalletInstruction( + instruction: { data: Uint8Array } | Uint8Array +): DephyIdWalletInstruction { + const data = + instruction instanceof Uint8Array ? instruction : instruction.data; + if (containsBytes(data, getU8Encoder().encode(0), 0)) { + return DephyIdWalletInstruction.Create; + } + if (containsBytes(data, getU8Encoder().encode(1), 0)) { + return DephyIdWalletInstruction.ProxyCall; + } + throw new Error( + 'The provided instruction could not be identified as a dephyIdWallet instruction.' + ); +} + +export type ParsedDephyIdWalletInstruction< + TProgram extends string = '5ZYZAwmhpkVUbXQWmzEnBCBRxiWdEcYYykwyApWJdEUv', +> = + | ({ + instructionType: DephyIdWalletInstruction.Create; + } & ParsedCreateInstruction) + | ({ + instructionType: DephyIdWalletInstruction.ProxyCall; + } & ParsedProxyCallInstruction); diff --git a/wallet/clients/js/src/generated/programs/index.ts b/wallet/clients/js/src/generated/programs/index.ts new file mode 100644 index 0000000..2c8ac33 --- /dev/null +++ b/wallet/clients/js/src/generated/programs/index.ts @@ -0,0 +1,9 @@ +/** + * This code was AUTOGENERATED using the kinobi library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun kinobi to update it. + * + * @see https://github.com/kinobi-so/kinobi + */ + +export * from './dephyIdWallet'; diff --git a/wallet/clients/js/src/generated/shared/index.ts b/wallet/clients/js/src/generated/shared/index.ts new file mode 100644 index 0000000..278bf59 --- /dev/null +++ b/wallet/clients/js/src/generated/shared/index.ts @@ -0,0 +1,164 @@ +/** + * This code was AUTOGENERATED using the kinobi library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun kinobi to update it. + * + * @see https://github.com/kinobi-so/kinobi + */ + +import { + AccountRole, + isProgramDerivedAddress, + isTransactionSigner as web3JsIsTransactionSigner, + type Address, + type IAccountMeta, + type IAccountSignerMeta, + type ProgramDerivedAddress, + type TransactionSigner, + upgradeRoleToSigner, +} from '@solana/web3.js'; + +/** + * Asserts that the given value is not null or undefined. + * @internal + */ +export function expectSome(value: T | null | undefined): T { + if (value == null) { + throw new Error('Expected a value but received null or undefined.'); + } + return value; +} + +/** + * Asserts that the given value is a PublicKey. + * @internal + */ +export function expectAddress( + value: + | Address + | ProgramDerivedAddress + | TransactionSigner + | null + | undefined +): Address { + if (!value) { + throw new Error('Expected a Address.'); + } + if (typeof value === 'object' && 'address' in value) { + return value.address; + } + if (Array.isArray(value)) { + return value[0]; + } + return value as Address; +} + +/** + * Asserts that the given value is a PDA. + * @internal + */ +export function expectProgramDerivedAddress( + value: + | Address + | ProgramDerivedAddress + | TransactionSigner + | null + | undefined +): ProgramDerivedAddress { + if (!value || !Array.isArray(value) || !isProgramDerivedAddress(value)) { + throw new Error('Expected a ProgramDerivedAddress.'); + } + return value; +} + +/** + * Asserts that the given value is a TransactionSigner. + * @internal + */ +export function expectTransactionSigner( + value: + | Address + | ProgramDerivedAddress + | TransactionSigner + | null + | undefined +): TransactionSigner { + if (!value || !isTransactionSigner(value)) { + throw new Error('Expected a TransactionSigner.'); + } + return value; +} + +/** + * Defines an instruction account to resolve. + * @internal + */ +export type ResolvedAccount< + T extends string = string, + U extends + | Address + | ProgramDerivedAddress + | TransactionSigner + | null = + | Address + | ProgramDerivedAddress + | TransactionSigner + | null, +> = { + isWritable: boolean; + value: U; +}; + +/** + * Defines an instruction that stores additional bytes on-chain. + * @internal + */ +export type IInstructionWithByteDelta = { + byteDelta: number; +}; + +/** + * Get account metas and signers from resolved accounts. + * @internal + */ +export function getAccountMetaFactory( + programAddress: Address, + optionalAccountStrategy: 'omitted' | 'programId' +) { + return ( + account: ResolvedAccount + ): IAccountMeta | IAccountSignerMeta | undefined => { + if (!account.value) { + if (optionalAccountStrategy === 'omitted') return; + return Object.freeze({ + address: programAddress, + role: AccountRole.READONLY, + }); + } + + const writableRole = account.isWritable + ? AccountRole.WRITABLE + : AccountRole.READONLY; + return Object.freeze({ + address: expectAddress(account.value), + role: isTransactionSigner(account.value) + ? upgradeRoleToSigner(writableRole) + : writableRole, + ...(isTransactionSigner(account.value) ? { signer: account.value } : {}), + }); + }; +} + +export function isTransactionSigner( + value: + | Address + | ProgramDerivedAddress + | TransactionSigner +): value is TransactionSigner { + return ( + !!value && + typeof value === 'object' && + 'address' in value && + web3JsIsTransactionSigner(value) + ); +} diff --git a/wallet/clients/js/src/generated/types/index.ts b/wallet/clients/js/src/generated/types/index.ts new file mode 100644 index 0000000..18acb51 --- /dev/null +++ b/wallet/clients/js/src/generated/types/index.ts @@ -0,0 +1,9 @@ +/** + * This code was AUTOGENERATED using the kinobi library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun kinobi to update it. + * + * @see https://github.com/kinobi-so/kinobi + */ + +export * from './key'; diff --git a/wallet/clients/js/src/generated/types/key.ts b/wallet/clients/js/src/generated/types/key.ts new file mode 100644 index 0000000..1444c4f --- /dev/null +++ b/wallet/clients/js/src/generated/types/key.ts @@ -0,0 +1,35 @@ +/** + * This code was AUTOGENERATED using the kinobi library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun kinobi to update it. + * + * @see https://github.com/kinobi-so/kinobi + */ + +import { + combineCodec, + getEnumDecoder, + getEnumEncoder, + type Codec, + type Decoder, + type Encoder, +} from '@solana/web3.js'; + +export enum Key { + Uninitialized, + Wallet, +} + +export type KeyArgs = Key; + +export function getKeyEncoder(): Encoder { + return getEnumEncoder(Key); +} + +export function getKeyDecoder(): Decoder { + return getEnumDecoder(Key); +} + +export function getKeyCodec(): Codec { + return combineCodec(getKeyEncoder(), getKeyDecoder()); +} diff --git a/wallet/clients/js/src/index.ts b/wallet/clients/js/src/index.ts new file mode 100644 index 0000000..7ee953f --- /dev/null +++ b/wallet/clients/js/src/index.ts @@ -0,0 +1,4 @@ +export * from './generated'; + +export * from './utils'; + diff --git a/wallet/clients/js/src/utils.d.ts b/wallet/clients/js/src/utils.d.ts new file mode 100644 index 0000000..4ae5fd6 --- /dev/null +++ b/wallet/clients/js/src/utils.d.ts @@ -0,0 +1,6 @@ +import { Account, Address, IAccountMeta, IInstruction, TransactionPartialSigner, TransactionSigner } from "@solana/web3.js"; +import { Wallet, ProxyCallInstruction } from "./generated"; + +export const getMockSigner: (address: Address) => TransactionPartialSigner; + +export const wrapInstruction: (walletAccount: Account, authority: TransactionSigner, ix: IInstruction[]>) => Promise diff --git a/wallet/clients/js/src/utils.js b/wallet/clients/js/src/utils.js new file mode 100644 index 0000000..f2fca99 --- /dev/null +++ b/wallet/clients/js/src/utils.js @@ -0,0 +1,51 @@ +import { AccountRole } from "@solana/web3.js"; +import { getProxyCallInstructionAsync } from "./generated"; + +export const getMockSigner = (address) => ({ + address, + signTransactions: async (_transactions, _config) => [] +}) + +export const wrapInstruction = async (walletAccount, authority, ix) => { + const wrappedIx = await getProxyCallInstructionAsync({ + wallet: walletAccount.address, + authority, + targetProgram: ix.programAddress, + ixData: ix.data ?? new Uint8Array(), + }) + + ix.accounts?.forEach((a) => { + if (a.address == walletAccount.data.vault) { + switch (a.role) { + case AccountRole.READONLY_SIGNER: + wrappedIx.accounts.push({ + address: a.address, + role: AccountRole.READONLY + }) + break; + case AccountRole.WRITABLE_SIGNER: + wrappedIx.accounts.push({ + address: a.address, + role: AccountRole.WRITABLE + }) + break; + case AccountRole.READONLY: + wrappedIx.accounts.push({ + address: a.address, + role: AccountRole.READONLY + }) + break; + case AccountRole.WRITABLE: + wrappedIx.accounts.push({ + address: a.address, + role: AccountRole.WRITABLE + }) + break; + } + } else { + wrappedIx.accounts.push(a) + } + }) + + return wrappedIx +} diff --git a/wallet/clients/js/test/_setup.ts b/wallet/clients/js/test/_setup.ts new file mode 100644 index 0000000..a45a3e4 --- /dev/null +++ b/wallet/clients/js/test/_setup.ts @@ -0,0 +1,236 @@ +import { + Address, + Commitment, + CompilableTransactionMessage, + TransactionMessageWithBlockhashLifetime, + Rpc, + RpcSubscriptions, + SolanaRpcApi, + SolanaRpcSubscriptionsApi, + TransactionSigner, + airdropFactory, + createSolanaRpc, + createSolanaRpcSubscriptions, + createTransactionMessage, + generateKeyPairSigner, + getSignatureFromTransaction, + lamports, + pipe, + sendAndConfirmTransactionFactory, + setTransactionMessageFeePayerSigner, + setTransactionMessageLifetimeUsingBlockhash, + signTransactionMessageWithSigners, + address, + appendTransactionMessageInstructions, + appendTransactionMessageInstruction, +} from '@solana/web3.js'; +import { + fetchMaybeProgramDataAccountFromSeeds, + findDeviceATokenPda, + findDeviceMintPda, + findProductATokenPda, + findProductMintPda, + findProgramDataAccountPda, + getCreateActivatedDeviceInstruction, + getCreateProductInstruction, + getInitializeInstruction +} from '@dephy-io/dephy-id-program-client'; +import { fetchWalletFromSeeds, getCreateInstructionAsync } from '../src'; + +type Client = { + rpc: Rpc; + rpcSubscriptions: RpcSubscriptions; +}; + +export const createDefaultSolanaClient = (): Client => { + const rpc = createSolanaRpc('http://127.0.0.1:8899'); + const rpcSubscriptions = createSolanaRpcSubscriptions('ws://127.0.0.1:8900'); + return { rpc, rpcSubscriptions }; +}; + +export const generateKeyPairSignerWithSol = async ( + client: Client, + putativeLamports: bigint = 1_000_000_000n +) => { + const signer = await generateKeyPairSigner(); + await airdropFactory(client)({ + recipientAddress: signer.address, + lamports: lamports(putativeLamports), + commitment: 'confirmed', + }); + return signer; +}; + +export const airdrop = async (client: Client, recipientAddress: Address, putativeLamports: bigint) => { + await airdropFactory(client)({ + lamports: lamports(putativeLamports), + recipientAddress, + commitment: 'confirmed', + }) +} + +export const createDefaultTransaction = async ( + client: Client, + feePayer: TransactionSigner +) => { + const { value: latestBlockhash } = await client.rpc + .getLatestBlockhash() + .send(); + return pipe( + createTransactionMessage({ version: 0 }), + (tx) => setTransactionMessageFeePayerSigner(feePayer, tx), + (tx) => setTransactionMessageLifetimeUsingBlockhash(latestBlockhash, tx) + ); +}; + +export const signAndSendTransaction = async ( + client: Client, + transactionMessage: CompilableTransactionMessage & + TransactionMessageWithBlockhashLifetime, + commitment: Commitment = 'confirmed' +) => { + const signedTransaction = + await signTransactionMessageWithSigners(transactionMessage); + const signature = getSignatureFromTransaction(signedTransaction); + await sendAndConfirmTransactionFactory(client)(signedTransaction, { + commitment, + }); + return signature; +}; + +export const getBalance = async (client: Client, address: Address) => + (await client.rpc.getBalance(address, { commitment: 'confirmed' }).send()) + .value; + + +export let dephyAuthority: TransactionSigner +export const initDephyId = async ( + client: Client, +) => { + const dephyAccount = await fetchMaybeProgramDataAccountFromSeeds(client.rpc) + if (dephyAccount.exists) { + return + } + + dephyAuthority = await generateKeyPairSignerWithSol(client) + const [transaction, [programDataAccount, bump]] = await Promise.all([ + createDefaultTransaction(client, dephyAuthority), + findProgramDataAccountPda(), + ]) + + const initIx = getInitializeInstruction({ + payer: dephyAuthority, + programData: programDataAccount, + authority: dephyAuthority, + bump, + }) + + await pipe( + transaction, + (tx) => appendTransactionMessageInstruction(initIx, tx), + (tx) => signAndSendTransaction(client, tx) + ) +} + +export const createProductAndDevice = async ( + client: Client, + owner: TransactionSigner, + productName: string, +) => { + const [transaction, vendor, device] = await Promise.all([ + createDefaultTransaction(client, owner), + generateKeyPairSignerWithSol(client), + generateKeyPairSigner(), + ]) + + const [productMint, _productMintBump] = await findProductMintPda({ + vendorPubkey: vendor.address, + productName, + }) + const [productAssociatedToken, _productAssociatedTokenBump] = await findProductATokenPda({ + devicePubkey: device.address, + productMintPubkey: productMint, + }, { + programAddress: address('ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL') + }) + + const [deviceMint, _deviceMintBump] = await findDeviceMintPda({ + productMintPubkey: productMint, + devicePubkey: device.address + }) + + const [deviceAssociatedToken, _deviceAssociatedTokenBump] = await findDeviceATokenPda({ + deviceMintPubkey: deviceMint, + ownerPubkey: owner.address, + }, { + programAddress: address('ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL') + }) + + const ixs = [ + getCreateProductInstruction({ + payer: vendor, + vendor, + productMint, + name: productName, + symbol: 'TEST', + uri: '', + additionalMetadata: [] + }), + getCreateActivatedDeviceInstruction({ + vendor: vendor.address, + productMint, + productAssociatedToken, + device, + deviceMint, + deviceAssociatedToken, + owner: owner.address, + name: 'Test Device', + uri: '', + additionalMetadata: [] + }) + ] + + await pipe( + transaction, + (tx) => appendTransactionMessageInstructions(ixs, tx), + (tx) => signAndSendTransaction(client, tx) + ) + + return { + vendor, + productMint, + productAssociatedToken, + device, + deviceMint, + deviceAssociatedToken, + } +} + +export const createWallet = async (client: Client, authority: TransactionSigner, productName: string) => { + const { + vendor, + productAssociatedToken, + device, + deviceAssociatedToken + } = await createProductAndDevice(client, authority, productName) + + const createIx = await getCreateInstructionAsync({ + authority, + vendor: vendor.address, + productAssociatedToken, + device: device.address, + deviceAssociatedToken, + productName, + }) + + await pipe( + await createDefaultTransaction(client, authority), + (tx) => appendTransactionMessageInstruction(createIx, tx), + (tx) => signAndSendTransaction(client, tx) + ) + + return await fetchWalletFromSeeds(client.rpc, { + authority: authority.address, + device: device.address, + }) +} diff --git a/wallet/clients/js/test/proxy_call.test.ts b/wallet/clients/js/test/proxy_call.test.ts new file mode 100644 index 0000000..0a7fa58 --- /dev/null +++ b/wallet/clients/js/test/proxy_call.test.ts @@ -0,0 +1,43 @@ +import test from 'ava'; +import { airdrop, createDefaultSolanaClient, createDefaultTransaction, createWallet, generateKeyPairSignerWithSol, getBalance, signAndSendTransaction } from "./_setup" +import { pipe, appendTransactionMessageInstruction, KeyPairSigner, Account, generateKeyPairSigner } from "@solana/web3.js" +import { Wallet, getMockSigner, wrapInstruction } from '../src'; +import { getTransferSolInstruction } from "@solana-program/system"; + +let client: ReturnType +let authority: KeyPairSigner + +const productName = 'Test ProxyCall Product' +let walletAccount: Account + +test.before('prepare dephy-id and wallet', async () => { + client = createDefaultSolanaClient() + authority = await generateKeyPairSignerWithSol(client) + + walletAccount = await createWallet(client, authority, productName) +}) + +test('it can transfer from wallet vault', async (t) => { + await airdrop(client, walletAccount.data.vault, 2_000_000_000n); + const dest = await generateKeyPairSigner(); + + t.assert(await getBalance(client, dest.address) == 0n, 'init balance') + + const amount = 1_000_000_000n + + const transferIx = getTransferSolInstruction({ + source: getMockSigner(walletAccount.data.vault), + destination: dest.address, + amount, + }) + + const wrappedTransferIx = await wrapInstruction(walletAccount, authority, transferIx) + + await pipe( + await createDefaultTransaction(client, authority), + (tx) => appendTransactionMessageInstruction(wrappedTransferIx, tx), + (tx) => signAndSendTransaction(client, tx) + ) + + t.assert(await getBalance(client, dest.address) == amount, 'transfer success') +}) diff --git a/wallet/clients/js/test/wallet.test.ts b/wallet/clients/js/test/wallet.test.ts new file mode 100644 index 0000000..7c876d5 --- /dev/null +++ b/wallet/clients/js/test/wallet.test.ts @@ -0,0 +1,51 @@ +import test from 'ava'; +import { createDefaultSolanaClient, createDefaultTransaction, createProductAndDevice, generateKeyPairSignerWithSol, initDephyId, signAndSendTransaction } from "./_setup" +import { Key, Wallet, fetchWalletFromSeeds, getCreateInstructionAsync } from "../src" +import { pipe, appendTransactionMessageInstruction, Account } from "@solana/web3.js" + +let client: ReturnType + +test.before('prepare dephy-id', async () => { + client = createDefaultSolanaClient() + await initDephyId(client) +}) + +test('it creates a wallet with did token', async (t) => { + const productName = 'Test Wallet Product' + const authority = await generateKeyPairSignerWithSol(client) + + const { + vendor, + productAssociatedToken, + device, + deviceAssociatedToken + } = await createProductAndDevice(client, authority, productName) + + const createIx = await getCreateInstructionAsync({ + authority, + vendor: vendor.address, + productAssociatedToken, + device: device.address, + deviceAssociatedToken, + productName, + }) + + await pipe( + await createDefaultTransaction(client, authority), + (tx) => appendTransactionMessageInstruction(createIx, tx), + (tx) => signAndSendTransaction(client, tx) + ) + + const wallet = await fetchWalletFromSeeds(client.rpc, { + authority: authority.address, + device: device.address, + }) + + t.like(wallet, >{ + data: { + key: Key.Wallet, + authority: authority.address, + device: device.address, + } + }) +}) diff --git a/wallet/clients/js/tsconfig.declarations.json b/wallet/clients/js/tsconfig.declarations.json new file mode 100644 index 0000000..15577bc --- /dev/null +++ b/wallet/clients/js/tsconfig.declarations.json @@ -0,0 +1,10 @@ +{ + "compilerOptions": { + "declaration": true, + "declarationMap": true, + "emitDeclarationOnly": true, + "outDir": "./dist/types", + }, + "extends": "./tsconfig.json", + "include": ["src"] +} diff --git a/wallet/clients/js/tsconfig.json b/wallet/clients/js/tsconfig.json new file mode 100644 index 0000000..1c8e60c --- /dev/null +++ b/wallet/clients/js/tsconfig.json @@ -0,0 +1,24 @@ +{ + "$schema": "https://json.schemastore.org/tsconfig", + "compilerOptions": { + "composite": false, + "declaration": true, + "declarationMap": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "inlineSources": false, + "isolatedModules": true, + "module": "ESNext", + "moduleResolution": "node", + "noFallthroughCasesInSwitch": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "outDir": "./dist", + "preserveWatchOutput": true, + "skipLibCheck": true, + "strict": true, + "target": "ESNext" + }, + "exclude": ["node_modules"], + "include": ["src", "test"] +} diff --git a/wallet/clients/js/tsup.config.ts b/wallet/clients/js/tsup.config.ts new file mode 100644 index 0000000..8b1468d --- /dev/null +++ b/wallet/clients/js/tsup.config.ts @@ -0,0 +1,28 @@ +import { env } from 'node:process'; +import path from 'path'; +import { defineConfig, Options } from 'tsup'; + +const SHARED_OPTIONS: Options = { + define: { __VERSION__: `"${env.npm_package_version}"` }, + entry: ['./src/index.ts'], + inject: [path.resolve(__dirname, 'env-shim.ts')], + outDir: './dist/src', + outExtension: ({ format }) => ({ js: format === 'cjs' ? '.js' : '.mjs' }), + sourcemap: true, + treeshake: true, +}; + +export default defineConfig(() => [ + // Source. + { ...SHARED_OPTIONS, format: 'cjs' }, + { ...SHARED_OPTIONS, format: 'esm' }, + + // Tests. + { + ...SHARED_OPTIONS, + bundle: false, + entry: ['./test/**/*.ts'], + format: 'cjs', + outDir: './dist/test', + }, +]); diff --git a/wallet/package.json b/wallet/package.json new file mode 100644 index 0000000..44df3c1 --- /dev/null +++ b/wallet/package.json @@ -0,0 +1,31 @@ +{ + "private": true, + "scripts": { + "programs:build": "zx ./scripts/program/build.mjs", + "programs:test": "zx ./scripts/program/test.mjs", + "programs:clean": "zx ./scripts/program/clean.mjs", + "programs:format": "zx ./scripts/program/format.mjs", + "programs:lint": "zx ./scripts/program/lint.mjs", + "generate:idls": "zx ./scripts/generate-idls.mjs", + "generate": "pnpm generate:idls && pnpm generate:clients", + "generate:clients": "zx ./scripts/generate-clients.mjs", + "validator:start": "zx ./scripts/start-validator.mjs", + "validator:restart": "pnpm validator:start --restart", + "validator:stop": "zx ./scripts/stop-validator.mjs", + "clients:js:lint": "zx ./scripts/client/lint-js.mjs", + "clients:js:test": "zx ./scripts/client/test-js.mjs", + "clients:rust:lint": "zx ./scripts/client/lint-rust.mjs", + "clients:rust:test": "zx ./scripts/client/test-rust.mjs" + }, + "devDependencies": { + "@iarna/toml": "^2.2.5", + "@kinobi-so/nodes-from-anchor": "^0.20.6", + "@kinobi-so/renderers-js": "^0.20.9", + "@kinobi-so/renderers-rust": "^0.20.10", + "kinobi": "^0.20.4", + "typescript": "^5.5.2", + "zx": "^7.2.3", + "@dephy-io/dephy-id-program-client": "file:../clients/js" + }, + "packageManager": "pnpm@9.4.0" +} diff --git a/wallet/program/Cargo.toml b/wallet/program/Cargo.toml new file mode 100644 index 0000000..382110a --- /dev/null +++ b/wallet/program/Cargo.toml @@ -0,0 +1,30 @@ +[package] +name = "dephy-id-wallet" +version = "0.0.0" +edition = "2021" +readme = "./README.md" +license-file = "../LICENSE" +publish = false + +[package.metadata.solana] +program-id = "5ZYZAwmhpkVUbXQWmzEnBCBRxiWdEcYYykwyApWJdEUv" +account-dependencies = [] + +[package.metadata.solana.program-dependencies] +dephy_id_program = "hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1" + +[lib] +crate-type = ["cdylib", "lib"] + +[dependencies] +borsh = "1.5.1" +shank = "^0.4.2" +num-derive = "0.4.2" +num-traits = "^0.2" +solana-program = "~2.0" +thiserror = "^1.0" +dephy-id-program-client = { path = "../../clients/rust" } +spl-token-2022 = { version = "4.0.0", features = ["no-entrypoint"] } +spl-associated-token-account = { version = "4.0.0", features = ["no-entrypoint"] } +spl-token-metadata-interface = "0.4.0" + diff --git a/wallet/program/idl.json b/wallet/program/idl.json new file mode 100644 index 0000000..b52f350 --- /dev/null +++ b/wallet/program/idl.json @@ -0,0 +1,281 @@ +{ + "version": "0.0.0", + "name": "dephy_id_wallet", + "instructions": [ + { + "name": "Create", + "accounts": [ + { + "name": "wallet", + "isMut": true, + "isSigner": false, + "docs": [ + "The program derived address of the wallet account to create (seeds: ['WALLET', authority])" + ] + }, + { + "name": "authority", + "isMut": false, + "isSigner": true, + "docs": [ + "The authority of the wallet" + ] + }, + { + "name": "vault", + "isMut": false, + "isSigner": false, + "docs": [ + "The wallet vault (seeds: ['VAULT', wallet])" + ] + }, + { + "name": "vendor", + "isMut": false, + "isSigner": false, + "docs": [ + "The vendor" + ] + }, + { + "name": "productMint", + "isMut": false, + "isSigner": false, + "docs": [ + "The mint account for the product" + ] + }, + { + "name": "productAssociatedToken", + "isMut": false, + "isSigner": false, + "docs": [ + "The associated token account for the product" + ] + }, + { + "name": "device", + "isMut": false, + "isSigner": false, + "docs": [ + "The device" + ] + }, + { + "name": "deviceMint", + "isMut": false, + "isSigner": false, + "docs": [ + "The mint account for the device" + ] + }, + { + "name": "deviceAssociatedToken", + "isMut": false, + "isSigner": false, + "docs": [ + "DID associated token owned by authority" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "The account paying for the storage fees" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "The system program" + ] + }, + { + "name": "token2022Program", + "isMut": false, + "isSigner": false, + "docs": [ + "The SPL Token 2022 program" + ] + }, + { + "name": "ataProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "The associated token program" + ] + } + ], + "args": [ + { + "name": "bump", + "type": "u8" + } + ], + "discriminant": { + "type": "u8", + "value": 0 + } + }, + { + "name": "ProxyCall", + "accounts": [ + { + "name": "wallet", + "isMut": false, + "isSigner": false, + "docs": [ + "The program derived address of the wallet account to increment (seeds: ['WALLET', authority])" + ] + }, + { + "name": "authority", + "isMut": false, + "isSigner": true, + "docs": [ + "The authority of the wallet" + ] + }, + { + "name": "vault", + "isMut": false, + "isSigner": false, + "docs": [ + "The wallet vault (seeds: ['VAULT', wallet])" + ] + }, + { + "name": "targetProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "The proxy called program" + ] + } + ], + "args": [ + { + "name": "ixData", + "type": "bytes" + } + ], + "discriminant": { + "type": "u8", + "value": 1 + } + } + ], + "accounts": [ + { + "name": "Wallet", + "type": { + "kind": "struct", + "fields": [ + { + "name": "key", + "type": { + "defined": "Key" + } + }, + { + "name": "authority", + "type": "publicKey" + }, + { + "name": "device", + "type": "publicKey" + }, + { + "name": "vault", + "type": "publicKey" + }, + { + "name": "vaultBump", + "type": "u8" + } + ] + } + } + ], + "types": [ + { + "name": "Key", + "type": { + "kind": "enum", + "variants": [ + { + "name": "Uninitialized" + }, + { + "name": "Wallet" + } + ] + } + } + ], + "errors": [ + { + "code": 0, + "name": "DeserializationError", + "msg": "Error deserializing an account" + }, + { + "code": 1, + "name": "SerializationError", + "msg": "Error serializing an account" + }, + { + "code": 2, + "name": "InvalidProgramOwner", + "msg": "Invalid program owner. This likely mean the provided account does not exist" + }, + { + "code": 3, + "name": "InvalidPda", + "msg": "Invalid PDA derivation" + }, + { + "code": 4, + "name": "ExpectedEmptyAccount", + "msg": "Expected empty account" + }, + { + "code": 5, + "name": "ExpectedNonEmptyAccount", + "msg": "Expected non empty account" + }, + { + "code": 6, + "name": "ExpectedSignerAccount", + "msg": "Expected signer account" + }, + { + "code": 7, + "name": "ExpectedWritableAccount", + "msg": "Expected writable account" + }, + { + "code": 8, + "name": "AccountMismatch", + "msg": "Account mismatch" + }, + { + "code": 9, + "name": "InvalidAccountKey", + "msg": "Invalid account key" + }, + { + "code": 10, + "name": "NumericalOverflow", + "msg": "Numerical overflow" + } + ], + "metadata": { + "origin": "shank", + "address": "5ZYZAwmhpkVUbXQWmzEnBCBRxiWdEcYYykwyApWJdEUv" + } +} \ No newline at end of file diff --git a/wallet/program/keypair.json b/wallet/program/keypair.json new file mode 100644 index 0000000..43a9d7c --- /dev/null +++ b/wallet/program/keypair.json @@ -0,0 +1 @@ +[11,196,124,18,68,79,235,219,52,181,5,217,80,130,191,59,139,8,91,154,243,44,123,53,20,76,89,23,67,100,175,197,67,197,3,56,222,124,42,223,237,72,157,72,214,45,208,137,239,15,109,114,137,64,120,237,78,212,167,172,99,8,68,55] \ No newline at end of file diff --git a/wallet/program/src/assertions.rs b/wallet/program/src/assertions.rs new file mode 100644 index 0000000..64a51c7 --- /dev/null +++ b/wallet/program/src/assertions.rs @@ -0,0 +1,137 @@ +use crate::{error::WalletError, state::Key}; +use solana_program::{ + account_info::AccountInfo, entrypoint::ProgramResult, msg, program_error::ProgramError, + pubkey::Pubkey, +}; + +/// Assert that the given account is owned by the given program. +pub fn assert_program_owner( + account_name: &str, + account: &AccountInfo, + owner: &Pubkey, +) -> ProgramResult { + if account.owner != owner { + msg!( + "Account \"{}\" [{}] expected program owner [{}], got [{}]", + account_name, + account.key, + owner, + account.owner + ); + Err(WalletError::InvalidProgramOwner.into()) + } else { + Ok(()) + } +} + +/// Assert the derivation of the seeds against the given account and return the bump seed. +pub fn assert_pda( + account_name: &str, + account: &AccountInfo, + program_id: &Pubkey, + seeds: &[&[u8]], +) -> Result { + let (key, bump) = Pubkey::find_program_address(seeds, program_id); + if *account.key != key { + msg!( + "Account \"{}\" [{}] is an invalid PDA. Expected the following valid PDA [{}]", + account_name, + account.key, + key, + ); + return Err(WalletError::InvalidPda.into()); + } + Ok(bump) +} + +/// Assert that the given account is empty. +pub fn assert_empty(account_name: &str, account: &AccountInfo) -> ProgramResult { + if !account.data_is_empty() { + msg!( + "Account \"{}\" [{}] must be empty", + account_name, + account.key, + ); + Err(WalletError::ExpectedEmptyAccount.into()) + } else { + Ok(()) + } +} + +/// Assert that the given account is non empty. +pub fn assert_non_empty(account_name: &str, account: &AccountInfo) -> ProgramResult { + if account.data_is_empty() { + msg!( + "Account \"{}\" [{}] must not be empty", + account_name, + account.key, + ); + Err(WalletError::ExpectedNonEmptyAccount.into()) + } else { + Ok(()) + } +} + +/// Assert that the given account is a signer. +pub fn assert_signer(account_name: &str, account: &AccountInfo) -> ProgramResult { + if !account.is_signer { + msg!( + "Account \"{}\" [{}] must be a signer", + account_name, + account.key, + ); + Err(WalletError::ExpectedSignerAccount.into()) + } else { + Ok(()) + } +} + +/// Assert that the given account is writable. +pub fn assert_writable(account_name: &str, account: &AccountInfo) -> ProgramResult { + if !account.is_writable { + msg!( + "Account \"{}\" [{}] must be writable", + account_name, + account.key, + ); + Err(WalletError::ExpectedWritableAccount.into()) + } else { + Ok(()) + } +} + +/// Assert that the given account matches the given public key. +pub fn assert_same_pubkeys( + account_name: &str, + account: &AccountInfo, + expected: &Pubkey, +) -> ProgramResult { + if account.key != expected { + msg!( + "Account \"{}\" [{}] must match the following public key [{}]", + account_name, + account.key, + expected + ); + Err(WalletError::AccountMismatch.into()) + } else { + Ok(()) + } +} + +/// Assert that the given account has the expected account key. +pub fn assert_account_key(account_name: &str, account: &AccountInfo, key: Key) -> ProgramResult { + let key_number = key as u8; + if account.data_len() <= 1 || account.try_borrow_data()?[0] != key_number { + msg!( + "Account \"{}\" [{}] expected account key [{}], got [{}]", + account_name, + account.key, + key_number, + account.try_borrow_data()?[0] + ); + Err(WalletError::InvalidAccountKey.into()) + } else { + Ok(()) + } +} diff --git a/wallet/program/src/entrypoint.rs b/wallet/program/src/entrypoint.rs new file mode 100644 index 0000000..6af1168 --- /dev/null +++ b/wallet/program/src/entrypoint.rs @@ -0,0 +1,20 @@ +use solana_program::{ + account_info::AccountInfo, entrypoint, entrypoint::ProgramResult, + program_error::PrintProgramError, pubkey::Pubkey, +}; + +use crate::{error::WalletError, processor}; + +entrypoint!(process_instruction); +fn process_instruction<'a>( + program_id: &'a Pubkey, + accounts: &'a [AccountInfo<'a>], + instruction_data: &[u8], +) -> ProgramResult { + if let Err(error) = processor::process_instruction(program_id, accounts, instruction_data) { + // catch the error so we can print it + error.print::(); + return Err(error); + } + Ok(()) +} diff --git a/wallet/program/src/error.rs b/wallet/program/src/error.rs new file mode 100644 index 0000000..a659c89 --- /dev/null +++ b/wallet/program/src/error.rs @@ -0,0 +1,62 @@ +use num_derive::FromPrimitive; +use solana_program::{ + decode_error::DecodeError, + msg, + program_error::{PrintProgramError, ProgramError}, +}; +use thiserror::Error; + +#[derive(Error, Clone, Debug, Eq, PartialEq, FromPrimitive)] +pub enum WalletError { + /// 0 - Error deserializing an account + #[error("Error deserializing an account")] + DeserializationError, + /// 1 - Error serializing an account + #[error("Error serializing an account")] + SerializationError, + /// 2 - Invalid program owner + #[error("Invalid program owner. This likely mean the provided account does not exist")] + InvalidProgramOwner, + /// 3 - Invalid PDA derivation + #[error("Invalid PDA derivation")] + InvalidPda, + /// 4 - Expected empty account + #[error("Expected empty account")] + ExpectedEmptyAccount, + /// 5 - Expected non empty account + #[error("Expected non empty account")] + ExpectedNonEmptyAccount, + /// 6 - Expected signer account + #[error("Expected signer account")] + ExpectedSignerAccount, + /// 7 - Expected writable account + #[error("Expected writable account")] + ExpectedWritableAccount, + /// 8 - Account mismatch + #[error("Account mismatch")] + AccountMismatch, + /// 9 - Invalid account key + #[error("Invalid account key")] + InvalidAccountKey, + /// 10 - Numerical overflow + #[error("Numerical overflow")] + NumericalOverflow, +} + +impl PrintProgramError for WalletError { + fn print(&self) { + msg!(&self.to_string()); + } +} + +impl From for ProgramError { + fn from(e: WalletError) -> Self { + ProgramError::Custom(e as u32) + } +} + +impl DecodeError for WalletError { + fn type_of() -> &'static str { + "Mpl Project Name Error" + } +} diff --git a/wallet/program/src/instruction.rs b/wallet/program/src/instruction.rs new file mode 100644 index 0000000..ac3eda4 --- /dev/null +++ b/wallet/program/src/instruction.rs @@ -0,0 +1,30 @@ +use borsh::{BorshDeserialize, BorshSerialize}; +use shank::{ShankContext, ShankInstruction}; + +#[derive(BorshDeserialize, BorshSerialize, Clone, Debug, ShankContext, ShankInstruction)] +#[rustfmt::skip] +pub enum WalletInstruction { + /// Creates the wallet account derived from the provided authority. + #[account(0, writable, name="wallet", desc = "The program derived address of the wallet account to create (seeds: ['WALLET', authority])")] + #[account(1, signer, name="authority", desc = "The authority of the wallet")] + #[account(2, name="vault", desc = "The wallet vault (seeds: ['VAULT', wallet])")] + #[account(3, name="vendor", desc="The vendor")] + #[account(4, name="product_mint", desc="The mint account for the product")] + #[account(5, name="product_associated_token", desc="The associated token account for the product")] + #[account(6, name="device", desc="The device")] + #[account(7, name="device_mint", desc="The mint account for the device")] + #[account(8, name="device_associated_token", desc = "DID associated token owned by authority")] + #[account(9, writable, signer, name="payer", desc = "The account paying for the storage fees")] + #[account(10, name="system_program", desc = "The system program")] + #[account(11, name="token_2022_program", desc="The SPL Token 2022 program")] + #[account(12, name="ata_program", desc="The associated token program")] + // #[account(13, name="dephy_id_program", desc="The DePHY ID program")] + Create { bump: u8 }, + + /// Proxy call + #[account(0, name="wallet", desc = "The program derived address of the wallet account to increment (seeds: ['WALLET', authority])")] + #[account(1, signer, name="authority", desc = "The authority of the wallet")] + #[account(2, name="vault", desc = "The wallet vault (seeds: ['VAULT', wallet])")] + #[account(3, name="target_program", desc = "The proxy called program")] + ProxyCall { ix_data: Vec }, +} diff --git a/wallet/program/src/lib.rs b/wallet/program/src/lib.rs new file mode 100644 index 0000000..2e2633a --- /dev/null +++ b/wallet/program/src/lib.rs @@ -0,0 +1,11 @@ +pub mod assertions; +pub mod entrypoint; +pub mod error; +pub mod instruction; +pub mod processor; +pub mod state; +pub mod utils; + +pub use solana_program; + +solana_program::declare_id!("5ZYZAwmhpkVUbXQWmzEnBCBRxiWdEcYYykwyApWJdEUv"); diff --git a/wallet/program/src/processor.rs b/wallet/program/src/processor.rs new file mode 100644 index 0000000..d1047e0 --- /dev/null +++ b/wallet/program/src/processor.rs @@ -0,0 +1,170 @@ +use borsh::BorshDeserialize; +use dephy_id_program_client::{find_device_mint, find_product_mint, get_device_atoken}; +use solana_program::{ + account_info::AccountInfo, + entrypoint::ProgramResult, + instruction::{AccountMeta, Instruction}, + msg, + program::invoke_signed, + pubkey::Pubkey, + system_program, +}; +use spl_token_2022::{extension::{BaseStateWithExtensions, StateWithExtensions}, state::{Account, Mint}}; +use spl_token_metadata_interface::state::TokenMetadata; + +use crate::assertions::{ + assert_pda, assert_program_owner, assert_same_pubkeys, assert_signer, assert_writable, +}; +use crate::instruction::accounts::{CreateAccounts, ProxyCallAccounts}; +use crate::instruction::WalletInstruction; +use crate::state::{Key, Wallet}; +use crate::utils::create_account; + +pub fn process_instruction<'a>( + program_id: &Pubkey, + accounts: &'a [AccountInfo<'a>], + instruction_data: &[u8], +) -> ProgramResult { + let instruction = WalletInstruction::try_from_slice(instruction_data)?; + match instruction { + WalletInstruction::Create { bump } => { + msg!("Ix: Create"); + create(program_id, accounts, bump) + } + WalletInstruction::ProxyCall { ix_data } => { + msg!("Ix: ProxyCall"); + proxy_call(program_id, accounts, ix_data.as_ref()) + } + } +} + +fn create<'a>(program_id: &Pubkey, accounts: &'a [AccountInfo<'a>], _bump: u8) -> ProgramResult { + // Accounts. + let ctx = CreateAccounts::context(accounts)?; + let vendor_pubkey = ctx.accounts.vendor.key; + let device_pubkey = ctx.accounts.device.key; + let vault_pubkey = ctx.accounts.vault.key; + let authority_pubkey = ctx.accounts.authority.key; + + // Guards. + let mut seeds = Wallet::seeds(ctx.accounts.device.key, ctx.accounts.authority.key); + let wallet_bump = assert_pda("wallet", ctx.accounts.wallet, program_id, &seeds)?; + let vault_bump = assert_pda( + "vault", + ctx.accounts.vault, + program_id, + &[b"VAULT", ctx.accounts.wallet.key.as_ref()], + )?; + assert_signer("authority", ctx.accounts.authority)?; + assert_signer("payer", ctx.accounts.payer)?; + assert_writable("payer", ctx.accounts.payer)?; + assert_same_pubkeys( + "system_program", + ctx.accounts.system_program, + &system_program::id(), + )?; + + let product_metadata = { + let product_mint_data = ctx.accounts.product_mint.data.borrow(); + let product_mint_state = StateWithExtensions::::unpack(&product_mint_data)?; + assert_eq!(product_mint_state.base.decimals, 0); + + product_mint_state.get_variable_len_extension::()? + }; + let (product_mint_pubkey, _) = find_product_mint(vendor_pubkey, product_metadata.name, &dephy_id_program_client::ID); + assert_same_pubkeys("product_mint", ctx.accounts.product_mint, &product_mint_pubkey)?; + { + let product_atoken_data = ctx.accounts.product_associated_token.data.borrow(); + let product_atoken_state = StateWithExtensions::::unpack(&product_atoken_data)?; + assert_eq!(product_atoken_state.base.mint, product_mint_pubkey); + assert_eq!(product_atoken_state.base.owner, *device_pubkey); + assert_eq!(product_atoken_state.base.amount, 1); + } + + let (device_mint_pubkey, _) = find_device_mint(&product_mint_pubkey, device_pubkey, &dephy_id_program_client::ID); + assert_same_pubkeys("device_mint", ctx.accounts.device_mint, &device_mint_pubkey)?; + + let device_atoken_pubkey = get_device_atoken(authority_pubkey, &device_mint_pubkey); + assert_same_pubkeys("device_atoken", ctx.accounts.device_associated_token, &device_atoken_pubkey)?; + { + let device_atoken_data = ctx.accounts.device_associated_token.data.borrow(); + let device_atoken_state = StateWithExtensions::::unpack(&device_atoken_data)?; + assert_eq!(device_atoken_state.base.mint, device_mint_pubkey); + assert_eq!(device_atoken_state.base.owner, *authority_pubkey); + assert_eq!(device_atoken_state.base.amount, 1); + } + + // Do nothing if the domain already exists. + if !ctx.accounts.wallet.data_is_empty() { + return Ok(()); + } + + // Create Counter PDA. + let wallet = Wallet { + key: Key::Wallet, + authority: *authority_pubkey, + device: *ctx.accounts.device.key, + vault: *vault_pubkey, + vault_bump, + }; + let bump = [wallet_bump]; + seeds.push(&bump); + create_account( + ctx.accounts.wallet, + ctx.accounts.payer, + ctx.accounts.system_program, + Wallet::LEN, + program_id, + Some(&[&seeds]), + )?; + + wallet.save(ctx.accounts.wallet) +} + +fn proxy_call<'a>(program_id: &Pubkey, accounts: &'a [AccountInfo<'a>], instruction_data: &[u8]) -> ProgramResult { + // Accounts. + let ctx = ProxyCallAccounts::context(accounts)?; + assert_program_owner("wallet", ctx.accounts.wallet, program_id)?; + + let wallet_account = Wallet::load(ctx.accounts.wallet)?; + assert_same_pubkeys("authority", ctx.accounts.authority, &wallet_account.authority)?; + + let mut wallet_seed = Wallet::seeds(&wallet_account.device, &wallet_account.authority); + let bump = [wallet_account.vault_bump]; + wallet_seed.push(&bump); + + let vault_seeds = [ + b"VAULT", + ctx.accounts.wallet.key.as_ref(), + &[wallet_account.vault_bump], + ]; + + let ix_accounts = ctx + .remaining_accounts + .iter() + .map(|a| { + let is_signer = + if a.key == ctx.accounts.vault.key { + true + } else { + a.is_signer + }; + + if a.is_writable { + AccountMeta::new(*a.key, is_signer) + } else { + AccountMeta::new_readonly(*a.key, is_signer) + } + }) + .collect(); + + let instruction = Instruction::new_with_bytes( + *ctx.accounts.target_program.key, + instruction_data, + ix_accounts, + ); + + msg!("ProxyCall: {:?}", instruction); + + invoke_signed(&instruction, ctx.remaining_accounts, &[&vault_seeds]) +} diff --git a/wallet/program/src/state.rs b/wallet/program/src/state.rs new file mode 100644 index 0000000..411f2db --- /dev/null +++ b/wallet/program/src/state.rs @@ -0,0 +1,52 @@ +use borsh::{BorshDeserialize, BorshSerialize}; +use shank::ShankAccount; +use solana_program::account_info::AccountInfo; +use solana_program::entrypoint::ProgramResult; +use solana_program::msg; +use solana_program::program_error::ProgramError; +use solana_program::pubkey::Pubkey; + +use crate::error::WalletError; + +#[derive(Clone, BorshSerialize, BorshDeserialize, Debug)] +pub enum Key { + Uninitialized, + Wallet, +} + +#[repr(C)] +#[derive(Clone, BorshSerialize, BorshDeserialize, Debug, ShankAccount)] +pub struct Wallet { + pub key: Key, + pub authority: Pubkey, + pub device: Pubkey, + pub vault: Pubkey, + pub vault_bump: u8, +} + +impl Wallet { + pub const LEN: usize = 1 + 32 + 32 + 32 + 1; + + pub fn seeds<'a>(device: &'a Pubkey, authority: &'a Pubkey) -> Vec<&'a [u8]> { + vec!["WALLET".as_bytes(), device.as_ref(), authority.as_ref()] + } + + pub fn find_pda(device: &Pubkey, authority: &Pubkey) -> (Pubkey, u8) { + Pubkey::find_program_address(&Self::seeds(device, authority), &crate::ID) + } + + pub fn load(account: &AccountInfo) -> Result { + let mut bytes: &[u8] = &(*account.data).borrow(); + Wallet::deserialize(&mut bytes).map_err(|error| { + msg!("Error: {}", error); + WalletError::DeserializationError.into() + }) + } + + pub fn save(&self, account: &AccountInfo) -> ProgramResult { + borsh::to_writer(&mut account.data.borrow_mut()[..], self).map_err(|error| { + msg!("Error: {}", error); + WalletError::SerializationError.into() + }) + } +} diff --git a/wallet/program/src/utils.rs b/wallet/program/src/utils.rs new file mode 100644 index 0000000..7708956 --- /dev/null +++ b/wallet/program/src/utils.rs @@ -0,0 +1,127 @@ +use solana_program::{ + account_info::AccountInfo, + entrypoint::ProgramResult, + program::{invoke, invoke_signed}, + program_error::ProgramError, + pubkey::Pubkey, + rent::Rent, + system_instruction, system_program, + sysvar::Sysvar, +}; + +use crate::error::WalletError; + +/// Create a new account from the given size. +#[inline(always)] +pub fn create_account<'a>( + target_account: &AccountInfo<'a>, + funding_account: &AccountInfo<'a>, + system_program: &AccountInfo<'a>, + size: usize, + owner: &Pubkey, + signer_seeds: Option<&[&[&[u8]]]>, +) -> ProgramResult { + let rent = Rent::get()?; + let lamports: u64 = rent.minimum_balance(size); + + invoke_signed( + &system_instruction::create_account( + funding_account.key, + target_account.key, + lamports, + size as u64, + owner, + ), + &[ + funding_account.clone(), + target_account.clone(), + system_program.clone(), + ], + signer_seeds.unwrap_or(&[]), + ) +} + +/// Resize an account using realloc, lifted from Solana Cookbook. +#[inline(always)] +pub fn realloc_account<'a>( + target_account: &AccountInfo<'a>, + funding_account: &AccountInfo<'a>, + system_program: &AccountInfo<'a>, + new_size: usize, + refund: bool, +) -> ProgramResult { + let rent = Rent::get()?; + let old_minimum_balance = rent.minimum_balance(target_account.data_len()); + let new_minimum_balance = rent.minimum_balance(new_size); + let lamports_diff = new_minimum_balance.abs_diff(old_minimum_balance); + + if new_minimum_balance > old_minimum_balance { + invoke( + &system_instruction::transfer(funding_account.key, target_account.key, lamports_diff), + &[ + funding_account.clone(), + target_account.clone(), + system_program.clone(), + ], + )?; + } else if refund { + transfer_lamports_from_pdas(target_account, funding_account, lamports_diff)?; + } + + target_account.realloc(new_size, false) +} + +/// Close an account. +#[inline(always)] +pub fn close_account<'a>( + target_account: &AccountInfo<'a>, + receiving_account: &AccountInfo<'a>, +) -> ProgramResult { + let dest_starting_lamports = receiving_account.lamports(); + **receiving_account.lamports.borrow_mut() = dest_starting_lamports + .checked_add(target_account.lamports()) + .unwrap(); + **target_account.lamports.borrow_mut() = 0; + + target_account.assign(&system_program::ID); + target_account.realloc(0, false) +} + +/// Transfer lamports. +#[inline(always)] +pub fn transfer_lamports<'a>( + from: &AccountInfo<'a>, + to: &AccountInfo<'a>, + lamports: u64, + signer_seeds: Option<&[&[&[u8]]]>, +) -> ProgramResult { + invoke_signed( + &system_instruction::transfer(from.key, to.key, lamports), + &[from.clone(), to.clone()], + signer_seeds.unwrap_or(&[]), + ) +} + +pub fn transfer_lamports_from_pdas<'a>( + from: &AccountInfo<'a>, + to: &AccountInfo<'a>, + lamports: u64, +) -> ProgramResult { + **from.lamports.borrow_mut() = from + .lamports() + .checked_sub(lamports) + .ok_or::(WalletError::NumericalOverflow.into())?; + + **to.lamports.borrow_mut() = to + .lamports() + .checked_add(lamports) + .ok_or::(WalletError::NumericalOverflow.into())?; + + Ok(()) +} + +pub fn find_vault_pda( + wallet_pubkey: &Pubkey +) -> (Pubkey, u8) { + Pubkey::find_program_address(&[b"VAULT", wallet_pubkey.as_ref()], &crate::ID) +} diff --git a/wallet/rustfmt.toml b/wallet/rustfmt.toml new file mode 100644 index 0000000..36789f4 --- /dev/null +++ b/wallet/rustfmt.toml @@ -0,0 +1,10 @@ +max_width = 100 +reorder_imports = true +reorder_modules = true + +# == Nightly only. == +# imports_indent = "Block" +# imports_layout = "Mixed" +# imports_granularity = "Crate" +# group_imports = "Preserve" +# reorder_impl_items = false diff --git a/wallet/scripts/client/lint-js.mjs b/wallet/scripts/client/lint-js.mjs new file mode 100644 index 0000000..ae5678d --- /dev/null +++ b/wallet/scripts/client/lint-js.mjs @@ -0,0 +1,9 @@ +#!/usr/bin/env zx +import 'zx/globals'; +import { workingDirectory } from '../utils.mjs'; + +// Check the client using ESLint and Prettier. +cd(path.join(workingDirectory, 'clients', 'js')); +await $`pnpm install`; +await $`pnpm lint`; +await $`pnpm format`; diff --git a/wallet/scripts/client/lint-rust.mjs b/wallet/scripts/client/lint-rust.mjs new file mode 100644 index 0000000..0c2ac3d --- /dev/null +++ b/wallet/scripts/client/lint-rust.mjs @@ -0,0 +1,7 @@ +#!/usr/bin/env zx +import 'zx/globals'; +import { workingDirectory } from '../utils.mjs'; + +// Check the client using Clippy. +cd(path.join(workingDirectory, 'clients', 'rust')); +await $`cargo clippy ${process.argv.slice(3)}`; diff --git a/wallet/scripts/client/test-js.mjs b/wallet/scripts/client/test-js.mjs new file mode 100644 index 0000000..5c96435 --- /dev/null +++ b/wallet/scripts/client/test-js.mjs @@ -0,0 +1,12 @@ +#!/usr/bin/env zx +import 'zx/globals'; +import { workingDirectory } from '../utils.mjs'; + +// Start the local validator if it's not already running. +await $`bun validator:start --restart`; + +// Build the client and run the tests. +cd(path.join(workingDirectory, 'clients', 'js')); +await $`bun install`; +await $`bun run build`; +await $`bun run test ${process.argv.slice(3)}`; diff --git a/wallet/scripts/client/test-rust.mjs b/wallet/scripts/client/test-rust.mjs new file mode 100644 index 0000000..45aa733 --- /dev/null +++ b/wallet/scripts/client/test-rust.mjs @@ -0,0 +1,12 @@ +#!/usr/bin/env zx +import 'zx/globals'; +import { workingDirectory } from '../utils.mjs'; + +// Run the tests. +cd(path.join(workingDirectory, 'clients', 'rust')); +const hasSolfmt = await which('solfmt', { nothrow: true }); +if (hasSolfmt) { + await $`cargo test-sbf ${process.argv.slice(3)} 2>&1 | solfmt`; +} else { + await $`cargo test-sbf ${process.argv.slice(3)}`; +} diff --git a/wallet/scripts/generate-clients.mjs b/wallet/scripts/generate-clients.mjs new file mode 100644 index 0000000..a65dea2 --- /dev/null +++ b/wallet/scripts/generate-clients.mjs @@ -0,0 +1,140 @@ +#!/usr/bin/env zx +import "zx/globals"; +import * as k from "kinobi"; +import { rootNodeFromAnchor } from "@kinobi-so/nodes-from-anchor"; +import { renderVisitor as renderJavaScriptVisitor } from "@kinobi-so/renderers-js"; +import { getAllProgramIdls } from "./utils.mjs"; +import { DEPHY_ID_PROGRAM_ADDRESS } from "@dephy-io/dephy-id-program-client"; + +// Instanciate Kinobi. +const [idl, ...additionalIdls] = getAllProgramIdls().map(idl => rootNodeFromAnchor(require(idl))) +const kinobi = k.createFromRoot(idl, additionalIdls); + + +// Update programs. +kinobi.update( + k.updateProgramsVisitor({ + dephyIdWallet: { name: "dephyIdWallet" }, + }) +); + +// Update accounts. +kinobi.update( + k.updateAccountsVisitor({ + wallet: { + seeds: [ + k.constantPdaSeedNodeFromString("utf8", "WALLET"), + k.variablePdaSeedNode("device", k.publicKeyTypeNode(), "The device of the wallet account"), + k.variablePdaSeedNode("authority", k.publicKeyTypeNode(), "The authority of the wallet account"), + ], + }, + }) +); + +kinobi.update( + k.addPdasVisitor({ + dephyId: [{ + name: 'productMint', + seeds: [ + k.constantPdaSeedNodeFromString('utf8', "DePHY_ID-PRODUCT"), + k.variablePdaSeedNode('vendor_pubkey', k.publicKeyTypeNode()), + k.variablePdaSeedNode('product_name', k.stringTypeNode('utf8')), + ] + }, { + name: 'deviceMint', + seeds: [ + k.constantPdaSeedNodeFromString('utf8', "DePHY_ID-DEVICE"), + k.variablePdaSeedNode('product_mint_pubkey', k.publicKeyTypeNode()), + k.variablePdaSeedNode('device_pubkey', k.publicKeyTypeNode()), + ] + }], + dephyIdWallet: [{ + name: 'vault', + seeds: [ + k.constantPdaSeedNodeFromString('utf8', 'VAULT'), + k.variablePdaSeedNode('wallet', k.publicKeyTypeNode()) + ] + }], + }) +) + +// Update instructions. +kinobi.update( + k.updateInstructionsVisitor({ + create: { + // byteDeltas: [k.instructionByteDeltaNode(k.accountLinkNode("wallet"))], + accounts: { + // #[account(0, writable, name="wallet", desc = "The program derived address of the wallet account to create (seeds: ['WALLET', authority])")] + wallet: { defaultValue: k.pdaValueNode("wallet") }, + // #[account(1, signer, name="authority", desc = "The authority of the wallet")] + // #[account(2, name="vault", desc = "The wallet vault (seeds: ['VAULT', wallet])")] + vault: { defaultValue: k.pdaValueNode('vault') }, + // #[account(3, name="vendor", desc="The vendor")] + // #[account(4, name="product_mint", desc="The mint account for the product")] + productMint: { + defaultValue: k.pdaValueNode(k.pdaLinkNode('productMint', '@dephy-io/dephy-id-program-client'), [ + k.pdaSeedValueNode('vendorPubkey', k.accountValueNode('vendor')), + k.pdaSeedValueNode('productName', k.argumentValueNode('productName')), + ]) + }, + // #[account(5, name="product_associated_token", desc="The associated token account for the product")] + // TODO: wait kinobi update + // productAssociatedToken: { + // defaultValue: k.pdaValueNode(k.pdaNode({}), []) + // }, + // #[account(6, name="device", desc="The device")] + // #[account(7, name="device_mint", desc="The mint account for the device")] + deviceMint: { + defaultValue: k.pdaValueNode(k.pdaLinkNode('deviceMint', '@dephy-io/dephy-id-program-client'), [ + k.pdaSeedValueNode('productMintPubkey', k.accountValueNode('productMint')), + k.pdaSeedValueNode('devicePubkey', k.accountValueNode('device')), + ]) + }, + // #[account(8, name="did_atoken", desc = "DID atoken owned by authority")] + // did_atoken: { defaultValue: k.pdaValueNode() }, + // #[account(9, writable, signer, name="payer", desc = "The account paying for the storage fees")] + payer: { defaultValue: k.accountValueNode("authority") }, + // #[account(10, name="system_program", desc = "The system program")] + // #[account(11, name="token_2022_program", desc="The SPL Token 2022 program")] + token2022Program: { defaultValue: k.publicKeyValueNode('TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb') }, + // #[account(12, name="ata_program", desc="The associated token program")] + // #[account(13, name="dephy_id_program", desc="The DePHY ID program")] + dephyIdProgram: { defaultValue: k.publicKeyValueNode(DEPHY_ID_PROGRAM_ADDRESS) }, + }, + arguments: { + bump: k.instructionArgumentNode({ + name: 'bump', + defaultValue: k.accountBumpValueNode('wallet'), + }), + productName: k.instructionArgumentNode({ + name: 'productName', + type: k.stringTypeNode('utf8'), + }), + } + }, + proxyCall: { + accounts: { + vault: { defaultValue: k.pdaValueNode('vault') }, + }, + arguments: { + ixData: { defaultValue: null }, + } + }, + }) +); + +// Set account discriminators. +const key = (name) => ({ field: "key", value: k.enumValueNode("Key", name) }); +kinobi.update( + k.setAccountDiscriminatorFromFieldVisitor({ + wallet: key("wallet"), + }) +); + +// Render JavaScript. +const jsClient = path.join(__dirname, "..", "clients", "js"); +kinobi.accept( + renderJavaScriptVisitor(path.join(jsClient, "src", "generated"), { + prettier: require(path.join(jsClient, ".prettierrc.json")) + }) +); diff --git a/wallet/scripts/generate-idls.mjs b/wallet/scripts/generate-idls.mjs new file mode 100644 index 0000000..42e571d --- /dev/null +++ b/wallet/scripts/generate-idls.mjs @@ -0,0 +1,14 @@ +#!/usr/bin/env zx +import 'zx/globals'; +import { getCargo, getProgramFolders } from './utils.mjs'; + +getProgramFolders().forEach(async (folder) => { + const cargo = getCargo(folder); + const isShank = Object.keys(cargo.dependencies).includes('shank'); + const programDir = path.join(__dirname, '..', folder) + const programId = cargo.package.metadata.solana['program-id'] + + if (isShank) { + await $`shank idl -r ${programDir} -o ${programDir} -p ${programId} --out-filename idl.json` + } +}) diff --git a/wallet/scripts/program/build.mjs b/wallet/scripts/program/build.mjs new file mode 100644 index 0000000..9b364d0 --- /dev/null +++ b/wallet/scripts/program/build.mjs @@ -0,0 +1,12 @@ +#!/usr/bin/env zx +import 'zx/globals'; +import { workingDirectory, getProgramFolders } from '../utils.mjs'; + +// Save external programs binaries to the output directory. +import './dump.mjs'; + +// Build the programs. +for (const folder of getProgramFolders()) { + cd(`${path.join(workingDirectory, folder)}`); + await $`cargo-build-sbf ${process.argv.slice(3)}`; +} diff --git a/wallet/scripts/program/clean.mjs b/wallet/scripts/program/clean.mjs new file mode 100644 index 0000000..b761a37 --- /dev/null +++ b/wallet/scripts/program/clean.mjs @@ -0,0 +1,10 @@ +#!/usr/bin/env zx +import 'zx/globals'; +import { getExternalProgramOutputDir } from '../utils.mjs'; + +// Remove the programs output directories. +const externalProgramOutput = getExternalProgramOutputDir(); +await $`rm -rf ${externalProgramOutput}`; + +// Remove the target directory. +await $`rm -rf target`; diff --git a/wallet/scripts/program/dump.mjs b/wallet/scripts/program/dump.mjs new file mode 100644 index 0000000..7e7db12 --- /dev/null +++ b/wallet/scripts/program/dump.mjs @@ -0,0 +1,105 @@ +#!/usr/bin/env zx +import 'zx/globals'; +import { + getExternalAccountAddresses, + getExternalProgramAddresses, + getExternalProgramOutputDir, +} from '../utils.mjs'; + +// Get input from environment variables. +const rpc = process.env.RPC ?? 'https://api.mainnet-beta.solana.com'; +const outputDir = getExternalProgramOutputDir(); +await dump(); + +/** Dump external programs binaries and accounts if needed. */ +async function dump() { + // Ensure we have some external accounts to dump. + const programs = getExternalProgramAddresses(); + const accounts = getExternalAccountAddresses(); + const external = [ + ...programs.map((program) => [program, 'so']), + ...accounts.map((account) => [account, 'json']), + ]; + + if (external.length === 0) return; + echo(`Dumping external accounts to '${outputDir}':`); + + // Create the output directory if needed. + $`mkdir -p ${outputDir}`.quiet(); + + // Copy the binaries from the chain or warn if they are different. + await Promise.all( + external.map(async ([address, extension]) => { + const binary = `${address}.${extension}`; + const hasBinary = await fs.exists(`${outputDir}/${binary}`); + + if (!hasBinary) { + await copyFromChain(address, extension); + echo(`Wrote account data to ${outputDir}/${binary}`); + return; + } + + let sha = 'sha256sum'; + let options = []; + let hasShaChecksum = await which('sha256sum', { nothrow: true }); + + // We might not have sha256sum on some systems, so we try shasum as well. + if (!hasShaChecksum) { + hasShaChecksum = await which('shasum', { nothrow: true }); + + if (hasShaChecksum) { + sha = 'shasum'; + options = ['-a', '256']; + } + } + + if (hasShaChecksum) { + try { + await copyFromChain(address, extension, 'onchain-'); + const [onChainHash, localHash] = await Promise.all([ + $`${sha} ${options} -b ${outputDir}/onchain-${binary} | cut -d ' ' -f 1`.quiet(), + $`${sha} ${options} -b ${outputDir}/${binary} | cut -d ' ' -f 1`.quiet(), + ]); + + if (onChainHash.toString() !== localHash.toString()) { + echo( + chalk.yellow('[ WARNING ]'), + `on-chain and local binaries are different for '${address}'` + ); + } else { + echo( + chalk.green('[ SKIPPED ]'), + `on-chain and local binaries are the same for '${address}'` + ); + } + + await $`rm ${outputDir}/onchain-${binary}`.quiet(); + } catch (error) { + echo( + chalk.yellow('[ WARNING ]'), + `skipped check for '${address}' (error copying data from '${rpc}')` + ); + } + } else { + echo( + chalk.yellow('[ WARNING ]'), + `skipped check for '${address}' (missing 'sha256sum' command)` + ); + } + }) + ); +} + +/** Helper function to copy external programs or accounts binaries from the chain. */ +async function copyFromChain(address, extension, prefix = '') { + const binary = `${prefix}${address}.${extension}`; + switch (extension) { + case 'json': + return $`solana account -u ${rpc} ${address} -o ${outputDir}/${binary} --output json >/dev/null`.quiet(); + case 'so': + return $`solana program dump -u ${rpc} ${address} ${outputDir}/${binary} >/dev/null`.quiet(); + default: + echo(chalk.red(`[ ERROR ] unknown account type for '${binary}'`)); + await $`exit 1`; + } +} diff --git a/wallet/scripts/program/format.mjs b/wallet/scripts/program/format.mjs new file mode 100644 index 0000000..8524d78 --- /dev/null +++ b/wallet/scripts/program/format.mjs @@ -0,0 +1,9 @@ +#!/usr/bin/env zx +import 'zx/globals'; +import { workingDirectory, getProgramFolders } from '../utils.mjs'; + +// Format the programs. +for (const folder of getProgramFolders()) { + cd(`${path.join(workingDirectory, folder)}`); + await $`cargo fmt ${process.argv.slice(3)}`; +} diff --git a/wallet/scripts/program/lint.mjs b/wallet/scripts/program/lint.mjs new file mode 100644 index 0000000..e64c23e --- /dev/null +++ b/wallet/scripts/program/lint.mjs @@ -0,0 +1,9 @@ +#!/usr/bin/env zx +import 'zx/globals'; +import { workingDirectory, getProgramFolders } from '../utils.mjs'; + +// Lint the programs using clippy. +for (const folder of getProgramFolders()) { + cd(`${path.join(workingDirectory, folder)}`); + await $`cargo clippy ${process.argv.slice(3)}`; +} diff --git a/wallet/scripts/program/test.mjs b/wallet/scripts/program/test.mjs new file mode 100644 index 0000000..2841312 --- /dev/null +++ b/wallet/scripts/program/test.mjs @@ -0,0 +1,18 @@ +#!/usr/bin/env zx +import 'zx/globals'; +import { workingDirectory, getProgramFolders } from '../utils.mjs'; + +// Save external programs binaries to the output directory. +import './dump.mjs'; + +const hasSolfmt = await which('solfmt', { nothrow: true }); +// Test the programs. +for (const folder of getProgramFolders()) { + cd(`${path.join(workingDirectory, folder)}`); + + if (hasSolfmt) { + await $`RUST_LOG=error cargo test-sbf ${process.argv.slice(3)} 2>&1 | solfmt`; + } else { + await $`RUST_LOG=error cargo test-sbf ${process.argv.slice(3)}`; + } +} diff --git a/wallet/scripts/start-validator.mjs b/wallet/scripts/start-validator.mjs new file mode 100644 index 0000000..8181224 --- /dev/null +++ b/wallet/scripts/start-validator.mjs @@ -0,0 +1,123 @@ +#!/usr/bin/env zx +import { spawn } from 'node:child_process'; +import fs from 'node:fs'; +import 'zx/globals'; +import { + getCargo, + getExternalAccountAddresses, + getExternalProgramAddresses, + getExternalProgramOutputDir, + getProgramFolders, +} from './utils.mjs'; + +// Options and arguments. +const restart = argv['restart']; + +// Keep the validator running when not using the restart flag. +const isValidatorRunning = (await $`lsof -t -i:8899`.quiet().exitCode) === 0; +if (!restart && isValidatorRunning) { + echo(chalk.yellow('Local validator is already running.')); + process.exit(); +} + +// Initial message. +const verb = isValidatorRunning ? 'Restarting' : 'Starting'; + +// Get programs and accounts. +const programs = [...getPrograms(), ...getExternalPrograms()]; +const programPluralized = programs.length === 1 ? 'program' : 'programs'; +const accounts = [...getExternalAccounts()]; +const accountsPluralized = accounts.length === 1 ? 'account' : 'accounts'; + +echo( + `${verb} local validator with ${programs.length} custom ${programPluralized}` + + (accounts.length > 0 + ? ` and ${accounts.length} external ${accountsPluralized}...` + : `...`) +); + +// Kill the validator if it's already running. +if (isValidatorRunning) { + await $`pkill -f solana-test-validator`.quiet(); + await sleep(1000); +} + +// Global validator arguments. +const args = [/* Reset ledger */ '-r']; + +// Load programs. +programs.forEach(({ programId, deployPath }) => { + args.push(/* Load BPF program */ '--bpf-program', programId, deployPath); +}); + +// Load accounts. +accounts.forEach(({ account, deployPath }) => { + args.push(/* Load account */ '--account', account, deployPath); +}); + +// Start the validator in detached mode. +const cliLogs = path.join(os.tmpdir(), 'validator-cli.log'); +fs.writeFileSync(cliLogs, '', () => {}); +const out = fs.openSync(cliLogs, 'a'); +const err = fs.openSync(cliLogs, 'a'); +const validator = spawn('solana-test-validator', args, { + detached: true, + stdio: ['ignore', out, err], +}); +validator.unref(); + +// Wait for the validator to stabilize. +const waitForValidator = spinner( + 'Waiting for local validator to stabilize...', + () => + new Promise((resolve, reject) => { + setInterval(() => { + const logs = fs.readFileSync(cliLogs, 'utf8'); + if (validator.exitCode !== null) { + reject(logs); + } else if (logs.includes('Confirmed Slot: 1')) { + resolve(); + } + }, 1000); + }) +); + +try { + await waitForValidator; + echo(chalk.green('Local validator is up and running!')); +} catch (error) { + echo(error); + echo(chalk.red('Could not start local validator.')); +} finally { + fs.rmSync(cliLogs); + process.exit(); +} + +function getPrograms() { + const binaryDir = path.join(__dirname, '..', 'target', 'deploy'); + return getProgramFolders().map((folder) => { + const cargo = getCargo(folder); + const name = cargo.package.name.replace(/-/g, '_'); + return { + programId: cargo.package.metadata.solana['program-id'], + deployPath: path.join(binaryDir, `${name}.so`), + }; + }); +} + +function getExternalPrograms() { + const binaryDir = getExternalProgramOutputDir(); + return getExternalProgramAddresses().flatMap((programs) => + Object.entries(programs).map(([programName, address]) => ({ + programId: address, + deployPath: path.join(binaryDir, `${programName}.so`), + }))) +} + +function getExternalAccounts() { + const binaryDir = getExternalProgramOutputDir(); + return getExternalAccountAddresses().map((address) => ({ + account: address, + deployPath: path.join(binaryDir, `${address}.json`), + })); +} diff --git a/wallet/scripts/stop-validator.mjs b/wallet/scripts/stop-validator.mjs new file mode 100644 index 0000000..ebbff8d --- /dev/null +++ b/wallet/scripts/stop-validator.mjs @@ -0,0 +1,13 @@ +#!/usr/bin/env zx +import 'zx/globals'; + +const isValidatorRunning = (await $`lsof -t -i:8899`.quiet().exitCode) === 0; + +if (isValidatorRunning) { + // Kill the validator if it's already running. + await $`pkill -f solana-test-validator`.quiet(); + await sleep(1000); + echo(chalk.green('Local validator terminated!')); +} else { + echo(chalk.yellow('Local validator is not running.')); +} diff --git a/wallet/scripts/utils.mjs b/wallet/scripts/utils.mjs new file mode 100644 index 0000000..637cc4d --- /dev/null +++ b/wallet/scripts/utils.mjs @@ -0,0 +1,83 @@ +import 'zx/globals'; +import { parse as parseToml } from '@iarna/toml'; + +process.env.FORCE_COLOR = 3; +process.env.CARGO_TERM_COLOR = 'always'; + +export const workingDirectory = (await $`pwd`.quiet()).toString().trim(); + +export function getAllProgramIdls() { + return getAllProgramFolders().map((folder) => + path.join(workingDirectory, folder, 'idl.json') + ); +} + +export function getExternalProgramOutputDir() { + const config = + getCargo().workspace?.metadata?.solana?.['external-programs-output']; + return path.join(workingDirectory, config ?? 'target/deploy'); +} + +export function getExternalProgramAddresses() { + const addresses = getProgramFolders().flatMap( + (folder) => + getCargo(folder).package?.metadata?.solana?.['program-dependencies'] ?? [] + ); + return Array.from(new Set(addresses)); +} + +export function getExternalAccountAddresses() { + const addresses = getProgramFolders().flatMap( + (folder) => + getCargo(folder).package?.metadata?.solana?.['account-dependencies'] ?? [] + ); + return Array.from(new Set(addresses)); +} + +let didWarnAboutMissingPrograms = false; +export function getProgramFolders() { + let programs; + + if (process.env.PROGRAMS) { + try { + programs = JSON.parse(process.env.PROGRAMS); + } catch (error) { + programs = process.env.PROGRAMS.split(/\s+/); + } + } else { + programs = getAllProgramFolders(); + } + + const filteredPrograms = programs.filter((program) => + fs.existsSync(path.join(workingDirectory, program)) + ); + + if ( + filteredPrograms.length !== programs.length && + !didWarnAboutMissingPrograms + ) { + didWarnAboutMissingPrograms = true; + programs + .filter((program) => !filteredPrograms.includes(program)) + .forEach((program) => { + echo(chalk.yellow(`Program not found: ${workingDirectory}/${program}`)); + }); + } + + return filteredPrograms; +} + +export function getAllProgramFolders() { + return getCargo().workspace.members.filter((member) => + (getCargo(member).lib?.['crate-type'] ?? []).includes('cdylib') + ); +} + +export function getCargo(folder) { + return parseToml( + fs.readFileSync( + path.join(workingDirectory, folder ? folder : '.', 'Cargo.toml'), + 'utf8' + ) + ); +}