{"id":30114070,"url":"https://github.com/near/intents","last_synced_at":"2026-03-09T11:02:46.454Z","repository":{"id":242058975,"uuid":"795023266","full_name":"near/intents","owner":"near","description":"Set of contracts for the NEAR Intents project","archived":false,"fork":false,"pushed_at":"2026-03-06T11:37:07.000Z","size":6548,"stargazers_count":52,"open_issues_count":14,"forks_count":22,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-03-06T12:48:27.800Z","etag":null,"topics":["intents","near","rust","smart-contracts"],"latest_commit_sha":null,"homepage":"https://near.github.io/intents/","language":"Rust","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/near.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-05-02T12:38:40.000Z","updated_at":"2026-03-06T08:13:22.000Z","dependencies_parsed_at":"2026-02-10T10:03:43.857Z","dependency_job_id":null,"html_url":"https://github.com/near/intents","commit_stats":null,"previous_names":["defuse-is-near/defuse-contracts","defuse-protocol/defuse-contracts","near/intents"],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/near/intents","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/near%2Fintents","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/near%2Fintents/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/near%2Fintents/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/near%2Fintents/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/near","download_url":"https://codeload.github.com/near/intents/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/near%2Fintents/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30291839,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T02:57:19.223Z","status":"ssl_error","status_checked_at":"2026-03-09T02:56:26.373Z","response_time":61,"last_error":"SSL_read: 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":["intents","near","rust","smart-contracts"],"created_at":"2025-08-10T07:38:01.028Z","updated_at":"2026-03-09T11:02:46.435Z","avatar_url":"https://github.com/near.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NEAR Intents smart contracts\n\n## What is NEAR Intents?\n\nNEAR Intents is a smart contract developed for the NEAR blockchain. It facilitates atomic P2P transactions among peers, by allowing trustless transactions in the smart contract.\n\nPlease note that the main smart contract in the repository, under the directory `defuse`, is referred to as the \"Verifier\" in the ecosystem. Near Intents contains more components that work in tandem to achieve its purpose. Nevertheless, this smart contract, the Verifier, can be used independently without needing anything else.\n\n\n### Example\n\nAlice wants to trade 1000 USDT with Bob for 1000 USDC. If Alice sends her 1000 USDT first, she risks Bob not fulfilling the promise of sending his 1000 USDC. Same risk for Bob if he goes first.\n\nSolution:\n\nBoth Alice and Bob create accounts in the [NEAR Intents smart contract](https://nearblocks.io/address/intents.near). They then deposit their 1000 USDT/USDC. They create two intents. In Alice's, Alice declares her will to lose 1000 USDT for 1000 USDC, and Bob creates another intent showing his will to lose 1000 USDC for 1000 USDT. Each of them sign their intent. They put both intents in an array, and then call [the function](https://near.github.io/intents/defuse/intents/trait.Intents.html#tymethod.execute_intents) `execute_intents` in the NEAR Intents smart contract with the intents' array.\n\nThe Verifier smart contract will evaluate the intents and check whether the requests can be fulfilled, and will ensure that the transaction is done atomically, and the 1000 USDC/USDT will be swapped.\n\nFinally, Alice and Bob can withdraw their USDC/USDT from the Verifier smart contract to their individual accounts.\n\n### Documentation\n\nFor more information on how to use the Intents ecosystem, please refer to [the documentation](https://docs.near-intents.org/).\n\nFor technical information about the Verifier smart contract programming primitives (and other smart contracts here), please refer to [the cargo documentation page](https://near.github.io/intents/).\n\n### Payload traits\n\nIntents bridges several external signing standards such as BIP-322, TIP-191,\nand ERC-191. Each standard is represented by a small structure implementing the\n[`Payload`](https://near.github.io/intents/defuse_crypto/payload/trait.Payload.html)\nand [`SignedPayload`](https://near.github.io/intents/defuse_crypto/payload/trait.SignedPayload.html) traits.\nThese implementations allow the engine to hash and verify messages from the\ndifferent standards in a uniform way. They are used internally and are not part\nof a stable public API.\n\n### The name \"defuse\"\n\nThe name defuse is an old name for the smart contract that we use to execute intents. It is being phased out for NEAR Intents.\n\n### Building and running\n\nYou can obtain a working copy of the smart contract and the ABI from [the releases page](https://github.com/near/intents/releases/).\n\nAlternatively, you can build this smart contract yourself.\n\nBuild smart contract separately:\n\n```shell\nmake \u003ccontract-name\u003e\n```\n\nBuild all contracts at once:\n\n```shell\nmake\n```\n\nNOTE: Reproducible build can be specified by setting `REPRODUCIBLE=1`\n\nRun integration tests:\n\n```shell\ncargo integration-tests \u003cdefuse|poa|escrow-swap\u003e\n```\n\nOr run all tests:\n\n```shell\nmake test\n```\n\nFor state migration testing set environmental var `DEFUSE_MIGRATE_FROM_LEGACY=1`\nState migrations will be applied before all tests.\nThe tests will use data created prior to migration combined with newly created data to verify the integrity of the state.\n\nRun clippy linter:\n\n```shell\nmake clippy\n```\n\nAfter building, the artifacts of the build will be in the `res` directory.\n\n### Contracts in this repository\n\n- Verifier/Defuse smart contract: The primary contract for NEAR Intents discussed in this readme file.\n- `PoA Token` and `PoA factory` contract: Contracts responsible for the Proof of Authority bridge. These help in transferring tokens from other assets (e.g., Bitcoin, Ethereum, Solana, etc) to the NEAR blockchain, so that transactions in the NEAR Intents can happen.\n- Controller interface: Interface [for contract](https://github.com/aurora-is-near/aurora-controller-factory) responsible for upgrading smart contracts and migrating their state.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnear%2Fintents","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnear%2Fintents","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnear%2Fintents/lists"}