Socket
Socket
Sign inDemoInstall

@safe-global/safe-gateway-typescript-sdk

Package Overview
Dependencies
Maintainers
2
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@safe-global/safe-gateway-typescript-sdk - npm Package Compare versions

Comparing version 3.7.3 to 3.8.0

dist/types/delegates.d.ts

5

dist/index.d.ts

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

import type { SafeMessage, SafeMessageListPage } from './types/safe-messages';
import type { DelegateResponse, DelegatesRequest } from './types/delegates';
export * from './types/safe-info';

@@ -115,1 +116,5 @@ export * from './types/safe-apps';

export declare function confirmSafeMessage(chainId: string, messageHash: string, body: operations['confirm_safe_message']['parameters']['body']): Promise<void>;
/**
* Returns a list of delegates
*/
export declare function getDelegates(chainId: string, query?: DelegatesRequest): Promise<DelegateResponse>;

12

dist/index.js

@@ -17,3 +17,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.confirmSafeMessage = exports.proposeSafeMessage = exports.getSafeMessage = exports.getSafeMessages = exports.getDecodedData = exports.getMasterCopies = exports.getSafeApps = exports.getChainConfig = exports.getChainsConfig = exports.proposeTransaction = exports.postSafeGasEstimation = exports.getTransactionDetails = exports.getTransactionQueue = exports.getTransactionHistory = exports.getCollectiblesPage = exports.getCollectibles = exports.getOwnedSafes = exports.getFiatCurrencies = exports.getBalances = exports.getMultisigTransactions = exports.getModuleTransactions = exports.getIncomingTransfers = exports.getSafeInfo = exports.setBaseUrl = void 0;
exports.getDelegates = exports.confirmSafeMessage = exports.proposeSafeMessage = exports.getSafeMessage = exports.getSafeMessages = exports.getDecodedData = exports.getMasterCopies = exports.getSafeApps = exports.getChainConfig = exports.getChainsConfig = exports.proposeTransaction = exports.postSafeGasEstimation = exports.getTransactionDetails = exports.getTransactionQueue = exports.getTransactionHistory = exports.getCollectiblesPage = exports.getCollectibles = exports.getOwnedSafes = exports.getFiatCurrencies = exports.getBalances = exports.getMultisigTransactions = exports.getModuleTransactions = exports.getIncomingTransfers = exports.getSafeInfo = exports.setBaseUrl = void 0;
const endpoint_1 = require("./endpoint");

@@ -243,3 +243,13 @@ const config_1 = require("./config");

exports.confirmSafeMessage = confirmSafeMessage;
/**
* Returns a list of delegates
*/
function getDelegates(chainId, query = {}) {
return (0, endpoint_1.getEndpoint)(baseUrl, '/v1/chains/{chainId}/delegates', {
path: { chainId },
query,
});
}
exports.getDelegates = getDelegates;
/* eslint-enable @typescript-eslint/explicit-module-boundary-types */
//# sourceMappingURL=index.js.map

@@ -9,3 +9,4 @@ import type { FiatCurrencies, OwnedSafes, SafeBalanceResponse, SafeCollectibleResponse, SafeCollectiblesPage } from './common';

import type { ConfirmSafeMessageRequest, ProposeSafeMessageRequest, SafeMessage, SafeMessageListPage } from './safe-messages';
export declare type Primitive = string | number | boolean | null;
import type { DelegateResponse, DelegatesRequest } from './delegates';
export type Primitive = string | number | boolean | null;
interface GetParams {

@@ -243,2 +244,11 @@ path?: {

};
'/v1/chains/{chainId}/delegates': {
get: operations['get_delegates'];
parameters: {
path: {
chainId: string;
};
query: DelegatesRequest;
};
};
}

@@ -649,3 +659,16 @@ export interface operations {

};
get_delegates: {
parameters: {
path: {
chainId: string;
};
query: DelegatesRequest;
};
responses: {
200: {
schema: DelegateResponse;
};
};
};
}
export {};

20

dist/types/chains.d.ts

