{"_id":"@0xsequence/aws-kms-signer","_rev":"1-637e1d2e6b3d2d032a79250bb0fea9be","name":"@0xsequence/aws-kms-signer","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@0xsequence/aws-kms-signer","version":"0.1.0","keywords":["ethers","sequence","aws","kms","signer"],"_id":"@0xsequence/aws-kms-signer@0.1.0","maintainers":[{"name":"naivesheep","email":"wh@horizongames.net"},{"name":"pkieltyka","email":"pk@horizon.io"},{"name":"agusx1211","email":"agusxrun@gmail.com"},{"name":"taylanpince","email":"taylan@hipolabs.com"},{"name":"milkytaste","email":"screaminghawk@gmail.com"}],"dist":{"shasum":"10f46a2f44256d3b6b6338fef98397e1cbce14e2","tarball":"https://registry.npmjs.org/@0xsequence/aws-kms-signer/-/aws-kms-signer-0.1.0.tgz","fileCount":14,"integrity":"sha512-nSDXVEqxLd+H+WbtXUe3MgI3jShDWQAL5/oE7F32ncPXUj8A2yvXt8hP6BS8CIRyAy3tS1gixY6EwmMoV35qew==","signatures":[{"sig":"MEUCIAxqkomwcPQ6swOCJNuewKX9B2Xr744JkMlu7jZMkz58AiEArvXRIDCZYCGIqLtkBn2/8t7Is9vYE9LLpfrhlEZWvN8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":17711},"main":"./dist/cjs/index.js","type":"module","_from":"file:0xsequence-aws-kms-signer-0.1.0.tgz","types":"./dist/types/index.d.ts","module":"./dist/esm/index.js","exports":{".":{"types":"./dist/types/index.d.ts","import":"./dist/esm/index.js","require":"./dist/cjs/index.js"}},"scripts":{"docs":"typedoc","lint":"biome lint ./src","test":"concurrently \"anvil\" \"wait-on tcp:8545 && vitest\"","build":"rimraf dist && pnpm run build:esm && pnpm run build:cjs && pnpm run build:types","check":"biome check ./src","format":"biome format --write ./src","release":"npm run build && changeset publish --access public","version":"changeset version","build:cjs":"tsc -p tsconfig/cjs.json","build:esm":"tsc -p tsconfig/esm.json","changeset":"changeset","docs:watch":"typedoc --watch","build:types":"tsc -p tsconfig/types.json"},"_npmUser":{"name":"pkieltyka","email":"pk@horizon.io"},"_resolved":"/private/var/folders/fl/wwk4592n7jq38cl74c3wntb80000gn/T/cbb5af3df9d8eba47dd7052a5cd589d3/0xsequence-aws-kms-signer-0.1.0.tgz","_integrity":"sha512-nSDXVEqxLd+H+WbtXUe3MgI3jShDWQAL5/oE7F32ncPXUj8A2yvXt8hP6BS8CIRyAy3tS1gixY6EwmMoV35qew==","_npmVersion":"10.9.2","description":"An ethers.js and sequence.js-compatible signer using AWS Key Management Service keys.","directories":{},"_nodeVersion":"23.7.0","dependencies":{"ethers":"^6.13.5","@0xsequence/auth":"^2.2.13","@peculiar/asn1-ecc":"^2.3.15","@aws-sdk/client-kms":"^3.750.0","@peculiar/asn1-x509":"^2.3.15","@0xsequence/provider":"^2.2.13","@ethersproject/bytes":"^5.7.0","@peculiar/asn1-schema":"^2.3.15","@ethersproject/properties":"^5.7.0","@ethersproject/signing-key":"^5.7.0","@ethersproject/transactions":"^5.7.0"},"_hasShrinkwrap":false,"devDependencies":{"dotenv":"^16.4.7","rimraf":"^5.0.0","vitest":"^3.0.0","typedoc":"^0.25.0","wait-on":"^7.2.0","typescript":"^5.7.0","concurrently":"^8.2.2","@biomejs/biome":"1.5.3","@changesets/cli":"^2.27.11"},"peerDependencies":{"typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/aws-kms-signer_0.1.0_1740684521426_0.3909786439383025","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@0xsequence/aws-kms-signer","version":"0.1.1","access":"public","github":"https://github.com/0xsequence/aws-kms-signer","type":"module","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","types":"./dist/types/index.d.ts","description":"An ethers.js and sequence.js-compatible signer using AWS Key Management Service keys.","keywords":["ethers","sequence","aws","kms","signer"],"exports":{".":{"types":"./dist/types/index.d.ts","import":"./dist/esm/index.js","require":"./dist/cjs/index.js"}},"devDependencies":{"@biomejs/biome":"1.5.3","@changesets/cli":"^2.27.11","concurrently":"^8.2.2","dotenv":"^16.4.7","rimraf":"^5.0.0","typedoc":"^0.25.0","typescript":"^5.7.0","vitest":"^3.0.0","wait-on":"^7.2.0"},"peerDependencies":{"typescript":"^5.0.0"},"dependencies":{"@0xsequence/auth":"^2.2.13","@0xsequence/provider":"^2.2.13","@aws-sdk/client-kms":"^3.750.0","@ethersproject/bytes":"^5.7.0","@ethersproject/properties":"^5.7.0","@ethersproject/signing-key":"^5.7.0","@ethersproject/transactions":"^5.7.0","@peculiar/asn1-ecc":"^2.3.15","@peculiar/asn1-schema":"^2.3.15","@peculiar/asn1-x509":"^2.3.15","ethers":"^6.13.5","tslib":"^2.6.2"},"scripts":{"build":"rimraf dist && pnpm run build:esm && pnpm run build:cjs && pnpm run build:types","build:esm":"tsc -p tsconfig/esm.json","build:cjs":"tsc -p tsconfig/cjs.json","build:types":"tsc -p tsconfig/types.json","docs":"typedoc","docs:watch":"typedoc --watch","format":"biome format --write ./src","lint":"biome lint ./src","check":"biome check ./src","test":"concurrently \"anvil\" \"wait-on tcp:8545 && vitest\"","changeset":"changeset","version":"changeset version","release":"pnpm run build && changeset publish --access public"},"_id":"@0xsequence/aws-kms-signer@0.1.1","_integrity":"sha512-yG881+QzyBogrt3ILNVbo1slTF2NUuz1ftT9nZkg32kMQe2T1ZBxJaOUWeeSQ683ToxdtpLyeIAuU4itGbDWoA==","_resolved":"/private/var/folders/g6/0nm7fcp56d12by2dwrqvsvww0000gn/T/87b2c8ccf8893ca5fe540ebbd40db1a2/0xsequence-aws-kms-signer-0.1.1.tgz","_from":"file:0xsequence-aws-kms-signer-0.1.1.tgz","_nodeVersion":"18.20.6","_npmVersion":"10.8.2","dist":{"integrity":"sha512-yG881+QzyBogrt3ILNVbo1slTF2NUuz1ftT9nZkg32kMQe2T1ZBxJaOUWeeSQ683ToxdtpLyeIAuU4itGbDWoA==","shasum":"e7049791fab2a6a0307d3eaecc04141897117c53","tarball":"https://registry.npmjs.org/@0xsequence/aws-kms-signer/-/aws-kms-signer-0.1.1.tgz","fileCount":8,"unpackedSize":16941,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDaCWKMJeUnbMhIA1JKB4Ay0Ld1z9xHtyQJoF0G/nfqKAIgMa2LVhm/BAm3R+sQ9S+syTDnsLrvyaEd1s46JddPELA="}]},"_npmUser":{"name":"taylanpince","email":"taylan@hipolabs.com"},"directories":{},"maintainers":[{"name":"naivesheep","email":"wh@horizongames.net"},{"name":"pkieltyka","email":"pk@horizon.io"},{"name":"agusx1211","email":"agusxrun@gmail.com"},{"name":"taylanpince","email":"taylan@hipolabs.com"},{"name":"milkytaste","email":"screaminghawk@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/aws-kms-signer_0.1.1_1740741456960_0.2940411273563781"},"_hasShrinkwrap":false}},"time":{"created":"2025-02-27T19:28:41.366Z","modified":"2025-02-28T11:17:37.875Z","0.1.0":"2025-02-27T19:28:41.624Z","0.1.1":"2025-02-28T11:17:37.357Z"},"keywords":["ethers","sequence","aws","kms","signer"],"description":"An ethers.js and sequence.js-compatible signer using AWS Key Management Service keys.","maintainers":[{"name":"naivesheep","email":"wh@horizongames.net"},{"name":"pkieltyka","email":"pk@horizon.io"},{"name":"agusx1211","email":"agusxrun@gmail.com"},{"name":"taylanpince","email":"taylan@hipolabs.com"},{"name":"milkytaste","email":"screaminghawk@gmail.com"}],"readme":"# aws-kms-signer\n\nAn [ethers.js](https://ethers.org) and [sequence.js](https://github.com/0xsequence/sequence.js)-compatible signer using [AWS Key Management Service](https://aws.amazon.com/kms/) keys.\n\n## Prerequisites\n\n### Set up AWS KMS\n\n1. Create an AWS account if you don't have one\n2. Go to AWS KMS in your AWS Console: https://console.aws.amazon.com/kms\n3. Switch to your desired region (e.g., us-east-1)\n4. Click \"Create key\"\n5. Choose these settings:\n   - Key type: `Asymmetric`\n   - Key usage: `Sign and verify`\n   - Key spec: `ECC_SECG_P256K1` (This is crucial for Ethereum compatibility)\n   - Alias: Give your key a name (e.g., `eth-signer`)\n6. Configure key administrative permissions and key usage permissions as needed\n7. Create the key\n\n### Get AWS Credentials\n\n1. Go to AWS IAM Console: https://console.aws.amazon.com/iam\n2. Create a new IAM user or select an existing one\n3. Under \"Security credentials\", create new access keys\n4. Save these values - you'll need them for environment variables:\n   - AWS_ACCESS_KEY_ID\n   - AWS_SECRET_ACCESS_KEY\n   - AWS_REGION (the region where you created your key)\n   - AWS_KMS_KEY_ID (the ARN of your key, looks like: `arn:aws:kms:region:account:key/key-id`)\n\n## Installation\n\n```bash\nnpm install @0xsequence/aws-kms-signer\n# or\nyarn add @0xsequence/aws-kms-signer\n# or\npnpm add @0xsequence/aws-kms-signer\n```\n\n## Usage\n\n### Basic Setup\n\n```typescript\nimport { AwsKmsSigner } from 'aws-kms-signer'\nimport { KMSClient } from '@aws-sdk/client-kms'\n\nconst signer = new AwsKmsSigner(\n  process.env.AWS_REGION,\n  process.env.AWS_KMS_KEY_ID\n)\n```\n\n### Get Signer's Address\n\n```typescript\nconst address = await signer.getAddress()\nconsole.log('Signer address:', address)\n```\n\n### Sign a Message\n\n```typescript\nconst message = 'Hello World'\nconst signature = await signer.signMessage(message)\nconsole.log('Signature:', signature)\n```\n\n### Send a Transaction\n\n```typescript\nconst provider = new ethers.JsonRpcProvider('YOUR_RPC_URL')\nconst connectedSigner = signer.connect(provider)\n\nconst tx = {\n  to: '0x...',\n  value: 1\n}\n\nconst response = await connectedSigner.sendTransaction(tx)\nconst receipt = await response.wait()\nconsole.log('Transaction receipt:', receipt)\n```\n\n### Sign Typed Data (EIP-712)\n\n```typescript\nconst domain = {\n  name: 'My Dapp',\n  version: '1',\n  chainId: 1,\n  verifyingContract: '0x...'\n}\n\nconst types = {\n  Person: [\n    { name: 'name', type: 'string' },\n    { name: 'wallet', type: 'address' }\n  ]\n}\n\nconst value = {\n  name: 'John Doe',\n  wallet: '0x...'\n}\n\nconst signature = await signer.signTypedData(domain, types, value)\n```\n\n### Use with Sequence Wallet\n\n```typescript\nimport { Session } from '@0xsequence/auth'\nimport { AwsKmsSigner } from 'aws-kms-signer'\nimport { KMSClient } from '@aws-sdk/client-kms'\n\nconst signer = new AwsKmsSigner(\n  process.env.AWS_REGION,\n  process.env.AWS_KMS_KEY_ID\n)\n\nconst session = await Session.singleSigner({\n  signer,\n  projectAccessKey: 'YOUR_PROJECT_ACCESS_KEY'\n})\n\nconst tx = {\n  to: '0x...',\n  value: 1\n}\n\nconst chainId = 421614 //\n\nconst response = await session.account.sendTransaction(tx, chainId)\nconst receipt = await response.wait()\nconsole.log('Transaction receipt:', receipt)\n```\n\n## Development\n\n### Environment Setup\n\nCreate a `.env` file in the root directory:\n\n```env\nAWS_REGION=\nAWS_ACCESS_KEY_ID=\nAWS_SECRET_ACCESS_KEY=\nAWS_KMS_KEY_ID=\nPROJECT_ACCESS_KEY=\n```\n\n### Running Tests\n\n```bash\n# Install dependencies\npnpm install\n\n# Run tests\npnpm test\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}