@zetachain/addresses
Advanced tools
Comparing version 0.0.6 to 0.0.7
{ | ||
"name": "@zetachain/addresses", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"license": "MIT", | ||
@@ -10,19 +10,22 @@ "author": "zetachain", | ||
}, | ||
"main": "./dist/zetachain-addresses.js", | ||
"types": "./dist/zetachain-addresses.d.ts", | ||
"main": "./dist/zetachain-addresses.umd.js", | ||
"module": "./dist/zetachain-addresses.mjs", | ||
"types": "./dist/index.d.ts", | ||
"files": [ | ||
"dist" | ||
], | ||
"exports": { | ||
".": { | ||
"import": "./dist/zetachain-addresses.mjs", | ||
"require": "./dist/zetachain-addresses.umd.cjs" | ||
} | ||
}, | ||
"scripts": { | ||
"tsc:watch": "npx tsc --watch", | ||
"prepublishOnly": "webpack --mode=production" | ||
"prepublishOnly": "vite build" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.18.13", | ||
"babel-loader": "^8.2.5", | ||
"clean-webpack-plugin": "^4.0.0", | ||
"ts-loader": "^9.3.1", | ||
"webpack": "^5.74.0", | ||
"webpack-cli": "^4.10.0" | ||
"vite": "^3.1.0", | ||
"vite-plugin-dts": "^1.4.1" | ||
} | ||
} |
# ZetaChain addresses | ||
This package includes the addresses and networks to use Zetachain. | ||
## Usage | ||
```js | ||
import { getAddress } from "@zetachain/addresses"; | ||
const address = getAddress({ address: "zetaToken", networkName: "goerli", zetaNetwork:"athens" }); | ||
``` | ||
## API | ||
| Method | Description | | ||
| :---- | ------ | | ||
| isTestnetNetworkName = (networkName: string): networkName is TestnetNetworkName | Returns true if it's a valid Testnet name | | ||
| isZetaTestnet = (networkName: string): networkName is ZetaTestnetNetworkName | Returns true if it's a valid ZetaTestnet name | | ||
| isMainnetNetworkName = (networkName: string): networkName is MainnetNetworkName | Returns true if it's a valid Mainnet name | | ||
| isNetworkName = (networkName: string): networkName is NetworkName | Returns true if it's a valid network name | | ||
| isZetaNetworkName = (networkName: string): networkName is ZetaNetworkName | Returns true if it's a valid Zeta network name | | ||
| type ZetaAddress | Valid values for ZetaAddress | | ||
| getAddress = ({ address: ZetaAddress; networkName: string; zetaNetwork: string; }): string | Returns the address of a valid ZetaAddress | | ||
``` |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
19455
2
6
305
26
1