@trezor/connect 9.0.4 → 9.0.5

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 (110) hide show
  1. package/CHANGELOG.md +67 -0
  2. package/README.md +1 -1
  3. package/lib/api/binanceGetAddress.d.ts +1 -1
  4. package/lib/api/binanceSignTransaction.d.ts +1 -1
  5. package/lib/api/bitcoin/Fees.d.ts +1 -1
  6. package/lib/api/bitcoin/TransactionComposer.d.ts +1 -1
  7. package/lib/api/bitcoin/signtxVerify.d.ts +1 -1
  8. package/lib/api/blockchainDisconnect.d.ts +1 -1
  9. package/lib/api/blockchainEstimateFee.d.ts +1 -1
  10. package/lib/api/blockchainGetAccountBalanceHistory.d.ts +1 -1
  11. package/lib/api/blockchainGetCurrentFiatRates.d.ts +1 -1
  12. package/lib/api/blockchainGetFiatRatesForTimestamps.d.ts +1 -1
  13. package/lib/api/blockchainGetTransactions.d.ts +1 -1
  14. package/lib/api/blockchainSetCustomBackend.d.ts +1 -1
  15. package/lib/api/blockchainSubscribe.d.ts +1 -1
  16. package/lib/api/blockchainSubscribeFiatRates.d.ts +1 -1
  17. package/lib/api/blockchainUnsubscribe.d.ts +1 -1
  18. package/lib/api/blockchainUnsubscribeFiatRates.d.ts +1 -1
  19. package/lib/api/cardano/cardanoCertificate.d.ts +2 -2
  20. package/lib/api/cardano/cardanoInputs.d.ts +3 -3
  21. package/lib/api/cardano/cardanoOutputs.d.ts +1 -1
  22. package/lib/api/cardano/cardanoTokenBundle.d.ts +1 -1
  23. package/lib/api/cardanoGetAddress.d.ts +1 -1
  24. package/lib/api/cardanoSignTransaction.d.ts +1 -1
  25. package/lib/api/common/Discovery.d.ts +2 -2
  26. package/lib/api/common/paramsValidator.d.ts +2 -2
  27. package/lib/api/composeTransaction.d.ts +1 -1
  28. package/lib/api/eos/eosSignTx.js +1 -1
  29. package/lib/api/eosSignTransaction.d.ts +1 -1
  30. package/lib/api/ethereumGetAddress.d.ts +1 -1
  31. package/lib/api/ethereumGetPublicKey.d.ts +1 -1
  32. package/lib/api/ethereumSignTransaction.d.ts +1 -1
  33. package/lib/api/ethereumSignTypedData.d.ts +1 -1
  34. package/lib/api/firmware/uploadFirmware.d.ts +2 -2
  35. package/lib/api/firmwareUpdate.d.ts +1 -1
  36. package/lib/api/firmwareUpdate.js +1 -1
  37. package/lib/api/getAccountInfo.d.ts +1 -1
  38. package/lib/api/getAddress.d.ts +1 -1
  39. package/lib/api/getCoinInfo.d.ts +2 -2
  40. package/lib/api/getPublicKey.d.ts +1 -1
  41. package/lib/api/nemGetAddress.d.ts +1 -1
  42. package/lib/api/pushTransaction.d.ts +1 -1
  43. package/lib/api/rippleGetAddress.d.ts +1 -1
  44. package/lib/api/setBusy.js +5 -1
  45. package/lib/api/setProxy.js +3 -4
  46. package/lib/api/signTransaction.d.ts +1 -1
  47. package/lib/api/stellarGetAddress.d.ts +1 -1
  48. package/lib/api/stellarSignTransaction.d.ts +1 -1
  49. package/lib/api/tezosGetAddress.d.ts +1 -1
  50. package/lib/backend/BackendManager.d.ts +1 -1
  51. package/lib/backend/BackendManager.js +0 -4
  52. package/lib/backend/Blockchain.d.ts +3 -9
  53. package/lib/backend/Blockchain.js +2 -17
  54. package/lib/constants/network.d.ts +1 -1
  55. package/lib/core/AbstractMethod.d.ts +4 -4
  56. package/lib/core/AbstractMethod.js +7 -5
  57. package/lib/core/index.js +2 -0
  58. package/lib/data/DataManager.d.ts +1 -1
  59. package/lib/data/analyticsInfo.d.ts +6 -0
  60. package/lib/data/analyticsInfo.js +37 -0
  61. package/lib/data/version.d.ts +1 -1
  62. package/lib/data/version.js +1 -1
  63. package/lib/device/AbortController.d.ts +1 -1
  64. package/lib/device/DescriptorStream.d.ts +1 -1
  65. package/lib/device/Device.d.ts +1 -1
  66. package/lib/device/Device.js +3 -0
  67. package/lib/device/DeviceCommands.d.ts +7 -7
  68. package/lib/device/DeviceCommands.js +3 -1
  69. package/lib/device/DeviceList.d.ts +1 -1
  70. package/lib/events/blockchain.d.ts +4 -5
  71. package/lib/events/call.d.ts +10 -10
  72. package/lib/events/core.d.ts +3 -2
  73. package/lib/events/device.d.ts +3 -3
  74. package/lib/events/iframe.d.ts +2 -2
  75. package/lib/events/popup.d.ts +2 -2
  76. package/lib/events/transport.d.ts +3 -3
  77. package/lib/events/ui-promise.d.ts +2 -2
  78. package/lib/events/ui-request.d.ts +8 -6
  79. package/lib/events/ui-response.d.ts +2 -2
  80. package/lib/types/account.d.ts +2 -2
  81. package/lib/types/api/binance/index.d.ts +1 -1
  82. package/lib/types/api/bitcoin/index.d.ts +2 -2
  83. package/lib/types/api/blockchainGetTransactions.d.ts +1 -1
  84. package/lib/types/api/blockchainSetCustomBackend.d.ts +1 -1
  85. package/lib/types/api/blockchainSubscribe.d.ts +1 -1
  86. package/lib/types/api/blockchainSubscribeFiatRates.d.ts +1 -1
  87. package/lib/types/api/cardano/index.d.ts +2 -2
  88. package/lib/types/api/composeTransaction.d.ts +3 -3
  89. package/lib/types/api/eos/index.d.ts +1 -1
  90. package/lib/types/api/getAddress.d.ts +1 -1
  91. package/lib/types/api/nem/index.d.ts +9 -9
  92. package/lib/types/api/off.d.ts +2 -2
  93. package/lib/types/api/on.d.ts +2 -2
  94. package/lib/types/api/pushTransaction.d.ts +1 -1
  95. package/lib/types/api/setProxy.d.ts +1 -2
  96. package/lib/types/api/stellar/index.d.ts +2 -2
  97. package/lib/types/coinInfo.d.ts +3 -3
  98. package/lib/types/device.d.ts +13 -13
  99. package/lib/types/firmware.d.ts +3 -3
  100. package/lib/types/params.d.ts +3 -3
  101. package/lib/types/settings.d.ts +1 -2
  102. package/lib/types/utils.d.ts +2 -2
  103. package/lib/utils/accountUtils.d.ts +1 -1
  104. package/lib/utils/browserUtils.d.ts +2 -2
  105. package/lib/utils/debug.d.ts +1 -1
  106. package/lib/utils/deferred.d.ts +2 -2
  107. package/lib/utils/interactionTimeout.d.ts +1 -1
  108. package/lib/workers/RNUsbPlugin.d.ts +1 -1
  109. package/lib/workers/workers.d.ts +1 -1
  110. package/package.json +83 -80
