Socket
Socket
Sign inDemoInstall

@metamask/controller-utils

Package Overview
Dependencies
Maintainers
8
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@metamask/controller-utils - npm Package Compare versions

Comparing version 1.0.0 to 2.0.0

20

CHANGELOG.md

@@ -9,6 +9,19 @@ # Changelog

## [2.0.0]
### Added
- Add Sepolia-related constants ([#1041](https://github.com/MetaMask/controllers/pull/1041))
- Update `getBuyURL` function to return Sepolia faucet for Sepolia network ([#1041](https://github.com/MetaMask/controllers/pull/1041))
### Changed
- **BREAKING:**: Migrate from `metaswap` to `metafi` subdomain for OpenSea proxy ([#1060](https://github.com/MetaMask/core/pull/1060))
- Rename this repository to `core` ([#1031](https://github.com/MetaMask/controllers/pull/1031))
### Removed
- **BREAKING:** Remove all constants associated with Ropsten, Rinkeby, and Kovan ([#1041](https://github.com/MetaMask/controllers/pull/1041))
- **BREAKING:** Remove support for Ropsten, Rinkeby, and Kovan from `getBuyUrl` function ([#1041](https://github.com/MetaMask/controllers/pull/1041))
## [1.0.0]
### Added
- Initial release
- As a result of converting our shared controllers repo into a monorepo ([#831](https://github.com/MetaMask/controllers/pull/831)), we've created this package from select parts of [`@metamask/controllers` v33.0.0](https://github.com/MetaMask/controllers/tree/v33.0.0), namely:
- As a result of converting our shared controllers repo into a monorepo ([#831](https://github.com/MetaMask/core/pull/831)), we've created this package from select parts of [`@metamask/controllers` v33.0.0](https://github.com/MetaMask/core/tree/v33.0.0), namely:
- `src/constants.ts` (but see below)

@@ -49,3 +62,4 @@ - `src/util.ts` (but see below)

[Unreleased]: https://github.com/MetaMask/controllers/compare/@metamask/controller-utils@1.0.0...HEAD
[1.0.0]: https://github.com/MetaMask/controllers/releases/tag/@metamask/controller-utils@1.0.0
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/controller-utils@2.0.0...HEAD
[2.0.0]: https://github.com/MetaMask/core/compare/@metamask/controller-utils@1.0.0...@metamask/controller-utils@2.0.0
[1.0.0]: https://github.com/MetaMask/core/releases/tag/@metamask/controller-utils@1.0.0

7

dist/constants.d.ts

@@ -6,3 +6,2 @@ import { NetworkType } from './types';

export declare const IPFS_DEFAULT_GATEWAY_URL = "https://cloudflare-ipfs.com/ipfs/";
export declare const RINKEBY_CHAIN_ID = "4";
export declare const GANACHE_CHAIN_ID = "1337";

@@ -26,6 +25,4 @@ export declare const ERC721 = "ERC721";

export declare const TESTNET_TICKER_SYMBOLS: {
RINKEBY: string;
GOERLI: string;
ROPSTEN: string;
KOVAN: string;
SEPOLIA: string;
};

@@ -35,4 +32,4 @@ export declare const TESTNET_NETWORK_TYPE_TO_TICKER_SYMBOL: {

};
export declare const OPENSEA_PROXY_URL = "https://proxy.metaswap.codefi.network/opensea/v1/api/v1";
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";
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.OPENSEA_TEST_API_URL = exports.OPENSEA_API_URL = exports.OPENSEA_PROXY_URL = exports.TESTNET_NETWORK_TYPE_TO_TICKER_SYMBOL = 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.GANACHE_CHAIN_ID = exports.RINKEBY_CHAIN_ID = exports.IPFS_DEFAULT_GATEWAY_URL = exports.FALL_BACK_VS_CURRENCY = exports.RPC = exports.MAINNET = void 0;
exports.OPENSEA_TEST_API_URL = exports.OPENSEA_API_URL = exports.OPENSEA_PROXY_URL = exports.TESTNET_NETWORK_TYPE_TO_TICKER_SYMBOL = 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.GANACHE_CHAIN_ID = exports.IPFS_DEFAULT_GATEWAY_URL = exports.FALL_BACK_VS_CURRENCY = exports.RPC = exports.MAINNET = void 0;
exports.MAINNET = 'mainnet';

@@ -9,3 +9,2 @@ exports.RPC = 'rpc';

// NETWORKS ID
exports.RINKEBY_CHAIN_ID = '4';
exports.GANACHE_CHAIN_ID = '1337';

@@ -34,13 +33,9 @@ // TOKEN STANDARDS

exports.TESTNET_TICKER_SYMBOLS = {
RINKEBY: 'RinkebyETH',
GOERLI: 'GoerliETH',
ROPSTEN: 'RopstenETH',
KOVAN: 'KovanETH',
SEPOLIA: 'SepoliaETH',
};
// TYPED NetworkType TICKER SYMBOLS
exports.TESTNET_NETWORK_TYPE_TO_TICKER_SYMBOL = {
rinkeby: 'RinkebyETH',
goerli: 'GoerliETH',
ropsten: 'RopstenETH',
kovan: 'KovanETH',
sepolia: 'SepoliaETH',
mainnet: '',

@@ -51,5 +46,5 @@ rpc: '',

// APIs
exports.OPENSEA_PROXY_URL = 'https://proxy.metaswap.codefi.network/opensea/v1/api/v1';
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';
//# sourceMappingURL=constants.js.map
/**
* Human-readable network name
*/
export declare type NetworkType = 'kovan' | 'localhost' | 'mainnet' | 'rinkeby' | 'goerli' | 'ropsten' | 'rpc';
export declare type NetworkType = 'localhost' | 'mainnet' | 'goerli' | 'sepolia' | 'rpc';
export declare enum NetworksChainId {
mainnet = "1",
kovan = "42",
rinkeby = "4",
goerli = "5",
ropsten = "3",
sepolia = "11155111",
localhost = "",

@@ -12,0 +10,0 @@ rpc = ""

@@ -7,6 +7,4 @@ "use strict";

NetworksChainId["mainnet"] = "1";
NetworksChainId["kovan"] = "42";
NetworksChainId["rinkeby"] = "4";
NetworksChainId["goerli"] = "5";
NetworksChainId["ropsten"] = "3";
NetworksChainId["sepolia"] = "11155111";
NetworksChainId["localhost"] = "";

@@ -13,0 +11,0 @@ NetworksChainId["rpc"] = "";

@@ -97,10 +97,6 @@ "use strict";

return `https://buy.coinbase.com/?code=9ec56d01-7e81-5017-930c-513daa27bb6a&amount=${amount}&address=${address}&crypto_currency=ETH`;
case '3':
return 'https://faucet.metamask.io/';
case '4':
return 'https://www.rinkeby.io/';
case '5':
return 'https://goerli-faucet.slock.it/';
case '42':
return 'https://github.com/kovan-testnet/faucet';
case '11155111':
return 'https://sepoliafaucet.net/';
default:

@@ -107,0 +103,0 @@ return undefined;

{
"name": "@metamask/controller-utils",
"version": "1.0.0",
"version": "2.0.0",
"description": "Data and convenience functions shared by multiple packages",

@@ -9,9 +9,9 @@ "keywords": [

],
"homepage": "https://github.com/MetaMask/controllers/tree/main/packages/controller-utils#readme",
"homepage": "https://github.com/MetaMask/core/tree/main/packages/controller-utils#readme",
"bugs": {
"url": "https://github.com/MetaMask/controllers/issues"
"url": "https://github.com/MetaMask/core/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/MetaMask/controllers.git"
"url": "https://github.com/MetaMask/core.git"
},

@@ -18,0 +18,0 @@ "license": "MIT",

@@ -15,2 +15,2 @@ # `@metamask/controller-utils`

This package is part of a monorepo. Instructions for contributing can be found in the [monorepo README](https://github.com/MetaMask/controllers#readme).
This package is part of a monorepo. Instructions for contributing can be found in the [monorepo README](https://github.com/MetaMask/core#readme).

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