{"id":14980381,"url":"https://github.com/esaulpaugh/headlong-cli","last_synced_at":"2025-10-29T00:30:27.175Z","repository":{"id":40600804,"uuid":"222164204","full_name":"esaulpaugh/headlong-cli","owner":"esaulpaugh","description":"Command line interface for headlong","archived":false,"fork":false,"pushed_at":"2024-10-11T01:58:15.000Z","size":1285,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-12T21:01:39.244Z","etag":null,"topics":["abi","cli","ethereum","machine-interface","rlp","windows-powershell"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/esaulpaugh.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2019-11-16T21:56:00.000Z","updated_at":"2024-10-11T01:58:19.000Z","dependencies_parsed_at":"2023-10-16T13:29:12.935Z","dependency_job_id":"c7727bab-abbd-4949-a996-45ded968ec08","html_url":"https://github.com/esaulpaugh/headlong-cli","commit_stats":{"total_commits":440,"total_committers":2,"mean_commits":220.0,"dds":"0.054545454545454564","last_synced_commit":"f09366b4fb4dac677e5073af513a88855d38334f"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esaulpaugh%2Fheadlong-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esaulpaugh%2Fheadlong-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esaulpaugh%2Fheadlong-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esaulpaugh%2Fheadlong-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/esaulpaugh","download_url":"https://codeload.github.com/esaulpaugh/headlong-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238743874,"owners_count":19523193,"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":["abi","cli","ethereum","machine-interface","rlp","windows-powershell"],"created_at":"2024-09-24T14:01:41.202Z","updated_at":"2025-10-29T00:30:27.169Z","avatar_url":"https://github.com/esaulpaugh.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# headlong-cli\nCommand line interface for https://github.com/esaulpaugh/headlong ABI and RLP codecs. Depends on headlong v13.3.1 which depends on gson. Licensed under Apache 2.0 terms.\n\n## Build\n\nRun `gradle fatJar` which produces `build/libs/headlong-cli-1.4-SNAPSHOT.jar`\n\nOr `mvn package` which produces `target/headlong-cli-1.4-SNAPSHOT.jar`\n\n## Usage (cmd, Git Bash, Windows PowerShell)\n\n#### Encode tuple\n\nCommand: `java -jar headlong-cli-1.4-SNAPSHOT.jar -e \"(uint112)\" \"('5d92d2a10d4e107b1d')\"`\n\nResult: `00000000000000000000000000000000000000000000005d92d2a10d4e107b1d`\n\n#### Encode function with human-friendly syntax\n\nCommand: `java -jar headlong-cli-1.4-SNAPSHOT.jar -ef \"sam(bytes,bool,uint[])\" \"(u'dave', b'true', [ d'1', d'2', d'3' ])\"`\n\nResult: `a5643bf20000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000464617665000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000003`\n\nPrepending a human-friendly code to an item affects how it is interpreted:\n\n`u` for UTF-8 (e.g. `u'Yeehaw'`)\n\n`b` for boolean (e.g. `b'false'`)\n\n`a` for address (e.g. `a'0x000000000000F9087ABcDEf00CafeBaBE86244AA'`)\n\n`d` for decimal (e.g. `d'255'`)\n\n#### More examples\n\nCommand: `java -jar headlong-cli-1.4-SNAPSHOT.jar -e \"(function[2][][],bytes24,string[1][1],address[],uint72,(uint8),(int16)[2][][1],(int32)[],uint40,(int48)[],(uint),bool,string,bool[2],int24[],uint40[1])\" \"( [ [ [ '191c766e29a65787b7155dd05f41292438467db93420cade', '191c766e29a65787b7155dd05f41292438467db93420cade' ] ] ], '191c766e29a65787b7155dd05f41292438467db93420cade', [ [ '7a' ] ], [ 'ff00ee01dd02cc03cafebabe9906880777086609' ], 'fdfffffffffffffe04', [ '07' ], [ [ [ [ '09' ], [ 'fffffff5' ] ] ] ], [ [ '11' ], [ 'ffffffed' ] ], 'fca527923b', [ [ '7e' ], [ 'ffffffffffffff82' ] ], [ '0a' ], '01', '6661726f7574', [ '01', '01' ], [ '03', '14', 'fffffa' ], [ 'fffffffe' ])\"`\n\nResult: `0000000000000000000000000000000000000000000000000000000000000220191c766e29a65787b7155dd05f41292438467db93420cade000000000000000000000000000000000000000000000000000000000000000000000000000002c000000000000000000000000000000000000000000000000000000000000003400000000000000000000000000000000000000000000000fdfffffffffffffe04000000000000000000000000000000000000000000000000000000000000000700000000000000000000000000000000000000000000000000000000000003800000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000fca527923b0000000000000000000000000000000000000000000000000000000000000460000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000004c000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000fffffffe000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001191c766e29a65787b7155dd05f41292438467db93420cade0000000000000000191c766e29a65787b7155dd05f41292438467db93420cade00000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000017a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000ff00ee01dd02cc03cafebabe9906880777086609000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000009fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff500000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000011ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000007effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8200000000000000000000000000000000000000000000000000000000000000066661726f75740000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000014fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa`\n\n#### Decode\n\nCommand: `java -jar headlong-cli-1.4-SNAPSHOT.jar -d \"(function[2][][],bytes24,string[1][1],address[],uint72,(uint8),(int16)[2][][1],(int32)[],uint40,(int48)[],(uint),bool,string,bool[2],int24[],uint40[1])\" \"0000000000000000000000000000000000000000000000000000000000000220191c766e29a65787b7155dd05f41292438467db93420cade000000000000000000000000000000000000000000000000000000000000000000000000000002c000000000000000000000000000000000000000000000000000000000000003400000000000000000000000000000000000000000000000fdfffffffffffffe04000000000000000000000000000000000000000000000000000000000000000700000000000000000000000000000000000000000000000000000000000003800000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000fca527923b0000000000000000000000000000000000000000000000000000000000000460000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000004c000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000fffffffe000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001191c766e29a65787b7155dd05f41292438467db93420cade0000000000000000191c766e29a65787b7155dd05f41292438467db93420cade00000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000017a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000ff00ee01dd02cc03cafebabe9906880777086609000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000009fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff500000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000011ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000007effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8200000000000000000000000000000000000000000000000000000000000000066661726f75740000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000014fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa\"`\n\nResult (RLP Object Notation):\n\n```\n(\n  [ [ [ '191c766e29a65787b7155dd05f41292438467db93420cade', '191c766e29a65787b7155dd05f41292438467db93420cade' ] ] ],\n  '191c766e29a65787b7155dd05f41292438467db93420cade',\n  [ [ '7a' ] ],\n  [ 'ff00ee01dd02cc03cafebabe9906880777086609' ],\n  'fdfffffffffffffe04',\n  [ '07' ],\n  [ [ [ [ '09' ], [ 'fff5' ] ] ] ],\n  [ [ '11' ], [ 'ffffffed' ] ],\n  'fca527923b',\n  [ [ '7e' ], [ 'ffffffffff82' ] ],\n  [ '0a' ],\n  '01',\n  '6661726f7574',\n  [ '01', '01' ],\n  [ '03', '14', 'fffffa' ],\n  [ 'fffffffe' ]\n)\n```\n\n### Packed Encoding\n\nEncode packed: `java -jar headlong-cli-1.4-SNAPSHOT.jar -ep \"(int16,bytes1,uint16,string)\" \"('ffff', '42', '03', '48656c6c6f2c20776f726c6421')\"`\n\nResult: `ffff42000348656c6c6f2c20776f726c6421`\n\nDecode packed: `java -jar headlong-cli-1.4-SNAPSHOT.jar -dp \"(int16,bytes1,uint16,string)\" \"ffff42000348656c6c6f2c20776f726c6421\"`\n\nResult:\n```\n(\n  'ffff',\n  '42',\n  '03',\n  '48656c6c6f2c20776f726c6421'\n)\n```\n\n### Other commands\n\nUse `-help` for a full list.\n\nUTF-8 to (compact) hexadecimal: `java -jar headlong-cli-1.4-SNAPSHOT.jar -utfhexc \"Hello, world!\"`\n\nResult: `('48656c6c6f2c20776f726c6421')`\n\n### Machine-to-machine interface\n\n#### Encode\n\nMachine interface encode `-me` expects hex-encoded RLP data:\n\n`java -jar headlong-cli-1.4-SNAPSHOT.jar -me \"(function[2][][],bytes24,string[1][1],address[],uint72,(uint8),(int16)[2][][1],(int32)[],uint40,(int48)[],(uint),bool,string,bool[2],int24[],uint40[1])\" \"f4f3f298191c766e29a65787b7155dd05f41292438467db93420cade98191c766e29a65787b7155dd05f41292438467db93420cade98191c766e29a65787b7155dd05f41292438467db93420cadec2c17ad594ff00ee01dd02cc03cafebabe990688077708660989fdfffffffffffffe04c107c8c7c6c109c382fff5c8c111c584ffffffed85fca527923bcac17ec786ffffffffff82c10a01866661726f7574c20101c6031483fffffac584fffffffe\"`\n\n#### Decode\n\nMachine interface decode `-md` results in hex-encoded RLP data:\n\n`f4f3f298191c766e29a65787b7155dd05f41292438467db93420cade98191c766e29a65787b7155dd05f41292438467db93420cade98191c766e29a65787b7155dd05f41292438467db93420cadec2c17ad594ff00ee01dd02cc03cafebabe990688077708660989fdfffffffffffffe04c107c8c7c6c109c382fff5c8c111c584ffffffed85fca527923bcac17ec786ffffffffff82c10a01866661726f7574c20101c6031483fffffac584fffffffe`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fesaulpaugh%2Fheadlong-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fesaulpaugh%2Fheadlong-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fesaulpaugh%2Fheadlong-cli/lists"}