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

@bandada/utils

Package Overview
Dependencies
Maintainers
3
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bandada/utils - npm Package Compare versions

Comparing version 2.3.4 to 2.4.0

53

dist/index.node.js
/**
* @module @bandada/utils
* @version 2.3.4
* @version 2.4.0
* @file General Bandada utility functions.

@@ -1358,2 +1358,52 @@ * @copyright Ethereum Foundation 2023

];
var easCredentialSupportedNetworks = [
{
id: "ethereum",
name: "Ethereum"
},
{
id: "sepolia",
name: "Ethereum (Sepolia)"
},
{
id: "arbitrum",
name: "Arbitrum"
},
{
id: "arbitrum-nova",
name: "Arbitrum Nova"
},
{
id: "base",
name: "base"
},
{
id: "base-sepolia",
name: "Base (Sepolia)"
},
{
id: "optimism",
name: "Optimism"
},
{
id: "optimism-sepolia-bedrock",
name: "Optimism (Sepolia)"
},
{
id: "scroll",
name: "scroll"
},
{
id: "polygon",
name: "Polygon"
},
{
id: "linea",
name: "Linea"
},
{
id: "celo",
name: "Celo"
}
];

@@ -1378,2 +1428,3 @@ /**

exports.blockchainCredentialSupportedNetworks = blockchainCredentialSupportedNetworks;
exports.easCredentialSupportedNetworks = easCredentialSupportedNetworks;
exports.getBandadaContract = getBandadaContract;

@@ -1380,0 +1431,0 @@ exports.getContract = getContract;

import type { BlockchainNetwork } from "./types";
export declare const blockchainCredentialSupportedNetworks: BlockchainNetwork[];
export declare const easCredentialSupportedNetworks: BlockchainNetwork[];

4

dist/types/index.d.ts

@@ -11,4 +11,4 @@ import CONTRACT_ADDRESSES, { getContractAddresses } from "./contractAddresses";

import shortenAddress from "./shortenAddress";
import { blockchainCredentialSupportedNetworks } from "./getSupportedNetworks";
import { blockchainCredentialSupportedNetworks, easCredentialSupportedNetworks } from "./getSupportedNetworks";
export { ApiKeyActions, Network, ContractName, OnchainBandadaGroup } from "./types/index";
export { request, shortenAddress, getProvider, getContract, getSemaphoreContract, SemaphoreContract, getBandadaContract, BandadaContract, getWallet, CONTRACT_ADDRESSES, getContractAddresses, SemaphoreABI, BandadaABI, blockchainCredentialSupportedNetworks };
export { request, shortenAddress, getProvider, getContract, getSemaphoreContract, SemaphoreContract, getBandadaContract, BandadaContract, getWallet, CONTRACT_ADDRESSES, getContractAddresses, SemaphoreABI, BandadaABI, blockchainCredentialSupportedNetworks, easCredentialSupportedNetworks };
{
"name": "@bandada/utils",
"version": "2.3.4",
"version": "2.4.0",
"description": "General Bandada utility functions.",

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

@@ -164,1 +164,25 @@ <p align="center">

```
\# **blockchainCredentialSupportedNetworks**
Returns the list of supported blockchain networks.
```ts
import { blockchainCredentialSupportedNetworks } from "@bandada/utils"
const networks = blockchainCredentialSupportedNetworks
const id = blockchainCredentialSupportedNetworks.find("sepolia")
const name = blockchainCredentialSupportedNetworks.find("Sepolia")
```
\# **easCredentialSupportedNetworks**
Returns the list of supported EAS attestations networks. List of supported networks can be found [here](https://docs.attest.org/docs/developer-tools/api).
```ts
import { easCredentialSupportedNetworks } from "@bandada/utils"
const networks = easCredentialSupportedNetworks
const id = easCredentialSupportedNetworks.find("sepolia")
const name = easCredentialSupportedNetworks.find("Ethereum (Sepolia)")
```

@@ -25,1 +25,52 @@ import type { BlockchainNetwork } from "./types"

]
export const easCredentialSupportedNetworks: BlockchainNetwork[] = [
{
id: "ethereum",
name: "Ethereum"
},
{
id: "sepolia",
name: "Ethereum (Sepolia)"
},
{
id: "arbitrum",
name: "Arbitrum"
},
{
id: "arbitrum-nova",
name: "Arbitrum Nova"
},
{
id: "base",
name: "base"
},
{
id: "base-sepolia",
name: "Base (Sepolia)"
},
{
id: "optimism",
name: "Optimism"
},
{
id: "optimism-sepolia-bedrock",
name: "Optimism (Sepolia)"
},
{
id: "scroll",
name: "scroll"
},
{
id: "polygon",
name: "Polygon"
},
{
id: "linea",
name: "Linea"
},
{
id: "celo",
name: "Celo"
}
]

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

import { blockchainCredentialSupportedNetworks } from "./getSupportedNetworks"
import {
blockchainCredentialSupportedNetworks,
easCredentialSupportedNetworks
} from "./getSupportedNetworks"
import shortenAddress from "./shortenAddress"

@@ -40,2 +43,26 @@

})
describe("# easCredentialSupportedNetworks", () => {
it("Should return a list of EAS attestations credential supported network", () => {
const networks = easCredentialSupportedNetworks
expect(networks).toHaveLength(easCredentialSupportedNetworks.length)
})
it("Should return a blockchain credential supported network", () => {
const expected = {
id: "sepolia",
name: "Ethereum (Sepolia)"
}
const id = easCredentialSupportedNetworks.find(
(i) => i.id === expected.id
)
const name = easCredentialSupportedNetworks.find(
(i) => i.name === expected.name
)
expect(id).toMatchObject(expected)
expect(name).toMatchObject(expected)
})
})
})

@@ -11,3 +11,6 @@ import CONTRACT_ADDRESSES, { getContractAddresses } from "./contractAddresses"

import shortenAddress from "./shortenAddress"
import { blockchainCredentialSupportedNetworks } from "./getSupportedNetworks"
import {
blockchainCredentialSupportedNetworks,
easCredentialSupportedNetworks
} from "./getSupportedNetworks"

@@ -34,3 +37,4 @@ export {

BandadaABI,
blockchainCredentialSupportedNetworks
blockchainCredentialSupportedNetworks,
easCredentialSupportedNetworks
}

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