{"_id":"@anduri/crypto-trading-sdk","name":"@anduri/crypto-trading-sdk","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@anduri/crypto-trading-sdk","version":"1.0.0","type":"module","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"dev":"vite","build":"tsc && vite build","lint":"eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0","preview":"vite preview","prepublishOnly":"npm run build"},"peerDependencies":{"react":"^18.2.0","react-dom":"^18.2.0","@chakra-ui/react":"^2.8.0","@emotion/react":"^11.0.0","@emotion/styled":"^11.0.0","framer-motion":"^10.0.0"},"dependencies":{"@chakra-ui/icons":"^2.1.1"},"devDependencies":{"@types/react":"^18.2.43","@types/react-dom":"^18.2.17","@typescript-eslint/eslint-plugin":"^6.14.0","@typescript-eslint/parser":"^6.14.0","@vitejs/plugin-react":"^4.2.1","eslint":"^8.55.0","eslint-plugin-react-hooks":"^4.6.0","eslint-plugin-react-refresh":"^0.4.5","typescript":"^5.2.2","vite":"^5.0.8","vite-plugin-dts":"^3.7.2"},"publishConfig":{"access":"public"},"keywords":["crypto","trading","widget","react","typescript","chakra-ui"],"author":{"name":"Anduri"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/anduri/crypto-trading-sdk.git"},"_id":"@anduri/crypto-trading-sdk@1.0.0","description":"A beautiful and modern React widget for cryptocurrency trading with fiat on/off ramp functionality.","bugs":{"url":"https://github.com/anduri/crypto-trading-sdk/issues"},"homepage":"https://github.com/anduri/crypto-trading-sdk#readme","_nodeVersion":"20.10.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-hALQk5zhL3O81OKFlH7UUzmx2HRoOE+lp+SIUoBEcIYoVq4X+e3rXRzYTxdzRztVxGlordiVh++3ZGv9MKm7+Q==","shasum":"43014ca59ea5eef7dafe128bdccc4e329879b9db","tarball":"https://registry.npmjs.org/@anduri/crypto-trading-sdk/-/crypto-trading-sdk-1.0.0.tgz","fileCount":11,"unpackedSize":55108,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDJqZ9VBlfd7gZisLOxi9wFej6eHB+/0s4jtWZ7t8y+SgIhAOItg9Mrwi54pNUVygqkwD5d2WPIvWB3AqosdA4TawRG"}]},"_npmUser":{"name":"anduri","email":"anduri.dev@gmail.com"},"directories":{},"maintainers":[{"name":"anduri","email":"anduri.dev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/crypto-trading-sdk_1.0.0_1742282761434_0.23776638997052646"},"_hasShrinkwrap":false}},"time":{"created":"2025-03-18T07:26:01.330Z","1.0.0":"2025-03-18T07:26:01.713Z","modified":"2025-03-18T07:26:01.958Z"},"maintainers":[{"name":"anduri","email":"anduri.dev@gmail.com"}],"description":"A beautiful and modern React widget for cryptocurrency trading with fiat on/off ramp functionality.","homepage":"https://github.com/anduri/crypto-trading-sdk#readme","keywords":["crypto","trading","widget","react","typescript","chakra-ui"],"repository":{"type":"git","url":"git+https://github.com/anduri/crypto-trading-sdk.git"},"author":{"name":"Anduri"},"bugs":{"url":"https://github.com/anduri/crypto-trading-sdk/issues"},"license":"MIT","readme":"# Crypto Trading Widget\n\nA beautiful and modern React widget for cryptocurrency trading with fiat on/off ramp functionality.\n\n## Features\n\n- User onboarding with email and KYC verification\n- Buy/Sell cryptocurrency with fiat (EUR)\n- SEPA Instant payment integration\n- Real-time exchange rates and fee calculation\n- Modern and responsive UI using Chakra UI\n- Self-contained widget that manages its own state and API calls\n\n## Installation\n\n```bash\nnpm install @your-org/crypto-trading-sdk\n```\n\n## Requirements\n\nThis widget requires the following peer dependencies:\n\n```json\n{\n  \"@chakra-ui/react\": \"^2.8.2\",\n  \"@emotion/react\": \"^11.11.3\",\n  \"@emotion/styled\": \"^11.11.0\",\n  \"framer-motion\": \"^10.18.0\",\n  \"react\": \"^18.2.0\",\n  \"react-dom\": \"^18.2.0\"\n}\n```\n\n## Usage\n\n```tsx\nimport { TradingWidget } from '@your-org/crypto-trading-sdk'\nimport { ChakraProvider } from '@chakra-ui/react'\n\nfunction App() {\n  return (\n    <ChakraProvider>\n      <TradingWidget\n        clientId=\"your-client-id\"\n        apiKey=\"your-api-key\"\n        apiUrl=\"https://api.cryptotrading.com\" // Optional, defaults to this URL\n      />\n    </ChakraProvider>\n  )\n}\n```\n\n## Props\n\n| Prop | Type | Required | Description |\n|------|------|----------|-------------|\n| clientId | string | Yes | Your client ID for authentication |\n| apiKey | string | Yes | Your API key for authentication |\n| apiUrl | string | No | Custom API URL (defaults to https://api.cryptotrading.com) |\n\n## API Endpoints\n\nThe widget expects the following API endpoints to be available:\n\n### User Management\n\n```\nGET /users/{clientId}\nResponse: UserData & { kycVerified: boolean }\n\nPOST /users\nBody: { clientId: string, email: string }\nResponse: UserData\n\nPOST /users/{clientId}/kyc\nBody: UserData\nResponse: { success: boolean }\n\nGET /users/{clientId}/balance\nResponse: { amount: number }\n\nGET /users/{clientId}/bank-accounts\nResponse: BankAccount[]\n```\n\n### Crypto\n\n```\nGET /crypto/list\nResponse: CryptoCurrency[]\n\nPOST /trades\nBody: {\n  clientId: string\n  type: 'buy' | 'sell'\n  cryptoId: string\n  amount: number\n  paymentMethod: string\n  bankAccountId: string\n}\nResponse: Transaction\n```\n\n## Types\n\n```typescript\ninterface CryptoCurrency {\n  id: string\n  name: string\n  symbol: string\n  currentPrice: number\n  change24h: number\n}\n\ninterface BankAccount {\n  id: string\n  accountNumber: string\n  bankName: string\n  accountHolderName: string\n  ifscCode: string\n}\n\ninterface UserData {\n  email: string\n  fullName: string\n  dateOfBirth: string\n  address: string\n  idType: string\n  idNumber: string\n}\n\ninterface Transaction {\n  id: string\n  type: 'buy' | 'sell'\n  cryptoId: string\n  amount: number\n  price: number\n  timestamp: Date\n  paymentMethod?: string\n  bankAccount?: BankAccount\n}\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md","_rev":"1-40895c4c2fe9eb6431b9c8cde032db6f"}