{"id":24988434,"url":"https://github.com/lit-protocol/lit-agent-signer","last_synced_at":"2025-03-29T11:18:02.024Z","repository":{"id":268663632,"uuid":"905085954","full_name":"LIT-Protocol/lit-agent-signer","owner":"LIT-Protocol","description":null,"archived":false,"fork":false,"pushed_at":"2024-12-21T00:54:47.000Z","size":455,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-04T12:04:15.406Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LIT-Protocol.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2024-12-18T06:11:09.000Z","updated_at":"2024-12-21T00:54:51.000Z","dependencies_parsed_at":"2024-12-18T21:18:59.651Z","dependency_job_id":null,"html_url":"https://github.com/LIT-Protocol/lit-agent-signer","commit_stats":null,"previous_names":["lit-protocol/lit-serverside-signer","lit-protocol/lit-agent-signer"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LIT-Protocol%2Flit-agent-signer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LIT-Protocol%2Flit-agent-signer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LIT-Protocol%2Flit-agent-signer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LIT-Protocol%2Flit-agent-signer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LIT-Protocol","download_url":"https://codeload.github.com/LIT-Protocol/lit-agent-signer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246174604,"owners_count":20735417,"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-02-04T12:04:17.462Z","updated_at":"2025-03-29T11:18:01.995Z","avatar_url":"https://github.com/LIT-Protocol.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lit Serverside Signer SDK\n\nA lightweight SDK for signing transactions and messages with Lit Protocol. This SDK simplifies the process of creating wallets and signing transactions using Lit's Programmable Key Pairs (PKPs).\n\nThis SDK is a wrapper around our [full-featured SDK](https://github.com/lit-protocol/js-sdk) which also supports client-side functionality, decryption, and more.\nfunctionality, decryption, and more.\n\n## Features\n\n- 🔑 Easy wallet creation and management\n- ✍️ Transaction and message signing\n- 🔒 Secure key management via [Lit Protocol](https://litprotocol.com)\n- 🚀 Simple, serverside-focused API\n- ⚡ Lightweight and efficient\n\n## Installation\n\n```bash\nnpm install @lit-protocol/lit-agent-signer\n# or\nyarn add @lit-protocol/lit-agent-signer\n```\n\n## Quick Start\n\n```typescript\nimport { LitClient } from '@lit-protocol/lit-agent-signer';\n\n// Initialize the client with your Lit auth key\nconst client = await LitClient.create(process.env.LIT_AUTH_KEY);\n\n// Create a new wallet\nconst { pkp } = await client.createWallet();\nconsole.log('Wallet created:', pkp);\n\n// Sign a transaction or message\nconst signedMessage = await client.sign({\n  toSign: '0x8111e78458fec7fb123fdfe3c559a1f7ae33bf21bf81d1bad589e9422c648cbd',\n});\nconsole.log('Message signed:', signedMessage);\n```\n\n## Usage Guide\n\n### Initialization\n\nFirst, initialize the client with your Lit authentication key:\n\n```typescript\nconst client = await LitClient.create(authKey);\n```\n\n### Wallet Management\n\nCreate a new wallet:\n\n```typescript\nconst { pkp } = await client.createWallet();\n```\n\nGet existing wallet:\n\n```typescript\nconst pkp = client.getPkp();\n```\n\n### Signing\n\nSign a message or transaction:\n\n```typescript\nconst signedMessage = await client.sign({\n  toSign: '0x8111e78458fec7fb123fdfe3c559a1f7ae33bf21bf81d1bad589e9422c648cbd',\n});\n```\n\n### Execute JavaScript Code\n\nYou can also execute JavaScript code using Lit Protocol:\n\n```typescript\nconst result = await client.executeJs({\n  code: `\n    Lit.Actions.setResponse({ response: message + \" - processed by Lit Protocol\" });\n  `,\n  jsParams: {\n    message: 'Hello',\n  },\n});\n```\n\n### Cleanup\n\nWhen you're done, disconnect the client:\n\n```typescript\nawait client.disconnect();\n```\n\n## Environment Variables\n\nMake sure to set up the following environment variable:\n\n- `LIT_AUTH_KEY`: Your Lit Protocol authentication key\n\n## Examples\n\nCheck out the `examples` directory for more detailed examples:\n\n- `basic-usage.ts`: Complete example showing all main features\n- `minimal-signing.ts`: Minimal example focused on transaction signing\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nMIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flit-protocol%2Flit-agent-signer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flit-protocol%2Flit-agent-signer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flit-protocol%2Flit-agent-signer/lists"}