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

@metamask-previews/controller-utils

Package Overview
Dependencies
Maintainers
2
Versions
532
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@metamask-previews/controller-utils - npm Package Compare versions

Comparing version 6.1.0-preview.3fbb6b41 to 8.0.1-preview.1ef189c

16

CHANGELOG.md

@@ -8,3 +8,14 @@ # Changelog

## [Unreleased]
## [8.0.1]
### Changed
- There are no consumer-facing changes to this package. This version is a part of a synchronized release across all packages in our monorepo.
## [8.0.0]
### Changed
- **BREAKING**: `OPENSEA_PROXY_URL` now points to OpenSea's v2 API. `OPENSEA_API_URL` + `OPENSEA_TEST_API_URL` have been removed ([#3654](https://github.com/MetaMask/core/pull/3654))
## [7.0.0]
### Changed
- **BREAKING:** Make `safelyExecute` generic so they preserve types ([#3629](https://github.com/MetaMask/core/pull/3629))
- Update `successfulFetch` so that a URL instance can now be passed to it ([#3600](https://github.com/MetaMask/core/pull/3600))

@@ -193,3 +204,6 @@ - Update `handleFetch` so that a URL instance can now be passed to it ([#3600](https://github.com/MetaMask/core/pull/3600))

[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/controller-utils@6.1.0...HEAD
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/controller-utils@8.0.1...HEAD
[8.0.1]: https://github.com/MetaMask/core/compare/@metamask/controller-utils@8.0.0...@metamask/controller-utils@8.0.1
[8.0.0]: https://github.com/MetaMask/core/compare/@metamask/controller-utils@7.0.0...@metamask/controller-utils@8.0.0
[7.0.0]: https://github.com/MetaMask/core/compare/@metamask/controller-utils@6.1.0...@metamask/controller-utils@7.0.0
[6.1.0]: https://github.com/MetaMask/core/compare/@metamask/controller-utils@6.0.0...@metamask/controller-utils@6.1.0

@@ -196,0 +210,0 @@ [6.0.0]: https://github.com/MetaMask/core/compare/@metamask/controller-utils@5.0.2...@metamask/controller-utils@6.0.0

4

dist/constants.d.ts

@@ -78,5 +78,3 @@ import { NetworksTicker, ChainId, BuiltInNetworkName } from './types';

};
export declare const OPENSEA_PROXY_URL = "https://proxy.metafi.codefi.network/opensea/v1/api/v1";
export declare const OPENSEA_API_URL = "https://api.opensea.io/api/v1";
export declare const OPENSEA_TEST_API_URL = "https://testnets-api.opensea.io/api/v1";
export declare const OPENSEA_PROXY_URL = "https://proxy.metafi.codefi.network/opensea/v1/api/v2";
export declare const ORIGIN_METAMASK = "metamask";

@@ -83,0 +81,0 @@ /**

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CHAIN_ID_TO_ETHERS_NETWORK_NAME_MAP = exports.ApprovalType = exports.ORIGIN_METAMASK = exports.OPENSEA_TEST_API_URL = exports.OPENSEA_API_URL = exports.OPENSEA_PROXY_URL = exports.BUILT_IN_NETWORKS = exports.TESTNET_TICKER_SYMBOLS = exports.ASSET_TYPES = exports.GWEI = exports.ERC1155_TOKEN_RECEIVER_INTERFACE_ID = exports.ERC1155_METADATA_URI_INTERFACE_ID = exports.ERC1155_INTERFACE_ID = exports.ERC721_ENUMERABLE_INTERFACE_ID = exports.ERC721_METADATA_INTERFACE_ID = exports.ERC721_INTERFACE_ID = exports.ERC20 = exports.ERC1155 = exports.ERC721 = exports.MAX_SAFE_CHAIN_ID = exports.GANACHE_CHAIN_ID = exports.IPFS_DEFAULT_GATEWAY_URL = exports.FALL_BACK_VS_CURRENCY = exports.RPC = void 0;
exports.CHAIN_ID_TO_ETHERS_NETWORK_NAME_MAP = exports.ApprovalType = exports.ORIGIN_METAMASK = exports.OPENSEA_PROXY_URL = exports.BUILT_IN_NETWORKS = exports.TESTNET_TICKER_SYMBOLS = exports.ASSET_TYPES = exports.GWEI = exports.ERC1155_TOKEN_RECEIVER_INTERFACE_ID = exports.ERC1155_METADATA_URI_INTERFACE_ID = exports.ERC1155_INTERFACE_ID = exports.ERC721_ENUMERABLE_INTERFACE_ID = exports.ERC721_METADATA_INTERFACE_ID = exports.ERC721_INTERFACE_ID = exports.ERC20 = exports.ERC1155 = exports.ERC721 = exports.MAX_SAFE_CHAIN_ID = exports.GANACHE_CHAIN_ID = exports.IPFS_DEFAULT_GATEWAY_URL = exports.FALL_BACK_VS_CURRENCY = exports.RPC = void 0;
const types_1 = require("./types");

@@ -89,5 +89,3 @@ exports.RPC = 'rpc';

// APIs
exports.OPENSEA_PROXY_URL = 'https://proxy.metafi.codefi.network/opensea/v1/api/v1';
exports.OPENSEA_API_URL = 'https://api.opensea.io/api/v1';
exports.OPENSEA_TEST_API_URL = 'https://testnets-api.opensea.io/api/v1';
exports.OPENSEA_PROXY_URL = 'https://proxy.metafi.codefi.network/opensea/v1/api/v2';
// Default origin for controllers

@@ -94,0 +92,0 @@ exports.ORIGIN_METAMASK = 'metamask';

@@ -24,2 +24,4 @@ "use strict";

*/
// TODO: Replace `any` with type
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function isNetworkType(val) {

@@ -26,0 +28,0 @@ return Object.values(exports.NetworkType).includes(val);

@@ -87,5 +87,6 @@ /// <reference types="bn.js" />

* @param logError - Determines if the error should be logged.
* @template Result - Type of the result of the async operation
* @returns Promise resolving to the result of the async operation.
*/
export declare function safelyExecute(operation: () => Promise<any>, logError?: boolean): Promise<any>;
export declare function safelyExecute<Result>(operation: () => Promise<Result>, logError?: boolean): Promise<Result | undefined>;
/**

@@ -97,5 +98,6 @@ * Execute and return an asynchronous operation with a timeout.

* @param timeout - Timeout to fail the operation.
* @template Result - Type of the result of the async operation
* @returns Promise resolving to the result of the async operation.
*/
export declare function safelyExecuteWithTimeout(operation: () => Promise<any>, logError?: boolean, timeout?: number): Promise<any>;
export declare function safelyExecuteWithTimeout<Result>(operation: () => Promise<Result>, logError?: boolean, timeout?: number): Promise<Result | undefined>;
/**

@@ -102,0 +104,0 @@ * Convert an address to a checksummed hexidecimal address.

@@ -47,2 +47,4 @@ "use strict";

*/
// TODO: Replace `any` with type
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function BNToHex(inputBn) {

@@ -60,3 +62,6 @@ return (0, ethereumjs_util_1.addHexPrefix)(inputBn.toString(16));

*/
function fractionBN(targetBN, numerator, denominator) {
function fractionBN(
// TODO: Replace `any` with type
// eslint-disable-next-line @typescript-eslint/no-explicit-any
targetBN, numerator, denominator) {
const numBN = new ethereumjs_util_1.BN(numerator);

@@ -191,2 +196,3 @@ const denomBN = new ethereumjs_util_1.BN(denominator);

* @param logError - Determines if the error should be logged.
* @template Result - Type of the result of the async operation
* @returns Promise resolving to the result of the async operation.

@@ -215,2 +221,3 @@ */

* @param timeout - Timeout to fail the operation.
* @template Result - Type of the result of the async operation
* @returns Promise resolving to the result of the async operation.

@@ -408,3 +415,6 @@ */

*/
function query(ethQuery, method, args = []) {
function query(ethQuery, method,
// TODO: Replace `any` with type
// eslint-disable-next-line @typescript-eslint/no-explicit-any
args = []) {
return new Promise((resolve, reject) => {

@@ -484,2 +494,4 @@ const cb = (error, result) => {

*/
// TODO: Replace `any` with type
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function logOrRethrowError(error, codesToCatch = []) {

@@ -486,0 +498,0 @@ var _a;

{
"name": "@metamask-previews/controller-utils",
"version": "6.1.0-preview.3fbb6b41",
"version": "8.0.1-preview.1ef189c",
"description": "Data and convenience functions shared by multiple packages",

@@ -25,2 +25,3 @@ "keywords": [

"build:docs": "typedoc",
"changelog:update": "../../scripts/update-changelog.sh @metamask/controller-utils",
"changelog:validate": "../../scripts/validate-changelog.sh @metamask/controller-utils",

@@ -36,3 +37,3 @@ "publish:preview": "yarn npm publish --tag preview",

"@metamask/ethjs-unit": "^0.2.1",
"@metamask/utils": "^8.2.0",
"@metamask/utils": "^8.3.0",
"@spruceid/siwe-parser": "1.1.3",

@@ -44,3 +45,3 @@ "eth-ens-namehash": "^2.0.8",

"devDependencies": {
"@metamask/auto-changelog": "^3.4.3",
"@metamask/auto-changelog": "^3.4.4",
"@types/jest": "^27.4.1",

@@ -47,0 +48,0 @@ "bn.js": "^5.2.1",

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

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