@@ -67,7 +67,7 @@ export interface CardanoAssetGroup {
67
67
  policyId: string;
68
68
  tokenAmounts: CardanoToken[];
69
69
  }
70
- export declare type CardanoOutput = ({
70
+ export type CardanoOutput = ({
71
71
  addressParameters: CardanoAddressParameters;
72
72
  } | {
73
73
  address: string;
@@ -123,7 +123,7 @@ export interface CardanoWithdrawal {
123
123
  scriptHash?: string;
124
124
  keyHash?: string;
125
125
  }
126
- export declare type CardanoMint = CardanoAssetGroup[];
126
+ export type CardanoMint = CardanoAssetGroup[];
127
127
  export interface CardanoCollateralInput {
128
128
  path?: string | number[];
129
129
  prev_hash: string;
@@ -28,7 +28,7 @@ export interface NoAddressOutput {
28
28
  export interface NoAddressSendMaxOutput {
29
29
  type: 'send-max-noaddress';
30
30
  }
31
- export declare type ComposeOutput = RegularOutput | InternalOutput | SendMaxOutput | OpReturnOutput | NoAddressOutput | NoAddressSendMaxOutput;
31
+ export type ComposeOutput = RegularOutput | InternalOutput | SendMaxOutput | OpReturnOutput | NoAddressOutput | NoAddressSendMaxOutput;
32
32
  export interface ComposeParams {
33
33
  outputs: ComposeOutput[];
34
34
  coin: string;
@@ -40,7 +40,7 @@ export interface ComposeParams {
40
40
  floorBaseFee?: boolean;
41
41
  skipPermutation?: boolean;
42
42
  }
43
- export declare type SignedTransaction = {
43
+ export type SignedTransaction = {
44
44
  signatures: string[];
45
45
  serializedTx: string;
46
46
  txid?: string;
@@ -64,7 +64,7 @@ export interface PrecomposeParams {
64
64
  sequence?: number;
65
65
  skipPermutation?: boolean;
66
66
  }
67
- export declare type PrecomposedTransaction = {
67
+ export type PrecomposedTransaction = {
68
68
  type: 'error';
69
69
  error: string;
70
70
  } | {
@@ -26,7 +26,7 @@ export interface EosTxActionCommon {
26
26
  account: string;
27
27
  authorization: PROTO.EosPermissionLevel[];
28
28
  }
29
- export declare type EosTxAction = (EosTxActionCommon & {
29
+ export type EosTxAction = (EosTxActionCommon & {
30
30
  name: 'transfer';
31
31
  data: {
32
32
  from: string;
@@ -7,7 +7,7 @@ interface GetAddress extends GetAddressShared {
7
7
  scriptType?: PROTO.InternalInputScriptType;
8
8
  unlockPath?: PROTO.UnlockPath;
9
9
  }
10
- declare type Address = AddressShared & PROTO.Address;
10
+ type Address = AddressShared & PROTO.Address;
11
11
  export declare function getAddress(params: Params<GetAddress>): Response<Address>;
12
12
  export declare function getAddress(params: BundledParams<GetAddress>): Response<Address[]>;
13
13
  export {};
@@ -37,52 +37,52 @@ export interface TransactionCommon {
37
37
  deadline: number;
38
38
  signer?: string;
39
39
  }
40
- export declare type NEMTransferTransaction = TransactionCommon & {
40
+ export type NEMTransferTransaction = TransactionCommon & {
41
41
  type: NEM.TxType.TRANSFER;
42
42
  recipient: string;
43
43
  amount: PROTO.UintType;
44
44
  mosaics?: NEMMosaic[];
45
45
  message?: Message;
46
46
  };
47
- export declare type NEMImportanceTransaction = TransactionCommon & {
47
+ export type NEMImportanceTransaction = TransactionCommon & {
48
48
  type: NEM.TxType.IMPORTANCE_TRANSFER;
49
49
  importanceTransfer: {
50
50
  mode: PROTO.NEMImportanceTransferMode;
51
51
  publicKey: string;
52
52
  };
53
53
  };
54
- export declare type NEMAggregateModificationTransaction = TransactionCommon & {
54
+ export type NEMAggregateModificationTransaction = TransactionCommon & {
55
55
  type: NEM.TxType.AGGREGATE_MODIFICATION;
56
56
  modifications?: Modification[];
57
57
  minCosignatories: {
58
58
  relativeChange: number;
59
59
  };
60
60
  };
61
- export declare type NEMProvisionNamespaceTransaction = TransactionCommon & {
61
+ export type NEMProvisionNamespaceTransaction = TransactionCommon & {
62
62
  type: NEM.TxType.PROVISION_NAMESPACE;
63
63
  newPart: string;
64
64
  parent?: string;
65
65
  rentalFeeSink: string;
66
66
  rentalFee: number;
67
67
  };
68
- export declare type NEMMosaicCreationTransaction = TransactionCommon & {
68
+ export type NEMMosaicCreationTransaction = TransactionCommon & {
69
69
  type: NEM.TxType.MOSAIC_CREATION;
70
70
  mosaicDefinition: MosaicDefinition;
71
71
  creationFeeSink: string;
72
72
  creationFee: number;
73
73
  };
74
- export declare type NEMSupplyChangeTransaction = TransactionCommon & {
74
+ export type NEMSupplyChangeTransaction = TransactionCommon & {
75
75
  type: NEM.TxType.SUPPLY_CHANGE;
76
76
  mosaicId: MosaicID;
77
77
  supplyType: PROTO.NEMSupplyChangeType;
78
78
  delta: number;
79
79
  };
80
- export declare type NEMRegularTransaction = NEMTransferTransaction | NEMImportanceTransaction | NEMAggregateModificationTransaction | NEMProvisionNamespaceTransaction | NEMMosaicCreationTransaction | NEMSupplyChangeTransaction;
81
- export declare type NEMMultisigTransaction = TransactionCommon & {
80
+ export type NEMRegularTransaction = NEMTransferTransaction | NEMImportanceTransaction | NEMAggregateModificationTransaction | NEMProvisionNamespaceTransaction | NEMMosaicCreationTransaction | NEMSupplyChangeTransaction;
81
+ export type NEMMultisigTransaction = TransactionCommon & {
82
82
  type: NEM.TxType.COSIGNING | NEM.TxType.MULTISIG | NEM.TxType.MULTISIG_SIGNATURE;
83
83
  otherTrans: NEMRegularTransaction;
84
84
  };
85
- export declare type NEMTransaction = NEMRegularTransaction | NEMMultisigTransaction;
85
+ export type NEMTransaction = NEMRegularTransaction | NEMMultisigTransaction;
86
86
  export interface NEMSignTransaction {
87
87
  path: string | number[];
88
88
  transaction: NEMTransaction;
@@ -2,10 +2,10 @@ import { BLOCKCHAIN_EVENT, BlockchainEvent } from '../../events/blockchain';
2
2
  import { DEVICE_EVENT, DeviceEvent } from '../../events/device';
3
3
  import { TRANSPORT_EVENT, TransportEvent } from '../../events/transport';
4
4
  import { UI_EVENT, UiEvent } from '../../events/ui-request';
5
- declare type EventType<Event> = Event extends {
5
+ type EventType<Event> = Event extends {
6
6
  type: string;
7
7
  } ? Event['type'] : never;
8
- export declare type EventListenerType = typeof BLOCKCHAIN_EVENT | typeof DEVICE_EVENT | typeof TRANSPORT_EVENT | typeof UI_EVENT | EventType<TransportEvent> | EventType<UiEvent> | EventType<DeviceEvent> | EventType<BlockchainEvent>;
8
+ export type EventListenerType = typeof BLOCKCHAIN_EVENT | typeof DEVICE_EVENT | typeof TRANSPORT_EVENT | typeof UI_EVENT | EventType<TransportEvent> | EventType<UiEvent> | EventType<DeviceEvent> | EventType<BlockchainEvent>;
9
9
  export declare function off(type: EventListenerType, cb: (...args: any[]) => any): void;
10
10
  export {};
11
11
  //# sourceMappingURL=off.d.ts.map
@@ -3,12 +3,12 @@ import type { DeviceEvent, DeviceEventListenerFn } from '../../events/device';
3
3
  import type { TransportEvent, TransportEventListenerFn } from '../../events/transport';
4
4
  import type { UiEvent, UiEventListenerFn, ProgressEventListenerFn } from '../../events/ui-request';
5
5
  import type { UnionToIntersection } from '../utils';
6
- declare type DetailedEvent<Event> = Event extends {
6
+ type DetailedEvent<Event> = Event extends {
7
7
  type: string;
8
8
  } ? Event extends {
9
9
  payload: any;
10
10
  } ? (type: Event['type'], cb: (event: Event['payload']) => any) => void : (type: Event['type'], cb: () => any) => void : never;
11
- declare type EventsUnion = BlockchainEventListenerFn | DetailedEvent<BlockchainEvent> | DeviceEventListenerFn | DetailedEvent<DeviceEvent> | TransportEventListenerFn | DetailedEvent<TransportEvent> | UiEventListenerFn | DetailedEvent<UiEvent> | ProgressEventListenerFn;
11
+ type EventsUnion = BlockchainEventListenerFn | DetailedEvent<BlockchainEvent> | DeviceEventListenerFn | DetailedEvent<DeviceEvent> | TransportEventListenerFn | DetailedEvent<TransportEvent> | UiEventListenerFn | DetailedEvent<UiEvent> | ProgressEventListenerFn;
12
12
  export declare const on: UnionToIntersection<EventsUnion>;
13
13
  export {};
14
14
  //# sourceMappingURL=on.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import type { Params, Response } from '../params';
2
- export declare type PushTransaction = {
2
+ export type PushTransaction = {
3
3
  tx: string;
4
4
  coin: string;
5
5
  };
@@ -1,9 +1,8 @@
1
1
  import type { PROTO } from '../../constants';
2
2
  import type { CommonParams, Response } from '../params';
3
3
  import type { Proxy } from '../settings';
4
- export declare type SetProxy = {
4
+ export type SetProxy = {
5
5
  proxy: Proxy;
6
- useOnionLinks?: boolean;
7
6
  };
8
7
  export declare function setProxy(params: CommonParams & SetProxy): Response<PROTO.Success>;
9
8
  //# sourceMappingURL=setProxy.d.ts.map
@@ -124,7 +124,7 @@ export interface StellarInflationOperation {
124
124
  type: 'inflation';
125
125
  source?: string;
126
126
  }
127
- export declare type StellarOperation = StellarCreateAccountOperation | StellarPaymentOperation | StellarPathPaymentStrictReceiveOperation | StellarPathPaymentStrictSendOperation | StellarPassiveSellOfferOperation | StellarManageSellOfferOperation | StellarManageBuyOfferOperation | StellarSetOptionsOperation | StellarChangeTrustOperation | StellarAllowTrustOperation | StellarAccountMergeOperation | StellarInflationOperation | StellarManageDataOperation | StellarBumpSequenceOperation;
127
+ export type StellarOperation = StellarCreateAccountOperation | StellarPaymentOperation | StellarPathPaymentStrictReceiveOperation | StellarPathPaymentStrictSendOperation | StellarPassiveSellOfferOperation | StellarManageSellOfferOperation | StellarManageBuyOfferOperation | StellarSetOptionsOperation | StellarChangeTrustOperation | StellarAllowTrustOperation | StellarAccountMergeOperation | StellarInflationOperation | StellarManageDataOperation | StellarBumpSequenceOperation;
128
128
  export interface StellarTransaction {
129
129
  source: string;
130
130
  fee: number;
@@ -150,7 +150,7 @@ export interface StellarSignedTx {
150
150
  publicKey: string;
151
151
  signature: string;
152
152
  }
153
- export declare type StellarOperationMessage = ({
153
+ export type StellarOperationMessage = ({
154
154
  type: 'StellarCreateAccountOp';
155
155
  } & PROTO.StellarCreateAccountOp) | ({
156
156
  type: 'StellarPaymentOp';
@@ -19,8 +19,8 @@ export interface BlockchainLink {
19
19
  type: string;
20
20
  url: string[];
21
21
  }
22
- export declare type BitcoinDefaultFeesKeys = 'High' | 'Normal' | 'Economy' | 'Low';
23
- export declare type BitcoinDefaultFees = {
22
+ export type BitcoinDefaultFeesKeys = 'High' | 'Normal' | 'Economy' | 'Low';
23
+ export type BitcoinDefaultFees = {
24
24
  [key in BitcoinDefaultFeesKeys]: number;
25
25
  };
26
26
  interface Common {
@@ -74,6 +74,6 @@ export interface MiscNetworkInfo extends Common {
74
74
  defaultFees: BitcoinDefaultFees;
75
75
  network: typeof undefined;
76
76
  }
77
- export declare type CoinInfo = BitcoinNetworkInfo | EthereumNetworkInfo | MiscNetworkInfo;
77
+ export type CoinInfo = BitcoinNetworkInfo | EthereumNetworkInfo | MiscNetworkInfo;
78
78
  export {};
79
79
  //# sourceMappingURL=coinInfo.d.ts.map
@@ -1,14 +1,14 @@
1
1
  import type { PROTO } from '../constants';
2
2
  import type { ReleaseInfo } from './firmware';
3
- export declare type DeviceStatus = 'available' | 'occupied' | 'used';
4
- export declare type DeviceMode = 'normal' | 'bootloader' | 'initialize' | 'seedless';
5
- export declare type DeviceFirmwareStatus = 'valid' | 'outdated' | 'required' | 'unknown' | 'none';
6
- export declare type UnavailableCapability = 'no-capability' | 'no-support' | 'update-required' | 'trezor-connect-outdated';
7
- export declare type FirmwareType = 'bitcoin-only' | 'regular';
8
- export declare type UnavailableCapabilities = {
3
+ export type DeviceStatus = 'available' | 'occupied' | 'used';
4
+ export type DeviceMode = 'normal' | 'bootloader' | 'initialize' | 'seedless';
5
+ export type DeviceFirmwareStatus = 'valid' | 'outdated' | 'required' | 'unknown' | 'none';
6
+ export type UnavailableCapability = 'no-capability' | 'no-support' | 'update-required' | 'trezor-connect-outdated';
7
+ export type FirmwareType = 'bitcoin-only' | 'regular';
8
+ export type UnavailableCapabilities = {
9
9
  [key: string]: UnavailableCapability;
10
10
  };
11
- export declare type KnownDevice = {
11
+ export type KnownDevice = {
12
12
  type: 'acquired';
13
13
  id: string | null;
14
14
  path: string;
@@ -23,7 +23,7 @@ export declare type KnownDevice = {
23
23
  features: PROTO.Features;
24
24
  unavailableCapabilities: UnavailableCapabilities;
25
25
  };
26
- export declare type UnknownDevice = {
26
+ export type UnknownDevice = {
27
27
  type: 'unacquired';
28
28
  id?: null;
29
29
  path: string;
@@ -38,7 +38,7 @@ export declare type UnknownDevice = {
38
38
  state?: typeof undefined;
39
39
  unavailableCapabilities?: typeof undefined;
40
40
  };
41
- export declare type UnreadableDevice = {
41
+ export type UnreadableDevice = {
42
42
  type: 'unreadable';
43
43
  id?: null;
44
44
  path: string;
@@ -53,9 +53,9 @@ export declare type UnreadableDevice = {
53
53
  state?: typeof undefined;
54
54
  unavailableCapabilities?: typeof undefined;
55
55
  };
56
- export declare type Device = KnownDevice | UnknownDevice | UnreadableDevice;
57
- export declare type Features = PROTO.Features;
58
- declare type FeaturesNarrowing = {
56
+ export type Device = KnownDevice | UnknownDevice | UnreadableDevice;
57
+ export type Features = PROTO.Features;
58
+ type FeaturesNarrowing = {
59
59
  major_version: 2;
60
60
  fw_major: null;
61
61
  fw_minor: null;
@@ -91,6 +91,6 @@ declare type FeaturesNarrowing = {
91
91
  bootloader_mode: true;
92
92
  firmware_present: true;
93
93
  };
94
- export declare type StrictFeatures = Features & FeaturesNarrowing;
94
+ export type StrictFeatures = Features & FeaturesNarrowing;
95
95
  export {};
96
96
  //# sourceMappingURL=device.d.ts.map
@@ -8,8 +8,8 @@ export interface FirmwareRange {
8
8
  max: string;
9
9
  };
10
10
  }
11
- export declare type VersionArray = [1 | 2, number, number];
12
- export declare type FirmwareRelease = {
11
+ export type VersionArray = [1 | 2, number, number];
12
+ export type FirmwareRelease = {
13
13
  required: boolean;
14
14
  url: string;
15
15
  fingerprint: string;
@@ -25,7 +25,7 @@ export declare type FirmwareRelease = {
25
25
  rollout?: number;
26
26
  channel?: string;
27
27
  };
28
- export declare type ReleaseInfo = {
28
+ export type ReleaseInfo = {
29
29
  changelog: FirmwareRelease[] | null;
30
30
  release: FirmwareRelease;
31
31
  isLatest: boolean;
@@ -11,13 +11,13 @@ export interface CommonParams {
11
11
  skipFinalReload?: boolean;
12
12
  useCardanoDerivation?: boolean;
13
13
  }
14
- export declare type Params<T> = CommonParams & T & {
14
+ export type Params<T> = CommonParams & T & {
15
15
  bundle?: undefined;
16
16
  };
17
17
  interface Bundle<T> {
18
18
  bundle: T[];
19
19
  }
20
- export declare type BundledParams<T> = CommonParams & Bundle<T>;
20
+ export type BundledParams<T> = CommonParams & Bundle<T>;
21
21
  export interface CommonParamsWithCoin extends CommonParams {
22
22
  coin: string;
23
23
  }
@@ -32,7 +32,7 @@ export interface Success<T> {
32
32
  success: true;
33
33
  payload: T;
34
34
  }
35
- export declare type Response<T> = Promise<Success<T> | Unsuccessful>;
35
+ export type Response<T> = Promise<Success<T> | Unsuccessful>;
36
36
  export interface GetAddress {
37
37
  path: string | number[];
38
38
  address?: string;
@@ -3,7 +3,7 @@ export interface Manifest {
3
3
  appUrl: string;
4
4
  email: string;
5
5
  }
6
- export declare type Proxy = BlockchainSettings['proxy'];
6
+ export type Proxy = BlockchainSettings['proxy'];
7
7
  export interface ConnectSettings {
8
8
  manifest?: Manifest;
9
9
  connectSrc?: string;
@@ -29,6 +29,5 @@ export interface ConnectSettings {
29
29
  env: 'node' | 'web' | 'webextension' | 'electron' | 'react-native';
30
30
  timestamp: number;
31
31
  proxy?: Proxy;
32
- useOnionLinks?: boolean;
33
32
  }
34
33
  //# sourceMappingURL=settings.d.ts.map
@@ -1,5 +1,5 @@
1
- export declare type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
2
- export declare type MessageFactoryFn<Group, Event> = UnionToIntersection<Event extends {
1
+ export type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
2
+ export type MessageFactoryFn<Group, Event> = UnionToIntersection<Event extends {
3
3
  type: string;
4
4
  } ? Event extends {
5
5
  payload: any;
@@ -1,5 +1,5 @@
1
1
  import type { CoinInfo, BitcoinNetworkInfo } from '../types';
2
- declare type Bip44Options = {
2
+ type Bip44Options = {
3
3
  purpose?: number;
4
4
  coinType?: number;
5
5
  };
@@ -1,11 +1,11 @@
1
- export declare type BrowserState = {
1
+ export type BrowserState = {
2
2
  name: string;
3
3
  osname: string;
4
4
  supported: boolean;
5
5
  outdated: boolean;
6
6
  mobile: boolean;
7
7
  };
8
- declare type SupportedBrowser = {
8
+ type SupportedBrowser = {
9
9
  version: number;
10
10
  download: string;
11
11
  update: string;
@@ -1,4 +1,4 @@
1
- declare type LogMessage = {
1
+ type LogMessage = {
2
2
  level: string;
3
3
  prefix: string;
4
4
  message: any[];
@@ -1,11 +1,11 @@
1
- export declare type Deferred<T, I = any, D = any> = {
1
+ export type Deferred<T, I = any, D = any> = {
2
2
  id?: I;
3
3
  data?: D;
4
4
  promise: Promise<T>;
5
5
  resolve: (t: T) => void;
6
6
  reject: (e: Error) => void;
7
7
  };
8
- export declare type AsyncDeferred<T> = {
8
+ export type AsyncDeferred<T> = {
9
9
  promise: Promise<T>;
10
10
  resolve: (t: T) => void;
11
11
  reject: (e: Error) => void;
@@ -1,4 +1,4 @@
1
- declare type TimeoutID = any;
1
+ type TimeoutID = any;
2
2
  export declare class InteractionTimeout {
3
3
  timeout?: TimeoutID | null;
4
4
  seconds: number;
@@ -1,4 +1,4 @@
1
- declare type TrezorDeviceInfoDebug = {
1
+ type TrezorDeviceInfoDebug = {
2
2
  path: string;
3
3
  debug: boolean;
4
4
  };
@@ -3,7 +3,7 @@ import RippleWorker from '@trezor/blockchain-link/lib/workers/ripple';
3
3
  import BlockfrostWorker from '@trezor/blockchain-link/lib/workers/blockfrost';
4
4
  import ElectrumWorker from '@trezor/blockchain-link/lib/workers/electrum';
5
5
  import type { Transport } from '@trezor/transport';
6
- declare type TransportWrapper = () => Transport;
6
+ type TransportWrapper = () => Transport;
7
7
  declare const WebUsbPlugin: TransportWrapper | typeof undefined;
8
8
  declare const ReactNativeUsbPlugin: TransportWrapper | typeof undefined;
9
9
  export { WebUsbPlugin, ReactNativeUsbPlugin, BlockbookWorker, RippleWorker, BlockfrostWorker, ElectrumWorker, };
package/package.json CHANGED
@@ -1,81 +1,84 @@
1
1
  {
2
- "name": "@trezor/connect",
3
- "version": "9.0.4",
4
- "author": "Trezor <info@trezor.io>",
5
- "homepage": "https://github.com/trezor/trezor-suite/tree/develop/packages/connect",
6
- "description": "High-level javascript interface for Trezor hardware wallet.",
7
- "license": "SEE LICENSE IN LICENSE.md",
8
- "repository": {
9
- "type": "git",
10
- "url": "git://github.com/trezor/trezor-suite.git"
11
- },
12
- "bugs": {
13
- "url": "https://github.com/trezor/trezor-suite/issues"
14
- },
15
- "keywords": [
16
- "Trezor",
17
- "trezor-connect",
18
- "javascript"
19
- ],
20
- "sideEffects": false,
21
- "main": "lib/index",
22
- "browser": {
23
- "./lib/index": "./lib/index-browser",
24
- "./lib/utils/assets": "./lib/utils/assets-browser",
25
- "./lib/workers/workers": "./lib/workers/workers-browser"
26
- },
27
- "react-native": {
28
- "./lib/index": "./lib/index",
29
- "./lib/workers/workers": "./lib/workers/workers-react-native",
30
- "./lib/utils/assets": "./lib/utils/assets-native"
31
- },
32
- "files": [
33
- "lib/",
34
- "!**/*.map"
35
- ],
36
- "scripts": {
37
- "lint:js": "yarn g:eslint '**/*.{ts,tsx,js}'",
38
- "test:unit": "jest",
39
- "type-check": "tsc --build",
40
- "build:lib": "rimraf ./lib && yarn tsc --build tsconfig.lib.json",
41
- "version:beta": "tsx scripts/bump-version.ts prerelease",
42
- "version:patch": "tsx scripts/bump-version.ts patch",
43
- "version:minor": "tsx scripts/bump-version.ts minor",
44
- "version:major": "tsx scripts/bump-version.ts major",
45
- "test:e2e:web": "ts-node -O '{\"module\": \"commonjs\"}' ./e2e/run.ts web",
46
- "test:e2e:node": "ts-node -O '{\"module\": \"commonjs\"}' ./e2e/run.ts node"
47
- },
48
- "dependencies": {
49
- "@trezor/blockchain-link": "^2.1.5",
50
- "@trezor/connect-common": "0.0.10",
51
- "@trezor/transport": "^1.1.5",
52
- "@trezor/utils": "^9.0.3",
53
- "@trezor/utxo-lib": "^1.0.1",
54
- "bignumber.js": "^9.1.0",
55
- "blakejs": "^1.2.1",
56
- "bowser": "^2.11.0",
57
- "cross-fetch": "^3.1.5",
58
- "events": "^3.3.0",
59
- "parse-uri": "1.0.7",
60
- "randombytes": "2.1.0",
61
- "tslib": "^2.3.1"
62
- },
63
- "devDependencies": {
64
- "@trezor/trezor-user-env-link": "*",
65
- "@types/karma": "^6.3.3",
66
- "@types/parse-uri": "^1.0.0",
67
- "@types/randombytes": "^2.0.0",
68
- "jest": "^26.6.3",
69
- "karma": "^6.3.16",
70
- "karma-babel-preprocessor": "^8.0.2",
71
- "karma-chrome-launcher": "^3.1.0",
72
- "karma-jasmine": "4.0.1",
73
- "karma-jasmine-async": "^0.0.1",
74
- "karma-sourcemap-loader": "^0.3.8",
75
- "karma-webpack": "^5.0.0",
76
- "rimraf": "^3.0.2",
77
- "ts-node": "^10.9.1",
78
- "tsx": "^3.8.2",
79
- "typescript": "4.7.4"
80
- }
81
- }
2
+ "name": "@trezor/connect",
3
+ "version": "9.0.5",
4
+ "author": "Trezor <info@trezor.io>",
5
+ "homepage": "https://github.com/trezor/trezor-suite/tree/develop/packages/connect",
6
+ "description": "High-level javascript interface for Trezor hardware wallet.",
7
+ "npmPublishAccess": "public",
8
+ "license": "SEE LICENSE IN LICENSE.md",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git://github.com/trezor/trezor-suite.git"
12
+ },
13
+ "bugs": {
14
+ "url": "https://github.com/trezor/trezor-suite/issues"
15
+ },
16
+ "keywords": [
17
+ "Trezor",
18
+ "trezor-connect",
19
+ "javascript"
20
+ ],
21
+ "sideEffects": false,
22
+ "main": "lib/index",
23
+ "browser": {
24
+ "./lib/index": "./lib/index-browser",
25
+ "./lib/utils/assets": "./lib/utils/assets-browser",
26
+ "./lib/workers/workers": "./lib/workers/workers-browser"
27
+ },
28
+ "react-native": {
29
+ "./lib/index": "./lib/index",
30
+ "./lib/workers/workers": "./lib/workers/workers-react-native",
31
+ "./lib/utils/assets": "./lib/utils/assets-native"
32
+ },
33
+ "files": [
34
+ "lib/",
35
+ "!**/*.map"
36
+ ],
37
+ "scripts": {
38
+ "lint:js": "yarn g:eslint '**/*.{ts,tsx,js}'",
39
+ "test:unit": "jest",
40
+ "type-check": "tsc --build",
41
+ "build:lib": "rimraf ./lib && yarn tsc --build tsconfig.lib.json",
42
+ "version:beta": "tsx scripts/bump-version.ts prerelease",
43
+ "version:patch": "tsx scripts/bump-version.ts patch",
44
+ "version:minor": "tsx scripts/bump-version.ts minor",
45
+ "version:major": "tsx scripts/bump-version.ts major",
46
+ "test:e2e:web": "ts-node -O '{\"module\": \"commonjs\"}' ./e2e/run.ts web",
47
+ "test:e2e:node": "ts-node -O '{\"module\": \"commonjs\"}' ./e2e/run.ts node",
48
+ "prepublishOnly": "yarn tsx ../../scripts/prepublishNPM.js",
49
+ "prepublish": "yarn tsx ../../scripts/prepublish.js"
50
+ },
51
+ "dependencies": {
52
+ "@trezor/blockchain-link": "^2.1.6",
53
+ "@trezor/connect-common": "0.0.11",
54
+ "@trezor/transport": "^1.1.6",
55
+ "@trezor/utils": "^9.0.4",
56
+ "@trezor/utxo-lib": "^1.0.2",
57
+ "bignumber.js": "^9.1.0",
58
+ "blakejs": "^1.2.1",
59
+ "bowser": "^2.11.0",
60
+ "cross-fetch": "^3.1.5",
61
+ "events": "^3.3.0",
62
+ "parse-uri": "1.0.7",
63
+ "randombytes": "2.1.0"
64
+ },
65
+ "devDependencies": {
66
+ "@trezor/connect-analytics": "1.0.0",
67
+ "@trezor/trezor-user-env-link": "1.0.0",
68
+ "@types/karma": "^6.3.3",
69
+ "@types/parse-uri": "^1.0.0",
70
+ "@types/randombytes": "^2.0.0",
71
+ "jest": "^26.6.3",
72
+ "karma": "^6.4.1",
73
+ "karma-babel-preprocessor": "^8.0.2",
74
+ "karma-chrome-launcher": "^3.1.1",
75
+ "karma-jasmine": "^5.1.0",
76
+ "karma-jasmine-async": "^0.0.1",
77
+ "karma-sourcemap-loader": "^0.3.8",
78
+ "karma-webpack": "^5.0.0",
79
+ "rimraf": "^3.0.2",
80
+ "ts-node": "^10.9.1",
81
+ "tsx": "^3.8.2",
82
+ "typescript": "4.9.3"
83
+ }
84
+ }