This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
search_path="." | |
find "$search_path" \ | |
-type d -name "node_modules" -prune -o \ | |
-type f \( -name "package.json" -o -name "package-lock.json" \) \ | |
-exec sh -c ' | |
file="$1" | |
search_string='solana\\/web3.*1\.95' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const opensslPrefix = new TextEncoder().encode("Salted__"); | |
async function encryptBuffer(data: Uint8Array, password: string) { | |
const salt = crypto.getRandomValues(new Uint8Array(8)); | |
const { iv, key } = await passwordToKeyAndIV(password, salt); | |
const encrypted = await crypto.subtle.encrypt( | |
{ name: "AES-CBC", iv: iv }, | |
key, | |
data |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[package] | |
name = "secrets_compile" | |
version = "0.1.0" | |
edition = "2021" | |
[dependencies] | |
aes-gcm = "0.10.3" | |
base64 = "0.21.5" | |
rand = "0.8.5" | |
reqwest = "0.11.22" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use mpl_bubblegum::accounts::TreeConfig; | |
use solana_sdk::{bs58, instruction::AccountMeta, instruction::Instruction, pubkey::Pubkey}; | |
#[derive(serde::Deserialize)] | |
struct HeliusResponse<T> { | |
result: T, | |
} | |
#[derive(serde::Deserialize)] | |
struct HeliusCompression { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { WalletConnectWalletAdapter } from "@solana/wallet-adapter-walletconnect"; | |
const adapter = new WalletConnectWalletAdapter({ | |
network: "mainnet-beta" as any, | |
options: { | |
projectId: "<id>", | |
}, | |
}); | |
adapter.connect(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const xs = [...Array(10000).keys()]; | |
const prom = (n) => Promise.resolve(n); | |
(async () => { | |
console.time("reduce"); | |
const t1 = xs.reduce( | |
(memo, n) => (n % 2 === 0 ? [...memo, prom(n)] : memo), | |
[] | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use solana_sdk::{signature::Signer, signer::keypair::Keypair, transaction::Transaction}; | |
#[derive(serde::Deserialize)] | |
struct Env { | |
cluster: String, | |
admin_wallet: String, | |
} | |
//pubkey: E61KAqVnsEq3N6ApArVoYp1FMBqJKDDBcijDe6tmEHte, | |
//let signature: [u8; 64] = [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const web3 = require("@solana/web3.js"); | |
const { Token, TOKEN_PROGRAM_ID } = require("@solana/spl-token"); | |
const { MINT_ID } = process.env; | |
const connection = new web3.Connection( | |
web3.clusterApiUrl("mainnet-beta"), | |
"confirmed" | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
background-color: transparent; | |
background-image: radial-gradient(transparent 1px,black 1px); | |
background-size: 5px 5px; | |
opacity: 0.9; | |
background-position: 100% 100%; | |
transform: translate(5px, 5px); |
NewerOlder