@onekeyfe/onekey-btc-provider
Advanced tools
Comparing version 2.0.0-alpha.5 to 2.0.0-alpha.6
@@ -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'; |
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" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
Non-permissive License
License(Experimental) A license not known to be considered permissive was found.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
45859
21
1124
2
90
+ Added@onekeyfe/cross-inpage-provider-core@2.0.0-alpha.6(transitive)
+ Added@onekeyfe/cross-inpage-provider-errors@2.0.0-alpha.6(transitive)
+ Added@onekeyfe/cross-inpage-provider-events@2.0.0-alpha.6(transitive)
+ Added@onekeyfe/cross-inpage-provider-types@2.0.0-alpha.6(transitive)
+ Added@onekeyfe/extension-bridge-injected@2.0.0-alpha.6(transitive)
- Removed@onekeyfe/cross-inpage-provider-core@2.0.0-alpha.5(transitive)
- Removed@onekeyfe/cross-inpage-provider-errors@2.0.0-alpha.5(transitive)
- Removed@onekeyfe/cross-inpage-provider-events@2.0.0-alpha.5(transitive)
- Removed@onekeyfe/cross-inpage-provider-types@2.0.0-alpha.5(transitive)
- Removed@onekeyfe/extension-bridge-injected@2.0.0-alpha.5(transitive)