{"id":36878374,"url":"https://github.com/allinbits/ibc-v2-ts-relayer","last_synced_at":"2026-01-12T15:17:03.641Z","repository":{"id":314776188,"uuid":"1007730027","full_name":"allinbits/ibc-v2-ts-relayer","owner":"allinbits","description":null,"archived":false,"fork":false,"pushed_at":"2025-12-10T14:32:58.000Z","size":748,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-10T22:58:35.410Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/allinbits.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,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-06-24T12:48:01.000Z","updated_at":"2025-09-30T12:30:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"bdeb46ab-0db0-426d-9e8a-4094fe711c97","html_url":"https://github.com/allinbits/ibc-v2-ts-relayer","commit_stats":null,"previous_names":["allinbits/ibc-v2-ts-relayer"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/allinbits/ibc-v2-ts-relayer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allinbits%2Fibc-v2-ts-relayer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allinbits%2Fibc-v2-ts-relayer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allinbits%2Fibc-v2-ts-relayer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allinbits%2Fibc-v2-ts-relayer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/allinbits","download_url":"https://codeload.github.com/allinbits/ibc-v2-ts-relayer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allinbits%2Fibc-v2-ts-relayer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28340438,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T12:22:26.515Z","status":"ssl_error","status_checked_at":"2026-01-12T12:22:10.856Z","response_time":98,"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-01-12T15:17:01.585Z","updated_at":"2026-01-12T15:17:03.636Z","avatar_url":"https://github.com/allinbits.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Tentative Instructions.\n\nRequires:\n- node \u003e= v20\n- pnpm \n\nTo install pnpm run:\n`npm install -g pnpm`\n\nOnce you clone the repo:\n\n```\ncd ibc-v2-ts-relayer\npnpm install\n```\n\nIn order to test the relayer you need 2 running SDK \u003e= 0.50 chains running with IBC v2 wired and enabled.\n\nEasiest way is to scaffold 2 chains using the latest Ignite CLI (build from repo)\n\nIn the second one, you'll have to adjust the config.yml file to ensure API/RPC/faucet are running on different ports.\n\nTo do this, modify the first (and only) validator in config.yml like so:\n\n```\n- name: alice\n  bonded: 100000000stake\n  config:\n    p2p:\n      laddr: \"tcp://0.0.0.0:26659\"\n    rpc:\n      laddr: \"tcp://0.0.0.0:26658\"\n  app:\n    api: \n      swagger: true\n      enable: true\n      address: \"tcp://localhost:1318\"\n      max-open-connections: \"1000\"\n    grpc:\n      enable: true\n      address: \"localhost:9091\"\n  rpc:\n    address: \"0.0.0.0:26658\"\n```\n\nand the faucet port as needed.\n\nThen start both chains with `ignite chain serve`.\n\nThe `src/index.ts` file is currently configured to look for 2 chains on `localhost:26657` and `localhost:26658` called `chaina` and `chainb` accordingly.\nIt sets up an IBC v1 and an IBC v2 connection between them.\nModify as needed.\n\nThe `src/utils/signers.ts` file currently has the mnemonic for the relayer account hard-coded (reading from keyring pending). Again modify as needed.\n\nOnce the above have been setup:\n\n`node dist/index.js` will start the relayer and do V1 and v2 handshaking between the 2 chains and start relaying messages for the 2 paths (v1 and v2)\n\nBelow you will find the basic code (in Typescript) to craft an MsgSendPacket message in order to create an IBC v2 Transfer transaction:\n\nFirst we create the FungibleTokenPacketData (V2 transfer app) and proto-encode it to a Uint8Array:\n\n```\n      const packetData = FungibleTokenPacketData.encode(({\n        amount: \u003camount\u003e,\n        denom: \u003cdenom\u003e,\n        sender: \u003csenderAddress\u003e,\n        receiver: \u003creceiverAddress\u003e,\n        memo: \u003coptionalMemo\u003e,\n      } as FungibleTokenPacketData)).finish();\n```\n\nThis can also be JSON or solidity ABI encoded (instead of proto-encoded) chosen by the encoding field in the payload struct.\nThe payload struct is constructed as follows:\n\n```\n      const payloadV2 =  Payload.fromPartial({\n        sourcePort: 'transfer',\n        destinationPort: 'transfer',\n        version: 'ics20-1',\n        encoding: \"application/x-protobuf\", // can also be \"application/json\" or \"application/x-solidity-abi\"\n        value: packetData, // the byte[] above\n      });\n```\n\nFinally we build the message like so:\n\n```\n      const msg = MsgSendPacket.fromPartial({\n        sourceClient: \u003csourceClientId\u003e, //e.g. \"07-tendermint-1\"\n        signer: \u003csignerAddress\u003e,\n        payloads: [payloadV2], // an array of payloads such as the one above\n        timeoutTimestamp: \u003cunixTimestamp\u003e // in SECONDS\n      })\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fallinbits%2Fibc-v2-ts-relayer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fallinbits%2Fibc-v2-ts-relayer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fallinbits%2Fibc-v2-ts-relayer/lists"}