@otoplo/wallet-common 0.5.2 → 0.6.1
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.d.ts +889 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +259 -195
- package/dist/index.js.map +1 -1
- package/package.json +8 -9
- package/src/services/rostrum.ts +42 -22
- package/src/services/wallet.ts +758 -694
- package/dist/types/index.d.ts +0 -5
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/persistence/index.d.ts +0 -3
- package/dist/types/persistence/index.d.ts.map +0 -1
- package/dist/types/persistence/repository.d.ts +0 -43
- package/dist/types/persistence/repository.d.ts.map +0 -1
- package/dist/types/persistence/wallet-db.d.ts +0 -44
- package/dist/types/persistence/wallet-db.d.ts.map +0 -1
- package/dist/types/services/asset.d.ts +0 -21
- package/dist/types/services/asset.d.ts.map +0 -1
- package/dist/types/services/cache.d.ts +0 -14
- package/dist/types/services/cache.d.ts.map +0 -1
- package/dist/types/services/discovery.d.ts +0 -18
- package/dist/types/services/discovery.d.ts.map +0 -1
- package/dist/types/services/index.d.ts +0 -10
- package/dist/types/services/index.d.ts.map +0 -1
- package/dist/types/services/key.d.ts +0 -17
- package/dist/types/services/key.d.ts.map +0 -1
- package/dist/types/services/market.d.ts +0 -33
- package/dist/types/services/market.d.ts.map +0 -1
- package/dist/types/services/rostrum.d.ts +0 -39
- package/dist/types/services/rostrum.d.ts.map +0 -1
- package/dist/types/services/session.d.ts +0 -48
- package/dist/types/services/session.d.ts.map +0 -1
- package/dist/types/services/transaction.d.ts +0 -41
- package/dist/types/services/transaction.d.ts.map +0 -1
- package/dist/types/services/tx-transformer.d.ts +0 -22
- package/dist/types/services/tx-transformer.d.ts.map +0 -1
- package/dist/types/services/wallet.d.ts +0 -107
- package/dist/types/services/wallet.d.ts.map +0 -1
- package/dist/types/types/dapp.types.d.ts +0 -19
- package/dist/types/types/dapp.types.d.ts.map +0 -1
- package/dist/types/types/db.types.d.ts +0 -138
- package/dist/types/types/db.types.d.ts.map +0 -1
- package/dist/types/types/index.d.ts +0 -6
- package/dist/types/types/index.d.ts.map +0 -1
- package/dist/types/types/notification.types.d.ts +0 -21
- package/dist/types/types/notification.types.d.ts.map +0 -1
- package/dist/types/types/rostrum.types.d.ts +0 -132
- package/dist/types/types/rostrum.types.d.ts.map +0 -1
- package/dist/types/types/wallet.types.d.ts +0 -80
- package/dist/types/types/wallet.types.d.ts.map +0 -1
- package/dist/types/utils/asset.d.ts +0 -5
- package/dist/types/utils/asset.d.ts.map +0 -1
- package/dist/types/utils/common.d.ts +0 -64
- package/dist/types/utils/common.d.ts.map +0 -1
- package/dist/types/utils/enums.d.ts +0 -16
- package/dist/types/utils/enums.d.ts.map +0 -1
- package/dist/types/utils/index.d.ts +0 -7
- package/dist/types/utils/index.d.ts.map +0 -1
- package/dist/types/utils/keypath.d.ts +0 -5
- package/dist/types/utils/keypath.d.ts.map +0 -1
- package/dist/types/utils/seed.d.ts +0 -5
- package/dist/types/utils/seed.d.ts.map +0 -1
- package/dist/types/utils/vault.d.ts +0 -10
- package/dist/types/utils/vault.d.ts.map +0 -1
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
import { AccountType } from '../utils/enums';
|
|
2
|
-
import { Balance, AssetType } from './wallet.types';
|
|
3
|
-
export interface AssetMovement {
|
|
4
|
-
address: string;
|
|
5
|
-
nexaAmount: string;
|
|
6
|
-
assetId: string;
|
|
7
|
-
assetAmount: string;
|
|
8
|
-
}
|
|
9
|
-
export type TransactionType = 'receive' | 'send' | 'swap' | 'self';
|
|
10
|
-
export interface TransactionDTO {
|
|
11
|
-
accountId: number;
|
|
12
|
-
txIdem: string;
|
|
13
|
-
txId: string;
|
|
14
|
-
time: number;
|
|
15
|
-
height: number;
|
|
16
|
-
type: TransactionType;
|
|
17
|
-
fee: string;
|
|
18
|
-
othersOutputs: AssetMovement[];
|
|
19
|
-
myOutputs: AssetMovement[];
|
|
20
|
-
myInputs: AssetMovement[];
|
|
21
|
-
}
|
|
22
|
-
export interface TransactionEntity {
|
|
23
|
-
accountId: number;
|
|
24
|
-
txIdem: string;
|
|
25
|
-
txId: string;
|
|
26
|
-
time: number;
|
|
27
|
-
height: number;
|
|
28
|
-
type: TransactionType;
|
|
29
|
-
fee: string;
|
|
30
|
-
othersOutputs: string;
|
|
31
|
-
myOutputs: string;
|
|
32
|
-
myInputs: string;
|
|
33
|
-
}
|
|
34
|
-
export interface AssetTransactionEntity {
|
|
35
|
-
accountId: number;
|
|
36
|
-
assetId: string;
|
|
37
|
-
txIdem: string;
|
|
38
|
-
time: number;
|
|
39
|
-
}
|
|
40
|
-
export interface AssetEntity {
|
|
41
|
-
accountId: number;
|
|
42
|
-
tokenIdHex: string;
|
|
43
|
-
type: AssetType;
|
|
44
|
-
addedTime: number;
|
|
45
|
-
}
|
|
46
|
-
export interface TokenEntity {
|
|
47
|
-
token: string;
|
|
48
|
-
tokenIdHex: string;
|
|
49
|
-
name: string;
|
|
50
|
-
ticker: string;
|
|
51
|
-
iconUrl: string;
|
|
52
|
-
decimals: number;
|
|
53
|
-
parent: string;
|
|
54
|
-
}
|
|
55
|
-
export interface NftEntity {
|
|
56
|
-
token: string;
|
|
57
|
-
tokenIdHex: string;
|
|
58
|
-
name: string;
|
|
59
|
-
parent: string;
|
|
60
|
-
collection: string;
|
|
61
|
-
series: string;
|
|
62
|
-
author: string;
|
|
63
|
-
public: string;
|
|
64
|
-
front: string;
|
|
65
|
-
back: string;
|
|
66
|
-
thumb: string;
|
|
67
|
-
}
|
|
68
|
-
export interface SessionEntity {
|
|
69
|
-
sessionId: string;
|
|
70
|
-
accountId: number;
|
|
71
|
-
uri: string;
|
|
72
|
-
}
|
|
73
|
-
export interface AccountDTO {
|
|
74
|
-
id: number;
|
|
75
|
-
name: string;
|
|
76
|
-
address: string;
|
|
77
|
-
height: number;
|
|
78
|
-
hidden: number;
|
|
79
|
-
statusHash: string;
|
|
80
|
-
balance: Balance;
|
|
81
|
-
tokensBalance: Record<string, Balance>;
|
|
82
|
-
type: AccountType;
|
|
83
|
-
}
|
|
84
|
-
export interface AccountEntity {
|
|
85
|
-
id: number;
|
|
86
|
-
name: string;
|
|
87
|
-
address: string;
|
|
88
|
-
height: number;
|
|
89
|
-
hidden: number;
|
|
90
|
-
statusHash: string;
|
|
91
|
-
balance: string;
|
|
92
|
-
tokensBalance: string;
|
|
93
|
-
}
|
|
94
|
-
export interface AddressDTO {
|
|
95
|
-
address: string;
|
|
96
|
-
space: number;
|
|
97
|
-
idx: number;
|
|
98
|
-
used: boolean;
|
|
99
|
-
height: number;
|
|
100
|
-
statusHash: string;
|
|
101
|
-
balance: Balance;
|
|
102
|
-
tokensBalance: Record<string, Balance>;
|
|
103
|
-
type: AccountType;
|
|
104
|
-
}
|
|
105
|
-
export interface AddressEntity {
|
|
106
|
-
address: string;
|
|
107
|
-
space: number;
|
|
108
|
-
idx: number;
|
|
109
|
-
used: boolean;
|
|
110
|
-
height: number;
|
|
111
|
-
statusHash: string;
|
|
112
|
-
balance: string;
|
|
113
|
-
tokensBalance: string;
|
|
114
|
-
}
|
|
115
|
-
export interface VaultDTO {
|
|
116
|
-
address: string;
|
|
117
|
-
idx: number;
|
|
118
|
-
block: number;
|
|
119
|
-
height: number;
|
|
120
|
-
statusHash: string;
|
|
121
|
-
balance: Balance;
|
|
122
|
-
tokensBalance: Record<string, Balance>;
|
|
123
|
-
type: AccountType;
|
|
124
|
-
}
|
|
125
|
-
export interface VaultEntity {
|
|
126
|
-
address: string;
|
|
127
|
-
idx: number;
|
|
128
|
-
block: number;
|
|
129
|
-
height: number;
|
|
130
|
-
statusHash: string;
|
|
131
|
-
balance: string;
|
|
132
|
-
tokensBalance: string;
|
|
133
|
-
}
|
|
134
|
-
export interface SettingEntity {
|
|
135
|
-
name: string;
|
|
136
|
-
value: string;
|
|
137
|
-
}
|
|
138
|
-
//# sourceMappingURL=db.types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":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IACd,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,YAAY,CAAC;AAChC,mBAAmB,gBAAgB,CAAC;AACpC,mBAAmB,iBAAiB,CAAC;AACrC,mBAAmB,cAAc,CAAC;AAClC,mBAAmB,sBAAsB,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export type NotificationAction = {
|
|
2
|
-
type: 'DAPP_REQUEST';
|
|
3
|
-
account: number;
|
|
4
|
-
sessionId: string;
|
|
5
|
-
payload: string;
|
|
6
|
-
} | {
|
|
7
|
-
type: 'DISPATCH';
|
|
8
|
-
actionType: string;
|
|
9
|
-
payload?: any;
|
|
10
|
-
} | {
|
|
11
|
-
type: 'NONE';
|
|
12
|
-
};
|
|
13
|
-
export interface AppNotification {
|
|
14
|
-
id: string;
|
|
15
|
-
type: 'wallet' | 'web3';
|
|
16
|
-
title: string;
|
|
17
|
-
message?: string;
|
|
18
|
-
createdAt: number;
|
|
19
|
-
action?: NotificationAction;
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=notification.types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"notification.types.d.ts","sourceRoot":"","sources":["../../../src/types/notification.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAC1B;IAAE,IAAI,EAAE,cAAc,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;CAAE,GAC9E;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,GAAG,CAAA;CAAE,GACvD;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAErB,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,QAAQ,GAAG,MAAM,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,kBAAkB,CAAC;CAC7B"}
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
import { TransportScheme } from '@otoplo/electrum-client';
|
|
2
|
-
export interface RostrumParams {
|
|
3
|
-
scheme: TransportScheme;
|
|
4
|
-
host: string;
|
|
5
|
-
port: number;
|
|
6
|
-
label: string;
|
|
7
|
-
}
|
|
8
|
-
export interface ServerFeatures {
|
|
9
|
-
genesis_hash: string;
|
|
10
|
-
server_version: string;
|
|
11
|
-
script_index?: boolean;
|
|
12
|
-
}
|
|
13
|
-
export interface BlockTip {
|
|
14
|
-
height: number;
|
|
15
|
-
hex: string;
|
|
16
|
-
}
|
|
17
|
-
export interface IFirstUse {
|
|
18
|
-
block_hash: string;
|
|
19
|
-
block_height: number;
|
|
20
|
-
height: number;
|
|
21
|
-
tx_hash: string;
|
|
22
|
-
}
|
|
23
|
-
export interface ITokensBalance {
|
|
24
|
-
cursor?: any;
|
|
25
|
-
confirmed: Record<string, string | number>;
|
|
26
|
-
unconfirmed: Record<string, string | number>;
|
|
27
|
-
}
|
|
28
|
-
export interface ITemplateScript {
|
|
29
|
-
scriptpubkey: string;
|
|
30
|
-
scripthash: string;
|
|
31
|
-
}
|
|
32
|
-
export interface ITokenUtxo {
|
|
33
|
-
group: string;
|
|
34
|
-
height: number;
|
|
35
|
-
outpoint_hash: string;
|
|
36
|
-
token_amount: number | string;
|
|
37
|
-
token_id_hex: string;
|
|
38
|
-
tx_hash: string;
|
|
39
|
-
tx_pos: number;
|
|
40
|
-
value: number;
|
|
41
|
-
}
|
|
42
|
-
export interface IListUnspentRecord {
|
|
43
|
-
has_token: boolean;
|
|
44
|
-
height: number;
|
|
45
|
-
outpoint_hash: string;
|
|
46
|
-
tx_hash: string;
|
|
47
|
-
tx_pos: number;
|
|
48
|
-
value: number;
|
|
49
|
-
}
|
|
50
|
-
export interface IUtxo {
|
|
51
|
-
addresses: string[];
|
|
52
|
-
amount: number;
|
|
53
|
-
group: string;
|
|
54
|
-
group_authority: string | number;
|
|
55
|
-
group_quantity: string | number;
|
|
56
|
-
height: number;
|
|
57
|
-
scripthash: string;
|
|
58
|
-
scriptpubkey: string;
|
|
59
|
-
spent: ISpent;
|
|
60
|
-
status: string;
|
|
61
|
-
template_argumenthash: string;
|
|
62
|
-
template_scripthash: string;
|
|
63
|
-
token_id_hex: string;
|
|
64
|
-
tx_hash: string;
|
|
65
|
-
tx_idem: string;
|
|
66
|
-
tx_pos: number;
|
|
67
|
-
}
|
|
68
|
-
export interface ISpent {
|
|
69
|
-
height: number;
|
|
70
|
-
tx_hash: string;
|
|
71
|
-
tx_pos: number;
|
|
72
|
-
}
|
|
73
|
-
export interface ITransaction {
|
|
74
|
-
blockhash: string;
|
|
75
|
-
blocktime: number;
|
|
76
|
-
confirmations: number;
|
|
77
|
-
fee: number;
|
|
78
|
-
fee_satoshi: number;
|
|
79
|
-
hash: string;
|
|
80
|
-
height: number;
|
|
81
|
-
hex: string;
|
|
82
|
-
locktime: number;
|
|
83
|
-
size: number;
|
|
84
|
-
time: number;
|
|
85
|
-
txid: string;
|
|
86
|
-
txidem: string;
|
|
87
|
-
version: number;
|
|
88
|
-
vin: ITXInput[];
|
|
89
|
-
vout: ITXOutput[];
|
|
90
|
-
}
|
|
91
|
-
export interface ITXInput {
|
|
92
|
-
outpoint: string;
|
|
93
|
-
scriptSig: IScriptSig;
|
|
94
|
-
sequence: number;
|
|
95
|
-
value: number;
|
|
96
|
-
value_satoshi: string | number;
|
|
97
|
-
addresses: string[];
|
|
98
|
-
group: string;
|
|
99
|
-
groupAuthority: string | number;
|
|
100
|
-
groupQuantity: string | number;
|
|
101
|
-
token_id_hex?: string;
|
|
102
|
-
}
|
|
103
|
-
export interface ITXOutput {
|
|
104
|
-
n: number;
|
|
105
|
-
outpoint_hash: string;
|
|
106
|
-
scriptPubKey: IScriptPubKey;
|
|
107
|
-
type: number;
|
|
108
|
-
value: number;
|
|
109
|
-
value_satoshi: string | number;
|
|
110
|
-
}
|
|
111
|
-
export interface IScriptSig {
|
|
112
|
-
asm: string;
|
|
113
|
-
hex: string;
|
|
114
|
-
}
|
|
115
|
-
export interface IScriptPubKey {
|
|
116
|
-
addresses: string[];
|
|
117
|
-
argHash: string;
|
|
118
|
-
asm: string;
|
|
119
|
-
group: string;
|
|
120
|
-
groupAuthority: string | number;
|
|
121
|
-
groupQuantity: string | number;
|
|
122
|
-
hex: string;
|
|
123
|
-
scriptHash: string;
|
|
124
|
-
token_id_hex?: string;
|
|
125
|
-
type: string;
|
|
126
|
-
}
|
|
127
|
-
export interface ITXHistory {
|
|
128
|
-
fee?: number;
|
|
129
|
-
height: number;
|
|
130
|
-
tx_hash: string;
|
|
131
|
-
}
|
|
132
|
-
//# sourceMappingURL=rostrum.types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rostrum.types.d.ts","sourceRoot":"","sources":["../../../src/types/rostrum.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE/D,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,eAAe,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,cAAc;IAC7B,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,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AAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,GAAG,MAAM,CAAC;IAChC,aAAa,EAAE,MAAM,GAAG,MAAM,CAAC;IAC/B,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,SAAS;IACxB,CAAC,EAAE,MAAM,CAAC;IACV,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,aAAa,CAAC;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,MAAM,GAAG,MAAM,CAAC;CAChC;AAED,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,GAAG,MAAM,CAAC;IAChC,aAAa,EAAE,MAAM,GAAG,MAAM,CAAC;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,UAAU;IACzB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { DAppInfo, SessionDetails } from 'wallet-comms-sdk';
|
|
2
|
-
import { AccountType, KeySpace } from '../utils/enums';
|
|
3
|
-
export interface KeyPath {
|
|
4
|
-
account: AccountType;
|
|
5
|
-
type: KeySpace;
|
|
6
|
-
index: number;
|
|
7
|
-
}
|
|
8
|
-
export interface AddressKey {
|
|
9
|
-
keyPath: string;
|
|
10
|
-
address: string;
|
|
11
|
-
balance: Balance;
|
|
12
|
-
tokensBalance: Record<string, Balance>;
|
|
13
|
-
}
|
|
14
|
-
export interface Balance {
|
|
15
|
-
confirmed: string;
|
|
16
|
-
unconfirmed: string;
|
|
17
|
-
}
|
|
18
|
-
export interface Account {
|
|
19
|
-
id: number;
|
|
20
|
-
name: string;
|
|
21
|
-
address: string;
|
|
22
|
-
balance: Balance;
|
|
23
|
-
tokensBalance: Record<string, Balance>;
|
|
24
|
-
sessions: Record<string, SessionInfo>;
|
|
25
|
-
}
|
|
26
|
-
export interface VaultInfo {
|
|
27
|
-
address: string;
|
|
28
|
-
balance: Balance;
|
|
29
|
-
block: number;
|
|
30
|
-
index: number;
|
|
31
|
-
}
|
|
32
|
-
export interface SessionInfo {
|
|
33
|
-
details: SessionDetails;
|
|
34
|
-
appInfo: DAppInfo;
|
|
35
|
-
}
|
|
36
|
-
export interface AssetBase {
|
|
37
|
-
token: string;
|
|
38
|
-
tokenIdHex: string;
|
|
39
|
-
parent: string;
|
|
40
|
-
}
|
|
41
|
-
export interface TokenAsset {
|
|
42
|
-
name: string;
|
|
43
|
-
ticker: string;
|
|
44
|
-
iconUrl: string;
|
|
45
|
-
decimals: number;
|
|
46
|
-
}
|
|
47
|
-
export interface NFTAsset {
|
|
48
|
-
name: string;
|
|
49
|
-
series: string;
|
|
50
|
-
collection: string;
|
|
51
|
-
author: string;
|
|
52
|
-
public: string;
|
|
53
|
-
front: string;
|
|
54
|
-
back: string;
|
|
55
|
-
thumb: string;
|
|
56
|
-
}
|
|
57
|
-
export type AssetType = 'token' | 'nft';
|
|
58
|
-
export type AssetInfo = (AssetBase & {
|
|
59
|
-
type: 'token';
|
|
60
|
-
data: TokenAsset;
|
|
61
|
-
}) | (AssetBase & {
|
|
62
|
-
type: 'nft';
|
|
63
|
-
data: NFTAsset;
|
|
64
|
-
});
|
|
65
|
-
export interface MarketData {
|
|
66
|
-
id: string;
|
|
67
|
-
name: string;
|
|
68
|
-
symbol: string;
|
|
69
|
-
image: string;
|
|
70
|
-
price: number;
|
|
71
|
-
priceChange?: number | null;
|
|
72
|
-
priceChangePercentage?: number | null;
|
|
73
|
-
marketCap?: number | null;
|
|
74
|
-
fdv?: number | null;
|
|
75
|
-
circSupply?: number | null;
|
|
76
|
-
totalSupply?: number | null;
|
|
77
|
-
maxSupply?: number | null;
|
|
78
|
-
totalVolume?: number | null;
|
|
79
|
-
}
|
|
80
|
-
//# sourceMappingURL=wallet.types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"wallet.types.d.ts","sourceRoot":"","sources":["../../../src/types/wallet.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE5D,MAAM,WAAW,OAAO;IACtB,OAAO,EAAE,WAAW,CAAC;IACrB,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACxC;AAED,MAAM,WAAW,OAAO;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACvC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;CACtC;AAED,MAAM,WAAW,SAAS;IACxB,OAAO,E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BAAqB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare function transformTokenIconUrl(icon: string, documentUrl: string): string;
|
|
2
|
-
export declare function parseTokenDataUrl(data?: string): string | null;
|
|
3
|
-
export declare function getAssetMetadataUrl(token: string): string;
|
|
4
|
-
export declare function getAssetFileUrl(token: string, asset: string): string;
|
|
5
|
-
//# sourceMappingURL=asset.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"asset.d.ts","sourceRoot":"","sources":["../../../src/utils/asset.ts"],"names":[],"mappings":"AAEA,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,CAY/E;AAED,wBAAgB,iBAAiB,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAK9D;AAYD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAC,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAEnE"}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { AddressType } from 'libnexa-ts';
|
|
2
|
-
import { Balance } from '../types/wallet.types';
|
|
3
|
-
export declare const HD_WALLET_ID = -1;
|
|
4
|
-
export declare const MAX_INT64 = 9223372036854775807n;
|
|
5
|
-
export declare const CURRENCIES: {
|
|
6
|
-
readonly usd: {
|
|
7
|
-
readonly symbol: "$";
|
|
8
|
-
readonly name: "US Dollar";
|
|
9
|
-
};
|
|
10
|
-
readonly eur: {
|
|
11
|
-
readonly symbol: "€";
|
|
12
|
-
readonly name: "Euro";
|
|
13
|
-
};
|
|
14
|
-
readonly gbp: {
|
|
15
|
-
readonly symbol: "£";
|
|
16
|
-
readonly name: "British Pound";
|
|
17
|
-
};
|
|
18
|
-
readonly aud: {
|
|
19
|
-
readonly symbol: "A$";
|
|
20
|
-
readonly name: "Australian Dollar";
|
|
21
|
-
};
|
|
22
|
-
readonly cad: {
|
|
23
|
-
readonly symbol: "CA$";
|
|
24
|
-
readonly name: "Canadian Dollar";
|
|
25
|
-
};
|
|
26
|
-
readonly chf: {
|
|
27
|
-
readonly symbol: "CHF";
|
|
28
|
-
readonly name: "Swiss Franc";
|
|
29
|
-
};
|
|
30
|
-
readonly inr: {
|
|
31
|
-
readonly symbol: "₹";
|
|
32
|
-
readonly name: "Indian Rupee";
|
|
33
|
-
};
|
|
34
|
-
readonly cny: {
|
|
35
|
-
readonly symbol: "CN¥";
|
|
36
|
-
readonly name: "Chinese Yuan";
|
|
37
|
-
};
|
|
38
|
-
readonly jpy: {
|
|
39
|
-
readonly symbol: "¥";
|
|
40
|
-
readonly name: "Japanese Yen";
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
export type CurrencyCode = keyof typeof CURRENCIES;
|
|
44
|
-
export declare const currencyCodes: CurrencyCode[];
|
|
45
|
-
export declare function isTestnet(): boolean;
|
|
46
|
-
export declare function isGenesisHashValid(hash: string): boolean;
|
|
47
|
-
export declare function isValidNexaAddress(address: string, type?: AddressType): boolean;
|
|
48
|
-
export declare function getExplorerUrl(): string;
|
|
49
|
-
export declare function currentTimestamp(): number;
|
|
50
|
-
export declare function isNullOrEmpty(arg?: string | any[] | null): arg is undefined | [] | null | '';
|
|
51
|
-
export declare function truncateStringMiddle(str?: string, maxLength?: number): string;
|
|
52
|
-
export declare function capitalizeFirstLetter(str: string): string;
|
|
53
|
-
export declare function getAddressBuffer(address: string): Uint8Array;
|
|
54
|
-
export declare function tokenIdToHex(token: string): string;
|
|
55
|
-
export declare function tokenHexToAddr(token: string): string;
|
|
56
|
-
export declare function tokenAmountToAssetAmount(amount?: string | number | bigint): string;
|
|
57
|
-
export declare function sumBalance(balances: Balance[]): Balance;
|
|
58
|
-
export declare function sumTokensBalance(balances: Record<string, Balance>[]): Record<string, Balance>;
|
|
59
|
-
export declare function getFileMediaType(filename: string): 'video' | 'audio' | 'image' | 'unknown';
|
|
60
|
-
export declare function getFileMimeType(filename: string): string;
|
|
61
|
-
export declare function sleep(ms: number): Promise<void>;
|
|
62
|
-
export declare function prettifyAmount(amount: string | number | bigint): string;
|
|
63
|
-
export declare function calculateFiatValue(amount: string | number, price: number, currency: CurrencyCode, locale?: string): string;
|
|
64
|
-
//# sourceMappingURL=common.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/utils/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,WAAW,EAAsC,MAAM,YAAY,CAAC;AACtF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAGrD,eAAO,MAAM,YAAY,KAAK,CAAC;AAC/B,eAAO,MAAM,SAAS,uBAAuB,CAAC;AAE9C,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAU8C,CAAC;AAEtE,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,UAAU,CAAC;AAEnD,eAAO,MAAM,aAAa,EAA8B,YAAY,EAAE,CAAC;AAEvE,wBAAgB,SAAS,IAAI,OAAO,CAEnC;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAKxD;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,cAAkC,GAAG,OAAO,CAEnG;AAED,wBAAgB,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AM,GAAG,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAU,GAAG,MAAM,CAM3H"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export declare enum AccountType {
|
|
2
|
-
MAIN = 0,
|
|
3
|
-
VAULT = 1,
|
|
4
|
-
DAPP = 2
|
|
5
|
-
}
|
|
6
|
-
export declare enum KeySpace {
|
|
7
|
-
RECEIVE = 0,
|
|
8
|
-
CHANGE = 1
|
|
9
|
-
}
|
|
10
|
-
export declare enum SessionRequestType {
|
|
11
|
-
SignMessage = "signMessage",
|
|
12
|
-
AddToken = "addToken",
|
|
13
|
-
SignTransaction = "signTransaction",
|
|
14
|
-
SendTransaction = "sendTransaction"
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=enums.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../../src/utils/enums.ts"],"names":[],"mappings":"AAAA,oBAAY,WAAW;IACrB,IAAI,IAAI;IACR,KAAK,IAAI;IACT,IAAI,IAAI;CACT;AAED,oBAAY,QAAQ;IAClB,OAAO,IAAI;IACX,MAAM,IAAI;CACX;AAED,oBAAY,kBAAkB;IAC5B,WAAW,gBAAgB;IAC3B,QAAQ,aAAa;IACrB,eAAe,oBAAoB;IACnC,eAAe,oBAAoB;CACpC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { KeyPath } from '../types';
|
|
2
|
-
import { AccountType, KeySpace } from './enums';
|
|
3
|
-
export declare function keyPathToString(account: AccountType, type: KeySpace, index: number): string;
|
|
4
|
-
export declare function stringToKeyPath(path: string): KeyPath;
|
|
5
|
-
//# sourceMappingURL=keypath.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"keypath.d.ts","sourceRoot":"","sources":["../../../src/utils/keypath.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAErD,wBAAgB,eAAe,CAAC,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAE3F;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAOrD"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare function generateNewMnemonic(size?: 12 | 24): string;
|
|
2
|
-
export declare function isMnemonicValid(mnemonic: string): boolean;
|
|
3
|
-
export declare function encryptMnemonic(phrase: string, password: string): Promise<string>;
|
|
4
|
-
export declare function validateAndDecryptMnemonic(encSeed: string, password: string): Promise<string | false>;
|
|
5
|
-
//# sourceMappingURL=seed.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"seed.d.ts","sourceRoot":"","sources":["../../../src/utils/seed.ts"],"names":[],"mappings":"AAIA,wBAAgB,mBAAmB,CAAC,IAAI,GAAE,EAAE,GAAG,EAAO,GAAG,MAAM,CAE9D;AAED,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAEzD;AA4BD,wBAAsB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAmBvF;AAuBD,wBAAsB,0BAA0B,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,KAAK,CAAC,CAY3G"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { PublicKey, ScriptElement, Script } from 'libnexa-ts';
|
|
2
|
-
export declare const VAULT_FIRST_BLOCK = 274710;
|
|
3
|
-
export declare function getVaultTemplate(): Script;
|
|
4
|
-
export declare function getVaultTemplateHash(): Uint8Array;
|
|
5
|
-
export declare function generateVaultConstraint(pubKey: PublicKey): Script;
|
|
6
|
-
export declare function getVaultConstraintHash(pubKey: PublicKey): Uint8Array;
|
|
7
|
-
export declare function generateVaultVisibleArgs(args: number[]): ScriptElement[];
|
|
8
|
-
export declare function generateVaultAddress(pubKey: PublicKey, args: number[]): string | undefined;
|
|
9
|
-
export declare function estimateDateByFutureBlock(current: number, future: number): string;
|
|
10
|
-
//# sourceMappingURL=vault.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"vault.d.ts","sourceRoot":"","sources":["../../../src/utils/vault.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAC,MAAM,YAAY,CAAC;AAC1D,OAAO,EAAyB,MAAM,EAA2B,MAAM,YAAY,CAAC;AAEpF,eAAO,MAAM,iBAAiB,SAAS,CAAC;AAExC,wBAAgB,gBAAgB,IAAI,MAAM,CAKzC;AAED,wBAAgB,oBAAoB,IAAI,UAAU,CAGjD;AAED,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,SAAS,GAAG,MAAM,CAEjE;AAED,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,SAAS,GAAG,UAAU,CAGpE;AAED,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,aAAa,EAAE,CAExE;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,GAAG,SAAS,CAU1F;AAED,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAKjF"}
|