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.1.2 to 3.1.3

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 d(t){return"string"!=typeof t&&(t=String(t)),t}function f(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=d(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)]=d(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)})),f(t)},h.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),f(t)},h.prototype.entries=function(){var t=[];return this.forEach((function(e,r){t.push([r,e])})),f(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:()=>f,GAS_PRICE_TYPE:()=>d,LabelValue:()=>c,Operation:()=>e,RPC_AUTHENTICATION:()=>u,SafeAppAccessPolicyTypes:()=>t,SettingsInfoType:()=>a,TokenType:()=>h,TransactionStatus:()=>o,TransactionTokenType:()=>s,TransferDirection:()=>i,getBalances:()=>N,getChainConfig:()=>P,getChainsConfig:()=>L,getCollectibles:()=>g,getDecodedData:()=>B,getFiatCurrencies:()=>v,getIncomingTransfers:()=>T,getMasterCopies:()=>U,getModuleTransactions:()=>_,getMultisigTransactions:()=>O,getOwnedSafes:()=>m,getSafeApps:()=>x,getSafeInfo:()=>I,getTransactionDetails:()=>R,getTransactionHistory:()=>w,getTransactionQueue:()=>S,postSafeGasEstimation:()=>C,proposeTransaction:()=>D,setBaseUrl:()=>A});var t,e,o,i,s,a,c,u,d,f,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"}(d||(d={})),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"}(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 E(b,"/v1/chains/{chainId}/safes/{address}/incoming-transfers/",{path:{chainId:t,address:e},query:r},n)}function _(t,e,r,n){return E(b,"/v1/chains/{chainId}/safes/{address}/module-transactions/",{path:{chainId:t,address:e},query:r},n)}function O(t,e,r,n){return E(b,"/v1/chains/{chainId}/safes/{address}/multisig-transactions/",{path:{chainId:t,address:e},query:r},n)}function N(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 v(){return E(b,"/v1/balances/supported-fiat-codes")}function m(t,e){return E(b,"/v1/chains/{chainId}/owners/{address}/safes",{path:{chainId:t,address:e}})}function g(t,e,r){return void 0===r&&(r={}),E(b,"/v1/chains/{chainId}/safes/{address}/collectibles",{path:{chainId:t,address:e},query:r})}function w(t,e,r){return E(b,"/v1/chains/{chainId}/safes/{safe_address}/transactions/history",{path:{chainId:t,safe_address:e},query:{}},r)}function S(t,e,r){return E(b,"/v1/chains/{chainId}/safes/{safe_address}/transactions/queued",{path:{chainId:t,safe_address:e},query:{}},r)}function R(t,e){return E(b,"/v1/chains/{chainId}/transactions/{transactionId}",{path:{chainId:t,transactionId:e}})}function C(t,e,r){return E(b,"/v2/chains/{chainId}/safes/{safe_address}/multisig-transactions/estimations",{path:{chainId:t,safe_address:e},body:r})}function D(t,e,r){return E(b,"/v1/chains/{chainId}/transactions/{safe_address}/propose",{path:{chainId:t,safe_address:e},body:r})}function L(t){return E(b,"/v1/chains",{query:t})}function P(t){return E(b,"/v1/chains/{chainId}",{path:{chainId:t}})}function x(t,e){return void 0===e&&(e={}),E(b,"/v1/chains/{chainId}/safe-apps",{path:{chainId:t},query:e})}function U(t){return E(b,"/v1/chains/{chainId}/about/master-copies",{path:{chainId:t}})}function B(t,e){return E(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 d(t){return"string"!=typeof t&&(t=String(t)),t}function f(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=d(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)]=d(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)})),f(t)},h.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),f(t)},h.prototype.entries=function(){var t=[];return this.forEach((function(e,r){t.push([r,e])})),f(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:()=>f,GAS_PRICE_TYPE:()=>d,LabelValue:()=>c,Operation:()=>e,RPC_AUTHENTICATION:()=>u,SafeAppAccessPolicyTypes:()=>t,SettingsInfoType:()=>a,TokenType:()=>h,TransactionStatus:()=>o,TransactionTokenType:()=>s,TransferDirection:()=>i,getBalances:()=>N,getChainConfig:()=>P,getChainsConfig:()=>L,getCollectibles:()=>g,getDecodedData:()=>B,getFiatCurrencies:()=>v,getIncomingTransfers:()=>T,getMasterCopies:()=>U,getModuleTransactions:()=>_,getMultisigTransactions:()=>O,getOwnedSafes:()=>m,getSafeApps:()=>x,getSafeInfo:()=>I,getTransactionDetails:()=>R,getTransactionHistory:()=>w,getTransactionQueue:()=>S,postSafeGasEstimation:()=>C,proposeTransaction:()=>D,setBaseUrl:()=>A});var t,e,o,i,s,a,c,u,d,f,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"}(d||(d={})),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",t.TX_SIMULATION="TX_SIMULATION"}(f||(f={})),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 E(b,"/v1/chains/{chainId}/safes/{address}/incoming-transfers/",{path:{chainId:t,address:e},query:r},n)}function _(t,e,r,n){return E(b,"/v1/chains/{chainId}/safes/{address}/module-transactions/",{path:{chainId:t,address:e},query:r},n)}function O(t,e,r,n){return E(b,"/v1/chains/{chainId}/safes/{address}/multisig-transactions/",{path:{chainId:t,address:e},query:r},n)}function N(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 v(){return E(b,"/v1/balances/supported-fiat-codes")}function m(t,e){return E(b,"/v1/chains/{chainId}/owners/{address}/safes",{path:{chainId:t,address:e}})}function g(t,e,r){return void 0===r&&(r={}),E(b,"/v1/chains/{chainId}/safes/{address}/collectibles",{path:{chainId:t,address:e},query:r})}function w(t,e,r){return E(b,"/v1/chains/{chainId}/safes/{safe_address}/transactions/history",{path:{chainId:t,safe_address:e},query:{}},r)}function S(t,e,r){return E(b,"/v1/chains/{chainId}/safes/{safe_address}/transactions/queued",{path:{chainId:t,safe_address:e},query:{}},r)}function R(t,e){return E(b,"/v1/chains/{chainId}/transactions/{transactionId}",{path:{chainId:t,transactionId:e}})}function C(t,e,r){return E(b,"/v2/chains/{chainId}/safes/{safe_address}/multisig-transactions/estimations",{path:{chainId:t,safe_address:e},body:r})}function D(t,e,r){return E(b,"/v1/chains/{chainId}/transactions/{safe_address}/propose",{path:{chainId:t,safe_address:e},body:r})}function L(t){return E(b,"/v1/chains",{query:t})}function P(t){return E(b,"/v1/chains/{chainId}",{path:{chainId:t}})}function x(t,e){return void 0===e&&(e={}),E(b,"/v1/chains/{chainId}/safe-apps",{path:{chainId:t},query:e})}function U(t){return E(b,"/v1/chains/{chainId}/about/master-copies",{path:{chainId:t}})}function B(t,e){return E(b,"/v1/chains/{chainId}/data-decoder",{path:{chainId:t},body:{data:e}})}})(),n})()}));
//# sourceMappingURL=index.min.js.map

@@ -52,3 +52,4 @@ import { Page } from './transactions';

EIP1559 = "EIP1559",
SAFE_TX_GAS_OPTIONAL = "SAFE_TX_GAS_OPTIONAL"
SAFE_TX_GAS_OPTIONAL = "SAFE_TX_GAS_OPTIONAL",
TX_SIMULATION = "TX_SIMULATION"
}

@@ -55,0 +56,0 @@ export declare type ChainInfo = {

@@ -64,2 +64,3 @@ import { Page } from './transactions'

SAFE_TX_GAS_OPTIONAL = 'SAFE_TX_GAS_OPTIONAL',
TX_SIMULATION = 'TX_SIMULATION',
}

@@ -66,0 +67,0 @@

{
"name": "@gnosis.pm/safe-react-gateway-sdk",
"version": "3.1.2",
"version": "3.1.3",
"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