{"_id":"@blyz/blyz-sdk","_rev":"5-4713d7eaa9f3d64249d42aeca5356c76","name":"@blyz/blyz-sdk","dist-tags":{"latest":"0.0.3"},"versions":{"0.0.2":{"name":"@blyz/blyz-sdk","version":"0.0.2","keywords":["sdk","blyz","deploy","token","contract","ethereum"],"author":{"name":"Blyz"},"license":"ISC","_id":"@blyz/blyz-sdk@0.0.2","maintainers":[{"name":"metehan-blyz","email":"metehans@glitchd.network"},{"name":"blyz-dev","email":"george@glitchd.network"},{"name":"nick_glitchd","email":"nickb@glitchd.network"}],"homepage":"https://github.com/GLITCHD-LABS/blyz-sdk#readme","bugs":{"url":"https://github.com/GLITCHD-LABS/blyz-sdk/issues"},"dist":{"shasum":"884e0e2c79c0b729299170fe79570dae986275f3","tarball":"https://registry.npmjs.org/@blyz/blyz-sdk/-/blyz-sdk-0.0.2.tgz","fileCount":17,"integrity":"sha512-SywHtA5tvLt8nUpakwco/Aejm7q/tEERuQ6uNpljVPJlG9AWWSSmypv6u6cOlNR4vRUOuDMYK8qVfD7jUy6zLA==","signatures":[{"sig":"MEUCIQCCoyY+UkeRsU//2W45kfLjrmjEBaWUdRA/NtNBnq8NKwIgaulwqBWjsbZw1oxaMvzG8ZNXmYpWxxMMx4c+fXT6bO0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":33078},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"13722619ffdfde948ab9fecebc906d69415d9f15","scripts":{"lint":"eslint 'src/**/*.ts'","test":"jest --runInBand --detectOpenHandles","build":"yarn clean && yarn build:ts && yarn build:abis","clean":"rm -rf dist","format":"prettier --write 'src/**/*.ts'","build:ts":"tsc","test:e2e":"docker compose up --build --exit-code-from e2e","build:abis":"copyfiles -u 1 \"src/abis/**/*.json\" dist/abis","example:deploy:token":"ts-node examples/v4/deployToken.ts"},"_npmUser":{"name":"metehan-blyz","email":"metehans@glitchd.network"},"repository":{"url":"git+https://github.com/GLITCHD-LABS/blyz-sdk.git","type":"git"},"_npmVersion":"10.9.2","description":"Blyz SDK for deploying and managing Ethereum smart contracts","directories":{},"_nodeVersion":"22.16.0","dependencies":{"joi":"^17.13.3","dotenv":"^16.4.7","ethers":"^6.13.4"},"_hasShrinkwrap":false,"packageManager":"yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e","devDependencies":{"jest":"^30.2.0","eslint":"^9.39.1","ts-jest":"^29.4.5","ts-node":"^10.9.2","prettier":"^3.6.2","copyfiles":"^2.4.1","typescript":"^5.9.3","@types/jest":"^30.0.0","@types/node":"^24.10.0","eslint-config-prettier":"^10.1.8","@typescript-eslint/parser":"^8.46.3","@typescript-eslint/eslint-plugin":"^8.46.3"},"_npmOperationalInternal":{"tmp":"tmp/blyz-sdk_0.0.2_1763728296423_0.862554161028575","host":"s3://npm-registry-packages-npm-production"}},"0.0.3":{"name":"@blyz/blyz-sdk","version":"0.0.3","main":"dist/index.js","bin":{"blyz-sdk":"dist/cli/index.js"},"types":"dist/index.d.ts","author":{"name":"Blyz"},"license":"ISC","description":"Blyz SDK for deploying and managing Ethereum smart contracts","scripts":{"clean":"rm -rf dist","build:ts":"tsc","build:abis":"copyfiles -u 1 \"src/abis/**/*.json\" dist/abis","build":"yarn clean && yarn build:ts && yarn build:abis","cli":"ts-node src/cli/index.ts","example:deploy:token":"ts-node examples/v4/deployToken.ts","test":"jest --runInBand --detectOpenHandles","test:e2e":"docker compose up --build --exit-code-from e2e","lint":"eslint 'src/**/*.ts'","format":"prettier --write 'src/**/*.ts'"},"keywords":["sdk","blyz","deploy","token","contract","ethereum"],"packageManager":"yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e","repository":{"type":"git","url":"git+https://github.com/GLITCHD-LABS/blyz-sdk.git"},"homepage":"https://github.com/GLITCHD-LABS/blyz-sdk#readme","dependencies":{"commander":"^14.0.2","dotenv":"^16.4.7","ethers":"^6.13.4","joi":"^17.13.3"},"devDependencies":{"@types/jest":"^30.0.0","@types/node":"^24.10.0","@typescript-eslint/eslint-plugin":"^8.46.3","@typescript-eslint/parser":"^8.46.3","copyfiles":"^2.4.1","eslint":"^9.39.1","eslint-config-prettier":"^10.1.8","jest":"^30.2.0","prettier":"^3.6.2","ts-jest":"^29.4.5","ts-node":"^10.9.2","typescript":"^5.9.3"},"_id":"@blyz/blyz-sdk@0.0.3","gitHead":"4fc191309bbbc2411c9f6b4585cf7bb1f0ce359b","bugs":{"url":"https://github.com/GLITCHD-LABS/blyz-sdk/issues"},"_nodeVersion":"22.16.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-a5vSSSRyEZXULwHA4EacXbA02cBGER+Dk6uEGrmGXVgpVANvVvEhmxu0ECxtEZAWsJfZjqX62NfG+6VX42V7bw==","shasum":"015bac461a87beb206a7dc565270e175897b8c4d","tarball":"https://registry.npmjs.org/@blyz/blyz-sdk/-/blyz-sdk-0.0.3.tgz","fileCount":27,"unpackedSize":49795,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQC1P1Cf34e/6FR0dmoLOVxbSeGSgpP8WRzg6O1HG3BaVAIgfWRx2lzjnNhAKWJzYGP70iXdHZzHnsCBa4qAZWKlcmc="}]},"_npmUser":{"name":"metehan-blyz","email":"metehans@glitchd.network"},"directories":{},"maintainers":[{"name":"metehan-blyz","email":"metehans@glitchd.network"},{"name":"blyz-dev","email":"george@glitchd.network"},{"name":"nick_glitchd","email":"nickb@glitchd.network"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/blyz-sdk_0.0.3_1764238749193_0.5267002666827056"},"_hasShrinkwrap":false}},"time":{"created":"2025-11-21T12:31:36.292Z","modified":"2025-11-27T10:19:09.615Z","0.0.1":"2025-11-21T12:11:59.097Z","0.0.2":"2025-11-21T12:31:36.616Z","0.0.3":"2025-11-27T10:19:09.408Z"},"bugs":{"url":"https://github.com/GLITCHD-LABS/blyz-sdk/issues"},"author":{"name":"Blyz"},"license":"ISC","homepage":"https://github.com/GLITCHD-LABS/blyz-sdk#readme","keywords":["sdk","blyz","deploy","token","contract","ethereum"],"repository":{"type":"git","url":"git+https://github.com/GLITCHD-LABS/blyz-sdk.git"},"description":"Blyz SDK for deploying and managing Ethereum smart contracts","maintainers":[{"name":"metehan-blyz","email":"metehans@glitchd.network"},{"name":"blyz-dev","email":"george@glitchd.network"},{"name":"nick_glitchd","email":"nickb@glitchd.network"}],"readme":"# BLYZ SDK\n\nMinimal TypeScript SDK that signs and launches tokens via the Blyz v4 Fair Launch Factory contract.\n\n## Requirements\n- Node.js 18+ and Yarn 1.22 \n- Access to a Base RPC endpoint (Sepolia or Mainnet) and a funded deployer wallet\n- Sufficient funds on that wallet (gas + launch capital)\n- Blyz v4 Fair Launch Factory contract address for the network you plan to target\n\n## Install\nInstall dependencies with Yarn (recommended) or npm:\n\n```bash\n# Yarn\nyarn install\n\n# npm\nnpm install\n```\n\n## Configure environment variables\n1. Copy the template and adjust the values:\n   ```bash\n   cp .env.example .env\n   ```\n2. Edit `.env` and provide the secrets:\n   - `PRIVATE_KEY` – 32-byte hex string (with `0x` prefix) for the deployer wallet that will pay gas. Keep it safe.\n   - `BASE_RPC_URL` – HTTPS RPC endpoint for the Base network you target. The example uses Sepolia.\n   - `BLYZ_TOKEN_PROTOCOL_ADDRESS` – Blyz v4 Fair Launch Factory contract address supplied by the Blyz team for the selected network.\n   The TypeScript examples load these from `.env` while the CLI expects them via flags or the JSON config file directly.\n\n## Configure `BlyzTokenV4`\nIf you run the example script, edit the `tokenConfig` inside `examples/v4/deployToken.ts`. Each field maps directly to the on-chain deployment payload:\n\n| Field | Description |\n| --- | --- |\n| `name` | Full ERC20 name (e.g. `Example Token`). |\n| `symbol` | Short uppercase ticker (e.g. `EXT`). |\n| `metadataCid` | IPFS CID of the token artwork stored on IPFS (image file). |\n| `initialTick` | Initial Uniswap v4 pool tick that sets the starting spot price;\n| `creatorAddress` | Address registered as the project creator and payout recipient (not necessarily the actual author). |\n| `pairToken` | Address of the asset you pair against (WETH, USDC, etc.); use the zero address to pair with native ETH. |\n| `amountIn` | BigInt representing how much of the `pairToken` (in wei) you deposit when creating the pool. |\n\n## Run the sample deployment\n1. Ensure the `.env` file is ready and adjust the sample config in `examples/v4/deployToken.ts` if needed.\n2. Execute the script:\n   ```bash\n   # Yarn\n   yarn example:deploy:token\n\n   # npm\n   npm run example:deploy:token\n   ```\n   The script invokes `ts-node examples/v4/deployToken.ts`, instantiates `Blyz`, and submits `BlyzTokenV4` to the factory defined in `.env`.\n3. For production builds, compile the SDK and import the generated code from `dist/`:\n   ```bash\n   # Yarn\n   yarn build\n\n   # npm\n   npm run build\n   ```\n\n## Deploy with the CLI\nIf you prefer to deploy via the CLI instead of running the TypeScript example, use the bundled binary:\n\n1. Create a JSON file with your token data (you can also supply all values via flags):\n   ```json\n   {\n     \"name\": \"Example Token\",\n     \"symbol\": \"EXT\",\n     \"metadataCid\": \"ipfs://cid\",\n     \"initialTick\": 115200,\n     \"creatorAddress\": \"0xdDEA2b19867531c5fa7003E6d83f6ab37E8872Dd\",\n     \"pairToken\": \"0x0000000000000000000000000000000000000000\",\n     \"amountIn\": \"200000000000000000\"\n   }\n   ```\n2. Run the CLI (bin name: `blyz-sdk`):\n   ```bash\n   yarn build\n   npx blyz-sdk deploy --config ./token.config.json \\\n     --private-key 0xYOUR_PRIVATE_KEY \\\n     --rpc-url https://sepolia.base.org \\\n     --fair-launch-factory-address 0xfCA4A96066D1039676B48915901ba400197AB1a6\n   ```\n   You can override any field inline, for example:\n   ```bash\n   npx blyz-sdk deploy --config ./token.config.json --symbol NEW --amount-in 200000000000000000 \\\n     --private-key 0xYOUR_PRIVATE_KEY \\\n     --rpc-url https://sepolia.base.org \\\n     --fair-launch-factory-address 0xfCA4A96066D1039676B48915901ba400197AB1a6\n   ```\n   If you want the command available globally (without `npx`), link it once from the repo:\n   ```bash\n   yarn build\n   npm link          # registers the blyz-sdk binary globally\n\n   # now anywhere:\n   blyz-sdk deploy --config ./token.config.json --dry-run \\\n     --private-key 0xYOUR_PRIVATE_KEY \\\n     --rpc-url https://sepolia.base.org \\\n     --fair-launch-factory-address 0xfCA4A96066D1039676B48915901ba400197AB1a6\n   ```\n   To remove the global link later: `npm unlink -g blyz-sdk`.\n   (If you want to run it without building, the TypeScript entry still works: `yarn cli deploy --config ./token.config.json`.)\n\nThe CLI supports the following options:\n\n| Flag | Description |\n| --- | --- |\n| `--config <path>` | Path to a JSON file (structure shown above). |\n| `--name <string>` | ERC20 name. |\n| `--symbol <string>` | ERC20 ticker. |\n| `--metadata-cid <string>` | Token artwork CID. |\n| `--initial-tick <int>` | Starting Blyz pool tick. |\n| `--creator-address <hex>` | Address registered as the creator. |\n| `--pair-token <hex>` | Counterpart token (zero-address means native ETH). |\n| `--amount-in <wei>` | Pair token amount expressed in wei. |\n| `--private-key <hex>` | Signer private key. |\n| `--rpc-url <http(s)>` | RPC endpoint. |\n| `--fair-launch-factory-address <hex>` | Factory contract address. |\n| `--dry-run` | Validate input and print the steps without broadcasting the transaction. |\n\n> Note: `--config` and inline token flags are mutually exclusive. Supply the full token definition in a JSON file or entirely via flags—never both in the same command.\n> Connection details (`privateKey`, `rpcUrl`, `fairLaunchFactoryAddress`) must be provided via flags; the CLI does not read `.env` or connection fields in the token JSON.\n\n### Example run\n```bash\n$ npm run example:deploy:token\n\n> blyz-sdk@1.0.0 example:deploy:token\n> ts-node examples/v4/deployToken.ts\n\n\nLoading Blyz configuration\n\nConfiguration ready\n    signer: 0xdDEA2b19867531c5fa7003E6d83f6ab37E8872Dd\n    factoryAddress: 0xfCA4A96066D1039676B48915901ba400197AB1a6\n\nBlyz client initialized\n\nDeploying token\n    name: Example Token\n    symbol: EXT\n\nTransaction broadcasted\n    transactionHash: 0xf01ac218f61c7591483b60650d2107e8436c21fc88d7071b4a9e888486ec1862\n\nDeployment confirmed\n    tokenAddress: 0x7455ED2D8913F218e2Ec659fd017CFD0D6C19eD3\n    blockNumber: 33372096\n    gasUsed: 2342787\n```\n\n> Tip: keep a separate `.env` per environment (e.g. `.env.sepolia`, `.env.mainnet`) and export the right one before running the script.\n","readmeFilename":"README.md"}