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

@avalabs/vm-module-types

Package Overview
Dependencies
Maintainers
0
Versions
540
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@avalabs/vm-module-types - npm Package Compare versions

Comparing version 0.0.0-eth-send-20240711135800 to 0.0.0-eth-send-20240711174340

dist/chunk-55P5W75Y.js

2

CHANGELOG.md
# @avalabs/vm-module-types
## 0.0.0-eth-send-20240711135800
## 0.0.0-eth-send-20240711174340

@@ -5,0 +5,0 @@ ### Patch Changes

@@ -1,4 +0,5 @@

export { Asset, Caip2ChainId, Chain, DappInfo, GetNetworkFeeParams, GetTransactionHistory, Hex, Manifest, Module, NetworkContractToken, NetworkFees, NetworkToken, RpcError, RpcMethod, RpcRequest, RpcResponse, TokenType, Transaction, TransactionHistoryResponse, TransactionType, TxToken, parseManifest } from './types.js';
export { ApprovalController, ApprovalParams, ApprovalResponse, Asset, Caip2ChainId, Chain, DappInfo, DisplayData, GetNetworkFeeParams, GetTransactionHistory, Hex, Manifest, Module, NetworkContractToken, NetworkFees, NetworkToken, RpcError, RpcMethod, RpcRequest, RpcResponse, SigningData, SigningDataType, TokenType, Transaction, TransactionHistoryResponse, TransactionType, TxToken, parseManifest } from './types.js';
import 'zod';
import 'viem';
import 'ethers';
import '@metamask/rpc-errors';

@@ -1,3 +0,3 @@

export { c as RpcMethod, b as TokenType, a as TransactionType, d as parseManifest } from './chunk-AMEBF5QM.js';
export { c as RpcMethod, e as SigningDataType, b as TokenType, a as TransactionType, d as parseManifest } from './chunk-55P5W75Y.js';
//# sourceMappingURL=out.js.map
//# sourceMappingURL=index.js.map
import { z } from 'zod';
import { Address } from 'viem';
import { TransactionRequest } from 'ethers';
import { JsonRpcError, OptionalDataWithOptionalCause, EthereumProviderError } from '@metamask/rpc-errors';

@@ -62,2 +63,3 @@

dappInfo: DappInfo;
context?: Record<string, unknown>;
};

@@ -438,3 +440,60 @@ type RpcError = JsonRpcError<OptionalDataWithOptionalCause> | EthereumProviderError<OptionalDataWithOptionalCause>;

type Hex = `0x${string}`;
type DisplayData = {
title: string;
chain: {
chainId: Caip2ChainId;
name: string;
logoUrl?: string;
};
messageDetails?: string;
transactionDetails?: {
website: string;
from: string;
to: string;
data?: string;
};
networkFeeSelector?: boolean;
};
/**
* Enum for different types of signing data.
*/
declare enum SigningDataType {
EVM_TRANSACTION = "evm_transaction",
EVM_MESSAGE_ETH_SIGN = "evm_message_eth_sign",
EVM_MESSAGE_PERSONAL_SIGN = "evm_message_personal_sign",
EVM_MESSAGE_ETH_SIGN_TYPED_DATA = "evm_message_eth_sign_typed_data",
EVM_MESSAGE_ETH_SIGN_TYPED_DATA_V1 = "evm_message_eth_sign_typed_data_v1",
EVM_MESSAGE_ETH_SIGN_TYPED_DATA_V3 = "evm_message_eth_sign_typed_data_v3",
EVM_MESSAGE_ETH_SIGN_TYPED_DATA_V4 = "evm_message_eth_sign_typed_data_v4",
AVALANCHE_TRANSACTION = "avalanche_transaction",
AVALANCHE_MESSAGE = "avalanche_message",
BTC_TRANSACTION = "btc_transaction"
}
type SigningData = {
type: SigningDataType.EVM_TRANSACTION;
account: string;
chainId: Caip2ChainId;
data: TransactionRequest;
} | {
type: SigningDataType.EVM_MESSAGE_ETH_SIGN;
account: string;
chainId: Caip2ChainId;
data: string;
};
type ApprovalParams = {
request: RpcRequest;
displayData: DisplayData;
signingData: SigningData;
};
type ApprovalResponse = {
result: Hex;
} | {
error: RpcError;
};
interface ApprovalController {
requestApproval: (params: ApprovalParams) => Promise<ApprovalResponse>;
onTransactionConfirmed: (txHash: Hex) => void;
onTransactionReverted: (txHash: Hex) => void;
}
export { Asset, Caip2ChainId, Chain, DappInfo, GetNetworkFeeParams, GetTransactionHistory, Hex, Manifest, Module, NetworkContractToken, NetworkFees, NetworkToken, RpcError, RpcMethod, RpcRequest, RpcResponse, TokenType, Transaction, TransactionHistoryResponse, TransactionType, TxToken, parseManifest };
export { ApprovalController, ApprovalParams, ApprovalResponse, Asset, Caip2ChainId, Chain, DappInfo, DisplayData, GetNetworkFeeParams, GetTransactionHistory, Hex, Manifest, Module, NetworkContractToken, NetworkFees, NetworkToken, RpcError, RpcMethod, RpcRequest, RpcResponse, SigningData, SigningDataType, TokenType, Transaction, TransactionHistoryResponse, TransactionType, TxToken, parseManifest };

