mirror of
https://github.com/pezkuwichain/pezkuwi-ui.git
synced 2026-06-14 20:41:03 +00:00
@@ -9,11 +9,11 @@ import type { KeyringOptions, KeyringStore } from './types';
|
||||
import { createTestKeyring } from '@polkadot/keyring';
|
||||
import { isBoolean, isNumber, isString } from '@polkadot/util';
|
||||
|
||||
import { accounts } from './observable/accounts';
|
||||
import { addresses } from './observable/addresses';
|
||||
import { contracts } from './observable/contracts';
|
||||
import { env } from './observable/env';
|
||||
import { BrowserStore } from './stores/Browser'; // direct import (skip index with all)
|
||||
import { accounts } from './observable/accounts.js';
|
||||
import { addresses } from './observable/addresses.js';
|
||||
import { contracts } from './observable/contracts.js';
|
||||
import { env } from './observable/env.js';
|
||||
import { BrowserStore } from './stores/Browser.js'; // direct import (skip index with all)
|
||||
|
||||
export class Base {
|
||||
#accounts: AddressSubject;
|
||||
|
||||
@@ -5,18 +5,18 @@ import type { KeyringPair, KeyringPair$Json, KeyringPair$Meta } from '@polkadot/
|
||||
import type { BN } from '@polkadot/util';
|
||||
import type { EncryptedJson } from '@polkadot/util-crypto/json/types';
|
||||
import type { KeypairType } from '@polkadot/util-crypto/types';
|
||||
import type { AddressSubject, SingleAddress } from './observable/types';
|
||||
import type { CreateResult, KeyringAddress, KeyringAddressType, KeyringItemType, KeyringJson, KeyringJson$Meta, KeyringOptions, KeyringPairs$Json, KeyringStruct } from './types';
|
||||
import type { AddressSubject, SingleAddress } from './observable/types.js';
|
||||
import type { CreateResult, KeyringAddress, KeyringAddressType, KeyringItemType, KeyringJson, KeyringJson$Meta, KeyringOptions, KeyringPairs$Json, KeyringStruct } from './types.js';
|
||||
|
||||
import { createPair } from '@polkadot/keyring';
|
||||
import { chains } from '@polkadot/ui-settings';
|
||||
import { bnToBn, hexToU8a, isFunction, isHex, isString, objectSpread, stringify, stringToU8a, u8aSorted, u8aToString } from '@polkadot/util';
|
||||
import { base64Decode, createKeyMulti, jsonDecrypt, jsonEncrypt } from '@polkadot/util-crypto';
|
||||
|
||||
import { env } from './observable/env';
|
||||
import { Base } from './Base';
|
||||
import { accountKey, accountRegex, addressKey, addressRegex, contractKey, contractRegex } from './defaults';
|
||||
import { KeyringOption } from './options';
|
||||
import { env } from './observable/env.js';
|
||||
import { KeyringOption } from './options/index.js';
|
||||
import { Base } from './Base.js';
|
||||
import { accountKey, accountRegex, addressKey, addressRegex, contractKey, contractRegex } from './defaults.js';
|
||||
|
||||
const RECENT_EXPIRY = 24 * 60 * 60;
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// Copyright 2017-2023 @polkadot/ui-keyring authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import { Keyring } from './Keyring';
|
||||
import { Keyring } from './Keyring.js';
|
||||
|
||||
export { packageInfo } from './packageInfo';
|
||||
export { packageInfo } from './packageInfo.js';
|
||||
|
||||
const keyring = new Keyring();
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
import { detectPackage } from '@polkadot/util';
|
||||
|
||||
import others from './detectOther';
|
||||
import { packageInfo } from './packageInfo';
|
||||
import others from './detectOther.js';
|
||||
import { packageInfo } from './packageInfo.js';
|
||||
|
||||
detectPackage(packageInfo, null, others);
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
// Copyright 2017-2023 @polkadot/ui-keyring authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import './detectPackage';
|
||||
import './detectPackage.js';
|
||||
|
||||
import { keyring } from './bundle';
|
||||
import { keyring } from './bundle.js';
|
||||
|
||||
export * from './bundle';
|
||||
export * from './bundle.js';
|
||||
|
||||
export default keyring;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Copyright 2017-2023 @polkadot/ui-keyring authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import { accountKey } from '../defaults';
|
||||
import { genericSubject } from './genericSubject';
|
||||
import { accountKey } from '../defaults.js';
|
||||
import { genericSubject } from './genericSubject.js';
|
||||
|
||||
export const accounts = genericSubject(accountKey, true);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Copyright 2017-2023 @polkadot/ui-keyring authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import { addressKey } from '../defaults';
|
||||
import { genericSubject } from './genericSubject';
|
||||
import { addressKey } from '../defaults.js';
|
||||
import { genericSubject } from './genericSubject.js';
|
||||
|
||||
export const addresses = genericSubject(addressKey);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Copyright 2017-2023 @polkadot/ui-keyring authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import { contractKey } from '../defaults';
|
||||
import { genericSubject } from './genericSubject';
|
||||
import { contractKey } from '../defaults.js';
|
||||
import { genericSubject } from './genericSubject.js';
|
||||
|
||||
export const contracts = genericSubject(contractKey);
|
||||
|
||||
@@ -9,8 +9,8 @@ import { BehaviorSubject } from 'rxjs';
|
||||
|
||||
import { objectCopy, objectSpread } from '@polkadot/util';
|
||||
|
||||
import { createOptionItem } from '../options/item';
|
||||
import { env } from './env';
|
||||
import { createOptionItem } from '../options/item.js';
|
||||
import { env } from './env.js';
|
||||
|
||||
function callNext (current: SubjectInfo, subject: BehaviorSubject<SubjectInfo>, withTest: boolean): void {
|
||||
const isDevMode = env.isDevelopment();
|
||||
|
||||
@@ -5,9 +5,9 @@ import type { SubjectInfo } from './types';
|
||||
|
||||
import { combineLatest, map } from 'rxjs';
|
||||
|
||||
import { accounts } from './accounts';
|
||||
import { addresses } from './addresses';
|
||||
import { contracts } from './contracts';
|
||||
import { accounts } from './accounts.js';
|
||||
import { addresses } from './addresses.js';
|
||||
import { contracts } from './contracts.js';
|
||||
|
||||
interface Result {
|
||||
accounts: SubjectInfo;
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
|
||||
import type { BehaviorSubject } from 'rxjs';
|
||||
import type { KeypairType } from '@polkadot/util-crypto/types';
|
||||
import type { KeyringSectionOption } from '../options/types';
|
||||
import type { KeyringJson, KeyringStore } from '../types';
|
||||
import type { KeyringSectionOption } from '../options/types.js';
|
||||
import type { KeyringJson, KeyringStore } from '../types.js';
|
||||
|
||||
export interface SingleAddress {
|
||||
json: KeyringJson;
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
|
||||
/// <reference types="@polkadot/dev/node/test/node" />
|
||||
|
||||
import type { KeyringStruct } from '../types';
|
||||
import type { KeyringStruct } from '../types.js';
|
||||
|
||||
import { KeyringOption } from '.';
|
||||
import { KeyringOption } from './index.js';
|
||||
|
||||
const keyringOption = new KeyringOption();
|
||||
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
// Copyright 2017-2023 @polkadot/ui-keyring authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { SingleAddress } from '../observable/types';
|
||||
import type { KeyringStruct } from '../types';
|
||||
import type { KeyringOptionInstance, KeyringOptions, KeyringSectionOption, KeyringSectionOptions } from './types';
|
||||
import type { SingleAddress } from '../observable/types.js';
|
||||
import type { KeyringStruct } from '../types.js';
|
||||
import type { KeyringOptionInstance, KeyringOptions, KeyringSectionOption, KeyringSectionOptions } from './types.js';
|
||||
|
||||
import { BehaviorSubject } from 'rxjs';
|
||||
|
||||
import { assert } from '@polkadot/util';
|
||||
|
||||
import { obervableAll } from '../observable';
|
||||
import { obervableAll } from '../observable/index.js';
|
||||
|
||||
let hasCalledInitOptions = false;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Copyright 2017-2023 @polkadot/ui-keyring authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { KeyringSectionOption } from './types';
|
||||
import type { KeyringSectionOption } from './types.js';
|
||||
|
||||
import { isUndefined } from '@polkadot/util';
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Copyright 2017-2023 @polkadot/ui-keyring authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { KeyringItemType, KeyringStruct } from '../types';
|
||||
import type { KeyringItemType, KeyringStruct } from '../types.js';
|
||||
|
||||
export interface KeyringSectionOption {
|
||||
key: string | null;
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
|
||||
import type { KeyringJson, KeyringStore } from '../types';
|
||||
|
||||
import fs from 'fs';
|
||||
import mkdirp from 'mkdirp';
|
||||
import path from 'path';
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
|
||||
import { assert } from '@polkadot/util';
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright 2017-2023 @polkadot/ui-keyring authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
export { BrowserStore } from './Browser';
|
||||
export { FileStore } from './File';
|
||||
export { BrowserStore } from './Browser.js';
|
||||
export { FileStore } from './File.js';
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
import type { KeyringInstance as BaseKeyringInstance, KeyringOptions as KeyringOptionsBase, KeyringPair, KeyringPair$Json, KeyringPair$Meta } from '@polkadot/keyring/types';
|
||||
import type { EncryptedJson } from '@polkadot/util-crypto/json/types';
|
||||
import type { KeypairType } from '@polkadot/util-crypto/types';
|
||||
import type { AddressSubject, SingleAddress } from './observable/types';
|
||||
import type { AddressSubject, SingleAddress } from './observable/types.js';
|
||||
|
||||
export interface ContractMeta {
|
||||
abi: string;
|
||||
|
||||
Reference in New Issue
Block a user