{"id":30694303,"url":"https://github.com/goosefx1/gamma-sdk","last_synced_at":"2025-09-02T06:05:59.601Z","repository":{"id":254140145,"uuid":"842971206","full_name":"GooseFX1/gamma-sdk","owner":"GooseFX1","description":"SDK for GAMMA","archived":false,"fork":false,"pushed_at":"2025-05-21T11:04:47.000Z","size":518,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-21T11:49:08.137Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GooseFX1.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-08-15T13:58:58.000Z","updated_at":"2025-05-13T08:09:40.000Z","dependencies_parsed_at":"2024-08-21T17:31:15.581Z","dependency_job_id":"392f6bc3-b191-4abc-9a92-1bc70040c111","html_url":"https://github.com/GooseFX1/gamma-sdk","commit_stats":null,"previous_names":["goosefx1/gamma-sdk"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/GooseFX1/gamma-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GooseFX1%2Fgamma-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GooseFX1%2Fgamma-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GooseFX1%2Fgamma-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GooseFX1%2Fgamma-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GooseFX1","download_url":"https://codeload.github.com/GooseFX1/gamma-sdk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GooseFX1%2Fgamma-sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273238872,"owners_count":25069797,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-02T02:00:09.530Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-09-02T06:05:54.155Z","updated_at":"2025-09-02T06:05:59.593Z","avatar_url":"https://github.com/GooseFX1.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gamma SDK\n\n**TypeScript SDK for GAMMA**  \nDeveloper toolkit for integrating with GooseFX’s GAMMA AMM protocol on Solana.\n\n---\n\n## Overview\n\n`Gamma-sdk` is a fully-typed, easy-to-use TypeScript SDK designed for building frontends, bots, and integration tools on top of the GAMMA decentralized exchange. It provides interfaces for all core operations — pool creation, swaps, add/removal of liquidity.\n\n---\n\n## Installation\n\n```bash\nyarn add goosefx-amm-sdk\n\n# or\nnpm install goosefx-amm-sdk\n```\n\n---\n\n## ⚙️ Features\n\n- Manage liquidity pools: create, initialize, add/remove liquidity  \n- Execute swaps\n- Get quotes \u0026 estimate slippage and fees  \n- Supports SPL Token2022, referral accounts, and fee-sharing\n\n---\n\n## Prerequisites\n\n- Node.js \u003e=12 and Yarn/NPM  \n- A Solana connection (RPC endpoint \u0026 wallet)  \n- Basic understanding of Solana, SPL Tokens, and AMM concepts\n\n---\n\n## ��️ Quickstart Example\n\n```ts\nimport dotenv from \"dotenv\";\ndotenv.config();\nimport { GfxCpmmClient } from \"../src/gfx/index\";\nimport fs from \"fs\";\nimport BN from \"bn.js\";\n\nimport { Connection, Keypair, PublicKey, VersionedTransaction } from \"@solana/web3.js\";\nimport { OracleBasedCurveCalculator } from \"@/gfx/cpmm/curve/oracleCalculator\";\nimport { TxVersion } from \"@/common\";\n\nasync function mainFn(): Promise\u003cvoid\u003e {\n  const keypair = createKeypairFromFile(KEYPAIR_PATH);\n  const client = await GfxCpmmClient.load({\n    connection: new Connection(RPC_URL),\n    disableFeatureCheck: true,\n    disableLoadToken: true,\n    urlConfigs: {\n      BASE_HOST: \"\",\n    },\n    owner: keypair,\n  });\n\n  const info = await client.cpmm.getPoolInfoFromRpc(POOL_STATE.toBase58());\n\n  if (!info.rpcData.configInfo) throw new Error(\"configInfo not found\");\n\n  const swapResult = OracleBasedCurveCalculator.swap(\n    AMOUNT,\n    ZERO_FOR_ONE,\n    info.rpcData.configInfo,\n    info.rpcData.observationAccount,\n    info.rpcData,\n  );\n  console.log(`swapResult: `, swapResult);\n\n  const { transaction } = await client.cpmm.swapWithOracle({\n    poolInfo: info.poolInfo,\n    poolKeys: info.poolKeys,\n    zeroForOne: ZERO_FOR_ONE,\n    swapResult,\n    slippage: SLIPPAGE_BPS / 10_000,\n    computeBudgetConfig: {\n      microLamports: MICRO_LAMPORTS,\n    },\n    txVersion: TxVersion.V0,\n    wrapSol: true,\n  });\n\n  const { blockhash, lastValidBlockHeight } = await client.connection.getLatestBlockhash();\n  transaction.message.recentBlockhash = blockhash;\n  transaction.sign([\n    {\n      publicKey: keypair.publicKey,\n      secretKey: keypair.secretKey,\n    },\n  ]);\n\n  console.log(\"Sending swap transaction\");\n  const signature = await new Connection(SEND_RPC_URL).sendTransaction(transaction as unknown as VersionedTransaction, {\n    skipPreflight: false,\n    preflightCommitment: \"confirmed\",\n    maxRetries: 0,\n  });\n  console.log(`Waiting to confirm transaction ${signature}`);\n\n  await client.connection.confirmTransaction(\n    {\n      signature,\n      blockhash,\n      lastValidBlockHeight,\n    },\n    \"confirmed\",\n  );\n  console.log(`swap txn confirmed. View at https://solscan.io/tx/${signature}`);\n}\n```\n\n---\n\n## Examples\n\nSee the full set of examples in the [`examples/`](./examples) directory:\n\n- `oracle_swap.ts` – quote + swap execution  \n- `liquidity.ts` – deposit/withdraw into a pool  \n- `create.ts` – create pool\n\n---\n\n## Resources \u0026 Links\n\n- GAMMA DEX protocol(can be used for anchor binding): [`gamma-swap`](https://github.com/GooseFX1/gamma-swap)  \n- Swap HTTP API: [`gamma-swap-api`](https://github.com/GooseFX1/gamma-swap-api)  \n- Official GAMMA dev docs: https://docs.goosefx.io  \n\n---\n\n## ��️ Security \u0026 Audits\n\n- Refer to GAMMA audit at `gamma-swap/.audit/`\n\n---\n\n## Contributing\n\nContributions welcome!  \n- File issues under `bug` or `enhancement`  \n- Open PRs with unit tests \u0026 documentation updates  \n\n---\n\n## License\n\n[MIT](./LICENSE)\n\n---\n\n### Get Involved\n\nFollow GooseFX community channels for updates, support, and discussion: Discord, Telegram \u0026 GitHub Discussions.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoosefx1%2Fgamma-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoosefx1%2Fgamma-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoosefx1%2Fgamma-sdk/lists"}