@@ -1,3 +0,3 @@

export { c as RpcMethod, b as TokenType, a as TransactionType, d as parseManifest } from './chunk-AMEBF5QM.js';
export { c as RpcMethod, e as SigningDataType, b as TokenType, a as TransactionType, d as parseManifest } from './chunk-55P5W75Y.js';
//# sourceMappingURL=out.js.map
//# sourceMappingURL=types.js.map
{
"name": "@avalabs/vm-module-types",
"version": "0.0.0-eth-send-20240711135800",
"version": "0.0.0-eth-send-20240711174340",
"main": "dist/index.cjs",

@@ -11,3 +11,4 @@ "module": "dist/index.js",

"viem": "2.17.0",
"@metamask/rpc-errors": "6.3.0"
"@metamask/rpc-errors": "6.3.0",
"ethers": "6.8.1"
},

@@ -17,4 +18,7 @@ "devDependencies": {

"@internal/tsup-config": "0.0.1",
"eslint-config-custom": "0.0.0-eth-send-20240711135800"
"eslint-config-custom": "0.0.0-eth-send-20240711174340"
},
"peerDependencies": {
"ethers": "^6.8.1"
},
"scripts": {

@@ -21,0 +25,0 @@ "build": "tsup",

import { object, string, boolean, z } from 'zod';
import type { Address } from 'viem';
import type { TransactionRequest } from 'ethers';
import type { JsonRpcError, EthereumProviderError, OptionalDataWithOptionalCause } from '@metamask/rpc-errors';

@@ -59,2 +60,3 @@

dappInfo: DappInfo;
context?: Record<string, unknown>; // for storing additional context information that's only relevant to the consumer
};

@@ -236,1 +238,73 @@

export type Hex = `0x${string}`;
export type DisplayData = {
title: string;
chain: {
chainId: Caip2ChainId;
name: string;
logoUrl?: string;
};
messageDetails?: string;
transactionDetails?: {
website: string;
from: string;
to: string;
data?: string;
};
networkFeeSelector?: boolean;
};
/**
* Enum for different types of signing data.
*/
export enum SigningDataType {
// EVM signing data types
EVM_TRANSACTION = 'evm_transaction',
EVM_MESSAGE_ETH_SIGN = 'evm_message_eth_sign',
EVM_MESSAGE_PERSONAL_SIGN = 'evm_message_personal_sign',
EVM_MESSAGE_ETH_SIGN_TYPED_DATA = 'evm_message_eth_sign_typed_data',
EVM_MESSAGE_ETH_SIGN_TYPED_DATA_V1 = 'evm_message_eth_sign_typed_data_v1',
EVM_MESSAGE_ETH_SIGN_TYPED_DATA_V3 = 'evm_message_eth_sign_typed_data_v3',
EVM_MESSAGE_ETH_SIGN_TYPED_DATA_V4 = 'evm_message_eth_sign_typed_data_v4',
// Avalanche signing data types
AVALANCHE_TRANSACTION = 'avalanche_transaction',
AVALANCHE_MESSAGE = 'avalanche_message',
// Bitcoin signing data types
BTC_TRANSACTION = 'btc_transaction',
}
export type SigningData =
| {
type: SigningDataType.EVM_TRANSACTION;
account: string;
chainId: Caip2ChainId;
data: TransactionRequest;
}
| {
type: SigningDataType.EVM_MESSAGE_ETH_SIGN;
account: string;
chainId: Caip2ChainId;
data: string;
};
export type ApprovalParams = {
request: RpcRequest;
displayData: DisplayData;
signingData: SigningData;
};
export type ApprovalResponse =
| {
result: Hex;
}
| {
error: RpcError;
};
export interface ApprovalController {
requestApproval: (params: ApprovalParams) => Promise<ApprovalResponse>;
onTransactionConfirmed: (txHash: Hex) => void;
onTransactionReverted: (txHash: Hex) => void;
}

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