The official developer SDK for @gghyper/sdk (JS/TS) and gghyper-sdk (Python). RPC, contracts, deployments, multicall, explorer, mining pool, events — all in one tiny package.
Direct downloads, ready to push to your own GitHub / npm / PyPI.
cd js && yarn install && yarn build npm publish --access public cd ../python python -m build twine upload dist/*
npm install @gghyper/sdk
# or: yarn add @gghyper/sdk · pnpm add @gghyper/sdkcopyimport { GGChain } from "@gghyper/sdk";
const gg = new GGChain();
const block = await gg.blockNumber();
const bal = await gg.getBalance("0xfF3dBbD0...");
console.log("Block", block, "·", bal, "GG");
// Wrap any ERC-20
const t = gg.token("0xE77F05C0...");
console.log(await t.symbol(), await t.balanceOf("0x..."));copyconst gg = new GGChain({ privateKey: process.env.PK });
await gg.send("0xBob...", "1.5"); // 1.5 GG
await gg.token("0xE77F05...").transfer("0xBob...", "100"); // 100 bUSDT
await gg.token("0xE77F05...").approve("0xSpender", "max"); // unlimited
const sig = await gg.signMessage("Login at " + Date.now());copyconst { address, contract, tx } = await gg.deploy(ABI, BYTECODE, [arg1, arg2]);
console.log("Deployed at", address);
console.log("Tx", tx.hash, "view:", gg.explorer.url(address));copyconst c = gg.contract("0xMyContract...", MY_ABI);
const value = await c.someView(); // read
const tx = await c.someWrite(arg1, arg2); // write (signer required)
await gg.waitForTx(tx.hash);copyimport { Pool } from "@gghyper/sdk";
const s = await gg.pool.stats();
console.log("Hashrate:", Pool.formatHash(s.hashrate));
console.log("Active miners:", s.minersTotal);
const me = await gg.pool.miner("0xfF3dBbD0...");
console.log("Workers:", me.workersOnline, "Pending:", me.stats.balance);
console.log("Stratum:", gg.pool.stratumUrl());copyconst txs = await gg.explorer.txList("0xAlice...");
const erc20 = await gg.explorer.tokenTransfers("0xAlice...");
const abi = await gg.explorer.getContractABI("0xMyContract...");
const url = gg.explorer.url("0xMyContract...");copyconst gg = new GGChain({ ws: "wss://ws.gghyper.net" });
const off = gg.onLogs({ address: "0xMyContract..." }, log => console.log(log));
gg.onBlock(n => console.log("block", n));
// later: off(); await gg.destroy();copyimport { WALLET_PARAMS } from "@gghyper/sdk";
await window.ethereum.request({
method: "wallet_addEthereumChain",
params: [WALLET_PARAMS],
});copy| Key | Value |
|---|---|
| chainId | 2121217 (0x205C81) |
| rpc | https://rpc.gghyper.net |
| ws | wss://ws.gghyper.net |
| explorer | explorer.gghyper.net |
| pool | pool.gghyper.net |
| symbol | GG |
| decimals | 18 |