Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@gnosis.pm/safe-react-gateway-sdk

Package Overview
Dependencies
Maintainers
4
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gnosis.pm/safe-react-gateway-sdk - npm Package Compare versions

Comparing version 3.0.0 to 3.0.1

2

dist/index.min.js

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

!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports['"@gnosis.pm/safe-react-gateway-sdk"']=e():t['"@gnosis.pm/safe-react-gateway-sdk"']=e()}(this,(function(){return(()=>{var t={98:function(t,e){var r="undefined"!=typeof self?self:this,n=function(){function t(){this.fetch=!1,this.DOMException=r.DOMException}return t.prototype=r,new t}();!function(t){!function(e){var r="URLSearchParams"in t,n="Symbol"in t&&"iterator"in Symbol,o="FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),i="FormData"in t,s="ArrayBuffer"in t;if(s)var a=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(t){return t&&a.indexOf(Object.prototype.toString.call(t))>-1};function u(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function f(t){return"string"!=typeof t&&(t=String(t)),t}function d(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return n&&(e[Symbol.iterator]=function(){return e}),e}function h(t){this.map={},t instanceof h?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function p(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function l(t){return new Promise((function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}}))}function y(t){var e=new FileReader,r=l(e);return e.readAsArrayBuffer(t),r}function b(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function E(){return this.bodyUsed=!1,this._initBody=function(t){var e;this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:o&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:i&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:r&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():s&&o&&(e=t)&&DataView.prototype.isPrototypeOf(e)?(this._bodyArrayBuffer=b(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(t)||c(t))?this._bodyArrayBuffer=b(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o&&(this.blob=function(){var t=p(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?p(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(y)}),this.text=function(){var t,e,r,n=p(this);if(n)return n;if(this._bodyBlob)return t=this._bodyBlob,r=l(e=new FileReader),e.readAsText(t),r;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),r=new Array(e.length),n=0;n<e.length;n++)r[n]=String.fromCharCode(e[n]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},i&&(this.formData=function(){return this.text().then(T)}),this.json=function(){return this.text().then(JSON.parse)},this}h.prototype.append=function(t,e){t=u(t),e=f(e);var r=this.map[t];this.map[t]=r?r+", "+e:e},h.prototype.delete=function(t){delete this.map[u(t)]},h.prototype.get=function(t){return t=u(t),this.has(t)?this.map[t]:null},h.prototype.has=function(t){return this.map.hasOwnProperty(u(t))},h.prototype.set=function(t,e){this.map[u(t)]=f(e)},h.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},h.prototype.keys=function(){var t=[];return this.forEach((function(e,r){t.push(r)})),d(t)},h.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),d(t)},h.prototype.entries=function(){var t=[];return this.forEach((function(e,r){t.push([r,e])})),d(t)},n&&(h.prototype[Symbol.iterator]=h.prototype.entries);var I=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function A(t,e){var r,n,o=(e=e||{}).body;if(t instanceof A){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new h(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,o||null==t._bodyInit||(o=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new h(e.headers)),this.method=(n=(r=e.method||this.method||"GET").toUpperCase(),I.indexOf(n)>-1?n:r),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(o)}function T(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var r=t.split("="),n=r.shift().replace(/\+/g," "),o=r.join("=").replace(/\+/g," ");e.append(decodeURIComponent(n),decodeURIComponent(o))}})),e}function v(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new h(e.headers),this.url=e.url||"",this._initBody(t)}A.prototype.clone=function(){return new A(this,{body:this._bodyInit})},E.call(A.prototype),E.call(v.prototype),v.prototype.clone=function(){return new v(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},v.error=function(){var t=new v(null,{status:0,statusText:""});return t.type="error",t};var O=[301,302,303,307,308];v.redirect=function(t,e){if(-1===O.indexOf(e))throw new RangeError("Invalid status code");return new v(null,{status:e,headers:{location:t}})},e.DOMException=t.DOMException;try{new e.DOMException}catch(t){e.DOMException=function(t,e){this.message=t,this.name=e;var r=Error(t);this.stack=r.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function _(t,r){return new Promise((function(n,i){var s=new A(t,r);if(s.signal&&s.signal.aborted)return i(new e.DOMException("Aborted","AbortError"));var a=new XMLHttpRequest;function c(){a.abort()}a.onload=function(){var t,e,r={status:a.status,statusText:a.statusText,headers:(t=a.getAllResponseHeaders()||"",e=new h,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(t){var r=t.split(":"),n=r.shift().trim();if(n){var o=r.join(":").trim();e.append(n,o)}})),e)};r.url="responseURL"in a?a.responseURL:r.headers.get("X-Request-URL");var o="response"in a?a.response:a.responseText;n(new v(o,r))},a.onerror=function(){i(new TypeError("Network request failed"))},a.ontimeout=function(){i(new TypeError("Network request failed"))},a.onabort=function(){i(new e.DOMException("Aborted","AbortError"))},a.open(s.method,s.url,!0),"include"===s.credentials?a.withCredentials=!0:"omit"===s.credentials&&(a.withCredentials=!1),"responseType"in a&&o&&(a.responseType="blob"),s.headers.forEach((function(t,e){a.setRequestHeader(e,t)})),s.signal&&(s.signal.addEventListener("abort",c),a.onreadystatechange=function(){4===a.readyState&&s.signal.removeEventListener("abort",c)}),a.send(void 0===s._bodyInit?null:s._bodyInit)}))}_.polyfill=!0,t.fetch||(t.fetch=_,t.Headers=h,t.Request=A,t.Response=v),e.Headers=h,e.Request=A,e.Response=v,e.fetch=_,Object.defineProperty(e,"__esModule",{value:!0})}({})}(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var o=n;(e=o.fetch).default=o.fetch,e.fetch=o.fetch,e.Headers=o.Headers,e.Request=o.Request,e.Response=o.Response,t.exports=e}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n].call(i.exports,i,i.exports,r),i.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{"use strict";r.r(n),r.d(n,{FEATURES:()=>f,GAS_PRICE_TYPE:()=>u,LabelValue:()=>a,Operation:()=>e,RPC_AUTHENTICATION:()=>c,SafeAppAccessPolicyTypes:()=>t,TokenType:()=>d,TransactionStatus:()=>o,TransactionTokenType:()=>s,TransferDirection:()=>i,getBalances:()=>A,getChainConfig:()=>S,getChainsConfig:()=>C,getCollectibles:()=>O,getDecodedData:()=>R,getFiatCurrencies:()=>T,getMasterCopies:()=>P,getOwnedSafes:()=>v,getSafeApps:()=>x,getSafeInfo:()=>I,getTransactionDetails:()=>N,getTransactionHistory:()=>_,getTransactionQueue:()=>m,postSafeGasEstimation:()=>w,proposeTransaction:()=>g,setBaseUrl:()=>E});var t,e,o,i,s,a,c,u,f,d,h=r(98),p=r.n(h);function l(t,e){return r=this,n=void 0,i=function(){var r,n,o,i,s;return function(t,e){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)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 s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}(this,(function(a){switch(a.label){case 0:return null!=e&&(r={method:"POST",body:"string"==typeof e?e:JSON.stringify(e),headers:{"Content-Type":"application/json"}}),[4,p()(t,r)];case 1:return[4,(n=a.sent()).json()];case 2:if(o=a.sent(),!n.ok){i="";try{i=(s=o).code+": "+s.message}catch(t){i=n.statusText}throw new Error(i)}return[2,o]}}))},new((o=void 0)||(o=Promise))((function(t,e){function s(t){try{c(i.next(t))}catch(t){e(t)}}function a(t){try{c(i.throw(t))}catch(t){e(t)}}function c(e){var r;e.done?t(e.value):(r=e.value,r instanceof o?r:new o((function(t){t(r)}))).then(s,a)}c((i=i.apply(r,n||[])).next())}));var r,n,o,i}function y(t,e,r,n){if(n)return l(n);var o=r;return l(""+t+function(t,e){return e?Object.keys(e).reduce((function(t,r){return function(t,e,r){return t.replace(new RegExp("\\{"+e+"\\}","g"),r)}(t,r,String(e[r]))}),t):t}(e,null==o?void 0:o.path)+function(t){if(!t)return"";var e=new URLSearchParams;Object.keys(t).forEach((function(r){null!=t[r]&&e.append(r,String(t[r]))}));var r=e.toString();return r?"?"+r:""}(null==o?void 0:o.query),null==o?void 0:o.body)}!function(t){t.NoRestrictions="NO_RESTRICTIONS",t.DomainAllowlist="DOMAIN_ALLOWLIST"}(t||(t={})),function(t){t[t.CALL=0]="CALL",t[t.DELEGATE=1]="DELEGATE"}(e||(e={})),function(t){t.AWAITING_CONFIRMATIONS="AWAITING_CONFIRMATIONS",t.AWAITING_EXECUTION="AWAITING_EXECUTION",t.CANCELLED="CANCELLED",t.FAILED="FAILED",t.SUCCESS="SUCCESS",t.PENDING="PENDING",t.WILL_BE_REPLACED="WILL_BE_REPLACED"}(o||(o={})),function(t){t.INCOMING="INCOMING",t.OUTGOING="OUTGOING",t.UNKNOWN="UNKNOWN"}(i||(i={})),function(t){t.ERC20="ERC20",t.ERC721="ERC721",t.NATIVE_COIN="NATIVE_COIN"}(s||(s={})),function(t){t.Queued="Queued",t.Next="Next"}(a||(a={})),function(t){t.API_KEY_PATH="API_KEY_PATH",t.NO_AUTHENTICATION="NO_AUTHENTICATION",t.UNKNOWN="UNKNOWN"}(c||(c={})),function(t){t.ORACLE="ORACLE",t.FIXED="FIXED",t.UNKNOWN="UNKNOWN"}(u||(u={})),function(t){t.ERC721="ERC721",t.SAFE_APPS="SAFE_APPS",t.CONTRACT_INTERACTION="CONTRACT_INTERACTION",t.DOMAIN_LOOKUP="DOMAIN_LOOKUP",t.SPENDING_LIMIT="SPENDING_LIMIT",t.EIP1559="EIP1559",t.SAFE_TX_GAS_OPTIONAL="SAFE_TX_GAS_OPTIONAL"}(f||(f={})),function(t){t.ERC20="ERC20",t.ERC721="ERC721",t.NATIVE_TOKEN="NATIVE_TOKEN"}(d||(d={}));var b="https://safe-client.gnosis.io",E=function(t){b=t};function I(t,e){return y(b,"/v1/chains/{chainId}/safes/{address}",{path:{chainId:t,address:e}})}function A(t,e,r,n){return void 0===r&&(r="usd"),void 0===n&&(n={}),y(b,"/v1/chains/{chainId}/safes/{address}/balances/{currency}",{path:{chainId:t,address:e,currency:r},query:n})}function T(){return y(b,"/v1/balances/supported-fiat-codes")}function v(t,e){return y(b,"/v1/chains/{chainId}/owners/{address}/safes",{path:{chainId:t,address:e}})}function O(t,e,r){return void 0===r&&(r={}),y(b,"/v1/chains/{chainId}/safes/{address}/collectibles",{path:{chainId:t,address:e},query:r})}function _(t,e,r){return y(b,"/v1/chains/{chainId}/safes/{safe_address}/transactions/history",{path:{chainId:t,safe_address:e},query:{}},r)}function m(t,e,r){return y(b,"/v1/chains/{chainId}/safes/{safe_address}/transactions/queued",{path:{chainId:t,safe_address:e},query:{}},r)}function N(t,e){return y(b,"/v1/chains/{chainId}/transactions/{transactionId}",{path:{chainId:t,transactionId:e}})}function w(t,e,r){return y(b,"/v2/chains/{chainId}/safes/{safe_address}/multisig-transactions/estimations",{path:{chainId:t,safe_address:e},body:r})}function g(t,e,r){return y(b,"/v1/chains/{chainId}/transactions/{safe_address}/propose",{path:{chainId:t,safe_address:e},body:r})}function C(t){return y(b,"/v1/chains",{query:t})}function S(t){return y(b,"/v1/chains/{chainId}",{path:{chainId:t}})}function x(t,e){return void 0===e&&(e={}),y(b,"/v1/chains/{chainId}/safe-apps",{path:{chainId:t},query:e})}function P(t){return y(b,"/v1/chains/{chainId}/about/master-copies",{path:{chainId:t}})}function R(t,e){return y(b,"/v1/chains/{chainId}/data-decoder",{path:{chainId:t},body:{data:e}})}})(),n})()}));
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports['"@gnosis.pm/safe-react-gateway-sdk"']=e():t['"@gnosis.pm/safe-react-gateway-sdk"']=e()}(this,(function(){return(()=>{var t={98:function(t,e){var r="undefined"!=typeof self?self:this,n=function(){function t(){this.fetch=!1,this.DOMException=r.DOMException}return t.prototype=r,new t}();!function(t){!function(e){var r="URLSearchParams"in t,n="Symbol"in t&&"iterator"in Symbol,o="FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),i="FormData"in t,s="ArrayBuffer"in t;if(s)var a=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(t){return t&&a.indexOf(Object.prototype.toString.call(t))>-1};function u(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function f(t){return"string"!=typeof t&&(t=String(t)),t}function d(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return n&&(e[Symbol.iterator]=function(){return e}),e}function h(t){this.map={},t instanceof h?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function p(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function l(t){return new Promise((function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}}))}function y(t){var e=new FileReader,r=l(e);return e.readAsArrayBuffer(t),r}function E(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function b(){return this.bodyUsed=!1,this._initBody=function(t){var e;this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:o&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:i&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:r&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():s&&o&&(e=t)&&DataView.prototype.isPrototypeOf(e)?(this._bodyArrayBuffer=E(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(t)||c(t))?this._bodyArrayBuffer=E(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o&&(this.blob=function(){var t=p(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?p(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(y)}),this.text=function(){var t,e,r,n=p(this);if(n)return n;if(this._bodyBlob)return t=this._bodyBlob,r=l(e=new FileReader),e.readAsText(t),r;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),r=new Array(e.length),n=0;n<e.length;n++)r[n]=String.fromCharCode(e[n]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},i&&(this.formData=function(){return this.text().then(T)}),this.json=function(){return this.text().then(JSON.parse)},this}h.prototype.append=function(t,e){t=u(t),e=f(e);var r=this.map[t];this.map[t]=r?r+", "+e:e},h.prototype.delete=function(t){delete this.map[u(t)]},h.prototype.get=function(t){return t=u(t),this.has(t)?this.map[t]:null},h.prototype.has=function(t){return this.map.hasOwnProperty(u(t))},h.prototype.set=function(t,e){this.map[u(t)]=f(e)},h.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},h.prototype.keys=function(){var t=[];return this.forEach((function(e,r){t.push(r)})),d(t)},h.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),d(t)},h.prototype.entries=function(){var t=[];return this.forEach((function(e,r){t.push([r,e])})),d(t)},n&&(h.prototype[Symbol.iterator]=h.prototype.entries);var A=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function I(t,e){var r,n,o=(e=e||{}).body;if(t instanceof I){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new h(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,o||null==t._bodyInit||(o=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new h(e.headers)),this.method=(n=(r=e.method||this.method||"GET").toUpperCase(),A.indexOf(n)>-1?n:r),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(o)}function T(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var r=t.split("="),n=r.shift().replace(/\+/g," "),o=r.join("=").replace(/\+/g," ");e.append(decodeURIComponent(n),decodeURIComponent(o))}})),e}function _(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new h(e.headers),this.url=e.url||"",this._initBody(t)}I.prototype.clone=function(){return new I(this,{body:this._bodyInit})},b.call(I.prototype),b.call(_.prototype),_.prototype.clone=function(){return new _(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},_.error=function(){var t=new _(null,{status:0,statusText:""});return t.type="error",t};var O=[301,302,303,307,308];_.redirect=function(t,e){if(-1===O.indexOf(e))throw new RangeError("Invalid status code");return new _(null,{status:e,headers:{location:t}})},e.DOMException=t.DOMException;try{new e.DOMException}catch(t){e.DOMException=function(t,e){this.message=t,this.name=e;var r=Error(t);this.stack=r.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function N(t,r){return new Promise((function(n,i){var s=new I(t,r);if(s.signal&&s.signal.aborted)return i(new e.DOMException("Aborted","AbortError"));var a=new XMLHttpRequest;function c(){a.abort()}a.onload=function(){var t,e,r={status:a.status,statusText:a.statusText,headers:(t=a.getAllResponseHeaders()||"",e=new h,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(t){var r=t.split(":"),n=r.shift().trim();if(n){var o=r.join(":").trim();e.append(n,o)}})),e)};r.url="responseURL"in a?a.responseURL:r.headers.get("X-Request-URL");var o="response"in a?a.response:a.responseText;n(new _(o,r))},a.onerror=function(){i(new TypeError("Network request failed"))},a.ontimeout=function(){i(new TypeError("Network request failed"))},a.onabort=function(){i(new e.DOMException("Aborted","AbortError"))},a.open(s.method,s.url,!0),"include"===s.credentials?a.withCredentials=!0:"omit"===s.credentials&&(a.withCredentials=!1),"responseType"in a&&o&&(a.responseType="blob"),s.headers.forEach((function(t,e){a.setRequestHeader(e,t)})),s.signal&&(s.signal.addEventListener("abort",c),a.onreadystatechange=function(){4===a.readyState&&s.signal.removeEventListener("abort",c)}),a.send(void 0===s._bodyInit?null:s._bodyInit)}))}N.polyfill=!0,t.fetch||(t.fetch=N,t.Headers=h,t.Request=I,t.Response=_),e.Headers=h,e.Request=I,e.Response=_,e.fetch=N,Object.defineProperty(e,"__esModule",{value:!0})}({})}(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var o=n;(e=o.fetch).default=o.fetch,e.fetch=o.fetch,e.Headers=o.Headers,e.Request=o.Request,e.Response=o.Response,t.exports=e}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n].call(i.exports,i,i.exports,r),i.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{"use strict";r.r(n),r.d(n,{FEATURES:()=>d,GAS_PRICE_TYPE:()=>f,LabelValue:()=>c,Operation:()=>e,RPC_AUTHENTICATION:()=>u,SafeAppAccessPolicyTypes:()=>t,SettingsInfoType:()=>a,TokenType:()=>h,TransactionStatus:()=>o,TransactionTokenType:()=>s,TransferDirection:()=>i,getBalances:()=>T,getChainConfig:()=>C,getChainsConfig:()=>R,getCollectibles:()=>N,getDecodedData:()=>P,getFiatCurrencies:()=>_,getMasterCopies:()=>L,getOwnedSafes:()=>O,getSafeApps:()=>D,getSafeInfo:()=>I,getTransactionDetails:()=>w,getTransactionHistory:()=>v,getTransactionQueue:()=>m,postSafeGasEstimation:()=>g,proposeTransaction:()=>S,setBaseUrl:()=>A});var t,e,o,i,s,a,c,u,f,d,h,p=r(98),l=r.n(p);function y(t,e){return r=this,n=void 0,i=function(){var r,n,o,i,s;return function(t,e){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)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 s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}(this,(function(a){switch(a.label){case 0:return null!=e&&(r={method:"POST",body:"string"==typeof e?e:JSON.stringify(e),headers:{"Content-Type":"application/json"}}),[4,l()(t,r)];case 1:return[4,(n=a.sent()).json()];case 2:if(o=a.sent(),!n.ok){i="";try{i=(s=o).code+": "+s.message}catch(t){i=n.statusText}throw new Error(i)}return[2,o]}}))},new((o=void 0)||(o=Promise))((function(t,e){function s(t){try{c(i.next(t))}catch(t){e(t)}}function a(t){try{c(i.throw(t))}catch(t){e(t)}}function c(e){var r;e.done?t(e.value):(r=e.value,r instanceof o?r:new o((function(t){t(r)}))).then(s,a)}c((i=i.apply(r,n||[])).next())}));var r,n,o,i}function E(t,e,r,n){if(n)return y(n);var o=r;return y(""+t+function(t,e){return e?Object.keys(e).reduce((function(t,r){return function(t,e,r){return t.replace(new RegExp("\\{"+e+"\\}","g"),r)}(t,r,String(e[r]))}),t):t}(e,null==o?void 0:o.path)+function(t){if(!t)return"";var e=new URLSearchParams;Object.keys(t).forEach((function(r){null!=t[r]&&e.append(r,String(t[r]))}));var r=e.toString();return r?"?"+r:""}(null==o?void 0:o.query),null==o?void 0:o.body)}!function(t){t.NoRestrictions="NO_RESTRICTIONS",t.DomainAllowlist="DOMAIN_ALLOWLIST"}(t||(t={})),function(t){t[t.CALL=0]="CALL",t[t.DELEGATE=1]="DELEGATE"}(e||(e={})),function(t){t.AWAITING_CONFIRMATIONS="AWAITING_CONFIRMATIONS",t.AWAITING_EXECUTION="AWAITING_EXECUTION",t.CANCELLED="CANCELLED",t.FAILED="FAILED",t.SUCCESS="SUCCESS",t.PENDING="PENDING",t.WILL_BE_REPLACED="WILL_BE_REPLACED"}(o||(o={})),function(t){t.INCOMING="INCOMING",t.OUTGOING="OUTGOING",t.UNKNOWN="UNKNOWN"}(i||(i={})),function(t){t.ERC20="ERC20",t.ERC721="ERC721",t.NATIVE_COIN="NATIVE_COIN"}(s||(s={})),function(t){t.SET_FALLBACK_HANDLER="SET_FALLBACK_HANDLER",t.ADD_OWNER="ADD_OWNER",t.REMOVE_OWNER="REMOVE_OWNER",t.SWAP_OWNER="SWAP_OWNER",t.CHANGE_THRESHOLD="CHANGE_THRESHOLD",t.CHANGE_IMPLEMENTATION="CHANGE_IMPLEMENTATION",t.ENABLE_MODULE="ENABLE_MODULE",t.DISABLE_MODULE="DISABLE_MODULE",t.SET_GUARD="SET_GUARD",t.DELETE_GUARD="DELETE_GUARD"}(a||(a={})),function(t){t.Queued="Queued",t.Next="Next"}(c||(c={})),function(t){t.API_KEY_PATH="API_KEY_PATH",t.NO_AUTHENTICATION="NO_AUTHENTICATION",t.UNKNOWN="UNKNOWN"}(u||(u={})),function(t){t.ORACLE="ORACLE",t.FIXED="FIXED",t.UNKNOWN="UNKNOWN"}(f||(f={})),function(t){t.ERC721="ERC721",t.SAFE_APPS="SAFE_APPS",t.CONTRACT_INTERACTION="CONTRACT_INTERACTION",t.DOMAIN_LOOKUP="DOMAIN_LOOKUP",t.SPENDING_LIMIT="SPENDING_LIMIT",t.EIP1559="EIP1559",t.SAFE_TX_GAS_OPTIONAL="SAFE_TX_GAS_OPTIONAL"}(d||(d={})),function(t){t.ERC20="ERC20",t.ERC721="ERC721",t.NATIVE_TOKEN="NATIVE_TOKEN"}(h||(h={}));var b="https://safe-client.gnosis.io",A=function(t){b=t};function I(t,e){return E(b,"/v1/chains/{chainId}/safes/{address}",{path:{chainId:t,address:e}})}function T(t,e,r,n){return void 0===r&&(r="usd"),void 0===n&&(n={}),E(b,"/v1/chains/{chainId}/safes/{address}/balances/{currency}",{path:{chainId:t,address:e,currency:r},query:n})}function _(){return E(b,"/v1/balances/supported-fiat-codes")}function O(t,e){return E(b,"/v1/chains/{chainId}/owners/{address}/safes",{path:{chainId:t,address:e}})}function N(t,e,r){return void 0===r&&(r={}),E(b,"/v1/chains/{chainId}/safes/{address}/collectibles",{path:{chainId:t,address:e},query:r})}function v(t,e,r){return E(b,"/v1/chains/{chainId}/safes/{safe_address}/transactions/history",{path:{chainId:t,safe_address:e},query:{}},r)}function m(t,e,r){return E(b,"/v1/chains/{chainId}/safes/{safe_address}/transactions/queued",{path:{chainId:t,safe_address:e},query:{}},r)}function w(t,e){return E(b,"/v1/chains/{chainId}/transactions/{transactionId}",{path:{chainId:t,transactionId:e}})}function g(t,e,r){return E(b,"/v2/chains/{chainId}/safes/{safe_address}/multisig-transactions/estimations",{path:{chainId:t,safe_address:e},body:r})}function S(t,e,r){return E(b,"/v1/chains/{chainId}/transactions/{safe_address}/propose",{path:{chainId:t,safe_address:e},body:r})}function R(t){return E(b,"/v1/chains",{query:t})}function C(t){return E(b,"/v1/chains/{chainId}",{path:{chainId:t}})}function D(t,e){return void 0===e&&(e={}),E(b,"/v1/chains/{chainId}/safe-apps",{path:{chainId:t},query:e})}function L(t){return E(b,"/v1/chains/{chainId}/about/master-copies",{path:{chainId:t}})}function P(t,e){return E(b,"/v1/chains/{chainId}/data-decoder",{path:{chainId:t},body:{data:e}})}})(),n})()}));
//# sourceMappingURL=index.min.js.map

@@ -44,2 +44,14 @@ import { AddressEx, TokenInfo } from './common';

}
export declare enum SettingsInfoType {
SET_FALLBACK_HANDLER = "SET_FALLBACK_HANDLER",
ADD_OWNER = "ADD_OWNER",
REMOVE_OWNER = "REMOVE_OWNER",
SWAP_OWNER = "SWAP_OWNER",
CHANGE_THRESHOLD = "CHANGE_THRESHOLD",
CHANGE_IMPLEMENTATION = "CHANGE_IMPLEMENTATION",
ENABLE_MODULE = "ENABLE_MODULE",
DISABLE_MODULE = "DISABLE_MODULE",
SET_GUARD = "SET_GUARD",
DELETE_GUARD = "DELETE_GUARD"
}
export declare type Erc20Transfer = {

@@ -75,7 +87,7 @@ type: TransactionTokenType.ERC20;

export declare type SetFallbackHandler = {
type: 'SET_FALLBACK_HANDLER';
type: SettingsInfoType.SET_FALLBACK_HANDLER;
handler: AddressEx;
};
export declare type AddOwner = {
type: 'ADD_OWNER';
type: SettingsInfoType.ADD_OWNER;
owner: AddressEx;

@@ -85,3 +97,3 @@ threshold: number;

export declare type RemoveOwner = {
type: 'REMOVE_OWNER';
type: SettingsInfoType.REMOVE_OWNER;
owner: AddressEx;

@@ -91,3 +103,3 @@ threshold: number;

export declare type SwapOwner = {
type: 'SWAP_OWNER';
type: SettingsInfoType.SWAP_OWNER;
oldOwner: AddressEx;

@@ -97,23 +109,23 @@ newOwner: AddressEx;

export declare type ChangeThreshold = {
type: 'CHANGE_THRESHOLD';
type: SettingsInfoType.CHANGE_THRESHOLD;
threshold: number;
};
export declare type ChangeImplementation = {
type: 'CHANGE_IMPLEMENTATION';
type: SettingsInfoType.CHANGE_IMPLEMENTATION;
implementation: AddressEx;
};
export declare type EnableModule = {
type: 'ENABLE_MODULE';
type: SettingsInfoType.ENABLE_MODULE;
module: AddressEx;
};
export declare type DisableModule = {
type: 'DISABLE_MODULE';
type: SettingsInfoType.DISABLE_MODULE;
module: AddressEx;
};
export declare type SetGuard = {
type: 'SET_GUARD';
type: SettingsInfoType.SET_GUARD;
guard: AddressEx;
};
export declare type DeleteGuard = {
type: 'DELETE_GUARD';
type: SettingsInfoType.DELETE_GUARD;
};

@@ -120,0 +132,0 @@ export declare type SettingsInfo = SetFallbackHandler | AddOwner | RemoveOwner | SwapOwner | ChangeThreshold | ChangeImplementation | EnableModule | DisableModule | SetGuard | DeleteGuard;

@@ -54,2 +54,15 @@ import { AddressEx, TokenInfo } from './common'

export enum SettingsInfoType {
SET_FALLBACK_HANDLER = 'SET_FALLBACK_HANDLER',
ADD_OWNER = 'ADD_OWNER',
REMOVE_OWNER = 'REMOVE_OWNER',
SWAP_OWNER = 'SWAP_OWNER',
CHANGE_THRESHOLD = 'CHANGE_THRESHOLD',
CHANGE_IMPLEMENTATION = 'CHANGE_IMPLEMENTATION',
ENABLE_MODULE = 'ENABLE_MODULE',
DISABLE_MODULE = 'DISABLE_MODULE',
SET_GUARD = 'SET_GUARD',
DELETE_GUARD = 'DELETE_GUARD',
}
export type Erc20Transfer = {

@@ -90,3 +103,3 @@ type: TransactionTokenType.ERC20

export type SetFallbackHandler = {
type: 'SET_FALLBACK_HANDLER'
type: SettingsInfoType.SET_FALLBACK_HANDLER
handler: AddressEx

@@ -96,3 +109,3 @@ }

export type AddOwner = {
type: 'ADD_OWNER'
type: SettingsInfoType.ADD_OWNER
owner: AddressEx

@@ -103,3 +116,3 @@ threshold: number

export type RemoveOwner = {
type: 'REMOVE_OWNER'
type: SettingsInfoType.REMOVE_OWNER
owner: AddressEx

@@ -110,3 +123,3 @@ threshold: number

export type SwapOwner = {
type: 'SWAP_OWNER'
type: SettingsInfoType.SWAP_OWNER
oldOwner: AddressEx

@@ -117,3 +130,3 @@ newOwner: AddressEx

export type ChangeThreshold = {
type: 'CHANGE_THRESHOLD'
type: SettingsInfoType.CHANGE_THRESHOLD
threshold: number

@@ -123,3 +136,3 @@ }

export type ChangeImplementation = {
type: 'CHANGE_IMPLEMENTATION'
type: SettingsInfoType.CHANGE_IMPLEMENTATION
implementation: AddressEx

@@ -129,3 +142,3 @@ }

export type EnableModule = {
type: 'ENABLE_MODULE'
type: SettingsInfoType.ENABLE_MODULE
module: AddressEx

@@ -135,3 +148,3 @@ }

export type DisableModule = {
type: 'DISABLE_MODULE'
type: SettingsInfoType.DISABLE_MODULE
module: AddressEx

@@ -141,3 +154,3 @@ }

export type SetGuard = {
type: 'SET_GUARD'
type: SettingsInfoType.SET_GUARD
guard: AddressEx

@@ -147,3 +160,3 @@ }

export type DeleteGuard = {
type: 'DELETE_GUARD'
type: SettingsInfoType.DELETE_GUARD
}

@@ -150,0 +163,0 @@

MIT License
Copyright (c) 2021-2022 Gnosis Ltd
Copyright (c) 2021-2022 Safe Ecosystem Foundation

@@ -5,0 +5,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy

{
"name": "@gnosis.pm/safe-react-gateway-sdk",
"version": "3.0.0",
"version": "3.0.1",
"main": "dist/index.min.js",

@@ -5,0 +5,0 @@ "types": "dist/index.d.ts",

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