@pezkuwi/hw-ledger 14.0.6 → 14.0.7

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 (95) hide show
  1. package/package.json +153 -3
  2. package/build/Ledger.js +0 -112
  3. package/build/LedgerGeneric.js +0 -211
  4. package/build/README.md +0 -2
  5. package/build/bundle.js +0 -2
  6. package/build/cjs/Ledger.d.ts +0 -43
  7. package/build/cjs/Ledger.js +0 -117
  8. package/build/cjs/LedgerGeneric.d.ts +0 -63
  9. package/build/cjs/LedgerGeneric.js +0 -216
  10. package/build/cjs/bundle.d.ts +0 -2
  11. package/build/cjs/bundle.js +0 -7
  12. package/build/cjs/constants.js +0 -7
  13. package/build/cjs/defaults.js +0 -61
  14. package/build/cjs/index.js +0 -5
  15. package/build/cjs/packageInfo.js +0 -4
  16. package/build/cjs/types.js +0 -2
  17. package/build/constants.d.ts +0 -4
  18. package/build/constants.js +0 -4
  19. package/build/defaults.d.ts +0 -14
  20. package/build/defaults.js +0 -58
  21. package/build/index.d.ts +0 -2
  22. package/build/index.js +0 -2
  23. package/build/package.json +0 -178
  24. package/build/packageDetect.d.ts +0 -1
  25. package/build/packageDetect.js +0 -5
  26. package/build/packageInfo.d.ts +0 -6
  27. package/build/packageInfo.js +0 -1
  28. package/build/types.d.ts +0 -34
  29. package/build/types.js +0 -1
  30. package/build-deno/Ledger.ts +0 -144
  31. package/build-deno/LedgerGeneric.ts +0 -271
  32. package/build-deno/README.md +0 -2
  33. package/build-deno/bundle.ts +0 -3
  34. package/build-deno/constants.ts +0 -8
  35. package/build-deno/defaults.ts +0 -61
  36. package/build-deno/index.ts +0 -4
  37. package/build-deno/mod.ts +0 -2
  38. package/build-deno/packageDetect.ts +0 -9
  39. package/build-deno/packageInfo.ts +0 -3
  40. package/build-deno/types.ts +0 -42
  41. package/build-tsc-cjs/packageDetect.js +0 -7
  42. package/src/Ledger.ts +0 -144
  43. package/src/LedgerGeneric.ts +0 -275
  44. package/src/bundle.ts +0 -8
  45. package/src/constants.ts +0 -10
  46. package/src/defaults.spec.ts +0 -20
  47. package/src/defaults.ts +0 -69
  48. package/src/index.ts +0 -6
  49. package/src/mod.ts +0 -4
  50. package/src/packageDetect.ts +0 -13
  51. package/src/packageInfo.ts +0 -6
  52. package/src/types.ts +0 -42
  53. package/tsconfig.build.json +0 -16
  54. package/tsconfig.build.tsbuildinfo +0 -1
  55. package/tsconfig.spec.json +0 -16
  56. package/tsconfig.spec.tsbuildinfo +0 -1
  57. /package/{build/LICENSE → LICENSE} +0 -0
  58. /package/{build-tsc/Ledger.d.ts → Ledger.d.ts} +0 -0
  59. /package/{build-tsc-esm/Ledger.js → Ledger.js} +0 -0
  60. /package/{build-tsc/LedgerGeneric.d.ts → LedgerGeneric.d.ts} +0 -0
  61. /package/{build-tsc-esm/LedgerGeneric.js → LedgerGeneric.js} +0 -0
  62. /package/{build/bundle-pezkuwi-hw-ledger.js → bundle-pezkuwi-hw-ledger.js} +0 -0
  63. /package/{build-tsc/bundle.d.ts → bundle.d.ts} +0 -0
  64. /package/{build-tsc-esm/bundle.js → bundle.js} +0 -0
  65. /package/{build → cjs}/Ledger.d.ts +0 -0
  66. /package/{build-tsc-cjs → cjs}/Ledger.js +0 -0
  67. /package/{build → cjs}/LedgerGeneric.d.ts +0 -0
  68. /package/{build-tsc-cjs → cjs}/LedgerGeneric.js +0 -0
  69. /package/{build → cjs}/bundle.d.ts +0 -0
  70. /package/{build-tsc-cjs → cjs}/bundle.js +0 -0
  71. /package/{build-tsc → cjs}/constants.d.ts +0 -0
  72. /package/{build-tsc-cjs → cjs}/constants.js +0 -0
  73. /package/{build-tsc → cjs}/defaults.d.ts +0 -0
  74. /package/{build-tsc-cjs → cjs}/defaults.js +0 -0
  75. /package/{build-tsc → cjs}/index.d.ts +0 -0
  76. /package/{build-tsc-cjs → cjs}/index.js +0 -0
  77. /package/{build/cjs → cjs}/package.json +0 -0
  78. /package/{build-tsc → cjs}/packageDetect.d.ts +0 -0
  79. /package/{build/cjs → cjs}/packageDetect.js +0 -0
  80. /package/{build-tsc → cjs}/packageInfo.d.ts +0 -0
  81. /package/{build-tsc-cjs → cjs}/packageInfo.js +0 -0
  82. /package/{build-tsc → cjs}/types.d.ts +0 -0
  83. /package/{build-tsc-cjs → cjs}/types.js +0 -0
  84. /package/{build/cjs/constants.d.ts → constants.d.ts} +0 -0
  85. /package/{build-tsc-esm/constants.js → constants.js} +0 -0
  86. /package/{build/cjs/defaults.d.ts → defaults.d.ts} +0 -0
  87. /package/{build-tsc-esm/defaults.js → defaults.js} +0 -0
  88. /package/{build/cjs/index.d.ts → index.d.ts} +0 -0
  89. /package/{build-tsc-esm/index.js → index.js} +0 -0
  90. /package/{build/cjs/packageDetect.d.ts → packageDetect.d.ts} +0 -0
  91. /package/{build-tsc-esm/packageDetect.js → packageDetect.js} +0 -0
  92. /package/{build/cjs/packageInfo.d.ts → packageInfo.d.ts} +0 -0
  93. /package/{build-tsc-esm/packageInfo.js → packageInfo.js} +0 -0
  94. /package/{build/cjs/types.d.ts → types.d.ts} +0 -0
  95. /package/{build-tsc-esm/types.js → types.js} +0 -0
