mirror of
https://github.com/alexgo-io/electrum-client.git
synced 2026-01-12 16:53:05 +08:00
Merge branch 'release/1.2.4'
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
4
package-lock.json
generated
@@ -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",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@samouraiwallet/electrum-client",
|
||||
"version": "1.2.3",
|
||||
"version": "1.2.4",
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
},
|
||||
|
||||
@@ -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])
|
||||
}
|
||||
|
||||
|
||||
@@ -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>>;
|
||||
|
||||
Reference in New Issue
Block a user