@onekeyfe/hd-core 0.3.25 → 0.3.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"BTCSignMessage.d.ts","sourceRoot":"","sources":["../../../src/api/btc/BTCSignMessage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAGrD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAK3C,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,UAAU,CAAC,WAAW,CAAC;IACjE,IAAI;IAwBE,GAAG;CAOV"}
1
+ {"version":3,"file":"BTCSignMessage.d.ts","sourceRoot":"","sources":["../../../src/api/btc/BTCSignMessage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAGrD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAK3C,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,UAAU,CAAC,WAAW,CAAC;IACjE,IAAI;IA0BE,GAAG;CAOV"}
package/dist/index.d.ts CHANGED
@@ -600,6 +600,7 @@ declare type BTCSignMessageParams = {
600
600
  path: string | number[];
601
601
  messageHex: string;
602
602
  coin?: string;
603
+ noScriptType?: boolean;
603
604
  };
604
605
  declare function btcSignMessage(connectId: string, deviceId: string, params: CommonParams & BTCSignMessageParams): Response<MessageSignature>;
605
606
 
package/dist/index.js CHANGED
@@ -26264,15 +26264,17 @@ class BTCSignMessage extends BaseMethod {
26264
26264
  { name: 'path', required: true },
26265
26265
  { name: 'messageHex', type: 'hexString', required: true },
26266
26266
  { name: 'coin', type: 'string' },
26267
+ { name: 'noScriptType', type: 'boolean' },
26267
26268
  ]);
26268
- const { path, messageHex, coin } = this.payload;
26269
+ const { path, messageHex, coin, noScriptType } = this.payload;
26269
26270
  const addressN = validatePath(path);
26270
26271
  const { coinName, scriptType } = getCoinAndScriptType(addressN, coin, false);
26271
26272
  this.params = {
26272
26273
  address_n: addressN,
26273
26274
  message: formatAnyHex(messageHex),
26274
26275
  coin_name: coinName,
26275
- script_type: scriptType,
26276
+ script_type: noScriptType ? undefined : scriptType,
26277
+ no_script_type: noScriptType,
26276
26278
  };
26277
26279
  }
26278
26280
  run() {
@@ -4,6 +4,7 @@ export declare type BTCSignMessageParams = {
4
4
  path: string | number[];
5
5
  messageHex: string;
6
6
  coin?: string;
7
+ noScriptType?: boolean;
7
8
  };
8
9
  export declare function btcSignMessage(connectId: string, deviceId: string, params: CommonParams & BTCSignMessageParams): Response<MessageSignature>;
9
10
  //# sourceMappingURL=btcSignMessage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"btcSignMessage.d.ts","sourceRoot":"","sources":["../../../src/types/api/btcSignMessage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAExD,oBAAY,oBAAoB,GAAG;IACjC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,cAAc,CACpC,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,YAAY,GAAG,oBAAoB,GAC1C,QAAQ,CAAC,gBAAgB,CAAC,CAAC"}
1
+ {"version":3,"file":"btcSignMessage.d.ts","sourceRoot":"","sources":["../../../src/types/api/btcSignMessage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAExD,oBAAY,oBAAoB,GAAG;IACjC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,cAAc,CACpC,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,YAAY,GAAG,oBAAoB,GAC1C,QAAQ,CAAC,gBAAgB,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onekeyfe/hd-core",
3
- "version": "0.3.25",
3
+ "version": "0.3.27",
4
4
  "description": "> TODO: description",
5
5
  "author": "OneKey",
6
6
  "homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
@@ -25,8 +25,8 @@
25
25
  "url": "https://github.com/OneKeyHQ/hardware-js-sdk/issues"
26
26
  },
27
27
  "dependencies": {
28
- "@onekeyfe/hd-shared": "^0.3.25",
29
- "@onekeyfe/hd-transport": "^0.3.25",
28
+ "@onekeyfe/hd-shared": "^0.3.27",
29
+ "@onekeyfe/hd-transport": "^0.3.27",
30
30
  "axios": "^0.27.2",
31
31
  "bignumber.js": "^9.0.2",
32
32
  "bytebuffer": "^5.0.1",
@@ -44,5 +44,5 @@
44
44
  "@types/semver": "^7.3.9",
45
45
  "ripple-keypairs": "^1.1.4"
46
46
  },
47
- "gitHead": "2d4fe6dd208db8a3fe1eb0fc35c1a916e2236590"
47
+ "gitHead": "728279dc70c5bde56c5d72d86598815f977b0c7f"
48
48
  }
@@ -15,9 +15,10 @@ export default class BTCSignMessage extends BaseMethod<SignMessage> {
15
15
  { name: 'path', required: true },
16
16
  { name: 'messageHex', type: 'hexString', required: true },
17
17
  { name: 'coin', type: 'string' },
18
+ { name: 'noScriptType', type: 'boolean' },
18
19
  ]);
19
20
 
20
- const { path, messageHex, coin } = this.payload;
21
+ const { path, messageHex, coin, noScriptType } = this.payload;
21
22
 
22
23
  const addressN = validatePath(path);
23
24
 
@@ -27,7 +28,8 @@ export default class BTCSignMessage extends BaseMethod<SignMessage> {
27
28
  address_n: addressN,
28
29
  message: formatAnyHex(messageHex),
29
30
  coin_name: coinName,
30
- script_type: scriptType,
31
+ script_type: noScriptType ? undefined : scriptType,
32
+ no_script_type: noScriptType,
31
33
  };
32
34
  }
33
35
 
@@ -5,10 +5,11 @@ export type BTCSignMessageParams = {
5
5
  path: string | number[];
6
6
  messageHex: string;
7
7
  coin?: string;
8
+ noScriptType?: boolean;
8
9
  };
9
10
 
10
11
  export declare function btcSignMessage(
11
12
  connectId: string,
12
13
  deviceId: string,
13
- params: CommonParams & BTCSignMessageParams
14
+ params: CommonParams & BTCSignMessageParams,
14
15
  ): Response<MessageSignature>;