@@ -7,7 +7,7 @@ import type { Page } from './common';

}
export declare type RpcUri = {
export type RpcUri = {
authentication: RPC_AUTHENTICATION;
value: string;
};
export declare type BlockExplorerUriTemplate = {
export type BlockExplorerUriTemplate = {
address: string;

@@ -17,3 +17,3 @@ txHash: string;

};
export declare type NativeCurrency = {
export type NativeCurrency = {
name: string;

@@ -24,3 +24,3 @@ symbol: string;

};
export declare type Theme = {
export type Theme = {
textColor: string;

@@ -34,3 +34,3 @@ backgroundColor: string;

}
export declare type GasPriceOracle = {
export type GasPriceOracle = {
type: GAS_PRICE_TYPE.ORACLE;

@@ -41,10 +41,10 @@ uri: string;

};
export declare type GasPriceFixed = {
export type GasPriceFixed = {
type: GAS_PRICE_TYPE.FIXED;
weiValue: string;
};
export declare type GasPriceUnknown = {
export type GasPriceUnknown = {
type: GAS_PRICE_TYPE.UNKNOWN;
};
export declare type GasPrice = (GasPriceOracle | GasPriceFixed | GasPriceUnknown)[];
export type GasPrice = (GasPriceOracle | GasPriceFixed | GasPriceUnknown)[];
export declare enum FEATURES {

@@ -61,3 +61,3 @@ ERC721 = "ERC721",

}
export declare type ChainInfo = {
export type ChainInfo = {
transactionService: string;

@@ -80,2 +80,2 @@ chainId: string;

};
export declare type ChainListResponse = Page<ChainInfo>;
export type ChainListResponse = Page<ChainInfo>;

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

export declare type AddressEx = {
export type AddressEx = {
value: string;

@@ -6,4 +6,4 @@ name?: string;

};
export declare type FiatCurrencies = string[];
export declare type OwnedSafes = {
export type FiatCurrencies = string[];
export type OwnedSafes = {
safes: string[];

@@ -19,3 +19,3 @@ };

*/
export declare type TokenInfo = {
export type TokenInfo = {
type: TokenType;

@@ -28,3 +28,3 @@ address: string;

};
export declare type SafeBalanceResponse = {
export type SafeBalanceResponse = {
fiatTotal: string;

@@ -38,3 +38,3 @@ items: Array<{

};
export declare type Page<T> = {
export type Page<T> = {
next?: string;

@@ -44,3 +44,3 @@ previous?: string;

};
export declare type SafeCollectibleResponse = {
export type SafeCollectibleResponse = {
address: string;

@@ -59,2 +59,2 @@ tokenName: string;

};
export declare type SafeCollectiblesPage = Page<SafeCollectibleResponse>;
export type SafeCollectiblesPage = Page<SafeCollectibleResponse>;

@@ -1,6 +0,6 @@

export declare type DecodedDataRequest = {
export type DecodedDataRequest = {
data: string;
};
declare type ParamValue = string | ParamValue[];
export declare type DecodedDataBasicParameter = {
type ParamValue = string | ParamValue[];
export type DecodedDataBasicParameter = {
name: string;

@@ -10,3 +10,3 @@ type: string;

};
export declare type DecodedDataParameterValue = {
export type DecodedDataParameterValue = {
operation: 0 | 1;

@@ -21,6 +21,6 @@ to: string;

};
export declare type DecodedDataParameter = {
export type DecodedDataParameter = {
valueDecoded?: DecodedDataParameterValue[];
} & DecodedDataBasicParameter;
export declare type DecodedDataResponse = {
export type DecodedDataResponse = {
method: string;

@@ -27,0 +27,0 @@ parameters: DecodedDataParameter[];

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

export declare type MasterCopyReponse = {
export type MasterCopyReponse = {
address: string;
version: string;
}[];

@@ -5,11 +5,11 @@ export declare enum SafeAppAccessPolicyTypes {

}
export declare type SafeAppNoRestrictionsPolicy = {
export type SafeAppNoRestrictionsPolicy = {
type: SafeAppAccessPolicyTypes.NoRestrictions;
};
export declare type SafeAppDomainAllowlistPolicy = {
export type SafeAppDomainAllowlistPolicy = {
type: SafeAppAccessPolicyTypes.DomainAllowlist;
value: string[];
};
export declare type SafeAppsAccessControlPolicies = SafeAppNoRestrictionsPolicy | SafeAppDomainAllowlistPolicy;
export declare type SafeAppProvider = {
export type SafeAppsAccessControlPolicies = SafeAppNoRestrictionsPolicy | SafeAppDomainAllowlistPolicy;
export type SafeAppProvider = {
url: string;

@@ -26,7 +26,7 @@ name: string;

}
export declare type SafeAppSocialProfile = {
export type SafeAppSocialProfile = {
platform: SafeAppSocialPlatforms;
url: string;
};
export declare type SafeAppData = {
export type SafeAppData = {
id: number;

@@ -45,2 +45,2 @@ url: string;

};
export declare type SafeAppsResponse = SafeAppData[];
export type SafeAppsResponse = SafeAppData[];

@@ -7,3 +7,3 @@ import type { AddressEx } from './common';

}
export declare type SafeInfo = {
export type SafeInfo = {
address: AddressEx;

@@ -10,0 +10,0 @@ chainId: string;

@@ -6,3 +6,3 @@ import type { AddressEx, Page } from './common';

}
export declare type SafeMessageDateLabel = {
export type SafeMessageDateLabel = {
type: SafeMessageListItemType.DATE_LABEL;

@@ -26,6 +26,6 @@ timestamp: number;

}
declare type TypedMessageTypes = {
type TypedMessageTypes = {
[key: string]: TypedDataTypes[];
};
export declare type EIP712TypedData = {
export type EIP712TypedData = {
domain: TypedDataDomain;

@@ -35,3 +35,3 @@ types: TypedMessageTypes;

};
export declare type SafeMessage = {
export type SafeMessage = {
type: SafeMessageListItemType.MESSAGE;

@@ -54,5 +54,5 @@ messageHash: string;

};
export declare type SafeMessageListItem = SafeMessageDateLabel | SafeMessage;
export declare type SafeMessageListPage = Page<SafeMessageListItem>;
export declare type ProposeSafeMessageRequest = {
export type SafeMessageListItem = SafeMessageDateLabel | SafeMessage;
export type SafeMessageListPage = Page<SafeMessageListItem>;
export type ProposeSafeMessageRequest = {
message: SafeMessage['message'];

@@ -62,5 +62,5 @@ safeAppId?: number;

};
export declare type ConfirmSafeMessageRequest = {
export type ConfirmSafeMessageRequest = {
signature: string;
};
export {};
import type { AddressEx, Page, TokenInfo } from './common';
export declare type ParamValue = string | ParamValue[];
export type ParamValue = string | ParamValue[];
export declare enum Operation {

@@ -7,3 +7,3 @@ CALL = 0,

}
export declare type InternalTransaction = {
export type InternalTransaction = {
operation: Operation;

@@ -15,4 +15,4 @@ to: string;

};
export declare type ValueDecodedType = InternalTransaction[];
export declare type Parameter = {
export type ValueDecodedType = InternalTransaction[];
export type Parameter = {
name: string;

@@ -23,3 +23,3 @@ type: string;

};
export declare type DataDecoded = {
export type DataDecoded = {
method: string;

@@ -78,3 +78,3 @@ parameters?: Parameter[];

}
export declare type Erc20Transfer = {
export type Erc20Transfer = {
type: TransactionTokenType.ERC20;

@@ -88,3 +88,3 @@ tokenAddress: string;

};
export declare type Erc721Transfer = {
export type Erc721Transfer = {
type: TransactionTokenType.ERC721;

@@ -97,8 +97,8 @@ tokenAddress: string;

};
export declare type NativeCoinTransfer = {
export type NativeCoinTransfer = {
type: TransactionTokenType.NATIVE_COIN;
value: string;
};
export declare type TransferInfo = Erc20Transfer | Erc721Transfer | NativeCoinTransfer;
export declare type Transfer = {
export type TransferInfo = Erc20Transfer | Erc721Transfer | NativeCoinTransfer;
export type Transfer = {
type: TransactionInfoType.TRANSFER;

@@ -110,7 +110,7 @@ sender: AddressEx;

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

@@ -120,3 +120,3 @@ owner: AddressEx;

};
export declare type RemoveOwner = {
export type RemoveOwner = {
type: SettingsInfoType.REMOVE_OWNER;

@@ -126,3 +126,3 @@ owner: AddressEx;

};
export declare type SwapOwner = {
export type SwapOwner = {
type: SettingsInfoType.SWAP_OWNER;

@@ -132,27 +132,27 @@ oldOwner: AddressEx;

};
export declare type ChangeThreshold = {
export type ChangeThreshold = {
type: SettingsInfoType.CHANGE_THRESHOLD;
threshold: number;
};
export declare type ChangeImplementation = {
export type ChangeImplementation = {
type: SettingsInfoType.CHANGE_IMPLEMENTATION;
implementation: AddressEx;
};
export declare type EnableModule = {
export type EnableModule = {
type: SettingsInfoType.ENABLE_MODULE;
module: AddressEx;
};
export declare type DisableModule = {
export type DisableModule = {
type: SettingsInfoType.DISABLE_MODULE;
module: AddressEx;
};
export declare type SetGuard = {
export type SetGuard = {
type: SettingsInfoType.SET_GUARD;
guard: AddressEx;
};
export declare type DeleteGuard = {
export type DeleteGuard = {
type: SettingsInfoType.DELETE_GUARD;
};
export declare type SettingsInfo = SetFallbackHandler | AddOwner | RemoveOwner | SwapOwner | ChangeThreshold | ChangeImplementation | EnableModule | DisableModule | SetGuard | DeleteGuard;
export declare type SettingsChange = {
export type SettingsInfo = SetFallbackHandler | AddOwner | RemoveOwner | SwapOwner | ChangeThreshold | ChangeImplementation | EnableModule | DisableModule | SetGuard | DeleteGuard;
export type SettingsChange = {
type: TransactionInfoType.SETTINGS_CHANGE;

@@ -162,3 +162,3 @@ dataDecoded: DataDecoded;

};
export declare type Custom = {
export type Custom = {
type: TransactionInfoType.CUSTOM;

@@ -172,3 +172,3 @@ to: AddressEx;

};
export declare type MultiSend = {
export type MultiSend = {
type: TransactionInfoType.CUSTOM;

@@ -182,6 +182,6 @@ to: AddressEx;

};
export declare type Cancellation = Custom & {
export type Cancellation = Custom & {
isCancellation: true;
};
export declare type Creation = {
export type Creation = {
type: TransactionInfoType.CREATION;

@@ -193,8 +193,8 @@ creator: AddressEx;

};
export declare type TransactionInfo = Transfer | SettingsChange | Custom | MultiSend | Cancellation | Creation;
export declare type ModuleExecutionInfo = {
export type TransactionInfo = Transfer | SettingsChange | Custom | MultiSend | Cancellation | Creation;
export type ModuleExecutionInfo = {
type: DetailedExecutionInfoType.MODULE;
address: AddressEx;
};
export declare type MultisigExecutionInfo = {
export type MultisigExecutionInfo = {
type: DetailedExecutionInfoType.MULTISIG;

@@ -206,4 +206,4 @@ nonce: number;

};
export declare type ExecutionInfo = ModuleExecutionInfo | MultisigExecutionInfo;
export declare type TransactionSummary = {
export type ExecutionInfo = ModuleExecutionInfo | MultisigExecutionInfo;
export type TransactionSummary = {
id: string;

@@ -216,3 +216,3 @@ timestamp: number;

};
export declare type Transaction = {
export type Transaction = {
transaction: TransactionSummary;

@@ -222,3 +222,3 @@ conflictType: ConflictType;

};
export declare type IncomingTransfer = Omit<Transaction, 'transaction'> & {
export type IncomingTransfer = Omit<Transaction, 'transaction'> & {
transaction: Omit<TransactionSummary, 'txInfo' | 'executionInfo'> & {

@@ -230,3 +230,3 @@ txInfo: Omit<Transfer, 'direction'> & {

};
export declare type ModuleTransaction = Omit<Transaction, 'transaction'> & {
export type ModuleTransaction = Omit<Transaction, 'transaction'> & {
transaction: Omit<TransactionSummary, 'txInfo' | 'executionInfo'> & {

@@ -237,3 +237,3 @@ txInfo: Transfer;

};
export declare type MultisigTransaction = Omit<Transaction, 'transaction'> & {
export type MultisigTransaction = Omit<Transaction, 'transaction'> & {
transaction: Omit<TransactionSummary, 'txInfo' | 'executionInfo'> & {

@@ -246,3 +246,3 @@ txInfo: Omit<Transfer, 'direction'> & {

};
export declare type DateLabel = {
export type DateLabel = {
timestamp: number;

@@ -258,13 +258,13 @@ type: TransactionListItemType.DATE_LABEL;

}
export declare type Label = {
export type Label = {
label: LabelValue;
type: TransactionListItemType.LABEL;
};
export declare type ConflictHeader = {
export type ConflictHeader = {
nonce: number;
type: TransactionListItemType.CONFLICT_HEADER;
};
export declare type TransactionListItem = Transaction | DateLabel | Label | ConflictHeader;
export declare type TransactionListPage = Page<TransactionListItem>;
export declare type MultisigTransactionRequest = {
export type TransactionListItem = Transaction | DateLabel | Label | ConflictHeader;
export type TransactionListPage = Page<TransactionListItem>;
export type MultisigTransactionRequest = {
to: string;

@@ -285,3 +285,3 @@ value: string;

};
export declare type SafeAppInfo = {
export type SafeAppInfo = {
name: string;

@@ -291,3 +291,3 @@ url: string;

};
export declare type TransactionData = {
export type TransactionData = {
hexData?: string;

@@ -303,7 +303,7 @@ dataDecoded?: DataDecoded;

};
export declare type ModuleExecutionDetails = {
export type ModuleExecutionDetails = {
type: DetailedExecutionInfoType.MODULE;
address: AddressEx;
};
export declare type MultisigConfirmation = {
export type MultisigConfirmation = {
signer: AddressEx;

@@ -313,3 +313,3 @@ signature?: string;

};
export declare type MultisigExecutionDetails = {
export type MultisigExecutionDetails = {
type: DetailedExecutionInfoType.MULTISIG;

@@ -332,4 +332,4 @@ submittedAt: number;

};
export declare type DetailedExecutionInfo = ModuleExecutionDetails | MultisigExecutionDetails;
export declare type TransactionDetails = {
export type DetailedExecutionInfo = ModuleExecutionDetails | MultisigExecutionDetails;
export type TransactionDetails = {
safeAddress: string;

@@ -345,3 +345,3 @@ txId: string;

};
export declare type SafeTransactionEstimationRequest = {
export type SafeTransactionEstimationRequest = {
to: string;

@@ -352,3 +352,3 @@ value: string;

};
export declare type SafeTransactionEstimation = {
export type SafeTransactionEstimation = {
currentNonce: number;

@@ -358,4 +358,4 @@ recommendedNonce: number;

};
export declare type SafeIncomingTransfersResponse = Page<IncomingTransfer>;
export declare type SafeModuleTransactionsResponse = Page<ModuleTransaction>;
export declare type SafeMultisigTransactionsResponse = Page<MultisigTransaction>;
export type SafeIncomingTransfersResponse = Page<IncomingTransfer>;
export type SafeModuleTransactionsResponse = Page<ModuleTransaction>;
export type SafeMultisigTransactionsResponse = Page<MultisigTransaction>;

@@ -1,3 +0,3 @@

export declare type Params = Record<string, string | number | boolean | null>;
export declare type ErrorResponse = {
export type Params = Record<string, string | number | boolean | null>;
export type ErrorResponse = {
code: number;

@@ -4,0 +4,0 @@ message: string;

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

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

{
"name": "@safe-global/safe-gateway-typescript-sdk",
"version": "3.7.3",
"version": "3.8.0",
"main": "dist/index.js",

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

@@ -7,3 +7,3 @@ # Safe Gateway TypeScript SDK

📖 [API reference](https://safe.global/safe-gateway-typescript-sdk/modules.html)
📖 [API reference](https://safe-global.github.io/safe-gateway-typescript-sdk/modules.html)

@@ -44,3 +44,3 @@ ## Usage policy

The full SDK reference can be found [here](https://safe.global/safe-gateway-typescript-sdk/modules.html).
The full SDK reference can be found [here](https://safe-global.github.io/safe-gateway-typescript-sdk/modules.html).

@@ -47,0 +47,0 @@ ## Adding an endpoint

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