@swapkit/wallet-hardware 4.8.4 → 4.9.0
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.
- package/dist/chunk-9jd3dhjv.js +4 -0
- package/dist/chunk-9jd3dhjv.js.map +10 -0
- package/dist/chunk-m08x6an5.js +4 -0
- package/dist/chunk-m08x6an5.js.map +10 -0
- package/dist/ledger/index.cjs +3 -3
- package/dist/ledger/index.cjs.map +13 -13
- package/dist/ledger/index.js +3 -3
- package/dist/ledger/index.js.map +13 -13
- package/dist/types/ledger/clients/cosmos.d.ts +2 -1
- package/dist/types/ledger/clients/cosmos.d.ts.map +1 -1
- package/dist/types/ledger/clients/evm.d.ts +5 -1
- package/dist/types/ledger/clients/evm.d.ts.map +1 -1
- package/dist/types/ledger/clients/near.d.ts +2 -1
- package/dist/types/ledger/clients/near.d.ts.map +1 -1
- package/dist/types/ledger/clients/sui.d.ts +4 -2
- package/dist/types/ledger/clients/sui.d.ts.map +1 -1
- package/dist/types/ledger/clients/thorchain/index.d.ts +2 -1
- package/dist/types/ledger/clients/thorchain/index.d.ts.map +1 -1
- package/dist/types/ledger/clients/tron.d.ts +4 -2
- package/dist/types/ledger/clients/tron.d.ts.map +1 -1
- package/dist/types/ledger/clients/utxo-psbt.d.ts +3 -2
- package/dist/types/ledger/clients/utxo-psbt.d.ts.map +1 -1
- package/dist/types/ledger/clients/utxo.d.ts +7 -6
- package/dist/types/ledger/clients/utxo.d.ts.map +1 -1
- package/dist/types/ledger/clients/xrp.d.ts +2 -1
- package/dist/types/ledger/clients/xrp.d.ts.map +1 -1
- package/dist/types/ledger/helpers/getLedgerClient.d.ts +3 -1
- package/dist/types/ledger/helpers/getLedgerClient.d.ts.map +1 -1
- package/dist/types/ledger/index.d.ts +13 -1
- package/dist/types/ledger/index.d.ts.map +1 -1
- package/dist/types/ledger/interfaces/CosmosLedgerInterface.d.ts +3 -0
- package/dist/types/ledger/interfaces/CosmosLedgerInterface.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/ledger/clients/cosmos.ts +3 -2
- package/src/ledger/clients/evm.ts +13 -4
- package/src/ledger/clients/near.ts +3 -2
- package/src/ledger/clients/sui.ts +7 -3
- package/src/ledger/clients/thorchain/index.ts +3 -2
- package/src/ledger/clients/tron.ts +7 -3
- package/src/ledger/clients/utxo-psbt.ts +21 -17
- package/src/ledger/clients/utxo.ts +21 -17
- package/src/ledger/clients/xrp.ts +2 -2
- package/src/ledger/helpers/getLedgerClient.ts +20 -13
- package/src/ledger/index.ts +34 -13
- package/src/ledger/interfaces/CosmosLedgerInterface.ts +14 -1
- package/dist/chunk-3zf2pqfd.js +0 -4
- package/dist/chunk-3zf2pqfd.js.map +0 -10
- package/dist/chunk-x85da57j.js +0 -4
- package/dist/chunk-x85da57j.js.map +0 -10
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type EthereumApp from "@ledgerhq/hw-app-eth";
|
|
2
|
+
import type Transport from "@ledgerhq/hw-transport";
|
|
2
3
|
import { ChainId, type DerivationPathArray } from "@swapkit/helpers";
|
|
3
4
|
import { AbstractSigner, type Provider, type TransactionRequest, type TypedDataDomain, type TypedDataField } from "ethers";
|
|
4
5
|
declare class EVMLedgerInterface extends AbstractSigner {
|
|
@@ -6,10 +7,12 @@ declare class EVMLedgerInterface extends AbstractSigner {
|
|
|
6
7
|
derivationPath: string;
|
|
7
8
|
ledgerApp: InstanceType<typeof EthereumApp> | null;
|
|
8
9
|
ledgerTimeout: number;
|
|
9
|
-
|
|
10
|
+
private readonly injectedTransport?;
|
|
11
|
+
constructor({ provider, derivationPath, chainId, transport, }: {
|
|
10
12
|
provider: Provider;
|
|
11
13
|
derivationPath?: DerivationPathArray | string;
|
|
12
14
|
chainId?: ChainId;
|
|
15
|
+
transport?: Transport;
|
|
13
16
|
});
|
|
14
17
|
connect: (provider: Provider) => EVMLedgerInterface;
|
|
15
18
|
checkOrCreateTransportAndLedger: () => Promise<void>;
|
|
@@ -33,6 +36,7 @@ declare class EVMLedgerInterface extends AbstractSigner {
|
|
|
33
36
|
type LedgerParams = {
|
|
34
37
|
provider: Provider;
|
|
35
38
|
derivationPath?: DerivationPathArray;
|
|
39
|
+
transport?: Transport;
|
|
36
40
|
};
|
|
37
41
|
export declare const ArbitrumLedger: (params: LedgerParams) => EVMLedgerInterface;
|
|
38
42
|
export declare const AuroraLedger: (params: LedgerParams) => EVMLedgerInterface;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evm.d.ts","sourceRoot":"","sources":["../../../../src/ledger/clients/evm.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,WAAW,MAAM,sBAAsB,CAAC;AACpD,OAAO,EACL,OAAO,EACP,KAAK,mBAAmB,EAIzB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,cAAc,EACd,KAAK,QAAQ,EACb,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,cAAc,EACpB,MAAM,QAAQ,CAAC;AAIhB,cAAM,kBAAmB,SAAQ,cAAc;IAC7C,OAAO,EAAE,OAAO,CAAoB;IACpC,cAAc,SAAM;IACpB,SAAS,EAAE,YAAY,CAAC,OAAO,WAAW,CAAC,GAAG,IAAI,CAAQ;IAC1D,aAAa,SAAS;
|
|
1
|
+
{"version":3,"file":"evm.d.ts","sourceRoot":"","sources":["../../../../src/ledger/clients/evm.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,WAAW,MAAM,sBAAsB,CAAC;AACpD,OAAO,KAAK,SAAS,MAAM,wBAAwB,CAAC;AACpD,OAAO,EACL,OAAO,EACP,KAAK,mBAAmB,EAIzB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,cAAc,EACd,KAAK,QAAQ,EACb,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,cAAc,EACpB,MAAM,QAAQ,CAAC;AAIhB,cAAM,kBAAmB,SAAQ,cAAc;IAC7C,OAAO,EAAE,OAAO,CAAoB;IACpC,cAAc,SAAM;I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cAAc,GAAI,QAAQ,YAAY,uBACe,CAAC;AACnE,eAAO,MAAM,YAAY,GAAI,QAAQ,YAAY,uBAAmE,CAAC;AACrH,eAAO,MAAM,cAAc,GAAI,QAAQ,YAAY,uBACe,CAAC;AACnE,eAAO,MAAM,aAAa,GAAI,QAAQ,YAAY,uBAAoE,CAAC;AACvH,eAAO,MAAM,uBAAuB,GAAI,QAAQ,YAAY,uBACe,CAAC;AAC5E,eAAO,MAAM,WAAW,GAAI,QAAQ,YAAY,uBAAkE,CAAC;AACnH,eAAO,MAAM,YAAY,GAAI,QAAQ,YAAY,uBAAmE,CAAC;AACrH,eAAO,MAAM,eAAe,GAAI,QAAQ,YAAY,uBACe,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import type Transport from "@ledgerhq/hw-transport";
|
|
1
2
|
import type { DerivationPathArray } from "@swapkit/helpers";
|
|
2
3
|
import type { NearSigner } from "@swapkit/toolboxes/near";
|
|
3
|
-
export declare function getNearLedgerClient(derivationPath?: DerivationPathArray): Promise<NearSigner>;
|
|
4
|
+
export declare function getNearLedgerClient(derivationPath?: DerivationPathArray, injectedTransport?: Transport): Promise<NearSigner>;
|
|
4
5
|
//# sourceMappingURL=near.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"near.d.ts","sourceRoot":"","sources":["../../../../src/ledger/clients/near.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"near.d.ts","sourceRoot":"","sources":["../../../../src/ledger/clients/near.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,wBAAwB,CAAC;AAEpD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAG1D,wBAAsB,mBAAmB,CAAC,cAAc,CAAC,EAAE,mBAAmB,EAAE,iBAAiB,CAAC,EAAE,SAAS,uBAyD5G"}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import type Sui from "@ledgerhq/hw-app-sui";
|
|
2
|
+
import type Transport from "@ledgerhq/hw-transport";
|
|
2
3
|
import { type DerivationPathArray } from "@swapkit/helpers";
|
|
3
4
|
export declare class SuiLedgerInterface {
|
|
4
5
|
derivationPath: string;
|
|
5
6
|
ledgerApp: InstanceType<typeof Sui> | null;
|
|
6
7
|
address: string | null;
|
|
7
8
|
publicKey: Uint8Array | null;
|
|
8
|
-
|
|
9
|
+
private readonly injectedTransport?;
|
|
10
|
+
constructor(derivationPath?: DerivationPathArray | string, transport?: Transport);
|
|
9
11
|
/**
|
|
10
12
|
* Transform derivation path for SUI Ledger format.
|
|
11
13
|
* SUI Ledger expects: 44'/784'/0'/0'/0' (all hardened, no 'm/' prefix)
|
|
@@ -23,5 +25,5 @@ export declare class SuiLedgerInterface {
|
|
|
23
25
|
signature: string;
|
|
24
26
|
}>;
|
|
25
27
|
}
|
|
26
|
-
export declare const SuiLedger: (derivationPath?: DerivationPathArray) => SuiLedgerInterface;
|
|
28
|
+
export declare const SuiLedger: (derivationPath?: DerivationPathArray, transport?: Transport) => SuiLedgerInterface;
|
|
27
29
|
//# sourceMappingURL=sui.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sui.d.ts","sourceRoot":"","sources":["../../../../src/ledger/clients/sui.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAEL,KAAK,mBAAmB,EAIzB,MAAM,kBAAkB,CAAC;AAI1B,qBAAa,kBAAkB;IAC7B,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,YAAY,CAAC,OAAO,GAAG,CAAC,GAAG,IAAI,CAAQ;IAClD,OAAO,EAAE,MAAM,GAAG,IAAI,CAAQ;IAC9B,SAAS,EAAE,UAAU,GAAG,IAAI,CAAQ;
|
|
1
|
+
{"version":3,"file":"sui.d.ts","sourceRoot":"","sources":["../../../../src/ledger/clients/sui.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,sBAAsB,CAAC;AAC5C,OAAO,KAAK,SAAS,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAEL,KAAK,mBAAmB,EAIzB,MAAM,kBAAkB,CAAC;AAI1B,qBAAa,kBAAkB;IAC7B,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,YAAY,CAAC,OAAO,GAAG,CAAC,GAAG,IAAI,CAAQ;IAClD,OAAO,EAAE,MAAM,GAAG,IAAI,CAAQ;IAC9B,SAAS,EAAE,UAAU,GAAG,IAAI,CAAQ;IACpC,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAY;gBAEnC,cAAc,CAAC,EAAE,mBAAmB,GAAG,MAAM,EAAE,SAAS,CAAC,EAAE,SAAS;IAQhF;;;;OAIG;IACH,OAAO,CAAC,aAAa;YAMP,wBAAwB;IAQhC,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC;IAoBhC,YAAY,IAAI,MAAM;IAOhB,UAAU,IAAI,OAAO,CAAC,MAAM,CAAC;IAK7B,eAAe,CACnB,KAAK,EAAE,UAAU,GAAG;QAAE,WAAW,EAAE,UAAU,CAAA;KAAE,GAC9C,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC;CAkDjD;AAED,eAAO,MAAM,SAAS,GAAI,iBAAiB,mBAAmB,EAAE,YAAY,SAAS,uBAClC,CAAC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import type Transport from "@ledgerhq/hw-transport";
|
|
1
2
|
import { type DerivationPathArray } from "@swapkit/helpers";
|
|
2
3
|
import { CosmosLedgerInterface } from "../../interfaces/CosmosLedgerInterface";
|
|
3
4
|
import type { GetAddressAndPubKeyResponse } from "../../types";
|
|
4
5
|
export declare class THORChainLedger extends CosmosLedgerInterface {
|
|
5
6
|
private pubKey;
|
|
6
7
|
derivationPath: DerivationPathArray;
|
|
7
|
-
constructor(derivationPath?: DerivationPathArray);
|
|
8
|
+
constructor(derivationPath?: DerivationPathArray, transport?: Transport);
|
|
8
9
|
get pubkey(): string | null;
|
|
9
10
|
connect: () => Promise<string>;
|
|
10
11
|
getAddressAndPubKey: () => Promise<GetAddressAndPubKeyResponse>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/ledger/clients/thorchain/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/ledger/clients/thorchain/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,wBAAwB,CAAC;AAEpD,OAAO,EAAE,KAAK,mBAAmB,EAAuC,MAAM,kBAAkB,CAAC;AAEjG,OAAO,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAC/E,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAC;AAG/D,qBAAa,eAAgB,SAAQ,qBAAqB;IACxD,OAAO,CAAC,MAAM,CAAuB;IAErC,cAAc,EAAE,mBAAmB,CAAC;gBAExB,cAAc,GAAE,mBAAgD,EAAE,SAAS,CAAC,EAAE,SAAS;IAMnG,IAAI,MAAM,kBAET;IAED,OAAO,wBAOL;IAEF,mBAAmB,6CAWjB;IAEF,oBAAoB,6CAWlB;IAEF,eAAe,GAAU,OAAO,MAAM,EAAE,iBAAc;;;;;;;SAgBpD;IAEF,IAAI,GAAU,SAAS,MAAM,qBAU3B;CACH"}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import type TronApp from "@ledgerhq/hw-app-trx";
|
|
2
|
+
import type Transport from "@ledgerhq/hw-transport";
|
|
2
3
|
import { type DerivationPathArray } from "@swapkit/helpers";
|
|
3
4
|
import type { TronSignedTransaction, TronSigner, TronTransaction } from "@swapkit/toolboxes/tron";
|
|
4
5
|
export declare class TronLedgerInterface implements TronSigner {
|
|
5
6
|
derivationPath: string;
|
|
6
7
|
ledgerApp: InstanceType<typeof TronApp> | null;
|
|
7
8
|
ledgerTimeout: number;
|
|
8
|
-
|
|
9
|
+
private readonly injectedTransport?;
|
|
10
|
+
constructor(derivationPath?: DerivationPathArray | string, transport?: Transport);
|
|
9
11
|
checkOrCreateTransportAndLedger: () => Promise<void>;
|
|
10
12
|
createTransportAndLedger: () => Promise<void>;
|
|
11
13
|
getAddress: () => Promise<string>;
|
|
@@ -19,5 +21,5 @@ export declare class TronLedgerInterface implements TronSigner {
|
|
|
19
21
|
} | undefined>;
|
|
20
22
|
signTransaction: (transaction: TronTransaction) => Promise<TronSignedTransaction>;
|
|
21
23
|
}
|
|
22
|
-
export declare const TronLedger: (derivationPath?: DerivationPathArray) => TronLedgerInterface;
|
|
24
|
+
export declare const TronLedger: (derivationPath?: DerivationPathArray, transport?: Transport) => TronLedgerInterface;
|
|
23
25
|
//# sourceMappingURL=tron.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tron.d.ts","sourceRoot":"","sources":["../../../../src/ledger/clients/tron.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,EACL,KAAK,mBAAmB,EAIzB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,qBAAqB,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAIlG,qBAAa,mBAAoB,YAAW,UAAU;IACpD,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,YAAY,CAAC,OAAO,OAAO,CAAC,GAAG,IAAI,CAAQ;IACtD,aAAa,SAAS;
|
|
1
|
+
{"version":3,"file":"tron.d.ts","sourceRoot":"","sources":["../../../../src/ledger/clients/tron.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,SAAS,MAAM,wBAAwB,CAAC;AACpD,OAAO,EACL,KAAK,mBAAmB,EAIzB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,qBAAqB,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAIlG,qBAAa,mBAAoB,YAAW,UAAU;IACpD,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,YAAY,CAAC,OAAO,OAAO,CAAC,GAAG,IAAI,CAAQ;IACtD,aAAa,SAAS;IACtB,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAY;gBAEnC,cAAc,CAAC,EAAE,mBAAmB,GAAG,MAAM,EAAE,SAAS,CAAC,EAAE,SAAS;IAQhF,+BAA+B,sBAG7B;IAEF,wBAAwB,sBAKtB;IAEF,UAAU,QAAa,OAAO,CAAC,MAAM,CAAC,CAIpC;IAEF,mBAAmB;;;OAOjB;IAEF,oBAAoB;;;mBAGlB;IAEF,eAAe,GAAU,aAAa,eAAe,KAAG,OAAO,CAAC,qBAAqB,CAAC,CA0BpF;CACH;AAED,eAAO,MAAM,UAAU,GAAI,iBAAiB,mBAAmB,EAAE,YAAY,SAAS,wBAClC,CAAC"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
+
import type Transport from "@ledgerhq/hw-transport";
|
|
1
2
|
import { type DerivationPathArray } from "@swapkit/helpers";
|
|
2
3
|
import type { Transaction } from "@swapkit/utxo-signer";
|
|
3
|
-
export declare const BitcoinPsbtLedger: (derivationPathArray?: DerivationPathArray | string) => {
|
|
4
|
+
export declare const BitcoinPsbtLedger: (derivationPathArray?: DerivationPathArray | string, injectedTransport?: Transport) => {
|
|
4
5
|
connect: () => Promise<void>;
|
|
5
6
|
getAddress: () => Promise<string>;
|
|
6
7
|
getExtendedPublicKey: (path?: string) => Promise<string>;
|
|
7
8
|
signTransaction: (tx: Transaction) => Promise<Transaction>;
|
|
8
9
|
};
|
|
9
|
-
export declare const LitecoinPsbtLedger: (derivationPathArray?: DerivationPathArray | string) => {
|
|
10
|
+
export declare const LitecoinPsbtLedger: (derivationPathArray?: DerivationPathArray | string, injectedTransport?: Transport) => {
|
|
10
11
|
connect: () => Promise<void>;
|
|
11
12
|
getAddress: () => Promise<string>;
|
|
12
13
|
getExtendedPublicKey: (path?: string) => Promise<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utxo-psbt.d.ts","sourceRoot":"","sources":["../../../../src/ledger/clients/utxo-psbt.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utxo-psbt.d.ts","sourceRoot":"","sources":["../../../../src/ledger/clients/utxo-psbt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,wBAAwB,CAAC;AAGpD,OAAO,EAAE,KAAK,mBAAmB,EAA4D,MAAM,kBAAkB,CAAC;AACtH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AA+IxD,eAAO,MAAM,iBAAiB,yBAzGE,mBAAmB,GAAG,MAAM,sBAAsB,SAAS;;;;0BAgFzD,WAAW,KAAG,OAAO,CAAC,WAAW,CAAC;CAyBK,CAAC;AAC1E,eAAO,MAAM,kBAAkB,yBA1GC,mBAAmB,GAAG,MAAM,sBAAsB,SAAS;;;;0BAgFzD,WAAW,KAAG,OAAO,CAAC,WAAW,CAAC;CA0BO,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import type Transport from "@ledgerhq/hw-transport";
|
|
1
2
|
import { type DerivationPathArray } from "@swapkit/helpers";
|
|
2
3
|
import type { UTXOType } from "@swapkit/toolboxes/utxo";
|
|
3
4
|
import type { PCZT, Transaction } from "@swapkit/utxo-signer";
|
|
4
|
-
export declare const BitcoinLedger: (derivationPathArray?: DerivationPathArray | string) => {
|
|
5
|
+
export declare const BitcoinLedger: (derivationPathArray?: DerivationPathArray | string, injectedTransport?: Transport) => {
|
|
5
6
|
connect: () => Promise<void>;
|
|
6
7
|
getAddress: () => Promise<string>;
|
|
7
8
|
getExtendedPublicKey: (path?: string, xpubVersion?: number) => Promise<string>;
|
|
@@ -13,7 +14,7 @@ export declare const BitcoinLedger: (derivationPathArray?: DerivationPathArray |
|
|
|
13
14
|
*/
|
|
14
15
|
signTransactionWithMultiplePaths: (tx: Transaction, inputUtxos: UTXOType[], derivationPaths: string[]) => Promise<string>;
|
|
15
16
|
};
|
|
16
|
-
export declare const LitecoinLedger: (derivationPathArray?: DerivationPathArray | string) => {
|
|
17
|
+
export declare const LitecoinLedger: (derivationPathArray?: DerivationPathArray | string, injectedTransport?: Transport) => {
|
|
17
18
|
connect: () => Promise<void>;
|
|
18
19
|
getAddress: () => Promise<string>;
|
|
19
20
|
getExtendedPublicKey: (path?: string, xpubVersion?: number) => Promise<string>;
|
|
@@ -25,7 +26,7 @@ export declare const LitecoinLedger: (derivationPathArray?: DerivationPathArray
|
|
|
25
26
|
*/
|
|
26
27
|
signTransactionWithMultiplePaths: (tx: Transaction, inputUtxos: UTXOType[], derivationPaths: string[]) => Promise<string>;
|
|
27
28
|
};
|
|
28
|
-
export declare const BitcoinCashLedger: (derivationPathArray?: DerivationPathArray | string) => {
|
|
29
|
+
export declare const BitcoinCashLedger: (derivationPathArray?: DerivationPathArray | string, injectedTransport?: Transport) => {
|
|
29
30
|
connect: () => Promise<void>;
|
|
30
31
|
getAddress: () => Promise<string>;
|
|
31
32
|
getExtendedPublicKey: (path?: string, xpubVersion?: number) => Promise<string>;
|
|
@@ -37,7 +38,7 @@ export declare const BitcoinCashLedger: (derivationPathArray?: DerivationPathArr
|
|
|
37
38
|
*/
|
|
38
39
|
signTransactionWithMultiplePaths: (tx: Transaction, inputUtxos: UTXOType[], derivationPaths: string[]) => Promise<string>;
|
|
39
40
|
};
|
|
40
|
-
export declare const DogecoinLedger: (derivationPathArray?: DerivationPathArray | string) => {
|
|
41
|
+
export declare const DogecoinLedger: (derivationPathArray?: DerivationPathArray | string, injectedTransport?: Transport) => {
|
|
41
42
|
connect: () => Promise<void>;
|
|
42
43
|
getAddress: () => Promise<string>;
|
|
43
44
|
getExtendedPublicKey: (path?: string, xpubVersion?: number) => Promise<string>;
|
|
@@ -49,7 +50,7 @@ export declare const DogecoinLedger: (derivationPathArray?: DerivationPathArray
|
|
|
49
50
|
*/
|
|
50
51
|
signTransactionWithMultiplePaths: (tx: Transaction, inputUtxos: UTXOType[], derivationPaths: string[]) => Promise<string>;
|
|
51
52
|
};
|
|
52
|
-
export declare const DashLedger: (derivationPathArray?: DerivationPathArray | string) => {
|
|
53
|
+
export declare const DashLedger: (derivationPathArray?: DerivationPathArray | string, injectedTransport?: Transport) => {
|
|
53
54
|
connect: () => Promise<void>;
|
|
54
55
|
getAddress: () => Promise<string>;
|
|
55
56
|
getExtendedPublicKey: (path?: string, xpubVersion?: number) => Promise<string>;
|
|
@@ -61,7 +62,7 @@ export declare const DashLedger: (derivationPathArray?: DerivationPathArray | st
|
|
|
61
62
|
*/
|
|
62
63
|
signTransactionWithMultiplePaths: (tx: Transaction, inputUtxos: UTXOType[], derivationPaths: string[]) => Promise<string>;
|
|
63
64
|
};
|
|
64
|
-
export declare const ZcashLedger: (derivationPathArray?: DerivationPathArray | string) => {
|
|
65
|
+
export declare const ZcashLedger: (derivationPathArray?: DerivationPathArray | string, injectedTransport?: Transport) => {
|
|
65
66
|
connect: () => Promise<void>;
|
|
66
67
|
getAddress: () => Promise<string>;
|
|
67
68
|
getExtendedPublicKey: (path?: string, xpubVersion?: number) => Promise<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utxo.d.ts","sourceRoot":"","sources":["../../../../src/ledger/clients/utxo.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utxo.d.ts","sourceRoot":"","sources":["../../../../src/ledger/clients/utxo.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,SAAS,MAAM,wBAAwB,CAAC;AAEpD,OAAO,EAAE,KAAK,mBAAmB,EAA4D,MAAM,kBAAkB,CAAC;AACtH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,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mBAAmB,MAAM,EAAE;CAgG/G,CAAC;AAEH,eAAO,MAAM,WAAW,yBArPQ,mBAAmB,GAAG,MAAM,sBAAsB,SAAS;;;;qBA6D9D,IAAI,KAAG,OAAO,CAAC,IAAI,CAAC;0BA4Ef,WAAW,cAAc,QAAQ,EAAE;IAM/D;;;OAGG;2CAC0C,WAAW,cAAc,QAAQ,EAAE,mBAAmB,MAAM,EAAE;CA+G/G,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import type Transport from "@ledgerhq/hw-transport";
|
|
1
2
|
import { type DerivationPathArray } from "@swapkit/helpers";
|
|
2
3
|
import type { RippleTransaction } from "@swapkit/toolboxes/ripple";
|
|
3
4
|
import type { Payment } from "xrpl";
|
|
4
|
-
export declare const XRPLedger: (derivationPath?: DerivationPathArray) => Promise<{
|
|
5
|
+
export declare const XRPLedger: (derivationPath?: DerivationPathArray, injectedTransport?: Transport) => Promise<{
|
|
5
6
|
getAddress: () => string;
|
|
6
7
|
signTransaction: (transaction: Payment | RippleTransaction) => Promise<{
|
|
7
8
|
hash: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xrp.d.ts","sourceRoot":"","sources":["../../../../src/ledger/clients/xrp.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"xrp.d.ts","sourceRoot":"","sources":["../../../../src/ledger/clients/xrp.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,SAAS,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAS,KAAK,mBAAmB,EAAiD,MAAM,kBAAkB,CAAC;AAClH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAEnE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAmBpC,eAAO,MAAM,SAAS,GAAU,iBAAiB,mBAAmB,EAAE,oBAAoB,SAAS;;mCAOrD,OAAO,GAAG,iBAAiB;;;;EAkBxE,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type Transport from "@ledgerhq/hw-transport";
|
|
1
2
|
import { Chain, type DerivationPathArray } from "@swapkit/helpers";
|
|
2
3
|
import { CosmosLedger } from "../clients/cosmos";
|
|
3
4
|
import { ArbitrumLedger, AuroraLedger, AvalancheLedger, BaseLedger, BerachainLedger, BinanceSmartChainLedger, EthereumLedger, GnosisLedger, MonadLedger, OptimismLedger, PolygonLedger, XLayerLedger } from "../clients/evm";
|
|
@@ -34,9 +35,10 @@ type LedgerSignerMap = {
|
|
|
34
35
|
[Chain.Zcash]: ReturnType<typeof ZcashLedger>;
|
|
35
36
|
};
|
|
36
37
|
type LedgerSupportedChain = keyof LedgerSignerMap;
|
|
37
|
-
export declare const getLedgerClient: <T extends LedgerSupportedChain>({ chain, derivationPath, }: {
|
|
38
|
+
export declare const getLedgerClient: <T extends LedgerSupportedChain>({ chain, derivationPath, transport, }: {
|
|
38
39
|
chain: T;
|
|
39
40
|
derivationPath?: DerivationPathArray;
|
|
41
|
+
transport?: Transport;
|
|
40
42
|
}) => Promise<LedgerSignerMap[T]>;
|
|
41
43
|
export {};
|
|
42
44
|
//# sourceMappingURL=getLedgerClient.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getLedgerClient.d.ts","sourceRoot":"","sources":["../../../../src/ledger/helpers/getLedgerClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,KAAK,mBAAmB,EAA6C,MAAM,kBAAkB,CAAC;AAE9G,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EACL,cAAc,EACd,YAAY,EACZ,eAAe,EACf,UAAU,EACV,eAAe,EACf,uBAAuB,EACvB,cAAc,EACd,YAAY,EACZ,WAAW,EACX,cAAc,EACd,aAAa,EACb,YAAY,EACb,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,M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U,CAAC,OAAO,WAAW,CAAC,CAAC;CAC/C,CAAC;AAEF,KAAK,oBAAoB,GAAG,MAAM,eAAe,CAAC;AAElD,eAAO,MAAM,eAAe,GAAU,CAAC,SAAS,oBAAoB,EAAE,uCAInE;IACD,KAAK,EAAE,CAAC,CAAC;IACT,cAAc,CAAC,EAAE,mBAAmB,CAAC;IACrC,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,KAAG,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CA6D7B,CAAC"}
|
|
@@ -1,9 +1,21 @@
|
|
|
1
|
+
import type Transport from "@ledgerhq/hw-transport";
|
|
1
2
|
import { Chain } from "@swapkit/helpers";
|
|
3
|
+
/**
|
|
4
|
+
* Options passed to `connectLedger` at call time.
|
|
5
|
+
*
|
|
6
|
+
* When `transport` is supplied, the consumer opens and owns its lifecycle —
|
|
7
|
+
* wallet-hardware will use that exact instance for every per-chain Ledger
|
|
8
|
+
* client and will NOT recreate it on `forceReconnect`. When omitted, the
|
|
9
|
+
* default browser flow (WebHID / WebUSB via `navigator.usb`) is used.
|
|
10
|
+
*/
|
|
11
|
+
export type ConnectLedgerOptions = {
|
|
12
|
+
transport?: Transport;
|
|
13
|
+
};
|
|
2
14
|
export declare const ledgerWallet: {
|
|
3
15
|
connectLedger: {
|
|
4
16
|
connectWallet: ({ addChain }: {
|
|
5
17
|
addChain: import("@swapkit/helpers").AddChainType;
|
|
6
|
-
}) => (chains: Chain[], derivationPath?: [44, 118, 0, 0, 0] | [44, 931, 0, 0, 0] | [number, number, number, number, number] | [44, 637, 0, 0, 0] | [44, 60, 0, 0, 0] | [44, 397, 0, 0, 0] | [0, 0, 0, 0, 0] | [44, 144, 0, 0, 0] | [44, 501, 0, 0, 0] | [44, 607, 0, 0, 0] | [44, 195, 0, 0, 0] | [44, 148, 0, 0, 0] | [44, 784, 0, 0, 0] | [1852, 1815, 0, 0, 0] | [44, 9004, 0, 0, 0] | [number, number, number, number, (number | undefined)?] | [44, 145, 0, 0, 0] | [84, 2, 0, 0, 0] | [44, 3, 0, 0, 0] | [44, 5, 0, 0, 0] | [44, 133, 0, 0, 0] | undefined) => Promise<boolean>;
|
|
18
|
+
}) => (chains: Chain[], derivationPath?: [44, 118, 0, 0, 0] | [44, 931, 0, 0, 0] | [number, number, number, number, number] | [44, 637, 0, 0, 0] | [44, 60, 0, 0, 0] | [44, 397, 0, 0, 0] | [0, 0, 0, 0, 0] | [44, 144, 0, 0, 0] | [44, 501, 0, 0, 0] | [44, 607, 0, 0, 0] | [44, 195, 0, 0, 0] | [44, 148, 0, 0, 0] | [44, 784, 0, 0, 0] | [1852, 1815, 0, 0, 0] | [44, 9004, 0, 0, 0] | [number, number, number, number, (number | undefined)?] | [44, 145, 0, 0, 0] | [84, 2, 0, 0, 0] | [44, 3, 0, 0, 0] | [44, 5, 0, 0, 0] | [44, 133, 0, 0, 0] | undefined, params_2?: ConnectLedgerOptions | undefined) => Promise<boolean>;
|
|
7
19
|
directSigningSupport: import("@swapkit/wallet-core").DirectSigningSupport;
|
|
8
20
|
supportedChains: (Chain.Arbitrum | Chain.Aurora | Chain.Avalanche | Chain.Base | Chain.Berachain | Chain.BinanceSmartChain | Chain.Bitcoin | Chain.BitcoinCash | Chain.Cosmos | Chain.Dash | Chain.Dogecoin | Chain.Ethereum | Chain.Gnosis | Chain.Litecoin | Chain.Monad | Chain.Near | Chain.Optimism | Chain.Polygon | Chain.Ripple | Chain.Sui | Chain.THORChain | Chain.Tron | Chain.XLayer | Chain.Zcash)[];
|
|
9
21
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ledger/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,EAYN,MAAM,kBAAkB,CAAC;AAkB1B,eAAO,MAAM,YAAY;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ledger/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAEL,KAAK,EAYN,MAAM,kBAAkB,CAAC;AAkB1B;;;;;;;GAOG;AACH,MAAM,MAAM,oBAAoB,GAAG;IAAE,SAAS,CAAC,EAAE,SAAS,CAAA;CAAE,CAAC;AAE7D,eAAO,MAAM,YAAY;;;;;;;;CAwEvB,CAAC;AAEH,eAAO,MAAM,uBAAuB,mYAAyC,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type Transport from "@ledgerhq/hw-transport";
|
|
1
2
|
import { type DerivationPathArray, LedgerErrorCode } from "@swapkit/helpers";
|
|
2
3
|
export declare abstract class CosmosLedgerInterface {
|
|
3
4
|
ledgerTimeout: number;
|
|
@@ -5,6 +6,8 @@ export declare abstract class CosmosLedgerInterface {
|
|
|
5
6
|
transport: any;
|
|
6
7
|
ledgerApp: any;
|
|
7
8
|
chain: "thor" | "cosmos";
|
|
9
|
+
private readonly injectedTransport?;
|
|
10
|
+
constructor(transport?: Transport);
|
|
8
11
|
checkOrCreateTransportAndLedger: (forceReconnect?: boolean) => Promise<any>;
|
|
9
12
|
validateResponse: (errorCode: LedgerErrorCode, message?: string) => void;
|
|
10
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CosmosLedgerInterface.d.ts","sourceRoot":"","sources":["../../../../src/ledger/interfaces/CosmosLedgerInterface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,mBAAmB,EAAE,eAAe,EAAuC,MAAM,kBAAkB,CAAC;AAKlH,8BAAsB,qBAAqB;IACzC,aAAa,SAAS;IACtB,cAAc,EAAE,mBAAmB,GAAG,MAAM,CAA8B;IAC1E,SAAS,EAAE,GAAG,CAAC;IACf,SAAS,EAAE,GAAG,CAAC;IACf,KAAK,EAAE,MAAM,GAAG,QAAQ,CAAU;IAElC,+BAA+B,GAAU,wBAAsB,
|
|
1
|
+
{"version":3,"file":"CosmosLedgerInterface.d.ts","sourceRoot":"","sources":["../../../../src/ledger/interfaces/CosmosLedgerInterface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,KAAK,mBAAmB,EAAE,eAAe,EAAuC,MAAM,kBAAkB,CAAC;AAKlH,8BAAsB,qBAAqB;IACzC,aAAa,SAAS;IACtB,cAAc,EAAE,mBAAmB,GAAG,MAAM,CAA8B;IAC1E,SAAS,EAAE,GAAG,CAAC;IACf,SAAS,EAAE,GAAG,CAAC;IACf,KAAK,EAAE,MAAM,GAAG,QAAQ,CAAU;IAElC,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAY;gBAEnC,SAAS,CAAC,EAAE,SAAS;IAKjC,+BAA+B,GAAU,wBAAsB,kBA4B7D;IAEF,gBAAgB,GAAI,WAAW,eAAe,EAAE,UAAU,MAAM,UAe9D;CACH"}
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"@ledgerhq/errors": "~6.29.0",
|
|
10
10
|
"@ledgerhq/hw-app-btc": "~10.17.0",
|
|
11
11
|
"@ledgerhq/hw-app-cosmos": "~6.33.0",
|
|
12
|
-
"@ledgerhq/hw-app-eth": "~7.4.
|
|
12
|
+
"@ledgerhq/hw-app-eth": "~7.4.2",
|
|
13
13
|
"@ledgerhq/hw-app-near": "~6.32.0",
|
|
14
14
|
"@ledgerhq/hw-app-sui": "~1.5.0",
|
|
15
15
|
"@ledgerhq/hw-app-trx": "~6.32.0",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"ledger-bitcoin": "~0.3.0",
|
|
32
32
|
"ripple-binary-codec": "2.5.1",
|
|
33
33
|
"ts-pattern": "^5.9.0",
|
|
34
|
-
"xrpl": "~4.4.
|
|
34
|
+
"xrpl": "~4.4.3"
|
|
35
35
|
},
|
|
36
36
|
"description": "SwapKit - Wallet Hardware",
|
|
37
37
|
"devDependencies": {
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"@ledgerhq/errors": "6.29.0",
|
|
44
44
|
"@ledgerhq/hw-app-btc": "10.17.0",
|
|
45
45
|
"@ledgerhq/hw-app-cosmos": "6.33.0",
|
|
46
|
-
"@ledgerhq/hw-app-eth": "7.4.
|
|
46
|
+
"@ledgerhq/hw-app-eth": "7.4.2",
|
|
47
47
|
"@ledgerhq/hw-app-near": "6.32.0",
|
|
48
48
|
"@ledgerhq/hw-app-sui": "1.5.0",
|
|
49
49
|
"@ledgerhq/hw-app-trx": "6.32.0",
|
|
@@ -107,5 +107,5 @@
|
|
|
107
107
|
"type-check:go": "tsgo"
|
|
108
108
|
},
|
|
109
109
|
"type": "module",
|
|
110
|
-
"version": "4.
|
|
110
|
+
"version": "4.9.0"
|
|
111
111
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type Transport from "@ledgerhq/hw-transport";
|
|
1
2
|
import {
|
|
2
3
|
type DerivationPathArray,
|
|
3
4
|
derivationPathToString,
|
|
@@ -11,8 +12,8 @@ export class CosmosLedger extends CosmosLedgerInterface {
|
|
|
11
12
|
|
|
12
13
|
derivationPath: string;
|
|
13
14
|
|
|
14
|
-
constructor(derivationPath: DerivationPathArray = NetworkDerivationPath.GAIA) {
|
|
15
|
-
super();
|
|
15
|
+
constructor(derivationPath: DerivationPathArray = NetworkDerivationPath.GAIA, transport?: Transport) {
|
|
16
|
+
super(transport);
|
|
16
17
|
this.chain = "cosmos";
|
|
17
18
|
this.derivationPath = derivationPathToString(derivationPath);
|
|
18
19
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type EthereumApp from "@ledgerhq/hw-app-eth";
|
|
2
|
+
import type Transport from "@ledgerhq/hw-transport";
|
|
2
3
|
import {
|
|
3
4
|
ChainId,
|
|
4
5
|
type DerivationPathArray,
|
|
@@ -21,22 +22,30 @@ class EVMLedgerInterface extends AbstractSigner {
|
|
|
21
22
|
derivationPath = "";
|
|
22
23
|
ledgerApp: InstanceType<typeof EthereumApp> | null = null;
|
|
23
24
|
ledgerTimeout = 50000;
|
|
25
|
+
private readonly injectedTransport?: Transport;
|
|
24
26
|
|
|
25
27
|
constructor({
|
|
26
28
|
provider,
|
|
27
29
|
derivationPath = NetworkDerivationPath.OP,
|
|
28
30
|
chainId = ChainId.Optimism,
|
|
29
|
-
|
|
31
|
+
transport,
|
|
32
|
+
}: { provider: Provider; derivationPath?: DerivationPathArray | string; chainId?: ChainId; transport?: Transport }) {
|
|
30
33
|
super(provider);
|
|
31
34
|
|
|
32
35
|
this.chainId = chainId || ChainId.Ethereum;
|
|
33
36
|
this.derivationPath = typeof derivationPath === "string" ? derivationPath : derivationPathToString(derivationPath);
|
|
37
|
+
this.injectedTransport = transport;
|
|
34
38
|
|
|
35
39
|
Object.defineProperty(this, "provider", { enumerable: true, value: provider || null, writable: false });
|
|
36
40
|
}
|
|
37
41
|
|
|
38
42
|
connect = (provider: Provider) =>
|
|
39
|
-
new EVMLedgerInterface({
|
|
43
|
+
new EVMLedgerInterface({
|
|
44
|
+
chainId: this.chainId,
|
|
45
|
+
derivationPath: this.derivationPath,
|
|
46
|
+
provider,
|
|
47
|
+
transport: this.injectedTransport,
|
|
48
|
+
});
|
|
40
49
|
|
|
41
50
|
checkOrCreateTransportAndLedger = async () => {
|
|
42
51
|
if (this.ledgerApp) return;
|
|
@@ -44,7 +53,7 @@ class EVMLedgerInterface extends AbstractSigner {
|
|
|
44
53
|
};
|
|
45
54
|
|
|
46
55
|
createTransportAndLedger = async () => {
|
|
47
|
-
const transport = await getLedgerTransport();
|
|
56
|
+
const transport = this.injectedTransport ?? (await getLedgerTransport());
|
|
48
57
|
const EthereumApp = (await import("@ledgerhq/hw-app-eth")).default;
|
|
49
58
|
|
|
50
59
|
this.ledgerApp = new EthereumApp(transport);
|
|
@@ -164,7 +173,7 @@ class EVMLedgerInterface extends AbstractSigner {
|
|
|
164
173
|
};
|
|
165
174
|
}
|
|
166
175
|
|
|
167
|
-
type LedgerParams = { provider: Provider; derivationPath?: DerivationPathArray };
|
|
176
|
+
type LedgerParams = { provider: Provider; derivationPath?: DerivationPathArray; transport?: Transport };
|
|
168
177
|
|
|
169
178
|
export const ArbitrumLedger = (params: LedgerParams) =>
|
|
170
179
|
new EVMLedgerInterface({ ...params, chainId: ChainId.Arbitrum });
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
+
import type Transport from "@ledgerhq/hw-transport";
|
|
1
2
|
import type { SignedTransaction, Transaction } from "@near-js/transactions";
|
|
2
3
|
import type { DerivationPathArray } from "@swapkit/helpers";
|
|
3
4
|
import type { NearSigner } from "@swapkit/toolboxes/near";
|
|
4
5
|
import { getLedgerTransport } from "../helpers/getLedgerTransport";
|
|
5
6
|
|
|
6
|
-
export async function getNearLedgerClient(derivationPath?: DerivationPathArray) {
|
|
7
|
+
export async function getNearLedgerClient(derivationPath?: DerivationPathArray, injectedTransport?: Transport) {
|
|
7
8
|
const Near = (await import("@ledgerhq/hw-app-near")).default;
|
|
8
9
|
const { Chain, NetworkDerivationPath, SwapKitError } = await import("@swapkit/helpers");
|
|
9
|
-
const transport = await getLedgerTransport();
|
|
10
|
+
const transport = injectedTransport ?? (await getLedgerTransport());
|
|
10
11
|
const nearApp = new Near(transport);
|
|
11
12
|
|
|
12
13
|
const path = (derivationPath || NetworkDerivationPath[Chain.Near]).join("'/").concat("'");
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type Sui from "@ledgerhq/hw-app-sui";
|
|
2
|
+
import type Transport from "@ledgerhq/hw-transport";
|
|
2
3
|
import {
|
|
3
4
|
Chain,
|
|
4
5
|
type DerivationPathArray,
|
|
@@ -14,12 +15,14 @@ export class SuiLedgerInterface {
|
|
|
14
15
|
ledgerApp: InstanceType<typeof Sui> | null = null;
|
|
15
16
|
address: string | null = null;
|
|
16
17
|
publicKey: Uint8Array | null = null;
|
|
18
|
+
private readonly injectedTransport?: Transport;
|
|
17
19
|
|
|
18
|
-
constructor(derivationPath?: DerivationPathArray | string) {
|
|
20
|
+
constructor(derivationPath?: DerivationPathArray | string, transport?: Transport) {
|
|
19
21
|
this.derivationPath =
|
|
20
22
|
typeof derivationPath === "string"
|
|
21
23
|
? derivationPath
|
|
22
24
|
: derivationPathToString(derivationPath || NetworkDerivationPath[Chain.Sui]);
|
|
25
|
+
this.injectedTransport = transport;
|
|
23
26
|
}
|
|
24
27
|
|
|
25
28
|
/**
|
|
@@ -36,7 +39,7 @@ export class SuiLedgerInterface {
|
|
|
36
39
|
private async createTransportAndLedger() {
|
|
37
40
|
if (this.ledgerApp) return;
|
|
38
41
|
|
|
39
|
-
const transport = await getLedgerTransport();
|
|
42
|
+
const transport = this.injectedTransport ?? (await getLedgerTransport());
|
|
40
43
|
const SuiApp = (await import("@ledgerhq/hw-app-sui")).default;
|
|
41
44
|
this.ledgerApp = new SuiApp(transport);
|
|
42
45
|
}
|
|
@@ -127,4 +130,5 @@ export class SuiLedgerInterface {
|
|
|
127
130
|
}
|
|
128
131
|
}
|
|
129
132
|
|
|
130
|
-
export const SuiLedger = (derivationPath?: DerivationPathArray) =>
|
|
133
|
+
export const SuiLedger = (derivationPath?: DerivationPathArray, transport?: Transport) =>
|
|
134
|
+
new SuiLedgerInterface(derivationPath, transport);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type Transport from "@ledgerhq/hw-transport";
|
|
1
2
|
import { base64 } from "@scure/base";
|
|
2
3
|
import { type DerivationPathArray, NetworkDerivationPath, SwapKitError } from "@swapkit/helpers";
|
|
3
4
|
|
|
@@ -10,8 +11,8 @@ export class THORChainLedger extends CosmosLedgerInterface {
|
|
|
10
11
|
|
|
11
12
|
derivationPath: DerivationPathArray;
|
|
12
13
|
|
|
13
|
-
constructor(derivationPath: DerivationPathArray = NetworkDerivationPath.THOR) {
|
|
14
|
-
super();
|
|
14
|
+
constructor(derivationPath: DerivationPathArray = NetworkDerivationPath.THOR, transport?: Transport) {
|
|
15
|
+
super(transport);
|
|
15
16
|
this.chain = "thor";
|
|
16
17
|
this.derivationPath = derivationPath;
|
|
17
18
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type TronApp from "@ledgerhq/hw-app-trx";
|
|
2
|
+
import type Transport from "@ledgerhq/hw-transport";
|
|
2
3
|
import {
|
|
3
4
|
type DerivationPathArray,
|
|
4
5
|
derivationPathToString,
|
|
@@ -13,12 +14,14 @@ export class TronLedgerInterface implements TronSigner {
|
|
|
13
14
|
derivationPath: string;
|
|
14
15
|
ledgerApp: InstanceType<typeof TronApp> | null = null;
|
|
15
16
|
ledgerTimeout = 50000;
|
|
17
|
+
private readonly injectedTransport?: Transport;
|
|
16
18
|
|
|
17
|
-
constructor(derivationPath?: DerivationPathArray | string) {
|
|
19
|
+
constructor(derivationPath?: DerivationPathArray | string, transport?: Transport) {
|
|
18
20
|
this.derivationPath =
|
|
19
21
|
typeof derivationPath === "string"
|
|
20
22
|
? derivationPath
|
|
21
23
|
: derivationPathToString(derivationPath || NetworkDerivationPath.TRON);
|
|
24
|
+
this.injectedTransport = transport;
|
|
22
25
|
}
|
|
23
26
|
|
|
24
27
|
checkOrCreateTransportAndLedger = async () => {
|
|
@@ -27,7 +30,7 @@ export class TronLedgerInterface implements TronSigner {
|
|
|
27
30
|
};
|
|
28
31
|
|
|
29
32
|
createTransportAndLedger = async () => {
|
|
30
|
-
const transport = await getLedgerTransport();
|
|
33
|
+
const transport = this.injectedTransport ?? (await getLedgerTransport());
|
|
31
34
|
const TronApp = (await import("@ledgerhq/hw-app-trx")).default;
|
|
32
35
|
|
|
33
36
|
this.ledgerApp = new TronApp(transport);
|
|
@@ -82,4 +85,5 @@ export class TronLedgerInterface implements TronSigner {
|
|
|
82
85
|
};
|
|
83
86
|
}
|
|
84
87
|
|
|
85
|
-
export const TronLedger = (derivationPath?: DerivationPathArray) =>
|
|
88
|
+
export const TronLedger = (derivationPath?: DerivationPathArray, transport?: Transport) =>
|
|
89
|
+
new TronLedgerInterface(derivationPath, transport);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type Transport from "@ledgerhq/hw-transport";
|
|
1
2
|
import { base64 } from "@scure/base";
|
|
2
3
|
import { HDKey } from "@scure/bip32";
|
|
3
4
|
import { type DerivationPathArray, derivationPathToString, getWalletFormatFor, SwapKitError } from "@swapkit/helpers";
|
|
@@ -39,27 +40,30 @@ function pathToNumberArray(path: string): number[] {
|
|
|
39
40
|
}
|
|
40
41
|
|
|
41
42
|
const BaseLedgerPsbtUTXO = ({ chain }: { chain: SupportedCoin }) => {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
43
|
+
return (derivationPathArray?: DerivationPathArray | string, injectedTransport?: Transport) => {
|
|
44
|
+
// Per-call state — each BitcoinPsbtLedger/LitecoinPsbtLedger invocation has its own
|
|
45
|
+
// AppClient and master fingerprint so different consumers (e.g. concurrent MCP
|
|
46
|
+
// sessions on different devices) cannot inherit each other's ledger bindings or xpub.
|
|
47
|
+
let appClient: import("ledger-bitcoin").AppClient | undefined;
|
|
48
|
+
let masterFingerprint: string | undefined;
|
|
49
|
+
|
|
50
|
+
async function getAppClient() {
|
|
51
|
+
if (!appClient) {
|
|
52
|
+
const transport = injectedTransport ?? (await getLedgerTransport());
|
|
53
|
+
const { AppClient } = await import("ledger-bitcoin");
|
|
54
|
+
appClient = new AppClient(transport);
|
|
55
|
+
}
|
|
56
|
+
return appClient;
|
|
50
57
|
}
|
|
51
|
-
return appClient;
|
|
52
|
-
}
|
|
53
58
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
59
|
+
async function getFingerprint() {
|
|
60
|
+
if (!masterFingerprint) {
|
|
61
|
+
const app = await getAppClient();
|
|
62
|
+
masterFingerprint = await app.getMasterFingerprint();
|
|
63
|
+
}
|
|
64
|
+
return masterFingerprint;
|
|
58
65
|
}
|
|
59
|
-
return masterFingerprint;
|
|
60
|
-
}
|
|
61
66
|
|
|
62
|
-
return (derivationPathArray?: DerivationPathArray | string) => {
|
|
63
67
|
// Single-address account: change == index == 0 by default.
|
|
64
68
|
const derivationPath = derivationPathArray ? pathToString(derivationPathArray) : "84'/0'/0'/0/0";
|
|
65
69
|
const accountPath = derivationPath.split("/").slice(0, 3).join("/");
|