Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@rarible/types

Package Overview
Dependencies
Maintainers
1
Versions
95
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rarible/types - npm Package Compare versions

Comparing version 0.11.0-alpha.4 to 0.11.0-alpha.5

22

build/cjs/blockchains/union/enum/index.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.BlockchainParseError = exports.parseBlockchain = exports.toLayerOneBlockchain = exports.withBlockchain = exports.withLayer1Blockchain = exports.isRealBlockchainSpecified = exports.isBlockchainSpecified = exports.blockchains = exports.isEVMBlockchain = exports.evmBlockchains = exports.BlockchainEnum = exports.blockchainsLayer1 = exports.BlockchainLayer1Enum = void 0;
exports.BlockchainParseError = exports.parseBlockchain = exports.toLayerOneBlockchain = exports.withBlockchain = exports.withLayer1Blockchain = exports.isRealBlockchainSpecified = exports.isBlockchainSpecified = exports.blockchains = exports.isEVMBlockchain = exports.isBlockchain = exports.evmBlockchains = exports.BlockchainEnum = exports.blockchainsLayer1 = exports.BlockchainLayer1Enum = void 0;
var BlockchainLayer1Enum;

@@ -30,3 +30,23 @@ (function (BlockchainLayer1Enum) {

];
/**
* Checks if provided string is real blockchain from BlockchainEnum
* @param blockchain test string
*/
function isBlockchain(blockchain) {
for (const enumValue of exports.blockchains) {
if (enumValue === blockchain) {
return true;
}
}
return false;
}
exports.isBlockchain = isBlockchain;
/**
* Checks if provided string is EVM blockchain
* @param blockchain test string
*/
function isEVMBlockchain(blockchain) {
if (!isBlockchain(blockchain)) {
return false;
}
return exports.evmBlockchains.includes(blockchain);

@@ -33,0 +53,0 @@ }

@@ -20,3 +20,12 @@ export declare enum BlockchainLayer1Enum {

export declare const evmBlockchains: BlockchainEnum[];
export declare function isEVMBlockchain(blockchain: BlockchainEnum): blockchain is EVMBlockchain;
/**
* Checks if provided string is real blockchain from BlockchainEnum
* @param blockchain test string
*/
export declare function isBlockchain(blockchain: string): blockchain is BlockchainEnum;
/**
* Checks if provided string is EVM blockchain
* @param blockchain test string
*/
export declare function isEVMBlockchain(blockchain: string): blockchain is EVMBlockchain;
export declare const blockchains: BlockchainEnum[];

@@ -23,0 +32,0 @@ export declare function isBlockchainSpecified(value: string): value is WithLayer1Blockchain;

@@ -27,3 +27,22 @@ export var BlockchainLayer1Enum;

];
/**
* Checks if provided string is real blockchain from BlockchainEnum
* @param blockchain test string
*/
export function isBlockchain(blockchain) {
for (const enumValue of blockchains) {
if (enumValue === blockchain) {
return true;
}
}
return false;
}
/**
* Checks if provided string is EVM blockchain
* @param blockchain test string
*/
export function isEVMBlockchain(blockchain) {
if (!isBlockchain(blockchain)) {
return false;
}
return evmBlockchains.includes(blockchain);

@@ -30,0 +49,0 @@ }

4

package.json
{
"name": "@rarible/types",
"version": "0.11.0-alpha.4",
"version": "0.11.0-alpha.5",
"keywords": [

@@ -33,3 +33,3 @@ "rarible",

},
"gitHead": "a4a3aa3f112404c2095b45cab07446dc7201c775"
"gitHead": "d759f43ae3f4f666149552d2d49a47e91fe52c7a"
}

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