@swapkit/wallet-hardware 6.1.1 → 6.3.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/THIRD_PARTY_LICENSES.md +4 -4
- package/dist/{chunk-jzrytcrf.js → chunk-0k1b2ddn.js} +3 -3
- package/dist/{chunk-jzrytcrf.js.map → chunk-0k1b2ddn.js.map} +2 -2
- package/dist/{chunk-jewm2ag3.js → chunk-2tzsz8f3.js} +4 -4
- package/dist/{chunk-jewm2ag3.js.map → chunk-2tzsz8f3.js.map} +1 -1
- package/dist/{chunk-yrxe491r.js → chunk-410fpx61.js} +4 -4
- package/dist/{chunk-yrxe491r.js.map → chunk-410fpx61.js.map} +1 -1
- package/dist/chunk-8mkdjmw2.js +4 -0
- package/dist/chunk-8mkdjmw2.js.map +10 -0
- package/dist/{chunk-xmvg4cds.js → chunk-96p7njae.js} +3 -3
- package/dist/{chunk-xmvg4cds.js.map → chunk-96p7njae.js.map} +2 -2
- package/dist/chunk-97nsp4z6.js +5 -0
- package/dist/chunk-97nsp4z6.js.map +10 -0
- package/dist/{chunk-nhva847d.js → chunk-9a9gn4pb.js} +3 -3
- package/dist/{chunk-5p3ttw6y.js.map → chunk-9a9gn4pb.js.map} +1 -1
- package/dist/chunk-a39rm9nv.js +4 -0
- package/dist/{chunk-gr3eswf1.js.map → chunk-a39rm9nv.js.map} +5 -5
- package/dist/chunk-c8mwf9cn.js +4 -0
- package/dist/{chunk-k3thje6a.js.map → chunk-c8mwf9cn.js.map} +1 -1
- package/dist/{chunk-ds2m83jp.js → chunk-dhhmywmb.js} +4 -4
- package/dist/{chunk-ds2m83jp.js.map → chunk-dhhmywmb.js.map} +1 -1
- package/dist/{chunk-eenx3cv6.js → chunk-dsa641rq.js} +3 -3
- package/dist/{chunk-eenx3cv6.js.map → chunk-dsa641rq.js.map} +2 -2
- package/dist/{chunk-0arpsm5f.js → chunk-grj9nvte.js} +3 -3
- package/dist/{chunk-0arpsm5f.js.map → chunk-grj9nvte.js.map} +1 -1
- package/dist/{chunk-hg71hp4m.js → chunk-napm4102.js} +3 -3
- package/dist/{chunk-hg71hp4m.js.map → chunk-napm4102.js.map} +1 -1
- package/dist/{chunk-k3thje6a.js → chunk-nb08g045.js} +3 -3
- package/dist/{chunk-nhva847d.js.map → chunk-nb08g045.js.map} +1 -1
- package/dist/chunk-npe2r2ge.js +4 -0
- package/dist/{chunk-xx7cwpzq.js.map → chunk-npe2r2ge.js.map} +1 -1
- package/dist/chunk-p9mwkgye.js +4 -0
- package/dist/{chunk-09e51wma.js.map → chunk-p9mwkgye.js.map} +14 -12
- package/dist/{chunk-wfbg89d3.js → chunk-qjp8j8e5.js} +3 -3
- package/dist/{chunk-wfbg89d3.js.map → chunk-qjp8j8e5.js.map} +1 -1
- package/dist/{chunk-xn0fnag5.js → chunk-r1fk1sx9.js} +3 -3
- package/dist/{chunk-xn0fnag5.js.map → chunk-r1fk1sx9.js.map} +1 -1
- package/dist/{chunk-1amf58aq.js → chunk-ta7bqmy3.js} +3 -3
- package/dist/{chunk-1amf58aq.js.map → chunk-ta7bqmy3.js.map} +1 -1
- package/dist/{chunk-3t17wpjg.js → chunk-tgvgr630.js} +3 -3
- package/dist/{chunk-3t17wpjg.js.map → chunk-tgvgr630.js.map} +2 -2
- package/dist/chunk-v8x9ptxs.js +4 -0
- package/dist/chunk-v8x9ptxs.js.map +10 -0
- package/dist/{chunk-dptbnkzm.js → chunk-wm89desc.js} +20 -20
- package/dist/{chunk-dptbnkzm.js.map → chunk-wm89desc.js.map} +12 -10
- package/dist/{chunk-5c7b7z2d.js → chunk-wtyhjt5e.js} +3 -3
- package/dist/{chunk-5c7b7z2d.js.map → chunk-wtyhjt5e.js.map} +1 -1
- package/dist/{chunk-tm47brht.js → chunk-xskdbz15.js} +3 -3
- package/dist/{chunk-tm47brht.js.map → chunk-xskdbz15.js.map} +2 -2
- package/dist/{chunk-8m2sn76p.js → chunk-ytjqb1sd.js} +3 -3
- package/dist/{chunk-8m2sn76p.js.map → chunk-ytjqb1sd.js.map} +1 -1
- package/dist/{chunk-3h1f3hyp.js → chunk-zbesf7sy.js} +3 -3
- package/dist/{chunk-3h1f3hyp.js.map → chunk-zbesf7sy.js.map} +1 -1
- package/dist/keepkey/index.cjs +2 -2
- package/dist/keepkey/index.cjs.map +3 -3
- package/dist/keepkey/index.js +2 -2
- package/dist/keepkey/index.js.map +3 -3
- package/dist/ledger/index.cjs +30 -30
- package/dist/ledger/index.cjs.map +35 -27
- package/dist/ledger/index.js +2 -2
- package/dist/ledger/index.js.map +11 -8
- package/dist/trezor/index.cjs +2 -2
- package/dist/trezor/index.cjs.map +7 -5
- package/dist/trezor/index.js +2 -2
- package/dist/trezor/index.js.map +3 -3
- package/dist/types/helpers/cardano.d.ts +35 -0
- package/dist/types/helpers/cardano.d.ts.map +1 -0
- package/dist/types/keepkey/index.d.ts +1 -0
- package/dist/types/keepkey/index.d.ts.map +1 -1
- package/dist/types/ledger/clients/cardano.d.ts +24 -0
- package/dist/types/ledger/clients/cardano.d.ts.map +1 -0
- package/dist/types/ledger/clients/evm.d.ts +1 -0
- package/dist/types/ledger/clients/evm.d.ts.map +1 -1
- package/dist/types/ledger/clients/stellar.d.ts +13 -0
- package/dist/types/ledger/clients/stellar.d.ts.map +1 -0
- package/dist/types/ledger/clients/ton.d.ts +13 -0
- package/dist/types/ledger/clients/ton.d.ts.map +1 -0
- package/dist/types/ledger/clients/zcash.d.ts.map +1 -1
- package/dist/types/ledger/helpers/getLedgerAddress.d.ts.map +1 -1
- package/dist/types/ledger/helpers/getLedgerClient.d.ts +8 -1
- package/dist/types/ledger/helpers/getLedgerClient.d.ts.map +1 -1
- package/dist/types/ledger/index.d.ts +3 -2
- package/dist/types/ledger/index.d.ts.map +1 -1
- package/dist/types/ledger/types.d.ts +2 -2
- package/dist/types/ledger/types.d.ts.map +1 -1
- package/dist/types/trezor/cardanoSigner.d.ts.map +1 -1
- package/dist/types/trezor/hypercoreSigner.d.ts +22 -0
- package/dist/types/trezor/hypercoreSigner.d.ts.map +1 -0
- package/dist/types/trezor/index.d.ts +3 -2
- package/dist/types/trezor/index.d.ts.map +1 -1
- package/dist/types/trezor/stellarSigner.d.ts +1 -1
- package/package.json +25 -13
- package/src/helpers/cardano.ts +112 -0
- package/src/keepkey/index.ts +14 -14
- package/src/ledger/clients/cardano.ts +204 -0
- package/src/ledger/clients/evm.ts +4 -0
- package/src/ledger/clients/stellar.ts +83 -0
- package/src/ledger/clients/ton.ts +282 -0
- package/src/ledger/clients/zcash.ts +16 -6
- package/src/ledger/helpers/getLedgerAddress.ts +16 -0
- package/src/ledger/helpers/getLedgerClient.ts +13 -0
- package/src/ledger/index.ts +102 -30
- package/src/ledger/types.ts +2 -0
- package/src/trezor/cardanoSigner.ts +24 -80
- package/src/trezor/hypercoreSigner.ts +96 -0
- package/src/trezor/index.ts +153 -75
- package/dist/chunk-09e51wma.js +0 -4
- package/dist/chunk-5p3ttw6y.js +0 -4
- package/dist/chunk-gr3eswf1.js +0 -4
- package/dist/chunk-qjq7gvyx.js +0 -4
- package/dist/chunk-qjq7gvyx.js.map +0 -10
- package/dist/chunk-xx7cwpzq.js +0 -4
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { BIP32Path, SignedTransactionData, SignTransactionRequest } from "@cardano-foundation/ledgerjs-hw-app-cardano";
|
|
2
|
+
import type Transport from "@ledgerhq/hw-transport";
|
|
3
|
+
import { type DerivationPathArray } from "@swapkit/helpers";
|
|
4
|
+
import { type LedgerJsClientParams } from "../helpers/ledgerJsDmkBridge";
|
|
5
|
+
export type CardanoLedgerModule = typeof import("@cardano-foundation/ledgerjs-hw-app-cardano");
|
|
6
|
+
export type CardanoLedgerAddressParams = {
|
|
7
|
+
address: string;
|
|
8
|
+
paymentPath: BIP32Path;
|
|
9
|
+
stakingPath: BIP32Path;
|
|
10
|
+
};
|
|
11
|
+
type CardanoLedgerParams = LedgerJsClientParams<DerivationPathArray>;
|
|
12
|
+
export declare function toLedgerCardanoTransaction(txHex: string, own: CardanoLedgerAddressParams, ledgerModule: CardanoLedgerModule): Promise<SignTransactionRequest>;
|
|
13
|
+
export declare function addLedgerWitnesses(txHex: string, { txHashHex, witnesses }: Pick<SignedTransactionData, "txHashHex" | "witnesses">, { paymentPath, publicKey }: {
|
|
14
|
+
paymentPath: BIP32Path;
|
|
15
|
+
publicKey: Uint8Array;
|
|
16
|
+
}): Promise<string>;
|
|
17
|
+
export declare function CardanoLedger(paramsOrPath?: CardanoLedgerParams | DerivationPathArray, transport?: Transport): Promise<{
|
|
18
|
+
getAddress: () => string;
|
|
19
|
+
publicKey: Buffer<ArrayBuffer>;
|
|
20
|
+
publicKeyHash: Buffer<ArrayBufferLike>;
|
|
21
|
+
signTransaction: (txHex: string) => Promise<string>;
|
|
22
|
+
}>;
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=cardano.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cardano.d.ts","sourceRoot":"","sources":["../../../../src/ledger/clients/cardano.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGV,SAAS,EAET,qBAAqB,EACrB,sBAAsB,EAGvB,MAAM,6CAA6C,CAAC;AAErD,OAAO,KAAK,SAAS,MAAM,wBAAwB,CAAC;AAEpD,OAAO,EAAS,KAAK,mBAAmB,EAAuC,MAAM,kBAAkB,CAAC;AAGxG,OAAO,EAEL,KAAK,oBAAoB,EAG1B,MAAM,8BAA8B,CAAC;AAEtC,MAAM,MAAM,mBAAmB,GAAG,cAAc,6CAA6C,CAAC,CAAC;AAC/F,MAAM,MAAM,0BAA0B,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,SAAS,CAAC;IAAC,WAAW,EAAE,SAAS,CAAA;CAAE,CAAC;AAE7G,KAAK,mBAAmB,GAAG,oBAAoB,CAAC,mBAAmB,CAAC,CAAC;AAoCrE,wBAAsB,0BAA0B,CAC9C,KAAK,EAAE,MAAM,EACb,GAAG,EAAE,0BAA0B,EAC/B,YAAY,EAAE,mBAAmB,GAChC,OAAO,CAAC,sBAAsB,CAAC,CAmCjC;AAED,wBAAsB,kBAAkB,CACtC,KAAK,EAAE,MAAM,EACb,EAAE,SAAS,EAAE,SAAS,EAAE,EAAE,IAAI,CAAC,qBAAqB,EAAE,WAAW,GAAG,WAAW,CAAC,EAChF,EAAE,WAAW,EAAE,SAAS,EAAE,EAAE;IAAE,WAAW,EAAE,SAAS,CAAC;IAAC,SAAS,EAAE,UAAU,CAAA;CAAE,mBA6B9E;AAED,wBAAsB,aAAa,CAAC,YAAY,CAAC,EAAE,mBAAmB,GAAG,mBAAmB,EAAE,SAAS,CAAC,EAAE,SAAS;;;;6BAuD3E,MAAM;GAW7C"}
|
|
@@ -42,6 +42,7 @@ export declare function EthereumLedger(params: LedgerParams): EVMLedgerInterface
|
|
|
42
42
|
export declare function GnosisLedger(params: LedgerParams): EVMLedgerInterface;
|
|
43
43
|
export declare function OptimismLedger(params: LedgerParams): EVMLedgerInterface;
|
|
44
44
|
export declare function PolygonLedger(params: LedgerParams): EVMLedgerInterface;
|
|
45
|
+
export declare function RobinhoodLedger(params: LedgerParams): EVMLedgerInterface;
|
|
45
46
|
export declare function BinanceSmartChainLedger(params: LedgerParams): EVMLedgerInterface;
|
|
46
47
|
export declare function MonadLedger(params: LedgerParams): EVMLedgerInterface;
|
|
47
48
|
export declare function XLayerLedger(params: LedgerParams): EVMLedgerInterface;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evm.d.ts","sourceRoot":"","sources":["../../../../src/ledger/clients/evm.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,OAAO,EACP,KAAK,mBAAmB,EAIzB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,cAAc,EACd,KAAK,QAAQ,EAEb,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,cAAc,EACpB,MAAM,QAAQ,CAAC;AAEhB,OAAO,EAA6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,SAAS,CAAC,MAAM,EAAE,YAAY,sBAE7C;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,YAAY,sBAEhD;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,YAAY,sBAEnD;AAED,wBAAgB,UAAU,CAAC,MAAM,EAAE,YAAY,sBAE9C;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,YAAY,sBAElD;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,YAAY,sBAEhD;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,YAAY,sBAElD;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,YAAY,sBAEjD;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,YAAY,sBAEnD;AAED,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,YAAY,sBAE3D;AAED,wBAAgB,WAAW,CAAC,MAAM,EAAE,YAAY,sBAE/C;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,YAAY,sBAEhD;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,YAAY,sBAEnD"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type Transport from "@ledgerhq/hw-transport";
|
|
2
|
+
import { type DerivationPathArray } from "@swapkit/helpers";
|
|
3
|
+
import type { StellarTransaction } from "@swapkit/toolboxes/stellar";
|
|
4
|
+
import { type LedgerJsClientParams } from "../helpers/ledgerJsDmkBridge";
|
|
5
|
+
type StellarLedgerParams = LedgerJsClientParams<DerivationPathArray>;
|
|
6
|
+
export declare function getStellarLedgerPath(derivationPath: DerivationPathArray): string;
|
|
7
|
+
export declare function StellarLedger(paramsOrPath?: StellarLedgerParams | DerivationPathArray, transport?: Transport): Promise<{
|
|
8
|
+
getAddress: () => string;
|
|
9
|
+
publicKey: Buffer<ArrayBufferLike>;
|
|
10
|
+
signTransaction: (transaction: StellarTransaction) => Promise<StellarTransaction>;
|
|
11
|
+
}>;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=stellar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stellar.d.ts","sourceRoot":"","sources":["../../../../src/ledger/clients/stellar.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,SAAS,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAEL,KAAK,mBAAmB,EAIzB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAiB,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAEpF,OAAO,EAEL,KAAK,oBAAoB,EAG1B,MAAM,8BAA8B,CAAC;AAEtC,KAAK,mBAAmB,GAAG,oBAAoB,CAAC,mBAAmB,CAAC,CAAC;AAGrE,wBAAgB,oBAAoB,CAAC,cAAc,EAAE,mBAAmB,UAYvE;AAED,wBAAsB,aAAa,CAAC,YAAY,CAAC,EAAE,mBAAmB,GAAG,mBAAmB,EAAE,SAAS,CAAC,EAAE,SAAS;;;mCA4BrE,kBAAkB;GAkB/D"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type Transport from "@ledgerhq/hw-transport";
|
|
2
|
+
import { type DerivationPathArray } from "@swapkit/helpers";
|
|
3
|
+
import type { TONTransactionInput } from "@swapkit/toolboxes/ton";
|
|
4
|
+
import type { Cell } from "@ton/core";
|
|
5
|
+
import { type LedgerJsClientParams } from "../helpers/ledgerJsDmkBridge";
|
|
6
|
+
type TONLedgerParams = LedgerJsClientParams<DerivationPathArray>;
|
|
7
|
+
export declare function TONLedger(paramsOrPath?: TONLedgerParams | DerivationPathArray, transport?: Transport): Promise<{
|
|
8
|
+
getAddress: () => string;
|
|
9
|
+
publicKey: Buffer<ArrayBufferLike>;
|
|
10
|
+
signTransaction: (input: TONTransactionInput) => Promise<Cell>;
|
|
11
|
+
}>;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=ton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ton.d.ts","sourceRoot":"","sources":["../../../../src/ledger/clients/ton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,2CAA4C,SAAQ,IAAI,CAAC,0BAA0B,EAAE,iBAAiB,CAAC;IAC/G,eAAe,EAAE,MAAM,EAAE,CAAC;CAC3B;AAmRD,wBAAgB,WAAW,CAAC,EAC1B,cAA0C,EAC1C,UAAU,EACV,mBAAmB,EACnB,SAAS,GACV,GAAE,iBAAsB;;;;;;;;;;;;;oDA6BpB,0BAA0B;;;;;;;;;;uEAuBmD,0BAA0B;+CAkEvD,2CAA2C;EAG/F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getLedgerAddress.d.ts","sourceRoot":"","sources":["../../../../src/ledger/helpers/getLedgerAddress.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getLedgerAddress.d.ts","sourceRoot":"","sources":["../../../../src/ledger/helpers/getLedgerAddress.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAExD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD,eAAO,MAAM,gBAAgB,GAC3B,CAAC,SAAS,CAAC,OAAO,uBAAuB,EAAE,MAAM,CAAC,EAClD,CAAC,SAAS,OAAO,CAAC,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,EACxD,0BAGC;IACD,KAAK,EAAE,CAAC,CAAC;IACT,YAAY,EAAE,CAAC,CAAC;CACjB,oBAsEA,CAAC"}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import type Transport from "@ledgerhq/hw-transport";
|
|
2
2
|
import { Chain, type DerivationPathArray } from "@swapkit/helpers";
|
|
3
3
|
import { BitcoinLedger } from "../clients/bitcoin";
|
|
4
|
+
import { CardanoLedger } from "../clients/cardano";
|
|
4
5
|
import { CosmosLedger } from "../clients/cosmos";
|
|
5
|
-
import { ArbitrumLedger, ArcLedger, AuroraLedger, AvalancheLedger, BaseLedger, BerachainLedger, BinanceSmartChainLedger, EthereumLedger, GnosisLedger, MonadLedger, OptimismLedger, PolygonLedger, XLayerLedger } from "../clients/evm";
|
|
6
|
+
import { ArbitrumLedger, ArcLedger, AuroraLedger, AvalancheLedger, BaseLedger, BerachainLedger, BinanceSmartChainLedger, EthereumLedger, GnosisLedger, MonadLedger, OptimismLedger, PolygonLedger, RobinhoodLedger, XLayerLedger } from "../clients/evm";
|
|
6
7
|
import { getNearLedgerClient } from "../clients/near";
|
|
8
|
+
import { StellarLedger } from "../clients/stellar";
|
|
7
9
|
import { SuiLedger } from "../clients/sui";
|
|
8
10
|
import { THORChainLedger } from "../clients/thorchain";
|
|
11
|
+
import { TONLedger } from "../clients/ton";
|
|
9
12
|
import { TronLedger } from "../clients/tron";
|
|
10
13
|
import { BitcoinCashLedger, DashLedger, DogecoinLedger, LitecoinLedger } from "../clients/utxo";
|
|
11
14
|
import { XRPLedger } from "../clients/xrp";
|
|
@@ -22,6 +25,7 @@ type LedgerSignerMap = {
|
|
|
22
25
|
[Chain.BinanceSmartChain]: ReturnType<typeof BinanceSmartChainLedger>;
|
|
23
26
|
[Chain.BitcoinCash]: ReturnType<typeof BitcoinCashLedger>;
|
|
24
27
|
[Chain.Bitcoin]: ReturnType<typeof BitcoinLedger>;
|
|
28
|
+
[Chain.Cardano]: ReturnType<typeof CardanoLedger>;
|
|
25
29
|
[Chain.Cosmos]: CosmosLedger;
|
|
26
30
|
[Chain.Dash]: ReturnType<typeof DashLedger>;
|
|
27
31
|
[Chain.Dogecoin]: ReturnType<typeof DogecoinLedger>;
|
|
@@ -33,8 +37,11 @@ type LedgerSignerMap = {
|
|
|
33
37
|
[Chain.Optimism]: ReturnType<typeof OptimismLedger>;
|
|
34
38
|
[Chain.Polygon]: ReturnType<typeof PolygonLedger>;
|
|
35
39
|
[Chain.Ripple]: ReturnType<typeof XRPLedger>;
|
|
40
|
+
[Chain.Robinhood]: ReturnType<typeof RobinhoodLedger>;
|
|
41
|
+
[Chain.Stellar]: ReturnType<typeof StellarLedger>;
|
|
36
42
|
[Chain.Sui]: ReturnType<typeof SuiLedger>;
|
|
37
43
|
[Chain.THORChain]: THORChainLedger;
|
|
44
|
+
[Chain.Ton]: ReturnType<typeof TONLedger>;
|
|
38
45
|
[Chain.Tron]: ReturnType<typeof TronLedger>;
|
|
39
46
|
[Chain.XLayer]: ReturnType<typeof XLayerLedger>;
|
|
40
47
|
[Chain.Zcash]: ReturnType<typeof ZcashLedger>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getLedgerClient.d.ts","sourceRoot":"","sources":["../../../../src/ledger/helpers/getLedgerClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,wBAAwB,CAAC;AACpD,OAAO,EACL,KAAK,EACL,KAAK,mBAAmB,EAMzB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EACL,cAAc,EACd,SAAS,EACT,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,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAChG,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC;AAC9C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U,CAAC,EAAE,gBAAgB,CAAC;IAC9B,cAAc,CAAC,EAAE,mBAAmB,CAAC;IACrC,mBAAmB,CAAC,EAAE,8BAA8B,CAAC;IACrD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAuF9B"}
|
|
@@ -27,10 +27,11 @@ export declare const ledgerWallet: {
|
|
|
27
27
|
}) => (chains: Chain[], derivationPath?: readonly [44, 118, 0, 0, 0] | readonly [44, 931, 0, 0, 0] | readonly [number, number, number, number, number] | readonly [44, 683, 0, 0] | readonly [44, 637, 0, 0, 0] | readonly [44, 60, 0, 0, 0] | readonly [44, 397, 0, 0, 0] | readonly [0, 0, 0, 0, 0] | readonly [44, 144, 0, 0, 0] | readonly [44, 501, 0, 0] | readonly [8797555, 1, 0, 0, 0] | readonly [44, 607, 0, 0, 0] | readonly [44, 195, 0, 0, 0] | readonly [44, 148, 0, 0, 0] | readonly [44, 784, 0, 0, 0] | readonly [1852, 1815, 0, 0, 0] | readonly [44, 9004, 0, 0, 0] | readonly [number, number, number, number, (number | undefined)?] | readonly [44, 145, 0, 0, 0] | readonly [84, 2, 0, 0, 0] | readonly [44, 3, 0, 0, 0] | readonly [44, 5, 0, 0, 0] | readonly [44, 133, 0, 0, 0] | undefined, params_2?: ConnectLedgerOptions | undefined) => Promise<boolean>;
|
|
28
28
|
directSigningSupport: import("@swapkit/wallet-core").DirectSigningSupport;
|
|
29
29
|
getExtendedPublicKey?: import("@swapkit/wallet-core").GetExtendedPublicKey;
|
|
30
|
-
|
|
30
|
+
signingSupport?: import("@swapkit/wallet-core").ChainSigningSupport;
|
|
31
|
+
supportedChains: (Chain.Arbitrum | Chain.Arc | Chain.Aurora | Chain.Avalanche | Chain.Base | Chain.Berachain | Chain.BinanceSmartChain | Chain.Bitcoin | Chain.BitcoinCash | Chain.Cardano | Chain.Cosmos | Chain.Dash | Chain.Dogecoin | Chain.Ethereum | Chain.Gnosis | Chain.Litecoin | Chain.Monad | Chain.Near | Chain.Optimism | Chain.Polygon | Chain.Ripple | Chain.Robinhood | Chain.Stellar | Chain.Sui | Chain.THORChain | Chain.Ton | Chain.Tron | Chain.XLayer | Chain.Zcash)[];
|
|
31
32
|
};
|
|
32
33
|
};
|
|
33
|
-
export declare const LEDGER_SUPPORTED_CHAINS: (Chain.Arbitrum | Chain.Arc | 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)[];
|
|
34
|
+
export declare const LEDGER_SUPPORTED_CHAINS: (Chain.Arbitrum | Chain.Arc | Chain.Aurora | Chain.Avalanche | Chain.Base | Chain.Berachain | Chain.BinanceSmartChain | Chain.Bitcoin | Chain.BitcoinCash | Chain.Cardano | Chain.Cosmos | Chain.Dash | Chain.Dogecoin | Chain.Ethereum | Chain.Gnosis | Chain.Litecoin | Chain.Monad | Chain.Near | Chain.Optimism | Chain.Polygon | Chain.Ripple | Chain.Robinhood | Chain.Stellar | Chain.Sui | Chain.THORChain | Chain.Ton | Chain.Tron | Chain.XLayer | Chain.Zcash)[];
|
|
34
35
|
export declare function getLedgerExtendedPublicKey(chain: Chain, derivationPath?: DerivationPathArray, { accountIndex, dmkSession, onDeviceActionState, transport, }?: {
|
|
35
36
|
accountIndex?: number;
|
|
36
37
|
dmkSession?: LedgerDMKSession;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ledger/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,wBAAwB,CAAC;AAEpD,OAAO,EAEL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mB,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { BitcoinLedger } from "./clients/bitcoin";
|
|
2
2
|
import type { CosmosLedger } from "./clients/cosmos";
|
|
3
|
-
import type { ArbitrumLedger, ArcLedger, AuroraLedger, AvalancheLedger, BaseLedger, BerachainLedger, BinanceSmartChainLedger, EthereumLedger, GnosisLedger, MonadLedger, OptimismLedger, PolygonLedger, XLayerLedger } from "./clients/evm";
|
|
3
|
+
import type { ArbitrumLedger, ArcLedger, AuroraLedger, AvalancheLedger, BaseLedger, BerachainLedger, BinanceSmartChainLedger, EthereumLedger, GnosisLedger, MonadLedger, OptimismLedger, PolygonLedger, RobinhoodLedger, XLayerLedger } from "./clients/evm";
|
|
4
4
|
import type { SuiLedger } from "./clients/sui";
|
|
5
5
|
import type { THORChainLedger } from "./clients/thorchain";
|
|
6
6
|
import type { TronLedger } from "./clients/tron";
|
|
@@ -8,7 +8,7 @@ import type { BitcoinCashLedger, DashLedger, DogecoinLedger, LitecoinLedger } fr
|
|
|
8
8
|
import type { ZcashLedger } from "./clients/zcash";
|
|
9
9
|
export type UTXOLedgerClients = ReturnType<typeof BitcoinLedger> | ReturnType<typeof BitcoinCashLedger> | ReturnType<typeof DashLedger> | ReturnType<typeof DogecoinLedger> | ReturnType<typeof LitecoinLedger> | ReturnType<typeof ZcashLedger>;
|
|
10
10
|
export type CosmosLedgerClients = CosmosLedger | THORChainLedger;
|
|
11
|
-
export type EVMLedgerClients = ReturnType<typeof ArbitrumLedger> | ReturnType<typeof ArcLedger> | ReturnType<typeof AuroraLedger> | ReturnType<typeof AvalancheLedger> | ReturnType<typeof BaseLedger> | ReturnType<typeof BerachainLedger> | ReturnType<typeof BinanceSmartChainLedger> | ReturnType<typeof GnosisLedger> | ReturnType<typeof EthereumLedger> | ReturnType<typeof MonadLedger> | ReturnType<typeof OptimismLedger> | ReturnType<typeof PolygonLedger> | ReturnType<typeof XLayerLedger>;
|
|
11
|
+
export type EVMLedgerClients = ReturnType<typeof ArbitrumLedger> | ReturnType<typeof ArcLedger> | ReturnType<typeof AuroraLedger> | ReturnType<typeof AvalancheLedger> | ReturnType<typeof BaseLedger> | ReturnType<typeof BerachainLedger> | ReturnType<typeof BinanceSmartChainLedger> | ReturnType<typeof GnosisLedger> | ReturnType<typeof EthereumLedger> | ReturnType<typeof MonadLedger> | ReturnType<typeof OptimismLedger> | ReturnType<typeof PolygonLedger> | ReturnType<typeof RobinhoodLedger> | ReturnType<typeof XLayerLedger>;
|
|
12
12
|
export type TronLedgerClient = ReturnType<typeof TronLedger>;
|
|
13
13
|
export type SuiLedgerClient = ReturnType<typeof SuiLedger>;
|
|
14
14
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/ledger/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EACV,cAAc,EACd,SAAS,EACT,YAAY,EACZ,eAAe,EACf,UAAU,EACV,eAAe,EACf,uBAAuB,EACvB,cAAc,EACd,YAAY,EACZ,WAAW,EACX,cAAc,EACd,aAAa,EACb,YAAY,EACb,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACpG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnD,MAAM,MAAM,iBAAiB,GACzB,UAA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AAC,OAAO,YAAY,CAAC,CAAC;AACpC,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;AAC7D,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cardanoSigner.d.ts","sourceRoot":"","sources":["../../../src/trezor/cardanoSigner.ts"],"names":[],"mappings":"AACA,OAAO,EAAS,KAAK,mBAAmB,EAAwC,MAAM,kBAAkB,CAAC;AAOzG,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"cardanoSigner.d.ts","sourceRoot":"","sources":["../../../src/trezor/cardanoSigner.ts"],"names":[],"mappings":"AACA,OAAO,EAAS,KAAK,mBAAmB,EAAwC,MAAM,kBAAkB,CAAC;AAOzG,OAAO,KAAK,EAGV,mBAAmB,EACnB,sBAAsB,EACvB,MAAM,qBAAqB,CAAC;AAI7B,KAAK,oBAAoB,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,CAAC;AACnF,MAAM,MAAM,mBAAmB,GAAG,cAAc,qBAAqB,CAAC,CAAC;AAqDvE,wBAAsB,0BAA0B,CAC9C,KAAK,EAAE,MAAM,EACb,GAAG,EAAE,oBAAoB,EACzB,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,sBAAsB,CAAC,CAsBjC;AAED,wBAAsB,kBAAkB,CACtC,KAAK,EAAE,MAAM,EACb,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,IAAI,CAAC,mBAAmB,EAAE,MAAM,GAAG,WAAW,CAAC,EACpE,SAAS,EAAE,MAAM,EACjB,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,mBAAmB,mBActC;AAED,wBAAsB,gBAAgB,CAAC,EACrC,OAAO,EACP,cAAc,GACf,EAAE;IACD,OAAO,EAAE,mBAAmB,CAAC;IAC7B,cAAc,EAAE,mBAAmB,CAAC;CACrC;;;;6BAkCuC,MAAM;GAU7C"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type DerivationPathArray } from "@swapkit/helpers";
|
|
2
|
+
import type { TypedDataDomain, TypedDataField } from "ethers";
|
|
3
|
+
type TypedDataTypes = Record<string, TypedDataField[]>;
|
|
4
|
+
type TypedDataValue = Record<string, unknown>;
|
|
5
|
+
export declare function toTrezorHyperCoreTypedData(domain: TypedDataDomain, types: TypedDataTypes, message: TypedDataValue): Promise<{
|
|
6
|
+
domain: TypedDataDomain;
|
|
7
|
+
message: TypedDataValue;
|
|
8
|
+
primaryType: string;
|
|
9
|
+
types: {
|
|
10
|
+
EIP712Domain: TypedDataField[] | undefined;
|
|
11
|
+
};
|
|
12
|
+
}>;
|
|
13
|
+
export declare function getHyperCoreSigner({ address: knownAddress, derivationPath, }: {
|
|
14
|
+
address?: string;
|
|
15
|
+
derivationPath: DerivationPathArray;
|
|
16
|
+
}): {
|
|
17
|
+
getAddress: () => Promise<string>;
|
|
18
|
+
signTransaction: () => Promise<never>;
|
|
19
|
+
signTypedData: (domain: TypedDataDomain, types: TypedDataTypes, message: TypedDataValue) => Promise<string>;
|
|
20
|
+
};
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=hypercoreSigner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hypercoreSigner.d.ts","sourceRoot":"","sources":["../../../src/trezor/hypercoreSigner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,KAAK,mBAAmB,EAAwC,MAAM,kBAAkB,CAAC;AACzG,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAE9D,KAAK,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,EAAE,CAAC,CAAC;AACvD,KAAK,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAM9C,wBAAsB,0BAA0B,CAC9C,MAAM,EAAE,eAAe,EACvB,KAAK,EAAE,cAAc,EACrB,OAAO,EAAE,cAAc;;;;;;;GAqBxB;AAED,wBAAgB,kBAAkB,CAAC,EACjC,OAAO,EAAE,YAAY,EACrB,cAAc,GACf,EAAE;IACD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,mBAAmB,CAAC;CACrC;;;4BAyBiC,eAAe,SAAS,cAAc,WAAW,cAAc;EA4BhG"}
|
|
@@ -15,9 +15,10 @@ export declare const trezorWallet: {
|
|
|
15
15
|
}) => (chains: Chain[], derivationPath: readonly [44, 118, 0, 0, 0] | readonly [44, 931, 0, 0, 0] | readonly [number, number, number, number, number] | readonly [44, 683, 0, 0] | readonly [44, 637, 0, 0, 0] | readonly [44, 60, 0, 0, 0] | readonly [44, 397, 0, 0, 0] | readonly [0, 0, 0, 0, 0] | readonly [44, 144, 0, 0, 0] | readonly [44, 501, 0, 0] | readonly [8797555, 1, 0, 0, 0] | readonly [44, 607, 0, 0, 0] | readonly [44, 195, 0, 0, 0] | readonly [44, 148, 0, 0, 0] | readonly [44, 784, 0, 0, 0] | readonly [1852, 1815, 0, 0, 0] | readonly [44, 9004, 0, 0, 0] | readonly [number, number, number, number, (number | undefined)?] | readonly [44, 145, 0, 0, 0] | readonly [84, 2, 0, 0, 0] | readonly [44, 3, 0, 0, 0] | readonly [44, 5, 0, 0, 0] | readonly [44, 133, 0, 0, 0], params_2?: ConnectTrezorOptions | undefined) => Promise<boolean>;
|
|
16
16
|
directSigningSupport: import("@swapkit/wallet-core").DirectSigningSupport;
|
|
17
17
|
getExtendedPublicKey?: import("@swapkit/wallet-core").GetExtendedPublicKey;
|
|
18
|
-
|
|
18
|
+
signingSupport?: import("@swapkit/wallet-core").ChainSigningSupport;
|
|
19
|
+
supportedChains: (Chain.Arbitrum | Chain.Arc | Chain.Aurora | Chain.Avalanche | Chain.Base | Chain.Berachain | Chain.BinanceSmartChain | Chain.Bitcoin | Chain.BitcoinCash | Chain.Cardano | Chain.Dash | Chain.Dogecoin | Chain.Ethereum | Chain.Gnosis | Chain.Hyperevm | Chain.Hype | Chain.Litecoin | Chain.Monad | Chain.Optimism | Chain.Polygon | Chain.Ripple | Chain.Robinhood | Chain.Solana | Chain.Stellar | Chain.Tron | Chain.XLayer | Chain.Zcash)[];
|
|
19
20
|
};
|
|
20
21
|
};
|
|
21
|
-
export declare const TREZOR_SUPPORTED_CHAINS: (Chain.Arbitrum | Chain.Arc | Chain.Aurora | Chain.Avalanche | Chain.Base | Chain.Berachain | Chain.BinanceSmartChain | Chain.Bitcoin | Chain.BitcoinCash | Chain.Cardano | Chain.Dash | Chain.Dogecoin | Chain.Ethereum | Chain.Gnosis | Chain.Hyperevm | Chain.Litecoin | Chain.Monad | Chain.Optimism | Chain.Polygon | Chain.Ripple | Chain.Robinhood | Chain.Solana | Chain.Stellar | Chain.Tron | Chain.XLayer | Chain.Zcash)[];
|
|
22
|
+
export declare const TREZOR_SUPPORTED_CHAINS: (Chain.Arbitrum | Chain.Arc | Chain.Aurora | Chain.Avalanche | Chain.Base | Chain.Berachain | Chain.BinanceSmartChain | Chain.Bitcoin | Chain.BitcoinCash | Chain.Cardano | Chain.Dash | Chain.Dogecoin | Chain.Ethereum | Chain.Gnosis | Chain.Hyperevm | Chain.Hype | Chain.Litecoin | Chain.Monad | Chain.Optimism | Chain.Polygon | Chain.Ripple | Chain.Robinhood | Chain.Solana | Chain.Stellar | Chain.Tron | Chain.XLayer | Chain.Zcash)[];
|
|
22
23
|
export {};
|
|
23
24
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/trezor/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,EACL,KAAK,mBAAmB,EAQxB,KAAK,SAAS,EAGf,MAAM,kBAAkB,CAAC;AAY1B,OAAO,EAA0C,KAAK,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AAQlH,KAAK,oBAAoB,GAAG;IAAE,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AA6HjD,wBAAgB,gCAAgC,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,UA6B9E;AAoJD,wBAAgB,wBAAwB,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,2BAS1E;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/trezor/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,EACL,KAAK,mBAAmB,EAQxB,KAAK,SAAS,EAGf,MAAM,kBAAkB,CAAC;AAY1B,OAAO,EAA0C,KAAK,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AAQlH,KAAK,oBAAoB,GAAG;IAAE,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AA6HjD,wBAAgB,gCAAgC,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,UA6B9E;AAoJD,wBAAgB,wBAAwB,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,2BAS1E;AA2nCD,wBAAsB,0BAA0B,CAC9C,KAAK,EAAE,KAAK,EACZ,cAAc,CAAC,EAAE,mBAAmB,EACpC,EAAE,YAAY,EAAE,GAAE;IAAE,YAAY,CAAC,EAAE,MAAM,CAAA;CAAO,GAC/C,OAAO,CAAC,6BAA6B,GAAG,SAAS,CAAC,CA0CpD;AAED,eAAO,MAAM,YAAY;;;;;;;;;;CAiIvB,CAAC;AAEH,eAAO,MAAM,uBAAuB,obAAyC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"author": "swapkit",
|
|
3
3
|
"dependencies": {
|
|
4
|
+
"@cardano-foundation/ledgerjs-hw-app-cardano": "~8.1.0",
|
|
4
5
|
"@cosmjs/amino": "~0.37.0",
|
|
5
6
|
"@cosmjs/crypto": "0.37.0",
|
|
6
7
|
"@keepkey/keepkey-sdk": "~0.2.62",
|
|
7
|
-
"@ledgerhq/context-module": "~2.
|
|
8
|
-
"@ledgerhq/device-management-kit": "~1.
|
|
8
|
+
"@ledgerhq/context-module": "~2.8.0",
|
|
9
|
+
"@ledgerhq/device-management-kit": "~1.11.0",
|
|
9
10
|
"@ledgerhq/device-signer-kit-bitcoin": "~1.3.3",
|
|
10
11
|
"@ledgerhq/device-signer-kit-cosmos": "~1.0.1",
|
|
11
|
-
"@ledgerhq/device-signer-kit-ethereum": "~1.18.
|
|
12
|
-
"@ledgerhq/device-signer-kit-zcash": "~0.
|
|
12
|
+
"@ledgerhq/device-signer-kit-ethereum": "~1.18.2",
|
|
13
|
+
"@ledgerhq/device-signer-kit-zcash": "~0.9.0",
|
|
13
14
|
"@ledgerhq/device-transport-kit-web-hid": "~1.2.4",
|
|
14
15
|
"@ledgerhq/hw-app-btc": "~10.22.1",
|
|
15
16
|
"@ledgerhq/hw-app-cosmos": "~6.36.7",
|
|
16
17
|
"@ledgerhq/hw-app-near": "~6.35.7",
|
|
18
|
+
"@ledgerhq/hw-app-str": "~7.8.0",
|
|
17
19
|
"@ledgerhq/hw-app-sui": "~1.11.4",
|
|
18
20
|
"@ledgerhq/hw-app-trx": "~6.36.6",
|
|
19
21
|
"@ledgerhq/hw-app-xrp": "~6.37.7",
|
|
@@ -24,10 +26,14 @@
|
|
|
24
26
|
"@scure/base": "2.2.0",
|
|
25
27
|
"@scure/bip32": "2.2.0",
|
|
26
28
|
"@solana/web3.js": "~1.98.4",
|
|
27
|
-
"@
|
|
28
|
-
"@swapkit/
|
|
29
|
-
"@swapkit/
|
|
30
|
-
"@swapkit/
|
|
29
|
+
"@stellar/stellar-sdk": "~16.1.0",
|
|
30
|
+
"@swapkit/helpers": "^6.4.2",
|
|
31
|
+
"@swapkit/toolboxes": "^6.6.0",
|
|
32
|
+
"@swapkit/utxo-signer": "^3.3.0",
|
|
33
|
+
"@swapkit/wallet-core": "^5.1.0",
|
|
34
|
+
"@ton-community/ton-ledger": "~7.3.0",
|
|
35
|
+
"@ton/core": "~0.63.1",
|
|
36
|
+
"@ton/ton": "~16.2.4",
|
|
31
37
|
"@trezor/connect-web": "~9.7.3",
|
|
32
38
|
"bitcoinjs-lib": "~6.1.7",
|
|
33
39
|
"ethers": "6.16.0",
|
|
@@ -38,19 +44,21 @@
|
|
|
38
44
|
},
|
|
39
45
|
"description": "SwapKit - Wallet Hardware",
|
|
40
46
|
"devDependencies": {
|
|
47
|
+
"@cardano-foundation/ledgerjs-hw-app-cardano": "8.1.0",
|
|
41
48
|
"@cosmjs/amino": "0.37.0",
|
|
42
49
|
"@cosmjs/crypto": "0.37.0",
|
|
43
50
|
"@keepkey/keepkey-sdk": "0.2.62",
|
|
44
|
-
"@ledgerhq/context-module": "2.
|
|
45
|
-
"@ledgerhq/device-management-kit": "1.
|
|
51
|
+
"@ledgerhq/context-module": "2.8.0",
|
|
52
|
+
"@ledgerhq/device-management-kit": "1.11.0",
|
|
46
53
|
"@ledgerhq/device-signer-kit-bitcoin": "1.3.3",
|
|
47
54
|
"@ledgerhq/device-signer-kit-cosmos": "1.0.1",
|
|
48
|
-
"@ledgerhq/device-signer-kit-ethereum": "1.18.
|
|
49
|
-
"@ledgerhq/device-signer-kit-zcash": "0.
|
|
55
|
+
"@ledgerhq/device-signer-kit-ethereum": "1.18.2",
|
|
56
|
+
"@ledgerhq/device-signer-kit-zcash": "0.9.0",
|
|
50
57
|
"@ledgerhq/device-transport-kit-web-hid": "1.2.4",
|
|
51
58
|
"@ledgerhq/hw-app-btc": "10.22.1",
|
|
52
59
|
"@ledgerhq/hw-app-cosmos": "6.36.7",
|
|
53
60
|
"@ledgerhq/hw-app-near": "6.35.7",
|
|
61
|
+
"@ledgerhq/hw-app-str": "7.8.0",
|
|
54
62
|
"@ledgerhq/hw-app-sui": "1.11.4",
|
|
55
63
|
"@ledgerhq/hw-app-trx": "6.36.6",
|
|
56
64
|
"@ledgerhq/hw-app-xrp": "6.37.7",
|
|
@@ -60,7 +68,11 @@
|
|
|
60
68
|
"@scure/base": "2.2.0",
|
|
61
69
|
"@scure/bip32": "2.2.0",
|
|
62
70
|
"@solana/web3.js": "1.98.4",
|
|
71
|
+
"@stellar/stellar-sdk": "16.1.0",
|
|
63
72
|
"@stricahq/cbors": "1.0.4",
|
|
73
|
+
"@ton-community/ton-ledger": "7.3.0",
|
|
74
|
+
"@ton/core": "0.63.1",
|
|
75
|
+
"@ton/ton": "16.2.4",
|
|
64
76
|
"@trezor/connect-web": "9.7.3",
|
|
65
77
|
"bitcoinjs-lib": "6.1.7",
|
|
66
78
|
"ethers": "6.16.0",
|
|
@@ -113,5 +125,5 @@
|
|
|
113
125
|
"type-check:go": "tsgo"
|
|
114
126
|
},
|
|
115
127
|
"type": "module",
|
|
116
|
-
"version": "6.
|
|
128
|
+
"version": "6.3.0"
|
|
117
129
|
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import type { SwapKitError } from "@swapkit/helpers";
|
|
2
|
+
|
|
3
|
+
type NotSupported = (reason: string) => SwapKitError;
|
|
4
|
+
|
|
5
|
+
const BODY = { AUXILIARY_DATA_HASH: 7, FEE: 2, INPUTS: 0, OUTPUTS: 1, TTL: 3, VALIDITY_INTERVAL_START: 8 } as const;
|
|
6
|
+
const SET_TAG = 258;
|
|
7
|
+
|
|
8
|
+
type CardanoTokenGroup = { policyId: Uint8Array; tokens: { amount: string; assetName: Uint8Array }[] };
|
|
9
|
+
|
|
10
|
+
function toCardanoUint(value: unknown, field: string, notSupported: NotSupported) {
|
|
11
|
+
const isBigNumber = typeof value === "object" && value !== null && "toFixed" in value;
|
|
12
|
+
const text = isBigNumber || Number.isSafeInteger(value) ? String((value as number).toFixed()) : "";
|
|
13
|
+
if (!/^\d+$/.test(text)) throw notSupported(`Invalid ${field} in Cardano transaction`);
|
|
14
|
+
return text;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function toTokenGroups(multiAsset: unknown, notSupported: NotSupported): CardanoTokenGroup[] {
|
|
18
|
+
if (!(multiAsset instanceof Map)) throw notSupported("Invalid Cardano output value");
|
|
19
|
+
|
|
20
|
+
return [...(multiAsset as Map<Uint8Array, Map<Uint8Array, unknown>>)].map(([policyId, assets]) => ({
|
|
21
|
+
policyId,
|
|
22
|
+
tokens: [...assets].map(([assetName, amount]) => ({
|
|
23
|
+
amount: toCardanoUint(amount, "token amount", notSupported),
|
|
24
|
+
assetName,
|
|
25
|
+
})),
|
|
26
|
+
}));
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function readCardanoOutput(output: unknown, device: string, notSupported: NotSupported) {
|
|
30
|
+
let address: unknown;
|
|
31
|
+
let value: unknown;
|
|
32
|
+
let format: "legacy" | "babbage";
|
|
33
|
+
|
|
34
|
+
if (Array.isArray(output)) {
|
|
35
|
+
if (output.length !== 2) throw notSupported(`${device} cannot sign Cardano outputs with a datum`);
|
|
36
|
+
[address, value] = output;
|
|
37
|
+
format = "legacy";
|
|
38
|
+
} else if (output instanceof Map) {
|
|
39
|
+
if (output.has(2)) throw notSupported(`${device} cannot sign Cardano outputs with a datum`);
|
|
40
|
+
if (output.has(3)) throw notSupported(`${device} cannot sign Cardano outputs with a reference script`);
|
|
41
|
+
if ([...output.keys()].some((key) => key !== 0 && key !== 1)) {
|
|
42
|
+
throw notSupported("Unsupported field in Cardano output");
|
|
43
|
+
}
|
|
44
|
+
address = output.get(0);
|
|
45
|
+
value = output.get(1);
|
|
46
|
+
format = "babbage";
|
|
47
|
+
} else {
|
|
48
|
+
throw notSupported("Invalid Cardano output");
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if (!(address instanceof Uint8Array)) throw notSupported("Invalid Cardano output address");
|
|
52
|
+
if (Array.isArray(value) && value.length !== 2) throw notSupported("Invalid Cardano output value");
|
|
53
|
+
const [coin, multiAsset] = Array.isArray(value) ? value : [value];
|
|
54
|
+
|
|
55
|
+
return {
|
|
56
|
+
address,
|
|
57
|
+
amount: toCardanoUint(coin, "output amount", notSupported),
|
|
58
|
+
format,
|
|
59
|
+
tokenGroups: multiAsset === undefined ? undefined : toTokenGroups(multiAsset, notSupported),
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function readCardanoBody(body: Map<number, unknown>, device: string, notSupported: NotSupported) {
|
|
64
|
+
const supportedFields: unknown[] = Object.values(BODY);
|
|
65
|
+
const unsupported = [...body.keys()].filter((field) => !supportedFields.includes(field));
|
|
66
|
+
if (unsupported.length > 0) {
|
|
67
|
+
throw notSupported(`${device} cannot sign Cardano transactions with body fields ${unsupported.join(", ")}`);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const rawInputs = body.get(BODY.INPUTS);
|
|
71
|
+
const tagCborSets =
|
|
72
|
+
typeof rawInputs === "object" &&
|
|
73
|
+
rawInputs !== null &&
|
|
74
|
+
"tag" in rawInputs &&
|
|
75
|
+
rawInputs.tag === SET_TAG &&
|
|
76
|
+
"value" in rawInputs;
|
|
77
|
+
const inputList = tagCborSets ? (rawInputs as { value: unknown }).value : rawInputs;
|
|
78
|
+
if (!Array.isArray(inputList)) throw notSupported("Invalid Cardano inputs");
|
|
79
|
+
|
|
80
|
+
const inputs = inputList.map((input: unknown) => {
|
|
81
|
+
if (!Array.isArray(input) || input.length !== 2) throw notSupported("Invalid Cardano input");
|
|
82
|
+
const [txHash, index] = input as [unknown, unknown];
|
|
83
|
+
if (!(txHash instanceof Uint8Array)) throw notSupported("Invalid Cardano input");
|
|
84
|
+
return { index: Number(toCardanoUint(index, "input index", notSupported)), txHash };
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
const outputs = body.get(BODY.OUTPUTS);
|
|
88
|
+
if (!Array.isArray(outputs)) throw notSupported("Invalid Cardano outputs");
|
|
89
|
+
|
|
90
|
+
const auxiliaryDataHash = body.get(BODY.AUXILIARY_DATA_HASH);
|
|
91
|
+
if (auxiliaryDataHash !== undefined && !(auxiliaryDataHash instanceof Uint8Array)) {
|
|
92
|
+
throw notSupported("Invalid Cardano auxiliary data hash");
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
const ttl = body.get(BODY.TTL);
|
|
96
|
+
const validityIntervalStart = body.get(BODY.VALIDITY_INTERVAL_START);
|
|
97
|
+
|
|
98
|
+
return {
|
|
99
|
+
auxiliaryDataHash,
|
|
100
|
+
fee: toCardanoUint(body.get(BODY.FEE), "fee", notSupported),
|
|
101
|
+
inputs,
|
|
102
|
+
outputs: outputs.map((output) => readCardanoOutput(output, device, notSupported)),
|
|
103
|
+
tagCborSets,
|
|
104
|
+
ttl: ttl === undefined ? undefined : toCardanoUint(ttl, "ttl", notSupported),
|
|
105
|
+
validityIntervalStart:
|
|
106
|
+
validityIntervalStart === undefined
|
|
107
|
+
? undefined
|
|
108
|
+
: toCardanoUint(validityIntervalStart, "validity interval start", notSupported),
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export type CardanoOutputFields = ReturnType<typeof readCardanoOutput>;
|
package/src/keepkey/index.ts
CHANGED
|
@@ -52,22 +52,22 @@ export const keepkeyWallet = createWallet({
|
|
|
52
52
|
);
|
|
53
53
|
return true;
|
|
54
54
|
},
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
[Chain.
|
|
58
|
-
[Chain.
|
|
59
|
-
[Chain.
|
|
60
|
-
[Chain.
|
|
61
|
-
[Chain.
|
|
62
|
-
[Chain.
|
|
63
|
-
[Chain.
|
|
64
|
-
[Chain.
|
|
65
|
-
[Chain.
|
|
66
|
-
[Chain.
|
|
67
|
-
[Chain.
|
|
55
|
+
name: "connectKeepkey",
|
|
56
|
+
signingSupport: {
|
|
57
|
+
[Chain.Arbitrum]: { direct: true, typedData: true },
|
|
58
|
+
[Chain.Avalanche]: { direct: true, typedData: true },
|
|
59
|
+
[Chain.Base]: { direct: true, typedData: true },
|
|
60
|
+
[Chain.Berachain]: { direct: true, typedData: true },
|
|
61
|
+
[Chain.BinanceSmartChain]: { direct: true, typedData: true },
|
|
62
|
+
[Chain.Ethereum]: { direct: true, typedData: true },
|
|
63
|
+
[Chain.Gnosis]: { direct: true, typedData: true },
|
|
64
|
+
[Chain.Monad]: { direct: true, typedData: true },
|
|
65
|
+
[Chain.Optimism]: { direct: true, typedData: true },
|
|
66
|
+
[Chain.Polygon]: { direct: true, typedData: true },
|
|
67
|
+
[Chain.Ripple]: { direct: true },
|
|
68
|
+
[Chain.XLayer]: { direct: true, typedData: true },
|
|
68
69
|
// BTC/BCH/DASH/DOGE/LTC/Cosmos/THORChain/Maya: pending KeepKey SDK signer wrappers (V3 plan PRs)
|
|
69
70
|
},
|
|
70
|
-
name: "connectKeepkey",
|
|
71
71
|
supportedChains: [
|
|
72
72
|
Chain.Arbitrum,
|
|
73
73
|
Chain.Avalanche,
|