{"id":22646371,"url":"https://github.com/fireblocks/fireblocks-web3-provider","last_synced_at":"2025-04-04T13:06:42.222Z","repository":{"id":56773461,"uuid":"520898319","full_name":"fireblocks/fireblocks-web3-provider","owner":"fireblocks","description":"Fireblocks EIP-1193 Compatible Ethereum JavaScript Provider","archived":false,"fork":false,"pushed_at":"2025-03-24T21:59:51.000Z","size":1251,"stargazers_count":39,"open_issues_count":10,"forks_count":22,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-03-28T12:03:00.438Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fireblocks.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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,"publiccode":null,"codemeta":null}},"created_at":"2022-08-03T13:46:16.000Z","updated_at":"2025-03-08T15:11:13.000Z","dependencies_parsed_at":"2024-01-09T16:59:27.063Z","dependency_job_id":"acc8f71e-99bb-4f80-9874-d84622f2e0d8","html_url":"https://github.com/fireblocks/fireblocks-web3-provider","commit_stats":{"total_commits":90,"total_committers":6,"mean_commits":15.0,"dds":"0.30000000000000004","last_synced_commit":"be52edc720c66d8137a29f74aa3764d526731e06"},"previous_names":[],"tags_count":40,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fireblocks%2Ffireblocks-web3-provider","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fireblocks%2Ffireblocks-web3-provider/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fireblocks%2Ffireblocks-web3-provider/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fireblocks%2Ffireblocks-web3-provider/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fireblocks","download_url":"https://codeload.github.com/fireblocks/fireblocks-web3-provider/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247174683,"owners_count":20896121,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":"2024-12-09T06:10:09.883Z","updated_at":"2025-04-04T13:06:42.193Z","avatar_url":"https://github.com/fireblocks.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./logo.svg\" width=\"350\" alt=\"accessibility text\"\u003e\n\u003c/p\u003e\n\u003cdiv align=\"center\"\u003e\n\n  [![npm version](https://badge.fury.io/js/@fireblocks%2Ffireblocks-web3-provider.svg)](https://badge.fury.io/js/@fireblocks%2Ffireblocks-web3-provider) \u003c/br\u003e\n  [\u003cins\u003eFireblocks Web3 Provider Documentation\u003c/ins\u003e](https://developers.fireblocks.com/docs/ethereum-development)\n\u003c/div\u003e\n\n\n# Fireblocks Web3 Provider\n\nFireblocks [EIP-1193](https://eips.ethereum.org/EIPS/eip-1193) Compatible Ethereum JavaScript Provider\n\n## Installation\n```bash\nnpm install @fireblocks/fireblocks-web3-provider\n```\n\n## Setup\n```js\nimport { FireblocksWeb3Provider, ChainId, ApiBaseUrl } from \"@fireblocks/fireblocks-web3-provider\";\n\nconst eip1193Provider = new FireblocksWeb3Provider({\n    // apiBaseUrl: ApiBaseUrl.Sandbox // If using a sandbox workspace\n    privateKey: process.env.FIREBLOCKS_API_PRIVATE_KEY_PATH,\n    apiKey: process.env.FIREBLOCKS_API_KEY,\n    vaultAccountIds: process.env.FIREBLOCKS_VAULT_ACCOUNT_IDS,\n    chainId: ChainId.GOERLI,\n\n    logTransactionStatusChanges: true, // Verbose logging\n})\n```\n\n## Usage with ethers.js\n```sh\nnpm install ethers\n```\n\n```js\nimport * as ethers from \"ethers\"\n\nconst provider = new ethers.BrowserProvider(eip1193Provider); \n\n// Or like this if you're using ethers v5:\n// const provider = new ethers.providers.Web3Provider(eip1193Provider); \n```\n\n## Usage with web3.js\n```sh\nnpm install web3\n```\n\n```js\nimport Web3 from \"web3\";\n\nconst web3 = new Web3(eip1193Provider);\n```\n\n## API Documentation\n\n### new FireblocksWeb3Provider(config)\n\n- `config` [FireblocksProviderConfig](#FireblocksProviderConfig)\n\nThis class is an [EIP-1193](https://eips.ethereum.org/EIPS/eip-1193) Compatible Ethereum JavaScript Provider powered by the [Fireblocks API](https://docs.fireblocks.com/api/)\n\n### FireblocksProviderConfig\n\n```ts\ntype FireblocksProviderConfig = {\n  // ------------- Mandatory fields -------------\n  /** \n   * Learn more about creating API users here: \n   * https://developers.fireblocks.com/docs/quickstart#api-user-creation\n   */\n\n  /** \n   * Fireblocks API key\n   */\n  apiKey: string,\n\n  /** \n   * Fireblocks API private key for signing requests\n   */\n  privateKey: string,\n\n  // Either chainId or rpcUrl must be provided\n  /** \n   * If not provided, it is inferred from the rpcUrl \n   */\n  chainId?: ChainId,\n  /** \n   * If not provided, it is inferred from the chainId \n   */\n  rpcUrl?: string,\n\n  // ------------- Optional fields --------------\n\n  /** \n   * By default, the first 20 vault accounts are dynamically loaded from the Fireblocks API\n   * It is recommended to provide the vault account ids explicitly because it helps avoid unnecessary API calls\n   */\n  vaultAccountIds?: number | number[] | string | string[],\n  /** \n   * By default, it uses the Fireblocks API production endpoint\n   * When using a sandbox workspace, you should provide the ApiBaseUrl.Sandbox value\n   */\n  apiBaseUrl?: ApiBaseUrl | string,\n  /**\n   * By default, the fallback fee level is set to FeeLevel.MEDIUM\n   */\n  fallbackFeeLevel?: FeeLevel,\n  /**\n   * By default, the note is set to \"Created by Fireblocks Web3 Provider\"\n   */\n  note?: string,\n  /**\n   * By default, the polling interval is set to 1000ms (1 second)\n   * It is the interval in which the Fireblocks API is queried to check the status of transactions\n   */\n  pollingInterval?: number,\n  /**\n   * By default, it is assumed that one time addresses are enabled in your workspace\n   * If they're not, set this to false\n   */\n  oneTimeAddressesEnabled?: boolean,\n  /**\n   * By default, no externalTxId is associated with transactions\n   * If you want to set one, you can either provide a function that returns a string, or provide a string directly\n   */\n  externalTxId?: (() =\u003e string) | string,\n  /**\n   * If you want to prepend an additional product string to the User-Agent header, you can provide it here\n   */\n  userAgent?: string,\n  /**\n   * If you are using a private/custom EVM chain, you can provide its Fireblocks assetId here\n   */\n  assetId?: string,\n  /**\n   * Default: false\n   * By setting to true, every transaction status change will be logged to the console\n   * Same as setting env var `DEBUG=fireblocks-web3-provider:status`\n   */\n  logTransactionStatusChanges?: boolean,\n  /**\n   * Default: false\n   * By setting to true, every request and response processed by the provider will be logged to the console\n   * Same as setting env var `DEBUG=fireblocks-web3-provider:req_res`\n   */\n  logRequestsAndResponses?: boolean,\n  /**\n   * Default: true\n   * By setting to true, every failed transaction will print additional information\n   * helpful for debugging, such as a link to simulate the transaction on Tenderly\n   * Same as setting env var `DEBUG=fireblocks-web3-provider:error`\n   */\n  enhancedErrorHandling?: boolean,\n  /**\n   * Proxy path in the format of `http(s)://user:pass@server`\n   */\n  proxyPath?: string\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffireblocks%2Ffireblocks-web3-provider","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffireblocks%2Ffireblocks-web3-provider","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffireblocks%2Ffireblocks-web3-provider/lists"}