{"id":26482758,"url":"https://github.com/glamsystems/glam-sdk","last_synced_at":"2025-03-20T04:39:30.072Z","repository":{"id":283030723,"uuid":"950442194","full_name":"glamsystems/glam-sdk","owner":"glamsystems","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-18T07:31:42.000Z","size":93,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-18T08:34:22.755Z","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/glamsystems.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2025-03-18T07:01:07.000Z","updated_at":"2025-03-18T07:31:46.000Z","dependencies_parsed_at":"2025-03-18T08:44:31.588Z","dependency_job_id":null,"html_url":"https://github.com/glamsystems/glam-sdk","commit_stats":null,"previous_names":["glamsystems/glam-sdk"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glamsystems%2Fglam-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glamsystems%2Fglam-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glamsystems%2Fglam-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glamsystems%2Fglam-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/glamsystems","download_url":"https://codeload.github.com/glamsystems/glam-sdk/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244554115,"owners_count":20471172,"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","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-03-20T04:39:28.687Z","updated_at":"2025-03-20T04:39:30.064Z","avatar_url":"https://github.com/glamsystems.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GLAM SDK\n\nA TypeScript SDK for interacting with the GLAM Protocol.\n\n## Installation\n\n```bash\nnpm i @glamsystems/glam-sdk\n```\n\n## Getting Started\n\n- [GLAM docs](https://docs.glam.systems)\n- [TypeScript API docs](#)\n\n## Examples\n\n### Set up a GLAM client and interact with a vault\n\n```ts\nimport * as anchor from \"@coral-xyz/anchor\";\nimport { GlamClient, WSOL } from \"@glamsystems/glam-sdk\";\nimport { PublicKey } from \"@solana/web3.js\";\n\n// Need to set ANCHOR_PROVIDER_URL and ANCHOR_WALLET env variables\n// ANCHOR_PROVIDER_URL=...\n// ANCHOR_WALLET=...\nconst glamClient = new GlamClient();\nconst statePda = new PublicKey(\"FMHLPaEeCbuivqsAfHrr28FpWJ9oKHTx3jzFbb3tYhq4\");\n\nasync function main() {\n  const vaultPda = glamClient.getVaultPda(statePda);\n\n  console.log(\"statePda:\", statePda.toBase58());\n  console.log(\"vaultPda:\", vaultPda.toBase58());\n\n  const vaultWsolBalance = await glamClient.getVaultTokenBalance(statePda, WSOL);\n  console.log(\"vaultWsolBalance:\", vaultWsolBalance.toString());\n\n  // Wrap 0.1 SOL\n  const txSig = await glamClient.wsol.wrap(statePda, new anchor.BN(100_000_000));\n  console.log(\"txSig:\", txSig);\n\n  // wSOL balance after wrap should increase by 0.1 SOL\n  const vaultWsolBalanceAfter = await glamClient.getVaultTokenBalance(statePda, WSOL);\n  console.log(\"vaultWsolBalanceAfter:\", vaultWsolBalanceAfter.toString());\n}\n\nmain().catch((error) =\u003e {\n  console.error(\"Error:\", error);\n  process.exit(1);\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglamsystems%2Fglam-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fglamsystems%2Fglam-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglamsystems%2Fglam-sdk/lists"}