{"_id":"@abcwalletio/xrp","name":"@abcwalletio/xrp","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@abcwalletio/xrp","version":"1.0.0","description":"ABC WaaS XRP Ledger adapter — MPC-based public key and signing primitives for xrpl.js (secp256k1)","keywords":["waas","xrp","xrpl","ripple","secp256k1","mpc"],"license":"MIT","author":{"name":"Ahnlab Blockchain Company"},"homepage":"http://abcwaas.com/","publishConfig":{"access":"public"},"engines":{"node":">=18.0.0"},"sideEffects":false,"type":"module","main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"peerDependencies":{"xrpl":">=3.0.0","@abcwalletio/core":"^1.0.0"},"devDependencies":{"xrpl":"^4.2.0","tsup":"^8.0.0","typescript":"^5.4.0","vitest":"^1.4.0","@abcwalletio/core":"^1.0.0"},"scripts":{"build":"tsup","dev":"tsup --watch","typecheck":"tsc --noEmit","test":"vitest run"},"_id":"@abcwalletio/xrp@1.0.0","_integrity":"sha512-sX8QBvipcqRqrY8FfqgrGV/4/tihEMcgumkGE6RsQiZc4cnRURAIHysLLx/cCinROKqeGlJzgyYjyx3/E0W7OQ==","_resolved":"/private/var/folders/lt/4x5qd11x2wl8sh4gvr7y0pp80000gn/T/9eb0625955b1a4a2cd99babb95763596/abcwalletio-xrp-1.0.0.tgz","_from":"file:abcwalletio-xrp-1.0.0.tgz","_nodeVersion":"24.13.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-sX8QBvipcqRqrY8FfqgrGV/4/tihEMcgumkGE6RsQiZc4cnRURAIHysLLx/cCinROKqeGlJzgyYjyx3/E0W7OQ==","shasum":"e4dc84378957cf6c27d6f7c458e321ba4da9c5b6","tarball":"https://registry.npmjs.org/@abcwalletio/xrp/-/xrp-1.0.0.tgz","fileCount":9,"unpackedSize":18520,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIBxTjEKOLstdXQwIIVwziylxLxlixJDnK32CalGk06SVAiEA2QTuwjUhWC8L1yYAsLZSgkSYaWPquU1od7J1+AMhFt8="}]},"_npmUser":{"name":"theo_ahnlabio","email":"theo@ahnlab.com"},"directories":{},"maintainers":[{"name":"abc-admin","email":"abc_it@ahnlab.com"},{"name":"1kko-abc","email":"1kko@ahnlab.com"},{"name":"theo_ahnlabio","email":"theo@ahnlab.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/xrp_1.0.0_1776818618281_0.15089045566778014"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-22T00:43:38.207Z","1.0.0":"2026-04-22T00:43:38.407Z","modified":"2026-04-22T00:43:38.733Z"},"maintainers":[{"name":"abc-admin","email":"abc_it@ahnlab.com"},{"name":"1kko-abc","email":"1kko@ahnlab.com"},{"name":"theo_ahnlabio","email":"theo@ahnlab.com"}],"description":"ABC WaaS XRP Ledger adapter — MPC-based public key and signing primitives for xrpl.js (secp256k1)","homepage":"http://abcwaas.com/","keywords":["waas","xrp","xrpl","ripple","secp256k1","mpc"],"author":{"name":"Ahnlab Blockchain Company"},"license":"MIT","readme":"# @abcwalletio/xrp\n\nABC WaaS SDK의 XRP Ledger 어댑터입니다. XRP 생태계는 단일 월렛 표준이 없어\n독자 인터페이스로 `xrpl` 라이브러리에서 서명에 사용할 수 있는 공개키와 서명\n함수만 노출합니다.\n\n## Installation\n\n```bash\npnpm add @abcwalletio/xrp @abcwalletio/core xrpl\n```\n\n## Peer Dependencies\n\n- `@abcwalletio/core`\n- `xrpl` `>=3.0.0`\n\n## Quick Start\n\n```typescript\nimport { createWaasSDK, LocalStorageAdapter } from '@abcwalletio/core';\nimport { AbcXrpAdapter } from '@abcwalletio/xrp';\nimport { Client, deriveAddress } from 'xrpl';\n\nconst sdk = await createWaasSDK({\n  storage: new LocalStorageAdapter(),\n  auth: { v2: { clientId: '...', clientSecret: '...' } },\n});\n\n// XRP는 secp256k1 키 사용\nawait sdk.mpc.generateKeyShare('secp256k1', 'password');\n\n// XRP adapter는 비동기 factory로 생성 (connect 과정에서 공개키 조회)\nconst adapter = await AbcXrpAdapter.create({\n  sdk,\n  requestPassword: async () => prompt('MPC 비밀번호?') ?? '',\n});\n\n// xrpl 라이브러리로 XRP 주소 도출\nconst address = deriveAddress(adapter.getPublicKey());  // \"r...\"\n```\n\n## API\n\n### `AbcXrpAdapter.create(config)`\n\n```typescript\ninterface AbcXrpAdapterConfig {\n  sdk: WaasSDK;\n  requestPassword: () => Promise<string>;\n  keyId?: string;  // 생략 시 sdk.mpc.getDefaultKeyId('secp256k1') 자동 조회\n}\n```\n\n### 메서드\n\n| 메서드 | 설명 |\n|--------|------|\n| `getPublicKey()` | 33바이트 compressed secp256k1 공개키 (hex, uppercase) — `deriveAddress`에 사용 |\n| `signMessage(hashHex)` | 메시지 해시 서명 (65바이트 raw: r + s + v) |\n| `signTransaction(txHashHex)` | 트랜잭션 해시 서명 — `signMessage`와 동일 |\n\n> **공개키 계약:** `@abcwalletio/core`는 secp256k1 공개키를 항상 33바이트 compressed\n> 형식으로 반환합니다. XRP는 이 형식을 그대로 사용합니다. 만약 길이가 다르면\n> 어댑터는 즉시 throw하여 잘못된 주소 생성을 방지합니다.\n\n## License\n\nMIT — Copyright (c) 2026 Ahnlab Blockchain Company\n","readmeFilename":"README.md","_rev":"1-2ff7988831923d6d404525ec2cfd2e0c"}