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 2.7.5 to 2.8.0

2

dist/index.d.ts

@@ -65,3 +65,3 @@ import { operations } from './types/api';

*/
export declare function getSafeApps(baseUrl: string, chainId: string): Promise<SafeAppsResponse>;
export declare function getSafeApps(baseUrl: string, chainId: string, query?: operations['safe_apps_read']['parameters']['query']): Promise<SafeAppsResponse>;
/**

@@ -68,0 +68,0 @@ * Returns list of Master Copies

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

!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports['"@gnosis.pm/safe-react-gateway-sdk"']=n():e['"@gnosis.pm/safe-react-gateway-sdk"']=n()}(self,(function(){return(()=>{var e={204:(e,n,t)=>{e.exports=self.fetch||(self.fetch=t(869).default||t(869))},869:(e,n,t)=>{"use strict";function r(e,n){return n=n||{},new Promise((function(t,r){var a=new XMLHttpRequest,s=[],o=[],i={},c=function(){return{ok:2==(a.status/100|0),statusText:a.statusText,status:a.status,url:a.responseURL,text:function(){return Promise.resolve(a.responseText)},json:function(){return Promise.resolve(a.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([a.response]))},clone:c,headers:{keys:function(){return s},entries:function(){return o},get:function(e){return i[e.toLowerCase()]},has:function(e){return e.toLowerCase()in i}}}};for(var u in a.open(n.method||"get",e,!0),a.onload=function(){a.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(e,n,t){s.push(n=n.toLowerCase()),o.push([n,t]),i[n]=i[n]?i[n]+","+t:t})),t(c())},a.onerror=r,a.withCredentials="include"==n.credentials,n.headers)a.setRequestHeader(u,n.headers[u]);a.send(n.body||null)}))}t.r(n),t.d(n,{default:()=>r})}},n={};function t(r){var a=n[r];if(void 0!==a)return a.exports;var s=n[r]={exports:{}};return e[r](s,s.exports,t),s.exports}t.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return t.d(n,{a:n}),n},t.d=(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},t.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{"use strict";t.r(r),t.d(r,{FEATURES:()=>c,GAS_PRICE_TYPE:()=>i,Operation:()=>e,RPC_AUTHENTICATION:()=>o,TokenType:()=>s,TransactionStatus:()=>n,TransferDirection:()=>a,getBalances:()=>I,getChainConfig:()=>_,getChainsConfig:()=>C,getCollectibles:()=>E,getDecodedData:()=>g,getFiatCurrencies:()=>p,getMasterCopies:()=>S,getOwnedSafes:()=>N,getSafeApps:()=>b,getSafeInfo:()=>h,getTransactionDetails:()=>y,getTransactionHistory:()=>T,getTransactionQueue:()=>A,postSafeGasEstimation:()=>O,proposeTransaction:()=>v});var e,n,a,s,o,i,c,u=t(204),d=t.n(u);function f(e,n){return t=this,r=void 0,s=function(){var t,r,a,s,o;return function(e,n){var t,r,a,s,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function i(s){return function(i){return function(s){if(t)throw new TypeError("Generator is already executing.");for(;o;)try{if(t=1,r&&(a=2&s[0]?r.return:s[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,s[1])).done)return a;switch(r=0,a&&(s=[2&s[0],a.value]),s[0]){case 0:case 1:a=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((a=(a=o.trys).length>0&&a[a.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!a||s[1]>a[0]&&s[1]<a[3])){o.label=s[1];break}if(6===s[0]&&o.label<a[1]){o.label=a[1],a=s;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(s);break}a[2]&&o.ops.pop(),o.trys.pop();continue}s=n.call(e,o)}catch(e){s=[6,e],r=0}finally{t=a=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,i])}}}(this,(function(i){switch(i.label){case 0:return null!=n&&(t={method:"POST",body:"string"==typeof n?n:JSON.stringify(n),headers:{"Content-Type":"application/json"}}),[4,d()(e,t)];case 1:return[4,(r=i.sent()).json()];case 2:if(a=i.sent(),!r.ok){s="";try{s=(o=a).code+": "+o.message}catch(e){s=r.statusText}throw new Error(s)}return[2,a]}}))},new((a=void 0)||(a=Promise))((function(e,n){function o(e){try{c(s.next(e))}catch(e){n(e)}}function i(e){try{c(s.throw(e))}catch(e){n(e)}}function c(n){var t;n.done?e(n.value):(t=n.value,t instanceof a?t:new a((function(e){e(t)}))).then(o,i)}c((s=s.apply(t,r||[])).next())}));var t,r,a,s}function l(e,n,t,r){if(r)return f(r);var a=t;return f(""+e+function(e,n){return n?Object.keys(n).reduce((function(e,t){return function(e,n,t){return e.replace(new RegExp("\\{"+n+"\\}","g"),t)}(e,t,String(n[t]))}),e):e}(n,null==a?void 0:a.path)+function(e){if(!e)return"";var n=new URLSearchParams;Object.keys(e).forEach((function(t){null!=e[t]&&n.append(t,String(e[t]))}));var t=n.toString();return t?"?"+t:""}(null==a?void 0:a.query),null==a?void 0:a.body)}function h(e,n,t){return l(e,"/v1/chains/{chainId}/safes/{address}",{path:{chainId:n,address:t}})}function I(e,n,t,r,a){return void 0===r&&(r="usd"),void 0===a&&(a={}),l(e,"/v1/chains/{chainId}/safes/{address}/balances/{currency}",{path:{chainId:n,address:t,currency:r},query:a})}function p(e){return l(e,"/v1/balances/supported-fiat-codes")}function N(e,n,t){return l(e,"/v1/chains/{chainId}/owners/{address}/safes",{path:{chainId:n,address:t}})}function E(e,n,t,r){return void 0===r&&(r={}),l(e,"/v1/chains/{chainId}/safes/{address}/collectibles",{path:{chainId:n,address:t},query:r})}function T(e,n,t,r){return l(e,"/v1/chains/{chainId}/safes/{safe_address}/transactions/history",{path:{chainId:n,safe_address:t},query:{}},r)}function A(e,n,t,r){return l(e,"/v1/chains/{chainId}/safes/{safe_address}/transactions/queued",{path:{chainId:n,safe_address:t},query:{}},r)}function y(e,n,t){return l(e,"/v1/chains/{chainId}/transactions/{transactionId}",{path:{chainId:n,transactionId:t}})}function O(e,n,t,r){return l(e,"/v2/chains/{chainId}/safes/{safe_address}/multisig-transactions/estimations",{path:{chainId:n,safe_address:t},body:r})}function v(e,n,t,r){return l(e,"/v1/chains/{chainId}/transactions/{safe_address}/propose",{path:{chainId:n,safe_address:t},body:r})}function C(e,n){return l(e,"/v1/chains",{query:n})}function _(e,n){return l(e,"/v1/chains/{chainId}",{path:{chainId:n}})}function b(e,n){return l(e,"/v1/chains/{chainId}/safe-apps",{path:{chainId:n}})}function S(e,n){return l(e,"/v1/chains/{chainId}/about/master-copies",{path:{chainId:n}})}function g(e,n,t){return l(e,"/v1/chains/{chainId}/data-decoder",{path:{chainId:n},body:{data:t}})}!function(e){e[e.CALL=0]="CALL",e[e.DELEGATE=1]="DELEGATE"}(e||(e={})),function(e){e.AWAITING_CONFIRMATIONS="AWAITING_CONFIRMATIONS",e.AWAITING_EXECUTION="AWAITING_EXECUTION",e.CANCELLED="CANCELLED",e.FAILED="FAILED",e.SUCCESS="SUCCESS",e.PENDING="PENDING",e.PENDING_FAILED="PENDING_FAILED",e.WILL_BE_REPLACED="WILL_BE_REPLACED"}(n||(n={})),function(e){e.INCOMING="INCOMING",e.OUTGOING="OUTGOING",e.UNKNOWN="UNKNOWN"}(a||(a={})),function(e){e.ERC20="ERC20",e.ERC721="ERC721",e.NATIVE_COIN="NATIVE_COIN"}(s||(s={})),function(e){e.API_KEY_PATH="API_KEY_PATH",e.NO_AUTHENTICATION="NO_AUTHENTICATION",e.UNKNOWN="UNKNOWN"}(o||(o={})),function(e){e.ORACLE="ORACLE",e.FIXED="FIXED",e.UNKNOWN="UNKNOWN"}(i||(i={})),function(e){e.ERC721="ERC721",e.SAFE_APPS="SAFE_APPS",e.CONTRACT_INTERACTION="CONTRACT_INTERACTION",e.DOMAIN_LOOKUP="DOMAIN_LOOKUP",e.SPENDING_LIMIT="SPENDING_LIMIT",e.EIP1559="EIP1559",e.SAFE_TX_GAS_OPTIONAL="SAFE_TX_GAS_OPTIONAL"}(c||(c={}))})(),r})()}));
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports['"@gnosis.pm/safe-react-gateway-sdk"']=n():e['"@gnosis.pm/safe-react-gateway-sdk"']=n()}(self,(function(){return(()=>{var e={204:(e,n,t)=>{e.exports=self.fetch||(self.fetch=t(869).default||t(869))},869:(e,n,t)=>{"use strict";function r(e,n){return n=n||{},new Promise((function(t,r){var a=new XMLHttpRequest,s=[],o=[],i={},c=function(){return{ok:2==(a.status/100|0),statusText:a.statusText,status:a.status,url:a.responseURL,text:function(){return Promise.resolve(a.responseText)},json:function(){return Promise.resolve(a.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([a.response]))},clone:c,headers:{keys:function(){return s},entries:function(){return o},get:function(e){return i[e.toLowerCase()]},has:function(e){return e.toLowerCase()in i}}}};for(var u in a.open(n.method||"get",e,!0),a.onload=function(){a.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(e,n,t){s.push(n=n.toLowerCase()),o.push([n,t]),i[n]=i[n]?i[n]+","+t:t})),t(c())},a.onerror=r,a.withCredentials="include"==n.credentials,n.headers)a.setRequestHeader(u,n.headers[u]);a.send(n.body||null)}))}t.r(n),t.d(n,{default:()=>r})}},n={};function t(r){var a=n[r];if(void 0!==a)return a.exports;var s=n[r]={exports:{}};return e[r](s,s.exports,t),s.exports}t.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return t.d(n,{a:n}),n},t.d=(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},t.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{"use strict";t.r(r),t.d(r,{FEATURES:()=>u,GAS_PRICE_TYPE:()=>c,Operation:()=>n,RPC_AUTHENTICATION:()=>i,SafeAppAccessPolicyTypes:()=>e,TokenType:()=>o,TransactionStatus:()=>a,TransferDirection:()=>s,getBalances:()=>p,getChainConfig:()=>S,getChainsConfig:()=>_,getCollectibles:()=>T,getDecodedData:()=>L,getFiatCurrencies:()=>N,getMasterCopies:()=>g,getOwnedSafes:()=>E,getSafeApps:()=>b,getSafeInfo:()=>h,getTransactionDetails:()=>y,getTransactionHistory:()=>A,getTransactionQueue:()=>O,postSafeGasEstimation:()=>v,proposeTransaction:()=>C});var e,n,a,s,o,i,c,u,d=t(204),f=t.n(d);function l(e,n){return t=this,r=void 0,s=function(){var t,r,a,s,o;return function(e,n){var t,r,a,s,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function i(s){return function(i){return function(s){if(t)throw new TypeError("Generator is already executing.");for(;o;)try{if(t=1,r&&(a=2&s[0]?r.return:s[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,s[1])).done)return a;switch(r=0,a&&(s=[2&s[0],a.value]),s[0]){case 0:case 1:a=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((a=(a=o.trys).length>0&&a[a.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!a||s[1]>a[0]&&s[1]<a[3])){o.label=s[1];break}if(6===s[0]&&o.label<a[1]){o.label=a[1],a=s;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(s);break}a[2]&&o.ops.pop(),o.trys.pop();continue}s=n.call(e,o)}catch(e){s=[6,e],r=0}finally{t=a=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,i])}}}(this,(function(i){switch(i.label){case 0:return null!=n&&(t={method:"POST",body:"string"==typeof n?n:JSON.stringify(n),headers:{"Content-Type":"application/json"}}),[4,f()(e,t)];case 1:return[4,(r=i.sent()).json()];case 2:if(a=i.sent(),!r.ok){s="";try{s=(o=a).code+": "+o.message}catch(e){s=r.statusText}throw new Error(s)}return[2,a]}}))},new((a=void 0)||(a=Promise))((function(e,n){function o(e){try{c(s.next(e))}catch(e){n(e)}}function i(e){try{c(s.throw(e))}catch(e){n(e)}}function c(n){var t;n.done?e(n.value):(t=n.value,t instanceof a?t:new a((function(e){e(t)}))).then(o,i)}c((s=s.apply(t,r||[])).next())}));var t,r,a,s}function I(e,n,t,r){if(r)return l(r);var a=t;return l(""+e+function(e,n){return n?Object.keys(n).reduce((function(e,t){return function(e,n,t){return e.replace(new RegExp("\\{"+n+"\\}","g"),t)}(e,t,String(n[t]))}),e):e}(n,null==a?void 0:a.path)+function(e){if(!e)return"";var n=new URLSearchParams;Object.keys(e).forEach((function(t){null!=e[t]&&n.append(t,String(e[t]))}));var t=n.toString();return t?"?"+t:""}(null==a?void 0:a.query),null==a?void 0:a.body)}function h(e,n,t){return I(e,"/v1/chains/{chainId}/safes/{address}",{path:{chainId:n,address:t}})}function p(e,n,t,r,a){return void 0===r&&(r="usd"),void 0===a&&(a={}),I(e,"/v1/chains/{chainId}/safes/{address}/balances/{currency}",{path:{chainId:n,address:t,currency:r},query:a})}function N(e){return I(e,"/v1/balances/supported-fiat-codes")}function E(e,n,t){return I(e,"/v1/chains/{chainId}/owners/{address}/safes",{path:{chainId:n,address:t}})}function T(e,n,t,r){return void 0===r&&(r={}),I(e,"/v1/chains/{chainId}/safes/{address}/collectibles",{path:{chainId:n,address:t},query:r})}function A(e,n,t,r){return I(e,"/v1/chains/{chainId}/safes/{safe_address}/transactions/history",{path:{chainId:n,safe_address:t},query:{}},r)}function O(e,n,t,r){return I(e,"/v1/chains/{chainId}/safes/{safe_address}/transactions/queued",{path:{chainId:n,safe_address:t},query:{}},r)}function y(e,n,t){return I(e,"/v1/chains/{chainId}/transactions/{transactionId}",{path:{chainId:n,transactionId:t}})}function v(e,n,t,r){return I(e,"/v2/chains/{chainId}/safes/{safe_address}/multisig-transactions/estimations",{path:{chainId:n,safe_address:t},body:r})}function C(e,n,t,r){return I(e,"/v1/chains/{chainId}/transactions/{safe_address}/propose",{path:{chainId:n,safe_address:t},body:r})}function _(e,n){return I(e,"/v1/chains",{query:n})}function S(e,n){return I(e,"/v1/chains/{chainId}",{path:{chainId:n}})}function b(e,n,t){return void 0===t&&(t={}),I(e,"/v1/chains/{chainId}/safe-apps",{path:{chainId:n},query:t})}function g(e,n){return I(e,"/v1/chains/{chainId}/about/master-copies",{path:{chainId:n}})}function L(e,n,t){return I(e,"/v1/chains/{chainId}/data-decoder",{path:{chainId:n},body:{data:t}})}!function(e){e.NoRestrictions="NO_RESTRICTIONS",e.DomainAllowlist="DOMAIN_ALLOWLIST"}(e||(e={})),function(e){e[e.CALL=0]="CALL",e[e.DELEGATE=1]="DELEGATE"}(n||(n={})),function(e){e.AWAITING_CONFIRMATIONS="AWAITING_CONFIRMATIONS",e.AWAITING_EXECUTION="AWAITING_EXECUTION",e.CANCELLED="CANCELLED",e.FAILED="FAILED",e.SUCCESS="SUCCESS",e.PENDING="PENDING",e.PENDING_FAILED="PENDING_FAILED",e.WILL_BE_REPLACED="WILL_BE_REPLACED"}(a||(a={})),function(e){e.INCOMING="INCOMING",e.OUTGOING="OUTGOING",e.UNKNOWN="UNKNOWN"}(s||(s={})),function(e){e.ERC20="ERC20",e.ERC721="ERC721",e.NATIVE_COIN="NATIVE_COIN"}(o||(o={})),function(e){e.API_KEY_PATH="API_KEY_PATH",e.NO_AUTHENTICATION="NO_AUTHENTICATION",e.UNKNOWN="UNKNOWN"}(i||(i={})),function(e){e.ORACLE="ORACLE",e.FIXED="FIXED",e.UNKNOWN="UNKNOWN"}(c||(c={})),function(e){e.ERC721="ERC721",e.SAFE_APPS="SAFE_APPS",e.CONTRACT_INTERACTION="CONTRACT_INTERACTION",e.DOMAIN_LOOKUP="DOMAIN_LOOKUP",e.SPENDING_LIMIT="SPENDING_LIMIT",e.EIP1559="EIP1559",e.SAFE_TX_GAS_OPTIONAL="SAFE_TX_GAS_OPTIONAL"}(u||(u={}))})(),r})()}));
//# sourceMappingURL=index.min.js.map

@@ -352,2 +352,5 @@ import { FiatCurrencies, OwnedSafes, SafeBalanceResponse, SafeCollectibleResponse, SafeInfo } from './common';

};
query?: {
clientUrl?: string;
};
};

@@ -354,0 +357,0 @@ responses: {

@@ -360,2 +360,5 @@ import { FiatCurrencies, OwnedSafes, SafeBalanceResponse, SafeCollectibleResponse, SafeInfo } from './common'

}
query?: {
clientUrl?: string
}
}

@@ -362,0 +365,0 @@ responses: {

@@ -0,1 +1,13 @@

export declare enum SafeAppAccessPolicyTypes {
NoRestrictions = "NO_RESTRICTIONS",
DomainAllowlist = "DOMAIN_ALLOWLIST"
}
export declare type SafeAppNoRestrictionsPolicy = {
type: SafeAppAccessPolicyTypes.NoRestrictions;
};
export declare type SafeAppDomainAllowlistPolicy = {
type: SafeAppAccessPolicyTypes.DomainAllowlist;
value: string[];
};
export declare type SafeAppsAccessControlPolicies = SafeAppNoRestrictionsPolicy | SafeAppDomainAllowlistPolicy;
export declare type SafeAppProvider = {

@@ -13,3 +25,4 @@ url: string;

provider?: SafeAppProvider;
accessControl: SafeAppsAccessControlPolicies;
};
export declare type SafeAppsResponse = [SafeAppData];

@@ -0,1 +1,17 @@

export enum SafeAppAccessPolicyTypes {
NoRestrictions = 'NO_RESTRICTIONS',
DomainAllowlist = 'DOMAIN_ALLOWLIST',
}
export type SafeAppNoRestrictionsPolicy = {
type: SafeAppAccessPolicyTypes.NoRestrictions
}
export type SafeAppDomainAllowlistPolicy = {
type: SafeAppAccessPolicyTypes.DomainAllowlist
value: string[]
}
export type SafeAppsAccessControlPolicies = SafeAppNoRestrictionsPolicy | SafeAppDomainAllowlistPolicy
export type SafeAppProvider = {

@@ -14,4 +30,5 @@ url: string

provider?: SafeAppProvider
accessControl: SafeAppsAccessControlPolicies
}
export type SafeAppsResponse = [SafeAppData]
{
"name": "@gnosis.pm/safe-react-gateway-sdk",
"version": "2.7.5",
"version": "2.8.0",
"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