repo_id stringclasses 563
values | file_path stringlengths 40 166 | content stringlengths 1 2.94M | __index_level_0__ int64 0 0 |
|---|---|---|---|
solana_public_repos/Lightprotocol/light-protocol/circuit-lib/verifier/src | solana_public_repos/Lightprotocol/light-protocol/circuit-lib/verifier/src/verifying_keys/inclusion_26_1.rs | // This file is generated by xtask. Do not edit it manually.
use groth16_solana::groth16::Groth16Verifyingkey;
pub const VERIFYINGKEY: Groth16Verifyingkey = Groth16Verifyingkey {
nr_pubinputs: 2usize,
vk_alpha_g1: [
46u8, 130u8, 56u8, 121u8, 255u8, 184u8, 21u8, 1u8, 85u8, 53u8, 76u8, 143u8, 151u8, 102u... | 0 |
solana_public_repos/Lightprotocol/light-protocol/circuit-lib/verifier/src | solana_public_repos/Lightprotocol/light-protocol/circuit-lib/verifier/src/verifying_keys/update_26_500.rs | // This file is generated by xtask. Do not edit it manually.
use groth16_solana::groth16::Groth16Verifyingkey;
pub const VERIFYINGKEY: Groth16Verifyingkey = Groth16Verifyingkey {
nr_pubinputs: 1usize,
vk_alpha_g1: [
12u8, 48u8, 3u8, 6u8, 214u8, 235u8, 213u8, 216u8, 250u8, 163u8, 162u8, 30u8, 42u8, 252u... | 0 |
solana_public_repos/Lightprotocol/light-protocol/circuit-lib/verifier/src | solana_public_repos/Lightprotocol/light-protocol/circuit-lib/verifier/src/verifying_keys/update_26_1.rs | // This file is generated by xtask. Do not edit it manually.
use groth16_solana::groth16::Groth16Verifyingkey;
pub const VERIFYINGKEY: Groth16Verifyingkey = Groth16Verifyingkey {
nr_pubinputs: 1usize,
vk_alpha_g1: [
3u8, 41u8, 50u8, 176u8, 101u8, 160u8, 197u8, 88u8, 19u8, 231u8, 141u8, 33u8, 201u8, 22u... | 0 |
solana_public_repos/Lightprotocol/light-protocol/circuit-lib/verifier/src | solana_public_repos/Lightprotocol/light-protocol/circuit-lib/verifier/src/verifying_keys/address_append_26_1000.rs | // This file is generated by xtask. Do not edit it manually.
use groth16_solana::groth16::Groth16Verifyingkey;
pub const VERIFYINGKEY: Groth16Verifyingkey = Groth16Verifyingkey {
nr_pubinputs: 1usize,
vk_alpha_g1: [
7u8, 122u8, 121u8, 108u8, 149u8, 42u8, 9u8, 39u8, 49u8, 158u8, 55u8, 151u8, 237u8, 112u... | 0 |
solana_public_repos/Lightprotocol/light-protocol/circuit-lib/verifier/src | solana_public_repos/Lightprotocol/light-protocol/circuit-lib/verifier/src/verifying_keys/non_inclusion_26_2.rs | // This file is generated by xtask. Do not edit it manually.
use groth16_solana::groth16::Groth16Verifyingkey;
pub const VERIFYINGKEY: Groth16Verifyingkey = Groth16Verifyingkey {
nr_pubinputs: 4usize,
vk_alpha_g1: [
38u8, 43u8, 35u8, 139u8, 97u8, 142u8, 190u8, 63u8, 118u8, 176u8, 225u8, 37u8, 108u8, 0u... | 0 |
solana_public_repos/Lightprotocol/light-protocol/circuit-lib/verifier/src | solana_public_repos/Lightprotocol/light-protocol/circuit-lib/verifier/src/verifying_keys/address_append_40_250.rs | // This file is generated by xtask. Do not edit it manually.
use groth16_solana::groth16::Groth16Verifyingkey;
pub const VERIFYINGKEY: Groth16Verifyingkey = Groth16Verifyingkey {
nr_pubinputs: 1usize,
vk_alpha_g1: [
15u8, 81u8, 245u8, 105u8, 58u8, 211u8, 139u8, 222u8, 62u8, 255u8, 219u8, 64u8, 246u8,
... | 0 |
solana_public_repos/Lightprotocol/light-protocol/circuit-lib/verifier/src | solana_public_repos/Lightprotocol/light-protocol/circuit-lib/verifier/src/verifying_keys/append_with_subtrees_26_1.rs | // This file is generated by xtask. Do not edit it manually.
use groth16_solana::groth16::Groth16Verifyingkey;
pub const VERIFYINGKEY: Groth16Verifyingkey = Groth16Verifyingkey {
nr_pubinputs: 1usize,
vk_alpha_g1: [
4u8, 35u8, 179u8, 5u8, 245u8, 113u8, 253u8, 229u8, 166u8, 65u8, 122u8, 30u8, 105u8, 207... | 0 |
solana_public_repos/Lightprotocol/light-protocol/circuit-lib/verifier/src | solana_public_repos/Lightprotocol/light-protocol/circuit-lib/verifier/src/verifying_keys/address_append_40_10.rs | // This file is generated by xtask. Do not edit it manually.
use groth16_solana::groth16::Groth16Verifyingkey;
pub const VERIFYINGKEY: Groth16Verifyingkey = Groth16Verifyingkey {
nr_pubinputs: 1usize,
vk_alpha_g1: [
28u8, 86u8, 211u8, 55u8, 223u8, 160u8, 165u8, 232u8, 135u8, 129u8, 171u8, 7u8, 33u8, 13... | 0 |
solana_public_repos/Lightprotocol/light-protocol/circuit-lib/verifier/src | solana_public_repos/Lightprotocol/light-protocol/circuit-lib/verifier/src/verifying_keys/address_append_26_100.rs | // This file is generated by xtask. Do not edit it manually.
use groth16_solana::groth16::Groth16Verifyingkey;
pub const VERIFYINGKEY: Groth16Verifyingkey = Groth16Verifyingkey {
nr_pubinputs: 1usize,
vk_alpha_g1: [
37u8, 145u8, 36u8, 88u8, 17u8, 223u8, 165u8, 224u8, 83u8, 174u8, 53u8, 50u8, 151u8, 153... | 0 |
solana_public_repos/Lightprotocol/light-protocol | solana_public_repos/Lightprotocol/light-protocol/cli/.npmignore |
bin/proving-keys/append-with-proofs_26_10.key
bin/proving-keys/append-with-proofs_26_10.vkey
bin/proving-keys/append-with-subtrees_26_10.key
bin/proving-keys/append-with-subtrees_26_10.vkey
bin/proving-keys/update_26_10.key
bin/proving-keys/update_26_10.vkey
bin/proving-keys/address-append_26_1.vkey
bin/proving-keys/a... | 0 |
solana_public_repos/Lightprotocol/light-protocol | solana_public_repos/Lightprotocol/light-protocol/cli/pnpm-lock.yaml | lockfileVersion: '6.0'
settings:
autoInstallPeers: true
excludeLinksFromLockfile: false
dependencies:
'@oclif/core':
specifier: ^2.15
version: 2.15.0(@types/node@16.18.61)(typescript@4.9.5)
'@oclif/plugin-autocomplete':
specifier: ^2.3.8
version: 2.3.10(@types/node@16.18.61)(typescript@4.9.5)
... | 0 |
solana_public_repos/Lightprotocol/light-protocol | solana_public_repos/Lightprotocol/light-protocol/cli/.yarnrc.yml | nodeLinker: node-modules
| 0 |
solana_public_repos/Lightprotocol/light-protocol | solana_public_repos/Lightprotocol/light-protocol/cli/config.json | {
"solanaRpcUrl": "http://127.0.0.1:8899"
} | 0 |
solana_public_repos/Lightprotocol/light-protocol | solana_public_repos/Lightprotocol/light-protocol/cli/.eslintrc | {
"root": true,
"env": {
"node": true,
"browser": true
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2021,
"sourceType": "module"
}
}
| 0 |
solana_public_repos/Lightprotocol/light-protocol | solana_public_repos/Lightprotocol/light-protocol/cli/.editorconfig | root = true
[*]
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.md]
trim_trailing_whitespace = false
| 0 |
solana_public_repos/Lightprotocol/light-protocol | solana_public_repos/Lightprotocol/light-protocol/cli/tsconfig.test.json | {
"extends": "./tsconfig",
"compilerOptions": {
"esModuleInterop": true,
"noEmit": true,
"rootDirs": ["src", "test"]
},
"include": ["./src/**/*", "./test/**/*"]
}
| 0 |
solana_public_repos/Lightprotocol/light-protocol | solana_public_repos/Lightprotocol/light-protocol/cli/package.json | {
"name": "@lightprotocol/zk-compression-cli",
"version": "0.22.0",
"description": "ZK Compression: Secure Scaling on Solana",
"maintainers": [
{
"name": "Light Protocol maintainers",
"email": "friends@lightprotocol.com"
}
],
"bin": {
"light": "./test_bin/run"
},
"license": "Apac... | 0 |
solana_public_repos/Lightprotocol/light-protocol | solana_public_repos/Lightprotocol/light-protocol/cli/.mocharc.json | {
"require": [
"test/helpers/init.js",
"ts-node/register"
],
"watch-extensions": [
"ts"
],
"recursive": true,
"reporter": "spec",
"timeout": 600000
} | 0 |
solana_public_repos/Lightprotocol/light-protocol | solana_public_repos/Lightprotocol/light-protocol/cli/tsconfig.json | {
"compilerOptions": {
"declaration": true,
"esModuleInterop": true,
"importHelpers": true,
"module": "commonjs",
"outDir": "dist",
"rootDirs": ["src"],
"strict": true,
"target": "ES2020",
"skipLibCheck": true,
"resolveJsonModule": true
},
"include": ["src/**/*"]
}
| 0 |
solana_public_repos/Lightprotocol/light-protocol | solana_public_repos/Lightprotocol/light-protocol/cli/.eslintignore | node_modules
test_bin
test/**/*.js
scripts
| 0 |
solana_public_repos/Lightprotocol/light-protocol | solana_public_repos/Lightprotocol/light-protocol/cli/.eslintrc.json | {
"root": true,
"ignorePatterns": ["node_modules", "dist", "bin", "accounts", "test"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": ["./tsconfig.json", "./tsconfig.test.json"]
},
"plugins": [
"@typescript-eslint"
],
"extends": [
"eslint:rec... | 0 |
solana_public_repos/Lightprotocol/light-protocol/cli/test | solana_public_repos/Lightprotocol/light-protocol/cli/test/utils/index.test.ts | import * as fs from "fs";
import * as os from "os";
import path from "path";
import { assert, expect } from "chai";
import "mocha";
import { getSolanaArgs } from "../../src/utils";
describe("Init test env utils", () => {
let tempdir: string;
before(async () => {
// Ensure that programs (as .so files) are goi... | 0 |
solana_public_repos/Lightprotocol/light-protocol/cli/test/commands | solana_public_repos/Lightprotocol/light-protocol/cli/test/commands/mint-to/index.test.ts | import { expect, test } from "@oclif/test";
import { before } from "mocha";
import { initTestEnvIfNeeded } from "../../../src/utils/initTestEnv";
import { defaultSolanaWalletKeypair } from "../../../src";
import { Keypair } from "@solana/web3.js";
import { createTestMint, requestAirdrop } from "../../helpers/helpers";
... | 0 |
solana_public_repos/Lightprotocol/light-protocol/cli/test/commands | solana_public_repos/Lightprotocol/light-protocol/cli/test/commands/create-mint/index.test.ts | import { expect, test } from "@oclif/test";
import { initTestEnvIfNeeded } from "../../../src/utils/initTestEnv";
import { defaultSolanaWalletKeypair } from "../../../src";
import { requestAirdrop } from "../../helpers/helpers";
import { Keypair } from "@solana/web3.js";
describe("create-mint", () => {
let mintAuthor... | 0 |
solana_public_repos/Lightprotocol/light-protocol/cli/test/commands | solana_public_repos/Lightprotocol/light-protocol/cli/test/commands/config/index.test.ts | import { expect, test } from "@oclif/test";
import * as fs from "fs";
import { initTestEnvIfNeeded } from "../../../src/utils/initTestEnv";
import { DEFAULT_CONFIG } from "../../../src/utils/constants";
describe("config", () => {
before(async () => {
await initTestEnvIfNeeded();
});
test
.stdout()
.c... | 0 |
solana_public_repos/Lightprotocol/light-protocol/cli/test/commands | solana_public_repos/Lightprotocol/light-protocol/cli/test/commands/decompress-sol/index.test.ts | import { expect, test } from "@oclif/test";
import { initTestEnvIfNeeded } from "../../../src/utils/initTestEnv";
import { defaultSolanaWalletKeypair } from "../../../src";
import { requestAirdrop } from "../../helpers/helpers";
describe("decompress-sol", () => {
const keypair = defaultSolanaWalletKeypair();
const... | 0 |
solana_public_repos/Lightprotocol/light-protocol/cli/test/commands | solana_public_repos/Lightprotocol/light-protocol/cli/test/commands/create-token-pool/index.test.ts | import { expect, test } from "@oclif/test";
import { initTestEnvIfNeeded } from "../../../src/utils/initTestEnv";
import { defaultSolanaWalletKeypair } from "../../../src";
import { createTestSplMint, requestAirdrop } from "../../helpers/helpers";
import { Keypair } from "@solana/web3.js";
import { getTestRpc } from "@... | 0 |
solana_public_repos/Lightprotocol/light-protocol/cli/test/commands | solana_public_repos/Lightprotocol/light-protocol/cli/test/commands/approve-and-mint-to/index.test.ts | import { expect, test } from "@oclif/test";
import { before } from "mocha";
import { initTestEnvIfNeeded } from "../../../src/utils/initTestEnv";
import { defaultSolanaWalletKeypair } from "../../../src";
import { Keypair } from "@solana/web3.js";
import { createTestSplMint, requestAirdrop } from "../../helpers/helpers... | 0 |
solana_public_repos/Lightprotocol/light-protocol/cli/test/commands | solana_public_repos/Lightprotocol/light-protocol/cli/test/commands/transfer/index.test.ts | import { expect, test } from "@oclif/test";
import { initTestEnvIfNeeded } from "../../../src/utils/initTestEnv";
import { defaultSolanaWalletKeypair } from "../../../src";
import { Keypair } from "@solana/web3.js";
import {
createTestMint,
requestAirdrop,
testMintTo,
} from "../../helpers/helpers";
describe("tr... | 0 |
solana_public_repos/Lightprotocol/light-protocol/cli/test/commands | solana_public_repos/Lightprotocol/light-protocol/cli/test/commands/balance/index.test.ts | import { expect, test } from "@oclif/test";
import { initTestEnvIfNeeded } from "../../../src/utils/initTestEnv";
import { defaultSolanaWalletKeypair } from "../../../src";
import { Keypair } from "@solana/web3.js";
import {
createTestMint,
requestAirdrop,
testMintTo,
} from "../../helpers/helpers";
describe("Ge... | 0 |
solana_public_repos/Lightprotocol/light-protocol/cli/test/commands | solana_public_repos/Lightprotocol/light-protocol/cli/test/commands/decompress-spl/index.test.ts | import { expect, test } from "@oclif/test";
import { initTestEnvIfNeeded } from "../../../src/utils/initTestEnv";
import { defaultSolanaWalletKeypair } from "../../../src";
import { Keypair } from "@solana/web3.js";
import {
createTestMint,
requestAirdrop,
testMintTo,
} from "../../helpers/helpers";
describe("de... | 0 |
solana_public_repos/Lightprotocol/light-protocol/cli/test/commands | solana_public_repos/Lightprotocol/light-protocol/cli/test/commands/test-validator/index.test.ts | import { expect } from "@oclif/test";
import { defaultSolanaWalletKeypair, programsDirPath } from "../../../src";
import { Connection, Keypair } from "@solana/web3.js";
import * as path from "path";
import * as fs from "fs";
import { killProcess } from "../../../src/utils/process";
import { exec as execCb } from "child... | 0 |
solana_public_repos/Lightprotocol/light-protocol/cli/test/commands | solana_public_repos/Lightprotocol/light-protocol/cli/test/commands/compress-spl/index.test.ts | import { expect, test } from "@oclif/test";
import { initTestEnvIfNeeded } from "../../../src/utils/initTestEnv";
import { defaultSolanaWalletKeypair } from "../../../src";
import { Keypair } from "@solana/web3.js";
import {
createTestMint,
requestAirdrop,
testMintTo,
} from "../../helpers/helpers";
describe("co... | 0 |
solana_public_repos/Lightprotocol/light-protocol/cli/test/commands | solana_public_repos/Lightprotocol/light-protocol/cli/test/commands/merge-token-accounts/index.test.ts | import { expect, test } from "@oclif/test";
import { initTestEnvIfNeeded } from "../../../src/utils/initTestEnv";
import { defaultSolanaWalletKeypair } from "../../../src";
import { Keypair } from "@solana/web3.js";
import {
createTestMint,
requestAirdrop,
testMintTo,
} from "../../helpers/helpers";
import { rpc ... | 0 |
solana_public_repos/Lightprotocol/light-protocol/cli/test/commands | solana_public_repos/Lightprotocol/light-protocol/cli/test/commands/compress-sol/index.test.ts | import { expect, test } from "@oclif/test";
import { initTestEnvIfNeeded } from "../../../src/utils/initTestEnv";
import { defaultSolanaWalletKeypair } from "../../../src";
import { requestAirdrop } from "../../helpers/helpers";
describe("compress-sol", () => {
const keypair = defaultSolanaWalletKeypair();
const t... | 0 |
solana_public_repos/Lightprotocol/light-protocol/cli/test | solana_public_repos/Lightprotocol/light-protocol/cli/test/helpers/helpers.ts | import {
Connection,
Keypair,
PublicKey,
Signer,
SystemProgram,
} from "@solana/web3.js";
import { getPayer, getSolanaRpcUrl } from "../../src";
import {
Rpc,
buildAndSignTx,
confirmTx,
dedupeSigner,
getTestRpc,
sendAndConfirmTx,
} from "@lightprotocol/stateless.js";
import { createMint, mintTo } ... | 0 |
solana_public_repos/Lightprotocol/light-protocol/cli/test | solana_public_repos/Lightprotocol/light-protocol/cli/test/helpers/init.js | const { execSync } = require("child_process");
const path = require("path");
process.env.TS_NODE_PROJECT = path.resolve("tsconfig.test.json");
process.env.NODE_ENV = "development";
global.oclif = global.oclif || {};
global.oclif.columns = 80;
| 0 |
solana_public_repos/Lightprotocol/light-protocol/cli | solana_public_repos/Lightprotocol/light-protocol/cli/accounts/nullifier_queue_pubkey_nfq1NvQDJ2GEgnS8zt9prAe8rjjpAW1zFkrvZoBR148.json | {"pubkey":"nfq1NvQDJ2GEgnS8zt9prAe8rjjpAW1zFkrvZoBR148","account":{"lamports":9626515200,"data":["pMhsPlc/e0EP2NRH06M+VSyY8R8Xdq4y4g7ChxQIOUQPXTDG51dI2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAXwAAAAAAAAAAAAAAAAAAAP////////////////////8AAAAAAAAAAA0BySirRd... | 0 |
solana_public_repos/Lightprotocol/light-protocol/cli | solana_public_repos/Lightprotocol/light-protocol/cli/accounts/address_merkle_tree_queue_aq1S9z4reTSQAdgWHGD2zDaS39sjGrAxbR31vxJ2F4F.json | {"pubkey":"aq1S9z4reTSQAdgWHGD2zDaS39sjGrAxbR31vxJ2F4F","account":{"lamports":9626515200,"data":["pMhsPlc/e0EP2NRH06M+VSyY8R8Xdq4y4g7ChxQIOUQPXTDG51dI2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIgBAAAAAAAAXwAAAAAAAAAAAAAAAAAAAP////////////////////8AAAAAAAAAAAim6XXnEi... | 0 |
solana_public_repos/Lightprotocol/light-protocol/cli | solana_public_repos/Lightprotocol/light-protocol/cli/accounts/epoch_pda_34w7KcLBXabMkHuXE2fY368vFe6kP3v5EJn8nPvQ8SKn.json | {"pubkey":"34w7KcLBXabMkHuXE2fY368vFe6kP3v5EJn8nPvQ8SKn","account":{"lamports":2171520,"data":["QuAuAqeJeGsAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAKAAAAAAAAAGQAAAAAAAAAyAAAAAAAAABkAAAAAAAAAIgTAAAAAAAACFAAAAAAAABkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA... | 0 |
solana_public_repos/Lightprotocol/light-protocol/cli | solana_public_repos/Lightprotocol/light-protocol/cli/accounts/registered_forester_pda_2KNqEh23Se8AHecuzR1UkxL26euq2qXSpQPTH1jH7VqU.json | {"pubkey":"2KNqEh23Se8AHecuzR1UkxL26euq2qXSpQPTH1jH7VqU","account":{"lamports":1670400,"data":["My+7VlKZdQXMuMIVdedaPnWzorVHJCIvMcPXWnMDRUrSS6K/PzOqzAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==","base64"],"owner":"Lighton6oQpVkeewmo2mcPTQQp7kYHr4fWpAgJyEmDX","execu... | 0 |
solana_public_repos/Lightprotocol/light-protocol/cli | solana_public_repos/Lightprotocol/light-protocol/cli/accounts/registered_program_pda_35hkDgaAKwMCaxRz2ocSZ6NaUrtKkyNqU6c4RV3tYJRh.json | {"pubkey":"35hkDgaAKwMCaxRz2ocSZ6NaUrtKkyNqU6c4RV3tYJRh","account":{"lamports":1392000,"data":["H/u06wN0MgQGp1X4ITkFTUQksVrwxDDPL0t/mHk62hJS1I82ZsbLzg/Y1EfToz5VLJjxHxd2rjLiDsKHFAg5RA9dMMbnV0jY","base64"],"owner":"compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq","executable":false,"rentEpoch":18446744073709551615,"space":72... | 0 |
solana_public_repos/Lightprotocol/light-protocol/cli | solana_public_repos/Lightprotocol/light-protocol/cli/accounts/cpi_context_cpi1uHzrEhBG733DoEJNgHCyRS3XmmyVNZx5fonubE4.json | {"pubkey":"cpi1uHzrEhBG733DoEJNgHCyRS3XmmyVNZx5fonubE4","account":{"lamports":143487360,"data":["FhSV2krMgKYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA0BySirRdNlWVo06HcX+7AAihnSLwUsnaH5iMR8V946AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA... | 0 |
solana_public_repos/Lightprotocol/light-protocol/cli | solana_public_repos/Lightprotocol/light-protocol/cli/accounts/merkle_tree_pubkey_smt1NamzXdq4AMqS2fS2F1i5KTYPZRhoHgWx38d8WsT.json | {"pubkey":"smt1NamzXdq4AMqS2fS2F1i5KTYPZRhoHgWx38d8WsT","account":{"lamports":9496335360,"data":["rCusuh1J21QP2NRH06M+VSyY8R8Xdq4y4g7ChxQIOUQPXTDG51dI2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACwBAAAAAAAAXwAAAAAAAACIEwAAAAAAAP////////////////////8AAAAAAAAAAAuzCf2uDj... | 0 |
solana_public_repos/Lightprotocol/light-protocol/cli | solana_public_repos/Lightprotocol/light-protocol/cli/accounts/group_pda_24rt4RgeyjUCWGS2eF7L7gyNMuz6JWdqYpAvb1KRoHxs.json | {"pubkey":"24rt4RgeyjUCWGS2eF7L7gyNMuz6JWdqYpAvb1KRoHxs","account":{"lamports":1392000,"data":["D88EoH8mjqIQpl591jkE+Dg60Dze4Hi5FNhzGIA7FTWAcNeS4Fz959gvYscJPdVIze1MSnf9YAGMXJWU+iA1NroPMILezQNi","base64"],"owner":"compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq","executable":false,"rentEpoch":18446744073709551615,"space":72... | 0 |
solana_public_repos/Lightprotocol/light-protocol/cli | solana_public_repos/Lightprotocol/light-protocol/cli/accounts/registered_registry_program_pda_DumMsyvkaGJG4QnQ1BhTgvoRMXsgGxfpKDUCr22Xqu4w.json | {"pubkey":"DumMsyvkaGJG4QnQ1BhTgvoRMXsgGxfpKDUCr22Xqu4w","account":{"lamports":1392000,"data":["H/u06wN0MgQFDSsTeVE2hc8C8rX9UpG9lZsrBgqlJepbNIE7Hbm3bg/Y1EfToz5VLJjxHxd2rjLiDsKHFAg5RA9dMMbnV0jY","base64"],"owner":"compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq","executable":false,"rentEpoch":18446744073709551615,"space":72... | 0 |
solana_public_repos/Lightprotocol/light-protocol/cli | solana_public_repos/Lightprotocol/light-protocol/cli/accounts/governance_authority_pda_CuEtcKkkbTn6qy2qxqDswq5U2ADsqoipYDAYfRvxPjcp.json | {"pubkey":"CuEtcKkkbTn6qy2qxqDswq5U2ADsqoipYDAYfRvxPjcp","account":{"lamports":2234160,"data":["YLDvkgH+Y5ICY+L7WEJcIRnY07lwy9TuaZBIebD9aqhznpq8Pv+mUf8AAAAAAAAAAAEAAAAAAAAACgAAAAAAAABkAAAAAAAAAMgAAAAAAAAAZAAAAAAAAACIEwAAAAAAAAhQAAAAAAAAZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA... | 0 |
solana_public_repos/Lightprotocol/light-protocol/cli | solana_public_repos/Lightprotocol/light-protocol/cli/accounts/forester_epoch_pda_3FBt1BPQHCQkS8k3wrUXMfB6JBhtMhEqQXueHRw2ojZV.json | {"pubkey":"3FBt1BPQHCQkS8k3wrUXMfB6JBhtMhEqQXueHRw2ojZV","account":{"lamports":2735280,"data":["HXXTjWOP+nLMuMIVdedaPnWzorVHJCIvMcPXWnMDRUrSS6K/PzOqzAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZAAAAAAAAAABAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAACgAAAAAAAABkAAAAAAAAAMgAAAAAAAAAZAAAAAAAAACIEwAAAAAAAAhQAAAAAAAAZAAAAAAA... | 0 |
solana_public_repos/Lightprotocol/light-protocol/cli | solana_public_repos/Lightprotocol/light-protocol/cli/accounts/address_merkle_tree_amt1Ayt45jfbdw5YSo7iz6WZxUmnZsQTYXy82hVwyC2.json | {"pubkey":"amt1Ayt45jfbdw5YSo7iz6WZxUmnZsQTYXy82hVwyC2","account":{"lamports":15342958080,"data":["C6GvCdTlSUkP2NRH06M+VSyY8R8Xdq4y4g7ChxQIOUQPXTDG51dI2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAXwAAAAAAAACIEwAAAAAAAP////////////////////8AAAAAAAAAAAiqcuzqQ... | 0 |
solana_public_repos/Lightprotocol/light-protocol/cli | solana_public_repos/Lightprotocol/light-protocol/cli/scripts/buildProver.sh | #!/usr/bin/env sh
set -eux
build_prover() {
GOOS=$1 GOARCH=$2 go build -o "$3"
}
root_dir="$(git rev-parse --show-toplevel)"
gnark_dir="${root_dir}/light-prover"
out_dir="${root_dir}/cli/bin"
if [ ! -e "$out_dir" ]; then
mkdir -p "$out_dir"
fi
cp -r "${gnark_dir}/proving-keys" "$out_dir"
cd "$gnark_dir"
# ... | 0 |
solana_public_repos/Lightprotocol/light-protocol/cli | solana_public_repos/Lightprotocol/light-protocol/cli/scripts/checkAddProgram.ts | const fs = require('fs');
function main() {
const dir = process.argv[2];
const name = process.argv[3];
// check whether program Cargo.toml file exists
const programDir = `${dir}/programs/${name}/Cargo.toml`;
if (!fs.existsSync(programDir))
throw new Error(`Program ${programDir} does not ex... | 0 |
solana_public_repos/Lightprotocol/light-protocol/cli | solana_public_repos/Lightprotocol/light-protocol/cli/scripts/copyLocalProgramBinaries.sh | #!/usr/bin/env sh
set -eux
root_dir=$(git rev-parse --show-toplevel)
out_dir="$root_dir/cli/bin"
if [ ! -e "$out_dir" ]; then
mkdir -p "$out_dir"
fi
keys="account_compression light_system_program light_compressed_token light_registry"
for key in $keys
do
cp "$root_dir/target/deploy/$key.so" "$out_dir"/"$key"... | 0 |
solana_public_repos/Lightprotocol/light-protocol/cli | solana_public_repos/Lightprotocol/light-protocol/cli/src/index.ts | export { run } from "@oclif/core";
export * from "./utils";
export * from "./psp-utils";
| 0 |
solana_public_repos/Lightprotocol/light-protocol/cli/src | solana_public_repos/Lightprotocol/light-protocol/cli/src/utils/process.ts | import { spawn, SpawnOptionsWithoutStdio } from "child_process";
import path from "path";
import fs from "fs";
import find from "find-process";
import { exec as execCb } from "node:child_process";
import { promisify } from "util";
import axios from "axios";
const waitOn = require("wait-on");
export async function kill... | 0 |
solana_public_repos/Lightprotocol/light-protocol/cli/src | solana_public_repos/Lightprotocol/light-protocol/cli/src/utils/initTestEnv.ts | import { airdropSol } from "@lightprotocol/stateless.js";
import { getConfig, getPayer, setAnchorProvider, setConfig } from "./utils";
import {
BASE_PATH,
LIGHT_ACCOUNT_COMPRESSION_TAG,
LIGHT_COMPRESSED_TOKEN_TAG,
LIGHT_PROTOCOL_PROGRAMS_DIR_ENV,
LIGHT_REGISTRY_TAG,
LIGHT_SYSTEM_PROGRAM_TAG,
SPL_NOOP_PROG... | 0 |
solana_public_repos/Lightprotocol/light-protocol/cli/src | solana_public_repos/Lightprotocol/light-protocol/cli/src/utils/utils.ts | import * as fs from "fs";
import { existsSync } from "fs";
import * as path from "path";
import * as anchor from "@coral-xyz/anchor";
import * as solana from "@solana/web3.js";
import { Keypair } from "@solana/web3.js";
import { confirmConfig, createRpc, Rpc } from "@lightprotocol/stateless.js";
import { bs58 } from "@... | 0 |
solana_public_repos/Lightprotocol/light-protocol/cli/src | solana_public_repos/Lightprotocol/light-protocol/cli/src/utils/constants.ts | export const SPL_NOOP_PROGRAM_TAG = "spl-noop-v0.2.0";
export const LIGHT_ACCOUNT_COMPRESSION_TAG = "account-compression-v1.0.0";
export const LIGHT_SYSTEM_PROGRAM_TAG = "light-system-program-v1.0.0";
export const LIGHT_REGISTRY_TAG = "light-registry-v1.0.0";
export const LIGHT_COMPRESSED_TOKEN_TAG = "light-compressed-... | 0 |
solana_public_repos/Lightprotocol/light-protocol/cli/src | solana_public_repos/Lightprotocol/light-protocol/cli/src/utils/processPhotonIndexer.ts | import which from "which";
import { killProcess, spawnBinary, waitForServers } from "./process";
import { INDEXER_PROCESS_NAME, PHOTON_VERSION } from "./constants";
import { exec } from "node:child_process";
import * as util from "node:util";
export async function startIndexer(
rpcUrl: string,
indexerPort: number,... | 0 |
solana_public_repos/Lightprotocol/light-protocol/cli/src | solana_public_repos/Lightprotocol/light-protocol/cli/src/utils/index.ts | export * from "./utils";
export * from "./initTestEnv";
export * from "./processPhotonIndexer";
export * from "./processProverServer";
export * from "./constants";
| 0 |
solana_public_repos/Lightprotocol/light-protocol/cli/src | solana_public_repos/Lightprotocol/light-protocol/cli/src/utils/processProverServer.ts | import path from "path";
import {
executeCommand,
killProcess,
killProcessByPort,
spawnBinary,
waitForServers,
} from "./process";
import { LIGHT_PROVER_PROCESS_NAME } from "./constants";
const KEYS_DIR = "proving-keys/";
export async function killProver() {
await killProcess(getProverNameByArch());
awa... | 0 |
solana_public_repos/Lightprotocol/light-protocol/cli/src | solana_public_repos/Lightprotocol/light-protocol/cli/src/utils/standardFlags.ts | import { Flags } from "@oclif/core";
export const standardFlags = {
skipFetchBalance: Flags.boolean({
char: "b",
description: "Skip fetching the most recent balance prior to the operation",
required: false,
default: false,
parse: async () => true,
}),
localTestRpc: Flags.boolean({
descrip... | 0 |
solana_public_repos/Lightprotocol/light-protocol/cli/src | solana_public_repos/Lightprotocol/light-protocol/cli/src/psp-utils/download.ts | import axios from "axios";
import * as fs from "fs";
import { promisify } from "util";
import cliProgress from "cli-progress";
import * as path from "path";
import * as tar from "tar";
import * as zlib from "zlib";
import { sleep } from "@lightprotocol/stateless.js";
const fileExists = promisify(fs.exists);
async fun... | 0 |
solana_public_repos/Lightprotocol/light-protocol/cli/src | solana_public_repos/Lightprotocol/light-protocol/cli/src/psp-utils/index.ts | export * from "./download";
| 0 |
solana_public_repos/Lightprotocol/light-protocol/cli/src/commands | solana_public_repos/Lightprotocol/light-protocol/cli/src/commands/init/index.ts | import { sleep, UtilsError, UtilsErrorCode } from "@lightprotocol/stateless.js";
import { Args, Command, Flags } from "@oclif/core";
import { executeCommand } from "../../utils/process";
import { downloadBinIfNotExists } from "../../psp-utils";
import {
PROGRAM_ID,
ANCHOR_VERSION,
BORSH_VERSION,
LIGHT_HASHER_VE... | 0 |
solana_public_repos/Lightprotocol/light-protocol/cli/src/commands | solana_public_repos/Lightprotocol/light-protocol/cli/src/commands/mint-to/index.ts | import { Command, Flags } from "@oclif/core";
import {
CustomLoader,
defaultSolanaWalletKeypair,
generateSolanaTransactionURL,
rpc,
} from "../../utils/utils";
import { getKeypairFromFile } from "@solana-developers/helpers";
import { Keypair, PublicKey } from "@solana/web3.js";
import { mintTo } from "@lightpro... | 0 |
solana_public_repos/Lightprotocol/light-protocol/cli/src/commands | solana_public_repos/Lightprotocol/light-protocol/cli/src/commands/create-mint/index.ts | import { Command, Flags } from "@oclif/core";
import { getKeypairFromFile } from "@solana-developers/helpers";
import {
CustomLoader,
defaultSolanaWalletKeypair,
generateSolanaTransactionURL,
rpc,
} from "../../utils/utils";
import { createMint } from "@lightprotocol/compressed-token";
import { Keypair, PublicK... | 0 |
solana_public_repos/Lightprotocol/light-protocol/cli/src/commands | solana_public_repos/Lightprotocol/light-protocol/cli/src/commands/config/index.ts | import ConfigCommand from "./config";
export default ConfigCommand;
| 0 |
solana_public_repos/Lightprotocol/light-protocol/cli/src/commands | solana_public_repos/Lightprotocol/light-protocol/cli/src/commands/config/config.ts | import { Command, Flags, ux } from "@oclif/core";
import {
CustomLoader,
getConfig,
isValidURL,
setConfig,
} from "../../utils/utils";
class ConfigCommand extends Command {
static description =
"Initialize or update the configuration values. The default config path is ~/.config/light/config.json you can ... | 0 |
solana_public_repos/Lightprotocol/light-protocol/cli/src/commands | solana_public_repos/Lightprotocol/light-protocol/cli/src/commands/decompress-sol/index.ts | import { Command, Flags } from "@oclif/core";
import {
CustomLoader,
defaultSolanaWalletKeypair,
generateSolanaTransactionURL,
getSolanaRpcUrl,
rpc,
} from "../../utils/utils";
import { PublicKey } from "@solana/web3.js";
import { decompress, getTestRpc } from "@lightprotocol/stateless.js";
import { WasmFacto... | 0 |
solana_public_repos/Lightprotocol/light-protocol/cli/src/commands | solana_public_repos/Lightprotocol/light-protocol/cli/src/commands/create-token-pool/index.ts | import { Command, Flags } from "@oclif/core";
import {
CustomLoader,
defaultSolanaWalletKeypair,
generateSolanaTransactionURL,
rpc,
} from "../../utils/utils";
import { PublicKey } from "@solana/web3.js";
import { createTokenPool } from "@lightprotocol/compressed-token";
class RegisterMintCommand extends Comm... | 0 |
solana_public_repos/Lightprotocol/light-protocol/cli/src/commands | solana_public_repos/Lightprotocol/light-protocol/cli/src/commands/approve-and-mint-to/index.ts | import { Command, Flags } from "@oclif/core";
import {
CustomLoader,
defaultSolanaWalletKeypair,
generateSolanaTransactionURL,
getSolanaRpcUrl,
rpc,
} from "../../utils/utils";
import { getKeypairFromFile } from "@solana-developers/helpers";
import { Keypair, PublicKey } from "@solana/web3.js";
import { appro... | 0 |
solana_public_repos/Lightprotocol/light-protocol/cli/src/commands | solana_public_repos/Lightprotocol/light-protocol/cli/src/commands/transfer/index.ts | import { Command, Flags } from "@oclif/core";
import {
CustomLoader,
defaultSolanaWalletKeypair,
generateSolanaTransactionURL,
rpc,
} from "../../utils/utils";
import { transfer } from "@lightprotocol/compressed-token";
import { PublicKey } from "@solana/web3.js";
import { getKeypairFromFile } from "@solana-dev... | 0 |
solana_public_repos/Lightprotocol/light-protocol/cli/src/commands | solana_public_repos/Lightprotocol/light-protocol/cli/src/commands/balance/index.ts | import { Command, Flags } from "@oclif/core";
import { CustomLoader, rpc } from "../../utils/utils";
import { PublicKey } from "@solana/web3.js";
class BalanceCommand extends Command {
static summary = "Get balance";
static examples = ["$ light balance --mint=<ADDRESS> --owner=<ADDRESS>"];
static flags = {
... | 0 |
solana_public_repos/Lightprotocol/light-protocol/cli/src/commands | solana_public_repos/Lightprotocol/light-protocol/cli/src/commands/decompress-spl/index.ts | import { Command, Flags } from "@oclif/core";
import {
CustomLoader,
defaultSolanaWalletKeypair,
generateSolanaTransactionURL,
rpc,
} from "../../utils/utils";
import { PublicKey } from "@solana/web3.js";
import { decompress } from "@lightprotocol/compressed-token";
import { getOrCreateAssociatedTokenAccount } ... | 0 |
solana_public_repos/Lightprotocol/light-protocol/cli/src/commands | solana_public_repos/Lightprotocol/light-protocol/cli/src/commands/start-prover/index.ts | import { Command, Flags } from "@oclif/core";
import { CustomLoader, startProver } from "../../utils/index";
class StartProver extends Command {
static description = "Start gnark prover";
protected finally(_: Error | undefined): Promise<any> {
process.exit();
}
static flags = {
"prover-port": Flags.i... | 0 |
solana_public_repos/Lightprotocol/light-protocol/cli/src/commands | solana_public_repos/Lightprotocol/light-protocol/cli/src/commands/test-validator/index.ts | import { Command, Flags } from "@oclif/core";
import {
initTestEnv,
stopTestEnv,
SYSTEM_PROGRAMS,
} from "../../utils/initTestEnv";
import { CustomLoader } from "../../utils/index";
import path from "path";
import fs from "fs";
class SetupCommand extends Command {
static description =
"Start a local test s... | 0 |
solana_public_repos/Lightprotocol/light-protocol/cli/src/commands | solana_public_repos/Lightprotocol/light-protocol/cli/src/commands/compress-spl/index.ts | import { Command, Flags } from "@oclif/core";
import {
CustomLoader,
defaultSolanaWalletKeypair,
generateSolanaTransactionURL,
getSolanaRpcUrl,
rpc,
} from "../../utils/utils";
import { PublicKey } from "@solana/web3.js";
import { getTestRpc } from "@lightprotocol/stateless.js";
import { compress } from "@lig... | 0 |
solana_public_repos/Lightprotocol/light-protocol/cli/src/commands | solana_public_repos/Lightprotocol/light-protocol/cli/src/commands/merge-token-accounts/index.ts | import { Command, Flags } from "@oclif/core";
import {
CustomLoader,
defaultSolanaWalletKeypair,
generateSolanaTransactionURL,
rpc,
} from "../../utils/utils";
import { mergeTokenAccounts } from "@lightprotocol/compressed-token";
import { PublicKey } from "@solana/web3.js";
import { getKeypairFromFile } from "@... | 0 |
solana_public_repos/Lightprotocol/light-protocol/cli/src/commands | solana_public_repos/Lightprotocol/light-protocol/cli/src/commands/compress-sol/index.ts | import { Command, Flags } from "@oclif/core";
import {
CustomLoader,
defaultSolanaWalletKeypair,
generateSolanaTransactionURL,
rpc,
} from "../../utils/utils";
import { PublicKey } from "@solana/web3.js";
import { compress } from "@lightprotocol/stateless.js";
class CompressSolCommand extends Command {
stati... | 0 |
solana_public_repos/Lightprotocol/light-protocol | solana_public_repos/Lightprotocol/light-protocol/.devcontainer/devcontainer.json | // For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/rust
{
"name": "Light Protocol",
"image": "ghcr.io/lightprotocol/devcontainer-core:main",
"mounts": [
// Solana keypair.
{
"source": "lightprotocol-so... | 0 |
solana_public_repos/Lightprotocol/light-protocol | solana_public_repos/Lightprotocol/light-protocol/.cargo/config.toml | [alias]
xtask = "run --package xtask --"
# On Windows
# ```
# cargo install -f cargo-binutils
# rustup component add llvm-tools-preview
# ```
[target.x86_64-pc-windows-msvc]
rustflags = ["-C", "link-arg=-fuse-ld=lld"]
[target.x86_64-pc-windows-gnu]
rustflags = ["-C", "link-arg=-fuse-ld=lld"]
# On Linux:
# - Ubuntu,... | 0 |
solana_public_repos/Lightprotocol/light-protocol/macros | solana_public_repos/Lightprotocol/light-protocol/macros/light-sdk-macros/Cargo.toml | [package]
name = "light-sdk-macros"
version = "0.4.0"
description = "Macros for Programs using the Light SDK for ZK Compression "
repository = "https://github.com/Lightprotocol/light-protocol"
license = "Apache-2.0"
edition = "2021"
[dependencies]
bs58 = "0.5"
proc-macro2 = { workspace = true }
quote = { workspace = t... | 0 |
solana_public_repos/Lightprotocol/light-protocol/macros | solana_public_repos/Lightprotocol/light-protocol/macros/light-sdk-macros/Cargo.lock | # This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
[[package]]
name = "aead"
version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b613b8e1e3cf911a086f53f03bf286f52fd7a7258e4fa606f0ef220d39d8877"
dependencies = [
"generic-ar... | 0 |
solana_public_repos/Lightprotocol/light-protocol/macros/light-sdk-macros | solana_public_repos/Lightprotocol/light-protocol/macros/light-sdk-macros/tests/hasher.rs | use std::{cell::RefCell, marker::PhantomData, rc::Rc};
use light_hasher::{bytes::AsByteVec, DataHasher, Hasher, Poseidon};
use light_sdk_macros::LightHasher;
#[derive(LightHasher, Clone)]
pub struct MyAccount {
pub a: bool,
pub b: u64,
#[nested]
pub c: MyNestedStruct,
#[truncate]
pub d: [u8; 3... | 0 |
solana_public_repos/Lightprotocol/light-protocol/macros/light-sdk-macros | solana_public_repos/Lightprotocol/light-protocol/macros/light-sdk-macros/src/accounts.rs | use proc_macro2::{Span, TokenStream};
use quote::{quote, ToTokens};
use syn::{
parse::{Parse, ParseStream},
parse_quote,
punctuated::Punctuated,
token::PathSep,
Error, Expr, Fields, Ident, ItemStruct, Meta, Path, PathSegment, Result, Stmt, Token, Type,
TypePath,
};
pub(crate) fn process_light_s... | 0 |
solana_public_repos/Lightprotocol/light-protocol/macros/light-sdk-macros | solana_public_repos/Lightprotocol/light-protocol/macros/light-sdk-macros/src/lib.rs | extern crate proc_macro;
use accounts::{process_light_accounts, process_light_system_accounts};
use proc_macro::TokenStream;
use syn::{parse_macro_input, DeriveInput, ItemMod, ItemStruct};
use traits::process_light_traits;
mod account;
mod accounts;
mod discriminator;
mod hasher;
mod program;
mod traits;
/// Adds req... | 0 |
solana_public_repos/Lightprotocol/light-protocol/macros/light-sdk-macros | solana_public_repos/Lightprotocol/light-protocol/macros/light-sdk-macros/src/discriminator.rs | use light_hasher::{Hasher, Sha256};
use proc_macro2::TokenStream;
use quote::quote;
use syn::{ItemStruct, Result};
pub(crate) fn discriminator(input: ItemStruct) -> Result<TokenStream> {
let account_name = &input.ident;
let (impl_gen, type_gen, where_clause) = input.generics.split_for_impl();
let mut dis... | 0 |
solana_public_repos/Lightprotocol/light-protocol/macros/light-sdk-macros | solana_public_repos/Lightprotocol/light-protocol/macros/light-sdk-macros/src/account.rs | use proc_macro2::TokenStream;
use quote::quote;
use syn::{ItemStruct, Result};
pub(crate) fn account(input: ItemStruct) -> Result<TokenStream> {
Ok(quote! {
#[derive(
::anchor_lang::AnchorDeserialize,
::anchor_lang::AnchorSerialize,
::light_sdk::LightDiscriminator,
... | 0 |
solana_public_repos/Lightprotocol/light-protocol/macros/light-sdk-macros | solana_public_repos/Lightprotocol/light-protocol/macros/light-sdk-macros/src/hasher.rs | use proc_macro2::TokenStream;
use quote::quote;
use syn::{Error, Fields, ItemStruct, Result};
pub(crate) fn hasher(input: ItemStruct) -> Result<TokenStream> {
let struct_name = &input.ident;
let (impl_gen, type_gen, where_clause) = input.generics.split_for_impl();
let fields = match input.fields {
... | 0 |
solana_public_repos/Lightprotocol/light-protocol/macros/light-sdk-macros | solana_public_repos/Lightprotocol/light-protocol/macros/light-sdk-macros/src/traits.rs | use proc_macro2::TokenStream;
use quote::quote;
use syn::{Data, DeriveInput, Fields, FieldsNamed, Ident, Result};
pub(crate) fn process_light_traits(input: DeriveInput) -> Result<TokenStream> {
let name = &input.ident;
let trait_impls = match input.data {
Data::Struct(data_struct) => match data_struct... | 0 |
solana_public_repos/Lightprotocol/light-protocol/macros/light-sdk-macros | solana_public_repos/Lightprotocol/light-protocol/macros/light-sdk-macros/src/program.rs | use std::{
collections::HashMap,
ops::{Deref, DerefMut},
};
use proc_macro2::{Span, TokenStream};
use quote::{quote, ToTokens};
use syn::{
parse_quote, visit_mut::VisitMut, Attribute, FnArg, GenericArgument, Ident, Item, ItemFn,
ItemMod, ItemStruct, Pat, PathArguments, Result, Stmt, Token, Type,
};
//... | 0 |
solana_public_repos/Lightprotocol/light-protocol/macros | solana_public_repos/Lightprotocol/light-protocol/macros/light/Cargo.toml | [package]
name = "light-macros"
version = "1.1.0"
description = "Macros used in Light Protocol on-chain programs"
repository = "https://github.com/Lightprotocol/light-protocol"
license = "Apache-2.0"
edition = "2021"
[dependencies]
bs58 = "0.5"
proc-macro2 = { workspace = true }
quote = { workspace = true }
syn = { wo... | 0 |
solana_public_repos/Lightprotocol/light-protocol/macros | solana_public_repos/Lightprotocol/light-protocol/macros/light/Cargo.lock | # This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
[[package]]
name = "aead"
version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b613b8e1e3cf911a086f53f03bf286f52fd7a7258e4fa606f0ef220d39d8877"
dependencies = [
"generic-ar... | 0 |
solana_public_repos/Lightprotocol/light-protocol/macros/light | solana_public_repos/Lightprotocol/light-protocol/macros/light/src/pubkey.rs | use bs58::decode;
use proc_macro2::TokenStream;
use quote::quote;
use syn::{parse::Parse, Error, LitStr, Result};
const PUBKEY_LEN: usize = 32;
pub(crate) struct PubkeyArgs {
pub(crate) pubkey: LitStr,
}
impl Parse for PubkeyArgs {
fn parse(input: syn::parse::ParseStream) -> Result<Self> {
Ok(Self {
... | 0 |
solana_public_repos/Lightprotocol/light-protocol/macros/light | solana_public_repos/Lightprotocol/light-protocol/macros/light/src/lib.rs | extern crate proc_macro;
use proc_macro::TokenStream;
use quote::quote;
use syn::{parse_macro_input, parse_quote, ItemFn};
mod pubkey;
/// Converts a base58 encoded public key into a byte array.
#[proc_macro]
pub fn pubkey(input: TokenStream) -> TokenStream {
let args = parse_macro_input!(input as pubkey::Pubkey... | 0 |
solana_public_repos/Lightprotocol/light-protocol/macros | solana_public_repos/Lightprotocol/light-protocol/macros/aligned-sized/Cargo.toml | [package]
name = "aligned-sized"
version = "1.1.0"
description = "A macro which ensures the alignment and calculates the size of a struct"
repository = "https://github.com/Lightprotocol/light-protocol"
license = "Apache-2.0"
edition = "2021"
[lib]
proc-macro = true
[dependencies]
proc-macro2 = { workspace = true }
qu... | 0 |
solana_public_repos/Lightprotocol/light-protocol/macros | solana_public_repos/Lightprotocol/light-protocol/macros/aligned-sized/LICENSE | MIT License
Copyright (c) 2023 Light Protocol Labs
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publis... | 0 |
solana_public_repos/Lightprotocol/light-protocol/macros | solana_public_repos/Lightprotocol/light-protocol/macros/aligned-sized/Cargo.lock | # This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
[[package]]
name = "aligned-sized"
version = "0.1.0"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "proc-macro2"
version = "1.0.67"
source = "registry+https://github.com/rust-lang/crates.io... | 0 |
solana_public_repos/Lightprotocol/light-protocol/macros/aligned-sized | solana_public_repos/Lightprotocol/light-protocol/macros/aligned-sized/tests/test.rs | use std::mem;
use aligned_sized::aligned_sized;
#[aligned_sized]
#[derive(Debug)]
#[allow(dead_code)]
struct TestStruct {
pub a: u64,
pub b: u32,
pub c: i32,
pub d: TestStructNested,
}
#[aligned_sized]
#[derive(Debug)]
#[allow(dead_code)]
struct TestStructNested {
pub e: usize,
pub f: isize,
... | 0 |
solana_public_repos/Lightprotocol/light-protocol/macros/aligned-sized | solana_public_repos/Lightprotocol/light-protocol/macros/aligned-sized/src/lib.rs | //! **aligned-sized** is a library providing the `aligned_sized` macro, which:
//!
//! * Calculates a size of the given struct and provides a `LEN` constant with
//! that value.
//!
//! Future plans:
//!
//! * Ensuring that the struct is aligned, adding padding fields when
//! neccessary.
//!
//! # Motivation
//!
/... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.