@trezor/connect 9.0.0-beta.5 → 9.0.0-beta.6

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 (70) hide show
  1. package/README.md +1 -1
  2. package/lib/api/binance/binanceSignTx.d.ts +1 -1
  3. package/lib/api/binanceSignTransaction.d.ts +1 -1
  4. package/lib/api/bitcoin/enhanceSignTx.d.ts +1 -1
  5. package/lib/api/bitcoin/refTx.d.ts +1 -1
  6. package/lib/api/bitcoin/signtx.d.ts +1 -1
  7. package/lib/api/bitcoin/signtxLegacy.d.ts +1 -1
  8. package/lib/api/cardano/cardanoAddressParameters.d.ts +1 -1
  9. package/lib/api/cardano/cardanoAuxiliaryData.d.ts +1 -1
  10. package/lib/api/cardano/cardanoCertificate.d.ts +1 -1
  11. package/lib/api/cardano/cardanoTokenBundle.d.ts +1 -1
  12. package/lib/api/cardanoGetAddress.d.ts +1 -1
  13. package/lib/api/cardanoGetNativeScriptHash.d.ts +1 -1
  14. package/lib/api/cardanoGetPublicKey.d.ts +1 -1
  15. package/lib/api/cardanoSignTransaction.d.ts +1 -1
  16. package/lib/api/composeTransaction.d.ts +1 -1
  17. package/lib/api/eos/eosSignTx.d.ts +1 -1
  18. package/lib/api/eosGetPublicKey.d.ts +1 -1
  19. package/lib/api/ethereum/ethereumSignTx.d.ts +1 -1
  20. package/lib/api/ethereum/ethereumSignTypedData.d.ts +1 -1
  21. package/lib/api/ethereumSignTransaction.d.ts +1 -1
  22. package/lib/api/ethereumSignTypedData.d.ts +1 -1
  23. package/lib/api/nem/nemSignTx.d.ts +1 -1
  24. package/lib/api/signTransaction.d.ts +2 -2
  25. package/lib/api/stellar/stellarSignTx.d.ts +1 -1
  26. package/lib/api/stellarSignTransaction.d.ts +1 -1
  27. package/lib/api/tezos/tezosSignTx.d.ts +1 -1
  28. package/lib/data/version.d.ts +1 -1
  29. package/lib/data/version.js +1 -1
  30. package/lib/device/DeviceList.js +3 -1
  31. package/lib/types/api/binance/index.d.ts +29 -0
  32. package/lib/types/api/binance/index.js +3 -0
  33. package/lib/types/api/binanceSignTransaction.d.ts +1 -27
  34. package/lib/types/api/bitcoin/index.d.ts +82 -0
  35. package/lib/types/api/bitcoin/index.js +3 -0
  36. package/lib/types/api/cardano/index.d.ts +193 -0
  37. package/lib/types/api/cardano/index.js +3 -0
  38. package/lib/types/api/cardanoGetAddress.d.ts +1 -31
  39. package/lib/types/api/cardanoGetNativeScriptHash.d.ts +1 -18
  40. package/lib/types/api/cardanoGetPublicKey.d.ts +1 -12
  41. package/lib/types/api/cardanoSignTransaction.d.ts +1 -135
  42. package/lib/types/api/eos/index.d.ts +119 -0
  43. package/lib/types/api/eos/index.js +3 -0
  44. package/lib/types/api/eosGetPublicKey.d.ts +1 -10
  45. package/lib/types/api/eosSignTransaction.d.ts +1 -107
  46. package/lib/types/api/ethereum/index.d.ts +86 -0
  47. package/lib/types/api/ethereum/index.js +3 -0
  48. package/lib/types/api/ethereumSignMessage.d.ts +1 -5
  49. package/lib/types/api/ethereumSignTransaction.d.ts +1 -37
  50. package/lib/types/api/ethereumSignTypedData.d.ts +1 -37
  51. package/lib/types/api/ethereumVerifyMessage.d.ts +1 -6
  52. package/lib/types/api/nem/index.d.ts +90 -0
  53. package/lib/types/api/nem/index.js +3 -0
  54. package/lib/types/api/nemSignTransaction.d.ts +2 -89
  55. package/lib/types/api/ripple/index.d.ts +21 -0
  56. package/lib/types/api/ripple/index.js +3 -0
  57. package/lib/types/api/rippleSignTransaction.d.ts +1 -20
  58. package/lib/types/api/signMessage.d.ts +1 -7
  59. package/lib/types/api/signTransaction.d.ts +1 -67
  60. package/lib/types/api/stellar/index.d.ts +180 -0
  61. package/lib/types/api/stellar/index.js +3 -0
  62. package/lib/types/api/stellarSignTransaction.d.ts +1 -179
  63. package/lib/types/api/tezos/index.d.ts +58 -0
  64. package/lib/types/api/tezos/index.js +3 -0
  65. package/lib/types/api/tezosSignTransaction.d.ts +1 -57
  66. package/lib/types/api/verifyMessage.d.ts +1 -7
  67. package/lib/types/index.d.ts +8 -4
  68. package/lib/types/index.js +8 -0
  69. package/lib/utils/deviceFeaturesUtils.js +1 -1
  70. package/package.json +1 -1
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @trezor/connect API version 9.0.0-beta.5
1
+ # @trezor/connect API version 9.0.0-beta.6
2
2
 
