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

@avalabs/avalanche-module

Package Overview
Dependencies
Maintainers
0
Versions
511
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@avalabs/avalanche-module - npm Package Compare versions

Comparing version 0.0.0-CP-8870-20240709202505 to 0.0.0-automate-20240712215427

manifest.json

19

CHANGELOG.md
# @avalabs/avalanche-module
## 0.0.0-CP-8870-20240709202505
## 0.0.0-automate-20240712215427
### Patch Changes
- af68c81: Add getTransactionHistory to avalanche module
- d9fa0f5: added getNetworkFee to avalanche module
- Updated dependencies [af68c81]
- Updated dependencies [d9fa0f5]
- @avalabs/vm-module-types@0.0.0-automate-20240712215427
## 0.0.12
### Patch Changes
- d0c2cc9: make module interface more consistent
- 02560da: Created Avalanche module
- Updated dependencies [1ba779a]
- @avalabs/vm-module-types@0.0.0-CP-8870-20240709202505
- Updated dependencies [cd97708]
- Updated dependencies [d0c2cc9]
- Updated dependencies [7bc6c6e]
- @avalabs/vm-module-types@0.0.12

8

dist/index.d.ts
import * as _metamask_rpc_errors from '@metamask/rpc-errors';
import { Module, Manifest, GetNetworkFeeParams, NetworkFees, GetTransactionHistory, RpcRequest, Chain } from '@avalabs/vm-module-types';
import { Module, Manifest, Network, NetworkFees, GetTransactionHistory, RpcRequest } from '@avalabs/vm-module-types';

