Socket
Socket
Sign inDemoInstall

@walletconnect/relay-api

Package Overview
Dependencies
Maintainers
5
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@walletconnect/relay-api - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

9

dist/cjs/jsonrpc.js

@@ -14,3 +14,12 @@ "use strict";

},
iridium: {
info: "iridium_info",
connect: "iridium_connect",
disconnect: "iridium_disconnect",
publish: "iridium_publish",
subscribe: "iridium_subscribe",
subscription: "iridium_subscription",
unsubscribe: "iridium_unsubscribe",
},
};
//# sourceMappingURL=jsonrpc.js.map

@@ -11,3 +11,12 @@ export const RELAY_JSONRPC = {

},
iridium: {
info: "iridium_info",
connect: "iridium_connect",
disconnect: "iridium_disconnect",
publish: "iridium_publish",
subscribe: "iridium_subscribe",
subscription: "iridium_subscription",
unsubscribe: "iridium_unsubscribe",
},
};
//# sourceMappingURL=jsonrpc.js.map

4

dist/umd/index.min.js

@@ -1,2 +0,2 @@

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("RelayProvider",[],t):"object"==typeof exports?exports.RelayProvider=t():e.RelayProvider=t()}(this,(function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=2)}([function(e,t,r){"use strict";function n(e,t){let r=!0;return t.forEach(t=>{t in e||(r=!1)}),r}function o(e,t){return Array.isArray(e)?e.length===t:Object.keys(e).length===t}function i(e,t){return Array.isArray(e)?e.length>=t:Object.keys(e).length>=t}Object.defineProperty(t,"__esModule",{value:!0}),t.methodEndsWith=t.checkParams=t.hasRequiredParamsLength=t.hasExactParamsLength=t.hasRequiredParams=t.assertType=void 0,t.assertType=function(e,t,r="string"){if(!e[t]||typeof e[t]!==r)throw new Error(`Missing or invalid "${t}" param`)},t.hasRequiredParams=n,t.hasExactParamsLength=o,t.hasRequiredParamsLength=i,t.checkParams=function(e,t,r){return!!(!r.length?o(e,t.length):i(e,t.length))&&n(e,t)},t.methodEndsWith=function(e,t,r="_"){const n=e.split(r);return n[n.length-1].trim().toLowerCase()===t.trim().toLowerCase()}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isSubscriptionParams=t.isSubscriptionMethod=t.isSubscriptionRequest=t.isUnsubscribeParams=t.isUnsubscribeMethod=t.isUnsubscribeRequest=t.isPublishParams=t.isPublishMethod=t.isPublishRequest=t.isSubscribeParams=t.isSubscribeMethod=t.isSubscribeRequest=void 0;const n=r(0);function o(e){return n.methodEndsWith(e,"subscribe")}function i(e){return n.checkParams(e,["topic"],[])}function u(e){return n.methodEndsWith(e,"publish")}function s(e){return n.checkParams(e,["message","topic","ttl"],["prompt"])}function a(e){return n.methodEndsWith(e,"unsubscribe")}function c(e){return n.checkParams(e,["id","topic"],[])}function f(e){return n.methodEndsWith(e,"subscription")}function l(e){return n.checkParams(e,["id","data"],[])}t.isSubscribeRequest=function(e){return o(e.method)&&i(e.params)},t.isSubscribeMethod=o,t.isSubscribeParams=i,t.isPublishRequest=function(e){return u(e.method)&&s(e.params)},t.isPublishMethod=u,t.isPublishParams=s,t.isUnsubscribeRequest=function(e){return a(e.method)&&c(e.params)},t.isUnsubscribeMethod=a,t.isUnsubscribeParams=c,t.isSubscriptionRequest=function(e){return f(e.method)&&l(e.params)},t.isSubscriptionMethod=f,t.isSubscriptionParams=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3);n.__exportStar(r(4),t),n.__exportStar(r(5),t),n.__exportStar(r(6),t),n.__exportStar(r(1),t)},function(e,t,r){"use strict";r.r(t),r.d(t,"__extends",(function(){return o})),r.d(t,"__assign",(function(){return i})),r.d(t,"__rest",(function(){return u})),r.d(t,"__decorate",(function(){return s})),r.d(t,"__param",(function(){return a})),r.d(t,"__metadata",(function(){return c})),r.d(t,"__awaiter",(function(){return f})),r.d(t,"__generator",(function(){return l})),r.d(t,"__createBinding",(function(){return p})),r.d(t,"__exportStar",(function(){return d})),r.d(t,"__values",(function(){return b})),r.d(t,"__read",(function(){return h})),r.d(t,"__spread",(function(){return y})),r.d(t,"__spreadArrays",(function(){return m})),r.d(t,"__await",(function(){return _})),r.d(t,"__asyncGenerator",(function(){return v})),r.d(t,"__asyncDelegator",(function(){return P})),r.d(t,"__asyncValues",(function(){return w})),r.d(t,"__makeTemplateObject",(function(){return S})),r.d(t,"__importStar",(function(){return O})),r.d(t,"__importDefault",(function(){return R})),r.d(t,"__classPrivateFieldGet",(function(){return g})),r.d(t,"__classPrivateFieldSet",(function(){return j}));
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("RelayProvider",[],t):"object"==typeof exports?exports.RelayProvider=t():e.RelayProvider=t()}(this,(function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=2)}([function(e,t,r){"use strict";function n(e,t){let r=!0;return t.forEach(t=>{t in e||(r=!1)}),r}function i(e,t){return Array.isArray(e)?e.length===t:Object.keys(e).length===t}function o(e,t){return Array.isArray(e)?e.length>=t:Object.keys(e).length>=t}Object.defineProperty(t,"__esModule",{value:!0}),t.methodEndsWith=t.checkParams=t.hasRequiredParamsLength=t.hasExactParamsLength=t.hasRequiredParams=t.assertType=void 0,t.assertType=function(e,t,r="string"){if(!e[t]||typeof e[t]!==r)throw new Error(`Missing or invalid "${t}" param`)},t.hasRequiredParams=n,t.hasExactParamsLength=i,t.hasRequiredParamsLength=o,t.checkParams=function(e,t,r){return!!(!r.length?i(e,t.length):o(e,t.length))&&n(e,t)},t.methodEndsWith=function(e,t,r="_"){const n=e.split(r);return n[n.length-1].trim().toLowerCase()===t.trim().toLowerCase()}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isSubscriptionParams=t.isSubscriptionMethod=t.isSubscriptionRequest=t.isUnsubscribeParams=t.isUnsubscribeMethod=t.isUnsubscribeRequest=t.isPublishParams=t.isPublishMethod=t.isPublishRequest=t.isSubscribeParams=t.isSubscribeMethod=t.isSubscribeRequest=void 0;const n=r(0);function i(e){return n.methodEndsWith(e,"subscribe")}function o(e){return n.checkParams(e,["topic"],[])}function u(e){return n.methodEndsWith(e,"publish")}function s(e){return n.checkParams(e,["message","topic","ttl"],["prompt"])}function a(e){return n.methodEndsWith(e,"unsubscribe")}function c(e){return n.checkParams(e,["id","topic"],[])}function f(e){return n.methodEndsWith(e,"subscription")}function l(e){return n.checkParams(e,["id","data"],[])}t.isSubscribeRequest=function(e){return i(e.method)&&o(e.params)},t.isSubscribeMethod=i,t.isSubscribeParams=o,t.isPublishRequest=function(e){return u(e.method)&&s(e.params)},t.isPublishMethod=u,t.isPublishParams=s,t.isUnsubscribeRequest=function(e){return a(e.method)&&c(e.params)},t.isUnsubscribeMethod=a,t.isUnsubscribeParams=c,t.isSubscriptionRequest=function(e){return f(e.method)&&l(e.params)},t.isSubscriptionMethod=f,t.isSubscriptionParams=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3);n.__exportStar(r(4),t),n.__exportStar(r(5),t),n.__exportStar(r(6),t),n.__exportStar(r(1),t)},function(e,t,r){"use strict";r.r(t),r.d(t,"__extends",(function(){return i})),r.d(t,"__assign",(function(){return o})),r.d(t,"__rest",(function(){return u})),r.d(t,"__decorate",(function(){return s})),r.d(t,"__param",(function(){return a})),r.d(t,"__metadata",(function(){return c})),r.d(t,"__awaiter",(function(){return f})),r.d(t,"__generator",(function(){return l})),r.d(t,"__createBinding",(function(){return d})),r.d(t,"__exportStar",(function(){return p})),r.d(t,"__values",(function(){return b})),r.d(t,"__read",(function(){return h})),r.d(t,"__spread",(function(){return y})),r.d(t,"__spreadArrays",(function(){return m})),r.d(t,"__await",(function(){return _})),r.d(t,"__asyncGenerator",(function(){return v})),r.d(t,"__asyncDelegator",(function(){return P})),r.d(t,"__asyncValues",(function(){return w})),r.d(t,"__makeTemplateObject",(function(){return S})),r.d(t,"__importStar",(function(){return O})),r.d(t,"__importDefault",(function(){return R})),r.d(t,"__classPrivateFieldGet",(function(){return g})),r.d(t,"__classPrivateFieldSet",(function(){return j}));
/*! *****************************************************************************

@@ -16,2 +16,2 @@ Copyright (c) Microsoft Corporation.

***************************************************************************** */
var n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};function o(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var i=function(){return(i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function u(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}function s(e,t,r,n){var o,i=arguments.length,u=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)u=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(u=(i<3?o(u):i>3?o(t,r,u):o(t,r))||u);return i>3&&u&&Object.defineProperty(t,r,u),u}function a(e,t){return function(r,n){t(r,n,e)}}function c(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function f(e,t,r,n){return new(r||(r=Promise))((function(o,i){function u(e){try{a(n.next(e))}catch(e){i(e)}}function s(e){try{a(n.throw(e))}catch(e){i(e)}}function a(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(u,s)}a((n=n.apply(e,t||[])).next())}))}function l(e,t){var r,n,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;u;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,n=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=t.call(e,u)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function p(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}function d(e,t){for(var r in e)"default"===r||t.hasOwnProperty(r)||(t[r]=e[r])}function b(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function h(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(h(arguments[t]));return e}function m(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),o=0;for(t=0;t<r;t++)for(var i=arguments[t],u=0,s=i.length;u<s;u++,o++)n[o]=i[u];return n}function _(e){return this instanceof _?(this.v=e,this):new _(e)}function v(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,o=r.apply(e,t||[]),i=[];return n={},u("next"),u("throw"),u("return"),n[Symbol.asyncIterator]=function(){return this},n;function u(e){o[e]&&(n[e]=function(t){return new Promise((function(r,n){i.push([e,t,r,n])>1||s(e,t)}))})}function s(e,t){try{(r=o[e](t)).value instanceof _?Promise.resolve(r.value.v).then(a,c):f(i[0][2],r)}catch(e){f(i[0][3],e)}var r}function a(e){s("next",e)}function c(e){s("throw",e)}function f(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function P(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:_(e[n](t)),done:"return"===n}:o?o(t):t}:o}}function w(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=b(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,o){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,o,(t=e[r](t)).done,t.value)}))}}}function S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function O(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function R(e){return e&&e.__esModule?e:{default:e}}function g(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function j(e,t,r){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,r),r}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseSubscriptionRequest=t.parseUnsubscribeRequest=t.parsePublishRequest=t.parseSubscribeRequest=void 0;const n=r(0),o=r(1);t.parseSubscribeRequest=function(e){if(!o.isSubscribeMethod(e.method))throw new Error("JSON-RPC Request has invalid subscribe method");if(!o.isSubscribeParams(e.params))throw new Error("JSON-RPC Request has invalid subscribe params");const t=e.params;return n.assertType(t,"topic"),t},t.parsePublishRequest=function(e){if(!o.isPublishMethod(e.method))throw new Error("JSON-RPC Request has invalid publish method");if(!o.isPublishParams(e.params))throw new Error("JSON-RPC Request has invalid publish params");const t=e.params;return n.assertType(t,"topic"),n.assertType(t,"message"),n.assertType(t,"ttl","number"),t},t.parseUnsubscribeRequest=function(e){if(!o.isUnsubscribeMethod(e.method))throw new Error("JSON-RPC Request has invalid unsubscribe method");if(!o.isUnsubscribeParams(e.params))throw new Error("JSON-RPC Request has invalid unsubscribe params");const t=e.params;return n.assertType(t,"id"),t},t.parseSubscriptionRequest=function(e){if(!o.isSubscriptionMethod(e.method))throw new Error("JSON-RPC Request has invalid subscription method");if(!o.isSubscriptionParams(e.params))throw new Error("JSON-RPC Request has invalid subscription params");const t=e.params;return n.assertType(t,"id"),n.assertType(t,"data"),t}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RELAY_JSONRPC=void 0,t.RELAY_JSONRPC={waku:{info:"waku_info",connect:"waku_connect",disconnect:"waku_disconnect",publish:"waku_publish",subscribe:"waku_subscribe",subscription:"waku_subscription",unsubscribe:"waku_unsubscribe"}}}])}));
var n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};function i(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var o=function(){return(o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function u(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}function s(e,t,r,n){var i,o=arguments.length,u=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)u=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(u=(o<3?i(u):o>3?i(t,r,u):i(t,r))||u);return o>3&&u&&Object.defineProperty(t,r,u),u}function a(e,t){return function(r,n){t(r,n,e)}}function c(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function f(e,t,r,n){return new(r||(r=Promise))((function(i,o){function u(e){try{a(n.next(e))}catch(e){o(e)}}function s(e){try{a(n.throw(e))}catch(e){o(e)}}function a(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(u,s)}a((n=n.apply(e,t||[])).next())}))}function l(e,t){var r,n,i,o,u={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;u;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return u.label++,{value:o[1],done:!1};case 5:u.label++,n=o[1],o=[0];continue;case 7:o=u.ops.pop(),u.trys.pop();continue;default:if(!(i=u.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){u=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){u.label=o[1];break}if(6===o[0]&&u.label<i[1]){u.label=i[1],i=o;break}if(i&&u.label<i[2]){u.label=i[2],u.ops.push(o);break}i[2]&&u.ops.pop(),u.trys.pop();continue}o=t.call(e,u)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function d(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}function p(e,t){for(var r in e)"default"===r||t.hasOwnProperty(r)||(t[r]=e[r])}function b(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function h(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)u.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return u}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(h(arguments[t]));return e}function m(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),i=0;for(t=0;t<r;t++)for(var o=arguments[t],u=0,s=o.length;u<s;u++,i++)n[i]=o[u];return n}function _(e){return this instanceof _?(this.v=e,this):new _(e)}function v(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(e,t||[]),o=[];return n={},u("next"),u("throw"),u("return"),n[Symbol.asyncIterator]=function(){return this},n;function u(e){i[e]&&(n[e]=function(t){return new Promise((function(r,n){o.push([e,t,r,n])>1||s(e,t)}))})}function s(e,t){try{(r=i[e](t)).value instanceof _?Promise.resolve(r.value.v).then(a,c):f(o[0][2],r)}catch(e){f(o[0][3],e)}var r}function a(e){s("next",e)}function c(e){s("throw",e)}function f(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}}function P(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:_(e[n](t)),done:"return"===n}:i?i(t):t}:i}}function w(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=b(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,i,(t=e[r](t)).done,t.value)}))}}}function S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function O(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function R(e){return e&&e.__esModule?e:{default:e}}function g(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function j(e,t,r){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,r),r}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseSubscriptionRequest=t.parseUnsubscribeRequest=t.parsePublishRequest=t.parseSubscribeRequest=void 0;const n=r(0),i=r(1);t.parseSubscribeRequest=function(e){if(!i.isSubscribeMethod(e.method))throw new Error("JSON-RPC Request has invalid subscribe method");if(!i.isSubscribeParams(e.params))throw new Error("JSON-RPC Request has invalid subscribe params");const t=e.params;return n.assertType(t,"topic"),t},t.parsePublishRequest=function(e){if(!i.isPublishMethod(e.method))throw new Error("JSON-RPC Request has invalid publish method");if(!i.isPublishParams(e.params))throw new Error("JSON-RPC Request has invalid publish params");const t=e.params;return n.assertType(t,"topic"),n.assertType(t,"message"),n.assertType(t,"ttl","number"),t},t.parseUnsubscribeRequest=function(e){if(!i.isUnsubscribeMethod(e.method))throw new Error("JSON-RPC Request has invalid unsubscribe method");if(!i.isUnsubscribeParams(e.params))throw new Error("JSON-RPC Request has invalid unsubscribe params");const t=e.params;return n.assertType(t,"id"),t},t.parseSubscriptionRequest=function(e){if(!i.isSubscriptionMethod(e.method))throw new Error("JSON-RPC Request has invalid subscription method");if(!i.isSubscriptionParams(e.params))throw new Error("JSON-RPC Request has invalid subscription params");const t=e.params;return n.assertType(t,"id"),n.assertType(t,"data"),t}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RELAY_JSONRPC=void 0,t.RELAY_JSONRPC={waku:{info:"waku_info",connect:"waku_connect",disconnect:"waku_disconnect",publish:"waku_publish",subscribe:"waku_subscribe",subscription:"waku_subscription",unsubscribe:"waku_unsubscribe"},iridium:{info:"iridium_info",connect:"iridium_connect",disconnect:"iridium_disconnect",publish:"iridium_publish",subscribe:"iridium_subscribe",subscription:"iridium_subscription",unsubscribe:"iridium_unsubscribe"}}}])}));
{
"name": "@walletconnect/relay-api",
"description": "PubSub Relay JSON-RPC Provider",
"version": "1.0.3",
"version": "1.0.4",
"author": "WalletConnect, Inc. <walletconnect.com>",

@@ -6,0 +6,0 @@ "license": "MIT",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc