{"id":22701726,"url":"https://github.com/looksrare/sdk-v2","last_synced_at":"2025-08-08T13:19:32.743Z","repository":{"id":131672070,"uuid":"500791923","full_name":"LooksRare/sdk-v2","owner":"LooksRare","description":"Typescript SDK to interact with LooksRare V2 contracts","archived":false,"fork":false,"pushed_at":"2025-06-24T05:10:06.000Z","size":1607,"stargazers_count":26,"open_issues_count":3,"forks_count":13,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-07-24T00:43:10.910Z","etag":null,"topics":["javascript","looksrare","sdk","typescript"],"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/LooksRare.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-06-07T10:25:19.000Z","updated_at":"2025-05-17T19:35:15.000Z","dependencies_parsed_at":"2023-05-10T14:18:47.957Z","dependency_job_id":"9eb49752-b13c-45a0-a33b-a3db8951193c","html_url":"https://github.com/LooksRare/sdk-v2","commit_stats":null,"previous_names":[],"tags_count":37,"template":false,"template_full_name":null,"purl":"pkg:github/LooksRare/sdk-v2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LooksRare%2Fsdk-v2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LooksRare%2Fsdk-v2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LooksRare%2Fsdk-v2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LooksRare%2Fsdk-v2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LooksRare","download_url":"https://codeload.github.com/LooksRare/sdk-v2/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LooksRare%2Fsdk-v2/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269428086,"owners_count":24415263,"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","status":"online","status_checked_at":"2025-08-08T02:00:09.200Z","response_time":72,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["javascript","looksrare","sdk","typescript"],"created_at":"2024-12-10T07:10:03.168Z","updated_at":"2025-08-08T13:19:32.679Z","avatar_url":"https://github.com/LooksRare.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @looksrare/sdk-v2\n\n![GitHub package.json version](https://img.shields.io/github/package-json/v/LooksRare/sdk-v2) ![GitHub](https://img.shields.io/github/license/LooksRare/sdk-v2) ![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/LooksRare/sdk-v2/build.yml) ![npm](https://img.shields.io/npm/dt/@looksrare/sdk-v2)\n\nA collection of typescript tools to interact with LooksRare protocol V2 smart contracts 👀💎\n\n## Install\n\nThis package has a peer dependency on [etherjs V5](https://docs.ethers.io/v5/).\n\n```bash\nyarn add @looksrare/sdk-v2 ethers\n```\n\n```bash\nnpm install @looksrare/sdk-v2 ethers --save\n```\n\n## Getting Started\n\nThe SDK expose a main class used to perform all the onchain operations:\n\n```ts\nimport { ChainId } from \"@looksrare/sdk-v2\";\nconst looksrare = new LooksRare(ChainId.MAINNET, provider, signer);\n```\n\nThe signer is optional if you need access to read only data (:warning: Calls to function that need a signer will throw a `Signer is undefined` exception):\n\n```ts\nimport { ChainId } from \"@looksrare/sdk-v2\";\nconst looksrare = new LooksRare(ChainId.MAINNET, provider);\n```\n\nIf you work on a hardhat setup, you can override the addresses as follow:\n\n```ts\nimport { Addresses } from \"@looksrare/sdk-v2\";\nconst addresses: Addresses = {...};\nconst looksrare = new LooksRare(ChainId.HARDHAT, provider, signer, addresses);\n```\n\n:information_source: Use [`JsonRpcProvider`](https://docs.ethers.org/v6/api/providers/jsonrpc/#JsonRpcApiProviderOptions) from `ethers v6` if you want to make batched RPC calls.\n\n```ts\nimport { JsonRpcProvider, Network } from \"ethers\";\n\n// Create a HTTP/HTTPS batch call provider\nconst provider = new JsonRpcProvider(RPC_URL, CHAIN_ID, { staticNetwork: Network.from(CHAIN_ID) });\n\n// Create LooksRare instance using this provider\nconst looksrare = new LooksRare(ChainId.HARDHAT, provider, signer, addresses);\n```\n\nPrior to [`@looksrare/sdk-v2@0.9.2`](https://www.npmjs.com/package/@looksrare/sdk-v2/v/0.9.2?activeTab=readme), LooksRareSDK was making batched calls using `0xsequence/multicall`. But this is not natively supported since `@looksrare/sdk-v2@1.0.0`.\n\n## Documentation\n\nRead the [guides](./guides) if you need help with the implementation.\n\nYou can also read the detailed [api documentation](./doc).\n\n## FAQ\n\n### ❓ How to use ABIs\n\nThe SDK exposes most of the LooksRare contract [ABIs](https://github.com/LooksRare/sdk-v2/tree/master/src/abis). For convenience, some commonly used ABIs are also exported.\n\n```js\nimport LooksRareProtocolABI from \"@looksrare/sdk-v2/dist/abis/LooksRareProtocol.json\";\n```\n\n### ❓ How to retrieve order nonce ?\n\nCall the public api endpoint [/orders/nonce](https://looksrare.dev/reference/getordernonce), and use this nonce directly.\n\n### ❓ What to do when the order is created and signed ?\n\nUse the public api endpoint [/orders](https://looksrare.dev/reference/createorder) to push the order to the database. After that, the order will be visible by everyone using the API (looksrare.org, aggregators, etc..).\n\n### ❓ When should I use merkle tree orders ?\n\nMerkle tree orders are used to create several orders with a single signature. You shouldn't use them when using a bot. Their main purpose is to facilitate orders creation using a user interface.\n\n### ❓ Why do I need to call grantTransferManagerApproval ?\n\nWhen you approve a collection to be traded on LooksRare, you approve the TransferManager instead of the exchange. Calling `grantTransferManagerApproval` gives the exchange contract the right to call the transfer function on the TransferManager. You need to call this function only once, the first time you use the V2.\n\n### ❓ What are subset nonces and how to use them ?\n\ntl;dr subset nonces allow you to cancel all the orders sharing the same subset nonce.\nSubset nonces allow you to group some orders together according to arbitrary rules (for example all your orders for a specific collection, all your orders above a certain threshold, etc). You can then cancel them all with a single call to `cancelSubsetOrders`.\n:information_source: Unlike order nonces, executing an order with a specific subset nonce doesn't invalidate other orders sharing the same subset nonce.\n\n## Resources\n\n🔗 [Developer documentation](https://docs.looksrare.org/developers/welcome)\n\n🔗 [Public API documentation](https://looksrare.dev/reference/important-information)\n\n🔗 [Developer discord](https://discord.gg/jJA4qM5dXz)\n\n## Ethers Version 5 \u0026 6\n\nThe SDK maintains a version for Ethers V5 and V6. To use the SDK with Ethers V5 install versions `\u003c 1`, e.g. `0.9.0`. Version 6 of Ethers is on versions `\u003e 1.0.0`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flooksrare%2Fsdk-v2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flooksrare%2Fsdk-v2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flooksrare%2Fsdk-v2/lists"}