{"id":49322156,"url":"https://github.com/microchipgnu/near-ca","last_synced_at":"2026-04-26T18:03:14.363Z","repository":{"id":227251113,"uuid":"769399554","full_name":"microchipgnu/near-ca","owner":"microchipgnu","description":"Simplify the process of interacting with any chain with NEAR Protocol accounts","archived":false,"fork":false,"pushed_at":"2024-03-12T10:36:47.000Z","size":35,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-03-12T11:55:01.201Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/microchipgnu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-03-09T01:13:36.000Z","updated_at":"2024-03-12T11:55:07.560Z","dependencies_parsed_at":"2024-03-12T11:55:06.597Z","dependency_job_id":"c3ee4b82-a786-4e62-b838-0c1aaa46c66f","html_url":"https://github.com/microchipgnu/near-ca","commit_stats":null,"previous_names":["microchipgnu/near-ca"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/microchipgnu/near-ca","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microchipgnu%2Fnear-ca","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microchipgnu%2Fnear-ca/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microchipgnu%2Fnear-ca/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microchipgnu%2Fnear-ca/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/microchipgnu","download_url":"https://codeload.github.com/microchipgnu/near-ca/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microchipgnu%2Fnear-ca/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32307022,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T17:23:19.671Z","status":"ssl_error","status_checked_at":"2026-04-26T17:23:19.195Z","response_time":129,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-26T18:03:13.626Z","updated_at":"2026-04-26T18:03:14.358Z","avatar_url":"https://github.com/microchipgnu.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NEAR Chain Abstraction Layer (NEAR-CA)\n\n**DISCLAIMER: This should only be used for educational purposes.**\n\nNEAR-CA is a TypeScript library that provides an abstraction layer for interacting with the NEAR blockchain. It simplifies the process of performing transactions and managing accounts on NEAR and Ethereum chains. \n\nIntended to be used on server-side applications only. This works best with [Bun](https://bun.sh).\n\n## Features\n\n- Account management for NEAR blockchain.\n- Transaction signing and sending on Ethereum blockchain.\n- Key derivation functions for cryptographic operations.\n- Support for EIP-1559 transactions on Ethereum.\n\n## Installation\n\nTo install NEAR-CA, run the following command:\n\n```bash\nbun add near-ca\n```\n\nAlternatively,\n\n```bash\nnpm  add near-ca\n```\n\n```bash\npnpm  add near-ca\n```\n\n## Usage\n\nFor Ethereum, you can derive addresses, create payloads for transactions, and send signed transactions.\n\nExample: Deriving an Ethereum address and sending a transaction\n\n```typescript\nconst ethAddress = await deriveEthAddress(\"ethereum,1\");\nconst functionSignature = web3.eth.abi.encodeFunctionCall(\n    {\n    name: \"safeMint\",\n    type: \"function\",\n    inputs: [\n        {\n        type: \"address\",\n        name: \"to\",\n        },\n    ],\n    },\n    [\"0xAA5FcF171dDf9FE59c985A28747e650C2e9069cA\"]\n);\n\nawait signAndSendTransaction(\n    ethAddress,\n    \"0xAA5FcF171dDf9FE59c985A28747e650C2e9069cA\",\n    0,\n    functionSignature\n);\n```\n\n## Examples\n\n1. [Mint NFT](./examples/mint-nft.ts)\n1. [Send ETH](./examples/send-eth.ts)\n\n## Configuration\n\nBefore using NEAR-CA, ensure you have the following environment variables set:\n\n- `NEAR_ACCOUNT_ID`: Your NEAR account identifier.\n- `NEAR_ACCOUNT_PRIVATE_KEY`: Your NEAR account private key.\n- `NEAR_MULTICHAIN_CONTRACT`: The NEAR contract that handles multichain operations.\n\nCopy the `.env.example` file and place these values in `.env`","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrochipgnu%2Fnear-ca","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmicrochipgnu%2Fnear-ca","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrochipgnu%2Fnear-ca/lists"}