@onekeyfe/hd-core 1.0.12 → 1.0.14

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.
Files changed (88) hide show
  1. package/dist/api/alephium/AlephiumGetAddress.d.ts.map +1 -1
  2. package/dist/api/allnetwork/AllNetworkGetAddress.d.ts.map +1 -1
  3. package/dist/api/aptos/AptosGetAddress.d.ts.map +1 -1
  4. package/dist/api/aptos/AptosGetPublicKey.d.ts +2 -7
  5. package/dist/api/aptos/AptosGetPublicKey.d.ts.map +1 -1
  6. package/dist/api/cosmos/CosmosGetPublicKey.d.ts +2 -7
  7. package/dist/api/cosmos/CosmosGetPublicKey.d.ts.map +1 -1
  8. package/dist/api/evm/EVMGetPublicKey.d.ts +2 -1
  9. package/dist/api/evm/EVMGetPublicKey.d.ts.map +1 -1
  10. package/dist/api/lightning/LnurlAuth.d.ts +6 -1
  11. package/dist/api/lightning/LnurlAuth.d.ts.map +1 -1
  12. package/dist/api/nostr/NostrGetPublicKey.d.ts.map +1 -1
  13. package/dist/api/polkadot/PolkadotGetAddress.d.ts.map +1 -1
  14. package/dist/api/sui/SuiGetAddress.d.ts.map +1 -1
  15. package/dist/api/sui/SuiGetPublicKey.d.ts +2 -7
  16. package/dist/api/sui/SuiGetPublicKey.d.ts.map +1 -1
  17. package/dist/api/ton/TonGetAddress.d.ts.map +1 -1
  18. package/dist/api/xrp/XrpGetAddress.d.ts +5 -1
  19. package/dist/api/xrp/XrpGetAddress.d.ts.map +1 -1
  20. package/dist/constants/ui-request.d.ts +1 -0
  21. package/dist/constants/ui-request.d.ts.map +1 -1
  22. package/dist/core/index.d.ts.map +1 -1
  23. package/dist/device/Device.d.ts.map +1 -1
  24. package/dist/events/ui-request.d.ts +8 -1
  25. package/dist/events/ui-request.d.ts.map +1 -1
  26. package/dist/index.d.ts +39 -13
  27. package/dist/index.js +179 -94
  28. package/dist/types/api/alephiumGetAddress.d.ts +1 -0
  29. package/dist/types/api/alephiumGetAddress.d.ts.map +1 -1
  30. package/dist/types/api/allNetworkGetAddress.d.ts +10 -3
  31. package/dist/types/api/allNetworkGetAddress.d.ts.map +1 -1
  32. package/dist/types/api/aptosGetAddress.d.ts +1 -0
  33. package/dist/types/api/aptosGetAddress.d.ts.map +1 -1
  34. package/dist/types/api/aptosGetPublicKey.d.ts +2 -1
  35. package/dist/types/api/aptosGetPublicKey.d.ts.map +1 -1
  36. package/dist/types/api/cardanoGetPublicKey.d.ts +1 -1
  37. package/dist/types/api/cardanoGetPublicKey.d.ts.map +1 -1
  38. package/dist/types/api/cosmosGetPublicKey.d.ts +2 -1
  39. package/dist/types/api/cosmosGetPublicKey.d.ts.map +1 -1
  40. package/dist/types/api/evmGetPublicKey.d.ts +2 -1
  41. package/dist/types/api/evmGetPublicKey.d.ts.map +1 -1
  42. package/dist/types/api/lnurlAuth.d.ts +1 -0
  43. package/dist/types/api/lnurlAuth.d.ts.map +1 -1
  44. package/dist/types/api/nostrGetPublicKey.d.ts +2 -1
  45. package/dist/types/api/nostrGetPublicKey.d.ts.map +1 -1
  46. package/dist/types/api/polkadotGetAddress.d.ts +2 -1
  47. package/dist/types/api/polkadotGetAddress.d.ts.map +1 -1
  48. package/dist/types/api/suiGetAddress.d.ts +1 -0
  49. package/dist/types/api/suiGetAddress.d.ts.map +1 -1
  50. package/dist/types/api/suiGetPublicKey.d.ts +2 -1
  51. package/dist/types/api/suiGetPublicKey.d.ts.map +1 -1
  52. package/dist/types/api/tonGetAddress.d.ts +2 -1
  53. package/dist/types/api/tonGetAddress.d.ts.map +1 -1
  54. package/dist/types/api/xrpGetAddress.d.ts +1 -0
  55. package/dist/types/api/xrpGetAddress.d.ts.map +1 -1
  56. package/package.json +4 -4
  57. package/src/api/alephium/AlephiumGetAddress.ts +2 -1
  58. package/src/api/allnetwork/AllNetworkGetAddress.ts +52 -32
  59. package/src/api/aptos/AptosGetAddress.ts +63 -38
  60. package/src/api/aptos/AptosGetPublicKey.ts +9 -6
  61. package/src/api/cardano/CardanoGetPublicKey.ts +2 -2
  62. package/src/api/cosmos/CosmosGetPublicKey.ts +9 -6
  63. package/src/api/evm/EVMGetPublicKey.ts +4 -2
  64. package/src/api/lightning/LnurlAuth.ts +4 -1
  65. package/src/api/nostr/NostrGetPublicKey.ts +3 -1
  66. package/src/api/polkadot/PolkadotGetAddress.ts +2 -1
  67. package/src/api/sui/SuiGetAddress.ts +58 -38
  68. package/src/api/sui/SuiGetPublicKey.ts +9 -6
  69. package/src/api/ton/TonGetAddress.ts +2 -1
  70. package/src/api/xrp/XrpGetAddress.ts +2 -1
  71. package/src/constants/ui-request.ts +1 -0
  72. package/src/core/index.ts +8 -18
  73. package/src/device/Device.ts +15 -0
  74. package/src/events/ui-request.ts +9 -0
  75. package/src/types/api/alephiumGetAddress.ts +4 -0
  76. package/src/types/api/allNetworkGetAddress.ts +16 -3
  77. package/src/types/api/aptosGetAddress.ts +4 -0
  78. package/src/types/api/aptosGetPublicKey.ts +5 -1
  79. package/src/types/api/cardanoGetPublicKey.ts +1 -1
  80. package/src/types/api/cosmosGetPublicKey.ts +5 -1
  81. package/src/types/api/evmGetPublicKey.ts +5 -1
  82. package/src/types/api/lnurlAuth.ts +4 -0
  83. package/src/types/api/nostrGetPublicKey.ts +5 -1
  84. package/src/types/api/polkadotGetAddress.ts +5 -1
  85. package/src/types/api/suiGetAddress.ts +4 -0
  86. package/src/types/api/suiGetPublicKey.ts +5 -1
  87. package/src/types/api/tonGetAddress.ts +5 -1
  88. package/src/types/api/xrpGetAddress.ts +4 -0
