Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@onekeyfe/onekey-btc-provider

Package Overview
Dependencies
Maintainers
2
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@onekeyfe/onekey-btc-provider - npm Package Compare versions

Comparing version 2.0.0-alpha.5 to 2.0.0-alpha.6

dist/cjs/ProviderBtcWallet.js

1

dist/cjs/index.js

@@ -15,1 +15,2 @@ "use strict";

__exportStar(require("./ProviderBtcBase"), exports);
__exportStar(require("./ProviderBtcWallet"), exports);

@@ -36,2 +36,3 @@ "use strict";

isPermanentlyDisconnected: false,
isBtcWalletProvider: false
};

@@ -38,0 +39,0 @@ this._log = (_a = props.logger) !== null && _a !== void 0 ? _a : window.console;

@@ -31,2 +31,8 @@ "use strict";

ProviderMethods["INSCRIBE_TRANSFER"] = "inscribeTransfer";
/**
* Add support for the Babylon BTC wallet provider.
*/
ProviderMethods["GET_NETWORK_FEES"] = "getNetworkFees";
ProviderMethods["GET_UTXOS"] = "getUtxos";
ProviderMethods["GET_BTC_TIP_HEIGHT"] = "getBTCTipHeight";
})(ProviderMethods = exports.ProviderMethods || (exports.ProviderMethods = {}));
export * from './ProviderBtc';
export * from './ProviderBtcBase';
export * from './ProviderBtcWallet';
export * from './ProviderBtc';
export * from './ProviderBtcBase';
export * from './ProviderBtcWallet';

6

dist/ProviderBtc.d.ts
import { ProviderBtcBase } from './ProviderBtcBase';
import { IProviderBtc, OneKeyBtcProviderProps, ProviderState, ProviderEvents, ProviderMethods, ProviderEventsMap, MessageType, BalanceInfo, InscriptionInfo } from './types';
import { IProviderBtc, OneKeyBtcProviderProps, RequestArguments, ProviderState, ProviderEvents, ProviderMethods, ProviderEventsMap, MessageType, BalanceInfo, InscriptionInfo } from './types';
declare class ProviderBtc extends ProviderBtcBase implements IProviderBtc {

@@ -20,3 +20,3 @@ readonly isOneKey = true;

private _handleAccountsChanged;
private _request;
protected _request<T>(args: RequestArguments): Promise<T>;
requestAccounts(): Promise<string[]>;

@@ -27,3 +27,3 @@ getAccounts(): Promise<string[]>;

getPublicKey(): Promise<string>;
getBalance(): Promise<BalanceInfo>;
getBalance(): Promise<BalanceInfo | number>;
getInscriptions(cursor?: number, size?: number): Promise<{

@@ -30,0 +30,0 @@ total: number;

@@ -31,2 +31,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

isPermanentlyDisconnected: false,
isBtcWalletProvider: false
};

@@ -33,0 +34,0 @@ this._log = (_a = props.logger) !== null && _a !== void 0 ? _a : window.console;

@@ -32,2 +32,3 @@ import { IInpageProviderConfig } from '@onekeyfe/cross-inpage-provider-core';

isPermanentlyDisconnected: boolean;
isBtcWalletProvider: boolean;
};

@@ -58,3 +59,9 @@ export declare enum ProviderEvents {

GET_PROVIDER_STATE = "getProviderState",
INSCRIBE_TRANSFER = "inscribeTransfer"
INSCRIBE_TRANSFER = "inscribeTransfer",
/**
* Add support for the Babylon BTC wallet provider.
*/
GET_NETWORK_FEES = "getNetworkFees",
GET_UTXOS = "getUtxos",
GET_BTC_TIP_HEIGHT = "getBTCTipHeight"
}

@@ -77,2 +84,15 @@ export declare type OneKeyBtcProviderProps = IInpageProviderConfig & {

}
export declare type Fees = {
fastestFee: number;
halfHourFee: number;
hourFee: number;
economyFee: number;
minimumFee: number;
};
export interface UTXO {
txid: string;
vout: number;
value: number;
scriptPubKey: string;
}
export interface IProviderBtc extends ProviderBtcBase {

@@ -85,3 +105,3 @@ readonly isOneKey: boolean;

getPublicKey(): Promise<string>;
getBalance(): Promise<BalanceInfo>;
getBalance(): Promise<BalanceInfo | number>;
getInscriptions(cursor?: number, size?: number): Promise<{

@@ -108,1 +128,13 @@ total: number;

}
/**
* Add support for the Babylon BTC wallet provider.
*/
export interface IProviderBtcWallet extends IProviderBtc {
connectWallet(): Promise<this>;
getWalletProviderName(): Promise<string>;
getAddress(): Promise<string>;
getPublicKeyHex(): Promise<string>;
signMessageBIP322(message: string): Promise<string>;
getNetworkFees(): Promise<Fees>;
getUtxos(address: string, amount: number): Promise<UTXO[]>;
}

@@ -28,2 +28,8 @@ export var ProviderEvents;

ProviderMethods["INSCRIBE_TRANSFER"] = "inscribeTransfer";
/**
* Add support for the Babylon BTC wallet provider.
*/
ProviderMethods["GET_NETWORK_FEES"] = "getNetworkFees";
ProviderMethods["GET_UTXOS"] = "getUtxos";
ProviderMethods["GET_BTC_TIP_HEIGHT"] = "getBTCTipHeight";
})(ProviderMethods || (ProviderMethods = {}));
{
"name": "@onekeyfe/onekey-btc-provider",
"version": "2.0.0-alpha.5",
"version": "2.0.0-alpha.6",
"keywords": [

@@ -31,8 +31,8 @@ "cross-inpage-provider"

"dependencies": {
"@onekeyfe/cross-inpage-provider-core": "2.0.0-alpha.5",
"@onekeyfe/cross-inpage-provider-errors": "2.0.0-alpha.5",
"@onekeyfe/cross-inpage-provider-types": "2.0.0-alpha.5",
"@onekeyfe/extension-bridge-injected": "2.0.0-alpha.5"
"@onekeyfe/cross-inpage-provider-core": "2.0.0-alpha.6",
"@onekeyfe/cross-inpage-provider-errors": "2.0.0-alpha.6",
"@onekeyfe/cross-inpage-provider-types": "2.0.0-alpha.6",
"@onekeyfe/extension-bridge-injected": "2.0.0-alpha.6"
},
"gitHead": "9be2a1ce818cf0a763ee247d83b9b47cf7998fb2"
"gitHead": "d3e3f224c0436a4189b243da3b2f39d71308c8d5"
}
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