@avalabs/vm-module-types
Advanced tools
Comparing version 0.0.0-addFunctions-20240621170127 to 0.0.0-build-test-20240711134904
# @avalabs/vm-module-types | ||
## 0.0.0-addFunctions-20240621170127 | ||
## 0.0.0-build-test-20240711134904 | ||
### Patch Changes | ||
- 2f39ec5: make module interface dynamic | ||
- b09fcea: add module functions to evm-module | ||
- a159b24: fix: build types package | ||
## 0.0.11 | ||
## 0.0.10 | ||
### Patch Changes | ||
- 60f36fa: add getTokens function | ||
## 0.0.9 | ||
### Patch Changes | ||
- 6ffa356: add module functions to evm-module | ||
## 0.0.8 | ||
@@ -11,0 +24,0 @@ |
{ | ||
"name": "@avalabs/vm-module-types", | ||
"version": "0.0.0-addFunctions-20240621170127", | ||
"main": "src/index.ts", | ||
"version": "0.0.0-build-test-20240711134904", | ||
"main": "dist/index.cjs", | ||
"module": "dist/index.js", | ||
"typings": "dist/index.d.ts", | ||
"type": "module", | ||
"dependencies": { | ||
@@ -9,7 +12,10 @@ "zod": "3.23.8" | ||
"devDependencies": { | ||
"tsup": "7.2.0", | ||
"@internal/tsup-config": "0.0.1", | ||
"eslint-config-custom": "0.0.1" | ||
}, | ||
"scripts": { | ||
"build": "tsup", | ||
"lint": "eslint \"src/**/*.ts\"" | ||
} | ||
} |
@@ -60,8 +60,19 @@ import { object, string, boolean, z } from 'zod'; | ||
export type Chain = { | ||
isTestnet?: boolean; | ||
chainId?: string; | ||
chainName?: string; | ||
rpcUrl?: string; | ||
multiContractAddress?: string; | ||
}; | ||
export type GetNetworkFeeParams = Chain; | ||
export interface Module { | ||
getManifest: () => Manifest | undefined; | ||
getNetworkFee: () => Promise<RpcResponse<NetworkFees>>; | ||
getTransactionHistory: (params: GetTransactionHistory) => Promise<RpcResponse<TransactionHistoryResponse>>; | ||
getBalances: () => Promise<string>; | ||
getTransactionHistory: (params: GetTransactionHistory) => Promise<TransactionHistoryResponse>; | ||
getNetworkFee: (params: GetNetworkFeeParams) => Promise<NetworkFees>; | ||
getAddress: () => Promise<string>; | ||
getBalances: () => Promise<string>; | ||
getTokens: (chainId: number) => Promise<NetworkContractToken[]>; | ||
onRpcRequest: (request: RpcRequest) => Promise<RpcResponse>; | ||
@@ -147,2 +158,13 @@ } | ||
export interface NetworkContractToken { | ||
address: string; | ||
chainId?: number; | ||
color?: string; | ||
contractType: string; | ||
decimals: number; | ||
logoUri?: string; | ||
name: string; | ||
symbol: string; | ||
} | ||
const sourceSchema = object({ | ||
@@ -149,0 +171,0 @@ checksum: string(), |
@@ -5,5 +5,5 @@ { | ||
"outDir": "./dist", | ||
"composite": true | ||
"tsBuildInfoFile": ".tsbuildinfo" | ||
}, | ||
"include": ["src"] | ||
} |
Sorry, the diff of this file is not supported yet
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
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
48126
1745
25
676
Yes
22
3
3
1
37