@gnosis.pm/safe-react-gateway-sdk
Advanced tools
Comparing version 3.0.1 to 3.1.1
import { operations } from './types/api'; | ||
import { SafeTransactionEstimation, TransactionDetails, TransactionListPage } from './types/transactions'; | ||
import { FiatCurrencies, OwnedSafes, SafeBalanceResponse, SafeCollectibleResponse, SafeInfo } from './types/common'; | ||
import { FiatCurrencies, OwnedSafes, SafeBalanceResponse, SafeCollectibleResponse, SafeIncomingTransfersResponse, SafeInfo, SafeModuleTransactionsResponse, SafeMultisigTransactionsResponse } from './types/common'; | ||
import { ChainListResponse, ChainInfo } from './types/chains'; | ||
@@ -23,2 +23,14 @@ import { SafeAppsResponse } from './types/safe-apps'; | ||
/** | ||
* Get filterable list of incoming transactions | ||
*/ | ||
export declare function getIncomingTransfers(chainId: string, address: string, query?: operations['incoming_transfers']['parameters']['query'], pageUrl?: string): Promise<SafeIncomingTransfersResponse>; | ||
/** | ||
* Get filterable list of module transactions | ||
*/ | ||
export declare function getModuleTransactions(chainId: string, address: string, query?: operations['module_transactions']['parameters']['query'], pageUrl?: string): Promise<SafeModuleTransactionsResponse>; | ||
/** | ||
* Get filterable list of multisig transactions | ||
*/ | ||
export declare function getMultisigTransactions(chainId: string, address: string, query?: operations['multisig_transactions']['parameters']['query'], pageUrl?: string): Promise<SafeMultisigTransactionsResponse>; | ||
/** | ||
* Get the total balance and all assets stored in a Safe | ||
@@ -25,0 +37,0 @@ */ |
@@ -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 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})()})); | ||
!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})()})); | ||
//# sourceMappingURL=index.min.js.map |
@@ -1,2 +0,2 @@ | ||
import { FiatCurrencies, OwnedSafes, SafeBalanceResponse, SafeCollectibleResponse, SafeInfo } from './common'; | ||
import { FiatCurrencies, OwnedSafes, SafeBalanceResponse, SafeCollectibleResponse, SafeIncomingTransfersResponse, SafeInfo, SafeModuleTransactionsResponse, SafeMultisigTransactionsResponse } from './common'; | ||
import { MultisigTransactionRequest, TransactionDetails, SafeTransactionEstimation, SafeTransactionEstimationRequest, TransactionListPage } from './transactions'; | ||
@@ -28,2 +28,32 @@ import { ChainListResponse, ChainInfo } from './chains'; | ||
}; | ||
'/v1/chains/{chainId}/safes/{address}/incoming-transfers/': { | ||
get: operations['incoming_transfers']; | ||
parameters: { | ||
path: { | ||
chainId: string; | ||
address: string; | ||
currency: string; | ||
}; | ||
}; | ||
}; | ||
'/v1/chains/{chainId}/safes/{address}/module-transactions/': { | ||
get: operations['module_transactions']; | ||
parameters: { | ||
path: { | ||
chainId: string; | ||
address: string; | ||
currency: string; | ||
}; | ||
}; | ||
}; | ||
'/v1/chains/{chainId}/safes/{address}/multisig-transactions/': { | ||
get: operations['multisig_transactions']; | ||
parameters: { | ||
path: { | ||
chainId: string; | ||
address: string; | ||
currency: string; | ||
}; | ||
}; | ||
}; | ||
'/v1/balances/supported-fiat-codes': { | ||
@@ -189,2 +219,75 @@ get: operations['get_supported_fiat']; | ||
}; | ||
/** Get filterable incoming transfers */ | ||
incoming_transfers: { | ||
parameters: { | ||
path: { | ||
chainId: string; | ||
address: string; | ||
}; | ||
query?: { | ||
execution_date__gte?: string; | ||
execution_date__lte?: string; | ||
to?: string; | ||
token_address?: string; | ||
value?: string; | ||
}; | ||
}; | ||
responses: { | ||
200: { | ||
schema: SafeIncomingTransfersResponse; | ||
}; | ||
/** Safe not found */ | ||
404: unknown; | ||
/** Safe address checksum not valid */ | ||
422: unknown; | ||
}; | ||
}; | ||
/** Get filterable module transactions */ | ||
module_transactions: { | ||
parameters: { | ||
path: { | ||
chainId: string; | ||
address: string; | ||
}; | ||
query?: { | ||
module?: string; | ||
to?: string; | ||
}; | ||
}; | ||
responses: { | ||
200: { | ||
schema: SafeModuleTransactionsResponse; | ||
}; | ||
/** Safe not found */ | ||
404: unknown; | ||
/** Safe address checksum not valid */ | ||
422: unknown; | ||
}; | ||
}; | ||
/** Get filterable multisig transactions */ | ||
multisig_transactions: { | ||
parameters: { | ||
path: { | ||
chainId: string; | ||
address: string; | ||
}; | ||
query?: { | ||
execution_date__gte?: string; | ||
execution_date__lte?: string; | ||
to?: string; | ||
value?: string; | ||
nonce?: string; | ||
executed?: string; | ||
}; | ||
}; | ||
responses: { | ||
200: { | ||
schema: SafeMultisigTransactionsResponse; | ||
}; | ||
/** Safe not found */ | ||
404: unknown; | ||
/** Safe address checksum not valid */ | ||
422: unknown; | ||
}; | ||
}; | ||
get_supported_fiat: { | ||
@@ -191,0 +294,0 @@ parameters: null; |
@@ -1,3 +0,12 @@ | ||
import { FiatCurrencies, OwnedSafes, SafeBalanceResponse, SafeCollectibleResponse, SafeInfo } from './common' | ||
import { | ||
FiatCurrencies, | ||
OwnedSafes, | ||
SafeBalanceResponse, | ||
SafeCollectibleResponse, | ||
SafeIncomingTransfersResponse, | ||
SafeInfo, | ||
SafeModuleTransactionsResponse, | ||
SafeMultisigTransactionsResponse, | ||
} from './common' | ||
import { | ||
MultisigTransactionRequest, | ||
@@ -35,2 +44,32 @@ TransactionDetails, | ||
} | ||
'/v1/chains/{chainId}/safes/{address}/incoming-transfers/': { | ||
get: operations['incoming_transfers'] | ||
parameters: { | ||
path: { | ||
chainId: string | ||
address: string | ||
currency: string | ||
} | ||
} | ||
} | ||
'/v1/chains/{chainId}/safes/{address}/module-transactions/': { | ||
get: operations['module_transactions'] | ||
parameters: { | ||
path: { | ||
chainId: string | ||
address: string | ||
currency: string | ||
} | ||
} | ||
} | ||
'/v1/chains/{chainId}/safes/{address}/multisig-transactions/': { | ||
get: operations['multisig_transactions'] | ||
parameters: { | ||
path: { | ||
chainId: string | ||
address: string | ||
currency: string | ||
} | ||
} | ||
} | ||
'/v1/balances/supported-fiat-codes': { | ||
@@ -197,2 +236,75 @@ get: operations['get_supported_fiat'] | ||
} | ||
/** Get filterable incoming transfers */ | ||
incoming_transfers: { | ||
parameters: { | ||
path: { | ||
chainId: string | ||
address: string | ||
} | ||
query?: { | ||
execution_date__gte?: string | ||
execution_date__lte?: string | ||
to?: string | ||
token_address?: string | ||
value?: string | ||
} | ||
} | ||
responses: { | ||
200: { | ||
schema: SafeIncomingTransfersResponse | ||
} | ||
/** Safe not found */ | ||
404: unknown | ||
/** Safe address checksum not valid */ | ||
422: unknown | ||
} | ||
} | ||
/** Get filterable module transactions */ | ||
module_transactions: { | ||
parameters: { | ||
path: { | ||
chainId: string | ||
address: string | ||
} | ||
query?: { | ||
module?: string | ||
to?: string | ||
} | ||
} | ||
responses: { | ||
200: { | ||
schema: SafeModuleTransactionsResponse | ||
} | ||
/** Safe not found */ | ||
404: unknown | ||
/** Safe address checksum not valid */ | ||
422: unknown | ||
} | ||
} | ||
/** Get filterable multisig transactions */ | ||
multisig_transactions: { | ||
parameters: { | ||
path: { | ||
chainId: string | ||
address: string | ||
} | ||
query?: { | ||
execution_date__gte?: string | ||
execution_date__lte?: string | ||
to?: string | ||
value?: string | ||
nonce?: string | ||
executed?: string | ||
} | ||
} | ||
responses: { | ||
200: { | ||
schema: SafeMultisigTransactionsResponse | ||
} | ||
/** Safe not found */ | ||
404: unknown | ||
/** Safe address checksum not valid */ | ||
422: unknown | ||
} | ||
} | ||
get_supported_fiat: { | ||
@@ -199,0 +311,0 @@ parameters: null |
@@ -0,1 +1,2 @@ | ||
import { Page } from './transactions'; | ||
export declare enum RPC_AUTHENTICATION { | ||
@@ -71,6 +72,2 @@ API_KEY_PATH = "API_KEY_PATH", | ||
}; | ||
export declare type ChainListResponse = { | ||
next: string | null; | ||
previous: string | null; | ||
results: ChainInfo[]; | ||
}; | ||
export declare type ChainListResponse = Page<ChainInfo>; |
@@ -0,1 +1,3 @@ | ||
import { Page } from './transactions' | ||
export enum RPC_AUTHENTICATION { | ||
@@ -85,6 +87,2 @@ API_KEY_PATH = 'API_KEY_PATH', | ||
export type ChainListResponse = { | ||
next: string | null | ||
previous: string | null | ||
results: ChainInfo[] | ||
} | ||
export type ChainListResponse = Page<ChainInfo> |
@@ -0,1 +1,2 @@ | ||
import { IncomingTransfer, ModuleTransaction, MultisigTransaction, Page } from '..'; | ||
export declare type AddressEx = { | ||
@@ -47,2 +48,5 @@ value: string; | ||
}; | ||
export declare type SafeIncomingTransfersResponse = Page<IncomingTransfer>; | ||
export declare type SafeModuleTransactionsResponse = Page<ModuleTransaction>; | ||
export declare type SafeMultisigTransactionsResponse = Page<MultisigTransaction>; | ||
export declare type SafeCollectibleResponse = { | ||
@@ -49,0 +53,0 @@ address: string; |
@@ -0,1 +1,3 @@ | ||
import { IncomingTransfer, ModuleTransaction, MultisigTransaction, Page } from '..' | ||
export type AddressEx = { | ||
@@ -52,2 +54,8 @@ value: string | ||
export type SafeIncomingTransfersResponse = Page<IncomingTransfer> | ||
export type SafeModuleTransactionsResponse = Page<ModuleTransaction> | ||
export type SafeMultisigTransactionsResponse = Page<MultisigTransaction> | ||
export type SafeCollectibleResponse = { | ||
@@ -54,0 +62,0 @@ address: string |
@@ -184,2 +184,23 @@ import { AddressEx, TokenInfo } from './common'; | ||
}; | ||
export declare type IncomingTransfer = Omit<Transaction, 'transaction'> & { | ||
transaction: Omit<TransactionSummary, 'txInfo' | 'executionInfo'> & { | ||
txInfo: Omit<Transfer, 'direction'> & { | ||
direction: TransferDirection.INCOMING; | ||
}; | ||
}; | ||
}; | ||
export declare type ModuleTransaction = Omit<Transaction, 'transaction'> & { | ||
transaction: Omit<TransactionSummary, 'txInfo' | 'executionInfo'> & { | ||
txInfo: Transfer; | ||
executionInfo?: ModuleExecutionInfo; | ||
}; | ||
}; | ||
export declare type MultisigTransaction = Omit<Transaction, 'transaction'> & { | ||
transaction: Omit<TransactionSummary, 'txInfo' | 'executionInfo'> & { | ||
txInfo: Omit<Transfer, 'direction'> & { | ||
direction: TransferDirection.OUTGOING; | ||
}; | ||
executionInfo?: MultisigExecutionInfo; | ||
}; | ||
}; | ||
export declare type DateLabel = { | ||
@@ -205,3 +226,3 @@ timestamp: number; | ||
export declare type TransactionListItem = Transaction | Label | ConflictHeader; | ||
declare type Page<T> = { | ||
export declare type Page<T> = { | ||
next?: string; | ||
@@ -292,2 +313,1 @@ previous?: string; | ||
}; | ||
export {}; |
@@ -231,2 +231,24 @@ import { AddressEx, TokenInfo } from './common' | ||
// WIP types: | ||
export type IncomingTransfer = Omit<Transaction, 'transaction'> & { | ||
transaction: Omit<TransactionSummary, 'txInfo' | 'executionInfo'> & { | ||
txInfo: Omit<Transfer, 'direction'> & { direction: TransferDirection.INCOMING } | ||
} | ||
} | ||
export type ModuleTransaction = Omit<Transaction, 'transaction'> & { | ||
transaction: Omit<TransactionSummary, 'txInfo' | 'executionInfo'> & { | ||
txInfo: Transfer | ||
executionInfo?: ModuleExecutionInfo | ||
} | ||
} | ||
export type MultisigTransaction = Omit<Transaction, 'transaction'> & { | ||
transaction: Omit<TransactionSummary, 'txInfo' | 'executionInfo'> & { | ||
txInfo: Omit<Transfer, 'direction'> & { direction: TransferDirection.OUTGOING } | ||
executionInfo?: MultisigExecutionInfo | ||
} | ||
} | ||
export type DateLabel = { | ||
@@ -257,3 +279,3 @@ timestamp: number | ||
type Page<T> = { | ||
export type Page<T> = { | ||
next?: string | ||
@@ -260,0 +282,0 @@ previous?: string |
{ | ||
"name": "@gnosis.pm/safe-react-gateway-sdk", | ||
"version": "3.0.1", | ||
"version": "3.1.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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
135838
2176