@@ -8,8 +8,8 @@ declare class AvalancheModule implements Module {

getManifest(): Manifest | undefined;
getNetworkFee(_: GetNetworkFeeParams): Promise<NetworkFees>;
getNetworkFee(_: Network): Promise<NetworkFees>;
getTransactionHistory(_: GetTransactionHistory): Promise<{
transactions: never[];
}>;
getTokens(_: number): Promise<never[]>;
onRpcRequest(request: RpcRequest, _chain: Chain): Promise<{
getTokens(_: Network): Promise<never[]>;
onRpcRequest(request: RpcRequest, _network: Network): Promise<{
error: _metamask_rpc_errors.JsonRpcError<_metamask_rpc_errors.OptionalDataWithOptionalCause>;

@@ -16,0 +16,0 @@ }>;

import { parseManifest } from '@avalabs/vm-module-types';
import { rpcErrors } from '@metamask/rpc-errors';
var r={name:"AVM",description:"",version:"0.0.1",sources:{module:{checksum:"",location:{npm:{filePath:"dist/bundle.js",packageName:"@avalabs/avalanche-module",registry:"https://registry.npmjs.org"}}},provider:{checksum:"",location:{npm:{filePath:"dist/provider.js",packageName:"@avalabs/avalanche-module",registry:"https://registry.npmjs.org"}}}},network:{chainIds:["avax:2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM","avax:2JVSBoinj9C2J33VntvzYtVJNZdN2NKiwwKjcumHUWEb5DbBrm","avax:11111111111111111111111111111111LpoYY","avax:fuji-11111111111111111111111111111111LpoYY"],namespaces:["avax"]},cointype:"",permissions:{rpc:{dapps:!0,methods:["avalanche_sendTransaction","avalanche_*"]}},manifestVersion:"0.0"};var s=class{getAddress(){return Promise.resolve("Avalanche address")}getBalances(){return Promise.resolve("Avalanche balances")}getManifest(){let e=parseManifest(r);return e.success?e.data:void 0}getNetworkFee(e){return Promise.resolve({low:{maxPriorityFeePerGas:0n,maxFeePerGas:0n},medium:{maxPriorityFeePerGas:0n,maxFeePerGas:0n},high:{maxPriorityFeePerGas:0n,maxFeePerGas:0n},baseFee:0n})}getTransactionHistory(e){return Promise.resolve({transactions:[]})}getTokens(e){return Promise.resolve([])}async onRpcRequest(e,i){switch(e.method){default:return {error:rpcErrors.methodNotSupported(`Method ${e.method} not supported`)}}}};
var r={name:"Avalanche",description:"",version:"0.0.1",sources:{module:{checksum:"",location:{npm:{filePath:"dist/bundle.js",packageName:"@avalabs/avalanche-module",registry:"https://registry.npmjs.org"}}},provider:{checksum:"",location:{npm:{filePath:"dist/provider.js",packageName:"@avalabs/avalanche-module",registry:"https://registry.npmjs.org"}}}},network:{chainIds:["avax:2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM","avax:2JVSBoinj9C2J33VntvzYtVJNZdN2NKiwwKjcumHUWEb5DbBrm","avax:11111111111111111111111111111111LpoYY"],namespaces:["avax"]},cointype:"60",permissions:{rpc:{dapps:!0,methods:["avalanche_sendTransaction","avalanche_*"]}},manifestVersion:"0.0"};async function t(){return {baseFee:BigInt(1e6),low:{maxFeePerGas:BigInt(1e6)},medium:{maxFeePerGas:BigInt(1e6)},high:{maxFeePerGas:BigInt(1e6)},isFixedFee:!0}}var s=class{getAddress(){return Promise.resolve("Avalanche address")}getBalances(){return Promise.resolve("Avalanche balances")}getManifest(){let e=parseManifest(r);return e.success?e.data:void 0}getNetworkFee(e){return t()}getTransactionHistory(e){return Promise.resolve({transactions:[]})}getTokens(e){return Promise.resolve([])}async onRpcRequest(e,m){switch(e.method){default:return {error:rpcErrors.methodNotSupported(`Method ${e.method} not supported`)}}}};

@@ -6,0 +6,0 @@ export { s as AvalancheModule };

{
"name": "@avalabs/avalanche-module",
"version": "0.0.0-CP-8870-20240709202505",
"version": "0.0.0-automate-20240712215427",
"main": "dist/index.cjs",

@@ -9,4 +9,10 @@ "module": "dist/index.js",

"dependencies": {
"@avalabs/vm-module-types": "0.0.0-CP-8870-20240709202505",
"@metamask/rpc-errors": "6.3.0"
"@avalabs/vm-module-types": "0.0.0-automate-20240712215427",
"@metamask/rpc-errors": "6.3.0",
"@avalabs/utils-sdk": "v2.8.0-alpha.187",
"@avalabs/chains-sdk": "v2.8.0-alpha.187",
"@avalabs/etherscan-sdk": "v2.8.0-alpha.187",
"@avalabs/glacier-sdk": "v2.8.0-alpha.187",
"@avalabs/wallets-sdk": "v2.8.0-alpha.187",
"big.js": "6.2.1"
},

@@ -18,4 +24,5 @@ "devDependencies": {

"tsup": "7.2.0",
"@types/big.js": "6.2.2",
"@internal/tsup-config": "0.0.1",
"eslint-config-custom": "0.0.0-CP-8870-20240709202505"
"eslint-config-custom": "0.0.2"
},

@@ -22,0 +29,0 @@ "scripts": {

@@ -7,8 +7,8 @@ import type {

RpcRequest,
GetNetworkFeeParams,
Chain,
Network,
} from '@avalabs/vm-module-types';
import { parseManifest } from '@avalabs/vm-module-types';
import { rpcErrors } from '@metamask/rpc-errors';
import ManifestJson from './manifest.json';
import ManifestJson from '../manifest.json';
import { getNetworkFee } from './handlers/get-network-fee';

@@ -29,9 +29,4 @@ export class AvalancheModule implements Module {

getNetworkFee(_: GetNetworkFeeParams): Promise<NetworkFees> {
return Promise.resolve({
low: { maxPriorityFeePerGas: 0n, maxFeePerGas: 0n },
medium: { maxPriorityFeePerGas: 0n, maxFeePerGas: 0n },
high: { maxPriorityFeePerGas: 0n, maxFeePerGas: 0n },
baseFee: 0n,
});
getNetworkFee(_: Network): Promise<NetworkFees> {
return getNetworkFee();
}

@@ -43,7 +38,7 @@

getTokens(_: number) {
getTokens(_: Network) {
return Promise.resolve([]);
}
async onRpcRequest(request: RpcRequest, _chain: Chain) {
async onRpcRequest(request: RpcRequest, _network: Network) {
switch (request.method) {

@@ -50,0 +45,0 @@ default:

@@ -7,4 +7,3 @@ {

},
"include": ["src"],
"references": [{ "path": "../../packages/types/tsconfig.json" }]
"include": ["src"]
}

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

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

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