{"_id":"@credit-cooperative/credit-coop-sdk","_rev":"9-b6e06bd207cc73de9ceeba3bb9129f5b","name":"@credit-cooperative/credit-coop-sdk","dist-tags":{"latest":"0.2.1"},"versions":{"0.1.1":{"name":"@credit-cooperative/credit-coop-sdk","version":"0.1.1","author":{"name":"Credit Cooperative"},"license":"MIT","_id":"@credit-cooperative/credit-coop-sdk@0.1.1","maintainers":[{"name":"nate_credit_coop","email":"nate@creditcoop.xyz"}],"homepage":"https://github.com/credit-cooperative/credit-coop-sdk#readme","bugs":{"url":"https://github.com/credit-cooperative/credit-coop-sdk/issues"},"dist":{"shasum":"c3bf54f53f58a2bb4518fb733ec9d69042b6132d","tarball":"https://registry.npmjs.org/@credit-cooperative/credit-coop-sdk/-/credit-coop-sdk-0.1.1.tgz","fileCount":8,"integrity":"sha512-S/y1Zy2Hu+6s7oj1+V26f3x9M2ejJsKSfav7a0nZLNrDs1s8lQg3d3y5Wjoj/FU/y0FdUeFiOih6NTcka/MZGg==","signatures":[{"sig":"MEQCIHUmSl5KkQHGGJx+c7sS1Y/VfThgZ6+PtM9DCoWsb1vsAiAnzbtD/ZNzwXE2LiP398C3Qlt/6B9Wjpu/B1WumfHBYw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":95094},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"ef76e970426cf25a54e167e02a555a3c66d26c43","scripts":{"lint":"eslint \"src/**/*.{ts,tsx}\" \"test/**/*.ts\"","test":"vitest --coverage","build":"tsup src/index.ts --format esm,cjs --dts --minify","clean":"rimraf dist","prepublishOnly":"yarn clean && yarn lint && yarn test && yarn build"},"_npmUser":{"name":"nate_credit_coop","email":"nate@creditcoop.xyz"},"repository":{"url":"git+ssh://git@github.com/credit-cooperative/credit-coop-sdk.git","type":"git"},"_npmVersion":"10.9.0","description":"Type-safe SDK for Credit Coop smart contracts","directories":{},"sideEffects":false,"_nodeVersion":"22.12.0","dependencies":{"viem":"^2.30.0"},"_hasShrinkwrap":false,"packageManager":"yarn@4.9.1","devDependencies":{"tsup":"^8.5.0","execa":"^9.5.3","dotenv":"^16.5.0","eslint":"^9.27.0","rimraf":"^6.0.1","vitest":"^3.1.4","hardhat":"^2.24.0","ts-node":"^10.9.2","wait-on":"^8.0.3","prettier":"^3.5.3","@eslint/js":"^9.27.0","typescript":"^5.8.3","@types/wait-on":"^5.3.4","typescript-eslint":"^8.32.1","@vitest/coverage-v8":"^3.1.4","eslint-config-prettier":"^10.1.5","eslint-plugin-prettier":"^5.4.0","@nomicfoundation/hardhat-viem":"^2.0.6"},"_npmOperationalInternal":{"tmp":"tmp/credit-coop-sdk_0.1.1_1749738090139_0.6902105550941198","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@credit-cooperative/credit-coop-sdk","version":"0.2.0","author":{"name":"Credit Cooperative"},"license":"MIT","_id":"@credit-cooperative/credit-coop-sdk@0.2.0","maintainers":[{"name":"nate_credit_coop","email":"nate@creditcoop.xyz"},{"name":"mostarz","email":"mo@creditcoop.xyz"}],"homepage":"https://github.com/credit-cooperative/credit-coop-sdk#readme","bugs":{"url":"https://github.com/credit-cooperative/credit-coop-sdk/issues"},"dist":{"shasum":"947be40ed1d3e283c5bac7669689c92d62fa4247","tarball":"https://registry.npmjs.org/@credit-cooperative/credit-coop-sdk/-/credit-coop-sdk-0.2.0.tgz","fileCount":8,"integrity":"sha512-uRnnv+KLTs8hhhxWXssCZpTzX41veY6l4GgCye/WuGCn/xVJLU3lhahmVdBfO3EpttHBpSPEVoMAx7I8L89rdA==","signatures":[{"sig":"MEUCIEu0bMkthObF+sepJu937J8KHOvaGUMCWJPYRBdTGiklAiEAmgdALxvH4zGAQ5aevI7eu7d3l8dcrYU2oMsp/mBTTWQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":97074},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"31dca3fe0c63e56fda7483333dd3deded3660878","scripts":{"lint":"eslint \"src/**/*.{ts,tsx}\" \"test/**/*.ts\"","test":"vitest --coverage","build":"tsup src/index.ts --format esm,cjs --dts --minify","clean":"rimraf dist","prepublishOnly":"yarn clean && yarn lint && yarn test && yarn build"},"_npmUser":{"name":"nate_credit_coop","email":"nate@creditcoop.xyz"},"repository":{"url":"git+ssh://git@github.com/credit-cooperative/credit-coop-sdk.git","type":"git"},"_npmVersion":"10.9.0","description":"Type-safe SDK for Credit Coop smart contracts","directories":{},"sideEffects":false,"_nodeVersion":"22.12.0","dependencies":{"viem":"^2.30.0"},"_hasShrinkwrap":false,"packageManager":"yarn@4.9.1","devDependencies":{"tsup":"^8.5.0","execa":"^9.5.3","dotenv":"^16.5.0","eslint":"^9.27.0","rimraf":"^6.0.1","vitest":"^3.1.4","hardhat":"^2.24.0","ts-node":"^10.9.2","wait-on":"^8.0.3","prettier":"^3.5.3","@eslint/js":"^9.27.0","typescript":"^5.8.3","@types/wait-on":"^5.3.4","typescript-eslint":"^8.32.1","@vitest/coverage-v8":"^3.1.4","eslint-config-prettier":"^10.1.5","eslint-plugin-prettier":"^5.4.0","@nomicfoundation/hardhat-viem":"^2.0.6"},"_npmOperationalInternal":{"tmp":"tmp/credit-coop-sdk_0.2.0_1749761764628_0.19567372915019576","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@credit-cooperative/credit-coop-sdk","version":"0.2.1","author":{"name":"Credit Cooperative"},"license":"MIT","_id":"@credit-cooperative/credit-coop-sdk@0.2.1","maintainers":[{"name":"nate_credit_coop","email":"nate@creditcoop.xyz"},{"name":"mostarz","email":"mo@creditcoop.xyz"}],"homepage":"https://github.com/credit-cooperative/credit-coop-sdk#readme","bugs":{"url":"https://github.com/credit-cooperative/credit-coop-sdk/issues"},"dist":{"shasum":"df302989933bd83d0a8b6f7386788999bbdc6e36","tarball":"https://registry.npmjs.org/@credit-cooperative/credit-coop-sdk/-/credit-coop-sdk-0.2.1.tgz","fileCount":8,"integrity":"sha512-i/D+X8FYYLU06jHsEy8SqgqzqeOgVhfpR6Cc8OHQT0NjZkypLaTm7UVIJ0uMqBeTkR3k/ZYjwiGHzRnKsCsCWw==","signatures":[{"sig":"MEQCIGs1/t0YhywNajhO2Q2z0pxeKBHV4Lp+mYV9y8sk2mxQAiAOoZgA7IqIgM/HIBku51AG6KkqNWfRZsCuiZPEBUmM/g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":97074},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"6f5137e18d33a29b312311282d770364e4d66ab4","scripts":{"lint":"eslint \"src/**/*.{ts,tsx}\" \"test/**/*.ts\"","test":"vitest --coverage","build":"tsup src/index.ts --format esm,cjs --dts --minify","clean":"rimraf dist","prepublishOnly":"yarn clean && yarn lint && yarn test && yarn build"},"_npmUser":{"name":"nate_credit_coop","email":"nate@creditcoop.xyz"},"repository":{"url":"git+ssh://git@github.com/credit-cooperative/credit-coop-sdk.git","type":"git"},"_npmVersion":"10.9.0","description":"Type-safe SDK for Credit Coop smart contracts","directories":{},"sideEffects":false,"_nodeVersion":"22.12.0","dependencies":{"viem":"^2.30.0"},"_hasShrinkwrap":false,"packageManager":"yarn@4.9.1","devDependencies":{"tsup":"^8.5.0","execa":"^9.5.3","dotenv":"^16.5.0","eslint":"^9.27.0","rimraf":"^6.0.1","vitest":"^3.1.4","hardhat":"^2.24.0","ts-node":"^10.9.2","wait-on":"^8.0.3","prettier":"^3.5.3","@eslint/js":"^9.27.0","typescript":"^5.8.3","@types/wait-on":"^5.3.4","typescript-eslint":"^8.32.1","@vitest/coverage-v8":"^3.1.4","eslint-config-prettier":"^10.1.5","eslint-plugin-prettier":"^5.4.0","@nomicfoundation/hardhat-viem":"^2.0.6"},"_npmOperationalInternal":{"tmp":"tmp/credit-coop-sdk_0.2.1_1749765518331_0.23695921443724433","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2025-06-12T14:21:30.063Z","modified":"2026-05-14T19:51:22.817Z","0.1.0":"2025-06-12T13:53:32.274Z","0.1.1":"2025-06-12T14:21:30.336Z","0.2.0":"2025-06-12T20:56:04.828Z","0.2.1":"2025-06-12T21:58:38.507Z"},"bugs":{"url":"https://github.com/credit-cooperative/credit-coop-sdk/issues"},"author":{"name":"Credit Cooperative"},"license":"MIT","homepage":"https://github.com/credit-cooperative/credit-coop-sdk#readme","repository":{"url":"git+ssh://git@github.com/credit-cooperative/credit-coop-sdk.git","type":"git"},"description":"Type-safe SDK for Credit Coop smart contracts","maintainers":[{"email":"ivo@creditcoop.xyz","name":"ir-creditcoop"},{"email":"neil@creditcoop.xyz","name":"nz-creditcoop"},{"email":"surbhi@creditcoop.xyz","name":"audichya"},{"email":"mo@creditcoop.xyz","name":"mostarz"}],"readme":"# Credit Coop SDK\n\n## Introduction\n\nA type‑safe JavaScript / TypeScript client for interacting with Credit Coop’s on‑chain credit infrastructure.\n\n## Requirements\n\n| Tool        | Version |\n| ----------- | ------- |\n| Node        | ≥ 22    |\n| TypeScript  | ≥ 5     |\n\n## Installation\n\n```bash\n# Yarn\nyarn add @credit-cooperative/credit-coop-sdk\n\n# npm\nnpm i @credit-cooperative/credit-coop-sdk\n```\n\n## Quick Start\n\n```ts\nimport { SecuredLine } from \"@credit-cooperative/credit-coop-sdk\";\n\nasync function main() {\n  // Initialize the SecuredLine interface\n  const line = new SecuredLine({\n    address: \"0x…\",\n    privateKey: process.env.PRIVATE_KEY,\n    chainId: \"base\",\n    rpcUrl: \"https://base-mainnet.g.alchemy.com/v2/<API_KEY>\",\n  });\n\n  // Fetch open position IDs\n  const openPositionIds = await line.getOpenPositionIds();\n\n  // Get the amount of assets available to borrow for the first open credit position\n  const { availableAssets } = await line.getPositionLiquidity(openPositionIds[0]);\n\n  // Borrow the full amount from the first open credit position to the borrower wallet\n  await line.borrow({\n    positionId: openPositionIds[0],\n    amount: availableAssets,\n  });\n}\n```\n","readmeFilename":"README.md"}