@avalabs/vm-module-types
Advanced tools
Comparing version 0.0.0-cp-8362-20240711204117 to 0.0.0-cp-8362-20240712141247
# @avalabs/vm-module-types | ||
## 0.0.0-cp-8362-20240711204117 | ||
## 0.0.0-cp-8362-20240712141247 | ||
@@ -8,3 +8,4 @@ ### Patch Changes | ||
- cd97708: fix: build types package | ||
- 19d1aba: add getBalances to evm-module | ||
- d0c2cc9: make module interface more consistent | ||
- 80121e7: add getBalances to evm-module | ||
@@ -11,0 +12,0 @@ ## 0.0.11 |
@@ -5,3 +5,3 @@ import { NetworkToken } from './token.js'; | ||
isTestnet?: boolean; | ||
chainId: string; | ||
chainId: number; | ||
chainName: string; | ||
@@ -19,2 +19,3 @@ rpcUrl: string; | ||
}; | ||
explorerUrl?: string; | ||
}; | ||
@@ -31,3 +32,9 @@ type Storage = { | ||
}; | ||
type Caip2ChainId = string; | ||
type Hex = `0x${string}`; | ||
declare enum Environment { | ||
PRODUCTION = "production", | ||
DEV = "dev" | ||
} | ||
export { Error, Network, Storage }; | ||
export { Caip2ChainId, Environment, Error, Hex, Network, Storage }; |
@@ -1,3 +0,4 @@ | ||
import './chunk-GYQ2KZV6.js'; | ||
export { a as Environment } from './chunk-IC5EF5ZD.js'; | ||
import './chunk-UQUN7XQY.js'; | ||
//# sourceMappingURL=out.js.map | ||
//# sourceMappingURL=common.js.map |
@@ -1,2 +0,2 @@ | ||
export { Error, Network, Storage } from './common.js'; | ||
export { Caip2ChainId, Environment, Error, Hex, Network, Storage } from './common.js'; | ||
export { RawSimplePriceResponse, RawSimplePriceResponseSchema, SimplePriceResponse, SimplePriceResponseSchema } from './coingecko.js'; | ||
@@ -7,3 +7,3 @@ export { GetBalancesParams, GetBalancesResponse, NetworkTokenWithBalance, TokenBalanceData, TokenWithBalance, TokenWithBalanceERC20 } from './balance.js'; | ||
export { NetworkFees } from './network-fee.js'; | ||
export { RpcMethod, RpcRequest, RpcResponse } from './rpc.js'; | ||
export { DappInfo, RpcError, RpcMethod, RpcRequest, RpcResponse } from './rpc.js'; | ||
export { NetworkContractToken, NetworkToken, TokenType } from './token.js'; | ||
@@ -13,1 +13,2 @@ export { GetTransactionHistory, Transaction, TransactionHistoryResponse, TransactionType, TxToken } from './transaction-history.js'; | ||
import 'bn.js'; | ||
import '@metamask/rpc-errors'; |
export { a as TokenType } from './chunk-TSO5BGJ4.js'; | ||
export { a as TransactionType } from './chunk-7WSHFVCZ.js'; | ||
export { a as TransactionType } from './chunk-OI2VX6JW.js'; | ||
import './chunk-V7F54GXR.js'; | ||
export { b as RawSimplePriceResponseSchema, a as SimplePriceResponseSchema } from './chunk-WOO6UGSQ.js'; | ||
import './chunk-GYQ2KZV6.js'; | ||
export { a as Environment } from './chunk-IC5EF5ZD.js'; | ||
export { a as parseManifest } from './chunk-A4YEBDMG.js'; | ||
import './chunk-CUVJNZP5.js'; | ||
import './chunk-7U2R34EQ.js'; | ||
export { a as RpcMethod } from './chunk-4JFKRJA6.js'; | ||
export { a as RpcMethod } from './chunk-FZ4RN4EV.js'; | ||
import './chunk-UQUN7XQY.js'; | ||
//# sourceMappingURL=out.js.map | ||
//# sourceMappingURL=index.js.map |
@@ -10,2 +10,3 @@ import { GetBalancesParams, GetBalancesResponse } from './balance.js'; | ||
import 'zod'; | ||
import '@metamask/rpc-errors'; | ||
@@ -16,10 +17,8 @@ interface Module { | ||
getTransactionHistory: (params: GetTransactionHistory) => Promise<TransactionHistoryResponse>; | ||
getNetworkFee: ({ network }: { | ||
network: Network; | ||
}) => Promise<NetworkFees>; | ||
getNetworkFee: (network: Network) => Promise<NetworkFees>; | ||
getAddress: () => Promise<string>; | ||
getTokens: (chainId: number) => Promise<NetworkContractToken[]>; | ||
onRpcRequest: (request: RpcRequest) => Promise<RpcResponse>; | ||
getTokens: (network: Network) => Promise<NetworkContractToken[]>; | ||
onRpcRequest: (request: RpcRequest, chain: Network) => Promise<RpcResponse>; | ||
} | ||
export { Module }; |
@@ -0,1 +1,5 @@ | ||
import { JsonRpcError, OptionalDataWithOptionalCause, EthereumProviderError } from '@metamask/rpc-errors'; | ||
import { Caip2ChainId } from './common.js'; | ||
import './token.js'; | ||
declare enum RpcMethod { | ||
@@ -14,6 +18,11 @@ ETH_SEND_TRANSACTION = "eth_sendTransaction", | ||
type RpcRequest = { | ||
requestId: string; | ||
sessionId: string; | ||
method: RpcMethod; | ||
chainId: Caip2ChainId; | ||
params: unknown; | ||
dappInfo: DappInfo; | ||
}; | ||
type RpcResponse<R = unknown, E extends Error = Error> = { | ||
type RpcError = JsonRpcError<OptionalDataWithOptionalCause> | EthereumProviderError<OptionalDataWithOptionalCause>; | ||
type RpcResponse<R = unknown, E extends RpcError = JsonRpcError<OptionalDataWithOptionalCause>> = { | ||
result: R; | ||
@@ -23,3 +32,8 @@ } | { | ||
}; | ||
type DappInfo = { | ||
name: string; | ||
url: string; | ||
icon: string; | ||
}; | ||
export { RpcMethod, RpcRequest, RpcResponse }; | ||
export { DappInfo, RpcError, RpcMethod, RpcRequest, RpcResponse }; |
@@ -1,4 +0,4 @@ | ||
export { a as RpcMethod } from './chunk-4JFKRJA6.js'; | ||
export { a as RpcMethod } from './chunk-FZ4RN4EV.js'; | ||
import './chunk-UQUN7XQY.js'; | ||
//# sourceMappingURL=out.js.map | ||
//# sourceMappingURL=rpc.js.map |
@@ -1,8 +0,6 @@ | ||
import { NetworkToken, TokenType } from './token.js'; | ||
import { Network } from './common.js'; | ||
import { TokenType } from './token.js'; | ||
type GetTransactionHistory = { | ||
chainId: number; | ||
isTestnet: boolean; | ||
networkToken: NetworkToken; | ||
explorerUrl: string; | ||
network: Network; | ||
address: string; | ||
@@ -9,0 +7,0 @@ nextPageToken?: string; |
@@ -1,4 +0,4 @@ | ||
export { a as TransactionType } from './chunk-7WSHFVCZ.js'; | ||
export { a as TransactionType } from './chunk-OI2VX6JW.js'; | ||
import './chunk-UQUN7XQY.js'; | ||
//# sourceMappingURL=out.js.map | ||
//# sourceMappingURL=transaction-history.js.map |
{ | ||
"name": "@avalabs/vm-module-types", | ||
"version": "0.0.0-cp-8362-20240711204117", | ||
"version": "0.0.0-cp-8362-20240712141247", | ||
"main": "dist/index.cjs", | ||
@@ -9,3 +9,4 @@ "module": "dist/index.js", | ||
"dependencies": { | ||
"zod": "3.23.8" | ||
"zod": "3.23.8", | ||
"@metamask/rpc-errors": "6.3.0" | ||
}, | ||
@@ -19,3 +20,3 @@ "devDependencies": { | ||
"@internal/tsup-config": "0.0.1", | ||
"eslint-config-custom": "0.0.0-cp-8362-20240711204117" | ||
"eslint-config-custom": "0.0.0-cp-8362-20240712141247" | ||
}, | ||
@@ -22,0 +23,0 @@ "scripts": { |
@@ -5,3 +5,3 @@ import type { NetworkToken } from './token'; | ||
isTestnet?: boolean; | ||
chainId: string; // caip2ChainId | ||
chainId: number; | ||
chainName: string; | ||
@@ -19,2 +19,3 @@ rpcUrl: string; | ||
}; | ||
explorerUrl?: string; | ||
}; | ||
@@ -33,1 +34,10 @@ | ||
}; | ||
export type Caip2ChainId = string; | ||
export type Hex = `0x${string}`; | ||
export enum Environment { | ||
PRODUCTION = 'production', | ||
DEV = 'dev', | ||
} |
@@ -13,6 +13,6 @@ import type { GetBalancesParams, GetBalancesResponse } from './balance'; | ||
getTransactionHistory: (params: GetTransactionHistory) => Promise<TransactionHistoryResponse>; | ||
getNetworkFee: ({ network }: { network: Network }) => Promise<NetworkFees>; | ||
getNetworkFee: (network: Network) => Promise<NetworkFees>; | ||
getAddress: () => Promise<string>; | ||
getTokens: (chainId: number) => Promise<NetworkContractToken[]>; | ||
onRpcRequest: (request: RpcRequest) => Promise<RpcResponse>; | ||
getTokens: (network: Network) => Promise<NetworkContractToken[]>; | ||
onRpcRequest: (request: RpcRequest, chain: Network) => Promise<RpcResponse>; | ||
} |
@@ -0,1 +1,4 @@ | ||
import type { JsonRpcError, EthereumProviderError, OptionalDataWithOptionalCause } from '@metamask/rpc-errors'; | ||
import type { Caip2ChainId } from './common'; | ||
export enum RpcMethod { | ||
@@ -16,7 +19,15 @@ /* EVM */ | ||
export type RpcRequest = { | ||
requestId: string; | ||
sessionId: string; | ||
method: RpcMethod; | ||
chainId: Caip2ChainId; | ||
params: unknown; | ||
dappInfo: DappInfo; | ||
}; | ||
export type RpcResponse<R = unknown, E extends Error = Error> = | ||
export type RpcError = | ||
| JsonRpcError<OptionalDataWithOptionalCause> | ||
| EthereumProviderError<OptionalDataWithOptionalCause>; | ||
export type RpcResponse<R = unknown, E extends RpcError = JsonRpcError<OptionalDataWithOptionalCause>> = | ||
| { | ||
@@ -28,1 +39,7 @@ result: R; | ||
}; | ||
export type DappInfo = { | ||
name: string; | ||
url: string; | ||
icon: string; | ||
}; |
@@ -1,8 +0,6 @@ | ||
import type { NetworkToken, TokenType } from './token'; | ||
import type { Network } from './common'; | ||
import type { TokenType } from './token'; | ||
export type GetTransactionHistory = { | ||
chainId: number; | ||
isTestnet: boolean; | ||
networkToken: NetworkToken; | ||
explorerUrl: string; | ||
network: Network; | ||
address: string; | ||
@@ -9,0 +7,0 @@ nextPageToken?: string; |
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
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
507486
1426
2
+ Added@metamask/rpc-errors@6.3.0
+ Added@ethereumjs/common@3.2.0(transitive)
+ Added@ethereumjs/rlp@4.0.1(transitive)
+ Added@ethereumjs/tx@4.2.0(transitive)
+ Added@ethereumjs/util@8.1.0(transitive)
+ Added@metamask/rpc-errors@6.3.0(transitive)
+ Added@metamask/superstruct@3.1.0(transitive)
+ Added@metamask/utils@8.5.0(transitive)
+ Added@noble/curves@1.4.2(transitive)
+ Added@noble/hashes@1.4.01.7.1(transitive)
+ Added@scure/base@1.1.91.2.4(transitive)
+ Added@scure/bip32@1.4.0(transitive)
+ Added@scure/bip39@1.3.0(transitive)
+ Added@types/debug@4.1.12(transitive)
+ Added@types/ms@2.1.0(transitive)
+ Addedcrc-32@1.2.2(transitive)
+ Addeddebug@4.4.0(transitive)
+ Addedethereum-cryptography@2.2.1(transitive)
+ Addedfast-safe-stringify@2.1.1(transitive)
+ Addedmicro-ftch@0.3.1(transitive)
+ Addedms@2.1.3(transitive)
+ Addedpony-cause@2.1.11(transitive)
+ Addedsemver@7.7.0(transitive)
+ Addeduuid@9.0.1(transitive)