@portal-hq/provider
Advanced tools
Comparing version 0.2.7 to 0.2.8
@@ -74,2 +74,3 @@ "use strict"; | ||
this.signer = new signers_1.HttpSigner({ | ||
keychain: this.keychain, | ||
portal: this.portal, | ||
@@ -76,0 +77,0 @@ }); |
@@ -12,3 +12,2 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const keychain_1 = require("@portal-hq/keychain"); | ||
const utils_1 = require("@portal-hq/utils"); | ||
@@ -23,3 +22,3 @@ class HttpSigner { | ||
} | ||
this.keychain = new keychain_1.Keychain(); | ||
this.keychain = opts.keychain; | ||
this.portal = opts.portal; | ||
@@ -30,3 +29,2 @@ } | ||
const address = yield this.keychain.getAddress(); | ||
const arrayMethods = ['personal_sign']; | ||
const { chainId, method, params } = message; | ||
@@ -33,0 +31,0 @@ switch (method) { |
@@ -72,2 +72,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
this.signer = new HttpSigner({ | ||
keychain: this.keychain, | ||
portal: this.portal, | ||
@@ -74,0 +75,0 @@ }); |
@@ -10,3 +10,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
}; | ||
import { HttpRequest } from '@portal-hq/utils'; | ||
import { HttpRequest, } from '@portal-hq/utils'; | ||
class HttpRequester { | ||
@@ -13,0 +13,0 @@ constructor({ baseUrl }) { |
@@ -10,3 +10,2 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
}; | ||
import { Keychain } from '@portal-hq/keychain'; | ||
import { MissingOptionError } from '@portal-hq/utils'; | ||
@@ -21,3 +20,3 @@ class HttpSigner { | ||
} | ||
this.keychain = new Keychain(); | ||
this.keychain = opts.keychain; | ||
this.portal = opts.portal; | ||
@@ -28,3 +27,2 @@ } | ||
const address = yield this.keychain.getAddress(); | ||
const arrayMethods = ['personal_sign']; | ||
const { chainId, method, params } = message; | ||
@@ -31,0 +29,0 @@ switch (method) { |
{ | ||
"name": "@portal-hq/provider", | ||
"version": "0.2.7", | ||
"version": "0.2.8", | ||
"license": "MIT", | ||
@@ -20,3 +20,3 @@ "main": "lib/commonjs/index", | ||
"dependencies": { | ||
"@portal-hq/utils": "^0.2.7" | ||
"@portal-hq/utils": "^0.2.8" | ||
}, | ||
@@ -23,0 +23,0 @@ "devDependencies": { |
@@ -111,2 +111,3 @@ import { | ||
this.signer = new HttpSigner({ | ||
keychain: this.keychain, | ||
portal: this.portal, | ||
@@ -113,0 +114,0 @@ }) |
@@ -1,7 +0,7 @@ | ||
import { HttpRequest } from '@portal-hq/utils' | ||
import { | ||
HttpRequest, | ||
type HttpRequestOptions, | ||
type HttpOptions, | ||
type HttpRequesterOptions, | ||
} from '@portal-hq/utils/types' | ||
} from '@portal-hq/utils' | ||
@@ -8,0 +8,0 @@ class HttpRequester { |
@@ -1,3 +0,2 @@ | ||
import { Keychain } from '@portal-hq/keychain' | ||
import { MissingOptionError } from '@portal-hq/utils' | ||
import { KeychainAdapter, MissingOptionError } from '@portal-hq/utils' | ||
@@ -16,3 +15,3 @@ import { | ||
private portal: HttpRequester | ||
private keychain: Keychain | ||
private keychain: KeychainAdapter | ||
@@ -27,3 +26,3 @@ constructor(opts: HttpSignerOptions) { | ||
this.keychain = new Keychain() | ||
this.keychain = opts.keychain | ||
this.portal = opts.portal | ||
@@ -37,3 +36,2 @@ } | ||
const address = await this.keychain.getAddress() | ||
const arrayMethods = ['personal_sign'] | ||
const { chainId, method, params } = message | ||
@@ -40,0 +38,0 @@ |
@@ -22,2 +22,3 @@ // Types | ||
export interface HttpSignerOptions extends SignerOptions { | ||
keychain: KeychainAdapter | ||
portal: HttpRequester | ||
@@ -24,0 +25,0 @@ } |
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
71655
1927
Updated@portal-hq/utils@^0.2.8