{"id":13651565,"url":"https://github.com/wharfkit/signing-request","last_synced_at":"2026-03-10T07:32:08.001Z","repository":{"id":40510675,"uuid":"163697905","full_name":"wharfkit/signing-request","owner":"wharfkit","description":"Library to assist in creating and digesting Signing Requests (ESR)","archived":false,"fork":false,"pushed_at":"2025-12-11T01:18:19.000Z","size":637,"stargazers_count":34,"open_issues_count":7,"forks_count":21,"subscribers_count":6,"default_branch":"master","last_synced_at":"2026-02-19T20:45:05.678Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/eosio-eps/EEPs/blob/master/EEPS/eep-7.md","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wharfkit.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2018-12-31T21:17:31.000Z","updated_at":"2025-12-11T01:18:23.000Z","dependencies_parsed_at":"2023-11-08T05:55:57.816Z","dependency_job_id":"50459adb-a895-4bbb-9ed2-d9399f6f1518","html_url":"https://github.com/wharfkit/signing-request","commit_stats":null,"previous_names":["greymass/eosio-signing-request"],"tags_count":47,"template":false,"template_full_name":null,"purl":"pkg:github/wharfkit/signing-request","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wharfkit%2Fsigning-request","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wharfkit%2Fsigning-request/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wharfkit%2Fsigning-request/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wharfkit%2Fsigning-request/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wharfkit","download_url":"https://codeload.github.com/wharfkit/signing-request/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wharfkit%2Fsigning-request/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30246626,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-08T00:58:18.660Z","status":"online","status_checked_at":"2026-03-08T02:00:06.215Z","response_time":56,"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":[],"created_at":"2024-08-02T02:00:50.564Z","updated_at":"2026-03-10T07:32:07.965Z","avatar_url":"https://github.com/wharfkit.png","language":"TypeScript","funding_links":[],"categories":["Developers"],"sub_categories":["Libraries and Frameworks"],"readme":"# eosio-signing-request (ESR - Revision 3)\n![version](https://badgen.net/npm/v/eosio-signing-request?style=for-the-badge)\n![license](https://badgen.net/npm/license/eosio-signing-request?style=for-the-badge)\n![downloads](https://badgen.net/npm/dw/eosio-signing-request?style=for-the-badge)\n\nA library to assist with the EOSIO Signing Request (ESR) protocol.\nThe full specification for ESR (Revision 3) is available here:\n\nhttps://github.com/eosio-eps/EEPs/blob/master/EEPS/eep-7.md\n\nThe ESR protocol allows for an application (dapp) to generate signature requests (transactions) which can then be passed to signers (wallets) for signature creation. These signature requests can be used within URI links, QR Codes, or other transports between applications and signers.\n\n---\n\n## Installation\n\nTo add eosio-signing-request to your project, install via the package manager of your choice:\n\n#### NPM\n\n```npm install eosio-signing-request```\n\n#### Yarn\n\n```yarn add eosio-signing-request```\n\n---\n\n## Signing Request Flow\n\nIn an environment where an ***application/dapp*** is requesting that an end user perform a transaction within their preferred ***signer/wallet***, each of these applications will utilize the `eosio-signing-request` library to fulfill different roles.\n\n- The ***application/dapp*** will be creating and encoding the signing request.\n- The ***signer/wallet*** will be decoding and resolving the signing request.\n\nThe specification itself then allows either the ***signer/wallet*** itself to broadcast the finalized transaction, or the transaction/signature themselves can be passed back to the ***application/dapp*** to broadcast.\n\nThe `eosio-signing-request` library is not responsible for transporting this information between the ***application/dapp***\nand ***signer/wallet***, and so this topic will not be covered in this README.\n\n---\n\n## Usage Examples\n\nThese examples will use nodejs to create and manipulate a signing request, which can then be sent to any compatible signer for signature creation and ultimately sent to an EOSIO blockchain.\n\nThe code within this README will show partial snippets of the process, with full working examples located here:\n\nhttps://github.com/greymass/eosio-signing-request-demo\n\n#### Sample Transaction/Actions\n\nTo create a signing request, the first piece of data we need is either an EOSIO transaction or action(s). For all examples in this README we will use the `eosio:voteproducer` action to set a proxy of `greymassvote`.\n\nThe actions are as follows:\n\n```js\nconst actions = [{\n    account: 'eosio',\n    name: 'voteproducer',\n    authorization: [{\n      actor: '............1',\n      permission: '............2'\n    }],\n    data: {\n        voter: '............1',\n        proxy: 'greymassvote',\n        producers: [],\n    }\n}]\n```\n\nTwo things to note:\n\n1. The `actor` and `voter` fields contain a placeholder which resolves to the signers account name (`............1`).\n2. The `permission` fields contain a placeholder which resolves to the signers account permission (`............2`).\n\nThese are optional parameters that can be passed anywhere within the `authorization` or `data` fields. If the application already knows who the end user is, the application can bypass the use of placeholders and specify that data directly.\n\n#### Signing Request Options\n\nMany of the `SigningRequest` method calls below will reference an `opts` parameter, which is a set of options that tell the signing request how to perform various tasks. For these examples, we will be using the following `opts` value.\n\n```js\nconst opts = {\n    // string encoder\n    textEncoder,\n    // string decoder\n    textDecoder,\n    // zlib string compression (optional, recommended)\n    zlib: {\n        deflateRaw: (data) =\u003e new Uint8Array(zlib.deflateRawSync(Buffer.from(data))),\n        inflateRaw: (data) =\u003e new Uint8Array(zlib.inflateRawSync(Buffer.from(data))),\n    },\n    // Customizable ABI Provider used to retrieve contract data\n    abiProvider: {\n        getAbi: async (account) =\u003e (await eos.getAbi(account))\n    }\n}\n```\n\n### Creating a Signing Request\n\nWith the above actions established, to create the signing request itself we use the eosio-signing-request library and its `create` method. The full working example to create this request [can be found here](https://github.com/greymass/eosio-signing-request-demo/blob/master/examples/encode.js).\n\n(ES8 or TypeScript)\n```js\nconst request = await SigningRequest.create({ actions }, opts)\nconsole.log(request)\n```\n\n(ES6)\n```js\nSigningRequest.create({ actions }, opts).then((request) =\u003e {\n  console.log(request)\n})\n```\n\nThis call will return an instance of a `SigningRequest`\n\n```js\nSigningRequest {\n  version: 2,\n  data: {\n    req: [\n      'action',\n      {\n        account: 'eosio',\n        name: 'voteproducer',\n        authorization: [ { actor: '............1', permission: '............2' } ],\n        data: '0100000000000000A032DD181BE9D56500'\n      }\n    ],\n    chain_id: [ 'chain_alias', 1 ],\n    flags: 1,\n    callback: '',\n    info: []\n  }\n}\n```\n\n### Encoding a Signing Request\n\nWith an instance of a `SigningRequest` available, we can now call the `encode` method on it in order to generate a compressed payload to transport to a signing application.\n\n```js\nconst encoded = request.encode()\n```\n\nThis `encoded` variable will now contain a string we can either pass directly to the signer via URI, QRCode or any other method.  The string itself is:\n\n```\nesr://gmNgZGRkAIFXBqEFopc6760yugsVYWBggtKCMIEFRnclpF9eTWUACgAA\n```\n\nThese encoded strings can be shared and viewed by a number of applications, including:\n\n**EOSIO.to**\n\nThis website is a utility which allows the viewing of a signing request as well as the opportunity to create a signature for it.  The above encoded request can be passed to the eosio.to domain:\n\nhttps://eosio.to/gmNgZGRkAIFXBqEFopc6760yugsVYWBggtKCMIEFRnclpF9eTWUACgAA\n\n**EOSIO URI Builder**\n\nThis web application allows for the viewing, editing, and customization of signing requests. The above encoded request can be passed to the builder via a URL parameter:\n\nhttps://greymass.github.io/eosio-uri-builder/gmNgZGRkAIFXBqEFopc6760yugsVYWBggtKCMIEFRnclpF9eTWUACgAA\n\n### Decoding a Signing Request\n\nUsing the encoded signing request generated in the example above:\n\n```js\nconst uri = 'esr://gmNgZGRkAIFXBqEFopc6760yugsVYWBggtKCMIEFRnclpF9eTWUACgAA'\n```\n\nAnother application can now decode this request into an instance of a `SigningRequest` with the `from` method. The full working example for [decoding can be found here](https://github.com/greymass/eosio-signing-request-demo/blob/master/examples/decode.js).\n\n```js\nconst decoded = SigningRequest.from(uri, opts)\n```\n\nDecoding the signing request will return the same instance as when it was originally created, as follows:\n\n```js\nSigningRequest {\n  version: 2,\n  data: {\n    chain_id: [ 'chain_alias', 1 ],\n    req: [\n      'action[]',\n      [\n        {\n          account: 'eosio',\n          name: 'voteproducer',\n          authorization: [ { actor: '............1', permission: '............2' } ],\n          data: '0100000000000000A032DD181BE9D56500'\n        }\n      ]\n    ],\n    flags: 1,\n    callback: '',\n    info: []\n  },\n  textEncoder: TextEncoder { encoding: 'utf-8' },\n  textDecoder: TextDecoder { encoding: 'utf-8', fatal: false, ignoreBOM: false },\n  zlib: {\n    deflateRaw: [Function: deflateRaw],\n    inflateRaw: [Function: inflateRaw]\n  },\n  abiProvider: { getAbi: [AsyncFunction: getAbi] },\n  signature: undefined\n}\n```\n\nThis `SigningRequest` can then be used within signing applications to start interacting with the request itself.\n\n### Resolving a Signing Request\n\nWith an instance of a `SigningRequest` available, a signing application can now resolve the specific request into a transaction. The resolving step does a few things:\n\n- Generates a transaction with valid TAPOS values.\n- Templates the transaction, removing any placeholders and resolving it to be used by a specific end user.\n- Serializes the transaction for use within the signer.\n\nThis step now requires that the application understand who the user is, and have access to the blockchain itself to retrieve TAPOS values. The full example of the code below to [resolve a signing request can be found here](https://github.com/greymass/eosio-signing-request-demo/blob/master/examples/resolve.js).\n\n```js\n// An encoded eosio:voteproducer transaction\nconst uri = 'esr://gmNgZGRkAIFXBqEFopc6760yugsVYWBggtKCMIEFRnclpF9eTWUACgAA'\n\n// Decode the URI\nconst decoded = SigningRequest.from(uri, opts)\n\n// In order to resolve the transaction, we need a recent block\nconst head = (await rpc.get_info(true)).head_block_num;\nconst block = await rpc.get_block(head);\n\n// Fetch the ABIs needed for decoding\nconst abis = await decoded.fetchAbis();\n\n// An authorization to resolve the transaction to\nconst authorization = {\n    actor: 'teamgreymass',\n    permission: 'active',\n}\n\n// Resolve the transaction as a specific user\nconst resolved = await decoded.resolve(abis, authorization, block);\n```\n\nThe `resolve` method will return an instance of a `ResolvedSigningRequest`, which contains:\n\n- The original `SigningRequest` as `request`.\n- The `signer` that was used to template the transaction.\n- The `transaction` which has been templated and is ready to use.\n- The transaction already serialized as `serializedTransaction`.\n\nBelow is the representation of an instance of this object.\n\n```js\nResolvedSigningRequest {\n  request: SigningRequest {\n    version: 2,\n    data: {\n      chain_id: [ 'chain_alias', 1 ],\n      req: [\n        'action[]',\n        [\n          {\n            account: 'eosio',\n            name: 'voteproducer',\n            authorization: [ { actor: '............1', permission: '............2' } ],\n            data: '0100000000000000A032DD181BE9D56500'\n          }\n        ]\n      ],\n      flags: 1,\n      callback: '',\n      info: []\n    },\n    textEncoder: TextEncoder { encoding: 'utf-8' },\n    textDecoder: TextDecoder { encoding: 'utf-8', fatal: false, ignoreBOM: false },\n    zlib: {\n      deflateRaw: [Function: deflateRaw],\n      inflateRaw: [Function: inflateRaw]\n    },\n    abiProvider: { getAbi: [AsyncFunction: getAbi] },\n    signature: undefined\n  },\n  signer: { actor: 'teamgreymass', permission: 'active' },\n  transaction: {\n    actions: [\n      {\n        account: 'eosio',\n        name: 'voteproducer',\n        authorization: [ { actor: 'teamgreymass', permission: 'active' } ],\n        data: { voter: 'teamgreymass', proxy: 'greymassvote', producers: [] }\n      }\n    ],\n    context_free_actions: [],\n    transaction_extensions: [],\n    expiration: '2020-01-08T18:44:57.000',\n    ref_block_num: 1423,\n    ref_block_prefix: 4278398322,\n    max_cpu_usage_ms: 0,\n    max_net_usage_words: 0,\n    delay_sec: 0\n  },\n  serializedTransaction: Uint8Array [\n    41,  35,  22,  94, 143,  5, 114,  45,   3, 255,   0,   0,\n     0,   0,   1,   0,   0,  0,   0,   0, 234,  48,  85, 112,\n    21, 210, 137, 222, 170, 50, 221,   1, 128, 177, 145,  94,\n    93,  38, 141, 202,   0,  0,   0,   0, 168, 237,  50,  50,\n    17, 128, 177, 145,  94, 93,  38, 141, 202, 160,  50, 221,\n    24,  27, 233, 213, 101,  0,   0\n  ]\n}\n```\n\nThe `transaction` or `serializedTransaction` can now be used within any signature provider to generate a signature for this transaction, and ultimately broadcast the signed transaction to the blockchain.\n\n### Further Usage\n\nThis README will be updated further to provide more usage as time progresses. The library itself already supports sessions, identities, callbacks, signature generation, and more. It will just take time to properly document every use case.\n\n### Developer Chat\n\nWe have a telegram channel dedicated to the development of this protocol which you can find here:\n\nhttps://t.me/eosio_signing_request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwharfkit%2Fsigning-request","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwharfkit%2Fsigning-request","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwharfkit%2Fsigning-request/lists"}