Socket
Socket
Sign inDemoInstall

@keplr-wallet/types

Package Overview
Dependencies
Maintainers
1
Versions
567
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@keplr-wallet/types - npm Package Compare versions

Comparing version 0.12.95 to 0.12.96-rc.0

13

build/chain-info.d.ts
import { Currency, AppCurrency, FeeCurrency } from "./currency";
import { BIP44 } from "./bip44";
import { Bech32Config } from "./bech32";
import { EVMInfo } from "./ethereum";
export interface ChainInfo {

@@ -42,11 +43,11 @@ readonly rpc: string;

readonly hideInUI?: boolean;
readonly evm?: {
chainId: number;
rpc: string;
};
readonly evm?: EVMInfo;
}
export type ChainInfoWithoutEndpoints = Omit<ChainInfo, "rest" | "rpc" | "nodeProvider" | "evm"> & {
evm?: {
chainId: number;
readonly rest: undefined;
readonly rpc: undefined;
readonly nodeProvider: undefined;
readonly evm?: Omit<EVMInfo, "rpc"> & {
readonly rpc: undefined;
};
};

@@ -40,1 +40,9 @@ export declare enum EthSignType {

}
export interface EVMInfo {
chainId: number;
rpc: string;
}
export interface EthereumSignResponse {
signingData: Uint8Array;
signature: Uint8Array;
}

@@ -0,1 +1,2 @@

/// <reference types="node" />
import { ChainInfo, ChainInfoWithoutEndpoints } from "../chain-info";

@@ -8,2 +9,3 @@ import { EthSignType } from "../ethereum";

import { DirectAuxSignResponse } from "../cosmjs-alt";
import EventEmitter from "events";
export interface Key {

@@ -15,2 +17,3 @@ readonly name: string;

readonly bech32Address: string;
readonly ethereumHexAddress: string;
readonly isNanoLedger: boolean;

@@ -124,2 +127,3 @@ readonly isKeystone: boolean;

getChainInfosWithoutEndpoints(): Promise<ChainInfoWithoutEndpoints[]>;
getChainInfoWithoutEndpoints(chainId: string): Promise<ChainInfoWithoutEndpoints>;
/** Change wallet extension user name **/

@@ -132,2 +136,17 @@ changeKeyRingName(opts: {

suggestERC20(chainId: string, contractAddress: string): Promise<void>;
readonly ethereum: IEthereumProvider;
}
export interface IEthereumProvider extends EventEmitter {
readonly chainId: string | null;
readonly networkVersion: string | null;
readonly selectedAddress: string | null;
readonly isKeplr: boolean;
readonly isMetaMask: boolean;
isConnected(): boolean;
request<T>({ method, params, }: {
method: string;
params?: unknown[] | Record<string, unknown>;
}): Promise<T>;
enable(): Promise<string[]>;
net_version(): Promise<string>;
}
{
"name": "@keplr-wallet/types",
"version": "0.12.95",
"version": "0.12.96-rc.0",
"main": "build/index.js",

@@ -21,3 +21,3 @@ "author": "chainapsis",

},
"gitHead": "2f1066af141b412410869ec0b7f06494d67e5e6e"
"gitHead": "fd75378ce2efcef63dd94874c219f84b689d95e6"
}
import { Currency, AppCurrency, FeeCurrency } from "./currency";
import { BIP44 } from "./bip44";
import { Bech32Config } from "./bech32";
import { EVMInfo } from "./ethereum";

@@ -49,6 +50,3 @@ export interface ChainInfo {

readonly evm?: {
chainId: number;
rpc: string;
};
readonly evm?: EVMInfo;
}

@@ -60,5 +58,8 @@

> & {
evm?: {
chainId: number;
readonly rest: undefined;
readonly rpc: undefined;
readonly nodeProvider: undefined;
readonly evm?: Omit<EVMInfo, "rpc"> & {
readonly rpc: undefined;
};
};

@@ -43,1 +43,11 @@ export enum EthSignType {

}
export interface EVMInfo {
chainId: number;
rpc: string;
}
export interface EthereumSignResponse {
signingData: Uint8Array;
signature: Uint8Array;
}

@@ -16,2 +16,3 @@ import { ChainInfo, ChainInfoWithoutEndpoints } from "../chain-info";

import { DirectAuxSignResponse } from "../cosmjs-alt";
import EventEmitter from "events";

@@ -25,2 +26,3 @@ export interface Key {

readonly bech32Address: string;
readonly ethereumHexAddress: string;
// Indicate whether the selected account is from the nano ledger.

@@ -232,2 +234,5 @@ // Because current cosmos app in the nano ledger doesn't support the direct (proto) format msgs,

getChainInfosWithoutEndpoints(): Promise<ChainInfoWithoutEndpoints[]>;
getChainInfoWithoutEndpoints(
chainId: string
): Promise<ChainInfoWithoutEndpoints>;

@@ -243,2 +248,29 @@ /** Change wallet extension user name **/

suggestERC20(chainId: string, contractAddress: string): Promise<void>;
readonly ethereum: IEthereumProvider;
}
export interface IEthereumProvider extends EventEmitter {
// It must be in the hexadecimal format used in EVM-based chains, not the format used in Tendermint nodes.
readonly chainId: string | null;
// It must be in the decimal format of chainId.
readonly networkVersion: string | null;
readonly selectedAddress: string | null;
readonly isKeplr: boolean;
readonly isMetaMask: boolean;
isConnected(): boolean;
request<T>({
method,
params,
}: {
method: string;
params?: unknown[] | Record<string, unknown>;
}): Promise<T>;
enable(): Promise<string[]>;
net_version(): Promise<string>;
}
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