@initia/initia.js 1.0.19 → 1.0.20
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/index.cjs +6 -6
- package/dist/index.mjs +25633 -28034
- package/dist/key/index.d.ts +0 -1
- package/package.json +2 -8
- package/dist/key/ledger/LedgerKey.d.ts +0 -40
- package/dist/key/ledger/app.d.ts +0 -45
- package/dist/key/ledger/error.d.ts +0 -3
- package/dist/key/ledger/index.d.ts +0 -3
package/dist/key/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@initia/initia.js",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.20",
|
|
4
4
|
"description": "The JavaScript SDK for Initia",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Initia Foundation",
|
|
@@ -60,18 +60,13 @@
|
|
|
60
60
|
"@bitcoinerlab/secp256k1": "^1.1.1",
|
|
61
61
|
"@initia/initia.proto": "^1.0.3",
|
|
62
62
|
"@initia/opinit.proto": "^1.0.2",
|
|
63
|
-
"@ledgerhq/hw-app-eth": "^6.45.5",
|
|
64
|
-
"@ledgerhq/hw-transport": "^6.31.10",
|
|
65
|
-
"@ledgerhq/hw-transport-node-hid": "^6.29.6",
|
|
66
|
-
"@ledgerhq/hw-transport-webhid": "^6.29.4",
|
|
67
|
-
"@ledgerhq/hw-transport-webusb": "^6.29.4",
|
|
68
63
|
"@mysten/bcs": "^1.1.0",
|
|
69
|
-
"@zondax/ledger-cosmos-js": "^4.0.1",
|
|
70
64
|
"axios": "^1.9.0",
|
|
71
65
|
"bech32": "^2.0.0",
|
|
72
66
|
"bignumber.js": "^9.1.2",
|
|
73
67
|
"bip32": "^5.0.0-rc.0",
|
|
74
68
|
"bip39": "^3.1.0",
|
|
69
|
+
"events": "^3.3.0",
|
|
75
70
|
"jscrypto": "^1.0.3",
|
|
76
71
|
"keccak256": "^1.0.6",
|
|
77
72
|
"ripemd160": "^2.0.2",
|
|
@@ -80,7 +75,6 @@
|
|
|
80
75
|
"ws": "^8.18.0"
|
|
81
76
|
},
|
|
82
77
|
"overrides": {
|
|
83
|
-
"@ledgerhq/hw-transport": "^6.31.10",
|
|
84
78
|
"axios": "^1.9.0"
|
|
85
79
|
},
|
|
86
80
|
"lint-staged": {
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { default as Transport } from '@ledgerhq/hw-transport';
|
|
2
|
-
import { AccAddress, SignatureV2, SignDoc } from '../..';
|
|
3
|
-
import { Key } from '../Key';
|
|
4
|
-
import { LoadConfig } from '@ledgerhq/hw-app-eth/lib/services/types';
|
|
5
|
-
import { LedgerApp } from './app';
|
|
6
|
-
declare global {
|
|
7
|
-
interface Window {
|
|
8
|
-
google: any;
|
|
9
|
-
}
|
|
10
|
-
interface Navigator {
|
|
11
|
-
hid: any;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
export declare enum Kind {
|
|
15
|
-
Ethereum = "Ethereum",
|
|
16
|
-
Cosmos = "Cosmos"
|
|
17
|
-
}
|
|
18
|
-
export declare class LedgerKey extends Key {
|
|
19
|
-
private readonly path;
|
|
20
|
-
private app;
|
|
21
|
-
private appKind;
|
|
22
|
-
constructor(transport: Transport, index?: number, appKind?: Kind);
|
|
23
|
-
get accAddress(): AccAddress;
|
|
24
|
-
static create(transport?: Transport, index?: number, appKind?: Kind): Promise<LedgerKey>;
|
|
25
|
-
private initialize;
|
|
26
|
-
getApplicationKind(): Kind;
|
|
27
|
-
getApplication(): LedgerApp;
|
|
28
|
-
setLoadConfig(loadConfig: LoadConfig): void;
|
|
29
|
-
getPath(): string;
|
|
30
|
-
loadAccountDetails(): Promise<LedgerKey>;
|
|
31
|
-
sign(payload: Buffer): Promise<Buffer>;
|
|
32
|
-
signWithKeccak256(payload: Buffer): Promise<Buffer>;
|
|
33
|
-
createSignature(_tx: SignDoc): Promise<SignatureV2>;
|
|
34
|
-
signText(payload: string | Buffer): Promise<Buffer>;
|
|
35
|
-
getAppConfiguration(): Promise<any>;
|
|
36
|
-
showAddressAndPubKey(): Promise<void>;
|
|
37
|
-
getTransport(): Transport;
|
|
38
|
-
static createEthereumApp(transport?: Transport, index?: number): Promise<LedgerKey>;
|
|
39
|
-
static createCosmosApp(transport?: Transport, index?: number): Promise<LedgerKey>;
|
|
40
|
-
}
|
package/dist/key/ledger/app.d.ts
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { default as Eth } from '@ledgerhq/hw-app-eth';
|
|
2
|
-
import { LoadConfig } from '@ledgerhq/hw-app-eth/lib/services/types';
|
|
3
|
-
import { default as Cosmos } from '@zondax/ledger-cosmos-js';
|
|
4
|
-
import { default as Transport } from '@ledgerhq/hw-transport';
|
|
5
|
-
import { PublicKey } from '../..';
|
|
6
|
-
export declare abstract class LedgerApp {
|
|
7
|
-
transport: Transport;
|
|
8
|
-
constructor(transport: Transport);
|
|
9
|
-
abstract getAppConfiguration(): Promise<any>;
|
|
10
|
-
abstract getVersion(): Promise<string>;
|
|
11
|
-
abstract getMininumRequiredVersion(): string;
|
|
12
|
-
abstract setLoadConfig(config: any): void;
|
|
13
|
-
abstract getAddress(path: string, display: boolean): Promise<string>;
|
|
14
|
-
abstract getPublicKey(path: string, display: boolean): Promise<PublicKey>;
|
|
15
|
-
abstract sign(path: string, payload: Buffer): Promise<Buffer>;
|
|
16
|
-
abstract signWithKeccak256(path: string, payload: Buffer): Promise<Buffer>;
|
|
17
|
-
abstract signText(path: string, payload: string | Buffer): Promise<Buffer>;
|
|
18
|
-
}
|
|
19
|
-
export declare class EthereumApp extends LedgerApp {
|
|
20
|
-
app: Eth;
|
|
21
|
-
constructor(transport: Transport);
|
|
22
|
-
getVersion(): Promise<string>;
|
|
23
|
-
getAppConfiguration(): Promise<any>;
|
|
24
|
-
setLoadConfig(config: LoadConfig): void;
|
|
25
|
-
getAddress(path: string, display?: boolean): Promise<string>;
|
|
26
|
-
getPublicKey(path: string, display?: boolean): Promise<PublicKey>;
|
|
27
|
-
sign(path: string, payload: Buffer): Promise<Buffer>;
|
|
28
|
-
signWithKeccak256(path: string, payload: Buffer): Promise<Buffer>;
|
|
29
|
-
signText(path: string, payload: string | Buffer): Promise<Buffer>;
|
|
30
|
-
getMininumRequiredVersion(): string;
|
|
31
|
-
}
|
|
32
|
-
export declare class CosmosApp extends LedgerApp {
|
|
33
|
-
app: Cosmos;
|
|
34
|
-
constructor(transport: Transport);
|
|
35
|
-
getVersion(): Promise<string>;
|
|
36
|
-
getAppConfiguration(): Promise<any>;
|
|
37
|
-
setLoadConfig(_config: any): void;
|
|
38
|
-
getAddress(path: string, display?: boolean): Promise<string>;
|
|
39
|
-
getPublicKey(path: string, display?: boolean): Promise<PublicKey>;
|
|
40
|
-
sign(path: string, payload: string | Buffer): Promise<Buffer>;
|
|
41
|
-
signWithKeccak256(_path: string, _payload: Buffer): Promise<Buffer>;
|
|
42
|
-
signText(_path: string, _payload: string | Buffer): Promise<Buffer>;
|
|
43
|
-
signTextual(path: string, payload: string | Buffer): Promise<Buffer>;
|
|
44
|
-
getMininumRequiredVersion(): string;
|
|
45
|
-
}
|