@@ -1,63 +0,0 @@
1
- import type { TransportType } from '@pezkuwi/hw-ledger-transports/types';
2
- import type { AccountOptionsGeneric, LedgerAddress, LedgerSignature, LedgerVersion } from './types.js';
3
- import { PolkadotGenericApp } from '@zondax/ledger-substrate';
4
- import { ledgerApps } from './defaults.js';
5
- export { packageInfo } from './packageInfo.js';
6
- type Chain = keyof typeof ledgerApps;
7
- /**
8
- * @name Ledger
9
- *
10
- * @description
11
- * A very basic wrapper for a ledger app -
12
- * - it connects automatically on use, creating an underlying interface as required
13
- * - Promises reject with errors (unwrapped errors from @zondax/ledger-substrate-js)
14
- */
15
- export declare class LedgerGeneric {
16
- #private;
17
- constructor(transport: TransportType, chain: Chain, slip44: number, chainId?: string, metaUrl?: string);
18
- /**
19
- * @description Returns the address associated with a specific Ed25519 account & address offset. Optionally
20
- * asks for on-device confirmation
21
- */
22
- getAddress(ss58Prefix: number, confirm?: boolean, accountIndex?: number, addressOffset?: number): Promise<LedgerAddress>;
23
- /**
24
- * @description Returns the address associated with a specific ecdsa account & address offset. Optionally
25
- * asks for on-device confirmation
26
- */
27
- getAddressEcdsa(confirm?: boolean, accountIndex?: number, addressOffset?: number): Promise<LedgerAddress>;
28
- /**
29
- * @description Returns the version of the Ledger application on the device
30
- */
31
- getVersion(): Promise<LedgerVersion>;
32
- /**
33
- * @description Signs a transaction on the Ledger device. This requires the LedgerGeneric class to be instantiated with `chainId`, and `metaUrl`
34
- */
35
- sign(message: Uint8Array, accountIndex?: number, addressOffset?: number): Promise<LedgerSignature>;
36
- /**
37
- * @description Signs a message (non-transactional) on the Ledger device
38
- */
39
- signRaw(message: Uint8Array, accountIndex?: number, addressOffset?: number): Promise<LedgerSignature>;
40
- /**
41
- * @description Signs a transaction on the Ledger device with Ecdsa. This requires the LedgerGeneric class to be instantiated with `chainId`, and `metaUrl`
42
- */
43
- signEcdsa(message: Uint8Array, accountIndex?: number, addressOffset?: number): Promise<LedgerSignature>;
44
- /**
45
- * @description Signs a message with Ecdsa (non-transactional) on the Ledger device
46
- */
47
- signRawEcdsa(message: Uint8Array, accountIndex?: number, addressOffset?: number): Promise<LedgerSignature>;
48
- /**
49
- * @description Signs a transaction on the ledger device provided some metadata.
50
- */
51
- signWithMetadata(message: Uint8Array, accountIndex?: number, addressOffset?: number, options?: Partial<AccountOptionsGeneric>): Promise<LedgerSignature>;
52
- /**
53
- * @description Signs a transaction on the ledger device for an ecdsa signature provided some metadata.
54
- */
55
- signWithMetadataEcdsa(message: Uint8Array, accountIndex?: number, addressOffset?: number, options?: Partial<AccountOptionsGeneric>): Promise<LedgerSignature>;
56
- /**
57
- * @internal
58
- *
59
- * Returns a created PolkadotGenericApp to perform operations against. Generally
60
- * this is only used internally, to ensure consistent bahavior.
61
- */
62
- withApp<T>(fn: (app: PolkadotGenericApp) => Promise<T>): Promise<T>;
63
- }
@@ -1,216 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LedgerGeneric = exports.packageInfo = void 0;
4
- const ledger_substrate_1 = require("@zondax/ledger-substrate");
5
- const hw_ledger_transports_1 = require("@pezkuwi/hw-ledger-transports");
6
- const util_1 = require("@pezkuwi/util");
7
- const defaults_js_1 = require("./defaults.js");
8
- var packageInfo_js_1 = require("./packageInfo.js");
9
- Object.defineProperty(exports, "packageInfo", { enumerable: true, get: function () { return packageInfo_js_1.packageInfo; } });
10
- /** @internal Wraps a PolkadotGenericApp call, checking the result for any errors which result in a rejection */
11
- async function wrapError(promise) {
12
- let result;
13
- try {
14
- result = await promise;
15
- }
16
- catch (e) {
17
- // We check to see if the propogated error is the newer ResponseError type.
18
- // The response code use to be part of the result, but with the latest breaking changes from 0.42.x
19
- // the interface and it's types have completely changed.
20
- if (e.returnCode) {
21
- throw new Error(`${e.returnCode}: ${e.errorMessage}`);
22
- }
23
- throw new Error(e.message);
24
- }
25
- return result;
26
- }
27
- /** @internal Wraps a signEd25519/signRawEd25519 call and returns the associated signature */
28
- function sign(method, message, slip44, accountIndex = 0, addressOffset = 0) {
29
- const bip42Path = `m/44'/${slip44}'/${accountIndex}'/${0}'/${addressOffset}'`;
30
- return async (app) => {
31
- const { signature } = await wrapError(app[method](bip42Path, (0, util_1.u8aToBuffer)(message)));
32
- return {
33
- signature: (0, util_1.hexAddPrefix)(signature.toString('hex'))
34
- };
35
- };
36
- }
37
- /** @internal Wraps a signEcdsa/signRawEcdsa call and returns the associated signature */
38
- function signEcdsa(method, message, slip44, accountIndex = 0, addressOffset = 0) {
39
- const bip42Path = `m/44'/${slip44}'/${accountIndex}'/${0}'/${addressOffset}'`;
40
- return async (app) => {
41
- const { r, s, v } = await wrapError(app[method](bip42Path, (0, util_1.u8aToBuffer)(message)));
42
- const signature = Buffer.concat([r, s, v]);
43
- return {
44
- signature: (0, util_1.hexAddPrefix)(signature.toString('hex'))
45
- };
46
- };
47
- }
48
- /** @internal Wraps a signWithMetadataEd25519 call and returns the associated signature */
49
- function signWithMetadata(message, slip44, accountIndex = 0, addressOffset = 0, { metadata } = {}) {
50
- const bip42Path = `m/44'/${slip44}'/${accountIndex}'/${0}'/${addressOffset}'`;
51
- return async (app) => {
52
- if (!metadata) {
53
- throw new Error('The metadata option must be present when using signWithMetadata');
54
- }
55
- const bufferMsg = Buffer.from(message);
56
- const { signature } = await wrapError(app.signWithMetadataEd25519(bip42Path, bufferMsg, metadata));
57
- return {
58
- signature: (0, util_1.hexAddPrefix)(signature.toString('hex'))
59
- };
60
- };
61
- }
62
- /** @internal Wraps a signWithMetadataEcdsa call and returns the associated signature */
63
- function signWithMetadataEcdsa(message, slip44, accountIndex = 0, addressOffset = 0, { metadata } = {}) {
64
- const bip42Path = `m/44'/${slip44}'/${accountIndex}'/${0}'/${addressOffset}'`;
65
- return async (app) => {
66
- if (!metadata) {
67
- throw new Error('The metadata option must be present when using signWithMetadata');
68
- }
69
- const bufferMsg = Buffer.from(message);
70
- const { r, s, v } = await wrapError(app.signWithMetadataEcdsa(bip42Path, bufferMsg, metadata));
71
- const signature = Buffer.concat([r, s, v]);
72
- return {
73
- signature: (0, util_1.hexAddPrefix)(signature.toString('hex'))
74
- };
75
- };
76
- }
77
- /**
78
- * @name Ledger
79
- *
80
- * @description
81
- * A very basic wrapper for a ledger app -
82
- * - it connects automatically on use, creating an underlying interface as required
83
- * - Promises reject with errors (unwrapped errors from @zondax/ledger-substrate-js)
84
- */
85
- class LedgerGeneric {
86
- #transportDef;
87
- #slip44;
88
- /**
89
- * The chainId is represented by the chains token in all lowercase. Example: Polkadot -> dot
90
- */
91
- #chainId;
92
- /**
93
- * The metaUrl is seen as a server url that the underlying `PolkadotGenericApp` will use to
94
- * retrieve the signature given a tx blob, and a chainId. It is important to note that if you would like to avoid
95
- * having any network calls made, use `signWithMetadata`, and avoid `sign`.
96
- */
97
- #metaUrl;
98
- #app = null;
99
- constructor(transport, chain, slip44, chainId, metaUrl) {
100
- const ledgerName = defaults_js_1.ledgerApps[chain];
101
- const transportDef = hw_ledger_transports_1.transports.find(({ type }) => type === transport);
102
- if (!ledgerName) {
103
- throw new Error(`Unsupported Ledger chain ${chain}`);
104
- }
105
- else if (!transportDef) {
106
- throw new Error(`Unsupported Ledger transport ${transport}`);
107
- }
108
- this.#metaUrl = metaUrl;
109
- this.#chainId = chainId;
110
- this.#slip44 = slip44;
111
- this.#transportDef = transportDef;
112
- }
113
- /**
114
- * @description Returns the address associated with a specific Ed25519 account & address offset. Optionally
115
- * asks for on-device confirmation
116
- */
117
- async getAddress(ss58Prefix, confirm = false, accountIndex = 0, addressOffset = 0) {
118
- const bip42Path = `m/44'/${this.#slip44}'/${accountIndex}'/${0}'/${addressOffset}'`;
119
- return this.withApp(async (app) => {
120
- const { address, pubKey } = await wrapError(app.getAddressEd25519(bip42Path, ss58Prefix, confirm));
121
- return {
122
- address,
123
- publicKey: (0, util_1.hexAddPrefix)(pubKey)
124
- };
125
- });
126
- }
127
- /**
128
- * @description Returns the address associated with a specific ecdsa account & address offset. Optionally
129
- * asks for on-device confirmation
130
- */
131
- async getAddressEcdsa(confirm = false, accountIndex = 0, addressOffset = 0) {
132
- const bip42Path = `m/44'/${this.#slip44}'/${accountIndex}'/${0}'/${addressOffset}'`;
133
- return this.withApp(async (app) => {
134
- const { address, pubKey } = await wrapError(app.getAddressEcdsa(bip42Path, confirm));
135
- return {
136
- address,
137
- publicKey: (0, util_1.hexAddPrefix)(pubKey)
138
- };
139
- });
140
- }
141
- /**
142
- * @description Returns the version of the Ledger application on the device
143
- */
144
- async getVersion() {
145
- return this.withApp(async (app) => {
146
- const { deviceLocked: isLocked, major, minor, patch, testMode: isTestMode } = await wrapError(app.getVersion());
147
- return {
148
- isLocked: !!isLocked,
149
- isTestMode: !!isTestMode,
150
- version: [major || 0, minor || 0, patch || 0]
151
- };
152
- });
153
- }
154
- /**
155
- * @description Signs a transaction on the Ledger device. This requires the LedgerGeneric class to be instantiated with `chainId`, and `metaUrl`
156
- */
157
- async sign(message, accountIndex, addressOffset) {
158
- return this.withApp(sign('signEd25519', message, this.#slip44, accountIndex, addressOffset));
159
- }
160
- /**
161
- * @description Signs a message (non-transactional) on the Ledger device
162
- */
163
- async signRaw(message, accountIndex, addressOffset) {
164
- return this.withApp(sign('signRawEd25519', (0, util_1.u8aWrapBytes)(message), this.#slip44, accountIndex, addressOffset));
165
- }
166
- /**
167
- * @description Signs a transaction on the Ledger device with Ecdsa. This requires the LedgerGeneric class to be instantiated with `chainId`, and `metaUrl`
168
- */
169
- async signEcdsa(message, accountIndex, addressOffset) {
170
- return this.withApp(signEcdsa('signEcdsa', (0, util_1.u8aWrapBytes)(message), this.#slip44, accountIndex, addressOffset));
171
- }
172
- /**
173
- * @description Signs a message with Ecdsa (non-transactional) on the Ledger device
174
- */
175
- async signRawEcdsa(message, accountIndex, addressOffset) {
176
- return this.withApp(signEcdsa('signRawEcdsa', (0, util_1.u8aWrapBytes)(message), this.#slip44, accountIndex, addressOffset));
177
- }
178
- /**
179
- * @description Signs a transaction on the ledger device provided some metadata.
180
- */
181
- async signWithMetadata(message, accountIndex, addressOffset, options) {
182
- return this.withApp(signWithMetadata(message, this.#slip44, accountIndex, addressOffset, options));
183
- }
184
- /**
185
- * @description Signs a transaction on the ledger device for an ecdsa signature provided some metadata.
186
- */
187
- async signWithMetadataEcdsa(message, accountIndex, addressOffset, options) {
188
- return this.withApp(signWithMetadataEcdsa(message, this.#slip44, accountIndex, addressOffset, options));
189
- }
190
- /**
191
- * @internal
192
- *
193
- * Returns a created PolkadotGenericApp to perform operations against. Generally
194
- * this is only used internally, to ensure consistent bahavior.
195
- */
196
- async withApp(fn) {
197
- try {
198
- if (!this.#app) {
199
- const transport = await this.#transportDef.create();
200
- // We need this override for the actual type passing - the Deno environment
201
- // is quite a bit stricter and it yields invalids between the two (specifically
202
- // since we mangle the imports from .default in the types for CJS/ESM and between
203
- // esm.sh versions this yields problematic outputs)
204
- //
205
- // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-explicit-any
206
- this.#app = new ledger_substrate_1.PolkadotGenericApp(transport, this.#chainId, this.#metaUrl);
207
- }
208
- return await fn(this.#app);
209
- }
210
- catch (error) {
211
- this.#app = null;
212
- throw error;
213
- }
214
- }
215
- }
216
- exports.LedgerGeneric = LedgerGeneric;
@@ -1,2 +0,0 @@
1
- export { Ledger } from './Ledger.js';
2
- export { LedgerGeneric } from './LedgerGeneric.js';
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LedgerGeneric = exports.Ledger = void 0;
4
- var Ledger_js_1 = require("./Ledger.js");
5
- Object.defineProperty(exports, "Ledger", { enumerable: true, get: function () { return Ledger_js_1.Ledger; } });
6
- var LedgerGeneric_js_1 = require("./LedgerGeneric.js");
7
- Object.defineProperty(exports, "LedgerGeneric", { enumerable: true, get: function () { return LedgerGeneric_js_1.LedgerGeneric; } });
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LEDGER_SUCCESS_CODE = exports.LEDGER_DEFAULT_INDEX = exports.LEDGER_DEFAULT_CHANGE = exports.LEDGER_DEFAULT_ACCOUNT = void 0;
4
- exports.LEDGER_DEFAULT_ACCOUNT = 0x80000000;
5
- exports.LEDGER_DEFAULT_CHANGE = 0x80000000;
6
- exports.LEDGER_DEFAULT_INDEX = 0x80000000;
7
- exports.LEDGER_SUCCESS_CODE = 0x9000;
@@ -1,61 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ledgerApps = exports.genericLedgerApps = exports.prevLedgerRecord = void 0;
4
- exports.prevLedgerRecord = {
5
- acala: 'Acala',
6
- ajuna: 'Ajuna',
7
- 'aleph-node': 'AlephZero',
8
- astar: 'Astar',
9
- bifrost: 'Bifrost',
10
- 'bifrost-kusama': 'BifrostKusama',
11
- centrifuge: 'Centrifuge',
12
- composable: 'Composable',
13
- darwinia: 'Darwinia',
14
- 'dock-mainnet': 'Dock',
15
- edgeware: 'Edgeware',
16
- enjin: 'Enjin',
17
- equilibrium: 'Equilibrium',
18
- genshiro: 'Genshiro',
19
- hydradx: 'HydraDX',
20
- 'interlay-parachain': 'Interlay',
21
- karura: 'Karura',
22
- khala: 'Khala',
23
- kusama: 'Kusama',
24
- matrixchain: 'Matrixchain',
25
- nodle: 'Nodle',
26
- origintrail: 'OriginTrail',
27
- parallel: 'Parallel',
28
- peaq: 'Peaq',
29
- pendulum: 'Pendulum',
30
- phala: 'Phala',
31
- picasso: 'Picasso',
32
- polkadex: 'Polkadex',
33
- polkadot: 'Polkadot',
34
- polymesh: 'Polymesh',
35
- quartz: 'Quartz',
36
- sora: 'Sora',
37
- stafi: 'Stafi',
38
- statemine: 'Statemine',
39
- statemint: 'Statemint',
40
- ternoa: 'Ternoa',
41
- unique: 'Unique',
42
- vtb: 'VTB',
43
- xxnetwork: 'XXNetwork',
44
- zeitgeist: 'Zeitgeist'
45
- };
46
- exports.genericLedgerApps = {
47
- bittensor: 'Bittensor',
48
- creditcoin3: 'Creditcoin3',
49
- dentnet: 'DENTNet',
50
- encointer: 'Encointer',
51
- frequency: 'Frequency',
52
- integritee: 'Integritee',
53
- liberland: 'Liberland',
54
- mythos: 'Mythos',
55
- polimec: 'Polimec',
56
- vara: 'Vara'
57
- };
58
- exports.ledgerApps = {
59
- ...exports.prevLedgerRecord,
60
- ...exports.genericLedgerApps
61
- };
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- require("./packageDetect.js");
5
- tslib_1.__exportStar(require("./bundle.js"), exports);
@@ -1,4 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.packageInfo = void 0;
4
- exports.packageInfo = { name: '@pezkuwi/hw-ledger', path: typeof __dirname === 'string' ? __dirname : 'auto', type: 'cjs', version: '14.0.6' };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +0,0 @@
1
- export declare const LEDGER_DEFAULT_ACCOUNT = 2147483648;
2
- export declare const LEDGER_DEFAULT_CHANGE = 2147483648;
3
- export declare const LEDGER_DEFAULT_INDEX = 2147483648;
4
- export declare const LEDGER_SUCCESS_CODE = 36864;
@@ -1,4 +0,0 @@
1
- export const LEDGER_DEFAULT_ACCOUNT = 0x80000000;
2
- export const LEDGER_DEFAULT_CHANGE = 0x80000000;
3
- export const LEDGER_DEFAULT_INDEX = 0x80000000;
4
- export const LEDGER_SUCCESS_CODE = 0x9000;
@@ -1,14 +0,0 @@
1
- export declare const prevLedgerRecord: Record<string, string>;
2
- export declare const genericLedgerApps: {
3
- bittensor: string;
4
- creditcoin3: string;
5
- dentnet: string;
6
- encointer: string;
7
- frequency: string;
8
- integritee: string;
9
- liberland: string;
10
- mythos: string;
11
- polimec: string;
12
- vara: string;
13
- };
14
- export declare const ledgerApps: Record<string, string>;
package/build/defaults.js DELETED
@@ -1,58 +0,0 @@
1
- export const prevLedgerRecord = {
2
- acala: 'Acala',
3
- ajuna: 'Ajuna',
4
- 'aleph-node': 'AlephZero',
5
- astar: 'Astar',
6
- bifrost: 'Bifrost',
7
- 'bifrost-kusama': 'BifrostKusama',
8
- centrifuge: 'Centrifuge',
9
- composable: 'Composable',
10
- darwinia: 'Darwinia',
11
- 'dock-mainnet': 'Dock',
12
- edgeware: 'Edgeware',
13
- enjin: 'Enjin',
14
- equilibrium: 'Equilibrium',
15
- genshiro: 'Genshiro',
16
- hydradx: 'HydraDX',
17
- 'interlay-parachain': 'Interlay',
18
- karura: 'Karura',
19
- khala: 'Khala',
20
- kusama: 'Kusama',
21
- matrixchain: 'Matrixchain',
22
- nodle: 'Nodle',
23
- origintrail: 'OriginTrail',
24
- parallel: 'Parallel',
25
- peaq: 'Peaq',
26
- pendulum: 'Pendulum',
27
- phala: 'Phala',
28
- picasso: 'Picasso',
29
- polkadex: 'Polkadex',
30
- polkadot: 'Polkadot',
31
- polymesh: 'Polymesh',
32
- quartz: 'Quartz',
33
- sora: 'Sora',
34
- stafi: 'Stafi',
35
- statemine: 'Statemine',
36
- statemint: 'Statemint',
37
- ternoa: 'Ternoa',
38
- unique: 'Unique',
39
- vtb: 'VTB',
40
- xxnetwork: 'XXNetwork',
41
- zeitgeist: 'Zeitgeist'
42
- };
43
- export const genericLedgerApps = {
44
- bittensor: 'Bittensor',
45
- creditcoin3: 'Creditcoin3',
46
- dentnet: 'DENTNet',
47
- encointer: 'Encointer',
48
- frequency: 'Frequency',
49
- integritee: 'Integritee',
50
- liberland: 'Liberland',
51
- mythos: 'Mythos',
52
- polimec: 'Polimec',
53
- vara: 'Vara'
54
- };
55
- export const ledgerApps = {
56
- ...prevLedgerRecord,
57
- ...genericLedgerApps
58
- };
package/build/index.d.ts DELETED
@@ -1,2 +0,0 @@
1
- import './packageDetect.js';
2
- export * from './bundle.js';
package/build/index.js DELETED
@@ -1,2 +0,0 @@
1
- import './packageDetect.js';
2
- export * from './bundle.js';
@@ -1,178 +0,0 @@
1
- {
2
- "author": "Jaco Greeff <jacogr@gmail.com>",
3
- "bugs": "https://github.com/pezkuwichain/pezkuwi-common/issues",
4
- "engines": {
5
- "node": ">=18"
6
- },
7
- "homepage": "https://github.com/pezkuwichain/pezkuwi-common/tree/master/packages/hw-ledger#readme",
8
- "license": "Apache-2.0",
9
- "name": "@pezkuwi/hw-ledger",
10
- "repository": {
11
- "directory": "packages/hw-ledger",
12
- "type": "git",
13
- "url": "https://github.com/pezkuwichain/pezkuwi-common.git"
14
- },
15
- "sideEffects": [
16
- "./packageDetect.js",
17
- "./cjs/packageDetect.js"
18
- ],
19
- "type": "module",
20
- "version": "14.0.6",
21
- "main": "./cjs/index.js",
22
- "module": "./index.js",
23
- "types": "./index.d.ts",
24
- "exports": {
25
- "./cjs/package.json": "./cjs/package.json",
26
- "./cjs/*": "./cjs/*.js",
27
- ".": {
28
- "module": {
29
- "types": "./index.d.ts",
30
- "default": "./index.js"
31
- },
32
- "require": {
33
- "types": "./cjs/index.d.ts",
34
- "default": "./cjs/index.js"
35
- },
36
- "default": {
37
- "types": "./index.d.ts",
38
- "default": "./index.js"
39
- }
40
- },
41
- "./bundle": {
42
- "module": {
43
- "types": "./bundle.d.ts",
44
- "default": "./bundle.js"
45
- },
46
- "require": {
47
- "types": "./cjs/bundle.d.ts",
48
- "default": "./cjs/bundle.js"
49
- },
50
- "default": {
51
- "types": "./bundle.d.ts",
52
- "default": "./bundle.js"
53
- }
54
- },
55
- "./constants": {
56
- "module": {
57
- "types": "./constants.d.ts",
58
- "default": "./constants.js"
59
- },
60
- "require": {
61
- "types": "./cjs/constants.d.ts",
62
- "default": "./cjs/constants.js"
63
- },
64
- "default": {
65
- "types": "./constants.d.ts",
66
- "default": "./constants.js"
67
- }
68
- },
69
- "./defaults": {
70
- "module": {
71
- "types": "./defaults.d.ts",
72
- "default": "./defaults.js"
73
- },
74
- "require": {
75
- "types": "./cjs/defaults.d.ts",
76
- "default": "./cjs/defaults.js"
77
- },
78
- "default": {
79
- "types": "./defaults.d.ts",
80
- "default": "./defaults.js"
81
- }
82
- },
83
- "./Ledger": {
84
- "module": {
85
- "types": "./Ledger.d.ts",
86
- "default": "./Ledger.js"
87
- },
88
- "require": {
89
- "types": "./cjs/Ledger.d.ts",
90
- "default": "./cjs/Ledger.js"
91
- },
92
- "default": {
93
- "types": "./Ledger.d.ts",
94
- "default": "./Ledger.js"
95
- }
96
- },
97
- "./LedgerGeneric": {
98
- "module": {
99
- "types": "./LedgerGeneric.d.ts",
100
- "default": "./LedgerGeneric.js"
101
- },
102
- "require": {
103
- "types": "./cjs/LedgerGeneric.d.ts",
104
- "default": "./cjs/LedgerGeneric.js"
105
- },
106
- "default": {
107
- "types": "./LedgerGeneric.d.ts",
108
- "default": "./LedgerGeneric.js"
109
- }
110
- },
111
- "./package.json": {
112
- "require": "./cjs/package.json",
113
- "default": "./package.json"
114
- },
115
- "./packageDetect": {
116
- "module": {
117
- "types": "./packageDetect.d.ts",
118
- "default": "./packageDetect.js"
119
- },
120
- "require": {
121
- "types": "./cjs/packageDetect.d.ts",
122
- "default": "./cjs/packageDetect.js"
123
- },
124
- "default": {
125
- "types": "./packageDetect.d.ts",
126
- "default": "./packageDetect.js"
127
- }
128
- },
129
- "./packageInfo.js": {
130
- "module": {
131
- "types": "./packageInfo.d.ts",
132
- "default": "./packageInfo.js"
133
- },
134
- "require": {
135
- "types": "./cjs/packageInfo.d.ts",
136
- "default": "./cjs/packageInfo.js"
137
- },
138
- "default": {
139
- "types": "./packageInfo.d.ts",
140
- "default": "./packageInfo.js"
141
- }
142
- },
143
- "./packageInfo": {
144
- "module": {
145
- "types": "./packageInfo.d.ts",
146
- "default": "./packageInfo.js"
147
- },
148
- "require": {
149
- "types": "./cjs/packageInfo.d.ts",
150
- "default": "./cjs/packageInfo.js"
151
- },
152
- "default": {
153
- "types": "./packageInfo.d.ts",
154
- "default": "./packageInfo.js"
155
- }
156
- },
157
- "./types": {
158
- "module": {
159
- "types": "./types.d.ts",
160
- "default": "./types.js"
161
- },
162
- "require": {
163
- "types": "./cjs/types.d.ts",
164
- "default": "./cjs/types.js"
165
- },
166
- "default": {
167
- "types": "./types.d.ts",
168
- "default": "./types.js"
169
- }
170
- }
171
- },
172
- "dependencies": {
173
- "@pezkuwi/hw-ledger-transports": "14.0.1",
174
- "@pezkuwi/util": "14.0.1",
175
- "@zondax/ledger-substrate": "1.1.1",
176
- "tslib": "^2.8.0"
177
- }
178
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,5 +0,0 @@
1
- import { packageInfo as transportInfo } from '@pezkuwi/hw-ledger-transports/packageInfo';
2
- import { detectPackage } from '@pezkuwi/util';
3
- import { packageInfo as utilInfo } from '@pezkuwi/util/packageInfo';
4
- import { packageInfo } from './packageInfo.js';
5
- detectPackage(packageInfo, null, [transportInfo, utilInfo]);
@@ -1,6 +0,0 @@
1
- export declare const packageInfo: {
2
- name: string;
3
- path: string;
4
- type: string;
5
- version: string;
6
- };
@@ -1 +0,0 @@
1
- export const packageInfo = { name: '@pezkuwi/hw-ledger', path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto', type: 'esm', version: '14.0.6' };