{"_id":"@ben-arbitrum/sdk","_rev":"2-813f61ea30e2e2c0b2566dca7de45d27","name":"@ben-arbitrum/sdk","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@ben-arbitrum/sdk","version":"1.0.0","author":{"name":"Offchain Labs, Inc."},"license":"Apache-2.0","_id":"@ben-arbitrum/sdk@1.0.0","maintainers":[{"name":"harry1","email":"431027103@qq.com"}],"dist":{"shasum":"475989dd1dd23c1ea65ecb3850490405d7192a89","tarball":"https://registry.npmjs.org/@ben-arbitrum/sdk/-/sdk-1.0.0.tgz","fileCount":1420,"integrity":"sha512-uC5OtWHsLKem0Lbzm5E/I/AR7Tz222eA5zkp5AzpL3/uuBmzkkS3YgHNbAaT7ZYH2OJqlUOSM30Dt0QnyYO7pA==","signatures":[{"sig":"MEYCIQC0cgQ0qEQHeZjnQrh9VoOkydIIuZXgUjLXMKlFhWeB8wIhAKqtAcveW2+/tFXQ+JMpRYXuOZvnUv/BzHkEG/efo4Uu","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":15595232},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"b5a8829c7835108cd640322266dc20397494d287","scripts":{"lint":"yarn workspaces run lint","build":"yarn workspace @arbitrum/sdk build","format":"yarn workspaces run format","gen:abi":"yarn workspace @arbitrum/sdk gen:abi","audit:ci":"audit-ci --config ./audit-ci.jsonc","test:unit":"yarn workspaces run test:unit","gen:network":"yarn workspace @arbitrum/sdk gen:network","test:integration":"yarn workspace @arbitrum/sdk test:integration"},"_npmUser":{"name":"harry1","email":"431027103@qq.com"},"workspaces":{"packages":["packages/*"]},"_npmVersion":"10.9.2","description":"Typescript library client-side interactions with Arbitrum","directories":{},"resolutions":{"**/nanoid":"3.3.8","**/elliptic":"6.6.1","lodash.pick":"https://github.com/lodash/lodash/archive/refs/tags/4.17.21.tar.gz","**/secp256k1":"4.0.4","**/hardhat/ws":"7.5.10","**/micromatch":"4.0.8","**/puppeteer/ws":"8.17.1","**/sol2uml/axios":"0.30.0","**/hardhat/undici":"5.28.5","**/chokidar/braces":"3.0.3","**/follow-redirects":"1.15.6","**/puppeteer/tar-fs":"2.1.2","**/eslint/cross-spawn":"7.0.5","**/serialize-javascript":"6.0.2","**/patch-package/cross-spawn":"6.0.6","**/@ethersproject/providers/ws":"7.5.10","**/hardhat/@sentry/node/cookie":"0.7.0","**/foreground-child/cross-spawn":"7.0.5","**/istanbul-lib-processinfo/cross-spawn":"7.0.5","**/istanbul-lib-instrument/@babel/core/@babel/helpers":"7.26.10"},"_nodeVersion":"22.13.1","_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.1.0","chai":"^4.2.0","viem":"^2.0.0","axios":"^1.8.4","chalk":"^4.1.0","mocha":"^9.2.1","yargs":"^17.3.1","dotenv":"^10.0.0","eslint":"^7.32.0","ethers":"^5.0.0","tslint":"^6.1.3","hardhat":"^2.24.0","prompts":"^2.4.2","ts-node":"^10.2.1","audit-ci":"^6.6.1","prettier":"^2.3.2","typechain":"7.0.0","ts-mockito":"^2.6.1","typescript":"^5.7.2","@types/chai":"^4.2.11","@types/mocha":"^9.0.0","@types/yargs":"^17.0.9","@types/prompts":"^2.0.14","eslint-plugin-mocha":"^9.0.0","@typechain/ethers-v5":"9.0.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","prettier-plugin-solidity":"^1.0.0-beta.17","@arbitrum/nitro-contracts":"^1.1.1","@nomiclabs/hardhat-ethers":"^2.0.4","@typescript-eslint/parser":"^5.14.0","@arbitrum/token-bridge-contracts":"^1.2.1","@typescript-eslint/eslint-plugin":"^5.14.0","@offchainlabs/l1-l3-teleport-contracts":"1.0.1","@typescript-eslint/eslint-plugin-tslint":"^5.27.1"},"_npmOperationalInternal":{"tmp":"tmp/sdk_1.0.0_1767521275940_0.6879605552595303","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@ben-arbitrum/sdk","version":"1.0.1","description":"Typescript library client-side interactions with Arbitrum","author":{"name":"Offchain Labs, Inc."},"license":"Apache-2.0","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"audit:ci":"audit-ci --config ./audit-ci.jsonc","build":"yarn workspace @arbitrum/sdk build","lint":"yarn workspaces run lint","format":"yarn workspaces run format","test:unit":"yarn workspaces run test:unit","test:integration":"yarn workspace @arbitrum/sdk test:integration","gen:abi":"yarn workspace @arbitrum/sdk gen:abi","gen:network":"yarn workspace @arbitrum/sdk gen:network"},"workspaces":{"packages":["packages/*"]},"devDependencies":{"@arbitrum/nitro-contracts":"^1.1.1","@arbitrum/token-bridge-contracts":"^1.2.1","@nomiclabs/hardhat-ethers":"^2.0.4","@offchainlabs/l1-l3-teleport-contracts":"1.0.1","@typechain/ethers-v5":"9.0.0","@types/chai":"^4.2.11","@types/mocha":"^9.0.0","@types/prompts":"^2.0.14","@types/yargs":"^17.0.9","@typescript-eslint/eslint-plugin":"^5.14.0","@typescript-eslint/eslint-plugin-tslint":"^5.27.1","@typescript-eslint/parser":"^5.14.0","audit-ci":"^6.6.1","axios":"^1.8.4","chai":"^4.2.0","chalk":"^4.1.0","dotenv":"^10.0.0","eslint":"^7.32.0","eslint-config-prettier":"^8.3.0","eslint-plugin-mocha":"^9.0.0","eslint-plugin-prettier":"^4.0.0","ethers":"^5.0.0","hardhat":"^2.24.0","mocha":"^9.2.1","nyc":"^15.1.0","prettier":"^2.3.2","prettier-plugin-solidity":"^1.0.0-beta.17","prompts":"^2.4.2","ts-mockito":"^2.6.1","ts-node":"^10.2.1","tslint":"^6.1.3","typechain":"7.0.0","typescript":"^5.7.2","viem":"^2.0.0","yargs":"^17.3.1"},"resolutions":{"lodash.pick":"https://github.com/lodash/lodash/archive/refs/tags/4.17.21.tar.gz","**/@ethersproject/providers/ws":"7.5.10","**/puppeteer/ws":"8.17.1","**/puppeteer/tar-fs":"2.1.2","**/hardhat/ws":"7.5.10","**/hardhat/@sentry/node/cookie":"0.7.0","**/follow-redirects":"1.15.6","**/micromatch":"4.0.8","**/elliptic":"6.6.1","**/secp256k1":"4.0.4","**/nanoid":"3.3.8","**/serialize-javascript":"6.0.2","**/patch-package/cross-spawn":"6.0.6","**/eslint/cross-spawn":"7.0.5","**/foreground-child/cross-spawn":"7.0.5","**/istanbul-lib-processinfo/cross-spawn":"7.0.5","**/istanbul-lib-instrument/@babel/core/@babel/helpers":"7.26.10","**/hardhat/undici":"5.28.5","**/chokidar/braces":"3.0.3","**/sol2uml/axios":"0.30.0"},"_id":"@ben-arbitrum/sdk@1.0.1","gitHead":"2572cc64e695daa89964f71f6cb1ceb6e40858e5","_nodeVersion":"22.13.1","_npmVersion":"10.9.2","dist":{"integrity":"sha512-Y1MOAdr4i0VodKCUE7cDQ1gYNZ1CDKSJuqhtZUFLidEx2LTeh5tbGS5iLxdDQsOrSK/tilvVL/7O6HLy69M3AA==","shasum":"f8a2a62bf1ec48746b4f0bd059bd6b20ab96291b","tarball":"https://registry.npmjs.org/@ben-arbitrum/sdk/-/sdk-1.0.1.tgz","fileCount":1420,"unpackedSize":15595232,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCYmZ9ANvcziW7S+41xJL6Gk9H2zdo4gbubNIXLCvy0VgIhAKmzYljxS87gRq01zhSYLfwYo7LES8WDHH+v/Qgf3bWH"}]},"_npmUser":{"name":"harry1","email":"431027103@qq.com"},"directories":{},"maintainers":[{"name":"harry1","email":"431027103@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sdk_1.0.1_1767530633256_0.6197744071003632"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-04T10:07:55.832Z","modified":"2026-01-04T12:43:53.681Z","1.0.0":"2026-01-04T10:07:56.172Z","1.0.1":"2026-01-04T12:43:53.471Z"},"author":{"name":"Offchain Labs, Inc."},"license":"Apache-2.0","description":"Typescript library client-side interactions with Arbitrum","maintainers":[{"name":"harry1","email":"431027103@qq.com"}],"readme":"# Arbitrum SDK\n\n[![npm version](https://badge.fury.io/js/%40arbitrum%2Fsdk.svg)](https://badge.fury.io/js/@arbitrum%2Fsdk.svg)\n[![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n\nA TypeScript library for client-side interactions with Arbitrum. The Arbitrum SDK provides essential helper functionality and direct access to underlying smart contract interfaces, enabling developers to build powerful applications on the Arbitrum network.\n\n> [!IMPORTANT]\n>\n> This is the code and documentation for `@arbitrum/sdk` v4.\n>\n> If you're looking for v3, check out [this branch](https://github.com/OffchainLabs/arbitrum-sdk/tree/v3).\n>\n> If you're looking to migrate from v3 to v4, check out [this guide](./docs/2-migrate.mdx).\n\n## Table of Contents\n\n- [Arbitrum SDK](#arbitrum-sdk)\n  - [Table of Contents](#table-of-contents)\n  - [Overview](#overview)\n  - [Installation](#installation)\n  - [Key Features](#key-features)\n    - [Bridging Assets](#bridging-assets)\n    - [Cross-Chain Messages](#cross-chain-messages)\n    - [Network Configuration](#network-configuration)\n  - [Usage](#usage)\n  - [Running Integration Tests](#running-integration-tests)\n  - [Documentation](#documentation)\n  - [License](#license)\n\n## Overview\n\nArbitrum SDK simplifies the process of interacting with Arbitrum chains, offering a robust set of tools for asset bridging and cross-chain messaging.\n\n## Installation\n\n```bash\nnpm install @arbitrum/sdk\n\n# or\n\nyarn add @arbitrum/sdk\n```\n\n## Key Features\n\n### Bridging Assets\n\nArbitrum SDK facilitates the bridging of assets between an Arbitrum chain and its parent chain. Currently supported asset bridgers:\n\n- `EthBridger`: For bridging ETH to and from an Arbitrum chain (L2 or L3)\n- `Erc20Bridger`: For bridging ERC-20 tokens to and from an Arbitrum chain (L2 or L3)\n- `EthL1L3Bridger`: For bridging ETH to an L3 directly from L1\n- `Erc20L1L3Bridger`: For bridging ERC-20 tokens to an L3 directly from L1\n\n### Cross-Chain Messages\n\nCross-chain communication is handled through `ParentToChildMessage` and `ChildToParentMessage` classes. These encapsulate the lifecycle of messages sent between chains, typically created from transaction receipts that initiate cross-chain messages.\n\n### Network Configuration\n\nThe SDK comes preconfigured for Arbitrum One, Arbitrum Nova and Arbitrum Sepolia. Custom Arbitrum networks can be registered using `registerCustomArbitrumNetwork`, which is required before utilizing other SDK features.\n\n## Usage\n\nHere's a basic example of using the SDK to bridge ETH:\n\n```ts\nimport { ethers } from 'ethers'\nimport { EthBridger, getArbitrumNetwork } from '@arbitrum/sdk'\n\nasync function bridgeEth(parentSigner: ethers.Signer, childChainId: number) {\n  const childNetwork = await getArbitrumNetwork(childChainId)\n  const ethBridger = new EthBridger(childNetwork)\n\n  const deposit = await ethBridger.deposit({\n    amount: ethers.utils.parseEther('0.1'),\n    parentSigner,\n  })\n\n  const txReceipt = await deposit.wait()\n  console.log(`Deposit initiated: ${txReceipt.transactionHash}`)\n}\n```\n\nFor more detailed usage examples and API references, please refer to the [Arbitrum SDK documentation](https://docs.arbitrum.io/sdk).\n\n## Running Integration Tests\n\n1. Set up a Nitro test node by following the instructions [here](https://docs.arbitrum.io/node-running/how-tos/local-dev-node).\n2. Copy `.env.example` to `.env` and update relevant environment variables.\n3. Generate the network configuration against your active Nitro test node:\n\n   ```sh\n   yarn gen:network\n   ```\n\n4. Execute the integration tests:\n\n   ```sh\n   yarn test:integration\n   ```\n\n## Documentation\n\nFor comprehensive guides and API documentation, visit the [Arbitrum SDK Documentation](https://docs.arbitrum.io/sdk).\n\n## License\n\nArbitrum SDK is released under the [Apache 2.0 License](LICENSE).\n","readmeFilename":"README.md"}