@pezkuwi/ui-settings 3.17.0 → 3.17.2
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/{build/bundle-pezkuwi-ui-settings.js → bundle-pezkuwi-ui-settings.js} +1 -1
- package/{build-tsc-cjs → cjs}/packageInfo.js +1 -1
- package/package.json +223 -6
- package/{build-tsc-esm/packageInfo.js → packageInfo.js} +1 -1
- package/build/README.md +0 -40
- package/build/Settings.js +0 -172
- package/build/bundle.js +0 -5
- package/build/cjs/Settings.d.ts +0 -40
- package/build/cjs/Settings.js +0 -177
- package/build/cjs/bundle.d.ts +0 -5
- package/build/cjs/bundle.js +0 -19
- package/build/cjs/defaults/chains.js +0 -8
- package/build/cjs/defaults/crypto.js +0 -35
- package/build/cjs/defaults/endpoints.js +0 -11
- package/build/cjs/defaults/index.js +0 -80
- package/build/cjs/defaults/ledger.js +0 -45
- package/build/cjs/defaults/ss58.js +0 -16
- package/build/cjs/defaults/type.js +0 -5
- package/build/cjs/defaults/ui.js +0 -58
- package/build/cjs/index.js +0 -6
- package/build/cjs/packageDetect.js +0 -5
- package/build/cjs/packageInfo.js +0 -4
- package/build/cjs/types.js +0 -2
- package/build/defaults/chains.d.ts +0 -3
- package/build/defaults/chains.js +0 -5
- package/build/defaults/crypto.d.ts +0 -4
- package/build/defaults/crypto.js +0 -32
- package/build/defaults/endpoints.d.ts +0 -3
- package/build/defaults/endpoints.js +0 -8
- package/build/defaults/index.d.ts +0 -15
- package/build/defaults/index.js +0 -58
- package/build/defaults/ledger.d.ts +0 -5
- package/build/defaults/ledger.js +0 -42
- package/build/defaults/ss58.d.ts +0 -3
- package/build/defaults/ss58.js +0 -13
- package/build/defaults/type.d.ts +0 -2
- package/build/defaults/type.js +0 -2
- package/build/defaults/ui.d.ts +0 -10
- package/build/defaults/ui.js +0 -55
- package/build/index.d.ts +0 -3
- package/build/index.js +0 -3
- package/build/package.json +0 -254
- package/build/packageDetect.d.ts +0 -1
- package/build/packageDetect.js +0 -3
- package/build/packageInfo.d.ts +0 -6
- package/build/packageInfo.js +0 -1
- package/build/types.d.ts +0 -35
- package/build/types.js +0 -1
- package/src/Settings.ts +0 -236
- package/src/bundle.ts +0 -10
- package/src/defaults/chains.ts +0 -11
- package/src/defaults/crypto.ts +0 -39
- package/src/defaults/endpoints.ts +0 -14
- package/src/defaults/index.ts +0 -72
- package/src/defaults/ledger.ts +0 -50
- package/src/defaults/ss58.ts +0 -22
- package/src/defaults/type.ts +0 -8
- package/src/defaults/ui.ts +0 -69
- package/src/index.ts +0 -8
- package/src/packageDetect.ts +0 -11
- package/src/packageInfo.ts +0 -6
- package/src/types.ts +0 -42
- package/tsconfig.build.json +0 -9
- package/tsconfig.build.tsbuildinfo +0 -1
- /package/{build/LICENSE → LICENSE} +0 -0
- /package/{build-tsc/Settings.d.ts → Settings.d.ts} +0 -0
- /package/{build-tsc-esm/Settings.js → Settings.js} +0 -0
- /package/{build-tsc/bundle.d.ts → bundle.d.ts} +0 -0
- /package/{build-tsc-esm/bundle.js → bundle.js} +0 -0
- /package/{build → cjs}/Settings.d.ts +0 -0
- /package/{build-tsc-cjs → cjs}/Settings.js +0 -0
- /package/{build → cjs}/bundle.d.ts +0 -0
- /package/{build-tsc-cjs → cjs}/bundle.js +0 -0
- /package/{build-tsc → cjs}/defaults/chains.d.ts +0 -0
- /package/{build-tsc-cjs → cjs}/defaults/chains.js +0 -0
- /package/{build-tsc → cjs}/defaults/crypto.d.ts +0 -0
- /package/{build-tsc-cjs → cjs}/defaults/crypto.js +0 -0
- /package/{build-tsc → cjs}/defaults/endpoints.d.ts +0 -0
- /package/{build-tsc-cjs → cjs}/defaults/endpoints.js +0 -0
- /package/{build-tsc → cjs}/defaults/index.d.ts +0 -0
- /package/{build-tsc-cjs → cjs}/defaults/index.js +0 -0
- /package/{build-tsc → cjs}/defaults/ledger.d.ts +0 -0
- /package/{build-tsc-cjs → cjs}/defaults/ledger.js +0 -0
- /package/{build-tsc → cjs}/defaults/ss58.d.ts +0 -0
- /package/{build-tsc-cjs → cjs}/defaults/ss58.js +0 -0
- /package/{build-tsc → cjs}/defaults/type.d.ts +0 -0
- /package/{build-tsc-cjs → cjs}/defaults/type.js +0 -0
- /package/{build-tsc → cjs}/defaults/ui.d.ts +0 -0
- /package/{build-tsc-cjs → cjs}/defaults/ui.js +0 -0
- /package/{build-tsc → cjs}/index.d.ts +0 -0
- /package/{build-tsc-cjs → cjs}/index.js +0 -0
- /package/{build/cjs → cjs}/package.json +0 -0
- /package/{build-tsc → cjs}/packageDetect.d.ts +0 -0
- /package/{build-tsc-cjs → cjs}/packageDetect.js +0 -0
- /package/{build-tsc → cjs}/packageInfo.d.ts +0 -0
- /package/{build-tsc → cjs}/types.d.ts +0 -0
- /package/{build-tsc-cjs → cjs}/types.js +0 -0
- /package/{build/cjs/defaults → defaults}/chains.d.ts +0 -0
- /package/{build-tsc-esm/defaults → defaults}/chains.js +0 -0
- /package/{build/cjs/defaults → defaults}/crypto.d.ts +0 -0
- /package/{build-tsc-esm/defaults → defaults}/crypto.js +0 -0
- /package/{build/cjs/defaults → defaults}/endpoints.d.ts +0 -0
- /package/{build-tsc-esm/defaults → defaults}/endpoints.js +0 -0
- /package/{build/cjs/defaults → defaults}/index.d.ts +0 -0
- /package/{build-tsc-esm/defaults → defaults}/index.js +0 -0
- /package/{build/cjs/defaults → defaults}/ledger.d.ts +0 -0
- /package/{build-tsc-esm/defaults → defaults}/ledger.js +0 -0
- /package/{build/cjs/defaults → defaults}/ss58.d.ts +0 -0
- /package/{build-tsc-esm/defaults → defaults}/ss58.js +0 -0
- /package/{build/cjs/defaults → defaults}/type.d.ts +0 -0
- /package/{build-tsc-esm/defaults → defaults}/type.js +0 -0
- /package/{build/cjs/defaults → defaults}/ui.d.ts +0 -0
- /package/{build-tsc-esm/defaults → defaults}/ui.js +0 -0
- /package/{build/cjs/index.d.ts → index.d.ts} +0 -0
- /package/{build-tsc-esm/index.js → index.js} +0 -0
- /package/{build/cjs/packageDetect.d.ts → packageDetect.d.ts} +0 -0
- /package/{build-tsc-esm/packageDetect.js → packageDetect.js} +0 -0
- /package/{build/cjs/packageInfo.d.ts → packageInfo.d.ts} +0 -0
- /package/{build/cjs/types.d.ts → types.d.ts} +0 -0
- /package/{build-tsc-esm/types.js → types.js} +0 -0
package/build/cjs/Settings.js
DELETED
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.settings = exports.Settings = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const eventemitter3_1 = require("eventemitter3");
|
|
6
|
-
const store_1 = tslib_1.__importDefault(require("store"));
|
|
7
|
-
const util_1 = require("@pezkuwi/util");
|
|
8
|
-
const index_js_1 = require("./defaults/index.js");
|
|
9
|
-
function withDefault(options, option, fallback) {
|
|
10
|
-
const _option = option || fallback;
|
|
11
|
-
return options.some(({ value }) => value === _option)
|
|
12
|
-
? _option
|
|
13
|
-
: fallback;
|
|
14
|
-
}
|
|
15
|
-
class Settings {
|
|
16
|
-
#emitter;
|
|
17
|
-
#apiType;
|
|
18
|
-
// will become deprecated for supporting substrate connect light clients. apiType structure should be used instead
|
|
19
|
-
#apiUrl;
|
|
20
|
-
#camera;
|
|
21
|
-
#i18nLang;
|
|
22
|
-
#icon;
|
|
23
|
-
#ledgerApp;
|
|
24
|
-
#ledgerConn;
|
|
25
|
-
#locking;
|
|
26
|
-
#metadataUp;
|
|
27
|
-
#prefix;
|
|
28
|
-
#storage;
|
|
29
|
-
#uiMode;
|
|
30
|
-
#uiTheme;
|
|
31
|
-
#notification;
|
|
32
|
-
constructor() {
|
|
33
|
-
const settings = store_1.default.get('settings') || {};
|
|
34
|
-
this.#emitter = new eventemitter3_1.EventEmitter();
|
|
35
|
-
// will become deprecated for supporting substrate connect light clients. apiType structure should be used instead
|
|
36
|
-
this.#apiUrl = (typeof settings.apiUrl === 'string' && settings.apiUrl) || (util_1.hasProcess && process.env?.['WS_URL']) || index_js_1.ENDPOINT_DEFAULT.value;
|
|
37
|
-
this.#apiType = { param: this.#apiUrl, type: 'json-rpc' };
|
|
38
|
-
this.#camera = withDefault(index_js_1.CAMERA, settings.camera, index_js_1.CAMERA_DEFAULT);
|
|
39
|
-
this.#ledgerApp = withDefault(index_js_1.LEDGER_APP, settings.ledgerApp, index_js_1.LEDGER_APP_DEFAULT);
|
|
40
|
-
this.#ledgerConn = withDefault(index_js_1.LEDGER_CONN, settings.ledgerConn, index_js_1.LEDGER_CONN_DEFAULT);
|
|
41
|
-
this.#i18nLang = settings.i18nLang || index_js_1.LANGUAGE_DEFAULT;
|
|
42
|
-
this.#icon = settings.icon || index_js_1.ICON_DEFAULT;
|
|
43
|
-
this.#locking = settings.locking || index_js_1.LOCKING_DEFAULT;
|
|
44
|
-
this.#metadataUp = withDefault(index_js_1.METADATA_UP, settings.storage, index_js_1.METADATA_UP_DEFAULT);
|
|
45
|
-
this.#notification = settings.notification || index_js_1.NOTIFICATION_DEFAULT;
|
|
46
|
-
this.#prefix = (0, util_1.isUndefined)(settings.prefix) ? index_js_1.PREFIX_DEFAULT : settings.prefix;
|
|
47
|
-
this.#storage = withDefault(index_js_1.STORAGE, settings.storage, index_js_1.STORAGE_DEFAULT);
|
|
48
|
-
this.#uiMode = settings.uiMode || index_js_1.UIMODE_DEFAULT;
|
|
49
|
-
this.#uiTheme = settings.uiTheme || index_js_1.UITHEME_DEFAULT;
|
|
50
|
-
}
|
|
51
|
-
get camera() {
|
|
52
|
-
return this.#camera;
|
|
53
|
-
}
|
|
54
|
-
get apiType() {
|
|
55
|
-
return this.#apiType;
|
|
56
|
-
}
|
|
57
|
-
get apiUrl() {
|
|
58
|
-
return this.#apiUrl;
|
|
59
|
-
}
|
|
60
|
-
get i18nLang() {
|
|
61
|
-
return this.#i18nLang;
|
|
62
|
-
}
|
|
63
|
-
get icon() {
|
|
64
|
-
return this.#icon;
|
|
65
|
-
}
|
|
66
|
-
get notification() {
|
|
67
|
-
return this.#notification;
|
|
68
|
-
}
|
|
69
|
-
get ledgerApp() {
|
|
70
|
-
return this.#ledgerApp;
|
|
71
|
-
}
|
|
72
|
-
get ledgerConn() {
|
|
73
|
-
return this.#ledgerConn;
|
|
74
|
-
}
|
|
75
|
-
get locking() {
|
|
76
|
-
return this.#locking;
|
|
77
|
-
}
|
|
78
|
-
get metadataUp() {
|
|
79
|
-
return this.#metadataUp;
|
|
80
|
-
}
|
|
81
|
-
get prefix() {
|
|
82
|
-
return this.#prefix;
|
|
83
|
-
}
|
|
84
|
-
get storage() {
|
|
85
|
-
return this.#storage;
|
|
86
|
-
}
|
|
87
|
-
get uiMode() {
|
|
88
|
-
return this.#uiMode;
|
|
89
|
-
}
|
|
90
|
-
get uiTheme() {
|
|
91
|
-
return this.#uiTheme;
|
|
92
|
-
}
|
|
93
|
-
get availableCamera() {
|
|
94
|
-
return index_js_1.CAMERA;
|
|
95
|
-
}
|
|
96
|
-
get availableCryptos() {
|
|
97
|
-
return index_js_1.CRYPTOS;
|
|
98
|
-
}
|
|
99
|
-
get availableCryptosEth() {
|
|
100
|
-
return index_js_1.CRYPTOS_ETH;
|
|
101
|
-
}
|
|
102
|
-
get availableCryptosLedger() {
|
|
103
|
-
return index_js_1.CRYPTOS_LEDGER;
|
|
104
|
-
}
|
|
105
|
-
get availableIcons() {
|
|
106
|
-
return index_js_1.ICONS;
|
|
107
|
-
}
|
|
108
|
-
get availableLedgerApp() {
|
|
109
|
-
return index_js_1.LEDGER_APP;
|
|
110
|
-
}
|
|
111
|
-
get availableLedgerConn() {
|
|
112
|
-
return index_js_1.LEDGER_CONN;
|
|
113
|
-
}
|
|
114
|
-
get availableLocking() {
|
|
115
|
-
return index_js_1.LOCKING;
|
|
116
|
-
}
|
|
117
|
-
get availableMetadataUp() {
|
|
118
|
-
return index_js_1.METADATA_UP;
|
|
119
|
-
}
|
|
120
|
-
get availableNodes() {
|
|
121
|
-
return index_js_1.ENDPOINTS;
|
|
122
|
-
}
|
|
123
|
-
get availablePrefixes() {
|
|
124
|
-
return index_js_1.PREFIXES;
|
|
125
|
-
}
|
|
126
|
-
get availableStorage() {
|
|
127
|
-
return index_js_1.STORAGE;
|
|
128
|
-
}
|
|
129
|
-
get availableUIModes() {
|
|
130
|
-
return index_js_1.UIMODES;
|
|
131
|
-
}
|
|
132
|
-
get availableUIThemes() {
|
|
133
|
-
return index_js_1.UITHEMES;
|
|
134
|
-
}
|
|
135
|
-
get() {
|
|
136
|
-
return {
|
|
137
|
-
apiType: this.#apiType,
|
|
138
|
-
apiUrl: this.#apiUrl,
|
|
139
|
-
camera: this.#camera,
|
|
140
|
-
i18nLang: this.#i18nLang,
|
|
141
|
-
icon: this.#icon,
|
|
142
|
-
ledgerApp: this.#ledgerApp,
|
|
143
|
-
ledgerConn: this.#ledgerConn,
|
|
144
|
-
locking: this.#locking,
|
|
145
|
-
metadataUp: this.#metadataUp,
|
|
146
|
-
notification: this.#notification,
|
|
147
|
-
prefix: this.#prefix,
|
|
148
|
-
storage: this.#storage,
|
|
149
|
-
uiMode: this.#uiMode,
|
|
150
|
-
uiTheme: this.#uiTheme
|
|
151
|
-
};
|
|
152
|
-
}
|
|
153
|
-
set(settings) {
|
|
154
|
-
this.#apiType = settings.apiType || this.#apiType;
|
|
155
|
-
this.#apiUrl = settings.apiUrl || this.#apiUrl;
|
|
156
|
-
this.#camera = settings.camera || this.#camera;
|
|
157
|
-
this.#ledgerConn = settings.ledgerConn || this.#ledgerConn;
|
|
158
|
-
this.#ledgerApp = settings.ledgerApp || this.#ledgerApp;
|
|
159
|
-
this.#i18nLang = settings.i18nLang || this.#i18nLang;
|
|
160
|
-
this.#icon = settings.icon || this.#icon;
|
|
161
|
-
this.#locking = settings.locking || this.#locking;
|
|
162
|
-
this.#metadataUp = settings.metadataUp || this.#metadataUp;
|
|
163
|
-
this.#notification = settings.notification || this.#notification;
|
|
164
|
-
this.#prefix = (0, util_1.isUndefined)(settings.prefix) ? this.#prefix : settings.prefix;
|
|
165
|
-
this.#storage = settings.storage || this.#storage;
|
|
166
|
-
this.#uiMode = settings.uiMode || this.#uiMode;
|
|
167
|
-
this.#uiTheme = settings.uiTheme || this.#uiTheme;
|
|
168
|
-
const newValues = this.get();
|
|
169
|
-
store_1.default.set('settings', newValues);
|
|
170
|
-
this.#emitter.emit('change', newValues);
|
|
171
|
-
}
|
|
172
|
-
on(type, cb) {
|
|
173
|
-
this.#emitter.on(type, cb);
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
exports.Settings = Settings;
|
|
177
|
-
exports.settings = new Settings();
|
package/build/cjs/bundle.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { Settings, settings } from './Settings.js';
|
|
2
|
-
export { chains } from './defaults/chains.js';
|
|
3
|
-
export { ENDPOINT_DEFAULT, ICON_DEFAULT, ICON_DEFAULT_HOST, LANGUAGE_DEFAULT, LOCKING_DEFAULT, PREFIX_DEFAULT, UIMODE_DEFAULT, UITHEME_DEFAULT } from './defaults/index.js';
|
|
4
|
-
export { packageInfo } from './packageInfo.js';
|
|
5
|
-
export { Settings, settings };
|
package/build/cjs/bundle.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.settings = exports.Settings = exports.packageInfo = exports.UITHEME_DEFAULT = exports.UIMODE_DEFAULT = exports.PREFIX_DEFAULT = exports.LOCKING_DEFAULT = exports.LANGUAGE_DEFAULT = exports.ICON_DEFAULT_HOST = exports.ICON_DEFAULT = exports.ENDPOINT_DEFAULT = exports.chains = void 0;
|
|
4
|
-
const Settings_js_1 = require("./Settings.js");
|
|
5
|
-
Object.defineProperty(exports, "Settings", { enumerable: true, get: function () { return Settings_js_1.Settings; } });
|
|
6
|
-
Object.defineProperty(exports, "settings", { enumerable: true, get: function () { return Settings_js_1.settings; } });
|
|
7
|
-
var chains_js_1 = require("./defaults/chains.js");
|
|
8
|
-
Object.defineProperty(exports, "chains", { enumerable: true, get: function () { return chains_js_1.chains; } });
|
|
9
|
-
var index_js_1 = require("./defaults/index.js");
|
|
10
|
-
Object.defineProperty(exports, "ENDPOINT_DEFAULT", { enumerable: true, get: function () { return index_js_1.ENDPOINT_DEFAULT; } });
|
|
11
|
-
Object.defineProperty(exports, "ICON_DEFAULT", { enumerable: true, get: function () { return index_js_1.ICON_DEFAULT; } });
|
|
12
|
-
Object.defineProperty(exports, "ICON_DEFAULT_HOST", { enumerable: true, get: function () { return index_js_1.ICON_DEFAULT_HOST; } });
|
|
13
|
-
Object.defineProperty(exports, "LANGUAGE_DEFAULT", { enumerable: true, get: function () { return index_js_1.LANGUAGE_DEFAULT; } });
|
|
14
|
-
Object.defineProperty(exports, "LOCKING_DEFAULT", { enumerable: true, get: function () { return index_js_1.LOCKING_DEFAULT; } });
|
|
15
|
-
Object.defineProperty(exports, "PREFIX_DEFAULT", { enumerable: true, get: function () { return index_js_1.PREFIX_DEFAULT; } });
|
|
16
|
-
Object.defineProperty(exports, "UIMODE_DEFAULT", { enumerable: true, get: function () { return index_js_1.UIMODE_DEFAULT; } });
|
|
17
|
-
Object.defineProperty(exports, "UITHEME_DEFAULT", { enumerable: true, get: function () { return index_js_1.UITHEME_DEFAULT; } });
|
|
18
|
-
var packageInfo_js_1 = require("./packageInfo.js");
|
|
19
|
-
Object.defineProperty(exports, "packageInfo", { enumerable: true, get: function () { return packageInfo_js_1.packageInfo; } });
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.chains = void 0;
|
|
4
|
-
const networks_1 = require("@pezkuwi/networks");
|
|
5
|
-
const util_1 = require("@pezkuwi/util");
|
|
6
|
-
exports.chains = networks_1.selectableNetworks
|
|
7
|
-
.filter((n) => n.genesisHash.length)
|
|
8
|
-
.reduce((chains, { genesisHash, network }) => (0, util_1.objectSpread)(chains, { [network]: genesisHash }), {});
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CRYPTOS_LEDGER = exports.CRYPTOS_ETH = exports.CRYPTOS = void 0;
|
|
4
|
-
exports.CRYPTOS = [
|
|
5
|
-
{
|
|
6
|
-
info: 'sr25519',
|
|
7
|
-
text: 'Schnorrkel (sr25519, recommended)',
|
|
8
|
-
value: 'sr25519'
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
info: 'ed25519',
|
|
12
|
-
text: 'Edwards (ed25519, alternative)',
|
|
13
|
-
value: 'ed25519'
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
info: 'ecdsa',
|
|
17
|
-
text: 'ECDSA (Non BTC/ETH compatible)',
|
|
18
|
-
value: 'ecdsa'
|
|
19
|
-
}
|
|
20
|
-
];
|
|
21
|
-
exports.CRYPTOS_ETH = [
|
|
22
|
-
{
|
|
23
|
-
info: 'ethereum',
|
|
24
|
-
text: 'ECDSA (ETH compatible)',
|
|
25
|
-
value: 'ethereum'
|
|
26
|
-
}
|
|
27
|
-
];
|
|
28
|
-
exports.CRYPTOS_LEDGER = [
|
|
29
|
-
...exports.CRYPTOS,
|
|
30
|
-
{
|
|
31
|
-
info: 'ed25519-ledger',
|
|
32
|
-
text: 'Ledger (ed25519, BIP32 derivation)',
|
|
33
|
-
value: 'ed25519-ledger'
|
|
34
|
-
}
|
|
35
|
-
];
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ENDPOINT_DEFAULT = exports.ENDPOINTS = void 0;
|
|
4
|
-
exports.ENDPOINTS = [
|
|
5
|
-
{
|
|
6
|
-
info: 'local',
|
|
7
|
-
text: 'Local Node (Own, 127.0.0.1:9944)',
|
|
8
|
-
value: 'ws://127.0.0.1:9944/'
|
|
9
|
-
}
|
|
10
|
-
];
|
|
11
|
-
exports.ENDPOINT_DEFAULT = exports.ENDPOINTS[0];
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.STORAGE = exports.STORAGE_DEFAULT = exports.METADATA_UP = exports.METADATA_UP_DEFAULT = exports.LOCKING = exports.LOCKING_DEFAULT = exports.LANGUAGE_DEFAULT = exports.CAMERA = exports.CAMERA_DEFAULT = exports.UITHEMES = exports.UITHEME_DEFAULT = exports.UIMODES = exports.UIMODE_DEFAULT = exports.NOTIFICATION_DEFAULT = exports.ICONS = exports.ICON_DEFAULT_HOST = exports.ICON_DEFAULT = exports.PREFIXES = exports.PREFIX_DEFAULT = exports.LEDGER_CONN_DEFAULT = exports.LEDGER_CONN = exports.LEDGER_APP_DEFAULT = exports.LEDGER_APP = exports.ENDPOINTS = exports.ENDPOINT_DEFAULT = exports.CRYPTOS_LEDGER = exports.CRYPTOS_ETH = exports.CRYPTOS = void 0;
|
|
4
|
-
var crypto_js_1 = require("./crypto.js");
|
|
5
|
-
Object.defineProperty(exports, "CRYPTOS", { enumerable: true, get: function () { return crypto_js_1.CRYPTOS; } });
|
|
6
|
-
Object.defineProperty(exports, "CRYPTOS_ETH", { enumerable: true, get: function () { return crypto_js_1.CRYPTOS_ETH; } });
|
|
7
|
-
Object.defineProperty(exports, "CRYPTOS_LEDGER", { enumerable: true, get: function () { return crypto_js_1.CRYPTOS_LEDGER; } });
|
|
8
|
-
var endpoints_js_1 = require("./endpoints.js");
|
|
9
|
-
Object.defineProperty(exports, "ENDPOINT_DEFAULT", { enumerable: true, get: function () { return endpoints_js_1.ENDPOINT_DEFAULT; } });
|
|
10
|
-
Object.defineProperty(exports, "ENDPOINTS", { enumerable: true, get: function () { return endpoints_js_1.ENDPOINTS; } });
|
|
11
|
-
var ledger_js_1 = require("./ledger.js");
|
|
12
|
-
Object.defineProperty(exports, "LEDGER_APP", { enumerable: true, get: function () { return ledger_js_1.LEDGER_APP; } });
|
|
13
|
-
Object.defineProperty(exports, "LEDGER_APP_DEFAULT", { enumerable: true, get: function () { return ledger_js_1.LEDGER_APP_DEFAULT; } });
|
|
14
|
-
Object.defineProperty(exports, "LEDGER_CONN", { enumerable: true, get: function () { return ledger_js_1.LEDGER_CONN; } });
|
|
15
|
-
Object.defineProperty(exports, "LEDGER_CONN_DEFAULT", { enumerable: true, get: function () { return ledger_js_1.LEDGER_CONN_DEFAULT; } });
|
|
16
|
-
var ss58_js_1 = require("./ss58.js");
|
|
17
|
-
Object.defineProperty(exports, "PREFIX_DEFAULT", { enumerable: true, get: function () { return ss58_js_1.PREFIX_DEFAULT; } });
|
|
18
|
-
Object.defineProperty(exports, "PREFIXES", { enumerable: true, get: function () { return ss58_js_1.PREFIXES; } });
|
|
19
|
-
var ui_js_1 = require("./ui.js");
|
|
20
|
-
Object.defineProperty(exports, "ICON_DEFAULT", { enumerable: true, get: function () { return ui_js_1.ICON_DEFAULT; } });
|
|
21
|
-
Object.defineProperty(exports, "ICON_DEFAULT_HOST", { enumerable: true, get: function () { return ui_js_1.ICON_DEFAULT_HOST; } });
|
|
22
|
-
Object.defineProperty(exports, "ICONS", { enumerable: true, get: function () { return ui_js_1.ICONS; } });
|
|
23
|
-
Object.defineProperty(exports, "NOTIFICATION_DEFAULT", { enumerable: true, get: function () { return ui_js_1.NOTIFICATION_DEFAULT; } });
|
|
24
|
-
Object.defineProperty(exports, "UIMODE_DEFAULT", { enumerable: true, get: function () { return ui_js_1.UIMODE_DEFAULT; } });
|
|
25
|
-
Object.defineProperty(exports, "UIMODES", { enumerable: true, get: function () { return ui_js_1.UIMODES; } });
|
|
26
|
-
Object.defineProperty(exports, "UITHEME_DEFAULT", { enumerable: true, get: function () { return ui_js_1.UITHEME_DEFAULT; } });
|
|
27
|
-
Object.defineProperty(exports, "UITHEMES", { enumerable: true, get: function () { return ui_js_1.UITHEMES; } });
|
|
28
|
-
exports.CAMERA_DEFAULT = 'off';
|
|
29
|
-
exports.CAMERA = [
|
|
30
|
-
{
|
|
31
|
-
info: 'on',
|
|
32
|
-
text: 'Allow camera access',
|
|
33
|
-
value: 'on'
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
info: 'off',
|
|
37
|
-
text: 'Do not allow camera access',
|
|
38
|
-
value: 'off'
|
|
39
|
-
}
|
|
40
|
-
];
|
|
41
|
-
exports.LANGUAGE_DEFAULT = 'default';
|
|
42
|
-
exports.LOCKING_DEFAULT = 'session';
|
|
43
|
-
exports.LOCKING = [
|
|
44
|
-
{
|
|
45
|
-
info: 'session',
|
|
46
|
-
text: 'Once per session',
|
|
47
|
-
value: 'session'
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
info: 'tx',
|
|
51
|
-
text: 'On each transaction',
|
|
52
|
-
value: 'tx'
|
|
53
|
-
}
|
|
54
|
-
];
|
|
55
|
-
exports.METADATA_UP_DEFAULT = 'off';
|
|
56
|
-
exports.METADATA_UP = [
|
|
57
|
-
{
|
|
58
|
-
info: 'off',
|
|
59
|
-
text: 'Do not auto-update extension metadata',
|
|
60
|
-
value: 'off'
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
info: 'on',
|
|
64
|
-
text: 'Auto-update extension metadata',
|
|
65
|
-
value: 'on'
|
|
66
|
-
}
|
|
67
|
-
];
|
|
68
|
-
exports.STORAGE_DEFAULT = 'off';
|
|
69
|
-
exports.STORAGE = [
|
|
70
|
-
{
|
|
71
|
-
info: 'on',
|
|
72
|
-
text: 'Allow local in-browser account storage',
|
|
73
|
-
value: 'on'
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
info: 'off',
|
|
77
|
-
text: 'Do not allow local in-browser account storage',
|
|
78
|
-
value: 'off'
|
|
79
|
-
}
|
|
80
|
-
];
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LEDGER_APP = exports.LEDGER_APP_DEFAULT = exports.LEDGER_CONN = exports.LEDGER_CONN_DEFAULT = void 0;
|
|
4
|
-
exports.LEDGER_CONN_DEFAULT = 'none';
|
|
5
|
-
exports.LEDGER_CONN = [
|
|
6
|
-
{
|
|
7
|
-
info: 'none',
|
|
8
|
-
text: 'Do not attach Ledger devices',
|
|
9
|
-
value: 'none'
|
|
10
|
-
},
|
|
11
|
-
// Deprecated
|
|
12
|
-
// {
|
|
13
|
-
// info: 'u2f',
|
|
14
|
-
// text: 'Attach Ledger via U2F',
|
|
15
|
-
// value: 'u2f'
|
|
16
|
-
// },
|
|
17
|
-
{
|
|
18
|
-
info: 'webusb',
|
|
19
|
-
text: 'Attach Ledger via WebUSB (Chrome, recommended)',
|
|
20
|
-
value: 'webusb'
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
info: 'hid',
|
|
24
|
-
text: 'Attach Ledger via WebHID (Chrome, experimental)',
|
|
25
|
-
value: 'hid'
|
|
26
|
-
}
|
|
27
|
-
];
|
|
28
|
-
exports.LEDGER_APP_DEFAULT = 'generic';
|
|
29
|
-
exports.LEDGER_APP = [
|
|
30
|
-
{
|
|
31
|
-
info: 'generic',
|
|
32
|
-
text: 'Use the Ledger Pezkuwi Generic App',
|
|
33
|
-
value: 'generic'
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
info: 'migration',
|
|
37
|
-
text: 'Use the Ledger Migration App',
|
|
38
|
-
value: 'migration'
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
info: 'chainSpecific',
|
|
42
|
-
text: 'Use the Chain Specific Ledger App',
|
|
43
|
-
value: 'chainSpecific'
|
|
44
|
-
}
|
|
45
|
-
];
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PREFIXES = exports.PREFIX_DEFAULT = void 0;
|
|
4
|
-
const networks_1 = require("@pezkuwi/networks");
|
|
5
|
-
exports.PREFIX_DEFAULT = -1;
|
|
6
|
-
const defaultNetwork = {
|
|
7
|
-
info: 'default',
|
|
8
|
-
text: 'Default for the connected node',
|
|
9
|
-
value: -1
|
|
10
|
-
};
|
|
11
|
-
const networks = networks_1.availableNetworks.map(({ displayName, network, prefix }) => ({
|
|
12
|
-
info: network,
|
|
13
|
-
text: displayName,
|
|
14
|
-
value: prefix
|
|
15
|
-
}));
|
|
16
|
-
exports.PREFIXES = [defaultNetwork, ...networks];
|
package/build/cjs/defaults/ui.js
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NOTIFICATION_DEFAULT = exports.ICONS = exports.ICON_DEFAULT_HOST = exports.ICON_DEFAULT = exports.UITHEMES = exports.UITHEME_DEFAULT = exports.UIMODES = exports.UIMODE_DEFAULT = exports.LANGUAGE_DEFAULT = void 0;
|
|
4
|
-
const type_js_1 = require("./type.js");
|
|
5
|
-
exports.LANGUAGE_DEFAULT = 'default';
|
|
6
|
-
exports.UIMODE_DEFAULT = !type_js_1.isPolkadot && typeof window !== 'undefined' && window.location.host.includes('ui-light')
|
|
7
|
-
? 'light'
|
|
8
|
-
: 'full';
|
|
9
|
-
exports.UIMODES = [
|
|
10
|
-
{
|
|
11
|
-
info: 'full',
|
|
12
|
-
text: 'Fully featured',
|
|
13
|
-
value: 'full'
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
info: 'light',
|
|
17
|
-
text: 'Basic features only',
|
|
18
|
-
value: 'light'
|
|
19
|
-
}
|
|
20
|
-
];
|
|
21
|
-
exports.UITHEME_DEFAULT = 'light';
|
|
22
|
-
exports.UITHEMES = [
|
|
23
|
-
{
|
|
24
|
-
info: 'light',
|
|
25
|
-
text: 'Light theme',
|
|
26
|
-
value: 'light'
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
info: 'dark',
|
|
30
|
-
text: 'Dark theme',
|
|
31
|
-
value: 'dark'
|
|
32
|
-
}
|
|
33
|
-
];
|
|
34
|
-
exports.ICON_DEFAULT = 'default';
|
|
35
|
-
exports.ICON_DEFAULT_HOST = 'pezkuwi';
|
|
36
|
-
exports.ICONS = [
|
|
37
|
-
{
|
|
38
|
-
info: 'default',
|
|
39
|
-
text: 'Default for the connected node',
|
|
40
|
-
value: 'default'
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
info: 'pezkuwi',
|
|
44
|
-
text: 'Pezkuwi',
|
|
45
|
-
value: 'pezkuwi'
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
info: 'bizinikiwi',
|
|
49
|
-
text: 'Bizinikiwi',
|
|
50
|
-
value: 'bizinikiwi'
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
info: 'beachball',
|
|
54
|
-
text: 'Beachball',
|
|
55
|
-
value: 'beachball'
|
|
56
|
-
}
|
|
57
|
-
];
|
|
58
|
-
exports.NOTIFICATION_DEFAULT = 'popup';
|
package/build/cjs/index.js
DELETED
package/build/cjs/packageInfo.js
DELETED
package/build/cjs/types.js
DELETED
package/build/defaults/chains.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { selectableNetworks } from '@pezkuwi/networks';
|
|
2
|
-
import { objectSpread } from '@pezkuwi/util';
|
|
3
|
-
export const chains = /*#__PURE__*/ selectableNetworks
|
|
4
|
-
.filter((n) => n.genesisHash.length)
|
|
5
|
-
.reduce((chains, { genesisHash, network }) => objectSpread(chains, { [network]: genesisHash }), {});
|
package/build/defaults/crypto.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
export const CRYPTOS = [
|
|
2
|
-
{
|
|
3
|
-
info: 'sr25519',
|
|
4
|
-
text: 'Schnorrkel (sr25519, recommended)',
|
|
5
|
-
value: 'sr25519'
|
|
6
|
-
},
|
|
7
|
-
{
|
|
8
|
-
info: 'ed25519',
|
|
9
|
-
text: 'Edwards (ed25519, alternative)',
|
|
10
|
-
value: 'ed25519'
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
info: 'ecdsa',
|
|
14
|
-
text: 'ECDSA (Non BTC/ETH compatible)',
|
|
15
|
-
value: 'ecdsa'
|
|
16
|
-
}
|
|
17
|
-
];
|
|
18
|
-
export const CRYPTOS_ETH = [
|
|
19
|
-
{
|
|
20
|
-
info: 'ethereum',
|
|
21
|
-
text: 'ECDSA (ETH compatible)',
|
|
22
|
-
value: 'ethereum'
|
|
23
|
-
}
|
|
24
|
-
];
|
|
25
|
-
export const CRYPTOS_LEDGER = [
|
|
26
|
-
...CRYPTOS,
|
|
27
|
-
{
|
|
28
|
-
info: 'ed25519-ledger',
|
|
29
|
-
text: 'Ledger (ed25519, BIP32 derivation)',
|
|
30
|
-
value: 'ed25519-ledger'
|
|
31
|
-
}
|
|
32
|
-
];
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { Option } from '../types.js';
|
|
2
|
-
export { CRYPTOS, CRYPTOS_ETH, CRYPTOS_LEDGER } from './crypto.js';
|
|
3
|
-
export { ENDPOINT_DEFAULT, ENDPOINTS } from './endpoints.js';
|
|
4
|
-
export { LEDGER_APP, LEDGER_APP_DEFAULT, LEDGER_CONN, LEDGER_CONN_DEFAULT } from './ledger.js';
|
|
5
|
-
export { PREFIX_DEFAULT, PREFIXES } from './ss58.js';
|
|
6
|
-
export { ICON_DEFAULT, ICON_DEFAULT_HOST, ICONS, NOTIFICATION_DEFAULT, UIMODE_DEFAULT, UIMODES, UITHEME_DEFAULT, UITHEMES } from './ui.js';
|
|
7
|
-
export declare const CAMERA_DEFAULT = "off";
|
|
8
|
-
export declare const CAMERA: Option[];
|
|
9
|
-
export declare const LANGUAGE_DEFAULT = "default";
|
|
10
|
-
export declare const LOCKING_DEFAULT = "session";
|
|
11
|
-
export declare const LOCKING: Option[];
|
|
12
|
-
export declare const METADATA_UP_DEFAULT = "off";
|
|
13
|
-
export declare const METADATA_UP: Option[];
|
|
14
|
-
export declare const STORAGE_DEFAULT = "off";
|
|
15
|
-
export declare const STORAGE: Option[];
|
package/build/defaults/index.js
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
export { CRYPTOS, CRYPTOS_ETH, CRYPTOS_LEDGER } from './crypto.js';
|
|
2
|
-
export { ENDPOINT_DEFAULT, ENDPOINTS } from './endpoints.js';
|
|
3
|
-
export { LEDGER_APP, LEDGER_APP_DEFAULT, LEDGER_CONN, LEDGER_CONN_DEFAULT } from './ledger.js';
|
|
4
|
-
export { PREFIX_DEFAULT, PREFIXES } from './ss58.js';
|
|
5
|
-
export { ICON_DEFAULT, ICON_DEFAULT_HOST, ICONS, NOTIFICATION_DEFAULT, UIMODE_DEFAULT, UIMODES, UITHEME_DEFAULT, UITHEMES } from './ui.js';
|
|
6
|
-
export const CAMERA_DEFAULT = 'off';
|
|
7
|
-
export const CAMERA = [
|
|
8
|
-
{
|
|
9
|
-
info: 'on',
|
|
10
|
-
text: 'Allow camera access',
|
|
11
|
-
value: 'on'
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
info: 'off',
|
|
15
|
-
text: 'Do not allow camera access',
|
|
16
|
-
value: 'off'
|
|
17
|
-
}
|
|
18
|
-
];
|
|
19
|
-
export const LANGUAGE_DEFAULT = 'default';
|
|
20
|
-
export const LOCKING_DEFAULT = 'session';
|
|
21
|
-
export const LOCKING = [
|
|
22
|
-
{
|
|
23
|
-
info: 'session',
|
|
24
|
-
text: 'Once per session',
|
|
25
|
-
value: 'session'
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
info: 'tx',
|
|
29
|
-
text: 'On each transaction',
|
|
30
|
-
value: 'tx'
|
|
31
|
-
}
|
|
32
|
-
];
|
|
33
|
-
export const METADATA_UP_DEFAULT = 'off';
|
|
34
|
-
export const METADATA_UP = [
|
|
35
|
-
{
|
|
36
|
-
info: 'off',
|
|
37
|
-
text: 'Do not auto-update extension metadata',
|
|
38
|
-
value: 'off'
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
info: 'on',
|
|
42
|
-
text: 'Auto-update extension metadata',
|
|
43
|
-
value: 'on'
|
|
44
|
-
}
|
|
45
|
-
];
|
|
46
|
-
export const STORAGE_DEFAULT = 'off';
|
|
47
|
-
export const STORAGE = [
|
|
48
|
-
{
|
|
49
|
-
info: 'on',
|
|
50
|
-
text: 'Allow local in-browser account storage',
|
|
51
|
-
value: 'on'
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
info: 'off',
|
|
55
|
-
text: 'Do not allow local in-browser account storage',
|
|
56
|
-
value: 'off'
|
|
57
|
-
}
|
|
58
|
-
];
|