3
3
  [![Build Status](https://github.com/trezor/trezor-suite/actions/workflows/connect-test.yml/badge.svg)](https://github.com/trezor/trezor-suite/actions/workflows/connect-test.yml)
4
4
  [![NPM](https://img.shields.io/npm/v/@trezor/connect.svg)](https://www.npmjs.org/package/@trezor/connect)
@@ -1,5 +1,5 @@
1
1
  import { PROTO } from '../../constants';
2
- import type { BinanceSDKTransaction, BinancePreparedTransaction } from '../../types/api/binanceSignTransaction';
2
+ import type { BinanceSDKTransaction, BinancePreparedTransaction } from '../../types/api/binance';
3
3
  import type { TypedCall } from '../../device/DeviceCommands';
4
4
  export declare const validate: (tx: BinanceSDKTransaction) => BinancePreparedTransaction;
5
5
  export declare const signTx: (typedCall: TypedCall, address_n: number[], tx: BinancePreparedTransaction) => Promise<PROTO.BinanceSignedTx>;
@@ -1,5 +1,5 @@
1
1
  import { AbstractMethod } from '../core/AbstractMethod';
2
- import type { BinancePreparedTransaction } from '../types/api/binanceSignTransaction';
2
+ import type { BinancePreparedTransaction } from '../types/api/binance';
3
3
  declare type Params = {
4
4
  path: number[];
5
5
  transaction: BinancePreparedTransaction;
@@ -1,4 +1,4 @@
1
1
  import type { BitcoinNetworkInfo } from '../../types';
2
- import type { TransactionOptions } from '../../types/api/signTransaction';
2
+ import type { TransactionOptions } from '../../types/api/bitcoin';
3
3
  export declare const enhanceSignTx: (options: TransactionOptions, coinInfo: BitcoinNetworkInfo) => TransactionOptions;
4
4
  //# sourceMappingURL=enhanceSignTx.d.ts.map
@@ -1,6 +1,6 @@
1
1
  import type { TypedRawTransaction } from '@trezor/blockchain-link';
2
2
  import type { CoinInfo, AccountAddresses } from '../../types';
3
- import type { RefTransaction, TransactionOptions } from '../../types/api/signTransaction';
3
+ import type { RefTransaction, TransactionOptions } from '../../types/api/bitcoin';
4
4
  import type { PROTO } from '../../constants';
5
5
  export declare const requireReferencedTransactions: (inputs: PROTO.TxInputType[], options?: TransactionOptions, coinInfo?: CoinInfo | undefined) => boolean;
6
6
  export declare const getReferencedTransactions: (inputs: PROTO.TxInputType[]) => string[];
@@ -1,7 +1,7 @@
1
1
  import { PROTO } from '../../constants';
2
2
  import type { BitcoinNetworkInfo } from '../../types';
3
3
  import type { TypedCall } from '../../device/DeviceCommands';
4
- import type { RefTransaction, TransactionOptions, SignedTransaction } from '../../types/api/signTransaction';
4
+ import type { RefTransaction, TransactionOptions, SignedTransaction } from '../../types/api/bitcoin';
5
5
  export interface SignTxHelperProps {
6
6
  typedCall: TypedCall;
7
7
  txRequest: PROTO.TxRequest;
@@ -1,4 +1,4 @@
1
- import type { SignedTransaction } from '../../types/api/signTransaction';
1
+ import type { SignedTransaction } from '../../types/api/bitcoin';
2
2
  import type { SignTxHelperParams } from './signtx';
3
3
  export declare const signTxLegacy: ({ typedCall, inputs, outputs, refTxs, options, coinInfo, }: SignTxHelperParams) => Promise<SignedTransaction>;
4
4
  //# sourceMappingURL=signtxLegacy.d.ts.map
@@ -1,6 +1,6 @@
1
1
  import { PROTO } from '../../constants';
2
2
  import type { Device } from '../../device/Device';
3
- import type { CardanoAddressParameters } from '../../types/api/cardanoGetAddress';
3
+ import type { CardanoAddressParameters } from '../../types/api/cardano';
4
4
  export declare const validateAddressParameters: (addressParameters: CardanoAddressParameters) => void;
5
5
  export declare const modifyAddressParametersForBackwardsCompatibility: (device: Device, address_parameters: PROTO.CardanoAddressParametersType) => PROTO.CardanoAddressParametersType;
6
6
  export declare const addressParametersToProto: (addressParameters: CardanoAddressParameters) => PROTO.CardanoAddressParametersType;
@@ -1,6 +1,6 @@
1
1
  import type { Device } from '../../device/Device';
2
2
  import type { PROTO } from '../../constants';
3
- import type { CardanoAuxiliaryData } from '../../types/api/cardanoSignTransaction';
3
+ import type { CardanoAuxiliaryData } from '../../types/api/cardano';
4
4
  export declare const transformAuxiliaryData: (auxiliaryData: CardanoAuxiliaryData) => PROTO.CardanoTxAuxiliaryData;
5
5
  export declare const modifyAuxiliaryDataForBackwardsCompatibility: (device: Device, auxiliary_data: PROTO.CardanoTxAuxiliaryData) => PROTO.CardanoTxAuxiliaryData;
6
6
  //# sourceMappingURL=cardanoAuxiliaryData.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import { PROTO } from '../../constants';
2
- import type { CardanoCertificate } from '../../types/api/cardanoSignTransaction';
2
+ import type { CardanoCertificate } from '../../types/api/cardano';
3
3
  export declare type CertificateWithPoolOwnersAndRelays = {
4
4
  certificate: PROTO.CardanoTxCertificate;
5
5
  poolOwners: PROTO.CardanoPoolOwner[];
@@ -1,5 +1,5 @@
1
1
  import type { PROTO } from '../../constants';
2
- import type { CardanoAssetGroup } from '../../types/api/cardanoSignTransaction';
2
+ import type { CardanoAssetGroup } from '../../types/api/cardano';
3
3
  export declare type AssetGroupWithTokens = {
4
4
  policyId: string;
5
5
  tokens: PROTO.CardanoToken[];
@@ -17,7 +17,7 @@ export default class CardanoGetAddress extends AbstractMethod<'cardanoGetAddress
17
17
  noBackupConfirmation(): Promise<boolean>;
18
18
  _call({ address_parameters, protocol_magic, network_id, derivation_type, show_display, }: Params): Promise<PROTO.CardanoAddress>;
19
19
  _ensureFirmwareSupportsBatch(batch: Params): void;
20
- run(): Promise<import("../types/api/cardanoGetAddress").CardanoAddress | import("../types/api/cardanoGetAddress").CardanoAddress[]>;
20
+ run(): Promise<import("..").CardanoAddress | import("..").CardanoAddress[]>;
21
21
  }
22
22
  export {};
23
23
  //# sourceMappingURL=cardanoGetAddress.d.ts.map
@@ -1,6 +1,6 @@
1
1
  import { PROTO } from '../constants';
2
2
  import { AbstractMethod } from '../core/AbstractMethod';
3
- import type { CardanoNativeScript } from '../types/api/cardanoGetNativeScriptHash';
3
+ import type { CardanoNativeScript } from '../types/api/cardano';
4
4
  export default class CardanoGetNativeScriptHash extends AbstractMethod<'cardanoGetNativeScriptHash', PROTO.CardanoGetNativeScriptHash> {
5
5
  init(): void;
6
6
  validateScript(script: CardanoNativeScript): void;
@@ -5,6 +5,6 @@ export default class CardanoGetPublicKey extends AbstractMethod<'cardanoGetPubli
5
5
  confirmed?: boolean;
6
6
  init(): void;
7
7
  confirmation(): Promise<boolean>;
8
- run(): Promise<import("../types/api/cardanoGetPublicKey").CardanoPublicKey | import("../types/api/cardanoGetPublicKey").CardanoPublicKey[]>;
8
+ run(): Promise<import("..").CardanoPublicKey | import("..").CardanoPublicKey[]>;
9
9
  }
10
10
  //# sourceMappingURL=cardanoGetPublicKey.d.ts.map
@@ -3,7 +3,7 @@ import type { CertificateWithPoolOwnersAndRelays } from './cardano/cardanoCertif
3
3
  import { Path, InputWithPath, CollateralInputWithPath } from './cardano/cardanoInputs';
4
4
  import type { OutputWithData } from './cardano/cardanoOutputs';
5
5
  import { PROTO } from '../constants';
6
- import type { CardanoSignedTxData } from '../types/api/cardanoSignTransaction';
6
+ import type { CardanoSignedTxData } from '../types/api/cardano';
7
7
  import type { AssetGroupWithTokens } from './cardano/cardanoTokenBundle';
8
8
  declare const CardanoSignTransactionFeatures: Readonly<{
9
9
  TransactionStreaming: string[];
@@ -26,7 +26,7 @@ export default class ComposeTransaction extends AbstractMethod<'composeTransacti
26
26
  }>;
27
27
  selectFee(account: DiscoveryAccount, utxo: AccountUtxo[]): Promise<SignedTransaction | "change-account">;
28
28
  _selectFeeUiResponse(composer: TransactionComposer): Promise<SignedTransaction | 'change-account'>;
29
- _sign(tx: ComposeResult): Promise<import("../types/api/signTransaction").SignedTransaction>;
29
+ _sign(tx: ComposeResult): Promise<import("../types").SignedTransaction>;
30
30
  dispose(): void;
31
31
  }
32
32
  export {};
@@ -1,5 +1,5 @@
1
1
  import { PROTO } from '../../constants';
2
- import type { EosSDKTransaction } from '../../types/api/eosSignTransaction';
2
+ import type { EosSDKTransaction } from '../../types/api/eos';
3
3
  import type { TypedCall } from '../../device/DeviceCommands';
4
4
  export declare const validate: (tx: EosSDKTransaction) => {
5
5
  chain_id: string;
@@ -5,6 +5,6 @@ export default class EosGetPublicKey extends AbstractMethod<'eosGetPublicKey', P
5
5
  confirmed?: boolean;
6
6
  init(): void;
7
7
  confirmation(): Promise<boolean>;
8
- run(): Promise<import("../types/api/eosGetPublicKey").EosPublicKey | import("../types/api/eosGetPublicKey").EosPublicKey[]>;
8
+ run(): Promise<import("..").EosPublicKey | import("..").EosPublicKey[]>;
9
9
  }
10
10
  //# sourceMappingURL=eosGetPublicKey.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import type { TypedCall } from '../../device/DeviceCommands';
2
- import type { EthereumAccessList } from '../../types/api/ethereumSignTransaction';
2
+ import type { EthereumAccessList } from '../../types/api/ethereum';
3
3
  export declare const ethereumSignTx: (typedCall: TypedCall, address_n: number[], to: string, value: string, gas_limit: string, gas_price: string, nonce: string, chain_id: number, data?: string | undefined, tx_type?: number | undefined) => Promise<{
4
4
  v: string;
5
5
  r: string;
@@ -1,5 +1,5 @@
1
1
  import { PROTO } from '../../constants';
2
- import type { EthereumSignTypedDataTypes } from '../../types/api/ethereumSignTypedData';
2
+ import type { EthereumSignTypedDataTypes } from '../../types/api/ethereum';
3
3
  export declare function parseArrayType(arrayTypeName: string): {
4
4
  entryTypeName: string;
5
5
  arraySize: number | null;
@@ -1,5 +1,5 @@
1
1
  import { AbstractMethod } from '../core/AbstractMethod';
2
- import type { EthereumTransaction, EthereumTransactionEIP1559 } from '../types/api/ethereumSignTransaction';
2
+ import type { EthereumTransaction, EthereumTransactionEIP1559 } from '../types/api/ethereum';
3
3
  declare type Params = {
4
4
  path: number[];
5
5
  tx: ({
@@ -1,5 +1,5 @@
1
1
  import { AbstractMethod } from '../core/AbstractMethod';
2
- import type { EthereumSignTypedDataTypes, EthereumSignTypedData as EthereumSignTypedDataParams, EthereumSignTypedHash as EthereumSignTypedHashParams } from '../types/api/ethereumSignTypedData';
2
+ import type { EthereumSignTypedDataTypes, EthereumSignTypedData as EthereumSignTypedDataParams, EthereumSignTypedHash as EthereumSignTypedHashParams } from '../types/api/ethereum';
3
3
  declare type Params = (Omit<EthereumSignTypedDataParams<EthereumSignTypedDataTypes>, 'path'> | Omit<EthereumSignTypedHashParams<EthereumSignTypedDataTypes>, 'path'>) & {
4
4
  address_n: number[];
5
5
  };
@@ -1,4 +1,4 @@
1
1
  import { PROTO } from '../../constants';
2
- import * as $T from '../../types/api/nemSignTransaction';
2
+ import * as $T from '../../types/api/nem';
3
3
  export declare const createTx: (tx: $T.NEMTransaction, address_n: number[]) => PROTO.NEMSignTx;
4
4
  //# sourceMappingURL=nemSignTx.d.ts.map
@@ -1,7 +1,7 @@
1
1
  import { AbstractMethod } from '../core/AbstractMethod';
2
2
  import { PROTO } from '../constants';
3
3
  import type { BitcoinNetworkInfo, AccountAddresses } from '../types';
4
- import type { RefTransaction, TransactionOptions } from '../types/api/signTransaction';
4
+ import type { RefTransaction, TransactionOptions } from '../types/api/bitcoin';
5
5
  declare type Params = {
6
6
  inputs: PROTO.TxInputType[];
7
7
  outputs: PROTO.TxOutputType[];
@@ -15,7 +15,7 @@ declare type Params = {
15
15
  };
16
16
  export default class SignTransaction extends AbstractMethod<'signTransaction', Params> {
17
17
  init(): void;
18
- run(): Promise<import("../types/api/signTransaction").SignedTransaction>;
18
+ run(): Promise<import("../types").SignedTransaction>;
19
19
  }
20
20
  export {};
21
21
  //# sourceMappingURL=signTransaction.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import { PROTO } from '../../constants';
2
2
  import type { TypedCall } from '../../device/DeviceCommands';
3
- import type { StellarTransaction } from '../../types/api/stellarSignTransaction';
3
+ import type { StellarTransaction } from '../../types/api/stellar';
4
4
  export declare const stellarSignTx: (typedCall: TypedCall, address_n: number[], networkPassphrase: string, tx: StellarTransaction) => Promise<PROTO.StellarSignedTx>;
5
5
  //# sourceMappingURL=stellarSignTx.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import { AbstractMethod } from '../core/AbstractMethod';
2
- import { StellarTransaction } from '../types/api/stellarSignTransaction';
2
+ import { StellarTransaction } from '../types/api/stellar';
3
3
  declare type Params = {
4
4
  path: number[];
5
5
  networkPassphrase: string;
@@ -1,4 +1,4 @@
1
1
  import { PROTO } from '../../constants';
2
- import type { TezosOperation } from '../../types/api/tezosSignTransaction';
2
+ import type { TezosOperation } from '../../types/api/tezos';
3
3
  export declare const createTx: (address_n: number[], branch: string, operation: TezosOperation) => PROTO.TezosSignTx;
4
4
  //# sourceMappingURL=tezosSignTx.d.ts.map
@@ -1,3 +1,3 @@
1
- export declare const VERSION = "9.0.0-beta.5";
1
+ export declare const VERSION = "9.0.0-beta.6";
2
2
  export declare const DEFAULT_DOMAIN: string;
3
3
  //# sourceMappingURL=version.d.ts.map
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DEFAULT_DOMAIN = exports.VERSION = void 0;
4
- exports.VERSION = '9.0.0-beta.5';
4
+ exports.VERSION = '9.0.0-beta.6';
5
5
  const versionN = exports.VERSION.split('.').map(s => parseInt(s, 10));
6
6
  exports.DEFAULT_DOMAIN = `https://connect.trezor.io/${versionN[0]}/`;
7
7
  //# sourceMappingURL=version.js.map
@@ -19,6 +19,7 @@ const { BridgeV2, Fallback } = transport_1.default;
19
19
  const _log = (0, debug_1.initLog)('DeviceList');
20
20
  class DeviceList extends events_1.default {
21
21
  constructor() {
22
+ var _a, _b;
22
23
  super();
23
24
  this.devices = {};
24
25
  this.creatingDevicesDescriptors = {};
@@ -37,7 +38,8 @@ class DeviceList extends events_1.default {
37
38
  this.fetchController = (0, AbortController_1.getAbortController)();
38
39
  const { signal } = this.fetchController;
39
40
  const fetchWithSignal = (args, options = {}) => (0, cross_fetch_1.default)(args, { ...options, signal });
40
- BridgeV2.setFetch(fetchWithSignal, typeof window === 'undefined');
41
+ const isNode = ((_b = (_a = process === null || process === void 0 ? void 0 : process.release) === null || _a === void 0 ? void 0 : _a.name) === null || _b === void 0 ? void 0 : _b.search(/node|io\.js/)) !== -1;
42
+ BridgeV2.setFetch(fetchWithSignal, isNode);
41
43
  transports.push(bridge);
42
44
  }
43
45
  if (webusb && typeof workers_1.WebUsbPlugin !== 'undefined') {
@@ -0,0 +1,29 @@
1
+ import type { PROTO } from '../../../constants';
2
+ export interface BinanceSDKTransaction {
3
+ chain_id: string;
4
+ account_number?: number;
5
+ memo?: string;
6
+ sequence?: number;
7
+ source?: number;
8
+ transfer?: PROTO.BinanceTransferMsg;
9
+ placeOrder?: PROTO.BinanceOrderMsg;
10
+ cancelOrder?: PROTO.BinanceCancelMsg;
11
+ }
12
+ export declare type BinancePreparedMessage = (PROTO.BinanceTransferMsg & {
13
+ type: 'BinanceTransferMsg';
14
+ }) | (PROTO.BinanceOrderMsg & {
15
+ type: 'BinanceOrderMsg';
16
+ }) | (PROTO.BinanceCancelMsg & {
17
+ type: 'BinanceCancelMsg';
18
+ });
19
+ export interface BinancePreparedTransaction extends BinanceSDKTransaction {
20
+ messages: BinancePreparedMessage[];
21
+ account_number: number;
22
+ sequence: number;
23
+ source: number;
24
+ }
25
+ export interface BinanceSignTransaction {
26
+ path: string | number[];
27
+ transaction: BinanceSDKTransaction;
28
+ }
29
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=index.js.map
@@ -1,31 +1,5 @@
1
1
  import type { PROTO } from '../../constants';
2
2
  import type { Params, Response } from '../params';
3
- export interface BinanceSDKTransaction {
4
- chain_id: string;
5
- account_number?: number;
6
- memo?: string;
7
- sequence?: number;
8
- source?: number;
9
- transfer?: PROTO.BinanceTransferMsg;
10
- placeOrder?: PROTO.BinanceOrderMsg;
11
- cancelOrder?: PROTO.BinanceCancelMsg;
12
- }
13
- export declare type BinancePreparedMessage = (PROTO.BinanceTransferMsg & {
14
- type: 'BinanceTransferMsg';
15
- }) | (PROTO.BinanceOrderMsg & {
16
- type: 'BinanceOrderMsg';
17
- }) | (PROTO.BinanceCancelMsg & {
18
- type: 'BinanceCancelMsg';
19
- });
20
- export interface BinancePreparedTransaction extends BinanceSDKTransaction {
21
- messages: BinancePreparedMessage[];
22
- account_number: number;
23
- sequence: number;
24
- source: number;
25
- }
26
- export interface BinanceSignTransaction {
27
- path: string | number[];
28
- transaction: BinanceSDKTransaction;
29
- }
3
+ import type { BinanceSignTransaction } from './binance';
30
4
  export declare function binanceSignTransaction(params: Params<BinanceSignTransaction>): Response<PROTO.BinanceSignedTx>;
31
5
  //# sourceMappingURL=binanceSignTransaction.d.ts.map
@@ -0,0 +1,82 @@
1
+ import type { PROTO } from '../../../constants';
2
+ import type { AccountAddresses } from '@trezor/blockchain-link';
3
+ export interface SignMessage {
4
+ path: string | number[];
5
+ coin: string;
6
+ message: string;
7
+ hex?: boolean;
8
+ no_script_type?: boolean;
9
+ }
10
+ export declare type RefTransaction = {
11
+ hash: string;
12
+ version: number;
13
+ inputs: PROTO.PrevInput[];
14
+ bin_outputs: PROTO.TxOutputBinType[];
15
+ outputs?: typeof undefined;
16
+ lock_time: number;
17
+ extra_data?: string;
18
+ expiry?: number;
19
+ overwintered?: boolean;
20
+ version_group_id?: number;
21
+ timestamp?: number;
22
+ branch_id?: number;
23
+ } | {
24
+ hash: string;
25
+ version: number;
26
+ inputs: PROTO.TxInput[];
27
+ bin_outputs?: typeof undefined;
28
+ outputs: PROTO.TxOutputType[];
29
+ lock_time: number;
30
+ extra_data?: string;
31
+ expiry?: number;
32
+ overwintered?: boolean;
33
+ version_group_id?: number;
34
+ timestamp?: number;
35
+ branch_id?: number;
36
+ };
37
+ export interface TransactionOptions {
38
+ version?: number;
39
+ lock_time?: number;
40
+ expiry?: number;
41
+ overwintered?: boolean;
42
+ version_group_id?: number;
43
+ timestamp?: number;
44
+ branch_id?: number;
45
+ decred_staking_ticket?: boolean;
46
+ amount_unit?: PROTO.AmountUnit;
47
+ }
48
+ export interface SignTransaction {
49
+ inputs: PROTO.TxInputType[];
50
+ outputs: PROTO.TxOutputType[];
51
+ paymentRequests?: PROTO.TxAckPaymentRequest[];
52
+ refTxs?: RefTransaction[];
53
+ account?: {
54
+ addresses: AccountAddresses;
55
+ };
56
+ coin: string;
57
+ locktime?: number;
58
+ timestamp?: number;
59
+ version?: number;
60
+ expiry?: number;
61
+ overwintered?: boolean;
62
+ versionGroupId?: number;
63
+ branchId?: number;
64
+ decredStakingTicket?: boolean;
65
+ push?: boolean;
66
+ preauthorized?: boolean;
67
+ amountUnit?: PROTO.AmountUnit;
68
+ }
69
+ export declare type SignedTransaction = {
70
+ signatures: string[];
71
+ serializedTx: string;
72
+ witnesses?: (string | undefined)[];
73
+ txid?: string;
74
+ };
75
+ export interface VerifyMessage {
76
+ address: string;
77
+ signature: string;
78
+ message: string;
79
+ coin: string;
80
+ hex?: boolean;
81
+ }
82
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,193 @@
1
+ import type { PROTO } from '../../../constants';
2
+ export interface CardanoCertificatePointer {
3
+ blockIndex: number;
4
+ txIndex: number;
5
+ certificateIndex: number;
6
+ }
7
+ export interface CardanoAddressParameters {
8
+ addressType: PROTO.CardanoAddressType;
9
+ path?: string | number[];
10
+ stakingPath?: string | number[];
11
+ stakingKeyHash?: string;
12
+ certificatePointer?: CardanoCertificatePointer;
13
+ paymentScriptHash?: string;
14
+ stakingScriptHash?: string;
15
+ }
16
+ export interface CardanoGetAddress {
17
+ addressParameters: CardanoAddressParameters;
18
+ protocolMagic: number;
19
+ networkId: number;
20
+ address?: string;
21
+ showOnTrezor?: boolean;
22
+ derivationType?: PROTO.CardanoDerivationType;
23
+ }
24
+ export interface CardanoAddress {
25
+ addressParameters: CardanoAddressParameters;
26
+ protocolMagic: number;
27
+ networkId: number;
28
+ serializedPath: string;
29
+ serializedStakingPath: string;
30
+ address: string;
31
+ }
32
+ export interface CardanoNativeScript {
33
+ type: PROTO.CardanoNativeScriptType;
34
+ scripts?: CardanoNativeScript[];
35
+ keyHash?: string;
36
+ keyPath?: string | number[];
37
+ requiredSignaturesCount?: number;
38
+ invalidBefore?: string;
39
+ invalidHereafter?: string;
40
+ }
41
+ export interface CardanoGetNativeScriptHash {
42
+ script: CardanoNativeScript;
43
+ displayFormat: PROTO.CardanoNativeScriptHashDisplayFormat;
44
+ derivationType?: PROTO.CardanoDerivationType;
45
+ }
46
+ export interface CardanoNativeScriptHash {
47
+ scriptHash: string;
48
+ }
49
+ export interface CardanoGetPublicKey {
50
+ path: string | number[];
51
+ showOnTrezor?: boolean;
52
+ derivationType?: PROTO.CardanoDerivationType;
53
+ }
54
+ export interface CardanoPublicKey {
55
+ path: number[];
56
+ serializedPath: string;
57
+ publicKey: string;
58
+ node: PROTO.HDNodeType;
59
+ }
60
+ export interface CardanoInput {
61
+ path?: string | number[];
62
+ prev_hash: string;
63
+ prev_index: number;
64
+ }
65
+ export interface CardanoToken {
66
+ assetNameBytes: string;
67
+ amount?: string;
68
+ mintAmount?: string;
69
+ }
70
+ export interface CardanoAssetGroup {
71
+ policyId: string;
72
+ tokenAmounts: CardanoToken[];
73
+ }
74
+ export declare type CardanoOutput = ({
75
+ addressParameters: CardanoAddressParameters;
76
+ } | {
77
+ address: string;
78
+ }) & {
79
+ amount: string;
80
+ tokenBundle?: CardanoAssetGroup[];
81
+ datumHash?: string;
82
+ format?: PROTO.CardanoTxOutputSerializationFormat;
83
+ inlineDatum?: string;
84
+ referenceScript?: string;
85
+ };
86
+ export interface CardanoPoolOwner {
87
+ stakingKeyPath?: string | number[];
88
+ stakingKeyHash?: string;
89
+ }
90
+ export interface CardanoPoolRelay {
91
+ type: PROTO.CardanoPoolRelayType;
92
+ ipv4Address?: string;
93
+ ipv6Address?: string;
94
+ port?: number;
95
+ hostName?: string;
96
+ }
97
+ export interface CardanoPoolMetadata {
98
+ url: string;
99
+ hash: string;
100
+ }
101
+ export interface CardanoPoolMargin {
102
+ numerator: string;
103
+ denominator: string;
104
+ }
105
+ export interface CardanoPoolParameters {
106
+ poolId: string;
107
+ vrfKeyHash: string;
108
+ pledge: string;
109
+ cost: string;
110
+ margin: CardanoPoolMargin;
111
+ rewardAccount: string;
112
+ owners: CardanoPoolOwner[];
113
+ relays: CardanoPoolRelay[];
114
+ metadata: CardanoPoolMetadata;
115
+ }
116
+ export interface CardanoCertificate {
117
+ type: PROTO.CardanoCertificateType;
118
+ path?: string | number[];
119
+ pool?: string;
120
+ poolParameters?: CardanoPoolParameters;
121
+ scriptHash?: string;
122
+ keyHash?: string;
123
+ }
124
+ export interface CardanoWithdrawal {
125
+ path?: string | number[];
126
+ amount: string;
127
+ scriptHash?: string;
128
+ keyHash?: string;
129
+ }
130
+ export declare type CardanoMint = CardanoAssetGroup[];
131
+ export interface CardanoCollateralInput {
132
+ path?: string | number[];
133
+ prev_hash: string;
134
+ prev_index: number;
135
+ }
136
+ export interface CardanoRequiredSigner {
137
+ keyPath?: string | number[];
138
+ keyHash?: string;
139
+ }
140
+ export interface CardanoReferenceInput {
141
+ prev_hash: string;
142
+ prev_index: number;
143
+ }
144
+ export interface CardanoCatalystRegistrationParameters {
145
+ votingPublicKey: string;
146
+ stakingPath: string | number[];
147
+ rewardAddressParameters: CardanoAddressParameters;
148
+ nonce: string;
149
+ }
150
+ export interface CardanoAuxiliaryData {
151
+ hash?: string;
152
+ catalystRegistrationParameters?: CardanoCatalystRegistrationParameters;
153
+ }
154
+ export interface CardanoSignTransaction {
155
+ inputs: CardanoInput[];
156
+ outputs: CardanoOutput[];
157
+ fee: string;
158
+ ttl?: string;
159
+ certificates?: CardanoCertificate[];
160
+ withdrawals?: CardanoWithdrawal[];
161
+ validityIntervalStart?: string;
162
+ auxiliaryData?: CardanoAuxiliaryData;
163
+ mint?: CardanoMint;
164
+ scriptDataHash?: string;
165
+ collateralInputs?: CardanoCollateralInput[];
166
+ requiredSigners?: CardanoRequiredSigner[];
167
+ collateralReturn?: CardanoOutput;
168
+ totalCollateral?: string;
169
+ referenceInputs?: CardanoReferenceInput[];
170
+ additionalWitnessRequests?: (string | number[])[];
171
+ protocolMagic: number;
172
+ networkId: number;
173
+ signingMode: PROTO.CardanoTxSigningMode;
174
+ derivationType?: PROTO.CardanoDerivationType;
175
+ includeNetworkId?: boolean;
176
+ }
177
+ export interface CardanoSignedTxWitness {
178
+ type: PROTO.CardanoTxWitnessType;
179
+ pubKey: string;
180
+ signature: string;
181
+ chainCode?: string;
182
+ }
183
+ export interface CardanoAuxiliaryDataSupplement {
184
+ type: PROTO.CardanoTxAuxiliaryDataSupplementType;
185
+ auxiliaryDataHash: string;
186
+ catalystSignature?: string;
187
+ }
188
+ export interface CardanoSignedTxData {
189
+ hash: string;
190
+ witnesses: CardanoSignedTxWitness[];
191
+ auxiliaryDataSupplement?: CardanoAuxiliaryDataSupplement;
192
+ }
193
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=index.js.map