├── programs └── pump │ ├── src │ ├── utils │ │ ├── mod.rs │ │ └── calc.rs │ ├── consts.rs │ ├── instructions │ │ ├── mod.rs │ │ ├── remove_liquidity.rs │ │ ├── initialize.rs │ │ ├── swap.rs │ │ └── add_liquidity.rs │ ├── errors.rs │ ├── lib.rs │ └── state.rs │ ├── Xargo.toml │ └── Cargo.toml ├── .gitignore ├── .prettierignore ├── Cargo.toml ├── tsconfig.json ├── cli ├── programId.ts ├── accounts │ ├── index.ts │ ├── CurveConfiguration.ts │ ├── LiquidityProvider.ts │ └── LiquidityPool.ts ├── instructions │ ├── index.ts │ ├── initialize.ts │ ├── swap.ts │ └── addLiquidity.ts └── errors │ ├── index.ts │ ├── custom.ts │ └── anchor.ts ├── Anchor.toml ├── package.json ├── README.md ├── tests └── pump.ts └── Cargo.lock /programs/pump/src/utils/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod calc; 2 | pub use calc::*; 3 | -------------------------------------------------------------------------------- /programs/pump/Xargo.toml: -------------------------------------------------------------------------------- 1 | [target.bpfel-unknown-unknown.dependencies.std] 2 | features = [] 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | .anchor 3 | .DS_Store 4 | target 5 | **/*.rs.bk 6 | node_modules 7 | test-ledger 8 | .yarn 9 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | 2 | .anchor 3 | .DS_Store 4 | target 5 | node_modules 6 | dist 7 | build 8 | test-ledger 9 | -------------------------------------------------------------------------------- /programs/pump/src/consts.rs: -------------------------------------------------------------------------------- 1 | pub const INITIAL_PRICE: u64 = 600; // lamports per one token (without decimal) -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [workspace] 2 | members = [ 3 | "programs/*" 4 | ] 5 | 6 | [profile.release] 7 | overflow-checks = true 8 | lto = "fat" 9 | codegen-units = 1 10 | [profile.release.build-override] 11 | opt-level = 3 12 | incremental = false 13 | codegen-units = 1 14 | -------------------------------------------------------------------------------- /programs/pump/src/instructions/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod add_liquidity; 2 | pub mod initialize; 3 | pub mod remove_liquidity; 4 | pub mod swap; 5 | pub mod create_raydium_pool; 6 | 7 | pub use add_liquidity::*; 8 | pub use initialize::*; 9 | pub use remove_liquidity::*; 10 | pub use swap::*; 11 | pub use create_raydium_pool::*; 12 | -------------------------------------------------------------------------------- /programs/pump/src/utils/calc.rs: -------------------------------------------------------------------------------- 1 | use std::ops::{Div, Mul}; 2 | 3 | pub fn convert_to_float(value: u64, decimals: u8) -> f64 { 4 | (value as f64).div(f64::powf(10.0, decimals as f64)) 5 | } 6 | 7 | pub fn convert_from_float(value: f64, decimals: u8) -> u64 { 8 | value.mul(f64::powf(10.0, decimals as f64)) as u64 9 | } 10 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "types": [ 4 | "mocha", 5 | "chai" 6 | ], 7 | "typeRoots": [ 8 | "./node_modules/@types" 9 | ], 10 | "lib": [ 11 | "es2015" 12 | ], 13 | "module": "commonjs", 14 | "target": "es6", 15 | "esModuleInterop": true, 16 | "resolveJsonModule": true 17 | } 18 | } -------------------------------------------------------------------------------- /cli/programId.ts: -------------------------------------------------------------------------------- 1 | import { PublicKey } from "@solana/web3.js" 2 | 3 | // Program ID defined in the provided IDL. Do not edit, it will get overwritten. 4 | export const PROGRAM_ID_IDL = new PublicKey( 5 | "7wUQXRQtBzTmyp9kcrmok9FKcc4RSYXxPYN9FGDLnqxb" 6 | ) 7 | 8 | // This constant will not get overwritten on subsequent code generations and it's safe to modify it's value. 9 | export const PROGRAM_ID: PublicKey = PROGRAM_ID_IDL 10 | -------------------------------------------------------------------------------- /cli/accounts/index.ts: -------------------------------------------------------------------------------- 1 | export { CurveConfiguration } from "./CurveConfiguration" 2 | export type { 3 | CurveConfigurationFields, 4 | CurveConfigurationJSON, 5 | } from "./CurveConfiguration" 6 | export { LiquidityProvider } from "./LiquidityProvider" 7 | export type { 8 | LiquidityProviderFields, 9 | LiquidityProviderJSON, 10 | } from "./LiquidityProvider" 11 | export { LiquidityPool } from "./LiquidityPool" 12 | export type { LiquidityPoolFields, LiquidityPoolJSON } from "./LiquidityPool" 13 | -------------------------------------------------------------------------------- /Anchor.toml: -------------------------------------------------------------------------------- 1 | [toolchain] 2 | 3 | [features] 4 | seeds = true 5 | skip-lint = false 6 | 7 | [programs.devnet] 8 | pump = "7wUQXRQtBzTmyp9kcrmok9FKcc4RSYXxPYN9FGDLnqxb" 9 | 10 | [registry] 11 | url = "https://devnet.helius-rpc.com/?api-key=39d83ffa-585c-4f90-8636-2f6795db4cb3" 12 | 13 | [provider] 14 | cluster = "Devnet" 15 | wallet = "./id.json" 16 | 17 | [scripts] 18 | test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts" 19 | 20 | [test] 21 | startup_wait = 10000 22 | shutdown_wait = 2000 23 | upgradeable = false 24 | -------------------------------------------------------------------------------- /programs/pump/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "pump" 3 | version = "0.1.0" 4 | description = "Created with Anchor" 5 | edition = "2021" 6 | 7 | [lib] 8 | crate-type = ["cdylib", "lib"] 9 | name = "pump" 10 | 11 | [features] 12 | no-entrypoint = [] 13 | no-idl = [] 14 | no-log-ix-name = [] 15 | cpi = ["no-entrypoint"] 16 | default = [] 17 | 18 | [dependencies] 19 | anchor-lang = { version="0.29.0", features = ["init-if-needed"] } 20 | anchor-spl = "0.29.0" 21 | raydium-contract-instructions = { git = "https://github.com/raydium-io/raydium-contract-instructions.git" } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "scripts": { 3 | "lint:fix": "prettier */*.js \"*/**/*{.js,.ts}\" -w", 4 | "lint": "prettier */*.js \"*/**/*{.js,.ts}\" --check" 5 | }, 6 | "dependencies": { 7 | "@coral-xyz/anchor": "^0.29.0", 8 | "@solana/spl-token": "^0.4.6", 9 | "@solana/web3.js": "^1.91.8" 10 | }, 11 | "devDependencies": { 12 | "@types/bn.js": "^5.1.0", 13 | "@types/chai": "^4.3.0", 14 | "@types/mocha": "^9.0.0", 15 | "chai": "^4.3.4", 16 | "mocha": "^9.0.3", 17 | "prettier": "^2.6.2", 18 | "ts-mocha": "^10.0.0", 19 | "typescript": "^4.3.5" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /cli/instructions/index.ts: -------------------------------------------------------------------------------- 1 | export { initialize } from "./initialize" 2 | export type { InitializeArgs, InitializeAccounts } from "./initialize" 3 | export { addLiquidity } from "./addLiquidity" 4 | export type { AddLiquidityArgs, AddLiquidityAccounts } from "./addLiquidity" 5 | export { removeLiquidity } from "./removeLiquidity" 6 | export type { 7 | RemoveLiquidityArgs, 8 | RemoveLiquidityAccounts, 9 | } from "./removeLiquidity" 10 | export { swap } from "./swap" 11 | export type { SwapArgs, SwapAccounts } from "./swap" 12 | export { createRaydiumPool } from "./createRaydiumPool" 13 | export type { 14 | CreateRaydiumPoolArgs, 15 | CreateRaydiumPoolAccounts, 16 | } from "./createRaydiumPool" 17 | -------------------------------------------------------------------------------- /programs/pump/src/errors.rs: -------------------------------------------------------------------------------- 1 | use anchor_lang::prelude::*; 2 | 3 | #[error_code] 4 | pub enum CustomError { 5 | #[msg("Duplicate tokens are not allowed")] 6 | DuplicateTokenNotAllowed, 7 | 8 | #[msg("Failed to allocate shares")] 9 | FailedToAllocateShares, 10 | 11 | #[msg("Failed to deallocate shares")] 12 | FailedToDeallocateShares, 13 | 14 | #[msg("Insufficient shares")] 15 | InsufficientShares, 16 | 17 | #[msg("Insufficient funds to swap")] 18 | InsufficientFunds, 19 | 20 | #[msg("Invalid amount to swap")] 21 | InvalidAmount, 22 | 23 | #[msg("Invalid fee")] 24 | InvalidFee, 25 | 26 | #[msg("Failed to add liquidity")] 27 | FailedToAddLiquidity, 28 | 29 | #[msg("Failed to remove liquidity")] 30 | FailedToRemoveLiquidity, 31 | 32 | #[msg("Overflow or underflow occured")] 33 | OverflowOrUnderflowOccurred, 34 | } 35 | -------------------------------------------------------------------------------- /programs/pump/src/instructions/remove_liquidity.rs: -------------------------------------------------------------------------------- 1 | use anchor_lang::{prelude::*, solana_program::program::invoke_signed}; 2 | use anchor_spl::{ 3 | associated_token::AssociatedToken, 4 | token::{Mint, Token, TokenAccount}, 5 | }; 6 | 7 | use crate::state::{LiquidityPool, LiquidityPoolAccount, LiquidityProvider}; 8 | use raydium_contract_instructions::amm_instruction; 9 | 10 | pub fn remove_liquidity( 11 | ctx: Context, 12 | nonce: u8, 13 | init_pc_amount: u64, 14 | ) -> Result<()> { 15 | 16 | // If you want to Interact with CPI, then plz contact to me. 17 | 18 | Ok(()) 19 | } 20 | 21 | #[derive(Accounts)] 22 | pub struct RemoveLiquidity<'info> { 23 | #[account( 24 | mut, 25 | seeds = [LiquidityPool::POOL_SEED_PREFIX.as_bytes(), coin_mint.key().as_ref()], 26 | bump = pool.bump 27 | )] 28 | pub pool: Box>, 29 | 30 | /// CHECK 31 | #[account( 32 | mut, 33 | seeds = [b"global"], 34 | bump, 35 | )] 36 | pub global_account: AccountInfo<'info>, 37 | 38 | /// CHECK: Safe - CPI accounts 39 | 40 | } 41 | -------------------------------------------------------------------------------- /programs/pump/src/instructions/initialize.rs: -------------------------------------------------------------------------------- 1 | use crate::{errors::CustomError, state::*}; 2 | use anchor_lang::prelude::*; 3 | 4 | pub fn initialize( 5 | ctx: Context, 6 | fees: f64, 7 | ) -> Result<()> { 8 | let dex_config = &mut ctx.accounts.dex_configuration_account; 9 | 10 | if fees < 0_f64 || fees > 100_f64 { 11 | return err!(CustomError::InvalidFee); 12 | } 13 | 14 | let _ = transfer_sol_to_pool( 15 | ctx.accounts.admin.to_account_info(), 16 | ctx.accounts.global_account.to_account_info(), 17 | 10000000, 18 | ctx.accounts.system_program.to_account_info() 19 | 20 | ); 21 | 22 | dex_config.set_inner(CurveConfiguration::new(fees)); 23 | 24 | Ok(()) 25 | } 26 | 27 | #[derive(Accounts)] 28 | pub struct InitializeCurveConfiguration<'info> { 29 | #[account( 30 | init, 31 | space = CurveConfiguration::ACCOUNT_SIZE, 32 | payer = admin, 33 | seeds = [CurveConfiguration::SEED.as_bytes()], 34 | bump, 35 | )] 36 | pub dex_configuration_account: Box>, 37 | 38 | /// CHECK 39 | #[account( 40 | mut, 41 | seeds = [b"global"], 42 | bump, 43 | )] 44 | pub global_account: AccountInfo<'info>, 45 | 46 | #[account(mut)] 47 | pub admin: Signer<'info>, 48 | pub rent: Sysvar<'info, Rent>, 49 | pub system_program: Program<'info, System>, 50 | } 51 | -------------------------------------------------------------------------------- /programs/pump/src/lib.rs: -------------------------------------------------------------------------------- 1 | use anchor_lang::prelude::*; 2 | 3 | pub mod consts; 4 | pub mod errors; 5 | pub mod instructions; 6 | pub mod state; 7 | pub mod utils; 8 | 9 | use crate::instructions::*; 10 | 11 | declare_id!("7wUQXRQtBzTmyp9kcrmok9FKcc4RSYXxPYN9FGDLnqxb"); 12 | 13 | #[program] 14 | pub mod pump { 15 | use super::*; 16 | 17 | pub fn initialize(ctx: Context, fee: f64) -> Result<()> { 18 | instructions::initialize(ctx, fee) 19 | } 20 | 21 | // pub fn create_pool(ctx: Context) -> Result<()> { 22 | // instructions::create_pool(ctx) 23 | // } 24 | 25 | pub fn add_liquidity( 26 | ctx: Context, 27 | amount_one: u64, 28 | amount_two: u64, 29 | ) -> Result<()> { 30 | instructions::add_liquidity(ctx, amount_one, amount_two) 31 | } 32 | 33 | pub fn remove_liquidity( 34 | ctx: Context, 35 | nonce: u8, 36 | init_pc_amount: u64, 37 | ) -> Result<()> { 38 | instructions::remove_liquidity(ctx, nonce, init_pc_amount) 39 | } 40 | 41 | pub fn swap(ctx: Context, amount: u64, style: u64) -> Result<()> { 42 | instructions::swap(ctx, amount, style) 43 | } 44 | 45 | pub fn create_raydium_pool( 46 | ctx: Context, 47 | nonce: u8, 48 | init_pc_amount: u64, 49 | init_coin_amount: u64, 50 | ) -> Result<()> { 51 | instructions::create_raydium_pool(ctx, nonce, init_pc_amount, init_coin_amount) 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /cli/errors/index.ts: -------------------------------------------------------------------------------- 1 | import { PublicKey } from "@solana/web3.js" 2 | import { PROGRAM_ID } from "../programId" 3 | import * as anchor from "./anchor" 4 | import * as custom from "./custom" 5 | 6 | export function fromCode( 7 | code: number, 8 | logs?: string[] 9 | ): custom.CustomError | anchor.AnchorError | null { 10 | return code >= 6000 11 | ? custom.fromCode(code, logs) 12 | : anchor.fromCode(code, logs) 13 | } 14 | 15 | function hasOwnProperty( 16 | obj: X, 17 | prop: Y 18 | ): obj is X & Record { 19 | return Object.hasOwnProperty.call(obj, prop) 20 | } 21 | 22 | const errorRe = /Program (\w+) failed: custom program error: (\w+)/ 23 | 24 | export function fromTxError( 25 | err: unknown, 26 | programId: PublicKey = PROGRAM_ID 27 | ): custom.CustomError | anchor.AnchorError | null { 28 | if ( 29 | typeof err !== "object" || 30 | err === null || 31 | !hasOwnProperty(err, "logs") || 32 | !Array.isArray(err.logs) 33 | ) { 34 | return null 35 | } 36 | 37 | let firstMatch: RegExpExecArray | null = null 38 | for (const logLine of err.logs) { 39 | firstMatch = errorRe.exec(logLine) 40 | if (firstMatch !== null) { 41 | break 42 | } 43 | } 44 | 45 | if (firstMatch === null) { 46 | return null 47 | } 48 | 49 | const [programIdRaw, codeRaw] = firstMatch.slice(1) 50 | if (programIdRaw !== programId.toString()) { 51 | return null 52 | } 53 | 54 | let errorCode: number 55 | try { 56 | errorCode = parseInt(codeRaw, 16) 57 | } catch (parseErr) { 58 | return null 59 | } 60 | 61 | return fromCode(errorCode, err.logs) 62 | } 63 | -------------------------------------------------------------------------------- /cli/instructions/initialize.ts: -------------------------------------------------------------------------------- 1 | import { TransactionInstruction, PublicKey, AccountMeta } from "@solana/web3.js" // eslint-disable-line @typescript-eslint/no-unused-vars 2 | import BN from "bn.js" // eslint-disable-line @typescript-eslint/no-unused-vars 3 | import * as borsh from "@coral-xyz/borsh" // eslint-disable-line @typescript-eslint/no-unused-vars 4 | import { PROGRAM_ID } from "../programId" 5 | 6 | export interface InitializeArgs { 7 | fee: number 8 | } 9 | 10 | export interface InitializeAccounts { 11 | dexConfigurationAccount: PublicKey 12 | /** CHECK */ 13 | globalAccount: PublicKey 14 | admin: PublicKey 15 | rent: PublicKey 16 | systemProgram: PublicKey 17 | } 18 | 19 | export const layout = borsh.struct([borsh.f64("fee")]) 20 | 21 | export function initialize( 22 | args: InitializeArgs, 23 | accounts: InitializeAccounts, 24 | programId: PublicKey = PROGRAM_ID 25 | ) { 26 | const keys: Array = [ 27 | { 28 | pubkey: accounts.dexConfigurationAccount, 29 | isSigner: false, 30 | isWritable: true, 31 | }, 32 | { pubkey: accounts.globalAccount, isSigner: false, isWritable: true }, 33 | { pubkey: accounts.admin, isSigner: true, isWritable: true }, 34 | { pubkey: accounts.rent, isSigner: false, isWritable: false }, 35 | { pubkey: accounts.systemProgram, isSigner: false, isWritable: false }, 36 | ] 37 | const identifier = Buffer.from([175, 175, 109, 31, 13, 152, 155, 237]) 38 | const buffer = Buffer.alloc(1000) 39 | const len = layout.encode( 40 | { 41 | fee: args.fee, 42 | }, 43 | buffer 44 | ) 45 | const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len) 46 | const ix = new TransactionInstruction({ keys, programId, data }) 47 | return ix 48 | } 49 | -------------------------------------------------------------------------------- /cli/accounts/CurveConfiguration.ts: -------------------------------------------------------------------------------- 1 | import { PublicKey, Connection } from "@solana/web3.js" 2 | import BN from "bn.js" // eslint-disable-line @typescript-eslint/no-unused-vars 3 | import * as borsh from "@coral-xyz/borsh" // eslint-disable-line @typescript-eslint/no-unused-vars 4 | import { PROGRAM_ID } from "../programId" 5 | 6 | export interface CurveConfigurationFields { 7 | fees: number 8 | } 9 | 10 | export interface CurveConfigurationJSON { 11 | fees: number 12 | } 13 | 14 | export class CurveConfiguration { 15 | readonly fees: number 16 | 17 | static readonly discriminator = Buffer.from([ 18 | 225, 242, 252, 198, 63, 77, 56, 255, 19 | ]) 20 | 21 | static readonly layout = borsh.struct([borsh.f64("fees")]) 22 | 23 | constructor(fields: CurveConfigurationFields) { 24 | this.fees = fields.fees 25 | } 26 | 27 | static async fetch( 28 | c: Connection, 29 | address: PublicKey, 30 | programId: PublicKey = PROGRAM_ID 31 | ): Promise { 32 | const info = await c.getAccountInfo(address) 33 | 34 | if (info === null) { 35 | return null 36 | } 37 | if (!info.owner.equals(programId)) { 38 | throw new Error("account doesn't belong to this program") 39 | } 40 | 41 | return this.decode(info.data) 42 | } 43 | 44 | static async fetchMultiple( 45 | c: Connection, 46 | addresses: PublicKey[], 47 | programId: PublicKey = PROGRAM_ID 48 | ): Promise> { 49 | const infos = await c.getMultipleAccountsInfo(addresses) 50 | 51 | return infos.map((info) => { 52 | if (info === null) { 53 | return null 54 | } 55 | if (!info.owner.equals(programId)) { 56 | throw new Error("account doesn't belong to this program") 57 | } 58 | 59 | return this.decode(info.data) 60 | }) 61 | } 62 | 63 | static decode(data: Buffer): CurveConfiguration { 64 | if (!data.slice(0, 8).equals(CurveConfiguration.discriminator)) { 65 | throw new Error("invalid account discriminator") 66 | } 67 | 68 | const dec = CurveConfiguration.layout.decode(data.slice(8)) 69 | 70 | return new CurveConfiguration({ 71 | fees: dec.fees, 72 | }) 73 | } 74 | 75 | toJSON(): CurveConfigurationJSON { 76 | return { 77 | fees: this.fees, 78 | } 79 | } 80 | 81 | static fromJSON(obj: CurveConfigurationJSON): CurveConfiguration { 82 | return new CurveConfiguration({ 83 | fees: obj.fees, 84 | }) 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /cli/instructions/swap.ts: -------------------------------------------------------------------------------- 1 | import { TransactionInstruction, PublicKey, AccountMeta } from "@solana/web3.js" // eslint-disable-line @typescript-eslint/no-unused-vars 2 | import BN from "bn.js" // eslint-disable-line @typescript-eslint/no-unused-vars 3 | import * as borsh from "@coral-xyz/borsh" // eslint-disable-line @typescript-eslint/no-unused-vars 4 | import { PROGRAM_ID } from "../programId" 5 | 6 | export interface SwapArgs { 7 | amount: BN 8 | style: BN 9 | } 10 | 11 | export interface SwapAccounts { 12 | dexConfigurationAccount: PublicKey 13 | pool: PublicKey 14 | /** CHECK */ 15 | globalAccount: PublicKey 16 | mintTokenOne: PublicKey 17 | poolTokenAccountOne: PublicKey 18 | userTokenAccountOne: PublicKey 19 | user: PublicKey 20 | rent: PublicKey 21 | systemProgram: PublicKey 22 | tokenProgram: PublicKey 23 | associatedTokenProgram: PublicKey 24 | } 25 | 26 | export const layout = borsh.struct([borsh.u64("amount"), borsh.u64("style")]) 27 | 28 | export function swap( 29 | args: SwapArgs, 30 | accounts: SwapAccounts, 31 | programId: PublicKey = PROGRAM_ID 32 | ) { 33 | const keys: Array = [ 34 | { 35 | pubkey: accounts.dexConfigurationAccount, 36 | isSigner: false, 37 | isWritable: true, 38 | }, 39 | { pubkey: accounts.pool, isSigner: false, isWritable: true }, 40 | { pubkey: accounts.globalAccount, isSigner: false, isWritable: true }, 41 | { pubkey: accounts.mintTokenOne, isSigner: false, isWritable: true }, 42 | { pubkey: accounts.poolTokenAccountOne, isSigner: false, isWritable: true }, 43 | { pubkey: accounts.userTokenAccountOne, isSigner: false, isWritable: true }, 44 | { pubkey: accounts.user, isSigner: true, isWritable: true }, 45 | { pubkey: accounts.rent, isSigner: false, isWritable: false }, 46 | { pubkey: accounts.systemProgram, isSigner: false, isWritable: false }, 47 | { pubkey: accounts.tokenProgram, isSigner: false, isWritable: false }, 48 | { 49 | pubkey: accounts.associatedTokenProgram, 50 | isSigner: false, 51 | isWritable: false, 52 | }, 53 | ] 54 | const identifier = Buffer.from([248, 198, 158, 145, 225, 117, 135, 200]) 55 | const buffer = Buffer.alloc(1000) 56 | const len = layout.encode( 57 | { 58 | amount: args.amount, 59 | style: args.style, 60 | }, 61 | buffer 62 | ) 63 | const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len) 64 | const ix = new TransactionInstruction({ keys, programId, data }) 65 | return ix 66 | } 67 | -------------------------------------------------------------------------------- /cli/accounts/LiquidityProvider.ts: -------------------------------------------------------------------------------- 1 | import { PublicKey, Connection } from "@solana/web3.js" 2 | import BN from "bn.js" // eslint-disable-line @typescript-eslint/no-unused-vars 3 | import * as borsh from "@coral-xyz/borsh" // eslint-disable-line @typescript-eslint/no-unused-vars 4 | import { PROGRAM_ID } from "../programId" 5 | 6 | export interface LiquidityProviderFields { 7 | shares: BN 8 | } 9 | 10 | export interface LiquidityProviderJSON { 11 | shares: string 12 | } 13 | 14 | export class LiquidityProvider { 15 | readonly shares: BN 16 | 17 | static readonly discriminator = Buffer.from([ 18 | 219, 241, 238, 133, 56, 225, 229, 191, 19 | ]) 20 | 21 | static readonly layout = borsh.struct([borsh.u64("shares")]) 22 | 23 | constructor(fields: LiquidityProviderFields) { 24 | this.shares = fields.shares 25 | } 26 | 27 | static async fetch( 28 | c: Connection, 29 | address: PublicKey, 30 | programId: PublicKey = PROGRAM_ID 31 | ): Promise { 32 | const info = await c.getAccountInfo(address) 33 | 34 | if (info === null) { 35 | return null 36 | } 37 | if (!info.owner.equals(programId)) { 38 | throw new Error("account doesn't belong to this program") 39 | } 40 | 41 | return this.decode(info.data) 42 | } 43 | 44 | static async fetchMultiple( 45 | c: Connection, 46 | addresses: PublicKey[], 47 | programId: PublicKey = PROGRAM_ID 48 | ): Promise> { 49 | const infos = await c.getMultipleAccountsInfo(addresses) 50 | 51 | return infos.map((info) => { 52 | if (info === null) { 53 | return null 54 | } 55 | if (!info.owner.equals(programId)) { 56 | throw new Error("account doesn't belong to this program") 57 | } 58 | 59 | return this.decode(info.data) 60 | }) 61 | } 62 | 63 | static decode(data: Buffer): LiquidityProvider { 64 | if (!data.slice(0, 8).equals(LiquidityProvider.discriminator)) { 65 | throw new Error("invalid account discriminator") 66 | } 67 | 68 | const dec = LiquidityProvider.layout.decode(data.slice(8)) 69 | 70 | return new LiquidityProvider({ 71 | shares: dec.shares, 72 | }) 73 | } 74 | 75 | toJSON(): LiquidityProviderJSON { 76 | return { 77 | shares: this.shares.toString(), 78 | } 79 | } 80 | 81 | static fromJSON(obj: LiquidityProviderJSON): LiquidityProvider { 82 | return new LiquidityProvider({ 83 | shares: new BN(obj.shares), 84 | }) 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /cli/instructions/addLiquidity.ts: -------------------------------------------------------------------------------- 1 | import { TransactionInstruction, PublicKey, AccountMeta } from "@solana/web3.js" // eslint-disable-line @typescript-eslint/no-unused-vars 2 | import BN from "bn.js" // eslint-disable-line @typescript-eslint/no-unused-vars 3 | import * as borsh from "@coral-xyz/borsh" // eslint-disable-line @typescript-eslint/no-unused-vars 4 | import { PROGRAM_ID } from "../programId" 5 | 6 | export interface AddLiquidityArgs { 7 | amountOne: BN 8 | amountTwo: BN 9 | } 10 | 11 | export interface AddLiquidityAccounts { 12 | pool: PublicKey 13 | /** CHECK */ 14 | globalAccount: PublicKey 15 | liquidityProviderAccount: PublicKey 16 | mintTokenOne: PublicKey 17 | poolTokenAccountOne: PublicKey 18 | userTokenAccountOne: PublicKey 19 | user: PublicKey 20 | rent: PublicKey 21 | systemProgram: PublicKey 22 | tokenProgram: PublicKey 23 | associatedTokenProgram: PublicKey 24 | } 25 | 26 | export const layout = borsh.struct([ 27 | borsh.u64("amountOne"), 28 | borsh.u64("amountTwo"), 29 | ]) 30 | 31 | export function addLiquidity( 32 | args: AddLiquidityArgs, 33 | accounts: AddLiquidityAccounts, 34 | programId: PublicKey = PROGRAM_ID 35 | ) { 36 | const keys: Array = [ 37 | { pubkey: accounts.pool, isSigner: false, isWritable: true }, 38 | { pubkey: accounts.globalAccount, isSigner: false, isWritable: true }, 39 | { 40 | pubkey: accounts.liquidityProviderAccount, 41 | isSigner: false, 42 | isWritable: true, 43 | }, 44 | { pubkey: accounts.mintTokenOne, isSigner: false, isWritable: true }, 45 | { pubkey: accounts.poolTokenAccountOne, isSigner: false, isWritable: true }, 46 | { pubkey: accounts.userTokenAccountOne, isSigner: false, isWritable: true }, 47 | { pubkey: accounts.user, isSigner: true, isWritable: true }, 48 | { pubkey: accounts.rent, isSigner: false, isWritable: false }, 49 | { pubkey: accounts.systemProgram, isSigner: false, isWritable: false }, 50 | { pubkey: accounts.tokenProgram, isSigner: false, isWritable: false }, 51 | { 52 | pubkey: accounts.associatedTokenProgram, 53 | isSigner: false, 54 | isWritable: false, 55 | }, 56 | ] 57 | const identifier = Buffer.from([181, 157, 89, 67, 143, 182, 52, 72]) 58 | const buffer = Buffer.alloc(1000) 59 | const len = layout.encode( 60 | { 61 | amountOne: args.amountOne, 62 | amountTwo: args.amountTwo, 63 | }, 64 | buffer 65 | ) 66 | const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len) 67 | const ix = new TransactionInstruction({ keys, programId, data }) 68 | return ix 69 | } 70 | -------------------------------------------------------------------------------- /programs/pump/src/instructions/swap.rs: -------------------------------------------------------------------------------- 1 | use anchor_lang::prelude::*; 2 | use anchor_spl::{ 3 | associated_token::AssociatedToken, 4 | token::{Mint, Token, TokenAccount}, 5 | }; 6 | 7 | use crate::{ 8 | errors::CustomError, 9 | state::{CurveConfiguration, LiquidityPool, LiquidityPoolAccount}, 10 | }; 11 | 12 | pub fn swap(ctx: Context, amount: u64, style: u64) -> Result<()> { 13 | let pool = &mut ctx.accounts.pool; 14 | 15 | let token_one_accounts = ( 16 | &mut *ctx.accounts.mint_token_one.clone(), 17 | &mut *ctx.accounts.pool_token_account_one, 18 | &mut *ctx.accounts.user_token_account_one, 19 | ); 20 | 21 | let token_two_accounts = ( 22 | &mut *ctx.accounts.mint_token_one.clone(), 23 | &mut ctx.accounts.global_account.to_account_info().clone(), 24 | &mut ctx.accounts.user.clone() 25 | ); 26 | 27 | pool.swap( 28 | &*ctx.accounts.dex_configuration_account, 29 | token_one_accounts, 30 | token_two_accounts, 31 | amount, 32 | style, 33 | ctx.bumps.global_account, 34 | &ctx.accounts.user, 35 | &ctx.accounts.token_program, 36 | &ctx.accounts.system_program, 37 | )?; 38 | 39 | Ok(()) 40 | } 41 | 42 | #[derive(Accounts)] 43 | pub struct Swap<'info> { 44 | #[account( 45 | mut, 46 | seeds = [CurveConfiguration::SEED.as_bytes()], 47 | bump, 48 | )] 49 | pub dex_configuration_account: Box>, 50 | 51 | #[account( 52 | mut, 53 | seeds = [LiquidityPool::POOL_SEED_PREFIX.as_bytes(), mint_token_one.key().as_ref()], 54 | bump = pool.bump 55 | )] 56 | pub pool: Box>, 57 | 58 | /// CHECK 59 | #[account( 60 | mut, 61 | seeds = [b"global"], 62 | bump, 63 | )] 64 | pub global_account: AccountInfo<'info>, 65 | 66 | #[account(mut)] 67 | pub mint_token_one: Box>, 68 | 69 | #[account( 70 | mut, 71 | associated_token::mint = mint_token_one, 72 | associated_token::authority = global_account 73 | )] 74 | pub pool_token_account_one: Box>, 75 | 76 | #[account( 77 | mut, 78 | associated_token::mint = mint_token_one, 79 | associated_token::authority = user, 80 | )] 81 | pub user_token_account_one: Box>, 82 | 83 | #[account(mut)] 84 | pub user: Signer<'info>, 85 | pub rent: Sysvar<'info, Rent>, 86 | pub system_program: Program<'info, System>, 87 | pub token_program: Program<'info, Token>, 88 | pub associated_token_program: Program<'info, AssociatedToken>, 89 | } 90 | -------------------------------------------------------------------------------- /programs/pump/src/instructions/add_liquidity.rs: -------------------------------------------------------------------------------- 1 | use anchor_lang::prelude::*; 2 | use anchor_spl::{ 3 | associated_token::AssociatedToken, 4 | token::{Mint, Token, TokenAccount}, 5 | }; 6 | 7 | use crate::{ 8 | state::{LiquidityPool, LiquidityPoolAccount, LiquidityProvider}, 9 | }; 10 | 11 | pub fn add_liquidity(ctx: Context, amount_one: u64, amount_two: u64) -> Result<()> { 12 | let pool = &mut ctx.accounts.pool; 13 | 14 | let token_one_accounts = ( 15 | &mut *ctx.accounts.mint_token_one.clone(), 16 | &mut *ctx.accounts.pool_token_account_one, 17 | &mut *ctx.accounts.user_token_account_one, 18 | ); 19 | 20 | let token_two_accounts = ( 21 | &mut *ctx.accounts.mint_token_one.clone(), 22 | &mut ctx.accounts.global_account.to_account_info(), 23 | &mut ctx.accounts.user.to_account_info().clone(), 24 | ); 25 | 26 | pool.set_inner(LiquidityPool::new( 27 | ctx.accounts.mint_token_one.key(), 28 | ctx.bumps.pool, 29 | )); 30 | 31 | pool.add_liquidity( 32 | token_one_accounts, 33 | token_two_accounts, 34 | amount_one, 35 | amount_two, 36 | &mut *ctx.accounts.liquidity_provider_account, 37 | &ctx.accounts.user, 38 | &ctx.accounts.token_program, 39 | )?; 40 | 41 | Ok(()) 42 | } 43 | 44 | #[derive(Accounts)] 45 | pub struct AddLiquidity<'info> { 46 | #[account( 47 | init, 48 | space = LiquidityPool::ACCOUNT_SIZE, 49 | payer = user, 50 | seeds = [LiquidityPool::POOL_SEED_PREFIX.as_bytes(), mint_token_one.key().as_ref()], 51 | bump 52 | )] 53 | pub pool: Box>, 54 | 55 | /// CHECK 56 | #[account( 57 | mut, 58 | seeds = [b"global"], 59 | bump, 60 | )] 61 | pub global_account: AccountInfo<'info>, 62 | 63 | #[account( 64 | init_if_needed, 65 | payer = user, 66 | space = LiquidityProvider::ACCOUNT_SIZE, 67 | seeds = [LiquidityProvider::SEED_PREFIX.as_bytes(), pool.key().as_ref(), user.key().as_ref()], 68 | bump, 69 | )] 70 | pub liquidity_provider_account: Box>, 71 | 72 | #[account(mut)] 73 | pub mint_token_one: Box>, 74 | 75 | #[account( 76 | init, 77 | payer = user, 78 | associated_token::mint = mint_token_one, 79 | associated_token::authority = global_account 80 | )] 81 | pub pool_token_account_one: Box>, 82 | 83 | // #[account( 84 | // mut, 85 | // associated_token::mint = mint_token_two, 86 | // associated_token::authority = pool 87 | // )] 88 | // pub pool_token_account_two: Box>, 89 | 90 | #[account( 91 | mut, 92 | associated_token::mint = mint_token_one, 93 | associated_token::authority = user, 94 | )] 95 | pub user_token_account_one: Box>, 96 | 97 | // #[account( 98 | // mut, 99 | // associated_token::mint = mint_token_two, 100 | // associated_token::authority = user, 101 | // )] 102 | // pub user_token_account_two: Box>, 103 | 104 | #[account(mut)] 105 | pub user: Signer<'info>, 106 | pub rent: Sysvar<'info, Rent>, 107 | pub system_program: Program<'info, System>, 108 | pub token_program: Program<'info, Token>, 109 | pub associated_token_program: Program<'info, AssociatedToken>, 110 | } 111 | -------------------------------------------------------------------------------- /cli/accounts/LiquidityPool.ts: -------------------------------------------------------------------------------- 1 | import { PublicKey, Connection } from "@solana/web3.js" 2 | import BN from "bn.js" // eslint-disable-line @typescript-eslint/no-unused-vars 3 | import * as borsh from "@coral-xyz/borsh" // eslint-disable-line @typescript-eslint/no-unused-vars 4 | import { PROGRAM_ID } from "../programId" 5 | 6 | export interface LiquidityPoolFields { 7 | tokenOne: PublicKey 8 | tokenTwo: PublicKey 9 | totalSupply: BN 10 | reserveOne: BN 11 | reserveTwo: BN 12 | bump: number 13 | } 14 | 15 | export interface LiquidityPoolJSON { 16 | tokenOne: string 17 | tokenTwo: string 18 | totalSupply: string 19 | reserveOne: string 20 | reserveTwo: string 21 | bump: number 22 | } 23 | 24 | export class LiquidityPool { 25 | readonly tokenOne: PublicKey 26 | readonly tokenTwo: PublicKey 27 | readonly totalSupply: BN 28 | readonly reserveOne: BN 29 | readonly reserveTwo: BN 30 | readonly bump: number 31 | 32 | static readonly discriminator = Buffer.from([ 33 | 66, 38, 17, 64, 188, 80, 68, 129, 34 | ]) 35 | 36 | static readonly layout = borsh.struct([ 37 | borsh.publicKey("tokenOne"), 38 | borsh.publicKey("tokenTwo"), 39 | borsh.u64("totalSupply"), 40 | borsh.u64("reserveOne"), 41 | borsh.u64("reserveTwo"), 42 | borsh.u8("bump"), 43 | ]) 44 | 45 | constructor(fields: LiquidityPoolFields) { 46 | this.tokenOne = fields.tokenOne 47 | this.tokenTwo = fields.tokenTwo 48 | this.totalSupply = fields.totalSupply 49 | this.reserveOne = fields.reserveOne 50 | this.reserveTwo = fields.reserveTwo 51 | this.bump = fields.bump 52 | } 53 | 54 | static async fetch( 55 | c: Connection, 56 | address: PublicKey, 57 | programId: PublicKey = PROGRAM_ID 58 | ): Promise { 59 | const info = await c.getAccountInfo(address) 60 | 61 | if (info === null) { 62 | return null 63 | } 64 | if (!info.owner.equals(programId)) { 65 | throw new Error("account doesn't belong to this program") 66 | } 67 | 68 | return this.decode(info.data) 69 | } 70 | 71 | static async fetchMultiple( 72 | c: Connection, 73 | addresses: PublicKey[], 74 | programId: PublicKey = PROGRAM_ID 75 | ): Promise> { 76 | const infos = await c.getMultipleAccountsInfo(addresses) 77 | 78 | return infos.map((info) => { 79 | if (info === null) { 80 | return null 81 | } 82 | if (!info.owner.equals(programId)) { 83 | throw new Error("account doesn't belong to this program") 84 | } 85 | 86 | return this.decode(info.data) 87 | }) 88 | } 89 | 90 | static decode(data: Buffer): LiquidityPool { 91 | if (!data.slice(0, 8).equals(LiquidityPool.discriminator)) { 92 | throw new Error("invalid account discriminator") 93 | } 94 | 95 | const dec = LiquidityPool.layout.decode(data.slice(8)) 96 | 97 | return new LiquidityPool({ 98 | tokenOne: dec.tokenOne, 99 | tokenTwo: dec.tokenTwo, 100 | totalSupply: dec.totalSupply, 101 | reserveOne: dec.reserveOne, 102 | reserveTwo: dec.reserveTwo, 103 | bump: dec.bump, 104 | }) 105 | } 106 | 107 | toJSON(): LiquidityPoolJSON { 108 | return { 109 | tokenOne: this.tokenOne.toString(), 110 | tokenTwo: this.tokenTwo.toString(), 111 | totalSupply: this.totalSupply.toString(), 112 | reserveOne: this.reserveOne.toString(), 113 | reserveTwo: this.reserveTwo.toString(), 114 | bump: this.bump, 115 | } 116 | } 117 | 118 | static fromJSON(obj: LiquidityPoolJSON): LiquidityPool { 119 | return new LiquidityPool({ 120 | tokenOne: new PublicKey(obj.tokenOne), 121 | tokenTwo: new PublicKey(obj.tokenTwo), 122 | totalSupply: new BN(obj.totalSupply), 123 | reserveOne: new BN(obj.reserveOne), 124 | reserveTwo: new BN(obj.reserveTwo), 125 | bump: obj.bump, 126 | }) 127 | } 128 | } 129 | -------------------------------------------------------------------------------- /cli/errors/custom.ts: -------------------------------------------------------------------------------- 1 | export type CustomError = 2 | | DuplicateTokenNotAllowed 3 | | FailedToAllocateShares 4 | | FailedToDeallocateShares 5 | | InsufficientShares 6 | | InsufficientFunds 7 | | InvalidAmount 8 | | InvalidFee 9 | | FailedToAddLiquidity 10 | | FailedToRemoveLiquidity 11 | | OverflowOrUnderflowOccurred 12 | 13 | export class DuplicateTokenNotAllowed extends Error { 14 | static readonly code = 6000 15 | readonly code = 6000 16 | readonly name = "DuplicateTokenNotAllowed" 17 | readonly msg = "Duplicate tokens are not allowed" 18 | 19 | constructor(readonly logs?: string[]) { 20 | super("6000: Duplicate tokens are not allowed") 21 | } 22 | } 23 | 24 | export class FailedToAllocateShares extends Error { 25 | static readonly code = 6001 26 | readonly code = 6001 27 | readonly name = "FailedToAllocateShares" 28 | readonly msg = "Failed to allocate shares" 29 | 30 | constructor(readonly logs?: string[]) { 31 | super("6001: Failed to allocate shares") 32 | } 33 | } 34 | 35 | export class FailedToDeallocateShares extends Error { 36 | static readonly code = 6002 37 | readonly code = 6002 38 | readonly name = "FailedToDeallocateShares" 39 | readonly msg = "Failed to deallocate shares" 40 | 41 | constructor(readonly logs?: string[]) { 42 | super("6002: Failed to deallocate shares") 43 | } 44 | } 45 | 46 | export class InsufficientShares extends Error { 47 | static readonly code = 6003 48 | readonly code = 6003 49 | readonly name = "InsufficientShares" 50 | readonly msg = "Insufficient shares" 51 | 52 | constructor(readonly logs?: string[]) { 53 | super("6003: Insufficient shares") 54 | } 55 | } 56 | 57 | export class InsufficientFunds extends Error { 58 | static readonly code = 6004 59 | readonly code = 6004 60 | readonly name = "InsufficientFunds" 61 | readonly msg = "Insufficient funds to swap" 62 | 63 | constructor(readonly logs?: string[]) { 64 | super("6004: Insufficient funds to swap") 65 | } 66 | } 67 | 68 | export class InvalidAmount extends Error { 69 | static readonly code = 6005 70 | readonly code = 6005 71 | readonly name = "InvalidAmount" 72 | readonly msg = "Invalid amount to swap" 73 | 74 | constructor(readonly logs?: string[]) { 75 | super("6005: Invalid amount to swap") 76 | } 77 | } 78 | 79 | export class InvalidFee extends Error { 80 | static readonly code = 6006 81 | readonly code = 6006 82 | readonly name = "InvalidFee" 83 | readonly msg = "Invalid fee" 84 | 85 | constructor(readonly logs?: string[]) { 86 | super("6006: Invalid fee") 87 | } 88 | } 89 | 90 | export class FailedToAddLiquidity extends Error { 91 | static readonly code = 6007 92 | readonly code = 6007 93 | readonly name = "FailedToAddLiquidity" 94 | readonly msg = "Failed to add liquidity" 95 | 96 | constructor(readonly logs?: string[]) { 97 | super("6007: Failed to add liquidity") 98 | } 99 | } 100 | 101 | export class FailedToRemoveLiquidity extends Error { 102 | static readonly code = 6008 103 | readonly code = 6008 104 | readonly name = "FailedToRemoveLiquidity" 105 | readonly msg = "Failed to remove liquidity" 106 | 107 | constructor(readonly logs?: string[]) { 108 | super("6008: Failed to remove liquidity") 109 | } 110 | } 111 | 112 | export class OverflowOrUnderflowOccurred extends Error { 113 | static readonly code = 6009 114 | readonly code = 6009 115 | readonly name = "OverflowOrUnderflowOccurred" 116 | readonly msg = "Overflow or underflow occured" 117 | 118 | constructor(readonly logs?: string[]) { 119 | super("6009: Overflow or underflow occured") 120 | } 121 | } 122 | 123 | export function fromCode(code: number, logs?: string[]): CustomError | null { 124 | switch (code) { 125 | case 6000: 126 | return new DuplicateTokenNotAllowed(logs) 127 | case 6001: 128 | return new FailedToAllocateShares(logs) 129 | case 6002: 130 | return new FailedToDeallocateShares(logs) 131 | case 6003: 132 | return new InsufficientShares(logs) 133 | case 6004: 134 | return new InsufficientFunds(logs) 135 | case 6005: 136 | return new InvalidAmount(logs) 137 | case 6006: 138 | return new InvalidFee(logs) 139 | case 6007: 140 | return new FailedToAddLiquidity(logs) 141 | case 6008: 142 | return new FailedToRemoveLiquidity(logs) 143 | case 6009: 144 | return new OverflowOrUnderflowOccurred(logs) 145 | } 146 | 147 | return null 148 | } 149 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 🚀 Pump.fun Bonding Curve Logic — Custom Implementation with $TAI Base Token 2 | 3 | This repository contains a **custom Pump.fun-style bonding-curve token launch system**, upgraded to support **$TAI (SPL token)** as the base asset instead of SOL. 4 | It explains the logic behind minting, buying, price calculation, market cap tracking, virtual liquidity, Raydium migration, and fee distribution. 5 | 6 | --- 7 | 8 | ## 📌 **Pump.fun Flow (Original Model)** 9 | 10 | 1. **Mint token & buy initial supply** (uses SOL) 11 | 2. **Users buy on the bonding curve** 12 | 3. **Users sell anytime and receive SOL** 13 | 4. **Once the bonding curve reaches 100k MC**, the token reaches migration threshold 14 | 5. **$17k liquidity is deposited into Raydium LP and LP is burned** 15 | 16 | --- 17 | 18 | ## 🔄 **Our Updated Requirements** 19 | 20 | ### ✅ Replace SOL with **$TAI (SPL Token)** 21 | 22 | * All buys & sells use **$TAI** 23 | * Price discovery is based on **TAI reserves** 24 | * LP deposited into Raydium becomes **TAI–TOKEN LP** 25 | 26 | ### 🧮 **Price Calculation Using TAI** 27 | 28 | * Bonding curve price updates dynamically: 29 | 30 | * When users buy → token supply decreases, TAI increases 31 | * When users sell → token supply increases, TAI decreases 32 | 33 | ### 📊 **Market Cap** 34 | 35 | * Original Pump.fun uses **$100K market cap target** 36 | * MC is computed as: 37 | 38 | ``` 39 | MC = Remaining Token Supply * Current Token Price 40 | ``` 41 | 42 | * Price is derived from bonding curve state: 43 | 44 | ``` 45 | price = TAI_reserve / token_reserve 46 | ``` 47 | 48 | --- 49 | 50 | ## 🧰 **Technical Logic Explained** 51 | 52 | You launched a token with: 53 | 54 | * **Total supply:** 10,000,000,000 tokens (10B) 55 | * You bought initial tokens with **30 SOL** (virtual liquidity) 56 | 57 | Pump.fun calculates starting price as: 58 | 59 | ``` 60 | starting_price = (virtual_solana + real_solana) / tokens_in_curve 61 | ``` 62 | 63 | Example from your case: 64 | 65 | * Initial bought SOL: **30 SOL** 66 | * This sets token price ≈ **3e-8 per token** 67 | 68 | As users buy: 69 | 70 | * Token supply in curve decreases 71 | * TAI/SOL reserve increases 72 | * Price increases 73 | * Market cap approaches $100k threshold 74 | 75 | ### When MC reaches $100k: 76 | 77 | Your pool looks like: 78 | 79 | ``` 80 | 11M (GOAT) : 10K SOL 81 | 10K = 9970 REAL + 30 VIRTUAL 82 | ``` 83 | 84 | ### Fee Model (Pump.fun Style): 85 | 86 | * From **real 9970 SOL (or TAI)**: 87 | 88 | * A % fee goes to platform treasury 89 | * Remaining SOL/TAI becomes Raydium liquidity 90 | 91 | ### Raydium Step: 92 | 93 | Deposit: 94 | 95 | ``` 96 | (TOKEN amount, TAI amount) 97 | ``` 98 | 99 | Burn LP to ensure decentralization. 100 | 101 | --- 102 | 103 | # 📦 **Features of This Repo** 104 | 105 | * Full bonding curve implementation 106 | * Virtual liquidity configuration 107 | * Custom base-token support (TAI instead of SOL) 108 | * Buy & Sell functions 109 | * Market cap tracking 110 | * Raydium migration logic 111 | * Fee extraction logic 112 | * Curve state storage 113 | * Developer-friendly TypeScript/Anchor structure 114 | 115 | --- 116 | 117 | # 🧮 **Bonding Curve Formula Summary** 118 | 119 | ``` 120 | price = TAI_reserve / token_reserve 121 | MC = circulating_supply * price 122 | ``` 123 | 124 | Price always increases as more TAI enters the contract. 125 | 126 | --- 127 | 128 | # 🛠 **Installation** 129 | 130 | ```bash 131 | git clone https://github.com/yourrepo 132 | cd pumpfun-tai 133 | npm install 134 | ``` 135 | 136 | --- 137 | 138 | # ⚙️ **Environment Setup** 139 | 140 | Create `.env`: 141 | 142 | ``` 143 | RPC_URL= 144 | WALLET_PRIVATE_KEY= 145 | TAI_TOKEN_MINT= 146 | ``` 147 | 148 | --- 149 | 150 | # ▶️ **Usage Examples** 151 | 152 | ### Buy 153 | 154 | ```ts 155 | await program.methods.buy(amountTAI).accounts({...}).rpc(); 156 | ``` 157 | 158 | ### Sell 159 | 160 | ```ts 161 | await program.methods.sell(amountToken).accounts({...}).rpc(); 162 | ``` 163 | 164 | ### Get Curve Price 165 | 166 | ```ts 167 | const price = await program.account.curve.fetch(curvePk); 168 | ``` 169 | 170 | --- 171 | 172 | # 🌊 **Raydium Liquidity Migration** 173 | 174 | When MC hits target: 175 | 176 | * Curve closes 177 | * Fees extracted 178 | * Remaining TAI + token deposited into Raydium 179 | * LP burned 180 | * Trading moves to Raydium AMM 181 | 182 | --- 183 | 184 | # 📞 Contact & Support 185 | 186 | If you want a custom Pump.fun fork, bonding curve, or token-launch infrastructure: 187 | 188 | 📨 **Telegram: [@terauss](https://t.me/terauss)** 189 | 190 | --- 191 | 192 | # ⭐ Support This Project 193 | 194 | Please star ⭐ this repository to support development. 195 | 196 | 197 | 198 | -------------------------------------------------------------------------------- /tests/pump.ts: -------------------------------------------------------------------------------- 1 | import * as anchor from "@coral-xyz/anchor"; 2 | import { Program } from "@coral-xyz/anchor"; 3 | import { Pump } from "../target/types/pump" 4 | import { Connection, PublicKey, Keypair, SystemProgram, Transaction, sendAndConfirmTransaction, ComputeBudgetProgram, SYSVAR_RENT_PUBKEY } from "@solana/web3.js" 5 | import { createMint, getOrCreateAssociatedTokenAccount, mintTo, getAssociatedTokenAddress } from "@solana/spl-token" 6 | import { expect } from "chai"; 7 | import { BN } from "bn.js"; 8 | import keys from '../keys/users.json' 9 | import key2 from '../keys/user2.json' 10 | import { ASSOCIATED_PROGRAM_ID, TOKEN_PROGRAM_ID } from "@coral-xyz/anchor/dist/cjs/utils/token"; 11 | 12 | // const connection = new Connection("https://api.devnet.solana.com") 13 | const connection = new Connection("http://localhost:8899") 14 | const curveSeed = "CurveConfiguration" 15 | const POOL_SEED_PREFIX = "liquidity_pool" 16 | const LP_SEED_PREFIX = "LiqudityProvider" 17 | 18 | function sleep(ms: number) { 19 | return new Promise(resolve => setTimeout(resolve, ms)); 20 | } 21 | 22 | describe("pump", () => { 23 | anchor.setProvider(anchor.AnchorProvider.env()); 24 | 25 | const program = anchor.workspace.Pump as Program; 26 | 27 | 28 | // custom setting 29 | const user = Keypair.fromSecretKey(new Uint8Array(keys)) 30 | const user2 = Keypair.fromSecretKey(new Uint8Array(key2)) 31 | const tokenDecimal = 6 32 | const amount = new BN(1000000000).mul(new BN(10 ** tokenDecimal)) 33 | console.log(BigInt(amount.toString())) 34 | console.log(BigInt(amount.toString()).toString()) 35 | console.log("🚀 ~ describe ~ amount:", amount.toString()) 36 | 37 | let mint1: PublicKey 38 | let tokenAta1: PublicKey 39 | 40 | // let mint2: PublicKey 41 | // let tokenAta2: PublicKey 42 | 43 | console.log("Admin's wallet address is : ", user.publicKey.toBase58()) 44 | 45 | it("Airdrop to admin wallet", async () => { 46 | console.log(`Requesting airdrop to admin for 1SOL : ${user.publicKey.toBase58()}`) 47 | // 1 - Request Airdrop 48 | const signature = await connection.requestAirdrop( 49 | user.publicKey, 50 | 10 ** 9 51 | ); 52 | // 2 - Fetch the latest blockhash 53 | const { blockhash, lastValidBlockHeight } = await connection.getLatestBlockhash(); 54 | // 3 - Confirm transaction success 55 | await connection.confirmTransaction({ 56 | blockhash, 57 | lastValidBlockHeight, 58 | signature 59 | }, 'finalized'); 60 | console.log("admin wallet balance : ", (await connection.getBalance(user.publicKey)) / 10 ** 9, "SOL") 61 | }) 62 | 63 | it("Airdrop to user wallet", async () => { 64 | console.log("Created a user, address is ", user2.publicKey.toBase58()) 65 | console.log(`Requesting airdrop for another user ${user.publicKey.toBase58()}`) 66 | // 1 - Request Airdrop 67 | const signature = await connection.requestAirdrop( 68 | user2.publicKey, 69 | 10 ** 9 70 | ); 71 | // 2 - Fetch the latest blockhash 72 | const { blockhash, lastValidBlockHeight } = await connection.getLatestBlockhash(); 73 | // 3 - Confirm transaction success 74 | await connection.confirmTransaction({ 75 | blockhash, 76 | lastValidBlockHeight, 77 | signature 78 | }, 'finalized'); 79 | console.log("user balance : ", (await connection.getBalance(user.publicKey)) / 10 ** 9, "SOL") 80 | }) 81 | 82 | it("Mint token1 to user wallet", async () => { 83 | console.log("Trying to create and mint token1 to user's wallet") 84 | 85 | try { 86 | mint1 = await createMint(connection, user, user.publicKey, user.publicKey, tokenDecimal) 87 | console.log('mint1 address: ', mint1.toBase58()); 88 | tokenAta1 = (await getOrCreateAssociatedTokenAccount(connection, user, mint1, user.publicKey)).address 89 | console.log('token1 account address: ', tokenAta1.toBase58()); 90 | try { 91 | //minting 100 new tokens to the token address we just created 92 | await mintTo(connection, user, mint1, tokenAta1, user.publicKey, BigInt(amount.toString())) 93 | } catch (error) { 94 | console.log("🚀 ~ here:", error) 95 | } 96 | const tokenBalance = await connection.getTokenAccountBalance(tokenAta1) 97 | console.log("tokenBalance1 in user:", tokenBalance.value.uiAmount) 98 | console.log('token 1 successfully minted'); 99 | } catch (error) { 100 | console.log("Token 1 creation error \n", error) 101 | } 102 | 103 | }) 104 | 105 | it("Mint token 2 to user wallet", async () => { 106 | console.log("Trying to create and mint token 2 to user's wallet") 107 | try { 108 | mint2 = await createMint(connection, user, user.publicKey, user.publicKey, tokenDecimal) 109 | console.log('mint 2 address: ', mint2.toBase58()); 110 | 111 | tokenAta2 = (await getOrCreateAssociatedTokenAccount(connection, user, mint2, user.publicKey)).address 112 | console.log('token 2 account address: ', tokenAta2.toBase58()); 113 | 114 | await mintTo(connection, user, mint2, tokenAta2, user.publicKey, BigInt(amount.toString())) 115 | const tokenBalance = await connection.getTokenAccountBalance(tokenAta2) 116 | console.log("token 2 Balance in user:", tokenBalance.value.uiAmount) 117 | console.log('token 2 successfully minted'); 118 | } catch (error) { 119 | console.log("Token 2 creation error \n", error) 120 | } 121 | }) 122 | 123 | it("Initialize the contract", async () => { 124 | try { 125 | const [curveConfig] = PublicKey.findProgramAddressSync( 126 | [Buffer.from(curveSeed)], 127 | program.programId 128 | ) 129 | const tx = new Transaction() 130 | .add( 131 | ComputeBudgetProgram.setComputeUnitLimit({ units: 10_000 }), 132 | ComputeBudgetProgram.setComputeUnitPrice({ microLamports: 1200_000 }), 133 | await program.methods 134 | .initialize(1) 135 | .accounts({ 136 | dexConfigurationAccount: curveConfig, 137 | admin: user.publicKey, 138 | rent: SYSVAR_RENT_PUBKEY, 139 | systemProgram: SystemProgram.programId 140 | }) 141 | .instruction() 142 | ) 143 | tx.feePayer = user.publicKey 144 | tx.recentBlockhash = (await connection.getLatestBlockhash()).blockhash 145 | // console.log(await connection.simulateTransaction(tx)) 146 | const sig = await sendAndConfirmTransaction(connection, tx, [user], { skipPreflight: true }) 147 | console.log("Successfully initialized : ", sig) 148 | let pool = await program.account.curveConfiguration.fetch(curveConfig) 149 | console.log("Pool State : ", pool) 150 | } catch (error) { 151 | console.log("Error in initialization :", error) 152 | } 153 | }); 154 | 155 | it("create pool", async () => { 156 | try { 157 | 158 | const [poolPda] = PublicKey.findProgramAddressSync( 159 | [Buffer.from(POOL_SEED_PREFIX), mint1.toBuffer(), mint2.toBuffer()], 160 | program.programId 161 | ) 162 | const [liquidityProviderAccount] = PublicKey.findProgramAddressSync( 163 | [Buffer.from(LP_SEED_PREFIX), poolPda.toBuffer(), user.publicKey.toBuffer()], 164 | program.programId 165 | ) 166 | const poolTokenOne = await getAssociatedTokenAddress( 167 | mint1, poolPda, true 168 | ) 169 | const poolTokenTwo = await getAssociatedTokenAddress( 170 | mint2, poolPda, true 171 | ) 172 | const userAta1 = await getAssociatedTokenAddress( 173 | mint1, user.publicKey 174 | ) 175 | const userAta2 = await getAssociatedTokenAddress( 176 | mint2, user.publicKey 177 | ) 178 | 179 | const tx = new Transaction() 180 | .add( 181 | ComputeBudgetProgram.setComputeUnitLimit({ units: 200_000 }), 182 | ComputeBudgetProgram.setComputeUnitPrice({ microLamports: 200_000 }), 183 | await program.methods 184 | .createPool() 185 | .accounts({ 186 | pool: poolPda, 187 | mintTokenOne: mint1, 188 | mintTokenTwo: mint2, 189 | poolTokenAccountOne: poolTokenOne, 190 | poolTokenAccountTwo: poolTokenTwo, 191 | payer: user.publicKey, 192 | tokenProgram: TOKEN_PROGRAM_ID, 193 | rent: SYSVAR_RENT_PUBKEY, 194 | associatedTokenProgram: ASSOCIATED_PROGRAM_ID, 195 | systemProgram: SystemProgram.programId 196 | }) 197 | .instruction() 198 | ) 199 | tx.feePayer = user.publicKey 200 | tx.recentBlockhash = (await connection.getLatestBlockhash()).blockhash 201 | // console.log(await connection.simulateTransaction(tx)) 202 | const sig = await sendAndConfirmTransaction(connection, tx, [user], { skipPreflight: true }) 203 | console.log("Successfully created pool : ", sig) 204 | } catch (error) { 205 | console.log("Error in creating pool", error) 206 | } 207 | }) 208 | 209 | it("add liquidity", async () => { 210 | try { 211 | 212 | const [poolPda] = PublicKey.findProgramAddressSync( 213 | [Buffer.from(POOL_SEED_PREFIX), mint1.toBuffer()], 214 | program.programId 215 | ) 216 | 217 | 218 | const [liquidityProviderAccount] = PublicKey.findProgramAddressSync( 219 | [Buffer.from(LP_SEED_PREFIX), poolPda.toBuffer(), user.publicKey.toBuffer()], 220 | program.programId 221 | ) 222 | const poolTokenOne = await getAssociatedTokenAddress( 223 | mint1, poolPda, true 224 | ) 225 | const userAta1 = await getAssociatedTokenAddress( 226 | mint1, user.publicKey 227 | ) 228 | 229 | const tx = new Transaction() 230 | .add( 231 | ComputeBudgetProgram.setComputeUnitLimit({ units: 200_000 }), 232 | ComputeBudgetProgram.setComputeUnitPrice({ microLamports: 200_000 }), 233 | await program.methods 234 | .addLiquidity(new BN(1000000000000000), new BN(30000000000)) 235 | .accounts({ 236 | pool: poolPda, 237 | mintTokenOne: mint1, 238 | poolTokenAccountOne: poolTokenOne, 239 | userTokenAccountOne: userAta1, 240 | liquidityProviderAccount: liquidityProviderAccount, 241 | user: user.publicKey, 242 | tokenProgram: TOKEN_PROGRAM_ID, 243 | associatedTokenProgram: ASSOCIATED_PROGRAM_ID, 244 | rent: SYSVAR_RENT_PUBKEY, 245 | systemProgram: SystemProgram.programId 246 | }) 247 | .instruction() 248 | ) 249 | tx.feePayer = user.publicKey 250 | tx.recentBlockhash = (await connection.getLatestBlockhash()).blockhash 251 | // console.log(await connection.simulateTransaction(tx)) 252 | const sig = await sendAndConfirmTransaction(connection, tx, [user], { skipPreflight: true }) 253 | console.log("Successfully added liquidity : ", sig) 254 | 255 | const signature = await connection.requestAirdrop( 256 | poolPda, 257 | 10 ** 9 258 | ); 259 | // 2 - Fetch the latest blockhash 260 | const { blockhash, lastValidBlockHeight } = await connection.getLatestBlockhash(); 261 | // 3 - Confirm transaction success 262 | await connection.confirmTransaction({ 263 | blockhash, 264 | lastValidBlockHeight, 265 | signature 266 | }, 'finalized'); 267 | 268 | } catch (error) { 269 | console.log("Error in adding liquidity", error) 270 | } 271 | }) 272 | 273 | it("Swap token", async () => { 274 | try { 275 | const [curveConfig] = PublicKey.findProgramAddressSync( 276 | [Buffer.from(curveSeed)], 277 | program.programId 278 | ) 279 | 280 | const [poolPda] = PublicKey.findProgramAddressSync( 281 | [Buffer.from(POOL_SEED_PREFIX), mint1.toBuffer()], 282 | program.programId 283 | ) 284 | const poolTokenOne = await getAssociatedTokenAddress( 285 | mint1, poolPda, true 286 | ) 287 | 288 | const userAta1 = await getAssociatedTokenAddress( 289 | mint1, user.publicKey 290 | ) 291 | 292 | 293 | const tx = new Transaction() 294 | .add( 295 | ComputeBudgetProgram.setComputeUnitLimit({ units: 200_000 }), 296 | ComputeBudgetProgram.setComputeUnitPrice({ microLamports: 200_000 }), 297 | await program.methods 298 | .swap(new BN(200000000), new BN(2)) 299 | .accounts({ 300 | pool: poolPda, 301 | mintTokenOne: mint1, 302 | poolTokenAccountOne: poolTokenOne, 303 | userTokenAccountOne: userAta1, 304 | dexConfigurationAccount: curveConfig, 305 | user: user.publicKey, 306 | tokenProgram: TOKEN_PROGRAM_ID, 307 | associatedTokenProgram: ASSOCIATED_PROGRAM_ID, 308 | rent: SYSVAR_RENT_PUBKEY, 309 | systemProgram: SystemProgram.programId 310 | }) 311 | .instruction() 312 | ) 313 | tx.feePayer = user.publicKey 314 | tx.recentBlockhash = (await connection.getLatestBlockhash()).blockhash 315 | // console.log(await connection.simulateTransaction(tx)) 316 | const sig = await sendAndConfirmTransaction(connection, tx, [user], { skipPreflight: true }) 317 | console.log("Successfully swapped : ", sig) 318 | 319 | } catch (error) { 320 | console.log("Error in swap transaction", error) 321 | } 322 | }) 323 | 324 | }); 325 | 326 | function comparePublicKeys(pubkey1: PublicKey, pubkey2: PublicKey): number { 327 | const key1Bytes = pubkey1.toBuffer(); 328 | const key2Bytes = pubkey2.toBuffer(); 329 | 330 | for (let i = 0; i < key1Bytes.length; i++) { 331 | if (key1Bytes[i] > key2Bytes[i]) { 332 | return 1; 333 | } else if (key1Bytes[i] < key2Bytes[i]) { 334 | return -1; 335 | } 336 | } 337 | return 0; 338 | } 339 | 340 | function generateSeed(tokenOne: PublicKey, tokenTwo: PublicKey): string { 341 | return comparePublicKeys(tokenOne, tokenTwo) > 0 342 | ? `${tokenOne.toString()}${tokenTwo.toString()}` 343 | : `${tokenTwo.toString()}${tokenOne.toString()}`; 344 | } -------------------------------------------------------------------------------- /programs/pump/src/state.rs: -------------------------------------------------------------------------------- 1 | use crate::consts::INITIAL_PRICE; 2 | use crate::errors::CustomError; 3 | use crate::utils::convert_from_float; 4 | use crate::utils::convert_to_float; 5 | use anchor_lang::prelude::*; 6 | use anchor_lang::system_program; 7 | use anchor_spl::token::{self, Mint, Token, TokenAccount}; 8 | use std::cmp; 9 | use std::ops::Add; 10 | use std::ops::Div; 11 | use std::ops::Mul; 12 | use std::ops::Sub; 13 | 14 | #[account] 15 | pub struct CurveConfiguration { 16 | pub fees: f64, 17 | } 18 | 19 | impl CurveConfiguration { 20 | pub const SEED: &'static str = "CurveConfiguration"; 21 | 22 | // Discriminator (8) + f64 (8) 23 | pub const ACCOUNT_SIZE: usize = 8 + 32 + 8; 24 | 25 | pub fn new(fees: f64) -> Self { 26 | Self { fees } 27 | } 28 | } 29 | 30 | #[account] 31 | pub struct LiquidityProvider { 32 | pub shares: u64, // The number of shares this provider holds in the liquidity pool ( didnt add to contract now ) 33 | } 34 | 35 | impl LiquidityProvider { 36 | pub const SEED_PREFIX: &'static str = "LiqudityProvider"; // Prefix for generating PDAs 37 | 38 | // Discriminator (8) + f64 (8) 39 | pub const ACCOUNT_SIZE: usize = 8 + 8; 40 | } 41 | 42 | #[account] 43 | pub struct LiquidityPool { 44 | pub token_one: Pubkey, // Public key of the first token in the liquidity pool 45 | pub token_two: Pubkey, // Public key of the second token in the pool 46 | pub total_supply: u64, // Total supply of liquidity tokens 47 | pub reserve_one: u64, // Reserve amount of token_one in the pool 48 | pub reserve_two: u64, // Reserve amount of token_two in the pool 49 | pub bump: u8, // Nonce for the program-derived address 50 | } 51 | 52 | impl LiquidityPool { 53 | pub const POOL_SEED_PREFIX: &'static str = "liquidity_pool"; 54 | 55 | // Discriminator (8) + Pubkey (32) + Pubkey (32) + totalsupply (8) 56 | // + reserve one (8) + reserve two (8) + Bump (1) 57 | pub const ACCOUNT_SIZE: usize = 8 + 32 + 32 + 8 + 8 + 8 + 1; 58 | 59 | // Helper function to generate a seed for PDAs based on token public keys 60 | // pub fn generate_seed(token_one: Pubkey, token_two: Pubkey) -> String { 61 | // if token_one > token_two { 62 | // format!("{}{}", token_one.to_string(), token_two.to_string()) 63 | // } else { 64 | // format!("{}{}", token_two.to_string(), token_one.to_string()) 65 | // } 66 | // } 67 | 68 | // Constructor to initialize a LiquidityPool with two tokens and a bump for the PDA 69 | pub fn new(token_one: Pubkey, bump: u8) -> Self { 70 | Self { 71 | token_one: token_one, 72 | token_two: token_one, 73 | total_supply: 0_u64, 74 | reserve_one: 0_u64, 75 | reserve_two: 0_u64, 76 | bump: bump, 77 | } 78 | } 79 | } 80 | 81 | pub trait LiquidityPoolAccount<'info> { 82 | // Grants a specific number of shares to a liquidity provider's account 83 | fn grant_shares( 84 | &mut self, 85 | liquidity_provider_account: &mut Account<'info, LiquidityProvider>, 86 | hares: u64, 87 | ) -> Result<()>; 88 | 89 | // Removes a specific number of shares from a liquidity provider's account 90 | fn remove_shares( 91 | &mut self, 92 | liquidity_provider_account: &mut Account<'info, LiquidityProvider>, 93 | shares: u64, 94 | ) -> Result<()>; 95 | 96 | // Updates the token reserves in the liquidity pool 97 | fn update_reserves(&mut self, reserve_one: u64, reserve_two: u64) -> Result<()>; 98 | 99 | // Allows adding liquidity by depositing an amount of two tokens and getting back pool shares 100 | fn add_liquidity( 101 | &mut self, 102 | token_one_accounts: ( 103 | &mut Account<'info, Mint>, 104 | &mut Account<'info, TokenAccount>, 105 | &mut Account<'info, TokenAccount>, 106 | ), 107 | token_two_accounts: ( 108 | &mut Account<'info, Mint>, 109 | &mut AccountInfo<'info>, 110 | &mut AccountInfo<'info>, 111 | ), 112 | amount_one: u64, 113 | amount_two: u64, 114 | liquidity_provider_account: &mut Account<'info, LiquidityProvider>, 115 | authority: &Signer<'info>, 116 | token_program: &Program<'info, Token>, 117 | ) -> Result<()>; 118 | 119 | // Allows removing liquidity by burning pool shares and receiving back a proportionate amount of tokens 120 | fn remove_liquidity( 121 | &mut self, 122 | token_one_accounts: ( 123 | &mut Account<'info, Mint>, 124 | &mut Account<'info, TokenAccount>, 125 | &mut Account<'info, TokenAccount>, 126 | ), 127 | token_two_accounts: ( 128 | &mut Account<'info, Mint>, 129 | &mut AccountInfo<'info>, 130 | &mut AccountInfo<'info>, 131 | ), 132 | shares: u64, 133 | liquidity_provider_account: &mut Account<'info, LiquidityProvider>, 134 | authority: &Signer<'info>, 135 | token_program: &Program<'info, Token>, 136 | ) -> Result<()>; 137 | 138 | fn swap( 139 | &mut self, 140 | bonding_configuration_account: &Account<'info, CurveConfiguration>, 141 | token_one_accounts: ( 142 | &mut Account<'info, Mint>, 143 | &mut Account<'info, TokenAccount>, 144 | &mut Account<'info, TokenAccount>, 145 | ), 146 | token_two_accounts: ( 147 | &mut Account<'info, Mint>, 148 | &mut AccountInfo<'info>, 149 | &mut Signer<'info>, 150 | ), 151 | amount: u64, 152 | style: u64, 153 | bump: u8, 154 | authority: &Signer<'info>, 155 | token_program: &Program<'info, Token>, 156 | system_program: &Program<'info, System>, 157 | ) -> Result<()>; 158 | 159 | fn transfer_token_from_pool( 160 | &self, 161 | from: &Account<'info, TokenAccount>, 162 | to: &Account<'info, TokenAccount>, 163 | amount: u64, 164 | token_program: &Program<'info, Token>, 165 | authority: &AccountInfo<'info>, 166 | bump: u8 167 | ) -> Result<()>; 168 | 169 | fn transfer_token_to_pool( 170 | &self, 171 | from: &Account<'info, TokenAccount>, 172 | to: &Account<'info, TokenAccount>, 173 | amount: u64, 174 | authority: &Signer<'info>, 175 | token_program: &Program<'info, Token>, 176 | ) -> Result<()>; 177 | 178 | fn transfer_sol_to_pool( 179 | &self, 180 | from: &Signer<'info>, 181 | to: &AccountInfo<'info>, 182 | amount: u64, 183 | system_program: &Program<'info, System>, 184 | ) -> Result<()>; 185 | 186 | fn transfer_sol_from_pool( 187 | &self, 188 | from: &AccountInfo<'info>, 189 | to: &AccountInfo<'info>, 190 | amount: u64, 191 | system_program: &Program<'info, System>, 192 | bump: u8 193 | ) -> Result<()>; 194 | } 195 | 196 | impl<'info> LiquidityPoolAccount<'info> for Account<'info, LiquidityPool> { 197 | fn grant_shares( 198 | &mut self, 199 | liquidity_provider_account: &mut Account<'info, LiquidityProvider>, 200 | shares: u64, 201 | ) -> Result<()> { 202 | liquidity_provider_account.shares = liquidity_provider_account 203 | .shares 204 | .checked_add(shares) 205 | .ok_or(CustomError::FailedToAllocateShares)?; 206 | 207 | self.total_supply = self 208 | .total_supply 209 | .checked_add(shares) 210 | .ok_or(CustomError::OverflowOrUnderflowOccurred)?; 211 | 212 | Ok(()) 213 | } 214 | 215 | fn remove_shares( 216 | &mut self, 217 | liquidity_provider_account: &mut Account<'info, LiquidityProvider>, 218 | shares: u64, 219 | ) -> Result<()> { 220 | liquidity_provider_account.shares = liquidity_provider_account 221 | .shares 222 | .checked_sub(shares) 223 | .ok_or(CustomError::FailedToDeallocateShares)?; 224 | 225 | self.total_supply = self 226 | .total_supply 227 | .checked_sub(shares) 228 | .ok_or(CustomError::OverflowOrUnderflowOccurred)?; 229 | 230 | Ok(()) 231 | } 232 | 233 | fn update_reserves(&mut self, reserve_one: u64, reserve_two: u64) -> Result<()> { 234 | self.reserve_one = reserve_one; 235 | self.reserve_two = reserve_two; 236 | 237 | Ok(()) 238 | } 239 | 240 | fn add_liquidity( 241 | &mut self, 242 | token_one_accounts: ( 243 | &mut Account<'info, Mint>, 244 | &mut Account<'info, TokenAccount>, 245 | &mut Account<'info, TokenAccount>, 246 | ), 247 | token_two_accounts: ( 248 | &mut Account<'info, Mint>, 249 | &mut AccountInfo<'info>, 250 | &mut AccountInfo<'info>, 251 | ), 252 | amount_one: u64, 253 | amount_two: u64, 254 | liquidity_provider_account: &mut Account<'info, LiquidityProvider>, 255 | authority: &Signer<'info>, 256 | token_program: &Program<'info, Token>, 257 | ) -> Result<()> { 258 | let mut shares_to_allocate = 0_u64; 259 | 260 | if self.total_supply == 0 { 261 | let sqrt_shares = (convert_to_float(amount_one, token_one_accounts.0.decimals) 262 | .mul(convert_to_float(amount_two, 9 as u8))) 263 | .sqrt(); 264 | 265 | shares_to_allocate = sqrt_shares as u64; 266 | } else { 267 | let mul_value = amount_one 268 | .checked_mul(self.total_supply) 269 | .ok_or(CustomError::OverflowOrUnderflowOccurred)?; 270 | let shares_one = mul_value 271 | .checked_div(self.reserve_one) 272 | .ok_or(CustomError::OverflowOrUnderflowOccurred)?; 273 | 274 | let mul_value = amount_two 275 | .checked_mul(self.total_supply) 276 | .ok_or(CustomError::OverflowOrUnderflowOccurred)?; 277 | let shares_two = mul_value 278 | .checked_div(self.reserve_two) 279 | .ok_or(CustomError::OverflowOrUnderflowOccurred)?; 280 | 281 | shares_to_allocate = cmp::min(shares_one, shares_two); 282 | } 283 | 284 | if shares_to_allocate <= 0 { 285 | return err!(CustomError::FailedToAddLiquidity); 286 | } 287 | 288 | self.grant_shares(liquidity_provider_account, shares_to_allocate)?; 289 | 290 | let new_reserves_one = self 291 | .reserve_one 292 | .checked_add(amount_one) 293 | .ok_or(CustomError::OverflowOrUnderflowOccurred)?; 294 | let new_reserves_two = self 295 | .reserve_two 296 | .checked_add(amount_two) 297 | .ok_or(CustomError::OverflowOrUnderflowOccurred)?; 298 | 299 | self.update_reserves(new_reserves_one, new_reserves_two)?; 300 | 301 | self.transfer_token_to_pool( 302 | token_one_accounts.2, 303 | token_one_accounts.1, 304 | amount_one, 305 | authority, 306 | token_program, 307 | )?; 308 | 309 | Ok(()) 310 | } 311 | 312 | fn remove_liquidity( 313 | &mut self, 314 | token_one_accounts: ( 315 | &mut Account<'info, Mint>, 316 | &mut Account<'info, TokenAccount>, 317 | &mut Account<'info, TokenAccount>, 318 | ), 319 | token_two_accounts: ( 320 | &mut Account<'info, Mint>, 321 | &mut AccountInfo<'info>, 322 | &mut AccountInfo<'info>, 323 | ), 324 | shares: u64, 325 | liquidity_provider_account: &mut Account<'info, LiquidityProvider>, 326 | _authority: &Signer<'info>, 327 | token_program: &Program<'info, Token>, 328 | ) -> Result<()> { 329 | if shares <= 0 { 330 | return err!(CustomError::FailedToRemoveLiquidity); 331 | } 332 | 333 | if liquidity_provider_account.shares < shares { 334 | return err!(CustomError::InsufficientShares); 335 | } 336 | 337 | let mul_value = shares 338 | .checked_mul(self.reserve_one) 339 | .ok_or(CustomError::OverflowOrUnderflowOccurred)?; 340 | 341 | let amount_out_one = mul_value 342 | .checked_div(self.total_supply) 343 | .ok_or(CustomError::OverflowOrUnderflowOccurred)?; 344 | 345 | let mul_value = shares 346 | .checked_mul(self.reserve_two) 347 | .ok_or(CustomError::OverflowOrUnderflowOccurred)?; 348 | 349 | let amount_out_two = mul_value 350 | .checked_div(self.total_supply) 351 | .ok_or(CustomError::OverflowOrUnderflowOccurred)?; 352 | 353 | if amount_out_one <= 0 || amount_out_two <= 0 { 354 | return err!(CustomError::FailedToRemoveLiquidity); 355 | } 356 | 357 | self.remove_shares(liquidity_provider_account, shares)?; 358 | 359 | let new_reserves_one = self 360 | .reserve_one 361 | .checked_sub(amount_out_one) 362 | .ok_or(CustomError::OverflowOrUnderflowOccurred)?; 363 | let new_reserves_two = self 364 | .reserve_two 365 | .checked_sub(amount_out_two) 366 | .ok_or(CustomError::OverflowOrUnderflowOccurred)?; 367 | 368 | self.update_reserves(new_reserves_one, new_reserves_two)?; 369 | 370 | // self.transfer_token_from_pool( 371 | // token_one_accounts.1, 372 | // token_one_accounts.2, 373 | // amount_out_one, 374 | // token_program, 375 | // )?; 376 | 377 | Ok(()) 378 | } 379 | 380 | fn swap( 381 | &mut self, 382 | _bonding_configuration_account: &Account<'info, CurveConfiguration>, 383 | token_one_accounts: ( 384 | &mut Account<'info, Mint>, 385 | &mut Account<'info, TokenAccount>, 386 | &mut Account<'info, TokenAccount>, 387 | ), 388 | token_two_accounts: ( 389 | &mut Account<'info, Mint>, 390 | &mut AccountInfo<'info>, 391 | &mut Signer<'info>, 392 | ), 393 | amount: u64, 394 | style: u64, 395 | bump: u8, 396 | authority: &Signer<'info>, 397 | token_program: &Program<'info, Token>, 398 | system_program: &Program<'info, System>, 399 | ) -> Result<()> { 400 | if amount <= 0 { 401 | return err!(CustomError::InvalidAmount); 402 | } 403 | msg!("Mint: {:?} ", token_one_accounts.0.key()); 404 | msg!( 405 | "Swap: {:?} {:?} {:?}", 406 | authority.key(), 407 | style, 408 | amount 409 | ); 410 | 411 | // xy = k => Constant product formula 412 | // (x + dx)(y - dy) = k 413 | // y - dy = k / (x + dx) 414 | // y - dy = xy / (x + dx) 415 | // dy = y - (xy / (x + dx)) 416 | // dy = yx + ydx - xy / (x + dx) 417 | // formula => dy = ydx / (x + dx) 418 | 419 | let adjusted_amount_in_float = convert_to_float(amount, token_one_accounts.0.decimals) 420 | .div(100_f64) 421 | .mul(100_f64.sub(_bonding_configuration_account.fees)); 422 | 423 | let adjusted_amount = 424 | convert_from_float(adjusted_amount_in_float, token_one_accounts.0.decimals); 425 | 426 | if style == 1 { 427 | let denominator_sum = self 428 | .reserve_one 429 | .checked_add(adjusted_amount) 430 | .ok_or(CustomError::OverflowOrUnderflowOccurred)?; 431 | 432 | let div_amt = convert_to_float(denominator_sum, token_one_accounts.0.decimals).div( 433 | convert_to_float(adjusted_amount, token_one_accounts.0.decimals), 434 | ); 435 | 436 | let amount_out_in_float = convert_to_float(self.reserve_two, 9 as u8).div(div_amt); 437 | 438 | let amount_out = convert_from_float(amount_out_in_float, 9 as u8); 439 | 440 | let new_reserves_one = self 441 | .reserve_one 442 | .checked_add(amount) 443 | .ok_or(CustomError::OverflowOrUnderflowOccurred)?; 444 | 445 | let new_reserves_two = self 446 | .reserve_two 447 | .checked_sub(amount_out) 448 | .ok_or(CustomError::OverflowOrUnderflowOccurred)?; 449 | 450 | self.update_reserves(new_reserves_one, new_reserves_two)?; 451 | msg!{"Reserves: {:?} {:?}", new_reserves_one, new_reserves_two} 452 | self.transfer_token_to_pool( 453 | token_one_accounts.2, 454 | token_one_accounts.1, 455 | amount, 456 | authority, 457 | token_program, 458 | )?; 459 | 460 | self.transfer_sol_from_pool( 461 | token_two_accounts.2, 462 | token_two_accounts.1, 463 | amount_out, 464 | system_program, 465 | bump 466 | )?; 467 | } else { 468 | let denominator_sum = self 469 | .reserve_two 470 | .checked_add(adjusted_amount) 471 | .ok_or(CustomError::OverflowOrUnderflowOccurred)?; 472 | 473 | let div_amt = convert_to_float(denominator_sum, token_one_accounts.0.decimals).div( 474 | convert_to_float(adjusted_amount, token_one_accounts.0.decimals), 475 | ); 476 | 477 | let amount_out_in_float = convert_to_float(self.reserve_one, 9 as u8).div(div_amt); 478 | 479 | let amount_out = convert_from_float(amount_out_in_float, 9 as u8); 480 | 481 | let new_reserves_one = self 482 | .reserve_one 483 | .checked_sub(amount_out) 484 | .ok_or(CustomError::OverflowOrUnderflowOccurred)?; 485 | 486 | let new_reserves_two = self 487 | .reserve_two 488 | .checked_add(amount) 489 | .ok_or(CustomError::OverflowOrUnderflowOccurred)?; 490 | 491 | self.update_reserves(new_reserves_one, new_reserves_two)?; 492 | 493 | msg!{"Reserves: {:?} {:?}", new_reserves_one, new_reserves_two} 494 | self.transfer_token_from_pool( 495 | token_one_accounts.1, 496 | token_one_accounts.2, 497 | amount_out, 498 | token_program, 499 | token_two_accounts.1, 500 | bump 501 | )?; 502 | 503 | self.transfer_sol_to_pool( 504 | token_two_accounts.2, 505 | token_two_accounts.1, 506 | amount, 507 | system_program, 508 | )?; 509 | } 510 | Ok(()) 511 | } 512 | 513 | fn transfer_token_from_pool( 514 | &self, 515 | from: &Account<'info, TokenAccount>, 516 | to: &Account<'info, TokenAccount>, 517 | amount: u64, 518 | token_program: &Program<'info, Token>, 519 | authority: &AccountInfo<'info>, 520 | bump: u8 521 | ) -> Result<()> { 522 | token::transfer( 523 | CpiContext::new_with_signer( 524 | token_program.to_account_info(), 525 | token::Transfer { 526 | from: from.to_account_info(), 527 | to: to.to_account_info(), 528 | authority: authority.to_account_info(), 529 | }, 530 | &[&[ 531 | "global".as_bytes(), 532 | &[bump], 533 | ]], 534 | ), 535 | amount, 536 | )?; 537 | 538 | Ok(()) 539 | } 540 | 541 | // fn execute_token_transfer( 542 | // &self, 543 | // source: &Account<'info, TokenAccount>, 544 | // destination: &Account<'info, TokenAccount>, 545 | // transfer_amount: u64, 546 | // token_program: &Program<'info, Token>, 547 | // ) -> Result<()> { 548 | // let context = CpiContext::new_with_signer( 549 | // token_program.to_account_info(), 550 | // token::Transfer { 551 | // from: source.to_account_info(), 552 | // to: destination.to_account_info(), 553 | // authority: self.to_account_info(), 554 | // }, 555 | // &[&[ 556 | // LiquidityPool::POOL_SEED_PREFIX.as_bytes(), 557 | // LiquidityPool::generate_seed(self.token_one.key(), self.token_two.key()) 558 | // .as_bytes(), 559 | // &[self.bump], 560 | // ]], 561 | // ); 562 | 563 | // token::transfer(context, transfer_amount)?; 564 | 565 | // Ok(()) 566 | // } 567 | 568 | fn transfer_token_to_pool( 569 | &self, 570 | from: &Account<'info, TokenAccount>, 571 | to: &Account<'info, TokenAccount>, 572 | amount: u64, 573 | authority: &Signer<'info>, 574 | token_program: &Program<'info, Token>, 575 | ) -> Result<()> { 576 | token::transfer( 577 | CpiContext::new( 578 | token_program.to_account_info(), 579 | token::Transfer { 580 | from: from.to_account_info(), 581 | to: to.to_account_info(), 582 | authority: authority.to_account_info(), 583 | }, 584 | ), 585 | amount, 586 | )?; 587 | 588 | Ok(()) 589 | } 590 | 591 | fn transfer_sol_from_pool( 592 | &self, 593 | from: &AccountInfo<'info>, 594 | to: &AccountInfo<'info>, 595 | amount: u64, 596 | system_program: &Program<'info, System>, 597 | bump: u8 598 | ) -> Result<()> { 599 | system_program::transfer( 600 | CpiContext::new_with_signer( 601 | system_program.to_account_info(), 602 | system_program::Transfer { 603 | from: from.to_account_info().clone(), 604 | to: to.clone(), 605 | }, 606 | &[&[ 607 | "global".as_bytes(), 608 | &[bump], 609 | ]], 610 | ), 611 | amount, 612 | )?; 613 | 614 | Ok(()) 615 | } 616 | 617 | // fn execute_sol_transfer( 618 | // &self, 619 | // recipient: &AccountInfo<'info>, 620 | // transfer_amount: u64, 621 | // system_program: &Program<'info, System>, 622 | // ) -> Result<()> { 623 | // let pool_account = self.to_account_info(); 624 | 625 | // let context = CpiContext::new_with_signer( 626 | // system_program.to_account_info(), 627 | // system_program::Transfer { 628 | // from: pool_account, 629 | // to: recipient.clone(), 630 | // }, 631 | // &[&[ 632 | // LiquidityPool::POOL_SEED_PREFIX.as_bytes(), 633 | // LiquidityPool::generate_seed(self.token_one.key(), self.token_two.key()) 634 | // .as_bytes(), 635 | // &[self.bump], 636 | // ]], 637 | // ); 638 | 639 | // system_program::transfer(context, transfer_amount)?; 640 | 641 | // Ok(()) 642 | // } 643 | 644 | fn transfer_sol_to_pool( 645 | &self, 646 | from: &Signer<'info>, 647 | to: &AccountInfo<'info>, 648 | amount: u64, 649 | system_program: &Program<'info, System>, 650 | ) -> Result<()> { 651 | system_program::transfer( 652 | CpiContext::new( 653 | system_program.to_account_info(), 654 | system_program::Transfer { 655 | from: from.to_account_info(), 656 | to: to.to_account_info(), 657 | }, 658 | ), 659 | amount, 660 | )?; 661 | Ok(()) 662 | } 663 | } 664 | 665 | pub fn transfer_sol_to_pool<'info>( 666 | from: AccountInfo<'info>, 667 | to: AccountInfo<'info>, 668 | amount: u64, 669 | system_program: AccountInfo<'info>, 670 | ) -> Result<()> { 671 | system_program::transfer( 672 | CpiContext::new( 673 | system_program.to_account_info(), 674 | system_program::Transfer { 675 | from: from.to_account_info(), 676 | to: to.to_account_info(), 677 | }, 678 | ), 679 | amount, 680 | )?; 681 | Ok(()) 682 | } -------------------------------------------------------------------------------- /cli/errors/anchor.ts: -------------------------------------------------------------------------------- 1 | export type AnchorError = 2 | | InstructionMissing 3 | | InstructionFallbackNotFound 4 | | InstructionDidNotDeserialize 5 | | InstructionDidNotSerialize 6 | | IdlInstructionStub 7 | | IdlInstructionInvalidProgram 8 | | ConstraintMut 9 | | ConstraintHasOne 10 | | ConstraintSigner 11 | | ConstraintRaw 12 | | ConstraintOwner 13 | | ConstraintRentExempt 14 | | ConstraintSeeds 15 | | ConstraintExecutable 16 | | ConstraintState 17 | | ConstraintAssociated 18 | | ConstraintAssociatedInit 19 | | ConstraintClose 20 | | ConstraintAddress 21 | | ConstraintZero 22 | | ConstraintTokenMint 23 | | ConstraintTokenOwner 24 | | ConstraintMintMintAuthority 25 | | ConstraintMintFreezeAuthority 26 | | ConstraintMintDecimals 27 | | ConstraintSpace 28 | | ConstraintAccountIsNone 29 | | RequireViolated 30 | | RequireEqViolated 31 | | RequireKeysEqViolated 32 | | RequireNeqViolated 33 | | RequireKeysNeqViolated 34 | | RequireGtViolated 35 | | RequireGteViolated 36 | | AccountDiscriminatorAlreadySet 37 | | AccountDiscriminatorNotFound 38 | | AccountDiscriminatorMismatch 39 | | AccountDidNotDeserialize 40 | | AccountDidNotSerialize 41 | | AccountNotEnoughKeys 42 | | AccountNotMutable 43 | | AccountOwnedByWrongProgram 44 | | InvalidProgramId 45 | | InvalidProgramExecutable 46 | | AccountNotSigner 47 | | AccountNotSystemOwned 48 | | AccountNotInitialized 49 | | AccountNotProgramData 50 | | AccountNotAssociatedTokenAccount 51 | | AccountSysvarMismatch 52 | | AccountReallocExceedsLimit 53 | | AccountDuplicateReallocs 54 | | DeclaredProgramIdMismatch 55 | | Deprecated 56 | 57 | export class InstructionMissing extends Error { 58 | static readonly code = 100 59 | readonly code = 100 60 | readonly name = "InstructionMissing" 61 | readonly msg = "8 byte instruction identifier not provided" 62 | 63 | constructor(readonly logs?: string[]) { 64 | super("100: 8 byte instruction identifier not provided") 65 | } 66 | } 67 | 68 | export class InstructionFallbackNotFound extends Error { 69 | static readonly code = 101 70 | readonly code = 101 71 | readonly name = "InstructionFallbackNotFound" 72 | readonly msg = "Fallback functions are not supported" 73 | 74 | constructor(readonly logs?: string[]) { 75 | super("101: Fallback functions are not supported") 76 | } 77 | } 78 | 79 | export class InstructionDidNotDeserialize extends Error { 80 | static readonly code = 102 81 | readonly code = 102 82 | readonly name = "InstructionDidNotDeserialize" 83 | readonly msg = "The program could not deserialize the given instruction" 84 | 85 | constructor(readonly logs?: string[]) { 86 | super("102: The program could not deserialize the given instruction") 87 | } 88 | } 89 | 90 | export class InstructionDidNotSerialize extends Error { 91 | static readonly code = 103 92 | readonly code = 103 93 | readonly name = "InstructionDidNotSerialize" 94 | readonly msg = "The program could not serialize the given instruction" 95 | 96 | constructor(readonly logs?: string[]) { 97 | super("103: The program could not serialize the given instruction") 98 | } 99 | } 100 | 101 | export class IdlInstructionStub extends Error { 102 | static readonly code = 1000 103 | readonly code = 1000 104 | readonly name = "IdlInstructionStub" 105 | readonly msg = "The program was compiled without idl instructions" 106 | 107 | constructor(readonly logs?: string[]) { 108 | super("1000: The program was compiled without idl instructions") 109 | } 110 | } 111 | 112 | export class IdlInstructionInvalidProgram extends Error { 113 | static readonly code = 1001 114 | readonly code = 1001 115 | readonly name = "IdlInstructionInvalidProgram" 116 | readonly msg = 117 | "The transaction was given an invalid program for the IDL instruction" 118 | 119 | constructor(readonly logs?: string[]) { 120 | super( 121 | "1001: The transaction was given an invalid program for the IDL instruction" 122 | ) 123 | } 124 | } 125 | 126 | export class ConstraintMut extends Error { 127 | static readonly code = 2000 128 | readonly code = 2000 129 | readonly name = "ConstraintMut" 130 | readonly msg = "A mut constraint was violated" 131 | 132 | constructor(readonly logs?: string[]) { 133 | super("2000: A mut constraint was violated") 134 | } 135 | } 136 | 137 | export class ConstraintHasOne extends Error { 138 | static readonly code = 2001 139 | readonly code = 2001 140 | readonly name = "ConstraintHasOne" 141 | readonly msg = "A has one constraint was violated" 142 | 143 | constructor(readonly logs?: string[]) { 144 | super("2001: A has one constraint was violated") 145 | } 146 | } 147 | 148 | export class ConstraintSigner extends Error { 149 | static readonly code = 2002 150 | readonly code = 2002 151 | readonly name = "ConstraintSigner" 152 | readonly msg = "A signer constraint was violated" 153 | 154 | constructor(readonly logs?: string[]) { 155 | super("2002: A signer constraint was violated") 156 | } 157 | } 158 | 159 | export class ConstraintRaw extends Error { 160 | static readonly code = 2003 161 | readonly code = 2003 162 | readonly name = "ConstraintRaw" 163 | readonly msg = "A raw constraint was violated" 164 | 165 | constructor(readonly logs?: string[]) { 166 | super("2003: A raw constraint was violated") 167 | } 168 | } 169 | 170 | export class ConstraintOwner extends Error { 171 | static readonly code = 2004 172 | readonly code = 2004 173 | readonly name = "ConstraintOwner" 174 | readonly msg = "An owner constraint was violated" 175 | 176 | constructor(readonly logs?: string[]) { 177 | super("2004: An owner constraint was violated") 178 | } 179 | } 180 | 181 | export class ConstraintRentExempt extends Error { 182 | static readonly code = 2005 183 | readonly code = 2005 184 | readonly name = "ConstraintRentExempt" 185 | readonly msg = "A rent exemption constraint was violated" 186 | 187 | constructor(readonly logs?: string[]) { 188 | super("2005: A rent exemption constraint was violated") 189 | } 190 | } 191 | 192 | export class ConstraintSeeds extends Error { 193 | static readonly code = 2006 194 | readonly code = 2006 195 | readonly name = "ConstraintSeeds" 196 | readonly msg = "A seeds constraint was violated" 197 | 198 | constructor(readonly logs?: string[]) { 199 | super("2006: A seeds constraint was violated") 200 | } 201 | } 202 | 203 | export class ConstraintExecutable extends Error { 204 | static readonly code = 2007 205 | readonly code = 2007 206 | readonly name = "ConstraintExecutable" 207 | readonly msg = "An executable constraint was violated" 208 | 209 | constructor(readonly logs?: string[]) { 210 | super("2007: An executable constraint was violated") 211 | } 212 | } 213 | 214 | export class ConstraintState extends Error { 215 | static readonly code = 2008 216 | readonly code = 2008 217 | readonly name = "ConstraintState" 218 | readonly msg = "Deprecated Error, feel free to replace with something else" 219 | 220 | constructor(readonly logs?: string[]) { 221 | super("2008: Deprecated Error, feel free to replace with something else") 222 | } 223 | } 224 | 225 | export class ConstraintAssociated extends Error { 226 | static readonly code = 2009 227 | readonly code = 2009 228 | readonly name = "ConstraintAssociated" 229 | readonly msg = "An associated constraint was violated" 230 | 231 | constructor(readonly logs?: string[]) { 232 | super("2009: An associated constraint was violated") 233 | } 234 | } 235 | 236 | export class ConstraintAssociatedInit extends Error { 237 | static readonly code = 2010 238 | readonly code = 2010 239 | readonly name = "ConstraintAssociatedInit" 240 | readonly msg = "An associated init constraint was violated" 241 | 242 | constructor(readonly logs?: string[]) { 243 | super("2010: An associated init constraint was violated") 244 | } 245 | } 246 | 247 | export class ConstraintClose extends Error { 248 | static readonly code = 2011 249 | readonly code = 2011 250 | readonly name = "ConstraintClose" 251 | readonly msg = "A close constraint was violated" 252 | 253 | constructor(readonly logs?: string[]) { 254 | super("2011: A close constraint was violated") 255 | } 256 | } 257 | 258 | export class ConstraintAddress extends Error { 259 | static readonly code = 2012 260 | readonly code = 2012 261 | readonly name = "ConstraintAddress" 262 | readonly msg = "An address constraint was violated" 263 | 264 | constructor(readonly logs?: string[]) { 265 | super("2012: An address constraint was violated") 266 | } 267 | } 268 | 269 | export class ConstraintZero extends Error { 270 | static readonly code = 2013 271 | readonly code = 2013 272 | readonly name = "ConstraintZero" 273 | readonly msg = "Expected zero account discriminant" 274 | 275 | constructor(readonly logs?: string[]) { 276 | super("2013: Expected zero account discriminant") 277 | } 278 | } 279 | 280 | export class ConstraintTokenMint extends Error { 281 | static readonly code = 2014 282 | readonly code = 2014 283 | readonly name = "ConstraintTokenMint" 284 | readonly msg = "A token mint constraint was violated" 285 | 286 | constructor(readonly logs?: string[]) { 287 | super("2014: A token mint constraint was violated") 288 | } 289 | } 290 | 291 | export class ConstraintTokenOwner extends Error { 292 | static readonly code = 2015 293 | readonly code = 2015 294 | readonly name = "ConstraintTokenOwner" 295 | readonly msg = "A token owner constraint was violated" 296 | 297 | constructor(readonly logs?: string[]) { 298 | super("2015: A token owner constraint was violated") 299 | } 300 | } 301 | 302 | export class ConstraintMintMintAuthority extends Error { 303 | static readonly code = 2016 304 | readonly code = 2016 305 | readonly name = "ConstraintMintMintAuthority" 306 | readonly msg = "A mint mint authority constraint was violated" 307 | 308 | constructor(readonly logs?: string[]) { 309 | super("2016: A mint mint authority constraint was violated") 310 | } 311 | } 312 | 313 | export class ConstraintMintFreezeAuthority extends Error { 314 | static readonly code = 2017 315 | readonly code = 2017 316 | readonly name = "ConstraintMintFreezeAuthority" 317 | readonly msg = "A mint freeze authority constraint was violated" 318 | 319 | constructor(readonly logs?: string[]) { 320 | super("2017: A mint freeze authority constraint was violated") 321 | } 322 | } 323 | 324 | export class ConstraintMintDecimals extends Error { 325 | static readonly code = 2018 326 | readonly code = 2018 327 | readonly name = "ConstraintMintDecimals" 328 | readonly msg = "A mint decimals constraint was violated" 329 | 330 | constructor(readonly logs?: string[]) { 331 | super("2018: A mint decimals constraint was violated") 332 | } 333 | } 334 | 335 | export class ConstraintSpace extends Error { 336 | static readonly code = 2019 337 | readonly code = 2019 338 | readonly name = "ConstraintSpace" 339 | readonly msg = "A space constraint was violated" 340 | 341 | constructor(readonly logs?: string[]) { 342 | super("2019: A space constraint was violated") 343 | } 344 | } 345 | 346 | export class ConstraintAccountIsNone extends Error { 347 | static readonly code = 2020 348 | readonly code = 2020 349 | readonly name = "ConstraintAccountIsNone" 350 | readonly msg = "A required account for the constraint is None" 351 | 352 | constructor(readonly logs?: string[]) { 353 | super("2020: A required account for the constraint is None") 354 | } 355 | } 356 | 357 | export class RequireViolated extends Error { 358 | static readonly code = 2500 359 | readonly code = 2500 360 | readonly name = "RequireViolated" 361 | readonly msg = "A require expression was violated" 362 | 363 | constructor(readonly logs?: string[]) { 364 | super("2500: A require expression was violated") 365 | } 366 | } 367 | 368 | export class RequireEqViolated extends Error { 369 | static readonly code = 2501 370 | readonly code = 2501 371 | readonly name = "RequireEqViolated" 372 | readonly msg = "A require_eq expression was violated" 373 | 374 | constructor(readonly logs?: string[]) { 375 | super("2501: A require_eq expression was violated") 376 | } 377 | } 378 | 379 | export class RequireKeysEqViolated extends Error { 380 | static readonly code = 2502 381 | readonly code = 2502 382 | readonly name = "RequireKeysEqViolated" 383 | readonly msg = "A require_keys_eq expression was violated" 384 | 385 | constructor(readonly logs?: string[]) { 386 | super("2502: A require_keys_eq expression was violated") 387 | } 388 | } 389 | 390 | export class RequireNeqViolated extends Error { 391 | static readonly code = 2503 392 | readonly code = 2503 393 | readonly name = "RequireNeqViolated" 394 | readonly msg = "A require_neq expression was violated" 395 | 396 | constructor(readonly logs?: string[]) { 397 | super("2503: A require_neq expression was violated") 398 | } 399 | } 400 | 401 | export class RequireKeysNeqViolated extends Error { 402 | static readonly code = 2504 403 | readonly code = 2504 404 | readonly name = "RequireKeysNeqViolated" 405 | readonly msg = "A require_keys_neq expression was violated" 406 | 407 | constructor(readonly logs?: string[]) { 408 | super("2504: A require_keys_neq expression was violated") 409 | } 410 | } 411 | 412 | export class RequireGtViolated extends Error { 413 | static readonly code = 2505 414 | readonly code = 2505 415 | readonly name = "RequireGtViolated" 416 | readonly msg = "A require_gt expression was violated" 417 | 418 | constructor(readonly logs?: string[]) { 419 | super("2505: A require_gt expression was violated") 420 | } 421 | } 422 | 423 | export class RequireGteViolated extends Error { 424 | static readonly code = 2506 425 | readonly code = 2506 426 | readonly name = "RequireGteViolated" 427 | readonly msg = "A require_gte expression was violated" 428 | 429 | constructor(readonly logs?: string[]) { 430 | super("2506: A require_gte expression was violated") 431 | } 432 | } 433 | 434 | export class AccountDiscriminatorAlreadySet extends Error { 435 | static readonly code = 3000 436 | readonly code = 3000 437 | readonly name = "AccountDiscriminatorAlreadySet" 438 | readonly msg = "The account discriminator was already set on this account" 439 | 440 | constructor(readonly logs?: string[]) { 441 | super("3000: The account discriminator was already set on this account") 442 | } 443 | } 444 | 445 | export class AccountDiscriminatorNotFound extends Error { 446 | static readonly code = 3001 447 | readonly code = 3001 448 | readonly name = "AccountDiscriminatorNotFound" 449 | readonly msg = "No 8 byte discriminator was found on the account" 450 | 451 | constructor(readonly logs?: string[]) { 452 | super("3001: No 8 byte discriminator was found on the account") 453 | } 454 | } 455 | 456 | export class AccountDiscriminatorMismatch extends Error { 457 | static readonly code = 3002 458 | readonly code = 3002 459 | readonly name = "AccountDiscriminatorMismatch" 460 | readonly msg = "8 byte discriminator did not match what was expected" 461 | 462 | constructor(readonly logs?: string[]) { 463 | super("3002: 8 byte discriminator did not match what was expected") 464 | } 465 | } 466 | 467 | export class AccountDidNotDeserialize extends Error { 468 | static readonly code = 3003 469 | readonly code = 3003 470 | readonly name = "AccountDidNotDeserialize" 471 | readonly msg = "Failed to deserialize the account" 472 | 473 | constructor(readonly logs?: string[]) { 474 | super("3003: Failed to deserialize the account") 475 | } 476 | } 477 | 478 | export class AccountDidNotSerialize extends Error { 479 | static readonly code = 3004 480 | readonly code = 3004 481 | readonly name = "AccountDidNotSerialize" 482 | readonly msg = "Failed to serialize the account" 483 | 484 | constructor(readonly logs?: string[]) { 485 | super("3004: Failed to serialize the account") 486 | } 487 | } 488 | 489 | export class AccountNotEnoughKeys extends Error { 490 | static readonly code = 3005 491 | readonly code = 3005 492 | readonly name = "AccountNotEnoughKeys" 493 | readonly msg = "Not enough account keys given to the instruction" 494 | 495 | constructor(readonly logs?: string[]) { 496 | super("3005: Not enough account keys given to the instruction") 497 | } 498 | } 499 | 500 | export class AccountNotMutable extends Error { 501 | static readonly code = 3006 502 | readonly code = 3006 503 | readonly name = "AccountNotMutable" 504 | readonly msg = "The given account is not mutable" 505 | 506 | constructor(readonly logs?: string[]) { 507 | super("3006: The given account is not mutable") 508 | } 509 | } 510 | 511 | export class AccountOwnedByWrongProgram extends Error { 512 | static readonly code = 3007 513 | readonly code = 3007 514 | readonly name = "AccountOwnedByWrongProgram" 515 | readonly msg = 516 | "The given account is owned by a different program than expected" 517 | 518 | constructor(readonly logs?: string[]) { 519 | super( 520 | "3007: The given account is owned by a different program than expected" 521 | ) 522 | } 523 | } 524 | 525 | export class InvalidProgramId extends Error { 526 | static readonly code = 3008 527 | readonly code = 3008 528 | readonly name = "InvalidProgramId" 529 | readonly msg = "Program ID was not as expected" 530 | 531 | constructor(readonly logs?: string[]) { 532 | super("3008: Program ID was not as expected") 533 | } 534 | } 535 | 536 | export class InvalidProgramExecutable extends Error { 537 | static readonly code = 3009 538 | readonly code = 3009 539 | readonly name = "InvalidProgramExecutable" 540 | readonly msg = "Program account is not executable" 541 | 542 | constructor(readonly logs?: string[]) { 543 | super("3009: Program account is not executable") 544 | } 545 | } 546 | 547 | export class AccountNotSigner extends Error { 548 | static readonly code = 3010 549 | readonly code = 3010 550 | readonly name = "AccountNotSigner" 551 | readonly msg = "The given account did not sign" 552 | 553 | constructor(readonly logs?: string[]) { 554 | super("3010: The given account did not sign") 555 | } 556 | } 557 | 558 | export class AccountNotSystemOwned extends Error { 559 | static readonly code = 3011 560 | readonly code = 3011 561 | readonly name = "AccountNotSystemOwned" 562 | readonly msg = "The given account is not owned by the system program" 563 | 564 | constructor(readonly logs?: string[]) { 565 | super("3011: The given account is not owned by the system program") 566 | } 567 | } 568 | 569 | export class AccountNotInitialized extends Error { 570 | static readonly code = 3012 571 | readonly code = 3012 572 | readonly name = "AccountNotInitialized" 573 | readonly msg = "The program expected this account to be already initialized" 574 | 575 | constructor(readonly logs?: string[]) { 576 | super("3012: The program expected this account to be already initialized") 577 | } 578 | } 579 | 580 | export class AccountNotProgramData extends Error { 581 | static readonly code = 3013 582 | readonly code = 3013 583 | readonly name = "AccountNotProgramData" 584 | readonly msg = "The given account is not a program data account" 585 | 586 | constructor(readonly logs?: string[]) { 587 | super("3013: The given account is not a program data account") 588 | } 589 | } 590 | 591 | export class AccountNotAssociatedTokenAccount extends Error { 592 | static readonly code = 3014 593 | readonly code = 3014 594 | readonly name = "AccountNotAssociatedTokenAccount" 595 | readonly msg = "The given account is not the associated token account" 596 | 597 | constructor(readonly logs?: string[]) { 598 | super("3014: The given account is not the associated token account") 599 | } 600 | } 601 | 602 | export class AccountSysvarMismatch extends Error { 603 | static readonly code = 3015 604 | readonly code = 3015 605 | readonly name = "AccountSysvarMismatch" 606 | readonly msg = "The given public key does not match the required sysvar" 607 | 608 | constructor(readonly logs?: string[]) { 609 | super("3015: The given public key does not match the required sysvar") 610 | } 611 | } 612 | 613 | export class AccountReallocExceedsLimit extends Error { 614 | static readonly code = 3016 615 | readonly code = 3016 616 | readonly name = "AccountReallocExceedsLimit" 617 | readonly msg = 618 | "The account reallocation exceeds the MAX_PERMITTED_DATA_INCREASE limit" 619 | 620 | constructor(readonly logs?: string[]) { 621 | super( 622 | "3016: The account reallocation exceeds the MAX_PERMITTED_DATA_INCREASE limit" 623 | ) 624 | } 625 | } 626 | 627 | export class AccountDuplicateReallocs extends Error { 628 | static readonly code = 3017 629 | readonly code = 3017 630 | readonly name = "AccountDuplicateReallocs" 631 | readonly msg = "The account was duplicated for more than one reallocation" 632 | 633 | constructor(readonly logs?: string[]) { 634 | super("3017: The account was duplicated for more than one reallocation") 635 | } 636 | } 637 | 638 | export class DeclaredProgramIdMismatch extends Error { 639 | static readonly code = 4100 640 | readonly code = 4100 641 | readonly name = "DeclaredProgramIdMismatch" 642 | readonly msg = "The declared program id does not match the actual program id" 643 | 644 | constructor(readonly logs?: string[]) { 645 | super("4100: The declared program id does not match the actual program id") 646 | } 647 | } 648 | 649 | export class Deprecated extends Error { 650 | static readonly code = 5000 651 | readonly code = 5000 652 | readonly name = "Deprecated" 653 | readonly msg = "The API being used is deprecated and should no longer be used" 654 | 655 | constructor(readonly logs?: string[]) { 656 | super("5000: The API being used is deprecated and should no longer be used") 657 | } 658 | } 659 | 660 | export function fromCode(code: number, logs?: string[]): AnchorError | null { 661 | switch (code) { 662 | case 100: 663 | return new InstructionMissing(logs) 664 | case 101: 665 | return new InstructionFallbackNotFound(logs) 666 | case 102: 667 | return new InstructionDidNotDeserialize(logs) 668 | case 103: 669 | return new InstructionDidNotSerialize(logs) 670 | case 1000: 671 | return new IdlInstructionStub(logs) 672 | case 1001: 673 | return new IdlInstructionInvalidProgram(logs) 674 | case 2000: 675 | return new ConstraintMut(logs) 676 | case 2001: 677 | return new ConstraintHasOne(logs) 678 | case 2002: 679 | return new ConstraintSigner(logs) 680 | case 2003: 681 | return new ConstraintRaw(logs) 682 | case 2004: 683 | return new ConstraintOwner(logs) 684 | case 2005: 685 | return new ConstraintRentExempt(logs) 686 | case 2006: 687 | return new ConstraintSeeds(logs) 688 | case 2007: 689 | return new ConstraintExecutable(logs) 690 | case 2008: 691 | return new ConstraintState(logs) 692 | case 2009: 693 | return new ConstraintAssociated(logs) 694 | case 2010: 695 | return new ConstraintAssociatedInit(logs) 696 | case 2011: 697 | return new ConstraintClose(logs) 698 | case 2012: 699 | return new ConstraintAddress(logs) 700 | case 2013: 701 | return new ConstraintZero(logs) 702 | case 2014: 703 | return new ConstraintTokenMint(logs) 704 | case 2015: 705 | return new ConstraintTokenOwner(logs) 706 | case 2016: 707 | return new ConstraintMintMintAuthority(logs) 708 | case 2017: 709 | return new ConstraintMintFreezeAuthority(logs) 710 | case 2018: 711 | return new ConstraintMintDecimals(logs) 712 | case 2019: 713 | return new ConstraintSpace(logs) 714 | case 2020: 715 | return new ConstraintAccountIsNone(logs) 716 | case 2500: 717 | return new RequireViolated(logs) 718 | case 2501: 719 | return new RequireEqViolated(logs) 720 | case 2502: 721 | return new RequireKeysEqViolated(logs) 722 | case 2503: 723 | return new RequireNeqViolated(logs) 724 | case 2504: 725 | return new RequireKeysNeqViolated(logs) 726 | case 2505: 727 | return new RequireGtViolated(logs) 728 | case 2506: 729 | return new RequireGteViolated(logs) 730 | case 3000: 731 | return new AccountDiscriminatorAlreadySet(logs) 732 | case 3001: 733 | return new AccountDiscriminatorNotFound(logs) 734 | case 3002: 735 | return new AccountDiscriminatorMismatch(logs) 736 | case 3003: 737 | return new AccountDidNotDeserialize(logs) 738 | case 3004: 739 | return new AccountDidNotSerialize(logs) 740 | case 3005: 741 | return new AccountNotEnoughKeys(logs) 742 | case 3006: 743 | return new AccountNotMutable(logs) 744 | case 3007: 745 | return new AccountOwnedByWrongProgram(logs) 746 | case 3008: 747 | return new InvalidProgramId(logs) 748 | case 3009: 749 | return new InvalidProgramExecutable(logs) 750 | case 3010: 751 | return new AccountNotSigner(logs) 752 | case 3011: 753 | return new AccountNotSystemOwned(logs) 754 | case 3012: 755 | return new AccountNotInitialized(logs) 756 | case 3013: 757 | return new AccountNotProgramData(logs) 758 | case 3014: 759 | return new AccountNotAssociatedTokenAccount(logs) 760 | case 3015: 761 | return new AccountSysvarMismatch(logs) 762 | case 3016: 763 | return new AccountReallocExceedsLimit(logs) 764 | case 3017: 765 | return new AccountDuplicateReallocs(logs) 766 | case 4100: 767 | return new DeclaredProgramIdMismatch(logs) 768 | case 5000: 769 | return new Deprecated(logs) 770 | } 771 | 772 | return null 773 | } 774 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "aead" 7 | version = "0.4.3" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "0b613b8e1e3cf911a086f53f03bf286f52fd7a7258e4fa606f0ef220d39d8877" 10 | dependencies = [ 11 | "generic-array", 12 | ] 13 | 14 | [[package]] 15 | name = "aes" 16 | version = "0.7.5" 17 | source = "registry+https://github.com/rust-lang/crates.io-index" 18 | checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" 19 | dependencies = [ 20 | "cfg-if", 21 | "cipher", 22 | "cpufeatures", 23 | "opaque-debug", 24 | ] 25 | 26 | [[package]] 27 | name = "aes-gcm-siv" 28 | version = "0.10.3" 29 | source = "registry+https://github.com/rust-lang/crates.io-index" 30 | checksum = "589c637f0e68c877bbd59a4599bbe849cac8e5f3e4b5a3ebae8f528cd218dcdc" 31 | dependencies = [ 32 | "aead", 33 | "aes", 34 | "cipher", 35 | "ctr", 36 | "polyval", 37 | "subtle", 38 | "zeroize", 39 | ] 40 | 41 | [[package]] 42 | name = "ahash" 43 | version = "0.7.8" 44 | source = "registry+https://github.com/rust-lang/crates.io-index" 45 | checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" 46 | dependencies = [ 47 | "getrandom 0.2.15", 48 | "once_cell", 49 | "version_check", 50 | ] 51 | 52 | [[package]] 53 | name = "ahash" 54 | version = "0.8.6" 55 | source = "registry+https://github.com/rust-lang/crates.io-index" 56 | checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" 57 | dependencies = [ 58 | "cfg-if", 59 | "getrandom 0.2.15", 60 | "once_cell", 61 | "version_check", 62 | "zerocopy", 63 | ] 64 | 65 | [[package]] 66 | name = "aho-corasick" 67 | version = "1.1.3" 68 | source = "registry+https://github.com/rust-lang/crates.io-index" 69 | checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" 70 | dependencies = [ 71 | "memchr", 72 | ] 73 | 74 | [[package]] 75 | name = "anchor-attribute-access-control" 76 | version = "0.29.0" 77 | source = "registry+https://github.com/rust-lang/crates.io-index" 78 | checksum = "e5f619f1d04f53621925ba8a2e633ba5a6081f2ae14758cbb67f38fd823e0a3e" 79 | dependencies = [ 80 | "anchor-syn", 81 | "proc-macro2", 82 | "quote", 83 | "syn 1.0.109", 84 | ] 85 | 86 | [[package]] 87 | name = "anchor-attribute-account" 88 | version = "0.29.0" 89 | source = "registry+https://github.com/rust-lang/crates.io-index" 90 | checksum = "e7f2a3e1df4685f18d12a943a9f2a7456305401af21a07c9fe076ef9ecd6e400" 91 | dependencies = [ 92 | "anchor-syn", 93 | "bs58 0.5.1", 94 | "proc-macro2", 95 | "quote", 96 | "syn 1.0.109", 97 | ] 98 | 99 | [[package]] 100 | name = "anchor-attribute-constant" 101 | version = "0.29.0" 102 | source = "registry+https://github.com/rust-lang/crates.io-index" 103 | checksum = "9423945cb55627f0b30903288e78baf6f62c6c8ab28fb344b6b25f1ffee3dca7" 104 | dependencies = [ 105 | "anchor-syn", 106 | "quote", 107 | "syn 1.0.109", 108 | ] 109 | 110 | [[package]] 111 | name = "anchor-attribute-error" 112 | version = "0.29.0" 113 | source = "registry+https://github.com/rust-lang/crates.io-index" 114 | checksum = "93ed12720033cc3c3bf3cfa293349c2275cd5ab99936e33dd4bf283aaad3e241" 115 | dependencies = [ 116 | "anchor-syn", 117 | "quote", 118 | "syn 1.0.109", 119 | ] 120 | 121 | [[package]] 122 | name = "anchor-attribute-event" 123 | version = "0.29.0" 124 | source = "registry+https://github.com/rust-lang/crates.io-index" 125 | checksum = "eef4dc0371eba2d8c8b54794b0b0eb786a234a559b77593d6f80825b6d2c77a2" 126 | dependencies = [ 127 | "anchor-syn", 128 | "proc-macro2", 129 | "quote", 130 | "syn 1.0.109", 131 | ] 132 | 133 | [[package]] 134 | name = "anchor-attribute-program" 135 | version = "0.29.0" 136 | source = "registry+https://github.com/rust-lang/crates.io-index" 137 | checksum = "b18c4f191331e078d4a6a080954d1576241c29c56638783322a18d308ab27e4f" 138 | dependencies = [ 139 | "anchor-syn", 140 | "quote", 141 | "syn 1.0.109", 142 | ] 143 | 144 | [[package]] 145 | name = "anchor-derive-accounts" 146 | version = "0.29.0" 147 | source = "registry+https://github.com/rust-lang/crates.io-index" 148 | checksum = "5de10d6e9620d3bcea56c56151cad83c5992f50d5960b3a9bebc4a50390ddc3c" 149 | dependencies = [ 150 | "anchor-syn", 151 | "quote", 152 | "syn 1.0.109", 153 | ] 154 | 155 | [[package]] 156 | name = "anchor-derive-serde" 157 | version = "0.29.0" 158 | source = "registry+https://github.com/rust-lang/crates.io-index" 159 | checksum = "f4e2e5be518ec6053d90a2a7f26843dbee607583c779e6c8395951b9739bdfbe" 160 | dependencies = [ 161 | "anchor-syn", 162 | "borsh-derive-internal 0.10.3", 163 | "proc-macro2", 164 | "quote", 165 | "syn 1.0.109", 166 | ] 167 | 168 | [[package]] 169 | name = "anchor-derive-space" 170 | version = "0.29.0" 171 | source = "registry+https://github.com/rust-lang/crates.io-index" 172 | checksum = "1ecc31d19fa54840e74b7a979d44bcea49d70459de846088a1d71e87ba53c419" 173 | dependencies = [ 174 | "proc-macro2", 175 | "quote", 176 | "syn 1.0.109", 177 | ] 178 | 179 | [[package]] 180 | name = "anchor-lang" 181 | version = "0.29.0" 182 | source = "registry+https://github.com/rust-lang/crates.io-index" 183 | checksum = "35da4785497388af0553586d55ebdc08054a8b1724720ef2749d313494f2b8ad" 184 | dependencies = [ 185 | "anchor-attribute-access-control", 186 | "anchor-attribute-account", 187 | "anchor-attribute-constant", 188 | "anchor-attribute-error", 189 | "anchor-attribute-event", 190 | "anchor-attribute-program", 191 | "anchor-derive-accounts", 192 | "anchor-derive-serde", 193 | "anchor-derive-space", 194 | "arrayref", 195 | "base64 0.13.1", 196 | "bincode", 197 | "borsh 0.10.3", 198 | "bytemuck", 199 | "getrandom 0.2.15", 200 | "solana-program", 201 | "thiserror", 202 | ] 203 | 204 | [[package]] 205 | name = "anchor-spl" 206 | version = "0.29.0" 207 | source = "registry+https://github.com/rust-lang/crates.io-index" 208 | checksum = "6c4fd6e43b2ca6220d2ef1641539e678bfc31b6cc393cf892b373b5997b6a39a" 209 | dependencies = [ 210 | "anchor-lang", 211 | "solana-program", 212 | "spl-associated-token-account 2.2.0", 213 | "spl-token 4.0.0", 214 | "spl-token-2022 0.9.0", 215 | ] 216 | 217 | [[package]] 218 | name = "anchor-syn" 219 | version = "0.29.0" 220 | source = "registry+https://github.com/rust-lang/crates.io-index" 221 | checksum = "d9101b84702fed2ea57bd22992f75065da5648017135b844283a2f6d74f27825" 222 | dependencies = [ 223 | "anyhow", 224 | "bs58 0.5.1", 225 | "heck", 226 | "proc-macro2", 227 | "quote", 228 | "serde", 229 | "serde_json", 230 | "sha2 0.10.8", 231 | "syn 1.0.109", 232 | "thiserror", 233 | ] 234 | 235 | [[package]] 236 | name = "anyhow" 237 | version = "1.0.86" 238 | source = "registry+https://github.com/rust-lang/crates.io-index" 239 | checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" 240 | 241 | [[package]] 242 | name = "ark-bn254" 243 | version = "0.4.0" 244 | source = "registry+https://github.com/rust-lang/crates.io-index" 245 | checksum = "a22f4561524cd949590d78d7d4c5df8f592430d221f7f3c9497bbafd8972120f" 246 | dependencies = [ 247 | "ark-ec", 248 | "ark-ff", 249 | "ark-std", 250 | ] 251 | 252 | [[package]] 253 | name = "ark-ec" 254 | version = "0.4.2" 255 | source = "registry+https://github.com/rust-lang/crates.io-index" 256 | checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" 257 | dependencies = [ 258 | "ark-ff", 259 | "ark-poly", 260 | "ark-serialize", 261 | "ark-std", 262 | "derivative", 263 | "hashbrown 0.13.2", 264 | "itertools", 265 | "num-traits", 266 | "zeroize", 267 | ] 268 | 269 | [[package]] 270 | name = "ark-ff" 271 | version = "0.4.2" 272 | source = "registry+https://github.com/rust-lang/crates.io-index" 273 | checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" 274 | dependencies = [ 275 | "ark-ff-asm", 276 | "ark-ff-macros", 277 | "ark-serialize", 278 | "ark-std", 279 | "derivative", 280 | "digest 0.10.7", 281 | "itertools", 282 | "num-bigint", 283 | "num-traits", 284 | "paste", 285 | "rustc_version", 286 | "zeroize", 287 | ] 288 | 289 | [[package]] 290 | name = "ark-ff-asm" 291 | version = "0.4.2" 292 | source = "registry+https://github.com/rust-lang/crates.io-index" 293 | checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" 294 | dependencies = [ 295 | "quote", 296 | "syn 1.0.109", 297 | ] 298 | 299 | [[package]] 300 | name = "ark-ff-macros" 301 | version = "0.4.2" 302 | source = "registry+https://github.com/rust-lang/crates.io-index" 303 | checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" 304 | dependencies = [ 305 | "num-bigint", 306 | "num-traits", 307 | "proc-macro2", 308 | "quote", 309 | "syn 1.0.109", 310 | ] 311 | 312 | [[package]] 313 | name = "ark-poly" 314 | version = "0.4.2" 315 | source = "registry+https://github.com/rust-lang/crates.io-index" 316 | checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" 317 | dependencies = [ 318 | "ark-ff", 319 | "ark-serialize", 320 | "ark-std", 321 | "derivative", 322 | "hashbrown 0.13.2", 323 | ] 324 | 325 | [[package]] 326 | name = "ark-serialize" 327 | version = "0.4.2" 328 | source = "registry+https://github.com/rust-lang/crates.io-index" 329 | checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" 330 | dependencies = [ 331 | "ark-serialize-derive", 332 | "ark-std", 333 | "digest 0.10.7", 334 | "num-bigint", 335 | ] 336 | 337 | [[package]] 338 | name = "ark-serialize-derive" 339 | version = "0.4.2" 340 | source = "registry+https://github.com/rust-lang/crates.io-index" 341 | checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" 342 | dependencies = [ 343 | "proc-macro2", 344 | "quote", 345 | "syn 1.0.109", 346 | ] 347 | 348 | [[package]] 349 | name = "ark-std" 350 | version = "0.4.0" 351 | source = "registry+https://github.com/rust-lang/crates.io-index" 352 | checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" 353 | dependencies = [ 354 | "num-traits", 355 | "rand 0.8.5", 356 | ] 357 | 358 | [[package]] 359 | name = "array-bytes" 360 | version = "1.4.1" 361 | source = "registry+https://github.com/rust-lang/crates.io-index" 362 | checksum = "9ad284aeb45c13f2fb4f084de4a420ebf447423bdf9386c0540ce33cb3ef4b8c" 363 | 364 | [[package]] 365 | name = "arrayref" 366 | version = "0.3.7" 367 | source = "registry+https://github.com/rust-lang/crates.io-index" 368 | checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" 369 | 370 | [[package]] 371 | name = "arrayvec" 372 | version = "0.7.4" 373 | source = "registry+https://github.com/rust-lang/crates.io-index" 374 | checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" 375 | 376 | [[package]] 377 | name = "assert_matches" 378 | version = "1.5.0" 379 | source = "registry+https://github.com/rust-lang/crates.io-index" 380 | checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" 381 | 382 | [[package]] 383 | name = "atty" 384 | version = "0.2.14" 385 | source = "registry+https://github.com/rust-lang/crates.io-index" 386 | checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" 387 | dependencies = [ 388 | "hermit-abi", 389 | "libc", 390 | "winapi", 391 | ] 392 | 393 | [[package]] 394 | name = "autocfg" 395 | version = "1.3.0" 396 | source = "registry+https://github.com/rust-lang/crates.io-index" 397 | checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" 398 | 399 | [[package]] 400 | name = "base64" 401 | version = "0.12.3" 402 | source = "registry+https://github.com/rust-lang/crates.io-index" 403 | checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" 404 | 405 | [[package]] 406 | name = "base64" 407 | version = "0.13.1" 408 | source = "registry+https://github.com/rust-lang/crates.io-index" 409 | checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" 410 | 411 | [[package]] 412 | name = "base64" 413 | version = "0.21.7" 414 | source = "registry+https://github.com/rust-lang/crates.io-index" 415 | checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" 416 | 417 | [[package]] 418 | name = "bincode" 419 | version = "1.3.3" 420 | source = "registry+https://github.com/rust-lang/crates.io-index" 421 | checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" 422 | dependencies = [ 423 | "serde", 424 | ] 425 | 426 | [[package]] 427 | name = "bitflags" 428 | version = "1.3.2" 429 | source = "registry+https://github.com/rust-lang/crates.io-index" 430 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 431 | 432 | [[package]] 433 | name = "bitflags" 434 | version = "2.5.0" 435 | source = "registry+https://github.com/rust-lang/crates.io-index" 436 | checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" 437 | 438 | [[package]] 439 | name = "bitmaps" 440 | version = "2.1.0" 441 | source = "registry+https://github.com/rust-lang/crates.io-index" 442 | checksum = "031043d04099746d8db04daf1fa424b2bc8bd69d92b25962dcde24da39ab64a2" 443 | dependencies = [ 444 | "typenum", 445 | ] 446 | 447 | [[package]] 448 | name = "blake3" 449 | version = "1.5.1" 450 | source = "registry+https://github.com/rust-lang/crates.io-index" 451 | checksum = "30cca6d3674597c30ddf2c587bf8d9d65c9a84d2326d941cc79c9842dfe0ef52" 452 | dependencies = [ 453 | "arrayref", 454 | "arrayvec", 455 | "cc", 456 | "cfg-if", 457 | "constant_time_eq", 458 | "digest 0.10.7", 459 | ] 460 | 461 | [[package]] 462 | name = "block-buffer" 463 | version = "0.9.0" 464 | source = "registry+https://github.com/rust-lang/crates.io-index" 465 | checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" 466 | dependencies = [ 467 | "block-padding", 468 | "generic-array", 469 | ] 470 | 471 | [[package]] 472 | name = "block-buffer" 473 | version = "0.10.4" 474 | source = "registry+https://github.com/rust-lang/crates.io-index" 475 | checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" 476 | dependencies = [ 477 | "generic-array", 478 | ] 479 | 480 | [[package]] 481 | name = "block-padding" 482 | version = "0.2.1" 483 | source = "registry+https://github.com/rust-lang/crates.io-index" 484 | checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" 485 | 486 | [[package]] 487 | name = "borsh" 488 | version = "0.9.3" 489 | source = "registry+https://github.com/rust-lang/crates.io-index" 490 | checksum = "15bf3650200d8bffa99015595e10f1fbd17de07abbc25bb067da79e769939bfa" 491 | dependencies = [ 492 | "borsh-derive 0.9.3", 493 | "hashbrown 0.11.2", 494 | ] 495 | 496 | [[package]] 497 | name = "borsh" 498 | version = "0.10.3" 499 | source = "registry+https://github.com/rust-lang/crates.io-index" 500 | checksum = "4114279215a005bc675e386011e594e1d9b800918cea18fcadadcce864a2046b" 501 | dependencies = [ 502 | "borsh-derive 0.10.3", 503 | "hashbrown 0.13.2", 504 | ] 505 | 506 | [[package]] 507 | name = "borsh-derive" 508 | version = "0.9.3" 509 | source = "registry+https://github.com/rust-lang/crates.io-index" 510 | checksum = "6441c552f230375d18e3cc377677914d2ca2b0d36e52129fe15450a2dce46775" 511 | dependencies = [ 512 | "borsh-derive-internal 0.9.3", 513 | "borsh-schema-derive-internal 0.9.3", 514 | "proc-macro-crate 0.1.5", 515 | "proc-macro2", 516 | "syn 1.0.109", 517 | ] 518 | 519 | [[package]] 520 | name = "borsh-derive" 521 | version = "0.10.3" 522 | source = "registry+https://github.com/rust-lang/crates.io-index" 523 | checksum = "0754613691538d51f329cce9af41d7b7ca150bc973056f1156611489475f54f7" 524 | dependencies = [ 525 | "borsh-derive-internal 0.10.3", 526 | "borsh-schema-derive-internal 0.10.3", 527 | "proc-macro-crate 0.1.5", 528 | "proc-macro2", 529 | "syn 1.0.109", 530 | ] 531 | 532 | [[package]] 533 | name = "borsh-derive-internal" 534 | version = "0.9.3" 535 | source = "registry+https://github.com/rust-lang/crates.io-index" 536 | checksum = "5449c28a7b352f2d1e592a8a28bf139bc71afb0764a14f3c02500935d8c44065" 537 | dependencies = [ 538 | "proc-macro2", 539 | "quote", 540 | "syn 1.0.109", 541 | ] 542 | 543 | [[package]] 544 | name = "borsh-derive-internal" 545 | version = "0.10.3" 546 | source = "registry+https://github.com/rust-lang/crates.io-index" 547 | checksum = "afb438156919598d2c7bad7e1c0adf3d26ed3840dbc010db1a882a65583ca2fb" 548 | dependencies = [ 549 | "proc-macro2", 550 | "quote", 551 | "syn 1.0.109", 552 | ] 553 | 554 | [[package]] 555 | name = "borsh-schema-derive-internal" 556 | version = "0.9.3" 557 | source = "registry+https://github.com/rust-lang/crates.io-index" 558 | checksum = "cdbd5696d8bfa21d53d9fe39a714a18538bad11492a42d066dbbc395fb1951c0" 559 | dependencies = [ 560 | "proc-macro2", 561 | "quote", 562 | "syn 1.0.109", 563 | ] 564 | 565 | [[package]] 566 | name = "borsh-schema-derive-internal" 567 | version = "0.10.3" 568 | source = "registry+https://github.com/rust-lang/crates.io-index" 569 | checksum = "634205cc43f74a1b9046ef87c4540ebda95696ec0f315024860cad7c5b0f5ccd" 570 | dependencies = [ 571 | "proc-macro2", 572 | "quote", 573 | "syn 1.0.109", 574 | ] 575 | 576 | [[package]] 577 | name = "bs58" 578 | version = "0.4.0" 579 | source = "registry+https://github.com/rust-lang/crates.io-index" 580 | checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" 581 | 582 | [[package]] 583 | name = "bs58" 584 | version = "0.5.1" 585 | source = "registry+https://github.com/rust-lang/crates.io-index" 586 | checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" 587 | dependencies = [ 588 | "tinyvec", 589 | ] 590 | 591 | [[package]] 592 | name = "bumpalo" 593 | version = "3.16.0" 594 | source = "registry+https://github.com/rust-lang/crates.io-index" 595 | checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" 596 | 597 | [[package]] 598 | name = "bv" 599 | version = "0.11.1" 600 | source = "registry+https://github.com/rust-lang/crates.io-index" 601 | checksum = "8834bb1d8ee5dc048ee3124f2c7c1afcc6bc9aed03f11e9dfd8c69470a5db340" 602 | dependencies = [ 603 | "feature-probe", 604 | "serde", 605 | ] 606 | 607 | [[package]] 608 | name = "bytemuck" 609 | version = "1.16.0" 610 | source = "registry+https://github.com/rust-lang/crates.io-index" 611 | checksum = "78834c15cb5d5efe3452d58b1e8ba890dd62d21907f867f383358198e56ebca5" 612 | dependencies = [ 613 | "bytemuck_derive", 614 | ] 615 | 616 | [[package]] 617 | name = "bytemuck_derive" 618 | version = "1.7.0" 619 | source = "registry+https://github.com/rust-lang/crates.io-index" 620 | checksum = "1ee891b04274a59bd38b412188e24b849617b2e45a0fd8d057deb63e7403761b" 621 | dependencies = [ 622 | "proc-macro2", 623 | "quote", 624 | "syn 2.0.66", 625 | ] 626 | 627 | [[package]] 628 | name = "byteorder" 629 | version = "1.5.0" 630 | source = "registry+https://github.com/rust-lang/crates.io-index" 631 | checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" 632 | 633 | [[package]] 634 | name = "cc" 635 | version = "1.0.98" 636 | source = "registry+https://github.com/rust-lang/crates.io-index" 637 | checksum = "41c270e7540d725e65ac7f1b212ac8ce349719624d7bcff99f8e2e488e8cf03f" 638 | dependencies = [ 639 | "jobserver", 640 | "libc", 641 | "once_cell", 642 | ] 643 | 644 | [[package]] 645 | name = "cfg-if" 646 | version = "1.0.0" 647 | source = "registry+https://github.com/rust-lang/crates.io-index" 648 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 649 | 650 | [[package]] 651 | name = "chrono" 652 | version = "0.4.38" 653 | source = "registry+https://github.com/rust-lang/crates.io-index" 654 | checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" 655 | dependencies = [ 656 | "num-traits", 657 | ] 658 | 659 | [[package]] 660 | name = "cipher" 661 | version = "0.3.0" 662 | source = "registry+https://github.com/rust-lang/crates.io-index" 663 | checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" 664 | dependencies = [ 665 | "generic-array", 666 | ] 667 | 668 | [[package]] 669 | name = "console_error_panic_hook" 670 | version = "0.1.7" 671 | source = "registry+https://github.com/rust-lang/crates.io-index" 672 | checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" 673 | dependencies = [ 674 | "cfg-if", 675 | "wasm-bindgen", 676 | ] 677 | 678 | [[package]] 679 | name = "console_log" 680 | version = "0.2.2" 681 | source = "registry+https://github.com/rust-lang/crates.io-index" 682 | checksum = "e89f72f65e8501878b8a004d5a1afb780987e2ce2b4532c562e367a72c57499f" 683 | dependencies = [ 684 | "log", 685 | "web-sys", 686 | ] 687 | 688 | [[package]] 689 | name = "constant_time_eq" 690 | version = "0.3.0" 691 | source = "registry+https://github.com/rust-lang/crates.io-index" 692 | checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" 693 | 694 | [[package]] 695 | name = "cpufeatures" 696 | version = "0.2.12" 697 | source = "registry+https://github.com/rust-lang/crates.io-index" 698 | checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" 699 | dependencies = [ 700 | "libc", 701 | ] 702 | 703 | [[package]] 704 | name = "crossbeam-deque" 705 | version = "0.8.5" 706 | source = "registry+https://github.com/rust-lang/crates.io-index" 707 | checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" 708 | dependencies = [ 709 | "crossbeam-epoch", 710 | "crossbeam-utils", 711 | ] 712 | 713 | [[package]] 714 | name = "crossbeam-epoch" 715 | version = "0.9.18" 716 | source = "registry+https://github.com/rust-lang/crates.io-index" 717 | checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" 718 | dependencies = [ 719 | "crossbeam-utils", 720 | ] 721 | 722 | [[package]] 723 | name = "crossbeam-utils" 724 | version = "0.8.20" 725 | source = "registry+https://github.com/rust-lang/crates.io-index" 726 | checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" 727 | 728 | [[package]] 729 | name = "crunchy" 730 | version = "0.2.2" 731 | source = "registry+https://github.com/rust-lang/crates.io-index" 732 | checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" 733 | 734 | [[package]] 735 | name = "crypto-common" 736 | version = "0.1.6" 737 | source = "registry+https://github.com/rust-lang/crates.io-index" 738 | checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" 739 | dependencies = [ 740 | "generic-array", 741 | "typenum", 742 | ] 743 | 744 | [[package]] 745 | name = "crypto-mac" 746 | version = "0.8.0" 747 | source = "registry+https://github.com/rust-lang/crates.io-index" 748 | checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" 749 | dependencies = [ 750 | "generic-array", 751 | "subtle", 752 | ] 753 | 754 | [[package]] 755 | name = "ctr" 756 | version = "0.8.0" 757 | source = "registry+https://github.com/rust-lang/crates.io-index" 758 | checksum = "049bb91fb4aaf0e3c7efa6cd5ef877dbbbd15b39dad06d9948de4ec8a75761ea" 759 | dependencies = [ 760 | "cipher", 761 | ] 762 | 763 | [[package]] 764 | name = "curve25519-dalek" 765 | version = "3.2.1" 766 | source = "registry+https://github.com/rust-lang/crates.io-index" 767 | checksum = "90f9d052967f590a76e62eb387bd0bbb1b000182c3cefe5364db6b7211651bc0" 768 | dependencies = [ 769 | "byteorder", 770 | "digest 0.9.0", 771 | "rand_core 0.5.1", 772 | "serde", 773 | "subtle", 774 | "zeroize", 775 | ] 776 | 777 | [[package]] 778 | name = "darling" 779 | version = "0.20.9" 780 | source = "registry+https://github.com/rust-lang/crates.io-index" 781 | checksum = "83b2eb4d90d12bdda5ed17de686c2acb4c57914f8f921b8da7e112b5a36f3fe1" 782 | dependencies = [ 783 | "darling_core", 784 | "darling_macro", 785 | ] 786 | 787 | [[package]] 788 | name = "darling_core" 789 | version = "0.20.9" 790 | source = "registry+https://github.com/rust-lang/crates.io-index" 791 | checksum = "622687fe0bac72a04e5599029151f5796111b90f1baaa9b544d807a5e31cd120" 792 | dependencies = [ 793 | "fnv", 794 | "ident_case", 795 | "proc-macro2", 796 | "quote", 797 | "strsim", 798 | "syn 2.0.66", 799 | ] 800 | 801 | [[package]] 802 | name = "darling_macro" 803 | version = "0.20.9" 804 | source = "registry+https://github.com/rust-lang/crates.io-index" 805 | checksum = "733cabb43482b1a1b53eee8583c2b9e8684d592215ea83efd305dd31bc2f0178" 806 | dependencies = [ 807 | "darling_core", 808 | "quote", 809 | "syn 2.0.66", 810 | ] 811 | 812 | [[package]] 813 | name = "derivation-path" 814 | version = "0.2.0" 815 | source = "registry+https://github.com/rust-lang/crates.io-index" 816 | checksum = "6e5c37193a1db1d8ed868c03ec7b152175f26160a5b740e5e484143877e0adf0" 817 | 818 | [[package]] 819 | name = "derivative" 820 | version = "2.2.0" 821 | source = "registry+https://github.com/rust-lang/crates.io-index" 822 | checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" 823 | dependencies = [ 824 | "proc-macro2", 825 | "quote", 826 | "syn 1.0.109", 827 | ] 828 | 829 | [[package]] 830 | name = "digest" 831 | version = "0.9.0" 832 | source = "registry+https://github.com/rust-lang/crates.io-index" 833 | checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" 834 | dependencies = [ 835 | "generic-array", 836 | ] 837 | 838 | [[package]] 839 | name = "digest" 840 | version = "0.10.7" 841 | source = "registry+https://github.com/rust-lang/crates.io-index" 842 | checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" 843 | dependencies = [ 844 | "block-buffer 0.10.4", 845 | "crypto-common", 846 | "subtle", 847 | ] 848 | 849 | [[package]] 850 | name = "ed25519" 851 | version = "1.5.3" 852 | source = "registry+https://github.com/rust-lang/crates.io-index" 853 | checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" 854 | dependencies = [ 855 | "signature", 856 | ] 857 | 858 | [[package]] 859 | name = "ed25519-dalek" 860 | version = "1.0.1" 861 | source = "registry+https://github.com/rust-lang/crates.io-index" 862 | checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" 863 | dependencies = [ 864 | "curve25519-dalek", 865 | "ed25519", 866 | "rand 0.7.3", 867 | "serde", 868 | "sha2 0.9.9", 869 | "zeroize", 870 | ] 871 | 872 | [[package]] 873 | name = "ed25519-dalek-bip32" 874 | version = "0.2.0" 875 | source = "registry+https://github.com/rust-lang/crates.io-index" 876 | checksum = "9d2be62a4061b872c8c0873ee4fc6f101ce7b889d039f019c5fa2af471a59908" 877 | dependencies = [ 878 | "derivation-path", 879 | "ed25519-dalek", 880 | "hmac 0.12.1", 881 | "sha2 0.10.8", 882 | ] 883 | 884 | [[package]] 885 | name = "either" 886 | version = "1.12.0" 887 | source = "registry+https://github.com/rust-lang/crates.io-index" 888 | checksum = "3dca9240753cf90908d7e4aac30f630662b02aebaa1b58a3cadabdb23385b58b" 889 | 890 | [[package]] 891 | name = "env_logger" 892 | version = "0.9.3" 893 | source = "registry+https://github.com/rust-lang/crates.io-index" 894 | checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7" 895 | dependencies = [ 896 | "atty", 897 | "humantime", 898 | "log", 899 | "regex", 900 | "termcolor", 901 | ] 902 | 903 | [[package]] 904 | name = "equivalent" 905 | version = "1.0.1" 906 | source = "registry+https://github.com/rust-lang/crates.io-index" 907 | checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" 908 | 909 | [[package]] 910 | name = "feature-probe" 911 | version = "0.1.1" 912 | source = "registry+https://github.com/rust-lang/crates.io-index" 913 | checksum = "835a3dc7d1ec9e75e2b5fb4ba75396837112d2060b03f7d43bc1897c7f7211da" 914 | 915 | [[package]] 916 | name = "fnv" 917 | version = "1.0.7" 918 | source = "registry+https://github.com/rust-lang/crates.io-index" 919 | checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 920 | 921 | [[package]] 922 | name = "generic-array" 923 | version = "0.14.7" 924 | source = "registry+https://github.com/rust-lang/crates.io-index" 925 | checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" 926 | dependencies = [ 927 | "serde", 928 | "typenum", 929 | "version_check", 930 | ] 931 | 932 | [[package]] 933 | name = "getrandom" 934 | version = "0.1.16" 935 | source = "registry+https://github.com/rust-lang/crates.io-index" 936 | checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" 937 | dependencies = [ 938 | "cfg-if", 939 | "js-sys", 940 | "libc", 941 | "wasi 0.9.0+wasi-snapshot-preview1", 942 | "wasm-bindgen", 943 | ] 944 | 945 | [[package]] 946 | name = "getrandom" 947 | version = "0.2.15" 948 | source = "registry+https://github.com/rust-lang/crates.io-index" 949 | checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" 950 | dependencies = [ 951 | "cfg-if", 952 | "js-sys", 953 | "libc", 954 | "wasi 0.11.0+wasi-snapshot-preview1", 955 | "wasm-bindgen", 956 | ] 957 | 958 | [[package]] 959 | name = "hashbrown" 960 | version = "0.11.2" 961 | source = "registry+https://github.com/rust-lang/crates.io-index" 962 | checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" 963 | dependencies = [ 964 | "ahash 0.7.8", 965 | ] 966 | 967 | [[package]] 968 | name = "hashbrown" 969 | version = "0.13.2" 970 | source = "registry+https://github.com/rust-lang/crates.io-index" 971 | checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" 972 | dependencies = [ 973 | "ahash 0.8.6", 974 | ] 975 | 976 | [[package]] 977 | name = "hashbrown" 978 | version = "0.14.5" 979 | source = "registry+https://github.com/rust-lang/crates.io-index" 980 | checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" 981 | 982 | [[package]] 983 | name = "heck" 984 | version = "0.3.3" 985 | source = "registry+https://github.com/rust-lang/crates.io-index" 986 | checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" 987 | dependencies = [ 988 | "unicode-segmentation", 989 | ] 990 | 991 | [[package]] 992 | name = "hermit-abi" 993 | version = "0.1.19" 994 | source = "registry+https://github.com/rust-lang/crates.io-index" 995 | checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" 996 | dependencies = [ 997 | "libc", 998 | ] 999 | 1000 | [[package]] 1001 | name = "hmac" 1002 | version = "0.8.1" 1003 | source = "registry+https://github.com/rust-lang/crates.io-index" 1004 | checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" 1005 | dependencies = [ 1006 | "crypto-mac", 1007 | "digest 0.9.0", 1008 | ] 1009 | 1010 | [[package]] 1011 | name = "hmac" 1012 | version = "0.12.1" 1013 | source = "registry+https://github.com/rust-lang/crates.io-index" 1014 | checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" 1015 | dependencies = [ 1016 | "digest 0.10.7", 1017 | ] 1018 | 1019 | [[package]] 1020 | name = "hmac-drbg" 1021 | version = "0.3.0" 1022 | source = "registry+https://github.com/rust-lang/crates.io-index" 1023 | checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" 1024 | dependencies = [ 1025 | "digest 0.9.0", 1026 | "generic-array", 1027 | "hmac 0.8.1", 1028 | ] 1029 | 1030 | [[package]] 1031 | name = "humantime" 1032 | version = "2.1.0" 1033 | source = "registry+https://github.com/rust-lang/crates.io-index" 1034 | checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" 1035 | 1036 | [[package]] 1037 | name = "ident_case" 1038 | version = "1.0.1" 1039 | source = "registry+https://github.com/rust-lang/crates.io-index" 1040 | checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" 1041 | 1042 | [[package]] 1043 | name = "im" 1044 | version = "15.1.0" 1045 | source = "registry+https://github.com/rust-lang/crates.io-index" 1046 | checksum = "d0acd33ff0285af998aaf9b57342af478078f53492322fafc47450e09397e0e9" 1047 | dependencies = [ 1048 | "bitmaps", 1049 | "rand_core 0.6.4", 1050 | "rand_xoshiro", 1051 | "rayon", 1052 | "serde", 1053 | "sized-chunks", 1054 | "typenum", 1055 | "version_check", 1056 | ] 1057 | 1058 | [[package]] 1059 | name = "indexmap" 1060 | version = "2.2.6" 1061 | source = "registry+https://github.com/rust-lang/crates.io-index" 1062 | checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" 1063 | dependencies = [ 1064 | "equivalent", 1065 | "hashbrown 0.14.5", 1066 | ] 1067 | 1068 | [[package]] 1069 | name = "itertools" 1070 | version = "0.10.5" 1071 | source = "registry+https://github.com/rust-lang/crates.io-index" 1072 | checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" 1073 | dependencies = [ 1074 | "either", 1075 | ] 1076 | 1077 | [[package]] 1078 | name = "itoa" 1079 | version = "1.0.11" 1080 | source = "registry+https://github.com/rust-lang/crates.io-index" 1081 | checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" 1082 | 1083 | [[package]] 1084 | name = "jobserver" 1085 | version = "0.1.31" 1086 | source = "registry+https://github.com/rust-lang/crates.io-index" 1087 | checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" 1088 | dependencies = [ 1089 | "libc", 1090 | ] 1091 | 1092 | [[package]] 1093 | name = "js-sys" 1094 | version = "0.3.69" 1095 | source = "registry+https://github.com/rust-lang/crates.io-index" 1096 | checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" 1097 | dependencies = [ 1098 | "wasm-bindgen", 1099 | ] 1100 | 1101 | [[package]] 1102 | name = "keccak" 1103 | version = "0.1.5" 1104 | source = "registry+https://github.com/rust-lang/crates.io-index" 1105 | checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" 1106 | dependencies = [ 1107 | "cpufeatures", 1108 | ] 1109 | 1110 | [[package]] 1111 | name = "lazy_static" 1112 | version = "1.4.0" 1113 | source = "registry+https://github.com/rust-lang/crates.io-index" 1114 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 1115 | 1116 | [[package]] 1117 | name = "libc" 1118 | version = "0.2.155" 1119 | source = "registry+https://github.com/rust-lang/crates.io-index" 1120 | checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" 1121 | 1122 | [[package]] 1123 | name = "libsecp256k1" 1124 | version = "0.6.0" 1125 | source = "registry+https://github.com/rust-lang/crates.io-index" 1126 | checksum = "c9d220bc1feda2ac231cb78c3d26f27676b8cf82c96971f7aeef3d0cf2797c73" 1127 | dependencies = [ 1128 | "arrayref", 1129 | "base64 0.12.3", 1130 | "digest 0.9.0", 1131 | "hmac-drbg", 1132 | "libsecp256k1-core", 1133 | "libsecp256k1-gen-ecmult", 1134 | "libsecp256k1-gen-genmult", 1135 | "rand 0.7.3", 1136 | "serde", 1137 | "sha2 0.9.9", 1138 | "typenum", 1139 | ] 1140 | 1141 | [[package]] 1142 | name = "libsecp256k1-core" 1143 | version = "0.2.2" 1144 | source = "registry+https://github.com/rust-lang/crates.io-index" 1145 | checksum = "d0f6ab710cec28cef759c5f18671a27dae2a5f952cdaaee1d8e2908cb2478a80" 1146 | dependencies = [ 1147 | "crunchy", 1148 | "digest 0.9.0", 1149 | "subtle", 1150 | ] 1151 | 1152 | [[package]] 1153 | name = "libsecp256k1-gen-ecmult" 1154 | version = "0.2.1" 1155 | source = "registry+https://github.com/rust-lang/crates.io-index" 1156 | checksum = "ccab96b584d38fac86a83f07e659f0deafd0253dc096dab5a36d53efe653c5c3" 1157 | dependencies = [ 1158 | "libsecp256k1-core", 1159 | ] 1160 | 1161 | [[package]] 1162 | name = "libsecp256k1-gen-genmult" 1163 | version = "0.2.1" 1164 | source = "registry+https://github.com/rust-lang/crates.io-index" 1165 | checksum = "67abfe149395e3aa1c48a2beb32b068e2334402df8181f818d3aee2b304c4f5d" 1166 | dependencies = [ 1167 | "libsecp256k1-core", 1168 | ] 1169 | 1170 | [[package]] 1171 | name = "lock_api" 1172 | version = "0.4.12" 1173 | source = "registry+https://github.com/rust-lang/crates.io-index" 1174 | checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" 1175 | dependencies = [ 1176 | "autocfg", 1177 | "scopeguard", 1178 | ] 1179 | 1180 | [[package]] 1181 | name = "log" 1182 | version = "0.4.21" 1183 | source = "registry+https://github.com/rust-lang/crates.io-index" 1184 | checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" 1185 | 1186 | [[package]] 1187 | name = "memchr" 1188 | version = "2.7.2" 1189 | source = "registry+https://github.com/rust-lang/crates.io-index" 1190 | checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" 1191 | 1192 | [[package]] 1193 | name = "memmap2" 1194 | version = "0.5.10" 1195 | source = "registry+https://github.com/rust-lang/crates.io-index" 1196 | checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" 1197 | dependencies = [ 1198 | "libc", 1199 | ] 1200 | 1201 | [[package]] 1202 | name = "memoffset" 1203 | version = "0.9.1" 1204 | source = "registry+https://github.com/rust-lang/crates.io-index" 1205 | checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" 1206 | dependencies = [ 1207 | "autocfg", 1208 | ] 1209 | 1210 | [[package]] 1211 | name = "merlin" 1212 | version = "3.0.0" 1213 | source = "registry+https://github.com/rust-lang/crates.io-index" 1214 | checksum = "58c38e2799fc0978b65dfff8023ec7843e2330bb462f19198840b34b6582397d" 1215 | dependencies = [ 1216 | "byteorder", 1217 | "keccak", 1218 | "rand_core 0.6.4", 1219 | "zeroize", 1220 | ] 1221 | 1222 | [[package]] 1223 | name = "num-bigint" 1224 | version = "0.4.5" 1225 | source = "registry+https://github.com/rust-lang/crates.io-index" 1226 | checksum = "c165a9ab64cf766f73521c0dd2cfdff64f488b8f0b3e621face3462d3db536d7" 1227 | dependencies = [ 1228 | "num-integer", 1229 | "num-traits", 1230 | ] 1231 | 1232 | [[package]] 1233 | name = "num-derive" 1234 | version = "0.3.3" 1235 | source = "registry+https://github.com/rust-lang/crates.io-index" 1236 | checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" 1237 | dependencies = [ 1238 | "proc-macro2", 1239 | "quote", 1240 | "syn 1.0.109", 1241 | ] 1242 | 1243 | [[package]] 1244 | name = "num-derive" 1245 | version = "0.4.2" 1246 | source = "registry+https://github.com/rust-lang/crates.io-index" 1247 | checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" 1248 | dependencies = [ 1249 | "proc-macro2", 1250 | "quote", 1251 | "syn 2.0.66", 1252 | ] 1253 | 1254 | [[package]] 1255 | name = "num-integer" 1256 | version = "0.1.46" 1257 | source = "registry+https://github.com/rust-lang/crates.io-index" 1258 | checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" 1259 | dependencies = [ 1260 | "num-traits", 1261 | ] 1262 | 1263 | [[package]] 1264 | name = "num-traits" 1265 | version = "0.2.19" 1266 | source = "registry+https://github.com/rust-lang/crates.io-index" 1267 | checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" 1268 | dependencies = [ 1269 | "autocfg", 1270 | ] 1271 | 1272 | [[package]] 1273 | name = "num_enum" 1274 | version = "0.5.11" 1275 | source = "registry+https://github.com/rust-lang/crates.io-index" 1276 | checksum = "1f646caf906c20226733ed5b1374287eb97e3c2a5c227ce668c1f2ce20ae57c9" 1277 | dependencies = [ 1278 | "num_enum_derive 0.5.11", 1279 | ] 1280 | 1281 | [[package]] 1282 | name = "num_enum" 1283 | version = "0.6.1" 1284 | source = "registry+https://github.com/rust-lang/crates.io-index" 1285 | checksum = "7a015b430d3c108a207fd776d2e2196aaf8b1cf8cf93253e3a097ff3085076a1" 1286 | dependencies = [ 1287 | "num_enum_derive 0.6.1", 1288 | ] 1289 | 1290 | [[package]] 1291 | name = "num_enum" 1292 | version = "0.7.2" 1293 | source = "registry+https://github.com/rust-lang/crates.io-index" 1294 | checksum = "02339744ee7253741199f897151b38e72257d13802d4ee837285cc2990a90845" 1295 | dependencies = [ 1296 | "num_enum_derive 0.7.2", 1297 | ] 1298 | 1299 | [[package]] 1300 | name = "num_enum_derive" 1301 | version = "0.5.11" 1302 | source = "registry+https://github.com/rust-lang/crates.io-index" 1303 | checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799" 1304 | dependencies = [ 1305 | "proc-macro-crate 1.3.1", 1306 | "proc-macro2", 1307 | "quote", 1308 | "syn 1.0.109", 1309 | ] 1310 | 1311 | [[package]] 1312 | name = "num_enum_derive" 1313 | version = "0.6.1" 1314 | source = "registry+https://github.com/rust-lang/crates.io-index" 1315 | checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6" 1316 | dependencies = [ 1317 | "proc-macro-crate 1.3.1", 1318 | "proc-macro2", 1319 | "quote", 1320 | "syn 2.0.66", 1321 | ] 1322 | 1323 | [[package]] 1324 | name = "num_enum_derive" 1325 | version = "0.7.2" 1326 | source = "registry+https://github.com/rust-lang/crates.io-index" 1327 | checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" 1328 | dependencies = [ 1329 | "proc-macro-crate 3.1.0", 1330 | "proc-macro2", 1331 | "quote", 1332 | "syn 2.0.66", 1333 | ] 1334 | 1335 | [[package]] 1336 | name = "once_cell" 1337 | version = "1.19.0" 1338 | source = "registry+https://github.com/rust-lang/crates.io-index" 1339 | checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" 1340 | 1341 | [[package]] 1342 | name = "opaque-debug" 1343 | version = "0.3.1" 1344 | source = "registry+https://github.com/rust-lang/crates.io-index" 1345 | checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" 1346 | 1347 | [[package]] 1348 | name = "parking_lot" 1349 | version = "0.12.3" 1350 | source = "registry+https://github.com/rust-lang/crates.io-index" 1351 | checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" 1352 | dependencies = [ 1353 | "lock_api", 1354 | "parking_lot_core", 1355 | ] 1356 | 1357 | [[package]] 1358 | name = "parking_lot_core" 1359 | version = "0.9.10" 1360 | source = "registry+https://github.com/rust-lang/crates.io-index" 1361 | checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" 1362 | dependencies = [ 1363 | "cfg-if", 1364 | "libc", 1365 | "redox_syscall", 1366 | "smallvec", 1367 | "windows-targets", 1368 | ] 1369 | 1370 | [[package]] 1371 | name = "paste" 1372 | version = "1.0.15" 1373 | source = "registry+https://github.com/rust-lang/crates.io-index" 1374 | checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" 1375 | 1376 | [[package]] 1377 | name = "pbkdf2" 1378 | version = "0.4.0" 1379 | source = "registry+https://github.com/rust-lang/crates.io-index" 1380 | checksum = "216eaa586a190f0a738f2f918511eecfa90f13295abec0e457cdebcceda80cbd" 1381 | dependencies = [ 1382 | "crypto-mac", 1383 | ] 1384 | 1385 | [[package]] 1386 | name = "pbkdf2" 1387 | version = "0.11.0" 1388 | source = "registry+https://github.com/rust-lang/crates.io-index" 1389 | checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" 1390 | dependencies = [ 1391 | "digest 0.10.7", 1392 | ] 1393 | 1394 | [[package]] 1395 | name = "percent-encoding" 1396 | version = "2.3.1" 1397 | source = "registry+https://github.com/rust-lang/crates.io-index" 1398 | checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" 1399 | 1400 | [[package]] 1401 | name = "polyval" 1402 | version = "0.5.3" 1403 | source = "registry+https://github.com/rust-lang/crates.io-index" 1404 | checksum = "8419d2b623c7c0896ff2d5d96e2cb4ede590fed28fcc34934f4c33c036e620a1" 1405 | dependencies = [ 1406 | "cfg-if", 1407 | "cpufeatures", 1408 | "opaque-debug", 1409 | "universal-hash", 1410 | ] 1411 | 1412 | [[package]] 1413 | name = "ppv-lite86" 1414 | version = "0.2.17" 1415 | source = "registry+https://github.com/rust-lang/crates.io-index" 1416 | checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" 1417 | 1418 | [[package]] 1419 | name = "proc-macro-crate" 1420 | version = "0.1.5" 1421 | source = "registry+https://github.com/rust-lang/crates.io-index" 1422 | checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" 1423 | dependencies = [ 1424 | "toml", 1425 | ] 1426 | 1427 | [[package]] 1428 | name = "proc-macro-crate" 1429 | version = "1.3.1" 1430 | source = "registry+https://github.com/rust-lang/crates.io-index" 1431 | checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" 1432 | dependencies = [ 1433 | "once_cell", 1434 | "toml_edit 0.19.15", 1435 | ] 1436 | 1437 | [[package]] 1438 | name = "proc-macro-crate" 1439 | version = "3.1.0" 1440 | source = "registry+https://github.com/rust-lang/crates.io-index" 1441 | checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" 1442 | dependencies = [ 1443 | "toml_edit 0.21.1", 1444 | ] 1445 | 1446 | [[package]] 1447 | name = "proc-macro2" 1448 | version = "1.0.84" 1449 | source = "registry+https://github.com/rust-lang/crates.io-index" 1450 | checksum = "ec96c6a92621310b51366f1e28d05ef11489516e93be030060e5fc12024a49d6" 1451 | dependencies = [ 1452 | "unicode-ident", 1453 | ] 1454 | 1455 | [[package]] 1456 | name = "pump" 1457 | version = "0.1.0" 1458 | dependencies = [ 1459 | "anchor-lang", 1460 | "anchor-spl", 1461 | "raydium-contract-instructions", 1462 | ] 1463 | 1464 | [[package]] 1465 | name = "qstring" 1466 | version = "0.7.2" 1467 | source = "registry+https://github.com/rust-lang/crates.io-index" 1468 | checksum = "d464fae65fff2680baf48019211ce37aaec0c78e9264c84a3e484717f965104e" 1469 | dependencies = [ 1470 | "percent-encoding", 1471 | ] 1472 | 1473 | [[package]] 1474 | name = "quote" 1475 | version = "1.0.36" 1476 | source = "registry+https://github.com/rust-lang/crates.io-index" 1477 | checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" 1478 | dependencies = [ 1479 | "proc-macro2", 1480 | ] 1481 | 1482 | [[package]] 1483 | name = "rand" 1484 | version = "0.7.3" 1485 | source = "registry+https://github.com/rust-lang/crates.io-index" 1486 | checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" 1487 | dependencies = [ 1488 | "getrandom 0.1.16", 1489 | "libc", 1490 | "rand_chacha 0.2.2", 1491 | "rand_core 0.5.1", 1492 | "rand_hc", 1493 | ] 1494 | 1495 | [[package]] 1496 | name = "rand" 1497 | version = "0.8.5" 1498 | source = "registry+https://github.com/rust-lang/crates.io-index" 1499 | checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" 1500 | dependencies = [ 1501 | "rand_chacha 0.3.1", 1502 | "rand_core 0.6.4", 1503 | ] 1504 | 1505 | [[package]] 1506 | name = "rand_chacha" 1507 | version = "0.2.2" 1508 | source = "registry+https://github.com/rust-lang/crates.io-index" 1509 | checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" 1510 | dependencies = [ 1511 | "ppv-lite86", 1512 | "rand_core 0.5.1", 1513 | ] 1514 | 1515 | [[package]] 1516 | name = "rand_chacha" 1517 | version = "0.3.1" 1518 | source = "registry+https://github.com/rust-lang/crates.io-index" 1519 | checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 1520 | dependencies = [ 1521 | "ppv-lite86", 1522 | "rand_core 0.6.4", 1523 | ] 1524 | 1525 | [[package]] 1526 | name = "rand_core" 1527 | version = "0.5.1" 1528 | source = "registry+https://github.com/rust-lang/crates.io-index" 1529 | checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" 1530 | dependencies = [ 1531 | "getrandom 0.1.16", 1532 | ] 1533 | 1534 | [[package]] 1535 | name = "rand_core" 1536 | version = "0.6.4" 1537 | source = "registry+https://github.com/rust-lang/crates.io-index" 1538 | checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" 1539 | dependencies = [ 1540 | "getrandom 0.2.15", 1541 | ] 1542 | 1543 | [[package]] 1544 | name = "rand_hc" 1545 | version = "0.2.0" 1546 | source = "registry+https://github.com/rust-lang/crates.io-index" 1547 | checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" 1548 | dependencies = [ 1549 | "rand_core 0.5.1", 1550 | ] 1551 | 1552 | [[package]] 1553 | name = "rand_xoshiro" 1554 | version = "0.6.0" 1555 | source = "registry+https://github.com/rust-lang/crates.io-index" 1556 | checksum = "6f97cdb2a36ed4183de61b2f824cc45c9f1037f28afe0a322e9fff4c108b5aaa" 1557 | dependencies = [ 1558 | "rand_core 0.6.4", 1559 | ] 1560 | 1561 | [[package]] 1562 | name = "raydium-contract-instructions" 1563 | version = "0.1.0" 1564 | source = "git+https://github.com/raydium-io/raydium-contract-instructions.git#8c98edf604172b3b796d256271e8560c4a3bcc9f" 1565 | dependencies = [ 1566 | "ahash 0.8.6", 1567 | "solana-program", 1568 | "spl-associated-token-account 1.1.3", 1569 | "spl-token 3.5.0", 1570 | "thiserror", 1571 | ] 1572 | 1573 | [[package]] 1574 | name = "rayon" 1575 | version = "1.10.0" 1576 | source = "registry+https://github.com/rust-lang/crates.io-index" 1577 | checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" 1578 | dependencies = [ 1579 | "either", 1580 | "rayon-core", 1581 | ] 1582 | 1583 | [[package]] 1584 | name = "rayon-core" 1585 | version = "1.12.1" 1586 | source = "registry+https://github.com/rust-lang/crates.io-index" 1587 | checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" 1588 | dependencies = [ 1589 | "crossbeam-deque", 1590 | "crossbeam-utils", 1591 | ] 1592 | 1593 | [[package]] 1594 | name = "redox_syscall" 1595 | version = "0.5.1" 1596 | source = "registry+https://github.com/rust-lang/crates.io-index" 1597 | checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e" 1598 | dependencies = [ 1599 | "bitflags 2.5.0", 1600 | ] 1601 | 1602 | [[package]] 1603 | name = "regex" 1604 | version = "1.10.4" 1605 | source = "registry+https://github.com/rust-lang/crates.io-index" 1606 | checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" 1607 | dependencies = [ 1608 | "aho-corasick", 1609 | "memchr", 1610 | "regex-automata", 1611 | "regex-syntax", 1612 | ] 1613 | 1614 | [[package]] 1615 | name = "regex-automata" 1616 | version = "0.4.6" 1617 | source = "registry+https://github.com/rust-lang/crates.io-index" 1618 | checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" 1619 | dependencies = [ 1620 | "aho-corasick", 1621 | "memchr", 1622 | "regex-syntax", 1623 | ] 1624 | 1625 | [[package]] 1626 | name = "regex-syntax" 1627 | version = "0.8.3" 1628 | source = "registry+https://github.com/rust-lang/crates.io-index" 1629 | checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" 1630 | 1631 | [[package]] 1632 | name = "rustc-hash" 1633 | version = "1.1.0" 1634 | source = "registry+https://github.com/rust-lang/crates.io-index" 1635 | checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" 1636 | 1637 | [[package]] 1638 | name = "rustc_version" 1639 | version = "0.4.0" 1640 | source = "registry+https://github.com/rust-lang/crates.io-index" 1641 | checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" 1642 | dependencies = [ 1643 | "semver", 1644 | ] 1645 | 1646 | [[package]] 1647 | name = "rustversion" 1648 | version = "1.0.17" 1649 | source = "registry+https://github.com/rust-lang/crates.io-index" 1650 | checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" 1651 | 1652 | [[package]] 1653 | name = "ryu" 1654 | version = "1.0.18" 1655 | source = "registry+https://github.com/rust-lang/crates.io-index" 1656 | checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" 1657 | 1658 | [[package]] 1659 | name = "scopeguard" 1660 | version = "1.2.0" 1661 | source = "registry+https://github.com/rust-lang/crates.io-index" 1662 | checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" 1663 | 1664 | [[package]] 1665 | name = "semver" 1666 | version = "1.0.23" 1667 | source = "registry+https://github.com/rust-lang/crates.io-index" 1668 | checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" 1669 | 1670 | [[package]] 1671 | name = "serde" 1672 | version = "1.0.203" 1673 | source = "registry+https://github.com/rust-lang/crates.io-index" 1674 | checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" 1675 | dependencies = [ 1676 | "serde_derive", 1677 | ] 1678 | 1679 | [[package]] 1680 | name = "serde_bytes" 1681 | version = "0.11.14" 1682 | source = "registry+https://github.com/rust-lang/crates.io-index" 1683 | checksum = "8b8497c313fd43ab992087548117643f6fcd935cbf36f176ffda0aacf9591734" 1684 | dependencies = [ 1685 | "serde", 1686 | ] 1687 | 1688 | [[package]] 1689 | name = "serde_derive" 1690 | version = "1.0.203" 1691 | source = "registry+https://github.com/rust-lang/crates.io-index" 1692 | checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" 1693 | dependencies = [ 1694 | "proc-macro2", 1695 | "quote", 1696 | "syn 2.0.66", 1697 | ] 1698 | 1699 | [[package]] 1700 | name = "serde_json" 1701 | version = "1.0.117" 1702 | source = "registry+https://github.com/rust-lang/crates.io-index" 1703 | checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" 1704 | dependencies = [ 1705 | "itoa", 1706 | "ryu", 1707 | "serde", 1708 | ] 1709 | 1710 | [[package]] 1711 | name = "serde_with" 1712 | version = "2.3.3" 1713 | source = "registry+https://github.com/rust-lang/crates.io-index" 1714 | checksum = "07ff71d2c147a7b57362cead5e22f772cd52f6ab31cfcd9edcd7f6aeb2a0afbe" 1715 | dependencies = [ 1716 | "serde", 1717 | "serde_with_macros", 1718 | ] 1719 | 1720 | [[package]] 1721 | name = "serde_with_macros" 1722 | version = "2.3.3" 1723 | source = "registry+https://github.com/rust-lang/crates.io-index" 1724 | checksum = "881b6f881b17d13214e5d494c939ebab463d01264ce1811e9d4ac3a882e7695f" 1725 | dependencies = [ 1726 | "darling", 1727 | "proc-macro2", 1728 | "quote", 1729 | "syn 2.0.66", 1730 | ] 1731 | 1732 | [[package]] 1733 | name = "sha2" 1734 | version = "0.9.9" 1735 | source = "registry+https://github.com/rust-lang/crates.io-index" 1736 | checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" 1737 | dependencies = [ 1738 | "block-buffer 0.9.0", 1739 | "cfg-if", 1740 | "cpufeatures", 1741 | "digest 0.9.0", 1742 | "opaque-debug", 1743 | ] 1744 | 1745 | [[package]] 1746 | name = "sha2" 1747 | version = "0.10.8" 1748 | source = "registry+https://github.com/rust-lang/crates.io-index" 1749 | checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" 1750 | dependencies = [ 1751 | "cfg-if", 1752 | "cpufeatures", 1753 | "digest 0.10.7", 1754 | ] 1755 | 1756 | [[package]] 1757 | name = "sha3" 1758 | version = "0.9.1" 1759 | source = "registry+https://github.com/rust-lang/crates.io-index" 1760 | checksum = "f81199417d4e5de3f04b1e871023acea7389672c4135918f05aa9cbf2f2fa809" 1761 | dependencies = [ 1762 | "block-buffer 0.9.0", 1763 | "digest 0.9.0", 1764 | "keccak", 1765 | "opaque-debug", 1766 | ] 1767 | 1768 | [[package]] 1769 | name = "sha3" 1770 | version = "0.10.8" 1771 | source = "registry+https://github.com/rust-lang/crates.io-index" 1772 | checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" 1773 | dependencies = [ 1774 | "digest 0.10.7", 1775 | "keccak", 1776 | ] 1777 | 1778 | [[package]] 1779 | name = "signature" 1780 | version = "1.6.4" 1781 | source = "registry+https://github.com/rust-lang/crates.io-index" 1782 | checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" 1783 | 1784 | [[package]] 1785 | name = "sized-chunks" 1786 | version = "0.6.5" 1787 | source = "registry+https://github.com/rust-lang/crates.io-index" 1788 | checksum = "16d69225bde7a69b235da73377861095455d298f2b970996eec25ddbb42b3d1e" 1789 | dependencies = [ 1790 | "bitmaps", 1791 | "typenum", 1792 | ] 1793 | 1794 | [[package]] 1795 | name = "smallvec" 1796 | version = "1.13.2" 1797 | source = "registry+https://github.com/rust-lang/crates.io-index" 1798 | checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" 1799 | 1800 | [[package]] 1801 | name = "solana-frozen-abi" 1802 | version = "1.16.25" 1803 | source = "registry+https://github.com/rust-lang/crates.io-index" 1804 | checksum = "a7077f6495ccc313dff49c3e3f3ed03e49058258bae7fee77ac29ba0a474ba82" 1805 | dependencies = [ 1806 | "ahash 0.8.6", 1807 | "blake3", 1808 | "block-buffer 0.10.4", 1809 | "bs58 0.4.0", 1810 | "bv", 1811 | "byteorder", 1812 | "cc", 1813 | "either", 1814 | "generic-array", 1815 | "getrandom 0.1.16", 1816 | "im", 1817 | "lazy_static", 1818 | "log", 1819 | "memmap2", 1820 | "once_cell", 1821 | "rand_core 0.6.4", 1822 | "rustc_version", 1823 | "serde", 1824 | "serde_bytes", 1825 | "serde_derive", 1826 | "serde_json", 1827 | "sha2 0.10.8", 1828 | "solana-frozen-abi-macro", 1829 | "subtle", 1830 | "thiserror", 1831 | ] 1832 | 1833 | [[package]] 1834 | name = "solana-frozen-abi-macro" 1835 | version = "1.16.25" 1836 | source = "registry+https://github.com/rust-lang/crates.io-index" 1837 | checksum = "f516f992211a2ab70de5c367190575c97e02d156f9f1d8b76886d673f30e88a2" 1838 | dependencies = [ 1839 | "proc-macro2", 1840 | "quote", 1841 | "rustc_version", 1842 | "syn 2.0.66", 1843 | ] 1844 | 1845 | [[package]] 1846 | name = "solana-logger" 1847 | version = "1.16.25" 1848 | source = "registry+https://github.com/rust-lang/crates.io-index" 1849 | checksum = "7b64def674bfaa4a3f8be7ba19c03c9caec4ec028ba62b9a427ec1bf608a2486" 1850 | dependencies = [ 1851 | "env_logger", 1852 | "lazy_static", 1853 | "log", 1854 | ] 1855 | 1856 | [[package]] 1857 | name = "solana-program" 1858 | version = "1.16.25" 1859 | source = "registry+https://github.com/rust-lang/crates.io-index" 1860 | checksum = "3e92350aa5b42564681655331e7e0b9d5c99a442de317ceeb4741efbbe9a6c05" 1861 | dependencies = [ 1862 | "ark-bn254", 1863 | "ark-ec", 1864 | "ark-ff", 1865 | "ark-serialize", 1866 | "array-bytes", 1867 | "base64 0.21.7", 1868 | "bincode", 1869 | "bitflags 1.3.2", 1870 | "blake3", 1871 | "borsh 0.10.3", 1872 | "borsh 0.9.3", 1873 | "bs58 0.4.0", 1874 | "bv", 1875 | "bytemuck", 1876 | "cc", 1877 | "console_error_panic_hook", 1878 | "console_log", 1879 | "curve25519-dalek", 1880 | "getrandom 0.2.15", 1881 | "itertools", 1882 | "js-sys", 1883 | "lazy_static", 1884 | "libc", 1885 | "libsecp256k1", 1886 | "log", 1887 | "memoffset", 1888 | "num-bigint", 1889 | "num-derive 0.3.3", 1890 | "num-traits", 1891 | "parking_lot", 1892 | "rand 0.7.3", 1893 | "rand_chacha 0.2.2", 1894 | "rustc_version", 1895 | "rustversion", 1896 | "serde", 1897 | "serde_bytes", 1898 | "serde_derive", 1899 | "serde_json", 1900 | "sha2 0.10.8", 1901 | "sha3 0.10.8", 1902 | "solana-frozen-abi", 1903 | "solana-frozen-abi-macro", 1904 | "solana-sdk-macro", 1905 | "thiserror", 1906 | "tiny-bip39", 1907 | "wasm-bindgen", 1908 | "zeroize", 1909 | ] 1910 | 1911 | [[package]] 1912 | name = "solana-sdk" 1913 | version = "1.16.25" 1914 | source = "registry+https://github.com/rust-lang/crates.io-index" 1915 | checksum = "2087e15c92d4d6b3f085dc12fbe9614141c811f90a54cc418240ac30b608133f" 1916 | dependencies = [ 1917 | "assert_matches", 1918 | "base64 0.21.7", 1919 | "bincode", 1920 | "bitflags 1.3.2", 1921 | "borsh 0.10.3", 1922 | "bs58 0.4.0", 1923 | "bytemuck", 1924 | "byteorder", 1925 | "chrono", 1926 | "derivation-path", 1927 | "digest 0.10.7", 1928 | "ed25519-dalek", 1929 | "ed25519-dalek-bip32", 1930 | "generic-array", 1931 | "hmac 0.12.1", 1932 | "itertools", 1933 | "js-sys", 1934 | "lazy_static", 1935 | "libsecp256k1", 1936 | "log", 1937 | "memmap2", 1938 | "num-derive 0.3.3", 1939 | "num-traits", 1940 | "num_enum 0.6.1", 1941 | "pbkdf2 0.11.0", 1942 | "qstring", 1943 | "rand 0.7.3", 1944 | "rand_chacha 0.2.2", 1945 | "rustc_version", 1946 | "rustversion", 1947 | "serde", 1948 | "serde_bytes", 1949 | "serde_derive", 1950 | "serde_json", 1951 | "serde_with", 1952 | "sha2 0.10.8", 1953 | "sha3 0.10.8", 1954 | "solana-frozen-abi", 1955 | "solana-frozen-abi-macro", 1956 | "solana-logger", 1957 | "solana-program", 1958 | "solana-sdk-macro", 1959 | "thiserror", 1960 | "uriparse", 1961 | "wasm-bindgen", 1962 | ] 1963 | 1964 | [[package]] 1965 | name = "solana-sdk-macro" 1966 | version = "1.16.25" 1967 | source = "registry+https://github.com/rust-lang/crates.io-index" 1968 | checksum = "2e0e0e7ee984b0f9179a1d4f4e9e67ce675de2324b5a98b61d2bdb61be3c19bb" 1969 | dependencies = [ 1970 | "bs58 0.4.0", 1971 | "proc-macro2", 1972 | "quote", 1973 | "rustversion", 1974 | "syn 2.0.66", 1975 | ] 1976 | 1977 | [[package]] 1978 | name = "solana-zk-token-sdk" 1979 | version = "1.16.25" 1980 | source = "registry+https://github.com/rust-lang/crates.io-index" 1981 | checksum = "1457c85ab70a518438b9ac2b0c56037b9f6693060dfb617bbb93c7116e4f0c22" 1982 | dependencies = [ 1983 | "aes-gcm-siv", 1984 | "base64 0.21.7", 1985 | "bincode", 1986 | "bytemuck", 1987 | "byteorder", 1988 | "curve25519-dalek", 1989 | "getrandom 0.1.16", 1990 | "itertools", 1991 | "lazy_static", 1992 | "merlin", 1993 | "num-derive 0.3.3", 1994 | "num-traits", 1995 | "rand 0.7.3", 1996 | "serde", 1997 | "serde_json", 1998 | "sha3 0.9.1", 1999 | "solana-program", 2000 | "solana-sdk", 2001 | "subtle", 2002 | "thiserror", 2003 | "zeroize", 2004 | ] 2005 | 2006 | [[package]] 2007 | name = "spl-associated-token-account" 2008 | version = "1.1.3" 2009 | source = "registry+https://github.com/rust-lang/crates.io-index" 2010 | checksum = "978dba3bcbe88d0c2c58366c254d9ea41c5f73357e72fc0bdee4d6b5fc99c8f4" 2011 | dependencies = [ 2012 | "assert_matches", 2013 | "borsh 0.9.3", 2014 | "num-derive 0.3.3", 2015 | "num-traits", 2016 | "solana-program", 2017 | "spl-token 3.5.0", 2018 | "spl-token-2022 0.6.1", 2019 | "thiserror", 2020 | ] 2021 | 2022 | [[package]] 2023 | name = "spl-associated-token-account" 2024 | version = "2.2.0" 2025 | source = "registry+https://github.com/rust-lang/crates.io-index" 2026 | checksum = "385e31c29981488f2820b2022d8e731aae3b02e6e18e2fd854e4c9a94dc44fc3" 2027 | dependencies = [ 2028 | "assert_matches", 2029 | "borsh 0.10.3", 2030 | "num-derive 0.4.2", 2031 | "num-traits", 2032 | "solana-program", 2033 | "spl-token 4.0.0", 2034 | "spl-token-2022 0.9.0", 2035 | "thiserror", 2036 | ] 2037 | 2038 | [[package]] 2039 | name = "spl-discriminator" 2040 | version = "0.1.0" 2041 | source = "registry+https://github.com/rust-lang/crates.io-index" 2042 | checksum = "cce5d563b58ef1bb2cdbbfe0dfb9ffdc24903b10ae6a4df2d8f425ece375033f" 2043 | dependencies = [ 2044 | "bytemuck", 2045 | "solana-program", 2046 | "spl-discriminator-derive", 2047 | ] 2048 | 2049 | [[package]] 2050 | name = "spl-discriminator-derive" 2051 | version = "0.1.2" 2052 | source = "registry+https://github.com/rust-lang/crates.io-index" 2053 | checksum = "07fd7858fc4ff8fb0e34090e41d7eb06a823e1057945c26d480bfc21d2338a93" 2054 | dependencies = [ 2055 | "quote", 2056 | "spl-discriminator-syn", 2057 | "syn 2.0.66", 2058 | ] 2059 | 2060 | [[package]] 2061 | name = "spl-discriminator-syn" 2062 | version = "0.1.2" 2063 | source = "registry+https://github.com/rust-lang/crates.io-index" 2064 | checksum = "18fea7be851bd98d10721782ea958097c03a0c2a07d8d4997041d0ece6319a63" 2065 | dependencies = [ 2066 | "proc-macro2", 2067 | "quote", 2068 | "sha2 0.10.8", 2069 | "syn 2.0.66", 2070 | "thiserror", 2071 | ] 2072 | 2073 | [[package]] 2074 | name = "spl-memo" 2075 | version = "3.0.1" 2076 | source = "registry+https://github.com/rust-lang/crates.io-index" 2077 | checksum = "bd0dc6f70db6bacea7ff25870b016a65ba1d1b6013536f08e4fd79a8f9005325" 2078 | dependencies = [ 2079 | "solana-program", 2080 | ] 2081 | 2082 | [[package]] 2083 | name = "spl-memo" 2084 | version = "4.0.0" 2085 | source = "registry+https://github.com/rust-lang/crates.io-index" 2086 | checksum = "f0f180b03318c3dbab3ef4e1e4d46d5211ae3c780940dd0a28695aba4b59a75a" 2087 | dependencies = [ 2088 | "solana-program", 2089 | ] 2090 | 2091 | [[package]] 2092 | name = "spl-pod" 2093 | version = "0.1.0" 2094 | source = "registry+https://github.com/rust-lang/crates.io-index" 2095 | checksum = "2881dddfca792737c0706fa0175345ab282b1b0879c7d877bad129645737c079" 2096 | dependencies = [ 2097 | "borsh 0.10.3", 2098 | "bytemuck", 2099 | "solana-program", 2100 | "solana-zk-token-sdk", 2101 | "spl-program-error", 2102 | ] 2103 | 2104 | [[package]] 2105 | name = "spl-program-error" 2106 | version = "0.3.0" 2107 | source = "registry+https://github.com/rust-lang/crates.io-index" 2108 | checksum = "249e0318493b6bcf27ae9902600566c689b7dfba9f1bdff5893e92253374e78c" 2109 | dependencies = [ 2110 | "num-derive 0.4.2", 2111 | "num-traits", 2112 | "solana-program", 2113 | "spl-program-error-derive", 2114 | "thiserror", 2115 | ] 2116 | 2117 | [[package]] 2118 | name = "spl-program-error-derive" 2119 | version = "0.3.2" 2120 | source = "registry+https://github.com/rust-lang/crates.io-index" 2121 | checksum = "1845dfe71fd68f70382232742e758557afe973ae19e6c06807b2c30f5d5cb474" 2122 | dependencies = [ 2123 | "proc-macro2", 2124 | "quote", 2125 | "sha2 0.10.8", 2126 | "syn 2.0.66", 2127 | ] 2128 | 2129 | [[package]] 2130 | name = "spl-tlv-account-resolution" 2131 | version = "0.4.0" 2132 | source = "registry+https://github.com/rust-lang/crates.io-index" 2133 | checksum = "062e148d3eab7b165582757453632ffeef490c02c86a48bfdb4988f63eefb3b9" 2134 | dependencies = [ 2135 | "bytemuck", 2136 | "solana-program", 2137 | "spl-discriminator", 2138 | "spl-pod", 2139 | "spl-program-error", 2140 | "spl-type-length-value", 2141 | ] 2142 | 2143 | [[package]] 2144 | name = "spl-token" 2145 | version = "3.5.0" 2146 | source = "registry+https://github.com/rust-lang/crates.io-index" 2147 | checksum = "8e85e168a785e82564160dcb87b2a8e04cee9bfd1f4d488c729d53d6a4bd300d" 2148 | dependencies = [ 2149 | "arrayref", 2150 | "bytemuck", 2151 | "num-derive 0.3.3", 2152 | "num-traits", 2153 | "num_enum 0.5.11", 2154 | "solana-program", 2155 | "thiserror", 2156 | ] 2157 | 2158 | [[package]] 2159 | name = "spl-token" 2160 | version = "4.0.0" 2161 | source = "registry+https://github.com/rust-lang/crates.io-index" 2162 | checksum = "08459ba1b8f7c1020b4582c4edf0f5c7511a5e099a7a97570c9698d4f2337060" 2163 | dependencies = [ 2164 | "arrayref", 2165 | "bytemuck", 2166 | "num-derive 0.3.3", 2167 | "num-traits", 2168 | "num_enum 0.6.1", 2169 | "solana-program", 2170 | "thiserror", 2171 | ] 2172 | 2173 | [[package]] 2174 | name = "spl-token-2022" 2175 | version = "0.6.1" 2176 | source = "registry+https://github.com/rust-lang/crates.io-index" 2177 | checksum = "0043b590232c400bad5ee9eb983ced003d15163c4c5d56b090ac6d9a57457b47" 2178 | dependencies = [ 2179 | "arrayref", 2180 | "bytemuck", 2181 | "num-derive 0.3.3", 2182 | "num-traits", 2183 | "num_enum 0.5.11", 2184 | "solana-program", 2185 | "solana-zk-token-sdk", 2186 | "spl-memo 3.0.1", 2187 | "spl-token 3.5.0", 2188 | "thiserror", 2189 | ] 2190 | 2191 | [[package]] 2192 | name = "spl-token-2022" 2193 | version = "0.9.0" 2194 | source = "registry+https://github.com/rust-lang/crates.io-index" 2195 | checksum = "e4abf34a65ba420584a0c35f3903f8d727d1f13ababbdc3f714c6b065a686e86" 2196 | dependencies = [ 2197 | "arrayref", 2198 | "bytemuck", 2199 | "num-derive 0.4.2", 2200 | "num-traits", 2201 | "num_enum 0.7.2", 2202 | "solana-program", 2203 | "solana-zk-token-sdk", 2204 | "spl-memo 4.0.0", 2205 | "spl-pod", 2206 | "spl-token 4.0.0", 2207 | "spl-token-metadata-interface", 2208 | "spl-transfer-hook-interface", 2209 | "spl-type-length-value", 2210 | "thiserror", 2211 | ] 2212 | 2213 | [[package]] 2214 | name = "spl-token-metadata-interface" 2215 | version = "0.2.0" 2216 | source = "registry+https://github.com/rust-lang/crates.io-index" 2217 | checksum = "4c16ce3ba6979645fb7627aa1e435576172dd63088dc7848cb09aa331fa1fe4f" 2218 | dependencies = [ 2219 | "borsh 0.10.3", 2220 | "solana-program", 2221 | "spl-discriminator", 2222 | "spl-pod", 2223 | "spl-program-error", 2224 | "spl-type-length-value", 2225 | ] 2226 | 2227 | [[package]] 2228 | name = "spl-transfer-hook-interface" 2229 | version = "0.3.0" 2230 | source = "registry+https://github.com/rust-lang/crates.io-index" 2231 | checksum = "051d31803f873cabe71aec3c1b849f35248beae5d19a347d93a5c9cccc5d5a9b" 2232 | dependencies = [ 2233 | "arrayref", 2234 | "bytemuck", 2235 | "solana-program", 2236 | "spl-discriminator", 2237 | "spl-pod", 2238 | "spl-program-error", 2239 | "spl-tlv-account-resolution", 2240 | "spl-type-length-value", 2241 | ] 2242 | 2243 | [[package]] 2244 | name = "spl-type-length-value" 2245 | version = "0.3.0" 2246 | source = "registry+https://github.com/rust-lang/crates.io-index" 2247 | checksum = "a468e6f6371f9c69aae760186ea9f1a01c2908351b06a5e0026d21cfc4d7ecac" 2248 | dependencies = [ 2249 | "bytemuck", 2250 | "solana-program", 2251 | "spl-discriminator", 2252 | "spl-pod", 2253 | "spl-program-error", 2254 | ] 2255 | 2256 | [[package]] 2257 | name = "strsim" 2258 | version = "0.11.1" 2259 | source = "registry+https://github.com/rust-lang/crates.io-index" 2260 | checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" 2261 | 2262 | [[package]] 2263 | name = "subtle" 2264 | version = "2.4.1" 2265 | source = "registry+https://github.com/rust-lang/crates.io-index" 2266 | checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" 2267 | 2268 | [[package]] 2269 | name = "syn" 2270 | version = "1.0.109" 2271 | source = "registry+https://github.com/rust-lang/crates.io-index" 2272 | checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" 2273 | dependencies = [ 2274 | "proc-macro2", 2275 | "quote", 2276 | "unicode-ident", 2277 | ] 2278 | 2279 | [[package]] 2280 | name = "syn" 2281 | version = "2.0.66" 2282 | source = "registry+https://github.com/rust-lang/crates.io-index" 2283 | checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5" 2284 | dependencies = [ 2285 | "proc-macro2", 2286 | "quote", 2287 | "unicode-ident", 2288 | ] 2289 | 2290 | [[package]] 2291 | name = "termcolor" 2292 | version = "1.4.1" 2293 | source = "registry+https://github.com/rust-lang/crates.io-index" 2294 | checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" 2295 | dependencies = [ 2296 | "winapi-util", 2297 | ] 2298 | 2299 | [[package]] 2300 | name = "thiserror" 2301 | version = "1.0.61" 2302 | source = "registry+https://github.com/rust-lang/crates.io-index" 2303 | checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" 2304 | dependencies = [ 2305 | "thiserror-impl", 2306 | ] 2307 | 2308 | [[package]] 2309 | name = "thiserror-impl" 2310 | version = "1.0.61" 2311 | source = "registry+https://github.com/rust-lang/crates.io-index" 2312 | checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" 2313 | dependencies = [ 2314 | "proc-macro2", 2315 | "quote", 2316 | "syn 2.0.66", 2317 | ] 2318 | 2319 | [[package]] 2320 | name = "tiny-bip39" 2321 | version = "0.8.2" 2322 | source = "registry+https://github.com/rust-lang/crates.io-index" 2323 | checksum = "ffc59cb9dfc85bb312c3a78fd6aa8a8582e310b0fa885d5bb877f6dcc601839d" 2324 | dependencies = [ 2325 | "anyhow", 2326 | "hmac 0.8.1", 2327 | "once_cell", 2328 | "pbkdf2 0.4.0", 2329 | "rand 0.7.3", 2330 | "rustc-hash", 2331 | "sha2 0.9.9", 2332 | "thiserror", 2333 | "unicode-normalization", 2334 | "wasm-bindgen", 2335 | "zeroize", 2336 | ] 2337 | 2338 | [[package]] 2339 | name = "tinyvec" 2340 | version = "1.6.0" 2341 | source = "registry+https://github.com/rust-lang/crates.io-index" 2342 | checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" 2343 | dependencies = [ 2344 | "tinyvec_macros", 2345 | ] 2346 | 2347 | [[package]] 2348 | name = "tinyvec_macros" 2349 | version = "0.1.1" 2350 | source = "registry+https://github.com/rust-lang/crates.io-index" 2351 | checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" 2352 | 2353 | [[package]] 2354 | name = "toml" 2355 | version = "0.5.11" 2356 | source = "registry+https://github.com/rust-lang/crates.io-index" 2357 | checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" 2358 | dependencies = [ 2359 | "serde", 2360 | ] 2361 | 2362 | [[package]] 2363 | name = "toml_datetime" 2364 | version = "0.6.6" 2365 | source = "registry+https://github.com/rust-lang/crates.io-index" 2366 | checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" 2367 | 2368 | [[package]] 2369 | name = "toml_edit" 2370 | version = "0.19.15" 2371 | source = "registry+https://github.com/rust-lang/crates.io-index" 2372 | checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" 2373 | dependencies = [ 2374 | "indexmap", 2375 | "toml_datetime", 2376 | "winnow", 2377 | ] 2378 | 2379 | [[package]] 2380 | name = "toml_edit" 2381 | version = "0.21.1" 2382 | source = "registry+https://github.com/rust-lang/crates.io-index" 2383 | checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" 2384 | dependencies = [ 2385 | "indexmap", 2386 | "toml_datetime", 2387 | "winnow", 2388 | ] 2389 | 2390 | [[package]] 2391 | name = "typenum" 2392 | version = "1.17.0" 2393 | source = "registry+https://github.com/rust-lang/crates.io-index" 2394 | checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" 2395 | 2396 | [[package]] 2397 | name = "unicode-ident" 2398 | version = "1.0.12" 2399 | source = "registry+https://github.com/rust-lang/crates.io-index" 2400 | checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" 2401 | 2402 | [[package]] 2403 | name = "unicode-normalization" 2404 | version = "0.1.23" 2405 | source = "registry+https://github.com/rust-lang/crates.io-index" 2406 | checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" 2407 | dependencies = [ 2408 | "tinyvec", 2409 | ] 2410 | 2411 | [[package]] 2412 | name = "unicode-segmentation" 2413 | version = "1.11.0" 2414 | source = "registry+https://github.com/rust-lang/crates.io-index" 2415 | checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" 2416 | 2417 | [[package]] 2418 | name = "universal-hash" 2419 | version = "0.4.1" 2420 | source = "registry+https://github.com/rust-lang/crates.io-index" 2421 | checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" 2422 | dependencies = [ 2423 | "generic-array", 2424 | "subtle", 2425 | ] 2426 | 2427 | [[package]] 2428 | name = "uriparse" 2429 | version = "0.6.4" 2430 | source = "registry+https://github.com/rust-lang/crates.io-index" 2431 | checksum = "0200d0fc04d809396c2ad43f3c95da3582a2556eba8d453c1087f4120ee352ff" 2432 | dependencies = [ 2433 | "fnv", 2434 | "lazy_static", 2435 | ] 2436 | 2437 | [[package]] 2438 | name = "version_check" 2439 | version = "0.9.4" 2440 | source = "registry+https://github.com/rust-lang/crates.io-index" 2441 | checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" 2442 | 2443 | [[package]] 2444 | name = "wasi" 2445 | version = "0.9.0+wasi-snapshot-preview1" 2446 | source = "registry+https://github.com/rust-lang/crates.io-index" 2447 | checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" 2448 | 2449 | [[package]] 2450 | name = "wasi" 2451 | version = "0.11.0+wasi-snapshot-preview1" 2452 | source = "registry+https://github.com/rust-lang/crates.io-index" 2453 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 2454 | 2455 | [[package]] 2456 | name = "wasm-bindgen" 2457 | version = "0.2.92" 2458 | source = "registry+https://github.com/rust-lang/crates.io-index" 2459 | checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" 2460 | dependencies = [ 2461 | "cfg-if", 2462 | "wasm-bindgen-macro", 2463 | ] 2464 | 2465 | [[package]] 2466 | name = "wasm-bindgen-backend" 2467 | version = "0.2.92" 2468 | source = "registry+https://github.com/rust-lang/crates.io-index" 2469 | checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" 2470 | dependencies = [ 2471 | "bumpalo", 2472 | "log", 2473 | "once_cell", 2474 | "proc-macro2", 2475 | "quote", 2476 | "syn 2.0.66", 2477 | "wasm-bindgen-shared", 2478 | ] 2479 | 2480 | [[package]] 2481 | name = "wasm-bindgen-macro" 2482 | version = "0.2.92" 2483 | source = "registry+https://github.com/rust-lang/crates.io-index" 2484 | checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" 2485 | dependencies = [ 2486 | "quote", 2487 | "wasm-bindgen-macro-support", 2488 | ] 2489 | 2490 | [[package]] 2491 | name = "wasm-bindgen-macro-support" 2492 | version = "0.2.92" 2493 | source = "registry+https://github.com/rust-lang/crates.io-index" 2494 | checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" 2495 | dependencies = [ 2496 | "proc-macro2", 2497 | "quote", 2498 | "syn 2.0.66", 2499 | "wasm-bindgen-backend", 2500 | "wasm-bindgen-shared", 2501 | ] 2502 | 2503 | [[package]] 2504 | name = "wasm-bindgen-shared" 2505 | version = "0.2.92" 2506 | source = "registry+https://github.com/rust-lang/crates.io-index" 2507 | checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" 2508 | 2509 | [[package]] 2510 | name = "web-sys" 2511 | version = "0.3.69" 2512 | source = "registry+https://github.com/rust-lang/crates.io-index" 2513 | checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" 2514 | dependencies = [ 2515 | "js-sys", 2516 | "wasm-bindgen", 2517 | ] 2518 | 2519 | [[package]] 2520 | name = "winapi" 2521 | version = "0.3.9" 2522 | source = "registry+https://github.com/rust-lang/crates.io-index" 2523 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 2524 | dependencies = [ 2525 | "winapi-i686-pc-windows-gnu", 2526 | "winapi-x86_64-pc-windows-gnu", 2527 | ] 2528 | 2529 | [[package]] 2530 | name = "winapi-i686-pc-windows-gnu" 2531 | version = "0.4.0" 2532 | source = "registry+https://github.com/rust-lang/crates.io-index" 2533 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 2534 | 2535 | [[package]] 2536 | name = "winapi-util" 2537 | version = "0.1.8" 2538 | source = "registry+https://github.com/rust-lang/crates.io-index" 2539 | checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" 2540 | dependencies = [ 2541 | "windows-sys", 2542 | ] 2543 | 2544 | [[package]] 2545 | name = "winapi-x86_64-pc-windows-gnu" 2546 | version = "0.4.0" 2547 | source = "registry+https://github.com/rust-lang/crates.io-index" 2548 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 2549 | 2550 | [[package]] 2551 | name = "windows-sys" 2552 | version = "0.52.0" 2553 | source = "registry+https://github.com/rust-lang/crates.io-index" 2554 | checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" 2555 | dependencies = [ 2556 | "windows-targets", 2557 | ] 2558 | 2559 | [[package]] 2560 | name = "windows-targets" 2561 | version = "0.52.5" 2562 | source = "registry+https://github.com/rust-lang/crates.io-index" 2563 | checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" 2564 | dependencies = [ 2565 | "windows_aarch64_gnullvm", 2566 | "windows_aarch64_msvc", 2567 | "windows_i686_gnu", 2568 | "windows_i686_gnullvm", 2569 | "windows_i686_msvc", 2570 | "windows_x86_64_gnu", 2571 | "windows_x86_64_gnullvm", 2572 | "windows_x86_64_msvc", 2573 | ] 2574 | 2575 | [[package]] 2576 | name = "windows_aarch64_gnullvm" 2577 | version = "0.52.5" 2578 | source = "registry+https://github.com/rust-lang/crates.io-index" 2579 | checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" 2580 | 2581 | [[package]] 2582 | name = "windows_aarch64_msvc" 2583 | version = "0.52.5" 2584 | source = "registry+https://github.com/rust-lang/crates.io-index" 2585 | checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" 2586 | 2587 | [[package]] 2588 | name = "windows_i686_gnu" 2589 | version = "0.52.5" 2590 | source = "registry+https://github.com/rust-lang/crates.io-index" 2591 | checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" 2592 | 2593 | [[package]] 2594 | name = "windows_i686_gnullvm" 2595 | version = "0.52.5" 2596 | source = "registry+https://github.com/rust-lang/crates.io-index" 2597 | checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" 2598 | 2599 | [[package]] 2600 | name = "windows_i686_msvc" 2601 | version = "0.52.5" 2602 | source = "registry+https://github.com/rust-lang/crates.io-index" 2603 | checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" 2604 | 2605 | [[package]] 2606 | name = "windows_x86_64_gnu" 2607 | version = "0.52.5" 2608 | source = "registry+https://github.com/rust-lang/crates.io-index" 2609 | checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" 2610 | 2611 | [[package]] 2612 | name = "windows_x86_64_gnullvm" 2613 | version = "0.52.5" 2614 | source = "registry+https://github.com/rust-lang/crates.io-index" 2615 | checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" 2616 | 2617 | [[package]] 2618 | name = "windows_x86_64_msvc" 2619 | version = "0.52.5" 2620 | source = "registry+https://github.com/rust-lang/crates.io-index" 2621 | checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" 2622 | 2623 | [[package]] 2624 | name = "winnow" 2625 | version = "0.5.40" 2626 | source = "registry+https://github.com/rust-lang/crates.io-index" 2627 | checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" 2628 | dependencies = [ 2629 | "memchr", 2630 | ] 2631 | 2632 | [[package]] 2633 | name = "zerocopy" 2634 | version = "0.7.34" 2635 | source = "registry+https://github.com/rust-lang/crates.io-index" 2636 | checksum = "ae87e3fcd617500e5d106f0380cf7b77f3c6092aae37191433159dda23cfb087" 2637 | dependencies = [ 2638 | "zerocopy-derive", 2639 | ] 2640 | 2641 | [[package]] 2642 | name = "zerocopy-derive" 2643 | version = "0.7.34" 2644 | source = "registry+https://github.com/rust-lang/crates.io-index" 2645 | checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b" 2646 | dependencies = [ 2647 | "proc-macro2", 2648 | "quote", 2649 | "syn 2.0.66", 2650 | ] 2651 | 2652 | [[package]] 2653 | name = "zeroize" 2654 | version = "1.3.0" 2655 | source = "registry+https://github.com/rust-lang/crates.io-index" 2656 | checksum = "4756f7db3f7b5574938c3eb1c117038b8e07f95ee6718c0efad4ac21508f1efd" 2657 | dependencies = [ 2658 | "zeroize_derive", 2659 | ] 2660 | 2661 | [[package]] 2662 | name = "zeroize_derive" 2663 | version = "1.4.2" 2664 | source = "registry+https://github.com/rust-lang/crates.io-index" 2665 | checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" 2666 | dependencies = [ 2667 | "proc-macro2", 2668 | "quote", 2669 | "syn 2.0.66", 2670 | ] 2671 | --------------------------------------------------------------------------------