{"_id":"@awakentax/crypto-tax","_rev":"5-af875489ecbd5c6f6564afddeeb95ef2","name":"@awakentax/crypto-tax","dist-tags":{"latest":"0.1.3"},"versions":{"0.1.0":{"name":"@awakentax/crypto-tax","version":"0.1.0","keywords":["tax","sdk","awaken"],"author":{"name":"Andrew Duca"},"license":"ISC","_id":"@awakentax/crypto-tax@0.1.0","maintainers":[{"name":"aduca98","email":"andrew@hubblepockets.com"},{"name":"andrewawaken","email":"andrew@awaken.tax"}],"dist":{"shasum":"1c52a7710264d1eac0f3828d4be3e874f4d924aa","tarball":"https://registry.npmjs.org/@awakentax/crypto-tax/-/crypto-tax-0.1.0.tgz","fileCount":10,"integrity":"sha512-lZfv3vFfB/jJLeIgD8hkBUDmi3DXIE0NEDT0rUiiD8G7xaKVa4qjvx1eWCfnNYOxbnKTkaDpKinB+e9rdiUbmQ==","signatures":[{"sig":"MEYCIQCaIBabv09Q7lmZ6kEPw1SQZmsVMD6xVvrdVGcLrjb+cQIhALYgoJL9Xd0I04MTgt5JkD6m5CDY8Qgb1J/AJu0b53If","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3370},"main":"./dist/index.js","types":"./dist/index.d.ts","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"}},"gitHead":"2096d054c896f80b72da1f438561293bd3ff5b4f","scripts":{"build":"tsc","clean":"rm -rf dist","prepack":"npm run build","publish":"npm publish --access public","typecheck":"tsc --noEmit","build:watch":"tsc --watch","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"andrewawaken","email":"andrew@awaken.tax"},"_npmVersion":"10.8.2","description":"Tax SDK for Awaken","directories":{},"_nodeVersion":"20.18.3","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.0.0","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/crypto-tax_0.1.0_1765585652108_0.33013577291408636","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@awakentax/crypto-tax","version":"0.1.1","keywords":["tax","sdk","awaken"],"author":{"name":"Andrew Duca"},"license":"ISC","_id":"@awakentax/crypto-tax@0.1.1","maintainers":[{"name":"aduca98","email":"andrew@hubblepockets.com"},{"name":"andrewawaken","email":"andrew@awaken.tax"}],"dist":{"shasum":"e8ca539e68c71f50d09e23ab3f28d1f358f96a9e","tarball":"https://registry.npmjs.org/@awakentax/crypto-tax/-/crypto-tax-0.1.1.tgz","fileCount":18,"integrity":"sha512-/QtjCJL2r2Gwzzxkc9Co84AXBE70QnurBiqXpxHaqC+UDDPI/FbH3bL81r1kfN9H9A+1yTy9eW0E++JL5p5etw==","signatures":[{"sig":"MEUCIHlr8N3vOb22uBQe79LbOUaEtRSRyFIQK3Eu0M8wOVJPAiEAvLJvSDRucgqAfn5//JuVkn2p6sTmT5dGE8AdrwvgE2Y=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":11133},"main":"./dist/cjs/index.js","types":"./dist/esm/index.d.ts","module":"./dist/esm/index.js","engines":{"node":">=18"},"exports":{".":{"types":"./dist/esm/index.d.ts","import":"./dist/esm/index.js","default":"./dist/esm/index.js","require":"./dist/cjs/index.js"}},"gitHead":"2096d054c896f80b72da1f438561293bd3ff5b4f","scripts":{"build":"npm run build:esm && npm run build:cjs","clean":"rm -rf dist","prepack":"npm run build","publish":"npm publish --access public","build:cjs":"tsc -p tsconfig.cjs.json","build:esm":"tsc","typecheck":"tsc --noEmit","build:watch":"npm run build:esm:watch & npm run build:cjs:watch","prepublishOnly":"npm run clean && npm run build","build:cjs:watch":"tsc -p tsconfig.cjs.json --watch","build:esm:watch":"tsc --watch"},"_npmUser":{"name":"andrewawaken","email":"andrew@awaken.tax"},"_npmVersion":"10.8.2","description":"Tax SDK for Awaken","directories":{},"sideEffects":false,"_nodeVersion":"20.18.3","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.0.0","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/crypto-tax_0.1.1_1765616128480_0.23479721883823945","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@awakentax/crypto-tax","version":"0.1.2","keywords":["tax","sdk","awaken"],"author":{"name":"Andrew Duca"},"license":"ISC","_id":"@awakentax/crypto-tax@0.1.2","maintainers":[{"name":"aduca98","email":"andrew@hubblepockets.com"},{"name":"andrewawaken","email":"andrew@awaken.tax"}],"dist":{"shasum":"81f1335a83c3b6c31fdf5fce58e3d398723d3ab5","tarball":"https://registry.npmjs.org/@awakentax/crypto-tax/-/crypto-tax-0.1.2.tgz","fileCount":18,"integrity":"sha512-cxcneMjvoGv+dpYLVgH9t34y1PFxq74aml2qMBZIdUUzcgcGTi5dgefWg7J0DdIYeCJyqpPbwq7l/A56flKe2g==","signatures":[{"sig":"MEYCIQDvKq9U2icJgDGAS3qNEW6ZzZqC4Yflmtdj0MiUY9+v4QIhAMSlRb97GauPUAdzcRuszEeysaMYvYk7SP18/2u3waJv","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":14611},"main":"./dist/cjs/index.js","types":"./dist/esm/index.d.ts","module":"./dist/esm/index.js","engines":{"node":">=18"},"exports":{".":{"types":"./dist/esm/index.d.ts","import":"./dist/esm/index.js","default":"./dist/esm/index.js","require":"./dist/cjs/index.js"}},"gitHead":"e48951b51dfcf001a2b9ffc0e5fa6f4b6f58edaa","scripts":{"build":"npm run build:esm && npm run build:cjs","clean":"rm -rf dist","prepack":"npm run build","publish":"npm publish --access public","build:cjs":"tsc -p tsconfig.cjs.json","build:esm":"tsc","typecheck":"tsc --noEmit","build:watch":"npm run build:esm:watch & npm run build:cjs:watch","example:node":"ts-node examples/node-cli/example.ts","prepublishOnly":"npm run clean && npm run build","build:cjs:watch":"tsc -p tsconfig.cjs.json --watch","build:esm:watch":"tsc --watch","example:express":"ts-node examples/express-server/server.ts"},"_npmUser":{"name":"andrewawaken","email":"andrew@awaken.tax"},"_npmVersion":"10.8.2","description":"Tax SDK for Awaken","directories":{},"sideEffects":false,"_nodeVersion":"20.18.3","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.0.0","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/crypto-tax_0.1.2_1765616799966_0.04701442633577346","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@awakentax/crypto-tax","version":"0.1.3","keywords":["tax","sdk","awaken"],"author":{"name":"Andrew Duca"},"license":"ISC","_id":"@awakentax/crypto-tax@0.1.3","maintainers":[{"name":"aduca98","email":"andrew@hubblepockets.com"},{"name":"andrewawaken","email":"andrew@awaken.tax"}],"dist":{"shasum":"9ebdc39915f2476a441b09f5e242c3919fa663f5","tarball":"https://registry.npmjs.org/@awakentax/crypto-tax/-/crypto-tax-0.1.3.tgz","fileCount":18,"integrity":"sha512-0oBZCH5/86AhuREs4/jgF6SZFoktpKpprowP+UL0g0yiVxX6N3VO91NEJX6r0hy+MzSyuYqMEVoVZWi0A1+PaA==","signatures":[{"sig":"MEUCIQC6WAyJECg8IKSIlB9PYTfLpqJ08XFUAZrDs5eZgwY4GwIgDHHhYdIfu+EIvD+WsqSVSUk3EYaKw1iwgL6Hc2bfd3I=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":14512},"main":"./dist/cjs/index.js","types":"./dist/esm/index.d.ts","module":"./dist/esm/index.js","engines":{"node":">=18"},"exports":{".":{"types":"./dist/esm/index.d.ts","import":"./dist/esm/index.js","default":"./dist/esm/index.js","require":"./dist/cjs/index.js"}},"gitHead":"6f62c0d80162197f752284196958964c620c5cbf","scripts":{"build":"npm run build:esm && npm run build:cjs","clean":"rm -rf dist","prepack":"npm run build","publish":"npm publish --access public","build:cjs":"tsc -p tsconfig.cjs.json","build:esm":"tsc","typecheck":"tsc --noEmit","build:watch":"npm run build:esm:watch & npm run build:cjs:watch","example:node":"ts-node examples/node-cli/example.ts","prepublishOnly":"npm run clean && npm run build","build:cjs:watch":"tsc -p tsconfig.cjs.json --watch","build:esm:watch":"tsc --watch","example:express":"ts-node examples/express-server/server.ts"},"_npmUser":{"name":"andrewawaken","email":"andrew@awaken.tax"},"_npmVersion":"10.8.2","description":"Tax SDK for Awaken","directories":{},"sideEffects":false,"_nodeVersion":"20.18.3","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.0.0","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/crypto-tax_0.1.3_1765617049224_0.3957921851170132","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2025-12-13T00:27:32.049Z","modified":"2026-04-10T19:47:28.457Z","0.1.0":"2025-12-13T00:27:32.260Z","0.1.1":"2025-12-13T08:55:28.640Z","0.1.2":"2025-12-13T09:06:40.138Z","0.1.3":"2025-12-13T09:10:49.380Z"},"author":{"name":"Andrew Duca"},"license":"ISC","keywords":["tax","sdk","awaken"],"description":"Tax SDK for Awaken","maintainers":[{"email":"andrew@awaken.tax","name":"andrewawaken"}],"readme":"# @awakentax/crypto-tax\n\nTax SDK for Awaken - Easily integrate crypto tax calculation links into your application.\n\n## Step 1: Get an API Key\n\nTo use this SDK, you'll need an API key. Please contact **andrew@awaken.tax** to obtain your API key.\n\n## Installation\n\n```bash\nnpm install @awakentax/crypto-tax\n```\n\nor with yarn:\n\n```bash\nyarn add @awakentax/crypto-tax\n```\n\n## Usage\n\n### Initialize the SDK\n\nFirst, import and initialize the SDK with your API key:\n\n```typescript\nimport { CryptoTaxSDK } from '@awakentax/crypto-tax';\n\nconst cryptotax = new CryptoTaxSDK({\n  apiKey: 'your-api-key-here'\n});\n```\n\n### Get the Link URL\n\nCreate a link by providing wallet addresses:\n\n```typescript\nimport type { CreateLinkRequest } from '@awakentax/crypto-tax';\n\nconst request: CreateLinkRequest = {\n  wallets: [\n    {\n      address: '0x1234567890123456789012345678901234567890',\n      name: 'My Main Wallet' // Optional\n    },\n    {\n      address: '0xabcdefabcdefabcdefabcdefabcdefabcdefabcd'\n    }\n  ]\n};\n\nconst response = await cryptotax.createLink(request);\nconsole.log('Link URL:', response.url);\nconsole.log('Link Code:', response.code);\n```\n\n### Open the Link\n\nOnce you have the URL, you can open it in a browser or redirect your users:\n\n```typescript\n// In a browser environment\nwindow.location.href = response.url;\n\n// Or open in a new tab/window\nwindow.open(response.url, '_blank');\n\n// In a Node.js environment, you can log it or use a library like 'open'\nconsole.log('Open this URL:', response.url);\n```\n\n### Complete Example\n\n```typescript\nimport { CryptoTaxSDK } from '@awakentax/crypto-tax';\nimport type { CreateLinkRequest } from '@awakentax/crypto-tax';\n\nasync function createTaxLink() {\n  // Initialize SDK\n  const cryptotax = new CryptoTaxSDK({\n    apiKey: process.env.AWAKEN_API_KEY!,\n  });\n\n  // Prepare wallet data\n  const request: CreateLinkRequest = {\n    wallets: [\n      {\n        address: '0x1234567890123456789012345678901234567890',\n        name: 'My Main Wallet'\n      }\n    ]\n  };\n\n  try {\n    // Create the link\n    const { url, code } = await cryptotax.createLink(request);\n    \n    // Open the link (browser example)\n    window.location.href = url;\n    \n    // Or redirect users to the tax calculation page\n    // window.open(url, '_blank');\n  } catch (error) {\n    console.error('Failed to create link:', error);\n  }\n}\n```\n\n## What It Looks Like\n\n<img width=\"1076\" height=\"809\" alt=\"Screenshot 2025-12-13 at 12 58 43 AM\" src=\"https://github.com/user-attachments/assets/b7d09c69-0076-4753-bbd2-4b49eb533629\" />\n\nWhen you open up the URL we generate for you, it will look something like this. If the user doesn't have an Awaken account, it will prompt them to create one and then automatically add the wallets for them. If they already have an account, it'll be a one click add for them to link these wallets to their existing Awaken account.\n\n## Alternative: Using cURL (Without SDK)\n\nIf you prefer not to use the SDK, you can make direct API calls using cURL:\n\n### Create Partner Account Link\n\n```bash\ncurl -X POST https://api.link.awaken.tax/api/links \\\n  -H \"Content-Type: application/json\" \\\n  -H \"x-api-key: your-api-key-here\" \\\n  -d '{\n    \"wallets\": [\n      {\n        \"address\": \"0x1234567890123456789012345678901234567890\",\n        \"name\": \"My Wallet\"\n      },\n      {\n        \"address\": \"0xabcdefabcdefabcdefabcdefabcdefabcdefabcd\"\n      }\n    ]\n  }'\n```\n\n**Request Body:**\n- `wallets` (array, required): Array of wallet objects\n  - `address` (string, required): Wallet address\n  - `name` (string, optional): Wallet name\n\n**Response:**\n- Success (201): Returns `code` and `url` for the created link\n- Success (200): Returns existing link if wallet hash already exists\n- Error (400): Validation error with details\n- Error (404): Partnership not found\n- Error (500): Internal server error\n\n**Example Response:**\n```json\n{\n  \"code\": \"abc123xyz\",\n  \"url\": \"https://awaken.tax/link?code=abc123xyz\"\n}\n```\n\n## API Reference\n\n### `CryptoTaxSDK`\n\n#### Constructor\n\n```typescript\nnew CryptoTaxSDK(options: SDKOptions)\n```\n\n**Options:**\n- `apiKey` (string, required): Your API key\n- `baseUrl` (string, optional): Base URL for the API. Defaults to `https://api.link.awaken.tax`\n\n#### Methods\n\n##### `createLink(request: CreateLinkRequest): Promise<CreateLinkResponse>`\n\nCreates a new tax calculation link.\n\n**Parameters:**\n- `request.wallets`: Array of wallet objects with `address` (required) and optional `name`\n\n**Returns:**\n- `code`: Unique code for the link\n- `url`: Full URL to access the tax calculation interface\n","readmeFilename":"README.md"}