{"id":19122992,"url":"https://github.com/digitalbazaar/web-request-rpc","last_synced_at":"2025-07-12T02:02:53.342Z","repository":{"id":23207945,"uuid":"98427736","full_name":"digitalbazaar/web-request-rpc","owner":"digitalbazaar","description":"JSON-RPC for Web Request Polyfills","archived":false,"fork":false,"pushed_at":"2024-07-02T20:43:27.000Z","size":111,"stargazers_count":2,"open_issues_count":1,"forks_count":2,"subscribers_count":12,"default_branch":"main","last_synced_at":"2025-06-09T13:53:59.279Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/digitalbazaar.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}},"created_at":"2017-07-26T13:47:01.000Z","updated_at":"2024-07-02T19:59:49.000Z","dependencies_parsed_at":"2024-11-09T05:34:47.450Z","dependency_job_id":null,"html_url":"https://github.com/digitalbazaar/web-request-rpc","commit_stats":{"total_commits":178,"total_committers":4,"mean_commits":44.5,"dds":0.1123595505617978,"last_synced_commit":"2ef168c9dab364dd135128a098daebb227959dae"},"previous_names":[],"tags_count":46,"template":false,"template_full_name":null,"purl":"pkg:github/digitalbazaar/web-request-rpc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalbazaar%2Fweb-request-rpc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalbazaar%2Fweb-request-rpc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalbazaar%2Fweb-request-rpc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalbazaar%2Fweb-request-rpc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/digitalbazaar","download_url":"https://codeload.github.com/digitalbazaar/web-request-rpc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalbazaar%2Fweb-request-rpc/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264923369,"owners_count":23683735,"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":[],"created_at":"2024-11-09T05:23:53.865Z","updated_at":"2025-07-12T02:02:53.279Z","avatar_url":"https://github.com/digitalbazaar.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# web-request-rpc\nJSON-RPC for Web Request Polyfills\n\nThe RPC protocol used in this library relies on the use of `postMessage`\nand JSON-RPC. While it could potentially be made more general, it is\ncurrently targeted at building components that help implement \"Web Request\"\npolyfills.\n\nA \"Web request\" is a catch all for a request made from a Web application\n(the relying party) that is fulfilled by another Web application (the\nservice provider) that is typically from another origin. There are a number\nof different \"Web requests\" such as requests for payment, credentials,\nsocial information, or media. Each of these may have a Web API that is\nnarrowly targeted (or includes specific features related to) at the\nspecific type of request, however, each of them follow the same general\nmodel. This means some building blocks for creating polyfills for these\nsorts of \"Web requests\" can be shared.\n\nSome of these building blocks are provided by this library.\n\n## Client\n\nA Client is used to connect to an RPC Server.\n\nTODO\n\n## Server\n\nTODO:\n\n## WebAppContext\n\nA WebAppContext loads or attaches to a window with a remote Web Application\nthat typically runs on a cross domain website. It is used to manage and\nprovide access this RPC WebApp. It also enables the WebApp to make some\ncontrol calls, such as to show or hide its UI.\n\nUse cases include:\n\n1. Loading and communicating with a \"Web Request Mediator\" that polyfills\n  some missing feature in a user's Web browser that could not be polyfilled\n  without the use of a cross-domain third party website. These features\n  are typically modeled as some kind of request made by one website that\n  will be fulfilled by a different website. The mediator plays the role\n  that the browser would natively provide if it implemented the feature,\n  namely to facilitate communication and interaction between these two sites\n  to process and fulfill the request.\n2. Loading and communicating with a third party service provider Web\n  application. A \"Web Request Mediator\" (see the first use case) would use\n  a WebAppContext to load these Web applications to enable them to fulfill\n  requests made by a relying party.\n\nTODO: Add note about usefulness of passing a Promise for a window handle\nwhen creating/connecting with client/server/WebAppContext/etc. This approach\nenables a `message` listener to be attached prior to the creation of the\nwindow where access to the window handle is not available until the window\nhas loaded. This is important to prevent missing messages.\n\n## WebApp\n\nA Web Application that uses RPC to communicate with a WebAppContext that\nis loaded by another, typically cross domain, website. This Web Application\ncould be a \"Web Request Mediator\" that will itself load WebApps, or an\napplication designed to fulfill Web requests.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigitalbazaar%2Fweb-request-rpc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdigitalbazaar%2Fweb-request-rpc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigitalbazaar%2Fweb-request-rpc/lists"}