{"_id":"@atlantis-js/impact-certificate","name":"@atlantis-js/impact-certificate","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@atlantis-js/impact-certificate","version":"1.0.0","publishConfig":{"access":"public"},"description":"SDK for Impact Certificate Minting and Attestation","repository":{"type":"git","url":"git+https://github.com/AtlantisDAO1/impact-certificate-sdk.git"},"homepage":"https://github.com/AtlantisDAO1/impact-certificate-sdk#readme","bugs":{"url":"https://github.com/AtlantisDAO1/impact-certificate-sdk/issues"},"main":"dist/index.cjs.js","module":"dist/index.esm.js","types":"dist/types/index.d.ts","scripts":{"build":"rollup -c && npm run build:types","build:types":"tsc","prepublishOnly":"npm run build","test":"echo \"Error: no test specified\" && exit 1"},"keywords":["impact-certificate","project-impact-certificate","nft","attestation","eas","blockchain","ethereum","arbitrum","base","celo","optimism"],"author":{"name":"Atlantis DAO"},"license":"MIT","dependencies":{"@ethereum-attestation-service/eas-sdk":"^2.9.0","axios":"^1.13.2","dotenv":"^17.2.3","ethers":"^6.16.0","form-data":"^4.0.5"},"devDependencies":{"@babel/core":"^7.28.6","@babel/preset-env":"^7.28.6","@rollup/plugin-babel":"^6.1.0","@rollup/plugin-commonjs":"^28.0.9","@rollup/plugin-json":"^6.1.0","@rollup/plugin-node-resolve":"^16.0.3","rollup":"^4.56.0","typescript":"^5.9.3"},"_id":"@atlantis-js/impact-certificate@1.0.0","gitHead":"1139878180b6d77ecb656268cfa02f69d67980ba","_nodeVersion":"24.5.0","_npmVersion":"11.5.1","dist":{"integrity":"sha512-E2ttapRXpgU4k6St9VcSJNDRhyFlcLnkZ+Wgyuvi3mAjN9d6O9YiNCwpyUAC2OOC3bM1vQ4Sx2lHrTWKWYMh6A==","shasum":"5d0797bc906bd460e293e9cd8100292c245f84c4","tarball":"https://registry.npmjs.org/@atlantis-js/impact-certificate/-/impact-certificate-1.0.0.tgz","fileCount":21,"unpackedSize":273762,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIAoCDv55K0E1xOGKFvzp7bI5OIOjLzOGgznaRR/o+otDAiAKfblpn7pnbN0a0dDy2WZsC/l6kxWkwlxvtfE06oETNg=="}]},"_npmUser":{"name":"atlantis001","email":"atlantis.tech@dropchain.in"},"directories":{},"maintainers":[{"name":"atlantis001","email":"atlantis.tech@dropchain.in"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/impact-certificate_1.0.0_1769147527347_0.2756727751678698"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-23T05:52:07.205Z","1.0.0":"2026-01-23T05:52:07.500Z","modified":"2026-01-23T05:52:07.738Z"},"maintainers":[{"name":"atlantis001","email":"atlantis.tech@dropchain.in"}],"description":"SDK for Impact Certificate Minting and Attestation","homepage":"https://github.com/AtlantisDAO1/impact-certificate-sdk#readme","keywords":["impact-certificate","project-impact-certificate","nft","attestation","eas","blockchain","ethereum","arbitrum","base","celo","optimism"],"repository":{"type":"git","url":"git+https://github.com/AtlantisDAO1/impact-certificate-sdk.git"},"author":{"name":"Atlantis DAO"},"bugs":{"url":"https://github.com/AtlantisDAO1/impact-certificate-sdk/issues"},"license":"MIT","readme":"# Impact Certificate JS SDK\n\nThe `@atlantis-js/impact-certificate` is a JavaScript library for interacting with the Impact Certificate ecosystem. It provides functionality for minting Impact Certificates, checking mint status, fetching minted certificates, and performing attestations with staking, fetching attestations.\n\nThe library includes built-in type definitions, providing a great developer experience with IntelliSense in editors like VS Code.\n\n## Installation\n\n```bash\nnpm install @atlantis-js/impact-certificate\n```\n\n## Supported Chains\n\nThe library supports the following blockchains:\n\n- **Arbitrum** (Chain ID: 42161) - *Supports Attestation*\n- **Base** (Chain ID: 8453)\n- **Celo** (Chain ID: 42220) - *Supports Attestation*\n- **Optimism** (Chain ID: 10)\n\n## Getting Started\n\n### Initialization\n\nInitialize the client with the desired chain ID and provider/signer.\n\n```javascript\nconst ImpactCertificateClient = require(\"@atlantis-js/impact-certificate\");\nconst { ethers } = require(\"ethers\");\n\n// Initialize provider (for read-only operations)\nconst provider = new ethers.JsonRpcProvider(\"YOUR_RPC_URL\");\n\n// Initialize signer (for write operations like minting and attesting)\nconst signer = new ethers.Wallet(\"YOUR_PRIVATE_KEY\", provider);\n\nconst client = new ImpactCertificateClient({\n    chainId: 42161, // Arbitrum\n    provider: provider,\n    signer: signer\n});\n```\n\n### Minting an Impact Certificate\n\n```javascript\nconst mintData = {\n    projectName: \"My Impact Project\",\n    projectStartDate: \"2023-01-01\",\n    projectEndDate: \"2023-12-31\",\n    backerName: \"My Organization\",\n    backerLogo: \"https://example.com/logo.png\",\n    projectDescription: \"Description of the project...\",\n    totalFundsDeployedUSD: 10000,\n    impactCoresAffected: [\"Environment\"],\n    impactBrief: \"Brief description of impact...\",\n    mediaLinks: [\"https://example.com/report.pdf\"],\n    paymentTransactionBlockchain: \"Arbitrum\",\n    paymentTokenAddress: \"0x...\", // Supported payment token address\n    mintBlockchain: \"Arbitrum\",\n    receiverAddress: \"0x...\" // Address to receive the NFT\n};\n\ntry {\n    const response = await client.mint(mintData);\n    console.log(\"Mint request submitted:\", response);\n} catch (error) {\n    console.error(\"Minting failed:\", error);\n}\n```\n\n### Checking Mint Status\n\n```javascript\nconst requestId = \"REQUEST_ID_FROM_MINT_RESPONSE\";\nconst status = await client.getMintStatus(requestId);\nconsole.log(\"Mint status:\", status);\n```\n\n### Fetching Minted Certificates\n\n```javascript\nconst tokens = await client.getAllMinted();\nconsole.log(\"Minted tokens:\", tokens);\n```\n\n### Attesting to an Impact Certificate\n\nAttestation requires staking tokens. The SDK handles staking automatically if the user has insufficient stake.\n\n```javascript\nconst tokenId = 0; // ID of the token to attest to\nconst accept = true; // Approve the impact claim\nconst comment = \"Verified impact.\";\n\ntry {\n    // Check stake and stake if necessary\n    const userAddress = await signer.getAddress();\n    const hasStake = await client.hasSufficientStake(userAddress);\n    \n    if (!hasStake) {\n        const tokens = await client.getWhitelistedTokens();\n        if (tokens.length > 0) {\n            await client.stake(tokens[0].address);\n        }\n    }\n\n    // Perform attestation\n    const attestationUid = await client.attest(tokenId, accept, comment);\n    console.log(\"Attestation successful! UID:\", attestationUid);\n} catch (error) {\n    console.error(\"Attestation failed:\", error);\n}\n```\n\n### Fetching Attestations\n\n```javascript\nconst attestations = await client.getAttestations();\nconsole.log(\"Attestations:\", attestations);\n```\n\n## API Reference\n\n### `ImpactCertificateClient`\n\n*   `constructor(options)`: Initializes the client.\n*   `mint(mintData)`: Mints a new certificate.\n*   `getMintStatus(requestId)`: Gets the status of a mint request.\n*   `getAllMinted()`: Fetches all minted certificates.\n*   `attest(tokenId, accept, comment)`: Attests to a certificate.\n*   `getWhitelistedTokens()`: Gets tokens whitelisted for staking.\n*   `hasSufficientStake(userAddress)`: Checks if a user has sufficient stake.\n*   `stake(tokenAddress)`: Stakes tokens.\n*   `getAttestations(schemaUid)`: Fetches attestations for a schema.\n\n## License\n\nMIT\n","readmeFilename":"README.md","_rev":"1-75f89d85a19b73a9f2ca0c8cf68675cf"}