@@ -20,9 +20,9 @@ export default class SuiGetAddress extends BaseMethod<HardwareSuiGetAddress[]> {
20
20
  this.hasBundle = !!this.payload?.bundle;
21
21
  const payload = this.hasBundle ? this.payload : { bundle: [this.payload] };
22
22
 
23
- this.shouldConfirm = this.hasBundle
24
- ? this.payload.bundle.some((i: any) => !!i.showOnOneKey)
25
- : false;
23
+ this.shouldConfirm =
24
+ this.payload.showOnOneKey ||
25
+ this.payload.bundle?.some((i: SuiGetAddressParams) => !!i.showOnOneKey);
26
26
 
27
27
  // check payload
28
28
  validateParams(payload, [{ name: 'bundle', type: 'array' }]);
@@ -58,46 +58,66 @@ export default class SuiGetAddress extends BaseMethod<HardwareSuiGetAddress[]> {
58
58
  }
59
59
 
60
60
  async run() {
61
- if (this.hasBundle && supportBatchPublicKey(this.device?.features) && !this.shouldConfirm) {
62
- const res = await this.device.commands.typedCall('BatchGetPublickeys', 'EcdsaPublicKeys', {
63
- paths: this.params,
64
- ecdsa_curve_name: 'ed25519',
65
- });
66
- const result = res.message.public_keys.map((publicKey: string, index: number) => ({
67
- path: serializedPath((this.params as unknown as any[])[index].address_n),
68
- publicKey,
69
- address: publicKeyToAddress(publicKey),
70
- }));
71
-
72
- validateResult(result, ['address'], {
73
- expectedLength: this.params.length,
74
- });
75
-
76
- return Promise.resolve(result);
77
- }
78
-
79
- const responses: SuiAddress[] = [];
80
- for (let i = 0; i < this.params.length; i++) {
81
- const param = this.params[i];
82
-
83
- const res = await this.device.commands.typedCall('SuiGetAddress', 'SuiAddress', {
84
- ...param,
85
- });
86
-
87
- const { address } = res.message;
88
-
89
- const result = {
90
- path: serializedPath(param.address_n),
91
- address: address?.toLowerCase(),
92
- };
93
- responses.push(result);
94
- this.postPreviousAddressMessage(result);
61
+ const supportsBatchPublicKey = supportBatchPublicKey(this.device?.features);
62
+ let responses: SuiAddress[] = [];
63
+ if (supportsBatchPublicKey) {
64
+ const publicKeyRes = await this.device.commands.typedCall(
65
+ 'BatchGetPublickeys',
66
+ 'EcdsaPublicKeys',
67
+ {
68
+ paths: this.params,
69
+ ecdsa_curve_name: 'ed25519',
70
+ }
71
+ );
72
+ for (let i = 0; i < this.params.length; i++) {
73
+ const param = this.params[i];
74
+ const publicKey = publicKeyRes.message.public_keys[i];
75
+ let address: string;
76
+
77
+ if (this.shouldConfirm) {
78
+ const addressRes = await this.device.commands.typedCall(
79
+ 'SuiGetAddress',
80
+ 'SuiAddress',
81
+ param
82
+ );
83
+ address = addressRes.message.address?.toLowerCase() ?? '';
84
+ } else {
85
+ address = publicKeyToAddress(publicKey);
86
+ }
87
+
88
+ const result: SuiAddress = {
89
+ path: serializedPath(param.address_n),
90
+ address,
91
+ publicKey,
92
+ pub: publicKey,
93
+ };
94
+
95
+ if (this.shouldConfirm) {
96
+ this.postPreviousAddressMessage(result);
97
+ }
98
+
99
+ responses.push(result);
100
+ }
101
+ } else {
102
+ responses = await Promise.all(
103
+ this.params.map(async param => {
104
+ const res = await this.device.commands.typedCall('SuiGetAddress', 'SuiAddress', param);
105
+ const result = {
106
+ path: serializedPath(param.address_n),
107
+ address: res.message.address?.toLowerCase() ?? '',
108
+ };
109
+ if (this.shouldConfirm) {
110
+ this.postPreviousAddressMessage(result);
111
+ }
112
+ return result;
113
+ })
114
+ );
95
115
  }
96
116
 
97
117
  validateResult(responses, ['address'], {
98
118
  expectedLength: this.params.length,
99
119
  });
100
120
 
101
- return Promise.resolve(this.hasBundle ? responses : responses[0]);
121
+ return this.hasBundle ? responses : responses[0];
102
122
  }
103
123
  }
@@ -2,7 +2,7 @@ import { UI_REQUEST } from '../../constants/ui-request';
2
2
  import { serializedPath, validatePath } from '../helpers/pathUtils';
3
3
  import { BaseMethod } from '../BaseMethod';
4
4
  import { validateParams, validateResult } from '../helpers/paramsValidator';
5
- import { SuiGetAddressParams } from '../../types';
5
+ import { SuiGetAddressParams, SuiPublicKey } from '../../types';
6
6
 
7
7
  export default class SuiGetPublicKey extends BaseMethod<any> {
8
8
  hasBundle = false;
@@ -53,12 +53,15 @@ export default class SuiGetPublicKey extends BaseMethod<any> {
53
53
  ecdsa_curve_name: 'ed25519',
54
54
  });
55
55
 
56
- const responses = res.message.public_keys.map((publicKey: string, index: number) => ({
57
- path: serializedPath((this.params as unknown as any[])[index].address_n),
58
- publicKey,
59
- }));
56
+ const responses: SuiPublicKey[] = res.message.public_keys.map(
57
+ (publicKey: string, index: number) => ({
58
+ path: serializedPath((this.params as unknown as any[])[index].address_n),
59
+ publicKey,
60
+ pub: publicKey,
61
+ })
62
+ );
60
63
 
61
- validateResult(responses, ['publicKey'], {
64
+ validateResult(responses, ['pub'], {
62
65
  expectedLength: this.params.length,
63
66
  });
64
67
 
@@ -76,13 +76,14 @@ export default class TonGetAddress extends BaseMethod<HardwareTonGetAddress[]> {
76
76
  const result = {
77
77
  path: serializedPath(param.address_n),
78
78
  publicKey: public_key,
79
+ pub: public_key,
79
80
  address,
80
81
  };
81
82
  responses.push(result);
82
83
  this.postPreviousAddressMessage(result);
83
84
  }
84
85
 
85
- validateResult(responses, ['address', 'publicKey'], {
86
+ validateResult(responses, ['address', 'pub'], {
86
87
  expectedLength: this.params.length,
87
88
  });
88
89
 
@@ -97,6 +97,7 @@ export default class XrpGetAddress extends BaseMethod<
97
97
  path,
98
98
  address,
99
99
  publicKey: publicKey.message?.public_keys?.[0],
100
+ pub: publicKey.message?.public_keys?.[0],
100
101
  });
101
102
 
102
103
  this.postPreviousAddressMessage({
@@ -105,7 +106,7 @@ export default class XrpGetAddress extends BaseMethod<
105
106
  });
106
107
  }
107
108
 
108
- validateResult(responses, ['address', 'publicKey'], {
109
+ validateResult(responses, ['address', 'pub'], {
109
110
  expectedLength: this.params.length,
110
111
  });
111
112
 
@@ -13,4 +13,5 @@ export const UI_REQUEST = {
13
13
  FIRMWARE_TIP: 'ui-firmware-tip',
14
14
 
15
15
  PREVIOUS_ADDRESS_RESULT: 'ui-previous_address_result',
16
+ DEVICE_PROGRESS: 'ui-device_progress',
16
17
  } as const;
package/src/core/index.ts CHANGED
@@ -3,6 +3,10 @@ import EventEmitter from 'events';
3
3
  import { Features, LowlevelTransportSharedPlugin, OneKeyDeviceInfo } from '@onekeyfe/hd-transport';
4
4
  import {
5
5
  createDeferred,
6
+ createDeprecatedHardwareError,
7
+ createNeedUpgradeFirmwareHardwareError,
8
+ createNewFirmwareForceUpdateHardwareError,
9
+ createNewFirmwareUnReleaseHardwareError,
6
10
  Deferred,
7
11
  ERRORS,
8
12
  HardwareError,
@@ -175,26 +179,18 @@ export const callAPI = async (message: CoreMessage) => {
175
179
  (newVersionStatus === 'required' || bleVersionStatus === 'required') &&
176
180
  method.skipForceUpdateCheck === false
177
181
  ) {
178
- throw ERRORS.TypedError(
179
- HardwareErrorCode.NewFirmwareForceUpdate,
180
- 'Device firmware version is too low, please update to the latest version',
181
- { connectId: method.connectId, deviceId: method.deviceId }
182
- );
182
+ throw createNewFirmwareForceUpdateHardwareError(method.connectId, method.deviceId);
183
183
  }
184
184
 
185
185
  if (versionRange) {
186
186
  const currentVersion = getDeviceFirmwareVersion(device.features).join('.');
187
187
  if (semver.valid(versionRange.min) && semver.lt(currentVersion, versionRange.min)) {
188
188
  if (newVersionStatus === 'none' || newVersionStatus === 'valid') {
189
- throw ERRORS.TypedError(HardwareErrorCode.NewFirmwareUnRelease);
189
+ throw createNewFirmwareUnReleaseHardwareError(currentVersion, versionRange.min);
190
190
  }
191
191
 
192
192
  return Promise.reject(
193
- ERRORS.TypedError(
194
- HardwareErrorCode.CallMethodNeedUpgradeFirmware,
195
- `Device firmware version is too low, please update to ${versionRange.min}`,
196
- { current: currentVersion, require: versionRange.min }
197
- )
193
+ createNeedUpgradeFirmwareHardwareError(currentVersion, versionRange.min)
198
194
  );
199
195
  }
200
196
  if (
@@ -202,13 +198,7 @@ export const callAPI = async (message: CoreMessage) => {
202
198
  semver.valid(versionRange.max) &&
203
199
  semver.gte(currentVersion, versionRange.max)
204
200
  ) {
205
- return Promise.reject(
206
- ERRORS.TypedError(
207
- HardwareErrorCode.CallMethodDeprecated,
208
- `Device firmware version is too high, this method has been deprecated in ${versionRange.max}`,
209
- { current: currentVersion, deprecated: versionRange.max }
210
- )
211
- );
201
+ return Promise.reject(createDeprecatedHardwareError(currentVersion, versionRange.max));
212
202
  }
213
203
  }
214
204
  }
@@ -492,6 +492,21 @@ export class Device extends EventEmitter {
492
492
  this.runPromise.reject(e);
493
493
  }
494
494
 
495
+ if (
496
+ e instanceof HardwareError &&
497
+ (e.errorCode === HardwareErrorCode.DeviceInitializeFailed ||
498
+ e.errorCode === HardwareErrorCode.DeviceInterruptedFromOutside ||
499
+ e.errorCode === HardwareErrorCode.DeviceInterruptedFromUser ||
500
+ e.errorCode === HardwareErrorCode.DeviceCheckPassphraseStateError ||
501
+ e.errorCode === HardwareErrorCode.ResponseUnexpectTypeError ||
502
+ e.errorCode === HardwareErrorCode.PinInvalid ||
503
+ e.errorCode === HardwareErrorCode.PinCancelled ||
504
+ e.errorCode === HardwareErrorCode.UnexpectPassphrase)
505
+ ) {
506
+ await this.release();
507
+ Log.debug(`error code ${e.errorCode} release device, mainId: ${this.mainId}`);
508
+ }
509
+
495
510
  this.runPromise = null;
496
511
  return;
497
512
  }
@@ -13,6 +13,7 @@ export const UI_REQUEST = {
13
13
  REQUEST_PASSPHRASE_ON_DEVICE: 'ui-request_passphrase_on_device',
14
14
 
15
15
  CLOSE_UI_WINDOW: 'ui-close_window',
16
+ DEVICE_PROGRESS: 'ui-device_progress',
16
17
 
17
18
  BLUETOOTH_PERMISSION: 'ui-bluetooth_permission',
18
19
  BLUETOOTH_CHARACTERISTIC_NOTIFY_CHANGE_FAILURE:
@@ -81,6 +82,13 @@ export interface FirmwareTip {
81
82
  };
82
83
  }
83
84
 
85
+ export interface DeviceProgress {
86
+ type: typeof UI_REQUEST.DEVICE_PROGRESS;
87
+ payload: {
88
+ progress?: number;
89
+ };
90
+ }
91
+
84
92
  export interface PreviousAddressResult {
85
93
  type: typeof UI_REQUEST.PREVIOUS_ADDRESS_RESULT;
86
94
  payload: {
@@ -100,6 +108,7 @@ export type UiEvent =
100
108
  | UiRequestPassphrase
101
109
  | FirmwareProgress
102
110
  | FirmwareTip
111
+ | DeviceProgress
103
112
  | PreviousAddressResult;
104
113
 
105
114
  export type UiEventMessage = UiEvent & { event: typeof UI_EVENT };
@@ -2,7 +2,11 @@ import type { CommonParams, Response } from '../params';
2
2
 
3
3
  export type AlephiumAddress = {
4
4
  path: string;
5
+ /**
6
+ * @deprecated Use `pub` instead.
7
+ */
5
8
  publicKey?: string;
9
+ pub?: string;
6
10
  address: string;
7
11
  derivedPath: string;
8
12
  };
@@ -46,13 +46,19 @@ export type AllNetworkAddressParams = {
46
46
  chainName?: string;
47
47
  prefix?: string;
48
48
  showOnOneKey?: boolean;
49
+
50
+ includePublicKey?: boolean;
51
+ group?: string;
49
52
  };
50
53
 
51
54
  type AllNetworkAddressPayload =
52
55
  | {
53
56
  address: string;
54
- publicKey?: string;
55
57
  pub?: string;
58
+ /**
59
+ * @deprecated Use `pub` instead.
60
+ */
61
+ publicKey?: string;
56
62
  // Nostr public key (bech32)
57
63
  npub?: string;
58
64
  }
@@ -84,8 +90,15 @@ type AllNetworkAddressPayload =
84
90
 
85
91
  export type AllNetworkAddress = CommonResponseParams & {
86
92
  success: boolean;
87
- error?: string;
88
- payload?: AllNetworkAddressPayload;
93
+ payload?:
94
+ | AllNetworkAddressPayload
95
+ | {
96
+ error: string;
97
+ code: number;
98
+ connectId?: string;
99
+ deviceId?: string;
100
+ params: any;
101
+ };
89
102
  };
90
103
 
91
104
  export type AllNetworkGetAddressParams = {
@@ -3,6 +3,10 @@ import type { CommonParams, Response } from '../params';
3
3
 
4
4
  export type AptosAddress = {
5
5
  path: string;
6
+ pub?: string;
7
+ /**
8
+ * @deprecated Use `pub` instead.
9
+ */
6
10
  publicKey?: string;
7
11
  } & HardwareAptosAddress;
8
12
 
@@ -2,7 +2,11 @@ import type { CommonParams, Response } from '../params';
2
2
 
3
3
  export type AptosPublicKey = {
4
4
  path: string;
5
- publicKey: string;
5
+ pub: string;
6
+ /**
7
+ * @deprecated Use `pub` instead.
8
+ */
9
+ publicKey?: string;
6
10
  };
7
11
 
8
12
  export type AptosGetPublicKeyParams = {
@@ -4,7 +4,7 @@ import { PROTO } from '../../constants';
4
4
  export type CardanoPublicKey = {
5
5
  path: number[];
6
6
  serializedPath: string;
7
- publicKey: string;
7
+ xpub: string;
8
8
  node: PROTO.HDNodeType;
9
9
  };
10
10
 
@@ -2,7 +2,11 @@ import type { CommonParams, Response } from '../params';
2
2
 
3
3
  export type CosmosPublicKey = {
4
4
  path: string;
5
- publicKey: string;
5
+ pub: string;
6
+ /**
7
+ * @deprecated Use `pub` instead.
8
+ */
9
+ publicKey?: string;
6
10
  };
7
11
 
8
12
  export type CosmosGetPublicKeyParams = {
@@ -3,7 +3,11 @@ import type { CommonParams, Response } from '../params';
3
3
 
4
4
  export type EVMPublicKey = {
5
5
  path: string;
6
- publicKey: string;
6
+ pub: string;
7
+ /**
8
+ * @deprecated Use `pub` instead.
9
+ */
10
+ publicKey?: string;
7
11
  } & EthereumPublicKey;
8
12
 
9
13
  export type EVMGetPublicKeyParams = {
@@ -1,6 +1,10 @@
1
1
  import type { CommonParams, Response } from '../params';
2
2
 
3
3
  export interface LnurlAuth {
4
+ pub?: string;
5
+ /**
6
+ * @deprecated Use `pub` instead.
7
+ */
4
8
  publickey?: string;
5
9
  path?: string;
6
10
  signature?: string;
@@ -2,7 +2,11 @@ import type { CommonParams, Response } from '../params';
2
2
 
3
3
  export type NostrPublicKey = {
4
4
  npub?: string;
5
- publickey?: string;
5
+ pub?: string;
6
+ /**
7
+ * @deprecated Use `pub` instead.
8
+ */
9
+ publicKey?: string;
6
10
  path: string;
7
11
  };
8
12
 
@@ -3,7 +3,11 @@ import type { CommonParams, Response } from '../params';
3
3
 
4
4
  export type PolkadotAddress = {
5
5
  path: string;
6
- publicKey: string;
6
+ pub: string;
7
+ /**
8
+ * @deprecated Use `pub` instead.
9
+ */
10
+ publicKey?: string;
7
11
  } & HardwarePolkadotAddress;
8
12
 
9
13
  export type PolkadotGetAddressParams = {
@@ -3,6 +3,10 @@ import type { CommonParams, Response } from '../params';
3
3
 
4
4
  export type SuiAddress = {
5
5
  path: string;
6
+ pub?: string;
7
+ /**
8
+ * @deprecated Use `pub` instead.
9
+ */
6
10
  publicKey?: string;
7
11
  } & HardwareSuiAddress;
8
12
 
@@ -2,7 +2,11 @@ import type { CommonParams, Response } from '../params';
2
2
 
3
3
  export type SuiPublicKey = {
4
4
  path: string;
5
- publicKey: string;
5
+ pub: string;
6
+ /**
7
+ * @deprecated Use `pub` instead.
8
+ */
9
+ publicKey?: string;
6
10
  };
7
11
 
8
12
  export type SuiGetPublicKeyParams = {
@@ -3,7 +3,11 @@ import type { CommonParams, Response } from '../params';
3
3
 
4
4
  export type TonAddress = {
5
5
  path: string;
6
- publicKey: string;
6
+ pub: string;
7
+ /**
8
+ * @deprecated Use `pub` instead.
9
+ */
10
+ publicKey?: string;
7
11
  address: string;
8
12
  };
9
13
 
@@ -2,6 +2,10 @@ import type { CommonParams, Response } from '../params';
2
2
 
3
3
  export type XrpAddress = {
4
4
  path: string;
5
+ pub?: string;
6
+ /**
7
+ * @deprecated Use `pub` instead.
8
+ */
5
9
  publicKey?: string;
6
10
  address: string;
7
11
  };