New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@gnosis.pm/safe-apps-sdk

Package Overview
Dependencies
Maintainers
6
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Comparing version 2.4.0 to 3.0.0-alpha.0

dist/src/safe/index.d.ts

8

dist/package.json
{
"name": "@gnosis.pm/safe-apps-sdk",
"version": "2.4.0",
"version": "3.0.0-alpha.0",
"description": "SDK developed to integrate third-party apps with Safe-Multisig app.",

@@ -27,8 +27,8 @@ "main": "dist/src/index.js",

"dependencies": {
"semver": "^7.3.2"
"semver": "7.1.0"
},
"devDependencies": {
"@types/jest": "^26.0.23",
"@types/node": "^15.0.1",
"@types/semver": "^7.3.5",
"@types/node": "^15.3.0",
"@types/semver": "7.1.0",
"husky": "^6.0.0",

@@ -35,0 +35,0 @@ "lint-staged": "^11.0.0",

@@ -11,5 +11,5 @@ import { Communicator, Response } from '../types';

private handleIncomingMessage;
send: <M extends "getEnvInfo" | "sendTransactions" | "rpcCall" | "getSafeInfo", P, R>(method: M, params: P) => Promise<Response<R>>;
send: <M extends "getEnvInfo" | "sendTransactions" | "rpcCall" | "getSafeInfo" | "getSafeBalances", P, R>(method: M, params: P) => Promise<Response<R>>;
}
export default PostMessageCommunicator;
export * from './methods';
import { ErrorResponse, SDKRequestData, Methods, RequestId, SuccessResponse, MethodToResponse } from '../types';
declare class MessageFormatter {
static makeRequest: <M extends "getEnvInfo" | "sendTransactions" | "rpcCall" | "getSafeInfo" = "getEnvInfo" | "sendTransactions" | "rpcCall" | "getSafeInfo", P = unknown>(method: M, params: P) => SDKRequestData<M, P>;
static makeRequest: <M extends "getEnvInfo" | "sendTransactions" | "rpcCall" | "getSafeInfo" | "getSafeBalances" = "getEnvInfo" | "sendTransactions" | "rpcCall" | "getSafeInfo" | "getSafeBalances", P = unknown>(method: M, params: P) => SDKRequestData<M, P>;
static makeResponse: (id: RequestId, data: MethodToResponse[Methods], version: string) => SuccessResponse;

@@ -5,0 +5,0 @@ static makeErrorResponse: (id: RequestId, error: string, version: string) => ErrorResponse;

@@ -6,2 +6,3 @@ export declare const METHODS: {

readonly getSafeInfo: "getSafeInfo";
readonly getSafeBalances: "getSafeBalances";
};

@@ -9,3 +9,4 @@ "use strict";

getSafeInfo: 'getSafeInfo',
getSafeBalances: 'getSafeBalances',
};
//# sourceMappingURL=methods.js.map

@@ -1,4 +0,4 @@

import { SafeInfo } from './types';
import { TXs } from './txs';
import { Eth } from './eth';
import { Safe } from './safe';
export declare type Opts = {

@@ -12,7 +12,7 @@ whitelistedDomains?: RegExp[];

readonly txs: TXs;
readonly safe: Safe;
constructor(opts?: Opts);
private bootstrap;
private getEnvInfo;
getSafeInfo(): Promise<SafeInfo>;
}
export default SafeAppsSDK;

@@ -10,2 +10,3 @@ "use strict";

const eth_1 = require("./eth");
const safe_1 = require("./safe");
class SafeAppsSDK {

@@ -20,2 +21,3 @@ constructor(opts = {}) {

this.txs = new txs_1.TXs(this.communicator);
this.safe = new safe_1.Safe(this.communicator);
this.bootstrap();

@@ -34,11 +36,4 @@ }

}
async getSafeInfo() {
const response = await this.communicator.send(communication_1.METHODS.getSafeInfo, undefined);
if (!response.success) {
throw new Error(response.error);
}
return response.data;
}
}
exports.default = SafeAppsSDK;
//# sourceMappingURL=sdk.js.map

@@ -62,2 +62,3 @@ import { METHODS } from './communication/methods';

[METHODS.getSafeInfo]: SafeInfo;
[METHODS.getSafeBalances]: SafeBalances[];
}

@@ -153,2 +154,19 @@ export declare type RPCPayload<P = unknown[]> = {

};
export declare type EtherBalanceServiceModel = {
tokenAddress: null;
token: null;
balance: string;
};
export declare type TokenBalanceServiceModel = {
tokenAddress: string;
token: TokenServiceModel;
balance: string;
};
export declare type TokenServiceModel = {
name: string;
symbol: string;
decimals: number;
logoUri: string;
};
export declare type SafeBalances = (EtherBalanceServiceModel | TokenBalanceServiceModel)[];
export declare type RpcCallNames = keyof typeof RPC_CALLS;

@@ -155,0 +173,0 @@ export interface Communicator {

{
"name": "@gnosis.pm/safe-apps-sdk",
"version": "2.4.0",
"version": "3.0.0-alpha.0",
"description": "SDK developed to integrate third-party apps with Safe-Multisig app.",

@@ -27,8 +27,8 @@ "main": "dist/src/index.js",

"dependencies": {
"semver": "^7.3.2"
"semver": "7.1.0"
},
"devDependencies": {
"@types/jest": "^26.0.23",
"@types/node": "^15.0.1",
"@types/semver": "^7.3.5",
"@types/node": "^15.3.0",
"@types/semver": "7.1.0",
"husky": "^6.0.0",

@@ -35,0 +35,0 @@ "lint-staged": "^11.0.0",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc