@walletconnect/web3-subprovider
Advanced tools
Comparing version 1.0.0-beta.3 to 1.0.0-beta.4
@@ -1,2 +0,2 @@ | ||
import { IJsonRpcRequest, IJsonRpcResponse, IWeb3Provider, ICallback, IErrorCallback } from '@walletconnect/types'; | ||
import { IJsonRpcRequest, IJsonRpcResponseSuccess, IJsonRpcResponseError, IWeb3Provider, ICallback, IErrorCallback } from '@walletconnect/types'; | ||
declare abstract class Subprovider { | ||
@@ -7,3 +7,3 @@ engine: IWeb3Provider; | ||
abstract handleRequest(payload: IJsonRpcRequest, next: ICallback, end: IErrorCallback): Promise<void>; | ||
emitPayloadAsync(payload: Partial<IJsonRpcRequest>): Promise<IJsonRpcResponse>; | ||
emitPayloadAsync(payload: Partial<IJsonRpcRequest>): Promise<IJsonRpcResponseSuccess | IJsonRpcResponseError>; | ||
setEngine(engine: IWeb3Provider): void; | ||
@@ -10,0 +10,0 @@ } |
{ | ||
"name": "@walletconnect/web3-subprovider", | ||
"version": "1.0.0-beta.3", | ||
"version": "1.0.0-beta.4", | ||
"description": "Web3 Subprovider for WalletConnect", | ||
@@ -56,7 +56,7 @@ "scripts": { | ||
"dependencies": { | ||
"@walletconnect/browser": "^1.0.0-beta.3", | ||
"@walletconnect/types": "^1.0.0-beta.2", | ||
"@walletconnect/utils": "^1.0.0-beta.3" | ||
"@walletconnect/browser": "^1.0.0-beta.4", | ||
"@walletconnect/types": "^1.0.0-beta.4", | ||
"@walletconnect/utils": "^1.0.0-beta.4" | ||
}, | ||
"gitHead": "165f7993c2acc907c653c02847fb02721052c6e7" | ||
} |
import { payloadId, promisify } from '@walletconnect/utils' | ||
import { | ||
IJsonRpcRequest, | ||
IJsonRpcResponse, | ||
IJsonRpcResponseSuccess, | ||
IJsonRpcResponseError, | ||
IWeb3Provider, | ||
@@ -28,3 +29,3 @@ ICallback, | ||
public abstract async handleRequest( | ||
public abstract async handleRequest ( | ||
payload: IJsonRpcRequest, | ||
@@ -37,3 +38,3 @@ next: ICallback, | ||
payload: Partial<IJsonRpcRequest> | ||
): Promise<IJsonRpcResponse> { | ||
): Promise<IJsonRpcResponseSuccess | IJsonRpcResponseError> { | ||
const finalPayload = Subprovider._createFinalPayload(payload) | ||
@@ -40,0 +41,0 @@ const response = await promisify(this.engine.sendAsync, this.engine)( |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
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
486853
780