├── programs └── spam_db │ ├── Xargo.toml │ ├── Cargo.toml │ └── src │ └── lib.rs ├── .gitignore ├── .prettierignore ├── Cargo.toml ├── tsconfig.json ├── Anchor.toml ├── migrations └── deploy.ts ├── package.json ├── README.md ├── tests ├── util.ts └── test.ts └── Cargo.lock /programs/spam_db/Xargo.toml: -------------------------------------------------------------------------------- 1 | [target.bpfel-unknown-unknown.dependencies.std] 2 | features = [] 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .anchor 2 | .DS_Store 3 | target 4 | **/*.rs.bk 5 | node_modules 6 | test-ledger 7 | .yarn 8 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | .anchor 2 | .DS_Store 3 | target 4 | node_modules 5 | dist 6 | build 7 | test-ledger 8 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [workspace] 2 | members = [ 3 | "programs/*" 4 | ] 5 | resolver = "2" 6 | 7 | [profile.release] 8 | overflow-checks = true 9 | lto = "fat" 10 | codegen-units = 1 11 | [profile.release.build-override] 12 | opt-level = 3 13 | incremental = false 14 | codegen-units = 1 15 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "types": ["mocha", "chai"], 4 | "typeRoots": ["./node_modules/@types"], 5 | "lib": ["es2015"], 6 | "module": "commonjs", 7 | "target": "es6", 8 | "resolveJsonModule": true, 9 | "esModuleInterop": true 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Anchor.toml: -------------------------------------------------------------------------------- 1 | [toolchain] 2 | 3 | [features] 4 | resolution = true 5 | skip-lint = false 6 | 7 | [programs.localnet] 8 | spam_db = "SpamUf6NdJBSnZUjqicPv38cc21R6ZLtkKU9sR5uJid" 9 | 10 | [registry] 11 | url = "https://api.apr.dev" 12 | 13 | [provider] 14 | cluster = "Localnet" 15 | wallet = "~/.config/solana/id.json" 16 | 17 | [scripts] 18 | test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts" 19 | -------------------------------------------------------------------------------- /migrations/deploy.ts: -------------------------------------------------------------------------------- 1 | // Migrations are an early feature. Currently, they're nothing more than this 2 | // single deploy script that's invoked from the CLI, injecting a provider 3 | // configured from the workspace's Anchor.toml. 4 | 5 | const anchor = require("@coral-xyz/anchor"); 6 | 7 | module.exports = async function (provider) { 8 | // Configure client to use the provider. 9 | anchor.setProvider(provider); 10 | 11 | // Add your deploy script here. 12 | }; 13 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "license": "ISC", 3 | "scripts": { 4 | "lint:fix": "prettier */*.js \"*/**/*{.js,.ts}\" -w", 5 | "lint": "prettier */*.js \"*/**/*{.js,.ts}\" --check" 6 | }, 7 | "dependencies": { 8 | "@coral-xyz/anchor": "^0.31.1" 9 | }, 10 | "devDependencies": { 11 | "chai": "^4.3.4", 12 | "mocha": "^9.0.3", 13 | "ts-mocha": "^10.0.0", 14 | "@types/bn.js": "^5.1.0", 15 | "@types/chai": "^4.3.0", 16 | "@types/mocha": "^9.0.0", 17 | "typescript": "^4.3.5", 18 | "prettier": "^2.6.2" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /programs/spam_db/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "spam_db" 3 | version = "0.1.0" 4 | description = "Created with Anchor" 5 | edition = "2021" 6 | 7 | [lib] 8 | crate-type = ["cdylib", "lib"] 9 | name = "spam_db" 10 | 11 | [features] 12 | default = [] 13 | cpi = ["no-entrypoint"] 14 | no-entrypoint = [] 15 | no-idl = [] 16 | no-log-ix-name = [] 17 | idl-build = ["anchor-lang/idl-build"] 18 | 19 | [dependencies] 20 | anchor-lang = { version = "0.31.1", features = ["init-if-needed"] } 21 | # solana-program = "2.1.21" 22 | bytemuck = { version = "1.23.0", features = ["derive", "min_const_generics"]} 23 | 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | A spam phone number database on solana blockchain, for app [SpamBlocker](https://github.com/aj3423/SpamBlocker) 2 | 3 | # Features 4 | - Instant query 5 | - Query a number on the fly. 6 | - Offline check 7 | - Download numbers reported in the last N days to the local database. (1<= N <= 60) 8 | - Reporting 9 | - Report a number as spam with category. 10 | - Privacy 11 | - No account required, no email registration. Just generate a wallet locally. 12 | 13 | # Why solana 14 | - **Ethereum** 15 | - only ~15 TPS(transaction per second), too low for reporting numbers 16 | - **Solana** 17 | - current solution, 400~65000 TPS 18 | - **Sui** 19 | - yet to learn 20 | - **IPFS** 21 | - too slow for instant query 22 | 23 | # Cost 24 | - Use testnet instead of mainnet to avoid transaction fee... 25 | - Schedule a daily workflow to airdrop 1 SOL when the balance < 1 SOL. 26 | 27 | # TODO 28 | - Support SHA1, store/query a number's SHA1 hash instead of the plain number. 29 | 30 | # Screenshot 31 | ![image](https://github.com/user-attachments/assets/4a960d16-eb1c-47c4-878e-9967afbd6502) 32 | -------------------------------------------------------------------------------- /tests/util.ts: -------------------------------------------------------------------------------- 1 | import { Connection, Keypair, PublicKey, TransactionInstruction, TransactionMessage, VersionedTransaction, TransactionSignature } from '@solana/web3.js'; 2 | 3 | export async function sendV0Tx( 4 | connection: Connection, 5 | instructions: TransactionInstruction[], 6 | payer: Keypair, 7 | ) { 8 | let latestBlockhash = await connection.getLatestBlockhash('finalized'); 9 | 10 | const messageV0 = new TransactionMessage({ 11 | payerKey: payer.publicKey, 12 | recentBlockhash: latestBlockhash.blockhash, 13 | instructions: instructions 14 | }).compileToV0Message(); 15 | 16 | const tx = new VersionedTransaction(messageV0); 17 | 18 | tx.sign([payer]); 19 | 20 | const txid = await connection.sendTransaction(tx); 21 | 22 | await connection.confirmTransaction({ 23 | blockhash: latestBlockhash.blockhash, 24 | lastValidBlockHeight: latestBlockhash.lastValidBlockHeight, 25 | signature: txid, 26 | }); 27 | 28 | // console.log('v0 txid', explorerUrl(txid)); 29 | } 30 | 31 | export async function sendV0TxWithLookupTable( 32 | connection: Connection, 33 | txInstructions: TransactionInstruction[], 34 | payer: Keypair, 35 | lookupTablePubkey: PublicKey, 36 | ) { 37 | const lookupTableAccount = await connection 38 | .getAddressLookupTable(lookupTablePubkey) 39 | .then((res) => res.value); 40 | 41 | // Validate lookup table account 42 | if (!lookupTableAccount) { 43 | throw new Error(`Lookup table ${lookupTablePubkey.toBase58()} not found or inactive`); 44 | } 45 | 46 | let blockhash = await connection.getLatestBlockhash('finalized'); 47 | 48 | const messageV0 = new TransactionMessage({ 49 | payerKey: payer.publicKey, 50 | recentBlockhash: blockhash.blockhash, 51 | instructions: txInstructions 52 | }).compileToV0Message([lookupTableAccount]); 53 | 54 | const tx = new VersionedTransaction(messageV0); 55 | 56 | tx.sign([payer]); 57 | 58 | const txid = await connection.sendTransaction(tx); 59 | 60 | await connection.confirmTransaction({ 61 | blockhash: blockhash.blockhash, 62 | lastValidBlockHeight: blockhash.lastValidBlockHeight, 63 | signature: txid, 64 | }); 65 | 66 | // console.log('v0 txid[table]: ', explorerUrl(txid)); 67 | } 68 | 69 | export async function waitForNewBlock( 70 | connection: Connection, 71 | targetHeight: number, 72 | ): Promise { 73 | 74 | const { lastValidBlockHeight: initialBlockHeight } = 75 | await connection.getLatestBlockhash(); 76 | 77 | return new Promise((resolve) => { 78 | const SECOND = 1000; 79 | const checkInterval = 1 * SECOND; // Interval to check for new blocks (1000ms) 80 | 81 | const intervalId = setInterval(async () => { 82 | try { 83 | const { lastValidBlockHeight: currentBlockHeight } = 84 | await connection.getLatestBlockhash(); 85 | 86 | if (currentBlockHeight >= initialBlockHeight + targetHeight) { 87 | clearInterval(intervalId); 88 | resolve(); 89 | } 90 | } catch (error) { 91 | clearInterval(intervalId); 92 | resolve(); 93 | } 94 | }, checkInterval); 95 | }); 96 | } 97 | 98 | function explorerUrl( 99 | txid: TransactionSignature, 100 | ): string { 101 | return `https://explorer.solana.com/tx/${txid}?cluster=custom&customUrl=http://localhost:8899`; 102 | } 103 | -------------------------------------------------------------------------------- /programs/spam_db/src/lib.rs: -------------------------------------------------------------------------------- 1 | #![allow(unexpected_cfgs)] 2 | 3 | use anchor_lang::prelude::*; 4 | 5 | 6 | declare_id!("SpamUf6NdJBSnZUjqicPv38cc21R6ZLtkKU9sR5uJid"); 7 | 8 | const DAYS_TO_KEEP: u64 = 60; 9 | const SECONDS_PER_DAY: u64 = 86_400; 10 | 11 | // each number is 20 bytes, it can hold 50,000 numbers every day 12 | const MAX_NUM: usize = 20_000; 13 | type StrChunk = [u8; 20]; 14 | 15 | fn now() -> u64 { 16 | Clock::get().unwrap().unix_timestamp as u64 17 | } 18 | 19 | // It returns the index of the current day, in the range of 0~59 20 | // When it reaches 60, it will return 0 again. 21 | // fn index_of_today() -> u64 { 22 | // let now_ = now(); 23 | // msg!("now_: {:?}", now_); 24 | // (now_ / SECONDS_PER_DAY) % DAYS_TO_KEEP 25 | // } 26 | 27 | #[program] 28 | pub mod spam_db { 29 | use super::*; 30 | 31 | // Initialize a daily PDA + a large accout. 32 | // Only create 60 pairs of them, one for each day. 33 | // Creating such large accounts is expensive, they will be re-used 34 | // after 60 days to avoid creating new account every day. 35 | // 36 | // We use an account instead of PDA because it's impossible to create a large PDA(> 1M). 37 | // Although PDA can grow to 10MB, it'll be very expensive to access or expand. 38 | // Here we use `zero_copy` for these large accounts. 39 | pub fn init_daily_acc( 40 | ctx: Context, 41 | ) -> Result<()> { 42 | let data = &mut ctx.accounts.data_acc.load_init()?; 43 | 44 | data.numbers = [StrChunk::default(); MAX_NUM]; 45 | 46 | data.last_update = 0; 47 | data.count = 0; 48 | 49 | Ok(()) 50 | } 51 | 52 | // After creating a daily large account in the previous step, 53 | // create a PDA to store the account address. 54 | // The PDA's address can be computed by the `cc` and `day_index`. 55 | pub fn init_daily_pda( 56 | ctx: Context, 57 | _cc: String, 58 | _day_index: u64, 59 | data_acc: Pubkey, 60 | ) -> Result<()> { 61 | ctx.accounts.daily_pda.data_acc = data_acc; 62 | Ok(()) 63 | } 64 | 65 | pub fn report_number<'life>( 66 | ctx: Context<'_,'_,'life, 'life, ReportNumber<'life>>, 67 | _cc: String, 68 | domestic: String, 69 | category: i8, 70 | ) -> Result<()> { 71 | let now_ = now(); 72 | 73 | // Update number pda 74 | let number_pda = &mut ctx.accounts.number_pda; 75 | 76 | let last_number_report_time = number_pda.last_reported; // save it for later use 77 | { 78 | // Reset the number PDA if the `last_reported` is older than 60 days 79 | if now_ - number_pda.last_reported > SECONDS_PER_DAY * DAYS_TO_KEEP { 80 | msg!("number PDA is too old, resetting"); 81 | number_pda.reset_counter(); 82 | } 83 | 84 | // Update the number PDA 85 | number_pda.increase_counter(category); 86 | number_pda.last_reported = now_; 87 | } 88 | 89 | // Update daily pda 90 | { 91 | let mut daily_data = ctx.accounts.daily_data_acc.load_mut()?; 92 | 93 | // TODO: verify if `daily_acc` matches today's `pda.data_acc` 94 | 95 | // If it hasn't been used wthin 60 days, clear it first. 96 | // Check with `10 days` here, it can be any duration between 1~59 days. 97 | if now_ - daily_data.last_update > SECONDS_PER_DAY * 10 { 98 | daily_data.count = 0; 99 | } 100 | 101 | // TODO: remove this check, when it's full, rollback and override the first number, 102 | // to support reporting infinit numbers. (previous ones will be lost) 103 | if daily_data.count >= MAX_NUM as u64 { 104 | msg!("Daily numbers are full, skipping this number"); 105 | return Err(ErrorCode::NumberIsFull.into()); 106 | } 107 | 108 | // Avoid repeatedly adding a number to the daily numbers vector, 109 | // only add if last_report_time < today's 00:00, which means this number 110 | // has not been reported today. 111 | msg!("last_number_report_time: {}, (...): {}", last_number_report_time, (now_ - now_ % SECONDS_PER_DAY)); 112 | if last_number_report_time < (now_ - now_ % SECONDS_PER_DAY) { 113 | let n = daily_data.count as usize; 114 | 115 | let mut first20 = domestic.clone(); 116 | first20.truncate(20); 117 | 118 | let mut chunk = [0; 20]; 119 | chunk[..first20.len()].copy_from_slice(first20.as_bytes()); 120 | 121 | daily_data.numbers[n] 122 | .copy_from_slice(&chunk); 123 | 124 | daily_data.count += 1; 125 | } 126 | daily_data.last_update = now_; 127 | } 128 | 129 | Ok(()) 130 | } 131 | 132 | pub fn query_number(ctx: Context, _cc: String, _domestic: String) -> Result> { 133 | let number_pda = &mut ctx.accounts.number_pda; 134 | 135 | // if it hasn't been updated over 60 days, ignore previous scores, return None. 136 | if number_pda.last_reported + SECONDS_PER_DAY * DAYS_TO_KEEP < now() { 137 | msg!("number PDA is too old, returning None"); 138 | return Ok(None); 139 | } 140 | 141 | Ok(Some((**number_pda).clone())) 142 | } 143 | } 144 | 145 | #[derive(Accounts)] 146 | pub struct InitDailyAcc <'life> { 147 | #[account(zero)] 148 | pub data_acc: AccountLoader<'life, DailyData>, 149 | } 150 | 151 | 152 | #[derive(Accounts)] 153 | #[instruction(cc: String, day_index: u64)] 154 | pub struct InitDailyPDA <'life> { 155 | #[account( 156 | init_if_needed, 157 | payer = signer, 158 | space = 8 + 32, 159 | seeds = [b"spam_db", cc.as_bytes(), &day_index.to_le_bytes()], 160 | bump 161 | )] 162 | pub daily_pda: Account<'life, DailyPDA>, 163 | 164 | #[account(mut)] 165 | pub signer: Signer<'life>, 166 | pub system_program: Program<'life, System>, 167 | } 168 | 169 | #[derive(Accounts)] 170 | #[instruction(cc: String, domestic: String)] 171 | pub struct ReportNumber<'life> { 172 | #[account( 173 | init_if_needed, 174 | payer = user, 175 | space = 8 + 8 * 7, // u64 * 7 fields 176 | seeds = [b"spam_db", cc.as_bytes(), domestic.as_bytes()], 177 | bump 178 | )] 179 | pub number_pda: Account<'life, NumberStats>, 180 | 181 | #[account(mut)] 182 | pub daily_data_acc: AccountLoader<'life, DailyData>, 183 | 184 | #[account(mut)] 185 | pub user: Signer<'life>, 186 | pub system_program: Program<'life, System>, 187 | } 188 | 189 | #[derive(Accounts)] 190 | #[instruction(cc: String, domestic: String)] 191 | pub struct QueryNumber<'life> { 192 | #[account( 193 | seeds = [b"spam_db", cc.as_bytes(), domestic.as_bytes()], 194 | bump 195 | )] 196 | pub number_pda: Account<'life, NumberStats>, 197 | pub signer: Signer<'life>, 198 | pub system_program: Program<'life, System>, 199 | } 200 | 201 | 202 | #[account(zero_copy)] 203 | pub struct DailyData { 204 | pub last_update: u64, // last update time 205 | pub count: u64, // the current count of numbers reported today 206 | pub numbers: [StrChunk; MAX_NUM], // list of numbers reported today 207 | } 208 | 209 | // It holds a pointer to the actual DailyData 210 | // A PDA can't store large data, so we use a pointer to a separate account 211 | #[account] 212 | #[derive(Default)] 213 | pub struct DailyPDA { 214 | pub data_acc: Pubkey, 215 | } 216 | 217 | #[account] 218 | #[derive(Default)] 219 | pub struct NumberStats { 220 | pub last_reported: u64, // last update time 221 | 222 | pub valid: u64, // times of this number was reported as a "valid number" 223 | pub fraud: u64, // times of this number was reported as "fraud" 224 | pub marketing: u64, // times of this number was reported as "marketing" 225 | pub survey: u64, // times of this number was reported as "survey" 226 | pub political: u64, // times of this number was reported as "political" 227 | pub other_spam: u64, // times of this number was reported as "other spam" 228 | } 229 | impl NumberStats { 230 | pub fn reset_counter(&mut self) { 231 | self.valid = 0; 232 | self.fraud = 0; 233 | self.marketing = 0; 234 | self.survey = 0; 235 | self.political = 0; 236 | self.other_spam = 0; 237 | } 238 | pub fn increase_counter(&mut self, category: i8) { 239 | match category { 240 | 0 => { 241 | // Disable marking as valid to prevent abuse by spammers, 242 | // because they would mark their numbers as valid. 243 | self.valid += 1; 244 | }, 245 | 1 => self.fraud += 1, 246 | 2 => self.marketing += 1, 247 | 3 => self.survey += 1, 248 | 4 => self.political += 1, 249 | _ => self.other_spam += 1, 250 | } 251 | } 252 | } 253 | 254 | 255 | #[error_code] 256 | pub enum ErrorCode { 257 | #[msg("Lookup table doesn't contain today's PDA")] 258 | WrongLookupTableAddresses, 259 | 260 | #[msg("Daily numbers is full, cannot add more numbers")] 261 | NumberIsFull, 262 | 263 | #[msg("Account size exceeds the limit 10MB")] 264 | AccountSizeLimitExceeded, 265 | } 266 | 267 | 268 | -------------------------------------------------------------------------------- /tests/test.ts: -------------------------------------------------------------------------------- 1 | import * as anchor from "@coral-xyz/anchor"; 2 | import { BN } from "@coral-xyz/anchor"; 3 | 4 | import * as idl from "../target/idl/spam_db.json"; 5 | import type { SpamDb } from "../target/types/spam_db"; 6 | 7 | import { expect } from "chai"; 8 | import { Transaction, SystemProgram, Keypair, PublicKey } from "@solana/web3.js"; 9 | 10 | const DAYS_TO_KEEP = 60; 11 | const SECONDS_PER_DAY = 86400; 12 | 13 | function deriveNumberPda(programId: PublicKey, cc: string, domestic: string) { 14 | const [pda, _] = PublicKey.findProgramAddressSync( 15 | [ 16 | Buffer.from("spam_db"), 17 | Buffer.from(cc), 18 | Buffer.from(domestic), 19 | ], 20 | programId 21 | ); 22 | return pda; 23 | } 24 | 25 | function deriveDailyPda(programId: PublicKey, cc: string, dayIndex: number) { 26 | const [pda, _] = PublicKey.findProgramAddressSync( 27 | [ 28 | Buffer.from("spam_db"), 29 | Buffer.from(cc), 30 | new BN(dayIndex).toArrayLike(Buffer, "le", 8), 31 | ], 32 | programId 33 | ); 34 | return pda; 35 | } 36 | 37 | function generateRandomNumber(length: number): string { 38 | // return "12345666"; 39 | let result = ''; 40 | for (let i = 0; i < length; i++) { 41 | result += Math.floor(Math.random() * 10); 42 | } 43 | return result; 44 | } 45 | 46 | // offset == -1 for yesterday, 0 for today, 1 for tomorrow, etc... 47 | function getDayIndex(offset: number = 0) { 48 | const dayIndex = Math.floor( 49 | Date.now() / 1000 / SECONDS_PER_DAY 50 | ) % DAYS_TO_KEEP; 51 | 52 | return (dayIndex + offset + DAYS_TO_KEEP) % DAYS_TO_KEEP; 53 | } 54 | 55 | // function allDailyPDAs(programId: PublicKey, cc: string) { 56 | // let pdas = []; 57 | // for (let dayIndex = 0; dayIndex < DAYS_TO_KEEP; dayIndex++) { 58 | // pdas.push(deriveDailyPda(programId, cc, dayIndex)); 59 | // } 60 | 61 | // return pdas; 62 | // } 63 | describe("spam_db", () => { 64 | console.clear(); 65 | 66 | const provider = anchor.AnchorProvider.local(); 67 | anchor.setProvider(provider); 68 | const connection = provider.connection; 69 | // const program = anchor.workspace.SpamDb as Program; 70 | const program = new anchor.Program(idl as unknown as SpamDb, provider); 71 | const wallet = provider.wallet as anchor.Wallet; 72 | console.log("program id", program.programId.toBase58()); 73 | 74 | 75 | const user1 = Keypair.fromSecretKey(Uint8Array.from([37, 70, 28, 64, 227, 17, 245, 163, 77, 212, 17, 122, 66, 191, 121, 17, 240, 120, 126, 141, 180, 97, 152, 163, 0, 25, 136, 184, 19, 98, 126, 239, 7, 35, 59, 192, 136, 237, 254, 24, 235, 188, 71, 209, 22, 182, 138, 249, 185, 1, 45, 212, 70, 96, 55, 64, 6, 232, 5, 193, 207, 145, 21, 6])); 76 | console.log("User1: ", user1.publicKey.toBase58()); 77 | 78 | it("Airdrop ", async () => { 79 | await connection.requestAirdrop(user1.publicKey, 1e9); 80 | }); 81 | 82 | const cc = "1"; 83 | const domestic = generateRandomNumber(10); 84 | // console.log("Domestic number: ", domestic); 85 | 86 | const category = 1; // Fraud 87 | 88 | const numberPda = deriveNumberPda(program.programId, cc, domestic); 89 | // console.log("Number pda: ", numberPda.toBase58()); 90 | 91 | 92 | // ---- admin functions ---- 93 | 94 | // Create 60 PDAs for each day, initialize their `space` limit to 1k 95 | it("Init daily PDAs", async () => { 96 | 97 | // 20k numbers * 20 bytes each == 400k 98 | // + discriminator(8) + last_updats(8) + count(8) 99 | const space = 400_000 + 8 + 8 + 8; 100 | const lamports = 101 | await connection.getMinimumBalanceForRentExemption( 102 | space, 103 | ); 104 | 105 | const promises = []; 106 | 107 | for (let i = 0; i < DAYS_TO_KEEP; i++) { 108 | 109 | // 1. Create a large Acc for storing daily numbers 110 | const dailyAcc = Keypair.generate(); 111 | // console.log("dailyAcc", dailyAcc.publicKey.toBase58()); 112 | 113 | const createAcc = SystemProgram.createAccount({ 114 | fromPubkey: program.provider.publicKey, 115 | newAccountPubkey: dailyAcc.publicKey, 116 | space, 117 | lamports, 118 | programId: program.programId, 119 | }); 120 | const initAcc = await program.methods 121 | .initDailyAcc() 122 | .accounts({ 123 | dataAcc: dailyAcc.publicKey, 124 | }) 125 | .instruction(); 126 | 127 | // 2. Store the Acc to corresponding PDA 128 | const storeAccInPda = await program.methods 129 | .initDailyPda(cc, new BN(i), dailyAcc.publicKey) 130 | .accounts({}) 131 | .signers([wallet.payer]) 132 | .instruction(); 133 | 134 | const transaction = new anchor.web3.Transaction().add( 135 | createAcc, 136 | initAcc, 137 | storeAccInPda, 138 | ); 139 | promises.push( 140 | provider.sendAndConfirm(transaction, [ 141 | dailyAcc, 142 | ]) 143 | ); 144 | } 145 | await Promise.all(promises); 146 | }); 147 | 148 | 149 | // let lookupTableAddress: PublicKey; 150 | // it("Create lookup table", async () => { 151 | // const slot = await connection.getSlot("finalized"); 152 | 153 | // let ix: TransactionInstruction; 154 | // [ix, lookupTableAddress] = 155 | // AddressLookupTableProgram.createLookupTable({ 156 | // authority: wallet.publicKey, 157 | // payer: wallet.publicKey, 158 | // recentSlot: slot, 159 | // }); 160 | 161 | // await sendV0Tx(connection, [ix], wallet.payer); 162 | // console.log("lookup table address:", lookupTableAddress.toBase58()); 163 | // }); 164 | 165 | // it("Wait for the lookup table to be active", async () => { 166 | // await waitForNewBlock(connection, 1); 167 | // }); 168 | 169 | // it("Add all daily PDA addresses to the lookup table", async () => { 170 | // let addresses = allDailyPDAs(program.programId, cc); 171 | 172 | // const promises = []; 173 | 174 | // // Extend 30 addresses at a time, due to transaction size limits 175 | // while (addresses.length > 0) { 176 | // const chunk = addresses.slice(0, 30); 177 | // addresses = addresses.slice(30); 178 | 179 | // const ix = AddressLookupTableProgram.extendLookupTable({ 180 | // addresses: chunk, 181 | // authority: wallet.publicKey, 182 | // lookupTable: lookupTableAddress, 183 | // payer: wallet.publicKey, 184 | // }); 185 | 186 | // promises.push(sendV0Tx(connection, [ix], wallet.payer)); 187 | // } 188 | // await Promise.all(promises); 189 | // }); 190 | 191 | // // TODO: Save the lookup table address in the program state 192 | 193 | 194 | // it("Wait for the lookup table to be extended", async () => { 195 | // await waitForNewBlock(connection, 1); 196 | // }); 197 | 198 | // ---- user functions ---- 199 | 200 | it("Report a number", async () => { 201 | 202 | const dayIndex = getDayIndex(); 203 | const pdaToday = deriveDailyPda(program.programId, cc, dayIndex); 204 | const pda = await program.account.dailyPda.fetch(pdaToday); 205 | 206 | // console.log("pda.dataAcc", pda.dataAcc.toBase58()); 207 | 208 | const transaction = new anchor.web3.Transaction().add( 209 | await program.methods 210 | .reportNumber(cc, domestic, category) 211 | .accounts({ 212 | dailyDataAcc: pda.dataAcc, 213 | }) 214 | .signers([user1]) 215 | .instruction() 216 | ); 217 | await provider.sendAndConfirm(transaction); 218 | 219 | 220 | // verify NumberPDA 221 | { 222 | const numberPda_after = await program.account.numberStats.fetch(numberPda); 223 | expect(numberPda_after.fraud.toNumber(), "fraud count +1").to.be.greaterThan(0); 224 | expect(numberPda_after.lastReported.toNumber(), "lastReported time updated").to.be.greaterThan(0); 225 | } 226 | 227 | // verify dailyPDA 228 | { 229 | const dayIndex = getDayIndex(); 230 | const pdaToday = deriveDailyPda(program.programId, cc, dayIndex); 231 | const pda = await program.account.dailyPda.fetch(pdaToday); 232 | const data = await program.account.dailyData.fetch(pda.dataAcc); 233 | const len = data.count.toNumber(); 234 | 235 | const arr = data.numbers.slice(0, len).map((innerArray) => 236 | innerArray 237 | .filter((num) => num !== 0) 238 | .map((num) => String.fromCharCode(num)) 239 | .join("") 240 | ).filter(s => s.length > 0); 241 | 242 | expect(arr.includes(domestic), "reported number is included in numbers[]").to.be.equal(true); 243 | expect(data.lastUpdate.toNumber(), "lastUpdate time updated").to.be.greaterThan(0); 244 | } 245 | }); 246 | 247 | 248 | it("Query number", async () => { 249 | const stats = await program.methods 250 | .queryNumber(cc, domestic) 251 | .accounts({ 252 | numberPda: numberPda, 253 | signer: user1.publicKey, 254 | systemProgram: SystemProgram.programId, 255 | }) 256 | .view(); 257 | 258 | console.log("Query result", stats); 259 | expect(stats.lastReported.toNumber()).to.be.greaterThan(0); 260 | expect(stats.fraud.toNumber()).to.be.greaterThan(0); 261 | }); 262 | 263 | describe("Download numbers", () => { 264 | const last5Days = 5; 265 | const numberCount = 10; 266 | 267 | it(`Simulate reporting ${numberCount} numbers in the last 5 days`, async () => { 268 | const promises = []; 269 | for (let i = 0; i < numberCount; i++) { 270 | const domestic = generateRandomNumber(10); 271 | 272 | const dayIndex = getDayIndex(-1 * Math.floor(Math.random() * last5Days)); 273 | const pdaOfDay = deriveDailyPda(program.programId, cc, dayIndex); 274 | const pda = await program.account.dailyPda.fetch(pdaOfDay); 275 | 276 | const transaction = new Transaction().add( 277 | await program.methods 278 | .reportNumber(cc, domestic, category) 279 | .accounts({ 280 | dailyDataAcc: pda.dataAcc, 281 | }) 282 | .signers([user1]) 283 | .instruction() 284 | ); 285 | 286 | promises.push( 287 | provider.sendAndConfirm(transaction) 288 | ); 289 | } 290 | await Promise.all(promises); 291 | }); 292 | 293 | it("Download numbers of last 5 days ", async () => { 294 | const numbers = new Set(); 295 | for (let offset of [-4, -3, -2, -1, 0]) { 296 | const dayIndex = getDayIndex(offset); 297 | const pdaToday = deriveDailyPda(program.programId, cc, dayIndex); 298 | const pda = await program.account.dailyPda.fetch(pdaToday); 299 | 300 | const data = await program.account.dailyData.fetch(pda.dataAcc); 301 | const len = data.count.toNumber(); 302 | 303 | const arr = data.numbers.slice(0, len).map((innerArray) => 304 | innerArray 305 | .filter((num) => num !== 0) 306 | .map((num) => String.fromCharCode(num)) 307 | .join("") 308 | ).filter(s => s.length > 0); 309 | 310 | arr.forEach((num) => { 311 | numbers.add(num); 312 | }); 313 | }; 314 | 315 | console.log("Downloaded numbers:", numbers); 316 | expect(numbers.size, "number count not match").to.be.equal(numberCount + 1); 317 | }); 318 | }); 319 | }); 320 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 4 4 | 5 | [[package]] 6 | name = "ahash" 7 | version = "0.8.12" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" 10 | dependencies = [ 11 | "cfg-if", 12 | "once_cell", 13 | "version_check", 14 | "zerocopy", 15 | ] 16 | 17 | [[package]] 18 | name = "aho-corasick" 19 | version = "1.1.3" 20 | source = "registry+https://github.com/rust-lang/crates.io-index" 21 | checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" 22 | dependencies = [ 23 | "memchr", 24 | ] 25 | 26 | [[package]] 27 | name = "anchor-attribute-access-control" 28 | version = "0.31.1" 29 | source = "registry+https://github.com/rust-lang/crates.io-index" 30 | checksum = "3f70fd141a4d18adf11253026b32504f885447048c7494faf5fa83b01af9c0cf" 31 | dependencies = [ 32 | "anchor-syn", 33 | "proc-macro2", 34 | "quote", 35 | "syn 1.0.109", 36 | ] 37 | 38 | [[package]] 39 | name = "anchor-attribute-account" 40 | version = "0.31.1" 41 | source = "registry+https://github.com/rust-lang/crates.io-index" 42 | checksum = "715a261c57c7679581e06f07a74fa2af874ac30f86bd8ea07cca4a7e5388a064" 43 | dependencies = [ 44 | "anchor-syn", 45 | "bs58", 46 | "proc-macro2", 47 | "quote", 48 | "syn 1.0.109", 49 | ] 50 | 51 | [[package]] 52 | name = "anchor-attribute-constant" 53 | version = "0.31.1" 54 | source = "registry+https://github.com/rust-lang/crates.io-index" 55 | checksum = "730d6df8ae120321c5c25e0779e61789e4b70dc8297102248902022f286102e4" 56 | dependencies = [ 57 | "anchor-syn", 58 | "quote", 59 | "syn 1.0.109", 60 | ] 61 | 62 | [[package]] 63 | name = "anchor-attribute-error" 64 | version = "0.31.1" 65 | source = "registry+https://github.com/rust-lang/crates.io-index" 66 | checksum = "27e6e449cc3a37b2880b74dcafb8e5a17b954c0e58e376432d7adc646fb333ef" 67 | dependencies = [ 68 | "anchor-syn", 69 | "quote", 70 | "syn 1.0.109", 71 | ] 72 | 73 | [[package]] 74 | name = "anchor-attribute-event" 75 | version = "0.31.1" 76 | source = "registry+https://github.com/rust-lang/crates.io-index" 77 | checksum = "d7710e4c54adf485affcd9be9adec5ef8846d9c71d7f31e16ba86ff9fc1dd49f" 78 | dependencies = [ 79 | "anchor-syn", 80 | "proc-macro2", 81 | "quote", 82 | "syn 1.0.109", 83 | ] 84 | 85 | [[package]] 86 | name = "anchor-attribute-program" 87 | version = "0.31.1" 88 | source = "registry+https://github.com/rust-lang/crates.io-index" 89 | checksum = "05ecfd49b2aeadeb32f35262230db402abed76ce87e27562b34f61318b2ec83c" 90 | dependencies = [ 91 | "anchor-lang-idl", 92 | "anchor-syn", 93 | "anyhow", 94 | "bs58", 95 | "heck", 96 | "proc-macro2", 97 | "quote", 98 | "serde_json", 99 | "syn 1.0.109", 100 | ] 101 | 102 | [[package]] 103 | name = "anchor-derive-accounts" 104 | version = "0.31.1" 105 | source = "registry+https://github.com/rust-lang/crates.io-index" 106 | checksum = "be89d160793a88495af462a7010b3978e48e30a630c91de47ce2c1d3cb7a6149" 107 | dependencies = [ 108 | "anchor-syn", 109 | "quote", 110 | "syn 1.0.109", 111 | ] 112 | 113 | [[package]] 114 | name = "anchor-derive-serde" 115 | version = "0.31.1" 116 | source = "registry+https://github.com/rust-lang/crates.io-index" 117 | checksum = "abc6ee78acb7bfe0c2dd2abc677aaa4789c0281a0c0ef01dbf6fe85e0fd9e6e4" 118 | dependencies = [ 119 | "anchor-syn", 120 | "borsh-derive-internal", 121 | "proc-macro2", 122 | "quote", 123 | "syn 1.0.109", 124 | ] 125 | 126 | [[package]] 127 | name = "anchor-derive-space" 128 | version = "0.31.1" 129 | source = "registry+https://github.com/rust-lang/crates.io-index" 130 | checksum = "134a01c0703f6fd355a0e472c033f6f3e41fac1ef6e370b20c50f4c8d022cea7" 131 | dependencies = [ 132 | "proc-macro2", 133 | "quote", 134 | "syn 1.0.109", 135 | ] 136 | 137 | [[package]] 138 | name = "anchor-lang" 139 | version = "0.31.1" 140 | source = "registry+https://github.com/rust-lang/crates.io-index" 141 | checksum = "e6bab117055905e930f762c196e08f861f8dfe7241b92cee46677a3b15561a0a" 142 | dependencies = [ 143 | "anchor-attribute-access-control", 144 | "anchor-attribute-account", 145 | "anchor-attribute-constant", 146 | "anchor-attribute-error", 147 | "anchor-attribute-event", 148 | "anchor-attribute-program", 149 | "anchor-derive-accounts", 150 | "anchor-derive-serde", 151 | "anchor-derive-space", 152 | "anchor-lang-idl", 153 | "base64 0.21.7", 154 | "bincode", 155 | "borsh 0.10.4", 156 | "bytemuck", 157 | "solana-program", 158 | "thiserror 1.0.69", 159 | ] 160 | 161 | [[package]] 162 | name = "anchor-lang-idl" 163 | version = "0.1.2" 164 | source = "registry+https://github.com/rust-lang/crates.io-index" 165 | checksum = "32e8599d21995f68e296265aa5ab0c3cef582fd58afec014d01bd0bce18a4418" 166 | dependencies = [ 167 | "anchor-lang-idl-spec", 168 | "anyhow", 169 | "heck", 170 | "regex", 171 | "serde", 172 | "serde_json", 173 | "sha2 0.10.9", 174 | ] 175 | 176 | [[package]] 177 | name = "anchor-lang-idl-spec" 178 | version = "0.1.0" 179 | source = "registry+https://github.com/rust-lang/crates.io-index" 180 | checksum = "2bdf143115440fe621bdac3a29a1f7472e09f6cd82b2aa569429a0c13f103838" 181 | dependencies = [ 182 | "anyhow", 183 | "serde", 184 | ] 185 | 186 | [[package]] 187 | name = "anchor-syn" 188 | version = "0.31.1" 189 | source = "registry+https://github.com/rust-lang/crates.io-index" 190 | checksum = "5dc7a6d90cc643df0ed2744862cdf180587d1e5d28936538c18fc8908489ed67" 191 | dependencies = [ 192 | "anyhow", 193 | "bs58", 194 | "cargo_toml", 195 | "heck", 196 | "proc-macro2", 197 | "quote", 198 | "serde", 199 | "serde_json", 200 | "sha2 0.10.9", 201 | "syn 1.0.109", 202 | "thiserror 1.0.69", 203 | ] 204 | 205 | [[package]] 206 | name = "anyhow" 207 | version = "1.0.98" 208 | source = "registry+https://github.com/rust-lang/crates.io-index" 209 | checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487" 210 | 211 | [[package]] 212 | name = "arrayref" 213 | version = "0.3.9" 214 | source = "registry+https://github.com/rust-lang/crates.io-index" 215 | checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" 216 | 217 | [[package]] 218 | name = "arrayvec" 219 | version = "0.7.6" 220 | source = "registry+https://github.com/rust-lang/crates.io-index" 221 | checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" 222 | 223 | [[package]] 224 | name = "autocfg" 225 | version = "1.4.0" 226 | source = "registry+https://github.com/rust-lang/crates.io-index" 227 | checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" 228 | 229 | [[package]] 230 | name = "base64" 231 | version = "0.12.3" 232 | source = "registry+https://github.com/rust-lang/crates.io-index" 233 | checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" 234 | 235 | [[package]] 236 | name = "base64" 237 | version = "0.21.7" 238 | source = "registry+https://github.com/rust-lang/crates.io-index" 239 | checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" 240 | 241 | [[package]] 242 | name = "base64" 243 | version = "0.22.1" 244 | source = "registry+https://github.com/rust-lang/crates.io-index" 245 | checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" 246 | 247 | [[package]] 248 | name = "bincode" 249 | version = "1.3.3" 250 | source = "registry+https://github.com/rust-lang/crates.io-index" 251 | checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" 252 | dependencies = [ 253 | "serde", 254 | ] 255 | 256 | [[package]] 257 | name = "bitflags" 258 | version = "2.9.0" 259 | source = "registry+https://github.com/rust-lang/crates.io-index" 260 | checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" 261 | 262 | [[package]] 263 | name = "blake3" 264 | version = "1.8.2" 265 | source = "registry+https://github.com/rust-lang/crates.io-index" 266 | checksum = "3888aaa89e4b2a40fca9848e400f6a658a5a3978de7be858e209cafa8be9a4a0" 267 | dependencies = [ 268 | "arrayref", 269 | "arrayvec", 270 | "cc", 271 | "cfg-if", 272 | "constant_time_eq", 273 | "digest 0.10.7", 274 | ] 275 | 276 | [[package]] 277 | name = "block-buffer" 278 | version = "0.9.0" 279 | source = "registry+https://github.com/rust-lang/crates.io-index" 280 | checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" 281 | dependencies = [ 282 | "generic-array", 283 | ] 284 | 285 | [[package]] 286 | name = "block-buffer" 287 | version = "0.10.4" 288 | source = "registry+https://github.com/rust-lang/crates.io-index" 289 | checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" 290 | dependencies = [ 291 | "generic-array", 292 | ] 293 | 294 | [[package]] 295 | name = "borsh" 296 | version = "0.10.4" 297 | source = "registry+https://github.com/rust-lang/crates.io-index" 298 | checksum = "115e54d64eb62cdebad391c19efc9dce4981c690c85a33a12199d99bb9546fee" 299 | dependencies = [ 300 | "borsh-derive 0.10.4", 301 | "hashbrown 0.13.2", 302 | ] 303 | 304 | [[package]] 305 | name = "borsh" 306 | version = "1.5.7" 307 | source = "registry+https://github.com/rust-lang/crates.io-index" 308 | checksum = "ad8646f98db542e39fc66e68a20b2144f6a732636df7c2354e74645faaa433ce" 309 | dependencies = [ 310 | "borsh-derive 1.5.7", 311 | "cfg_aliases", 312 | ] 313 | 314 | [[package]] 315 | name = "borsh-derive" 316 | version = "0.10.4" 317 | source = "registry+https://github.com/rust-lang/crates.io-index" 318 | checksum = "831213f80d9423998dd696e2c5345aba6be7a0bd8cd19e31c5243e13df1cef89" 319 | dependencies = [ 320 | "borsh-derive-internal", 321 | "borsh-schema-derive-internal", 322 | "proc-macro-crate 0.1.5", 323 | "proc-macro2", 324 | "syn 1.0.109", 325 | ] 326 | 327 | [[package]] 328 | name = "borsh-derive" 329 | version = "1.5.7" 330 | source = "registry+https://github.com/rust-lang/crates.io-index" 331 | checksum = "fdd1d3c0c2f5833f22386f252fe8ed005c7f59fdcddeef025c01b4c3b9fd9ac3" 332 | dependencies = [ 333 | "once_cell", 334 | "proc-macro-crate 3.3.0", 335 | "proc-macro2", 336 | "quote", 337 | "syn 2.0.101", 338 | ] 339 | 340 | [[package]] 341 | name = "borsh-derive-internal" 342 | version = "0.10.4" 343 | source = "registry+https://github.com/rust-lang/crates.io-index" 344 | checksum = "65d6ba50644c98714aa2a70d13d7df3cd75cd2b523a2b452bf010443800976b3" 345 | dependencies = [ 346 | "proc-macro2", 347 | "quote", 348 | "syn 1.0.109", 349 | ] 350 | 351 | [[package]] 352 | name = "borsh-schema-derive-internal" 353 | version = "0.10.4" 354 | source = "registry+https://github.com/rust-lang/crates.io-index" 355 | checksum = "276691d96f063427be83e6692b86148e488ebba9f48f77788724ca027ba3b6d4" 356 | dependencies = [ 357 | "proc-macro2", 358 | "quote", 359 | "syn 1.0.109", 360 | ] 361 | 362 | [[package]] 363 | name = "bs58" 364 | version = "0.5.1" 365 | source = "registry+https://github.com/rust-lang/crates.io-index" 366 | checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" 367 | dependencies = [ 368 | "tinyvec", 369 | ] 370 | 371 | [[package]] 372 | name = "bumpalo" 373 | version = "3.17.0" 374 | source = "registry+https://github.com/rust-lang/crates.io-index" 375 | checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" 376 | 377 | [[package]] 378 | name = "bv" 379 | version = "0.11.1" 380 | source = "registry+https://github.com/rust-lang/crates.io-index" 381 | checksum = "8834bb1d8ee5dc048ee3124f2c7c1afcc6bc9aed03f11e9dfd8c69470a5db340" 382 | dependencies = [ 383 | "feature-probe", 384 | "serde", 385 | ] 386 | 387 | [[package]] 388 | name = "bytemuck" 389 | version = "1.23.0" 390 | source = "registry+https://github.com/rust-lang/crates.io-index" 391 | checksum = "9134a6ef01ce4b366b50689c94f82c14bc72bc5d0386829828a2e2752ef7958c" 392 | dependencies = [ 393 | "bytemuck_derive", 394 | ] 395 | 396 | [[package]] 397 | name = "bytemuck_derive" 398 | version = "1.9.3" 399 | source = "registry+https://github.com/rust-lang/crates.io-index" 400 | checksum = "7ecc273b49b3205b83d648f0690daa588925572cc5063745bfe547fe7ec8e1a1" 401 | dependencies = [ 402 | "proc-macro2", 403 | "quote", 404 | "syn 2.0.101", 405 | ] 406 | 407 | [[package]] 408 | name = "cargo_toml" 409 | version = "0.19.2" 410 | source = "registry+https://github.com/rust-lang/crates.io-index" 411 | checksum = "a98356df42a2eb1bd8f1793ae4ee4de48e384dd974ce5eac8eee802edb7492be" 412 | dependencies = [ 413 | "serde", 414 | "toml 0.8.22", 415 | ] 416 | 417 | [[package]] 418 | name = "cc" 419 | version = "1.2.22" 420 | source = "registry+https://github.com/rust-lang/crates.io-index" 421 | checksum = "32db95edf998450acc7881c932f94cd9b05c87b4b2599e8bab064753da4acfd1" 422 | dependencies = [ 423 | "shlex", 424 | ] 425 | 426 | [[package]] 427 | name = "cfg-if" 428 | version = "1.0.0" 429 | source = "registry+https://github.com/rust-lang/crates.io-index" 430 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 431 | 432 | [[package]] 433 | name = "cfg_aliases" 434 | version = "0.2.1" 435 | source = "registry+https://github.com/rust-lang/crates.io-index" 436 | checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" 437 | 438 | [[package]] 439 | name = "console_error_panic_hook" 440 | version = "0.1.7" 441 | source = "registry+https://github.com/rust-lang/crates.io-index" 442 | checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" 443 | dependencies = [ 444 | "cfg-if", 445 | "wasm-bindgen", 446 | ] 447 | 448 | [[package]] 449 | name = "console_log" 450 | version = "0.2.2" 451 | source = "registry+https://github.com/rust-lang/crates.io-index" 452 | checksum = "e89f72f65e8501878b8a004d5a1afb780987e2ce2b4532c562e367a72c57499f" 453 | dependencies = [ 454 | "log", 455 | "web-sys", 456 | ] 457 | 458 | [[package]] 459 | name = "constant_time_eq" 460 | version = "0.3.1" 461 | source = "registry+https://github.com/rust-lang/crates.io-index" 462 | checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" 463 | 464 | [[package]] 465 | name = "cpufeatures" 466 | version = "0.2.17" 467 | source = "registry+https://github.com/rust-lang/crates.io-index" 468 | checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" 469 | dependencies = [ 470 | "libc", 471 | ] 472 | 473 | [[package]] 474 | name = "crunchy" 475 | version = "0.2.3" 476 | source = "registry+https://github.com/rust-lang/crates.io-index" 477 | checksum = "43da5946c66ffcc7745f48db692ffbb10a83bfe0afd96235c5c2a4fb23994929" 478 | 479 | [[package]] 480 | name = "crypto-common" 481 | version = "0.1.6" 482 | source = "registry+https://github.com/rust-lang/crates.io-index" 483 | checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" 484 | dependencies = [ 485 | "generic-array", 486 | "typenum", 487 | ] 488 | 489 | [[package]] 490 | name = "curve25519-dalek" 491 | version = "4.1.3" 492 | source = "registry+https://github.com/rust-lang/crates.io-index" 493 | checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" 494 | dependencies = [ 495 | "cfg-if", 496 | "cpufeatures", 497 | "curve25519-dalek-derive", 498 | "digest 0.10.7", 499 | "fiat-crypto", 500 | "rand_core 0.6.4", 501 | "rustc_version", 502 | "subtle", 503 | "zeroize", 504 | ] 505 | 506 | [[package]] 507 | name = "curve25519-dalek-derive" 508 | version = "0.1.1" 509 | source = "registry+https://github.com/rust-lang/crates.io-index" 510 | checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" 511 | dependencies = [ 512 | "proc-macro2", 513 | "quote", 514 | "syn 2.0.101", 515 | ] 516 | 517 | [[package]] 518 | name = "digest" 519 | version = "0.9.0" 520 | source = "registry+https://github.com/rust-lang/crates.io-index" 521 | checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" 522 | dependencies = [ 523 | "generic-array", 524 | ] 525 | 526 | [[package]] 527 | name = "digest" 528 | version = "0.10.7" 529 | source = "registry+https://github.com/rust-lang/crates.io-index" 530 | checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" 531 | dependencies = [ 532 | "block-buffer 0.10.4", 533 | "crypto-common", 534 | "subtle", 535 | ] 536 | 537 | [[package]] 538 | name = "equivalent" 539 | version = "1.0.2" 540 | source = "registry+https://github.com/rust-lang/crates.io-index" 541 | checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" 542 | 543 | [[package]] 544 | name = "feature-probe" 545 | version = "0.1.1" 546 | source = "registry+https://github.com/rust-lang/crates.io-index" 547 | checksum = "835a3dc7d1ec9e75e2b5fb4ba75396837112d2060b03f7d43bc1897c7f7211da" 548 | 549 | [[package]] 550 | name = "fiat-crypto" 551 | version = "0.2.9" 552 | source = "registry+https://github.com/rust-lang/crates.io-index" 553 | checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" 554 | 555 | [[package]] 556 | name = "five8_const" 557 | version = "0.1.4" 558 | source = "registry+https://github.com/rust-lang/crates.io-index" 559 | checksum = "26dec3da8bc3ef08f2c04f61eab298c3ab334523e55f076354d6d6f613799a7b" 560 | dependencies = [ 561 | "five8_core", 562 | ] 563 | 564 | [[package]] 565 | name = "five8_core" 566 | version = "0.1.2" 567 | source = "registry+https://github.com/rust-lang/crates.io-index" 568 | checksum = "2551bf44bc5f776c15044b9b94153a00198be06743e262afaaa61f11ac7523a5" 569 | 570 | [[package]] 571 | name = "generic-array" 572 | version = "0.14.7" 573 | source = "registry+https://github.com/rust-lang/crates.io-index" 574 | checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" 575 | dependencies = [ 576 | "typenum", 577 | "version_check", 578 | ] 579 | 580 | [[package]] 581 | name = "getrandom" 582 | version = "0.1.16" 583 | source = "registry+https://github.com/rust-lang/crates.io-index" 584 | checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" 585 | dependencies = [ 586 | "cfg-if", 587 | "libc", 588 | "wasi 0.9.0+wasi-snapshot-preview1", 589 | ] 590 | 591 | [[package]] 592 | name = "getrandom" 593 | version = "0.2.16" 594 | source = "registry+https://github.com/rust-lang/crates.io-index" 595 | checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" 596 | dependencies = [ 597 | "cfg-if", 598 | "js-sys", 599 | "libc", 600 | "wasi 0.11.0+wasi-snapshot-preview1", 601 | "wasm-bindgen", 602 | ] 603 | 604 | [[package]] 605 | name = "hashbrown" 606 | version = "0.13.2" 607 | source = "registry+https://github.com/rust-lang/crates.io-index" 608 | checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" 609 | dependencies = [ 610 | "ahash", 611 | ] 612 | 613 | [[package]] 614 | name = "hashbrown" 615 | version = "0.15.3" 616 | source = "registry+https://github.com/rust-lang/crates.io-index" 617 | checksum = "84b26c544d002229e640969970a2e74021aadf6e2f96372b9c58eff97de08eb3" 618 | 619 | [[package]] 620 | name = "heck" 621 | version = "0.3.3" 622 | source = "registry+https://github.com/rust-lang/crates.io-index" 623 | checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" 624 | dependencies = [ 625 | "unicode-segmentation", 626 | ] 627 | 628 | [[package]] 629 | name = "indexmap" 630 | version = "2.9.0" 631 | source = "registry+https://github.com/rust-lang/crates.io-index" 632 | checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e" 633 | dependencies = [ 634 | "equivalent", 635 | "hashbrown 0.15.3", 636 | ] 637 | 638 | [[package]] 639 | name = "itoa" 640 | version = "1.0.15" 641 | source = "registry+https://github.com/rust-lang/crates.io-index" 642 | checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" 643 | 644 | [[package]] 645 | name = "js-sys" 646 | version = "0.3.77" 647 | source = "registry+https://github.com/rust-lang/crates.io-index" 648 | checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" 649 | dependencies = [ 650 | "once_cell", 651 | "wasm-bindgen", 652 | ] 653 | 654 | [[package]] 655 | name = "keccak" 656 | version = "0.1.5" 657 | source = "registry+https://github.com/rust-lang/crates.io-index" 658 | checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" 659 | dependencies = [ 660 | "cpufeatures", 661 | ] 662 | 663 | [[package]] 664 | name = "lazy_static" 665 | version = "1.5.0" 666 | source = "registry+https://github.com/rust-lang/crates.io-index" 667 | checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" 668 | 669 | [[package]] 670 | name = "libc" 671 | version = "0.2.172" 672 | source = "registry+https://github.com/rust-lang/crates.io-index" 673 | checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa" 674 | 675 | [[package]] 676 | name = "libsecp256k1" 677 | version = "0.6.0" 678 | source = "registry+https://github.com/rust-lang/crates.io-index" 679 | checksum = "c9d220bc1feda2ac231cb78c3d26f27676b8cf82c96971f7aeef3d0cf2797c73" 680 | dependencies = [ 681 | "arrayref", 682 | "base64 0.12.3", 683 | "digest 0.9.0", 684 | "libsecp256k1-core", 685 | "libsecp256k1-gen-ecmult", 686 | "libsecp256k1-gen-genmult", 687 | "rand 0.7.3", 688 | "serde", 689 | "sha2 0.9.9", 690 | ] 691 | 692 | [[package]] 693 | name = "libsecp256k1-core" 694 | version = "0.2.2" 695 | source = "registry+https://github.com/rust-lang/crates.io-index" 696 | checksum = "d0f6ab710cec28cef759c5f18671a27dae2a5f952cdaaee1d8e2908cb2478a80" 697 | dependencies = [ 698 | "crunchy", 699 | "digest 0.9.0", 700 | "subtle", 701 | ] 702 | 703 | [[package]] 704 | name = "libsecp256k1-gen-ecmult" 705 | version = "0.2.1" 706 | source = "registry+https://github.com/rust-lang/crates.io-index" 707 | checksum = "ccab96b584d38fac86a83f07e659f0deafd0253dc096dab5a36d53efe653c5c3" 708 | dependencies = [ 709 | "libsecp256k1-core", 710 | ] 711 | 712 | [[package]] 713 | name = "libsecp256k1-gen-genmult" 714 | version = "0.2.1" 715 | source = "registry+https://github.com/rust-lang/crates.io-index" 716 | checksum = "67abfe149395e3aa1c48a2beb32b068e2334402df8181f818d3aee2b304c4f5d" 717 | dependencies = [ 718 | "libsecp256k1-core", 719 | ] 720 | 721 | [[package]] 722 | name = "lock_api" 723 | version = "0.4.12" 724 | source = "registry+https://github.com/rust-lang/crates.io-index" 725 | checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" 726 | dependencies = [ 727 | "autocfg", 728 | "scopeguard", 729 | ] 730 | 731 | [[package]] 732 | name = "log" 733 | version = "0.4.27" 734 | source = "registry+https://github.com/rust-lang/crates.io-index" 735 | checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" 736 | 737 | [[package]] 738 | name = "memchr" 739 | version = "2.7.4" 740 | source = "registry+https://github.com/rust-lang/crates.io-index" 741 | checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" 742 | 743 | [[package]] 744 | name = "memoffset" 745 | version = "0.9.1" 746 | source = "registry+https://github.com/rust-lang/crates.io-index" 747 | checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" 748 | dependencies = [ 749 | "autocfg", 750 | ] 751 | 752 | [[package]] 753 | name = "num-bigint" 754 | version = "0.4.6" 755 | source = "registry+https://github.com/rust-lang/crates.io-index" 756 | checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" 757 | dependencies = [ 758 | "num-integer", 759 | "num-traits", 760 | ] 761 | 762 | [[package]] 763 | name = "num-derive" 764 | version = "0.4.2" 765 | source = "registry+https://github.com/rust-lang/crates.io-index" 766 | checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" 767 | dependencies = [ 768 | "proc-macro2", 769 | "quote", 770 | "syn 2.0.101", 771 | ] 772 | 773 | [[package]] 774 | name = "num-integer" 775 | version = "0.1.46" 776 | source = "registry+https://github.com/rust-lang/crates.io-index" 777 | checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" 778 | dependencies = [ 779 | "num-traits", 780 | ] 781 | 782 | [[package]] 783 | name = "num-traits" 784 | version = "0.2.19" 785 | source = "registry+https://github.com/rust-lang/crates.io-index" 786 | checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" 787 | dependencies = [ 788 | "autocfg", 789 | ] 790 | 791 | [[package]] 792 | name = "once_cell" 793 | version = "1.21.3" 794 | source = "registry+https://github.com/rust-lang/crates.io-index" 795 | checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" 796 | 797 | [[package]] 798 | name = "opaque-debug" 799 | version = "0.3.1" 800 | source = "registry+https://github.com/rust-lang/crates.io-index" 801 | checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" 802 | 803 | [[package]] 804 | name = "parking_lot" 805 | version = "0.12.3" 806 | source = "registry+https://github.com/rust-lang/crates.io-index" 807 | checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" 808 | dependencies = [ 809 | "lock_api", 810 | "parking_lot_core", 811 | ] 812 | 813 | [[package]] 814 | name = "parking_lot_core" 815 | version = "0.9.10" 816 | source = "registry+https://github.com/rust-lang/crates.io-index" 817 | checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" 818 | dependencies = [ 819 | "cfg-if", 820 | "libc", 821 | "redox_syscall", 822 | "smallvec", 823 | "windows-targets", 824 | ] 825 | 826 | [[package]] 827 | name = "ppv-lite86" 828 | version = "0.2.21" 829 | source = "registry+https://github.com/rust-lang/crates.io-index" 830 | checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" 831 | dependencies = [ 832 | "zerocopy", 833 | ] 834 | 835 | [[package]] 836 | name = "proc-macro-crate" 837 | version = "0.1.5" 838 | source = "registry+https://github.com/rust-lang/crates.io-index" 839 | checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" 840 | dependencies = [ 841 | "toml 0.5.11", 842 | ] 843 | 844 | [[package]] 845 | name = "proc-macro-crate" 846 | version = "3.3.0" 847 | source = "registry+https://github.com/rust-lang/crates.io-index" 848 | checksum = "edce586971a4dfaa28950c6f18ed55e0406c1ab88bbce2c6f6293a7aaba73d35" 849 | dependencies = [ 850 | "toml_edit", 851 | ] 852 | 853 | [[package]] 854 | name = "proc-macro2" 855 | version = "1.0.95" 856 | source = "registry+https://github.com/rust-lang/crates.io-index" 857 | checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" 858 | dependencies = [ 859 | "unicode-ident", 860 | ] 861 | 862 | [[package]] 863 | name = "quote" 864 | version = "1.0.40" 865 | source = "registry+https://github.com/rust-lang/crates.io-index" 866 | checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" 867 | dependencies = [ 868 | "proc-macro2", 869 | ] 870 | 871 | [[package]] 872 | name = "rand" 873 | version = "0.7.3" 874 | source = "registry+https://github.com/rust-lang/crates.io-index" 875 | checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" 876 | dependencies = [ 877 | "getrandom 0.1.16", 878 | "libc", 879 | "rand_chacha 0.2.2", 880 | "rand_core 0.5.1", 881 | "rand_hc", 882 | ] 883 | 884 | [[package]] 885 | name = "rand" 886 | version = "0.8.5" 887 | source = "registry+https://github.com/rust-lang/crates.io-index" 888 | checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" 889 | dependencies = [ 890 | "libc", 891 | "rand_chacha 0.3.1", 892 | "rand_core 0.6.4", 893 | ] 894 | 895 | [[package]] 896 | name = "rand_chacha" 897 | version = "0.2.2" 898 | source = "registry+https://github.com/rust-lang/crates.io-index" 899 | checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" 900 | dependencies = [ 901 | "ppv-lite86", 902 | "rand_core 0.5.1", 903 | ] 904 | 905 | [[package]] 906 | name = "rand_chacha" 907 | version = "0.3.1" 908 | source = "registry+https://github.com/rust-lang/crates.io-index" 909 | checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 910 | dependencies = [ 911 | "ppv-lite86", 912 | "rand_core 0.6.4", 913 | ] 914 | 915 | [[package]] 916 | name = "rand_core" 917 | version = "0.5.1" 918 | source = "registry+https://github.com/rust-lang/crates.io-index" 919 | checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" 920 | dependencies = [ 921 | "getrandom 0.1.16", 922 | ] 923 | 924 | [[package]] 925 | name = "rand_core" 926 | version = "0.6.4" 927 | source = "registry+https://github.com/rust-lang/crates.io-index" 928 | checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" 929 | dependencies = [ 930 | "getrandom 0.2.16", 931 | ] 932 | 933 | [[package]] 934 | name = "rand_hc" 935 | version = "0.2.0" 936 | source = "registry+https://github.com/rust-lang/crates.io-index" 937 | checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" 938 | dependencies = [ 939 | "rand_core 0.5.1", 940 | ] 941 | 942 | [[package]] 943 | name = "redox_syscall" 944 | version = "0.5.12" 945 | source = "registry+https://github.com/rust-lang/crates.io-index" 946 | checksum = "928fca9cf2aa042393a8325b9ead81d2f0df4cb12e1e24cef072922ccd99c5af" 947 | dependencies = [ 948 | "bitflags", 949 | ] 950 | 951 | [[package]] 952 | name = "regex" 953 | version = "1.11.1" 954 | source = "registry+https://github.com/rust-lang/crates.io-index" 955 | checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" 956 | dependencies = [ 957 | "aho-corasick", 958 | "memchr", 959 | "regex-automata", 960 | "regex-syntax", 961 | ] 962 | 963 | [[package]] 964 | name = "regex-automata" 965 | version = "0.4.9" 966 | source = "registry+https://github.com/rust-lang/crates.io-index" 967 | checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" 968 | dependencies = [ 969 | "aho-corasick", 970 | "memchr", 971 | "regex-syntax", 972 | ] 973 | 974 | [[package]] 975 | name = "regex-syntax" 976 | version = "0.8.5" 977 | source = "registry+https://github.com/rust-lang/crates.io-index" 978 | checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" 979 | 980 | [[package]] 981 | name = "rustc_version" 982 | version = "0.4.1" 983 | source = "registry+https://github.com/rust-lang/crates.io-index" 984 | checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" 985 | dependencies = [ 986 | "semver", 987 | ] 988 | 989 | [[package]] 990 | name = "rustversion" 991 | version = "1.0.20" 992 | source = "registry+https://github.com/rust-lang/crates.io-index" 993 | checksum = "eded382c5f5f786b989652c49544c4877d9f015cc22e145a5ea8ea66c2921cd2" 994 | 995 | [[package]] 996 | name = "ryu" 997 | version = "1.0.20" 998 | source = "registry+https://github.com/rust-lang/crates.io-index" 999 | checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" 1000 | 1001 | [[package]] 1002 | name = "scopeguard" 1003 | version = "1.2.0" 1004 | source = "registry+https://github.com/rust-lang/crates.io-index" 1005 | checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" 1006 | 1007 | [[package]] 1008 | name = "semver" 1009 | version = "1.0.26" 1010 | source = "registry+https://github.com/rust-lang/crates.io-index" 1011 | checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0" 1012 | 1013 | [[package]] 1014 | name = "serde" 1015 | version = "1.0.219" 1016 | source = "registry+https://github.com/rust-lang/crates.io-index" 1017 | checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" 1018 | dependencies = [ 1019 | "serde_derive", 1020 | ] 1021 | 1022 | [[package]] 1023 | name = "serde_bytes" 1024 | version = "0.11.17" 1025 | source = "registry+https://github.com/rust-lang/crates.io-index" 1026 | checksum = "8437fd221bde2d4ca316d61b90e337e9e702b3820b87d63caa9ba6c02bd06d96" 1027 | dependencies = [ 1028 | "serde", 1029 | ] 1030 | 1031 | [[package]] 1032 | name = "serde_derive" 1033 | version = "1.0.219" 1034 | source = "registry+https://github.com/rust-lang/crates.io-index" 1035 | checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" 1036 | dependencies = [ 1037 | "proc-macro2", 1038 | "quote", 1039 | "syn 2.0.101", 1040 | ] 1041 | 1042 | [[package]] 1043 | name = "serde_json" 1044 | version = "1.0.140" 1045 | source = "registry+https://github.com/rust-lang/crates.io-index" 1046 | checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" 1047 | dependencies = [ 1048 | "itoa", 1049 | "memchr", 1050 | "ryu", 1051 | "serde", 1052 | ] 1053 | 1054 | [[package]] 1055 | name = "serde_spanned" 1056 | version = "0.6.8" 1057 | source = "registry+https://github.com/rust-lang/crates.io-index" 1058 | checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" 1059 | dependencies = [ 1060 | "serde", 1061 | ] 1062 | 1063 | [[package]] 1064 | name = "sha2" 1065 | version = "0.9.9" 1066 | source = "registry+https://github.com/rust-lang/crates.io-index" 1067 | checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" 1068 | dependencies = [ 1069 | "block-buffer 0.9.0", 1070 | "cfg-if", 1071 | "cpufeatures", 1072 | "digest 0.9.0", 1073 | "opaque-debug", 1074 | ] 1075 | 1076 | [[package]] 1077 | name = "sha2" 1078 | version = "0.10.9" 1079 | source = "registry+https://github.com/rust-lang/crates.io-index" 1080 | checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" 1081 | dependencies = [ 1082 | "cfg-if", 1083 | "cpufeatures", 1084 | "digest 0.10.7", 1085 | ] 1086 | 1087 | [[package]] 1088 | name = "sha3" 1089 | version = "0.10.8" 1090 | source = "registry+https://github.com/rust-lang/crates.io-index" 1091 | checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" 1092 | dependencies = [ 1093 | "digest 0.10.7", 1094 | "keccak", 1095 | ] 1096 | 1097 | [[package]] 1098 | name = "shlex" 1099 | version = "1.3.0" 1100 | source = "registry+https://github.com/rust-lang/crates.io-index" 1101 | checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" 1102 | 1103 | [[package]] 1104 | name = "smallvec" 1105 | version = "1.15.0" 1106 | source = "registry+https://github.com/rust-lang/crates.io-index" 1107 | checksum = "8917285742e9f3e1683f0a9c4e6b57960b7314d0b08d30d1ecd426713ee2eee9" 1108 | 1109 | [[package]] 1110 | name = "solana-account" 1111 | version = "2.2.1" 1112 | source = "registry+https://github.com/rust-lang/crates.io-index" 1113 | checksum = "0f949fe4edaeaea78c844023bfc1c898e0b1f5a100f8a8d2d0f85d0a7b090258" 1114 | dependencies = [ 1115 | "solana-account-info", 1116 | "solana-clock", 1117 | "solana-instruction", 1118 | "solana-pubkey", 1119 | "solana-sdk-ids", 1120 | ] 1121 | 1122 | [[package]] 1123 | name = "solana-account-info" 1124 | version = "2.2.1" 1125 | source = "registry+https://github.com/rust-lang/crates.io-index" 1126 | checksum = "e0c17d606a298a205fae325489fbed88ee6dc4463c111672172327e741c8905d" 1127 | dependencies = [ 1128 | "bincode", 1129 | "serde", 1130 | "solana-program-error", 1131 | "solana-program-memory", 1132 | "solana-pubkey", 1133 | ] 1134 | 1135 | [[package]] 1136 | name = "solana-address-lookup-table-interface" 1137 | version = "2.2.2" 1138 | source = "registry+https://github.com/rust-lang/crates.io-index" 1139 | checksum = "d1673f67efe870b64a65cb39e6194be5b26527691ce5922909939961a6e6b395" 1140 | dependencies = [ 1141 | "bincode", 1142 | "bytemuck", 1143 | "serde", 1144 | "serde_derive", 1145 | "solana-clock", 1146 | "solana-instruction", 1147 | "solana-pubkey", 1148 | "solana-sdk-ids", 1149 | "solana-slot-hashes", 1150 | ] 1151 | 1152 | [[package]] 1153 | name = "solana-atomic-u64" 1154 | version = "2.2.1" 1155 | source = "registry+https://github.com/rust-lang/crates.io-index" 1156 | checksum = "d52e52720efe60465b052b9e7445a01c17550666beec855cce66f44766697bc2" 1157 | dependencies = [ 1158 | "parking_lot", 1159 | ] 1160 | 1161 | [[package]] 1162 | name = "solana-big-mod-exp" 1163 | version = "2.2.1" 1164 | source = "registry+https://github.com/rust-lang/crates.io-index" 1165 | checksum = "75db7f2bbac3e62cfd139065d15bcda9e2428883ba61fc8d27ccb251081e7567" 1166 | dependencies = [ 1167 | "num-bigint", 1168 | "num-traits", 1169 | "solana-define-syscall", 1170 | ] 1171 | 1172 | [[package]] 1173 | name = "solana-bincode" 1174 | version = "2.2.1" 1175 | source = "registry+https://github.com/rust-lang/crates.io-index" 1176 | checksum = "19a3787b8cf9c9fe3dd360800e8b70982b9e5a8af9e11c354b6665dd4a003adc" 1177 | dependencies = [ 1178 | "bincode", 1179 | "serde", 1180 | "solana-instruction", 1181 | ] 1182 | 1183 | [[package]] 1184 | name = "solana-blake3-hasher" 1185 | version = "2.2.1" 1186 | source = "registry+https://github.com/rust-lang/crates.io-index" 1187 | checksum = "a1a0801e25a1b31a14494fc80882a036be0ffd290efc4c2d640bfcca120a4672" 1188 | dependencies = [ 1189 | "blake3", 1190 | "solana-define-syscall", 1191 | "solana-hash", 1192 | "solana-sanitize", 1193 | ] 1194 | 1195 | [[package]] 1196 | name = "solana-borsh" 1197 | version = "2.2.1" 1198 | source = "registry+https://github.com/rust-lang/crates.io-index" 1199 | checksum = "718333bcd0a1a7aed6655aa66bef8d7fb047944922b2d3a18f49cbc13e73d004" 1200 | dependencies = [ 1201 | "borsh 0.10.4", 1202 | "borsh 1.5.7", 1203 | ] 1204 | 1205 | [[package]] 1206 | name = "solana-clock" 1207 | version = "2.2.1" 1208 | source = "registry+https://github.com/rust-lang/crates.io-index" 1209 | checksum = "67c2177a1b9fe8326004f1151a5acd124420b737811080b1035df31349e4d892" 1210 | dependencies = [ 1211 | "serde", 1212 | "serde_derive", 1213 | "solana-sdk-ids", 1214 | "solana-sdk-macro", 1215 | "solana-sysvar-id", 1216 | ] 1217 | 1218 | [[package]] 1219 | name = "solana-cpi" 1220 | version = "2.2.1" 1221 | source = "registry+https://github.com/rust-lang/crates.io-index" 1222 | checksum = "8dc71126edddc2ba014622fc32d0f5e2e78ec6c5a1e0eb511b85618c09e9ea11" 1223 | dependencies = [ 1224 | "solana-account-info", 1225 | "solana-define-syscall", 1226 | "solana-instruction", 1227 | "solana-program-error", 1228 | "solana-pubkey", 1229 | "solana-stable-layout", 1230 | ] 1231 | 1232 | [[package]] 1233 | name = "solana-decode-error" 1234 | version = "2.2.1" 1235 | source = "registry+https://github.com/rust-lang/crates.io-index" 1236 | checksum = "10a6a6383af236708048f8bd8d03db8ca4ff7baf4a48e5d580f4cce545925470" 1237 | dependencies = [ 1238 | "num-traits", 1239 | ] 1240 | 1241 | [[package]] 1242 | name = "solana-define-syscall" 1243 | version = "2.2.1" 1244 | source = "registry+https://github.com/rust-lang/crates.io-index" 1245 | checksum = "cf784bb2cb3e02cac9801813c30187344228d2ae952534902108f6150573a33d" 1246 | 1247 | [[package]] 1248 | name = "solana-epoch-rewards" 1249 | version = "2.2.1" 1250 | source = "registry+https://github.com/rust-lang/crates.io-index" 1251 | checksum = "86b575d3dd323b9ea10bb6fe89bf6bf93e249b215ba8ed7f68f1a3633f384db7" 1252 | dependencies = [ 1253 | "serde", 1254 | "serde_derive", 1255 | "solana-hash", 1256 | "solana-sdk-ids", 1257 | "solana-sdk-macro", 1258 | "solana-sysvar-id", 1259 | ] 1260 | 1261 | [[package]] 1262 | name = "solana-epoch-schedule" 1263 | version = "2.2.1" 1264 | source = "registry+https://github.com/rust-lang/crates.io-index" 1265 | checksum = "3fce071fbddecc55d727b1d7ed16a629afe4f6e4c217bc8d00af3b785f6f67ed" 1266 | dependencies = [ 1267 | "serde", 1268 | "serde_derive", 1269 | "solana-sdk-ids", 1270 | "solana-sdk-macro", 1271 | "solana-sysvar-id", 1272 | ] 1273 | 1274 | [[package]] 1275 | name = "solana-example-mocks" 1276 | version = "2.2.1" 1277 | source = "registry+https://github.com/rust-lang/crates.io-index" 1278 | checksum = "84461d56cbb8bb8d539347151e0525b53910102e4bced875d49d5139708e39d3" 1279 | dependencies = [ 1280 | "serde", 1281 | "serde_derive", 1282 | "solana-address-lookup-table-interface", 1283 | "solana-clock", 1284 | "solana-hash", 1285 | "solana-instruction", 1286 | "solana-keccak-hasher", 1287 | "solana-message", 1288 | "solana-nonce", 1289 | "solana-pubkey", 1290 | "solana-sdk-ids", 1291 | "solana-system-interface", 1292 | "thiserror 2.0.12", 1293 | ] 1294 | 1295 | [[package]] 1296 | name = "solana-feature-gate-interface" 1297 | version = "2.2.1" 1298 | source = "registry+https://github.com/rust-lang/crates.io-index" 1299 | checksum = "0f9c7fbf3e58b64a667c5f35e90af580538a95daea7001ff7806c0662d301bdf" 1300 | dependencies = [ 1301 | "bincode", 1302 | "serde", 1303 | "serde_derive", 1304 | "solana-account", 1305 | "solana-account-info", 1306 | "solana-instruction", 1307 | "solana-program-error", 1308 | "solana-pubkey", 1309 | "solana-rent", 1310 | "solana-sdk-ids", 1311 | "solana-system-interface", 1312 | ] 1313 | 1314 | [[package]] 1315 | name = "solana-fee-calculator" 1316 | version = "2.2.1" 1317 | source = "registry+https://github.com/rust-lang/crates.io-index" 1318 | checksum = "d89bc408da0fb3812bc3008189d148b4d3e08252c79ad810b245482a3f70cd8d" 1319 | dependencies = [ 1320 | "log", 1321 | "serde", 1322 | "serde_derive", 1323 | ] 1324 | 1325 | [[package]] 1326 | name = "solana-hash" 1327 | version = "2.2.1" 1328 | source = "registry+https://github.com/rust-lang/crates.io-index" 1329 | checksum = "cf7bcb14392900fe02e4e34e90234fbf0c673d4e327888410ba99fa2ba0f4e99" 1330 | dependencies = [ 1331 | "borsh 1.5.7", 1332 | "bs58", 1333 | "bytemuck", 1334 | "bytemuck_derive", 1335 | "js-sys", 1336 | "serde", 1337 | "serde_derive", 1338 | "solana-atomic-u64", 1339 | "solana-sanitize", 1340 | "wasm-bindgen", 1341 | ] 1342 | 1343 | [[package]] 1344 | name = "solana-instruction" 1345 | version = "2.2.1" 1346 | source = "registry+https://github.com/rust-lang/crates.io-index" 1347 | checksum = "9ce496a475e5062ba5de97215ab39d9c358f9c9df4bb7f3a45a1f1a8bd9065ed" 1348 | dependencies = [ 1349 | "bincode", 1350 | "borsh 1.5.7", 1351 | "getrandom 0.2.16", 1352 | "js-sys", 1353 | "num-traits", 1354 | "serde", 1355 | "serde_derive", 1356 | "solana-define-syscall", 1357 | "solana-pubkey", 1358 | "wasm-bindgen", 1359 | ] 1360 | 1361 | [[package]] 1362 | name = "solana-instructions-sysvar" 1363 | version = "2.2.1" 1364 | source = "registry+https://github.com/rust-lang/crates.io-index" 1365 | checksum = "427f2d0d6dc0bb49f16cef5e7f975180d2e80aab9bdd3b2af68e2d029ec63f43" 1366 | dependencies = [ 1367 | "bitflags", 1368 | "solana-account-info", 1369 | "solana-instruction", 1370 | "solana-program-error", 1371 | "solana-pubkey", 1372 | "solana-sanitize", 1373 | "solana-sdk-ids", 1374 | "solana-serialize-utils", 1375 | "solana-sysvar-id", 1376 | ] 1377 | 1378 | [[package]] 1379 | name = "solana-keccak-hasher" 1380 | version = "2.2.1" 1381 | source = "registry+https://github.com/rust-lang/crates.io-index" 1382 | checksum = "c7aeb957fbd42a451b99235df4942d96db7ef678e8d5061ef34c9b34cae12f79" 1383 | dependencies = [ 1384 | "sha3", 1385 | "solana-define-syscall", 1386 | "solana-hash", 1387 | "solana-sanitize", 1388 | ] 1389 | 1390 | [[package]] 1391 | name = "solana-last-restart-slot" 1392 | version = "2.2.1" 1393 | source = "registry+https://github.com/rust-lang/crates.io-index" 1394 | checksum = "4a6360ac2fdc72e7463565cd256eedcf10d7ef0c28a1249d261ec168c1b55cdd" 1395 | dependencies = [ 1396 | "serde", 1397 | "serde_derive", 1398 | "solana-sdk-ids", 1399 | "solana-sdk-macro", 1400 | "solana-sysvar-id", 1401 | ] 1402 | 1403 | [[package]] 1404 | name = "solana-loader-v2-interface" 1405 | version = "2.2.1" 1406 | source = "registry+https://github.com/rust-lang/crates.io-index" 1407 | checksum = "d8ab08006dad78ae7cd30df8eea0539e207d08d91eaefb3e1d49a446e1c49654" 1408 | dependencies = [ 1409 | "serde", 1410 | "serde_bytes", 1411 | "serde_derive", 1412 | "solana-instruction", 1413 | "solana-pubkey", 1414 | "solana-sdk-ids", 1415 | ] 1416 | 1417 | [[package]] 1418 | name = "solana-loader-v3-interface" 1419 | version = "3.0.0" 1420 | source = "registry+https://github.com/rust-lang/crates.io-index" 1421 | checksum = "fa4be76cfa9afd84ca2f35ebc09f0da0f0092935ccdac0595d98447f259538c2" 1422 | dependencies = [ 1423 | "serde", 1424 | "serde_bytes", 1425 | "serde_derive", 1426 | "solana-instruction", 1427 | "solana-pubkey", 1428 | "solana-sdk-ids", 1429 | "solana-system-interface", 1430 | ] 1431 | 1432 | [[package]] 1433 | name = "solana-loader-v4-interface" 1434 | version = "2.2.1" 1435 | source = "registry+https://github.com/rust-lang/crates.io-index" 1436 | checksum = "706a777242f1f39a83e2a96a2a6cb034cb41169c6ecbee2cf09cb873d9659e7e" 1437 | dependencies = [ 1438 | "serde", 1439 | "serde_bytes", 1440 | "serde_derive", 1441 | "solana-instruction", 1442 | "solana-pubkey", 1443 | "solana-sdk-ids", 1444 | "solana-system-interface", 1445 | ] 1446 | 1447 | [[package]] 1448 | name = "solana-message" 1449 | version = "2.3.0" 1450 | source = "registry+https://github.com/rust-lang/crates.io-index" 1451 | checksum = "9c6bf99c4570173710107a1f233f3bee226feea5fc817308707d4f7cb100a72d" 1452 | dependencies = [ 1453 | "bincode", 1454 | "blake3", 1455 | "lazy_static", 1456 | "serde", 1457 | "serde_derive", 1458 | "solana-bincode", 1459 | "solana-hash", 1460 | "solana-instruction", 1461 | "solana-pubkey", 1462 | "solana-sanitize", 1463 | "solana-sdk-ids", 1464 | "solana-short-vec", 1465 | "solana-system-interface", 1466 | "solana-transaction-error", 1467 | "wasm-bindgen", 1468 | ] 1469 | 1470 | [[package]] 1471 | name = "solana-msg" 1472 | version = "2.2.1" 1473 | source = "registry+https://github.com/rust-lang/crates.io-index" 1474 | checksum = "f36a1a14399afaabc2781a1db09cb14ee4cc4ee5c7a5a3cfcc601811379a8092" 1475 | dependencies = [ 1476 | "solana-define-syscall", 1477 | ] 1478 | 1479 | [[package]] 1480 | name = "solana-native-token" 1481 | version = "2.2.2" 1482 | source = "registry+https://github.com/rust-lang/crates.io-index" 1483 | checksum = "307fb2f78060995979e9b4f68f833623565ed4e55d3725f100454ce78a99a1a3" 1484 | 1485 | [[package]] 1486 | name = "solana-nonce" 1487 | version = "2.2.1" 1488 | source = "registry+https://github.com/rust-lang/crates.io-index" 1489 | checksum = "703e22eb185537e06204a5bd9d509b948f0066f2d1d814a6f475dafb3ddf1325" 1490 | dependencies = [ 1491 | "serde", 1492 | "serde_derive", 1493 | "solana-fee-calculator", 1494 | "solana-hash", 1495 | "solana-pubkey", 1496 | "solana-sha256-hasher", 1497 | ] 1498 | 1499 | [[package]] 1500 | name = "solana-program" 1501 | version = "2.2.1" 1502 | source = "registry+https://github.com/rust-lang/crates.io-index" 1503 | checksum = "586469467e93ceb79048f8d8e3a619bf61d05396ee7de95cb40280301a589d05" 1504 | dependencies = [ 1505 | "bincode", 1506 | "blake3", 1507 | "borsh 0.10.4", 1508 | "borsh 1.5.7", 1509 | "bs58", 1510 | "bytemuck", 1511 | "console_error_panic_hook", 1512 | "console_log", 1513 | "getrandom 0.2.16", 1514 | "lazy_static", 1515 | "log", 1516 | "memoffset", 1517 | "num-bigint", 1518 | "num-derive", 1519 | "num-traits", 1520 | "rand 0.8.5", 1521 | "serde", 1522 | "serde_bytes", 1523 | "serde_derive", 1524 | "solana-account-info", 1525 | "solana-address-lookup-table-interface", 1526 | "solana-atomic-u64", 1527 | "solana-big-mod-exp", 1528 | "solana-bincode", 1529 | "solana-blake3-hasher", 1530 | "solana-borsh", 1531 | "solana-clock", 1532 | "solana-cpi", 1533 | "solana-decode-error", 1534 | "solana-define-syscall", 1535 | "solana-epoch-rewards", 1536 | "solana-epoch-schedule", 1537 | "solana-example-mocks", 1538 | "solana-feature-gate-interface", 1539 | "solana-fee-calculator", 1540 | "solana-hash", 1541 | "solana-instruction", 1542 | "solana-instructions-sysvar", 1543 | "solana-keccak-hasher", 1544 | "solana-last-restart-slot", 1545 | "solana-loader-v2-interface", 1546 | "solana-loader-v3-interface", 1547 | "solana-loader-v4-interface", 1548 | "solana-message", 1549 | "solana-msg", 1550 | "solana-native-token", 1551 | "solana-nonce", 1552 | "solana-program-entrypoint", 1553 | "solana-program-error", 1554 | "solana-program-memory", 1555 | "solana-program-option", 1556 | "solana-program-pack", 1557 | "solana-pubkey", 1558 | "solana-rent", 1559 | "solana-sanitize", 1560 | "solana-sdk-ids", 1561 | "solana-sdk-macro", 1562 | "solana-secp256k1-recover", 1563 | "solana-serde-varint", 1564 | "solana-serialize-utils", 1565 | "solana-sha256-hasher", 1566 | "solana-short-vec", 1567 | "solana-slot-hashes", 1568 | "solana-slot-history", 1569 | "solana-stable-layout", 1570 | "solana-stake-interface", 1571 | "solana-system-interface", 1572 | "solana-sysvar", 1573 | "solana-sysvar-id", 1574 | "solana-vote-interface", 1575 | "thiserror 2.0.12", 1576 | "wasm-bindgen", 1577 | ] 1578 | 1579 | [[package]] 1580 | name = "solana-program-entrypoint" 1581 | version = "2.2.1" 1582 | source = "registry+https://github.com/rust-lang/crates.io-index" 1583 | checksum = "473ffe73c68d93e9f2aa726ad2985fe52760052709aaab188100a42c618060ec" 1584 | dependencies = [ 1585 | "solana-account-info", 1586 | "solana-msg", 1587 | "solana-program-error", 1588 | "solana-pubkey", 1589 | ] 1590 | 1591 | [[package]] 1592 | name = "solana-program-error" 1593 | version = "2.2.1" 1594 | source = "registry+https://github.com/rust-lang/crates.io-index" 1595 | checksum = "d8ae2c1a8d0d4ae865882d5770a7ebca92bab9c685e43f0461682c6c05a35bfa" 1596 | dependencies = [ 1597 | "borsh 1.5.7", 1598 | "num-traits", 1599 | "serde", 1600 | "serde_derive", 1601 | "solana-decode-error", 1602 | "solana-instruction", 1603 | "solana-msg", 1604 | "solana-pubkey", 1605 | ] 1606 | 1607 | [[package]] 1608 | name = "solana-program-memory" 1609 | version = "2.2.1" 1610 | source = "registry+https://github.com/rust-lang/crates.io-index" 1611 | checksum = "1b0268f6c89825fb634a34bd0c3b8fdaeaecfc3728be1d622a8ee6dd577b60d4" 1612 | dependencies = [ 1613 | "num-traits", 1614 | "solana-define-syscall", 1615 | ] 1616 | 1617 | [[package]] 1618 | name = "solana-program-option" 1619 | version = "2.2.1" 1620 | source = "registry+https://github.com/rust-lang/crates.io-index" 1621 | checksum = "dc677a2e9bc616eda6dbdab834d463372b92848b2bfe4a1ed4e4b4adba3397d0" 1622 | 1623 | [[package]] 1624 | name = "solana-program-pack" 1625 | version = "2.2.1" 1626 | source = "registry+https://github.com/rust-lang/crates.io-index" 1627 | checksum = "319f0ef15e6e12dc37c597faccb7d62525a509fec5f6975ecb9419efddeb277b" 1628 | dependencies = [ 1629 | "solana-program-error", 1630 | ] 1631 | 1632 | [[package]] 1633 | name = "solana-pubkey" 1634 | version = "2.3.0" 1635 | source = "registry+https://github.com/rust-lang/crates.io-index" 1636 | checksum = "cad77cf9f30b971a1eec48dde6a863dcac60ba005a34dfde23736afa5c7ac667" 1637 | dependencies = [ 1638 | "borsh 0.10.4", 1639 | "borsh 1.5.7", 1640 | "bs58", 1641 | "bytemuck", 1642 | "bytemuck_derive", 1643 | "curve25519-dalek", 1644 | "five8_const", 1645 | "getrandom 0.2.16", 1646 | "js-sys", 1647 | "num-traits", 1648 | "serde", 1649 | "serde_derive", 1650 | "solana-atomic-u64", 1651 | "solana-decode-error", 1652 | "solana-define-syscall", 1653 | "solana-sanitize", 1654 | "solana-sha256-hasher", 1655 | "wasm-bindgen", 1656 | ] 1657 | 1658 | [[package]] 1659 | name = "solana-rent" 1660 | version = "2.2.1" 1661 | source = "registry+https://github.com/rust-lang/crates.io-index" 1662 | checksum = "d1aea8fdea9de98ca6e8c2da5827707fb3842833521b528a713810ca685d2480" 1663 | dependencies = [ 1664 | "serde", 1665 | "serde_derive", 1666 | "solana-sdk-ids", 1667 | "solana-sdk-macro", 1668 | "solana-sysvar-id", 1669 | ] 1670 | 1671 | [[package]] 1672 | name = "solana-sanitize" 1673 | version = "2.2.1" 1674 | source = "registry+https://github.com/rust-lang/crates.io-index" 1675 | checksum = "61f1bc1357b8188d9c4a3af3fc55276e56987265eb7ad073ae6f8180ee54cecf" 1676 | 1677 | [[package]] 1678 | name = "solana-sdk-ids" 1679 | version = "2.2.1" 1680 | source = "registry+https://github.com/rust-lang/crates.io-index" 1681 | checksum = "5c5d8b9cc68d5c88b062a33e23a6466722467dde0035152d8fb1afbcdf350a5f" 1682 | dependencies = [ 1683 | "solana-pubkey", 1684 | ] 1685 | 1686 | [[package]] 1687 | name = "solana-sdk-macro" 1688 | version = "2.2.1" 1689 | source = "registry+https://github.com/rust-lang/crates.io-index" 1690 | checksum = "86280da8b99d03560f6ab5aca9de2e38805681df34e0bb8f238e69b29433b9df" 1691 | dependencies = [ 1692 | "bs58", 1693 | "proc-macro2", 1694 | "quote", 1695 | "syn 2.0.101", 1696 | ] 1697 | 1698 | [[package]] 1699 | name = "solana-secp256k1-recover" 1700 | version = "2.2.1" 1701 | source = "registry+https://github.com/rust-lang/crates.io-index" 1702 | checksum = "baa3120b6cdaa270f39444f5093a90a7b03d296d362878f7a6991d6de3bbe496" 1703 | dependencies = [ 1704 | "libsecp256k1", 1705 | "solana-define-syscall", 1706 | "thiserror 2.0.12", 1707 | ] 1708 | 1709 | [[package]] 1710 | name = "solana-serde-varint" 1711 | version = "2.2.1" 1712 | source = "registry+https://github.com/rust-lang/crates.io-index" 1713 | checksum = "bcc07d00200d82e6def2f7f7a45738e3406b17fe54a18adcf0defa16a97ccadb" 1714 | dependencies = [ 1715 | "serde", 1716 | ] 1717 | 1718 | [[package]] 1719 | name = "solana-serialize-utils" 1720 | version = "2.2.1" 1721 | source = "registry+https://github.com/rust-lang/crates.io-index" 1722 | checksum = "817a284b63197d2b27afdba829c5ab34231da4a9b4e763466a003c40ca4f535e" 1723 | dependencies = [ 1724 | "solana-instruction", 1725 | "solana-pubkey", 1726 | "solana-sanitize", 1727 | ] 1728 | 1729 | [[package]] 1730 | name = "solana-sha256-hasher" 1731 | version = "2.2.1" 1732 | source = "registry+https://github.com/rust-lang/crates.io-index" 1733 | checksum = "0037386961c0d633421f53560ad7c80675c0447cba4d1bb66d60974dd486c7ea" 1734 | dependencies = [ 1735 | "sha2 0.10.9", 1736 | "solana-define-syscall", 1737 | "solana-hash", 1738 | ] 1739 | 1740 | [[package]] 1741 | name = "solana-short-vec" 1742 | version = "2.2.1" 1743 | source = "registry+https://github.com/rust-lang/crates.io-index" 1744 | checksum = "5c54c66f19b9766a56fa0057d060de8378676cb64987533fa088861858fc5a69" 1745 | dependencies = [ 1746 | "serde", 1747 | ] 1748 | 1749 | [[package]] 1750 | name = "solana-slot-hashes" 1751 | version = "2.2.1" 1752 | source = "registry+https://github.com/rust-lang/crates.io-index" 1753 | checksum = "0c8691982114513763e88d04094c9caa0376b867a29577939011331134c301ce" 1754 | dependencies = [ 1755 | "serde", 1756 | "serde_derive", 1757 | "solana-hash", 1758 | "solana-sdk-ids", 1759 | "solana-sysvar-id", 1760 | ] 1761 | 1762 | [[package]] 1763 | name = "solana-slot-history" 1764 | version = "2.2.1" 1765 | source = "registry+https://github.com/rust-lang/crates.io-index" 1766 | checksum = "97ccc1b2067ca22754d5283afb2b0126d61eae734fc616d23871b0943b0d935e" 1767 | dependencies = [ 1768 | "bv", 1769 | "serde", 1770 | "serde_derive", 1771 | "solana-sdk-ids", 1772 | "solana-sysvar-id", 1773 | ] 1774 | 1775 | [[package]] 1776 | name = "solana-stable-layout" 1777 | version = "2.2.1" 1778 | source = "registry+https://github.com/rust-lang/crates.io-index" 1779 | checksum = "9f14f7d02af8f2bc1b5efeeae71bc1c2b7f0f65cd75bcc7d8180f2c762a57f54" 1780 | dependencies = [ 1781 | "solana-instruction", 1782 | "solana-pubkey", 1783 | ] 1784 | 1785 | [[package]] 1786 | name = "solana-stake-interface" 1787 | version = "1.2.1" 1788 | source = "registry+https://github.com/rust-lang/crates.io-index" 1789 | checksum = "5269e89fde216b4d7e1d1739cf5303f8398a1ff372a81232abbee80e554a838c" 1790 | dependencies = [ 1791 | "borsh 0.10.4", 1792 | "borsh 1.5.7", 1793 | "num-traits", 1794 | "serde", 1795 | "serde_derive", 1796 | "solana-clock", 1797 | "solana-cpi", 1798 | "solana-decode-error", 1799 | "solana-instruction", 1800 | "solana-program-error", 1801 | "solana-pubkey", 1802 | "solana-system-interface", 1803 | "solana-sysvar-id", 1804 | ] 1805 | 1806 | [[package]] 1807 | name = "solana-system-interface" 1808 | version = "1.0.0" 1809 | source = "registry+https://github.com/rust-lang/crates.io-index" 1810 | checksum = "94d7c18cb1a91c6be5f5a8ac9276a1d7c737e39a21beba9ea710ab4b9c63bc90" 1811 | dependencies = [ 1812 | "js-sys", 1813 | "num-traits", 1814 | "serde", 1815 | "serde_derive", 1816 | "solana-decode-error", 1817 | "solana-instruction", 1818 | "solana-pubkey", 1819 | "wasm-bindgen", 1820 | ] 1821 | 1822 | [[package]] 1823 | name = "solana-sysvar" 1824 | version = "2.2.1" 1825 | source = "registry+https://github.com/rust-lang/crates.io-index" 1826 | checksum = "bf6b44740d7f0c9f375d045c165bc0aab4a90658f92d6835aeb0649afaeaff9a" 1827 | dependencies = [ 1828 | "base64 0.22.1", 1829 | "bincode", 1830 | "bytemuck", 1831 | "bytemuck_derive", 1832 | "lazy_static", 1833 | "serde", 1834 | "serde_derive", 1835 | "solana-account-info", 1836 | "solana-clock", 1837 | "solana-define-syscall", 1838 | "solana-epoch-rewards", 1839 | "solana-epoch-schedule", 1840 | "solana-fee-calculator", 1841 | "solana-hash", 1842 | "solana-instruction", 1843 | "solana-instructions-sysvar", 1844 | "solana-last-restart-slot", 1845 | "solana-program-entrypoint", 1846 | "solana-program-error", 1847 | "solana-program-memory", 1848 | "solana-pubkey", 1849 | "solana-rent", 1850 | "solana-sanitize", 1851 | "solana-sdk-ids", 1852 | "solana-sdk-macro", 1853 | "solana-slot-hashes", 1854 | "solana-slot-history", 1855 | "solana-stake-interface", 1856 | "solana-sysvar-id", 1857 | ] 1858 | 1859 | [[package]] 1860 | name = "solana-sysvar-id" 1861 | version = "2.2.1" 1862 | source = "registry+https://github.com/rust-lang/crates.io-index" 1863 | checksum = "5762b273d3325b047cfda250787f8d796d781746860d5d0a746ee29f3e8812c1" 1864 | dependencies = [ 1865 | "solana-pubkey", 1866 | "solana-sdk-ids", 1867 | ] 1868 | 1869 | [[package]] 1870 | name = "solana-transaction-error" 1871 | version = "2.2.1" 1872 | source = "registry+https://github.com/rust-lang/crates.io-index" 1873 | checksum = "222a9dc8fdb61c6088baab34fc3a8b8473a03a7a5fd404ed8dd502fa79b67cb1" 1874 | dependencies = [ 1875 | "solana-instruction", 1876 | "solana-sanitize", 1877 | ] 1878 | 1879 | [[package]] 1880 | name = "solana-vote-interface" 1881 | version = "2.2.4" 1882 | source = "registry+https://github.com/rust-lang/crates.io-index" 1883 | checksum = "78f039b0788337bedc6c5450d2f237718f938defb5ce0e0ad8ef507e78dcd370" 1884 | dependencies = [ 1885 | "bincode", 1886 | "num-derive", 1887 | "num-traits", 1888 | "serde", 1889 | "serde_derive", 1890 | "solana-clock", 1891 | "solana-decode-error", 1892 | "solana-hash", 1893 | "solana-instruction", 1894 | "solana-pubkey", 1895 | "solana-rent", 1896 | "solana-sdk-ids", 1897 | "solana-serde-varint", 1898 | "solana-serialize-utils", 1899 | "solana-short-vec", 1900 | "solana-system-interface", 1901 | ] 1902 | 1903 | [[package]] 1904 | name = "spam_db" 1905 | version = "0.1.0" 1906 | dependencies = [ 1907 | "anchor-lang", 1908 | "bytemuck", 1909 | ] 1910 | 1911 | [[package]] 1912 | name = "subtle" 1913 | version = "2.6.1" 1914 | source = "registry+https://github.com/rust-lang/crates.io-index" 1915 | checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" 1916 | 1917 | [[package]] 1918 | name = "syn" 1919 | version = "1.0.109" 1920 | source = "registry+https://github.com/rust-lang/crates.io-index" 1921 | checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" 1922 | dependencies = [ 1923 | "proc-macro2", 1924 | "quote", 1925 | "unicode-ident", 1926 | ] 1927 | 1928 | [[package]] 1929 | name = "syn" 1930 | version = "2.0.101" 1931 | source = "registry+https://github.com/rust-lang/crates.io-index" 1932 | checksum = "8ce2b7fc941b3a24138a0a7cf8e858bfc6a992e7978a068a5c760deb0ed43caf" 1933 | dependencies = [ 1934 | "proc-macro2", 1935 | "quote", 1936 | "unicode-ident", 1937 | ] 1938 | 1939 | [[package]] 1940 | name = "thiserror" 1941 | version = "1.0.69" 1942 | source = "registry+https://github.com/rust-lang/crates.io-index" 1943 | checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" 1944 | dependencies = [ 1945 | "thiserror-impl 1.0.69", 1946 | ] 1947 | 1948 | [[package]] 1949 | name = "thiserror" 1950 | version = "2.0.12" 1951 | source = "registry+https://github.com/rust-lang/crates.io-index" 1952 | checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" 1953 | dependencies = [ 1954 | "thiserror-impl 2.0.12", 1955 | ] 1956 | 1957 | [[package]] 1958 | name = "thiserror-impl" 1959 | version = "1.0.69" 1960 | source = "registry+https://github.com/rust-lang/crates.io-index" 1961 | checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" 1962 | dependencies = [ 1963 | "proc-macro2", 1964 | "quote", 1965 | "syn 2.0.101", 1966 | ] 1967 | 1968 | [[package]] 1969 | name = "thiserror-impl" 1970 | version = "2.0.12" 1971 | source = "registry+https://github.com/rust-lang/crates.io-index" 1972 | checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" 1973 | dependencies = [ 1974 | "proc-macro2", 1975 | "quote", 1976 | "syn 2.0.101", 1977 | ] 1978 | 1979 | [[package]] 1980 | name = "tinyvec" 1981 | version = "1.9.0" 1982 | source = "registry+https://github.com/rust-lang/crates.io-index" 1983 | checksum = "09b3661f17e86524eccd4371ab0429194e0d7c008abb45f7a7495b1719463c71" 1984 | dependencies = [ 1985 | "tinyvec_macros", 1986 | ] 1987 | 1988 | [[package]] 1989 | name = "tinyvec_macros" 1990 | version = "0.1.1" 1991 | source = "registry+https://github.com/rust-lang/crates.io-index" 1992 | checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" 1993 | 1994 | [[package]] 1995 | name = "toml" 1996 | version = "0.5.11" 1997 | source = "registry+https://github.com/rust-lang/crates.io-index" 1998 | checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" 1999 | dependencies = [ 2000 | "serde", 2001 | ] 2002 | 2003 | [[package]] 2004 | name = "toml" 2005 | version = "0.8.22" 2006 | source = "registry+https://github.com/rust-lang/crates.io-index" 2007 | checksum = "05ae329d1f08c4d17a59bed7ff5b5a769d062e64a62d34a3261b219e62cd5aae" 2008 | dependencies = [ 2009 | "serde", 2010 | "serde_spanned", 2011 | "toml_datetime", 2012 | "toml_edit", 2013 | ] 2014 | 2015 | [[package]] 2016 | name = "toml_datetime" 2017 | version = "0.6.9" 2018 | source = "registry+https://github.com/rust-lang/crates.io-index" 2019 | checksum = "3da5db5a963e24bc68be8b17b6fa82814bb22ee8660f192bb182771d498f09a3" 2020 | dependencies = [ 2021 | "serde", 2022 | ] 2023 | 2024 | [[package]] 2025 | name = "toml_edit" 2026 | version = "0.22.26" 2027 | source = "registry+https://github.com/rust-lang/crates.io-index" 2028 | checksum = "310068873db2c5b3e7659d2cc35d21855dbafa50d1ce336397c666e3cb08137e" 2029 | dependencies = [ 2030 | "indexmap", 2031 | "serde", 2032 | "serde_spanned", 2033 | "toml_datetime", 2034 | "toml_write", 2035 | "winnow", 2036 | ] 2037 | 2038 | [[package]] 2039 | name = "toml_write" 2040 | version = "0.1.1" 2041 | source = "registry+https://github.com/rust-lang/crates.io-index" 2042 | checksum = "bfb942dfe1d8e29a7ee7fcbde5bd2b9a25fb89aa70caea2eba3bee836ff41076" 2043 | 2044 | [[package]] 2045 | name = "typenum" 2046 | version = "1.18.0" 2047 | source = "registry+https://github.com/rust-lang/crates.io-index" 2048 | checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f" 2049 | 2050 | [[package]] 2051 | name = "unicode-ident" 2052 | version = "1.0.18" 2053 | source = "registry+https://github.com/rust-lang/crates.io-index" 2054 | checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" 2055 | 2056 | [[package]] 2057 | name = "unicode-segmentation" 2058 | version = "1.12.0" 2059 | source = "registry+https://github.com/rust-lang/crates.io-index" 2060 | checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" 2061 | 2062 | [[package]] 2063 | name = "version_check" 2064 | version = "0.9.5" 2065 | source = "registry+https://github.com/rust-lang/crates.io-index" 2066 | checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" 2067 | 2068 | [[package]] 2069 | name = "wasi" 2070 | version = "0.9.0+wasi-snapshot-preview1" 2071 | source = "registry+https://github.com/rust-lang/crates.io-index" 2072 | checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" 2073 | 2074 | [[package]] 2075 | name = "wasi" 2076 | version = "0.11.0+wasi-snapshot-preview1" 2077 | source = "registry+https://github.com/rust-lang/crates.io-index" 2078 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 2079 | 2080 | [[package]] 2081 | name = "wasm-bindgen" 2082 | version = "0.2.100" 2083 | source = "registry+https://github.com/rust-lang/crates.io-index" 2084 | checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" 2085 | dependencies = [ 2086 | "cfg-if", 2087 | "once_cell", 2088 | "rustversion", 2089 | "wasm-bindgen-macro", 2090 | ] 2091 | 2092 | [[package]] 2093 | name = "wasm-bindgen-backend" 2094 | version = "0.2.100" 2095 | source = "registry+https://github.com/rust-lang/crates.io-index" 2096 | checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" 2097 | dependencies = [ 2098 | "bumpalo", 2099 | "log", 2100 | "proc-macro2", 2101 | "quote", 2102 | "syn 2.0.101", 2103 | "wasm-bindgen-shared", 2104 | ] 2105 | 2106 | [[package]] 2107 | name = "wasm-bindgen-macro" 2108 | version = "0.2.100" 2109 | source = "registry+https://github.com/rust-lang/crates.io-index" 2110 | checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" 2111 | dependencies = [ 2112 | "quote", 2113 | "wasm-bindgen-macro-support", 2114 | ] 2115 | 2116 | [[package]] 2117 | name = "wasm-bindgen-macro-support" 2118 | version = "0.2.100" 2119 | source = "registry+https://github.com/rust-lang/crates.io-index" 2120 | checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" 2121 | dependencies = [ 2122 | "proc-macro2", 2123 | "quote", 2124 | "syn 2.0.101", 2125 | "wasm-bindgen-backend", 2126 | "wasm-bindgen-shared", 2127 | ] 2128 | 2129 | [[package]] 2130 | name = "wasm-bindgen-shared" 2131 | version = "0.2.100" 2132 | source = "registry+https://github.com/rust-lang/crates.io-index" 2133 | checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" 2134 | dependencies = [ 2135 | "unicode-ident", 2136 | ] 2137 | 2138 | [[package]] 2139 | name = "web-sys" 2140 | version = "0.3.77" 2141 | source = "registry+https://github.com/rust-lang/crates.io-index" 2142 | checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" 2143 | dependencies = [ 2144 | "js-sys", 2145 | "wasm-bindgen", 2146 | ] 2147 | 2148 | [[package]] 2149 | name = "windows-targets" 2150 | version = "0.52.6" 2151 | source = "registry+https://github.com/rust-lang/crates.io-index" 2152 | checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" 2153 | dependencies = [ 2154 | "windows_aarch64_gnullvm", 2155 | "windows_aarch64_msvc", 2156 | "windows_i686_gnu", 2157 | "windows_i686_gnullvm", 2158 | "windows_i686_msvc", 2159 | "windows_x86_64_gnu", 2160 | "windows_x86_64_gnullvm", 2161 | "windows_x86_64_msvc", 2162 | ] 2163 | 2164 | [[package]] 2165 | name = "windows_aarch64_gnullvm" 2166 | version = "0.52.6" 2167 | source = "registry+https://github.com/rust-lang/crates.io-index" 2168 | checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" 2169 | 2170 | [[package]] 2171 | name = "windows_aarch64_msvc" 2172 | version = "0.52.6" 2173 | source = "registry+https://github.com/rust-lang/crates.io-index" 2174 | checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" 2175 | 2176 | [[package]] 2177 | name = "windows_i686_gnu" 2178 | version = "0.52.6" 2179 | source = "registry+https://github.com/rust-lang/crates.io-index" 2180 | checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" 2181 | 2182 | [[package]] 2183 | name = "windows_i686_gnullvm" 2184 | version = "0.52.6" 2185 | source = "registry+https://github.com/rust-lang/crates.io-index" 2186 | checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" 2187 | 2188 | [[package]] 2189 | name = "windows_i686_msvc" 2190 | version = "0.52.6" 2191 | source = "registry+https://github.com/rust-lang/crates.io-index" 2192 | checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" 2193 | 2194 | [[package]] 2195 | name = "windows_x86_64_gnu" 2196 | version = "0.52.6" 2197 | source = "registry+https://github.com/rust-lang/crates.io-index" 2198 | checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" 2199 | 2200 | [[package]] 2201 | name = "windows_x86_64_gnullvm" 2202 | version = "0.52.6" 2203 | source = "registry+https://github.com/rust-lang/crates.io-index" 2204 | checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" 2205 | 2206 | [[package]] 2207 | name = "windows_x86_64_msvc" 2208 | version = "0.52.6" 2209 | source = "registry+https://github.com/rust-lang/crates.io-index" 2210 | checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" 2211 | 2212 | [[package]] 2213 | name = "winnow" 2214 | version = "0.7.10" 2215 | source = "registry+https://github.com/rust-lang/crates.io-index" 2216 | checksum = "c06928c8748d81b05c9be96aad92e1b6ff01833332f281e8cfca3be4b35fc9ec" 2217 | dependencies = [ 2218 | "memchr", 2219 | ] 2220 | 2221 | [[package]] 2222 | name = "zerocopy" 2223 | version = "0.8.25" 2224 | source = "registry+https://github.com/rust-lang/crates.io-index" 2225 | checksum = "a1702d9583232ddb9174e01bb7c15a2ab8fb1bc6f227aa1233858c351a3ba0cb" 2226 | dependencies = [ 2227 | "zerocopy-derive", 2228 | ] 2229 | 2230 | [[package]] 2231 | name = "zerocopy-derive" 2232 | version = "0.8.25" 2233 | source = "registry+https://github.com/rust-lang/crates.io-index" 2234 | checksum = "28a6e20d751156648aa063f3800b706ee209a32c0b4d9f24be3d980b01be55ef" 2235 | dependencies = [ 2236 | "proc-macro2", 2237 | "quote", 2238 | "syn 2.0.101", 2239 | ] 2240 | 2241 | [[package]] 2242 | name = "zeroize" 2243 | version = "1.8.1" 2244 | source = "registry+https://github.com/rust-lang/crates.io-index" 2245 | checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" 2246 | --------------------------------------------------------------------------------