{"_id":"@credenza3/evm-wallet","_rev":"5-a849bf5d231c95e1d52e3a643a0a8c83","name":"@credenza3/evm-wallet","dist-tags":{"latest":"0.0.1","alpha":"0.0.1-alpha.2","rc":"0.0.1-rc.1"},"versions":{"0.0.1-alpha.0":{"name":"@credenza3/evm-wallet","version":"0.0.1-alpha.0","_id":"@credenza3/evm-wallet@0.0.1-alpha.0","maintainers":[{"name":"mike.avvad","email":"mike.avvad@credenza3.com"},{"name":"credenza","email":"dmytro.fokin@credenza3.com"},{"name":"fokindmitr","email":"fokindmitr@gmail.com"}],"homepage":"https://github.com/credenza-web3/credenza-core-web-sdk#readme","bugs":{"url":"https://github.com/credenza-web3/credenza-core-web-sdk/issues"},"dist":{"shasum":"323d9d22b586514fb40cb0e972270fb904afa0e7","tarball":"https://registry.npmjs.org/@credenza3/evm-wallet/-/evm-wallet-0.0.1-alpha.0.tgz","fileCount":11,"integrity":"sha512-8TDpjkJIEZijnyVR48N8J/Ay3o/0+mqPLWF+SrqND4rzguz8jnbstd3jlmi6vLXr+CKMbQwFvuhOdMtMtmoIeA==","signatures":[{"sig":"MEYCIQDhEu9i0xr6QCyGMZCyj9dY1PDSDepuIWUBYg/Vc3rfgAIhAK5c6zj0Byg2XgqOB5aLS6NNdCrLLaKNnl5V/CXdYuVg","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":38118},"main":"dist/index.cjs","type":"module","_from":"file:credenza3-evm-wallet-0.0.1-alpha.0.tgz","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":{"import":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"test":"jest","build":"tsup"},"_npmUser":{"name":"fokindmitr","email":"fokindmitr@gmail.com"},"_resolved":"/private/var/folders/r3/xt2nm3q146720_d964xyl9pm0000gn/T/5f1643e742660fe16d91212342e6d4c5/credenza3-evm-wallet-0.0.1-alpha.0.tgz","_integrity":"sha512-8TDpjkJIEZijnyVR48N8J/Ay3o/0+mqPLWF+SrqND4rzguz8jnbstd3jlmi6vLXr+CKMbQwFvuhOdMtMtmoIeA==","repository":{"url":"git+https://github.com/credenza-web3/credenza-core-web-sdk.git","type":"git"},"_npmVersion":"11.6.1","directories":{},"_nodeVersion":"24.11.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^30.2.0","tsup":"^8.5.1","dotenv":"^17.2.3","ethers":"^6.15.0","ts-jest":"^29.4.5","typescript":"^5.9.3","@types/jest":"^30.0.0"},"_npmOperationalInternal":{"tmp":"tmp/evm-wallet_0.0.1-alpha.0_1763392834784_0.48235748120556843","host":"s3://npm-registry-packages-npm-production"}},"0.0.1-alpha.1":{"name":"@credenza3/evm-wallet","version":"0.0.1-alpha.1","_id":"@credenza3/evm-wallet@0.0.1-alpha.1","maintainers":[{"name":"mike.avvad","email":"mike.avvad@credenza3.com"},{"name":"credenza","email":"dmytro.fokin@credenza3.com"},{"name":"fokindmitr","email":"fokindmitr@gmail.com"}],"homepage":"https://github.com/credenza-web3/credenza-core-web-sdk#readme","bugs":{"url":"https://github.com/credenza-web3/credenza-core-web-sdk/issues"},"dist":{"shasum":"18d37dc0c9ea546b65c9a35bf4d448181d1ce4cc","tarball":"https://registry.npmjs.org/@credenza3/evm-wallet/-/evm-wallet-0.0.1-alpha.1.tgz","fileCount":12,"integrity":"sha512-aKTRM6sFjsghx44A5rcrbjW3ZZLBrZhpwbrJsUDhNbGiVBZVbinrBV3wuVG+n4BUq4fFcfUcPjb8fXAv2YE1AA==","signatures":[{"sig":"MEQCIFJYCXWiukWr9rjB8zAro/iSJI1Jv/1WqdEBwsqhlkY0AiBBFAoXYA0Pth784X/98VoZO4dtboMi/CwuXhpoMMXmZw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":39228},"main":"dist/index.cjs","type":"module","_from":"file:credenza3-evm-wallet-0.0.1-alpha.1.tgz","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":{"import":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"test":"jest","build":"tsup"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:846798cc-361f-459b-badc-1fd336f6c48f"}},"_resolved":"/tmp/c1133efbe7fdc33b87562cd174686e06/credenza3-evm-wallet-0.0.1-alpha.1.tgz","_integrity":"sha512-aKTRM6sFjsghx44A5rcrbjW3ZZLBrZhpwbrJsUDhNbGiVBZVbinrBV3wuVG+n4BUq4fFcfUcPjb8fXAv2YE1AA==","repository":{"url":"git+https://github.com/credenza-web3/credenza-core-web-sdk.git","type":"git"},"_npmVersion":"11.6.2","directories":{},"_nodeVersion":"24.11.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^30.2.0","tsup":"^8.5.1","dotenv":"^17.2.3","ethers":"^6.15.0","ts-jest":"^29.4.5","typescript":"^5.9.3","@types/jest":"^30.0.0"},"_npmOperationalInternal":{"tmp":"tmp/evm-wallet_0.0.1-alpha.1_1763395908825_0.04140434062859133","host":"s3://npm-registry-packages-npm-production"}},"0.0.1-alpha.2":{"name":"@credenza3/evm-wallet","version":"0.0.1-alpha.2","_id":"@credenza3/evm-wallet@0.0.1-alpha.2","maintainers":[{"name":"mike.avvad","email":"mike.avvad@credenza3.com"},{"name":"credenza","email":"dmytro.fokin@credenza3.com"},{"name":"fokindmitr","email":"fokindmitr@gmail.com"}],"homepage":"https://github.com/credenza-web3/evm-wallet#readme","bugs":{"url":"https://github.com/credenza-web3/evm-wallet/issues"},"dist":{"shasum":"ac593b113212a7ba0e0a054f578fad15f4b8334c","tarball":"https://registry.npmjs.org/@credenza3/evm-wallet/-/evm-wallet-0.0.1-alpha.2.tgz","fileCount":10,"integrity":"sha512-n7A801ktGRmk2s1si5+wQmouhEY0I9UlzLBuLZB/pQ/pTFTK3sHITWpjVV3zkVEl2T2iLffqqRKMYSG3/BG1Yw==","signatures":[{"sig":"MEUCIQD/0AOL0JqycmO0ICd2gpyYVNvZvUvJmShl8lBp6GEviwIgCZow+3aFXtqTJCoOsCHOtjh/9A0yF4/R1eNK0NKpLM8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":37977},"main":"dist/index.cjs","type":"module","_from":"file:credenza3-evm-wallet-0.0.1-alpha.2.tgz","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":{"import":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"test":"jest","build":"tsup"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:846798cc-361f-459b-badc-1fd336f6c48f"}},"_resolved":"/tmp/8d0542e465e408f43c8e30b0f0e681ef/credenza3-evm-wallet-0.0.1-alpha.2.tgz","_integrity":"sha512-n7A801ktGRmk2s1si5+wQmouhEY0I9UlzLBuLZB/pQ/pTFTK3sHITWpjVV3zkVEl2T2iLffqqRKMYSG3/BG1Yw==","repository":{"url":"git+https://github.com/credenza-web3/evm-wallet.git","type":"git"},"_npmVersion":"11.6.2","directories":{},"_nodeVersion":"24.11.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^30.2.0","tsup":"^8.5.1","dotenv":"^17.2.3","ethers":"^6.15.0","ts-jest":"^29.4.5","typescript":"^5.9.3","@types/jest":"^30.0.0"},"_npmOperationalInternal":{"tmp":"tmp/evm-wallet_0.0.1-alpha.2_1763446652089_0.5510697120000505","host":"s3://npm-registry-packages-npm-production"}},"0.0.1-rc.1":{"name":"@credenza3/evm-wallet","version":"0.0.1-rc.1","_id":"@credenza3/evm-wallet@0.0.1-rc.1","maintainers":[{"name":"mike.avvad","email":"mike.avvad@credenza3.com"},{"name":"credenza","email":"dmytro.fokin@credenza3.com"},{"name":"fokindmitr","email":"fokindmitr@gmail.com"}],"homepage":"https://github.com/credenza-web3/evm-wallet#readme","bugs":{"url":"https://github.com/credenza-web3/evm-wallet/issues"},"dist":{"shasum":"f5c88390fd564a7911fc7054af28b6d5c1be3943","tarball":"https://registry.npmjs.org/@credenza3/evm-wallet/-/evm-wallet-0.0.1-rc.1.tgz","fileCount":11,"integrity":"sha512-jYtX9Zd/ThKPGH13GpDRgooSy23rKSEKxxPUrOXZOBIC6AogkiTTHmNaJQXgN/i7mq+AvoF45LMn1muEXcipdg==","signatures":[{"sig":"MEYCIQDVQSXE5p2Fe2bu/jXpl4wwxlcBlaGBkKXDCdymTs5S7AIhAL83gPwgDtT2smvTpfLTEakRrGWO3P7bMzGyzQQ4ZC8w","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":46967},"main":"dist/index.cjs","type":"module","_from":"file:credenza3-evm-wallet-0.0.1-rc.1.tgz","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":{"import":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"test":"jest","build":"tsup"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:846798cc-361f-459b-badc-1fd336f6c48f"}},"_resolved":"/tmp/0f652321d09598baf01013eb6cd642fe/credenza3-evm-wallet-0.0.1-rc.1.tgz","_integrity":"sha512-jYtX9Zd/ThKPGH13GpDRgooSy23rKSEKxxPUrOXZOBIC6AogkiTTHmNaJQXgN/i7mq+AvoF45LMn1muEXcipdg==","repository":{"url":"git+https://github.com/credenza-web3/evm-wallet.git","type":"git"},"_npmVersion":"11.6.2","description":"A TypeScript/JavaScript library that provides an EIP-1193 compatible Ethereum wallet interface for the Credenza3 platform. This library enables seamless integration with popular Ethereum libraries like ethers.js.","directories":{},"_nodeVersion":"24.11.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^30.2.0","tsup":"^8.5.1","dotenv":"^17.2.3","ethers":"^6.15.0","ts-jest":"^29.4.5","typescript":"^5.9.3","@types/jest":"^30.0.0"},"_npmOperationalInternal":{"tmp":"tmp/evm-wallet_0.0.1-rc.1_1763544095058_0.7435359110638871","host":"s3://npm-registry-packages-npm-production"}},"0.0.1":{"name":"@credenza3/evm-wallet","version":"0.0.1","type":"module","main":"dist/index.cjs","module":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"import":"./dist/index.js","require":"./dist/index.cjs"}},"repository":{"type":"git","url":"git+https://github.com/credenza-web3/evm-wallet.git"},"publishConfig":{"access":"public"},"devDependencies":{"@types/jest":"^30.0.0","dotenv":"^17.2.3","ethers":"^6.15.0","jest":"^30.2.0","ts-jest":"^29.4.5","tsup":"^8.5.1","typescript":"^5.9.3"},"scripts":{"test":"jest","build":"tsup"},"_id":"@credenza3/evm-wallet@0.0.1","description":"A TypeScript/JavaScript library that provides an EIP-1193 compatible Ethereum wallet interface for the Credenza3 platform. This library enables seamless integration with popular Ethereum libraries like ethers.js.","bugs":{"url":"https://github.com/credenza-web3/evm-wallet/issues"},"homepage":"https://github.com/credenza-web3/evm-wallet#readme","_integrity":"sha512-LLGHVVnSDZYPiwkqgRfK9rUDPpUUr67eAVNusNSh0Qvgdh7yrmbagOFsVb/kCEOLBN7ZeBTz9C0ud52vRvvlTA==","_resolved":"/tmp/57e5ee405967545420bc44e0833f624f/credenza3-evm-wallet-0.0.1.tgz","_from":"file:credenza3-evm-wallet-0.0.1.tgz","_nodeVersion":"24.11.1","_npmVersion":"11.6.2","dist":{"integrity":"sha512-LLGHVVnSDZYPiwkqgRfK9rUDPpUUr67eAVNusNSh0Qvgdh7yrmbagOFsVb/kCEOLBN7ZeBTz9C0ud52vRvvlTA==","shasum":"98f1c79a37795ce527a5122f159e3b9e70fc7e4a","tarball":"https://registry.npmjs.org/@credenza3/evm-wallet/-/evm-wallet-0.0.1.tgz","fileCount":11,"unpackedSize":46962,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@credenza3%2fevm-wallet@0.0.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIAWodF8acYQLR/0UM1z7lOmPR00bymMIxJ0GHOMZYp2oAiBUPjLllLqjCQReZlnwekgz3V2Hp7aoG97myj1jaRa7rw=="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:846798cc-361f-459b-badc-1fd336f6c48f"}},"directories":{},"maintainers":[{"name":"mike.avvad","email":"mike.avvad@credenza3.com"},{"name":"credenza","email":"dmytro.fokin@credenza3.com"},{"name":"fokindmitr","email":"fokindmitr@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/evm-wallet_0.0.1_1763553143632_0.395998003931767"},"_hasShrinkwrap":false}},"time":{"created":"2025-11-17T15:20:34.708Z","modified":"2025-11-19T11:52:24.367Z","0.0.1-alpha.0":"2025-11-17T15:20:34.965Z","0.0.1-alpha.1":"2025-11-17T16:11:49.000Z","0.0.1-alpha.2":"2025-11-18T06:17:32.291Z","0.0.1-rc.1":"2025-11-19T09:21:35.240Z","0.0.1":"2025-11-19T11:52:23.824Z"},"bugs":{"url":"https://github.com/credenza-web3/evm-wallet/issues"},"homepage":"https://github.com/credenza-web3/evm-wallet#readme","repository":{"type":"git","url":"git+https://github.com/credenza-web3/evm-wallet.git"},"maintainers":[{"name":"mike.avvad","email":"mike.avvad@credenza3.com"},{"name":"credenza","email":"dmytro.fokin@credenza3.com"},{"name":"fokindmitr","email":"fokindmitr@gmail.com"}],"readme":"# Credenza3 EVM Wallet\n\nA TypeScript/JavaScript library that provides an EIP-1193 compatible Ethereum wallet interface for the Credenza3 platform. This library enables seamless integration with popular Ethereum libraries like ethers.js.\n\n## Features\n\n- ✅ **EIP-1193 Compatible** - Works with ethers.js and other standard Ethereum libraries\n- 🔐 **Secure Authentication** - Token-based authentication with Credenza3 API\n- 📝 **Message Signing** - Support for personal_sign and typed data signing (EIP-712)\n- 💸 **Transaction Management** - Sign and send Ethereum transactions\n- 🔄 **Flexible Configuration** - Dynamic RPC and API URL configuration\n- 🛡️ **Error Handling** - Custom error types with detailed error information\n\n## Installation\n\n```bash\nnpm install @credenza3/evm-wallet\n```\n\n```bash\nyarn add @credenza3/evm-wallet\n```\n\n```bash\npnpm add @credenza3/evm-wallet\n```\n\n## Quick Start\n\n```typescript\nimport { Credenza3Wallet } from '@credenza3/evm-wallet';\n\n// Initialize the wallet\nconst wallet = new Credenza3Wallet({\n  rpcUrl: 'https://eth-mainnet.g.alchemy.com/v2/your-api-key',\n  apiUrl: 'https://api.credenza3.com'\n});\n\n// Set access token (required for signing operations)\nwallet.setAccessToken('your-access-token');\n\n// Use with ethers.js\nimport { BrowserProvider } from 'ethers';\nconst provider = new BrowserProvider(wallet);\nconst signer = await provider.getSigner();\n```\n\n## Usage\n\n### Basic Configuration\n\n```typescript\nimport { Credenza3Wallet } from '@credenza3/evm-wallet';\n\nconst wallet = new Credenza3Wallet({\n  rpcUrl: 'https://mainnet.infura.io/v3/YOUR_INFURA_KEY',\n  apiUrl: 'https://api.credenza3.com'\n});\n\n// Set authentication token\nwallet.setAccessToken('your-jwt-token');\n```\n\n### Making Direct RPC Calls\n\nThe wallet implements the EIP-1193 `request` method for direct JSON-RPC calls:\n\n```typescript\n// Get accounts\nconst accounts = await wallet.request({ \n  method: 'eth_accounts' \n});\n\n// Get balance\nconst balance = await wallet.request({\n  method: 'eth_getBalance',\n  params: ['0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb']\n});\n\n// Get block number\nconst blockNumber = await wallet.request({\n  method: 'eth_blockNumber'\n});\n```\n\n### Signing Messages\n\n```typescript\n// Personal sign\nconst signature = await wallet.request({\n  method: 'personal_sign',\n  params: ['Hello, Credenza3!', '0xYourAddress']\n});\n\n// Typed data signing (EIP-712)\nconst typedData = {\n  domain: {\n    name: 'MyDApp',\n    version: '1',\n    chainId: 1,\n    verifyingContract: '0x...'\n  },\n  types: {\n    Person: [\n      { name: 'name', type: 'string' },\n      { name: 'wallet', type: 'address' }\n    ]\n  },\n  primaryType: 'Person',\n  message: {\n    name: 'Alice',\n    wallet: '0x...'\n  }\n};\n\nconst typedSignature = await wallet.request({\n  method: 'eth_signTypedData_v4',\n  params: ['0xYourAddress', JSON.stringify(typedData)]\n});\n```\n\n### Transaction Operations\n\n```typescript\n// Sign a transaction\nconst signedTx = await wallet.request({\n  method: 'eth_signTransaction',\n  params: [{\n    from: '0xYourAddress',\n    to: '0xRecipientAddress',\n    value: '0x1000000000000000', // 0.001 ETH in wei\n    gas: '0x5208',\n    gasPrice: '0x...'\n  }]\n});\n\n// Send a transaction (signs and broadcasts)\nconst txHash = await wallet.request({\n  method: 'eth_sendTransaction',\n  params: [{\n    from: '0xYourAddress',\n    to: '0xRecipientAddress',\n    value: '0x1000000000000000'\n  }]\n});\n```\n\n### Using with Ethers.js\n\nThe wallet is fully compatible with ethers.js v6:\n\n```typescript\nimport { BrowserProvider } from 'ethers';\n\nconst provider = new BrowserProvider(wallet);\nconst signer = await provider.getSigner();\n\n// Get address\nconst address = await signer.getAddress();\n\n// Sign message\nconst signature = await signer.signMessage('Hello World');\n\n// Send transaction\nconst tx = await signer.sendTransaction({\n  to: '0xRecipientAddress',\n  value: ethers.parseEther('0.001')\n});\nawait tx.wait();\n\n// Sign typed data\nconst signature = await signer.signTypedData(domain, types, message);\n```\n\n### Dynamic Configuration\n\nUpdate configuration at runtime:\n\n```typescript\n// Update RPC URL (e.g., switch networks)\nwallet.setRpcUrl('https://polygon-rpc.com');\n\n// Update API URL\nwallet.setApiUrl('https://api.credenza3.com');\n\n// Update access token (e.g., after re-authentication)\nwallet.setAccessToken('new-access-token');\n```\n\n## API Reference\n\n### Constructor\n\n#### `new Credenza3Wallet(options)`\n\nCreates a new wallet instance.\n\n**Parameters:**\n- `options.rpcUrl` (string): Ethereum JSON-RPC endpoint URL\n- `options.apiUrl` (string): Credenza3 API base URL\n\n**Example:**\n```typescript\nconst wallet = new Credenza3Wallet({\n  rpcUrl: 'https://mainnet.infura.io/v3/YOUR_KEY',\n  apiUrl: 'https://api.credenza3.com'\n});\n```\n\n### Methods\n\n#### `request(options)`\n\nImplements EIP-1193 request method for making JSON-RPC calls.\n\n**Parameters:**\n- `options.method` (string): JSON-RPC method name\n- `options.params` (array, optional): Method parameters\n\n**Returns:** Promise<any>\n\n**Throws:** `Credenza3WalletError`\n\n#### `setAccessToken(token)`\n\nSets the authentication token for API requests.\n\n**Parameters:**\n- `token` (string): JWT access token\n\n#### `setRpcUrl(url)`\n\nUpdates the RPC endpoint URL.\n\n**Parameters:**\n- `url` (string): New RPC URL\n\n#### `setApiUrl(url)`\n\nUpdates the Credenza3 API URL.\n\n**Parameters:**\n- `url` (string): New API base URL\n\n## Supported Methods\n\n### Methods Routed to Credenza3 API\nThese methods require authentication and are handled by the Credenza3 backend:\n\n- `eth_accounts` - Get wallet accounts\n- `eth_sign` - Sign data (deprecated, may throw)\n- `personal_sign` - Sign messages\n- `eth_signTypedData` - Sign typed data (v1)\n- `eth_signTypedData_v3` - Sign typed data (v3)\n- `eth_signTypedData_v4` - Sign typed data (v4, recommended)\n- `eth_signTransaction` - Sign transactions\n- `eth_sendTransaction` - Sign and send transactions\n\n### Methods Routed to RPC Provider\nAll other standard Ethereum JSON-RPC methods are forwarded to your configured RPC endpoint:\n\n- `eth_blockNumber`\n- `eth_getBalance`\n- `eth_getTransactionCount`\n- `eth_getTransactionReceipt`\n- `eth_call`\n- `eth_estimateGas`\n- And more...\n\n## Error Handling\n\nThe library provides a custom error class with detailed error information:\n\n```typescript\nimport { Credenza3WalletError } from '@credenza3/evm-wallet';\n\ntry {\n  const accounts = await wallet.request({ method: 'eth_accounts' });\n} catch (error) {\n  if (error instanceof Credenza3WalletError) {\n    console.error('Error code:', error.code);\n    console.error('Error message:', error.message);\n    console.error('Error data:', error.data);\n  }\n}\n```\n\n### Error Codes\n\n- `4100` - Unauthorized (no access token)\n- `4000` - Internal error (HTTP request failed)\n- Other codes - JSON-RPC error codes from the provider\n\n## TypeScript Support\n\nThe library is written in TypeScript and includes full type definitions:\n\n```typescript\nimport { \n  Credenza3Wallet,\n  Credenza3WalletError,\n  TCredenza3WalletOptions \n} from '@credenza3/evm-wallet';\n\nconst options: TCredenza3WalletOptions = {\n  rpcUrl: 'https://...',\n  apiUrl: 'https://...'\n};\n\nconst wallet = new Credenza3Wallet(options);\n```\n\n## Security Best Practices\n\n1. **Never hardcode access tokens** - Load them from environment variables or secure storage\n2. **Use HTTPS endpoints** - Always use secure connections for RPC and API URLs\n3. **Rotate tokens regularly** - Implement token refresh mechanisms\n4. **Handle errors gracefully** - Don't expose sensitive error details to end users\n5. **Validate user input** - Always validate addresses and transaction parameters\n\n## Examples\n\n### Complete Integration Example\n\n```typescript\nimport { Credenza3Wallet } from '@credenza3/evm-wallet';\nimport { BrowserProvider, parseEther } from 'ethers';\n\nasync function main() {\n  // Initialize wallet\n  const wallet = new Credenza3Wallet({\n    rpcUrl: process.env.RPC_URL!,\n    apiUrl: process.env.API_URL!\n  });\n  \n  // Authenticate\n  wallet.setAccessToken(process.env.ACCESS_TOKEN!);\n  \n  // Setup provider\n  const provider = new BrowserProvider(wallet);\n  const signer = await provider.getSigner();\n  \n  // Get account info\n  const address = await signer.getAddress();\n  const balance = await provider.getBalance(address);\n  \n  console.log('Address:', address);\n  console.log('Balance:', balance.toString());\n  \n  // Send transaction\n  const tx = await signer.sendTransaction({\n    to: '0xRecipientAddress',\n    value: parseEther('0.001')\n  });\n  \n  console.log('Transaction hash:', tx.hash);\n  await tx.wait();\n  console.log('Transaction confirmed!');\n}\n\nmain().catch(console.error);\n```\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## Repository\n\n[https://github.com/credenza-web3/evm-wallet](https://github.com/credenza-web3/evm-wallet)\n\n## License\n\nSee the LICENSE file in the repository for license information.\n\n## Support\n\nFor issues, questions, or contributions, please visit the [GitHub repository](https://github.com/credenza-web3/evm-wallet).","readmeFilename":"README.md","description":"A TypeScript/JavaScript library that provides an EIP-1193 compatible Ethereum wallet interface for the Credenza3 platform. This library enables seamless integration with popular Ethereum libraries like ethers.js."}