Merge branch 'release/1.2.4'

This commit is contained in:
Pavel Ševčík
2022-03-11 12:02:38 +01:00
6 changed files with 11 additions and 8 deletions

View File

@@ -3,10 +3,10 @@ root = true
[*]
charset = utf-8
end_of_line = lf
[{*.js, *.ts}]
trim_trailing_whitespace = true
insert_final_newline = true
[{*.js, *.ts}]
max_line_length = 160
indent_size = 4
indent_style = space

View File

@@ -1,5 +1,8 @@
# Changelog
## 1.2.4 (2022-03-11)
- Fixed type of protocol version in config
## 1.2.3 (2022-03-02)
- Removed faulty parameter from `blockchain.headers.subscribe` call

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "@samouraiwallet/electrum-client",
"version": "1.2.3",
"version": "1.2.4",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@samouraiwallet/electrum-client",
"version": "1.2.3",
"version": "1.2.4",
"license": "LGPL-3.0",
"devDependencies": {
"@types/mocha": "^9.1.0",

View File

@@ -1,6 +1,6 @@
{
"name": "@samouraiwallet/electrum-client",
"version": "1.2.3",
"version": "1.2.4",
"engines": {
"node": ">=14.0.0"
},

View File

@@ -50,7 +50,7 @@ export class ElectrumClient extends Client {
await this.connect()
this.versionInfo = (await this.server_version(this.electrumConfig?.client ?? '', this.electrumConfig?.version ?? ['', ''])) as [string, string]
this.versionInfo = (await this.server_version(electrumConfig.client, electrumConfig.version)) as [string, string]
if (this.onConnectCallback != null) {
this.onConnectCallback(this, this.versionInfo)
@@ -160,7 +160,7 @@ export class ElectrumClient extends Client {
}
// ElectrumX API
server_version(client_name: string, protocol_version: string[]) {
server_version(client_name: string, protocol_version: string | [string, string]) {
return this.request('server.version', [client_name, protocol_version])
}

View File

@@ -18,7 +18,7 @@ export type PersistencePolicy = {
export type ElectrumConfig = {
client: string;
version: string[];
version: string | [string, string];
}
export type ElectrumRequestParams = Array<number | string | boolean | Array<any>>;