@subwallet/extension-base 0.3.6-2 → 0.4.2-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.
Files changed (82) hide show
  1. package/LICENSE +201 -201
  2. package/README.md +10 -10
  3. package/background/KoniTypes.d.ts +595 -462
  4. package/background/KoniTypes.js +2 -1
  5. package/background/RequestBytesSign.d.ts +12 -12
  6. package/background/RequestBytesSign.js +1 -1
  7. package/background/RequestExtrinsicSign.d.ts +12 -12
  8. package/background/RequestExtrinsicSign.js +1 -1
  9. package/background/handlers/Extension.d.ts +49 -49
  10. package/background/handlers/Extension.js +1 -1
  11. package/background/handlers/State.d.ts +87 -87
  12. package/background/handlers/State.js +1 -1
  13. package/background/handlers/Tabs.d.ts +24 -24
  14. package/background/handlers/Tabs.js +1 -1
  15. package/background/handlers/helpers.d.ts +1 -1
  16. package/background/handlers/helpers.js +1 -1
  17. package/background/handlers/index.d.ts +3 -3
  18. package/background/handlers/index.js +1 -1
  19. package/background/handlers/subscriptions.d.ts +5 -4
  20. package/background/handlers/subscriptions.js +4 -1
  21. package/background/types.d.ts +345 -345
  22. package/bundle.d.ts +1 -1
  23. package/bundle.js +1 -1
  24. package/cjs/background/KoniTypes.js +2 -1
  25. package/cjs/background/RequestBytesSign.js +1 -1
  26. package/cjs/background/RequestExtrinsicSign.js +1 -1
  27. package/cjs/background/handlers/Extension.js +1 -1
  28. package/cjs/background/handlers/State.js +1 -1
  29. package/cjs/background/handlers/Tabs.js +1 -1
  30. package/cjs/background/handlers/helpers.js +1 -1
  31. package/cjs/background/handlers/index.js +1 -1
  32. package/cjs/background/handlers/subscriptions.js +6 -1
  33. package/cjs/defaults.js +1 -1
  34. package/cjs/packageInfo.js +1 -1
  35. package/cjs/page/Accounts.js +1 -1
  36. package/cjs/page/Injected.js +1 -1
  37. package/cjs/page/Metadata.js +1 -1
  38. package/cjs/page/PostMessageProvider.js +28 -28
  39. package/cjs/page/Signer.js +1 -1
  40. package/cjs/page/index.js +1 -1
  41. package/cjs/stores/Accounts.js +1 -1
  42. package/cjs/stores/Base.js +1 -1
  43. package/cjs/stores/Metadata.js +1 -1
  44. package/cjs/utils/canDerive.js +1 -1
  45. package/cjs/utils/getId.js +1 -1
  46. package/defaults.d.ts +10 -10
  47. package/defaults.js +1 -1
  48. package/detectOther.d.ts +7 -7
  49. package/detectPackage.d.ts +1 -1
  50. package/index.d.ts +1 -1
  51. package/index.js +1 -1
  52. package/package.json +4 -4
  53. package/packageInfo.d.ts +6 -6
  54. package/packageInfo.js +1 -1
  55. package/page/Accounts.d.ts +7 -7
  56. package/page/Accounts.js +1 -1
  57. package/page/Injected.d.ts +13 -13
  58. package/page/Injected.js +1 -1
  59. package/page/Metadata.d.ts +7 -7
  60. package/page/Metadata.js +1 -1
  61. package/page/PostMessageProvider.d.ts +62 -62
  62. package/page/PostMessageProvider.js +28 -28
  63. package/page/Signer.d.ts +8 -8
  64. package/page/Signer.js +1 -1
  65. package/page/index.d.ts +16 -16
  66. package/page/index.js +1 -1
  67. package/page/types.d.ts +6 -6
  68. package/stores/Accounts.d.ts +6 -6
  69. package/stores/Accounts.js +1 -1
  70. package/stores/Base.d.ts +10 -10
  71. package/stores/Base.js +1 -1
  72. package/stores/Metadata.d.ts +5 -5
  73. package/stores/Metadata.js +1 -1
  74. package/stores/index.d.ts +2 -2
  75. package/stores/index.js +1 -1
  76. package/types.d.ts +9 -9
  77. package/utils/canDerive.d.ts +2 -2
  78. package/utils/canDerive.js +1 -1
  79. package/utils/getId.d.ts +1 -1
  80. package/utils/getId.js +1 -1
  81. package/utils/index.d.ts +1 -1
  82. package/utils/index.js +1 -1
@@ -1,62 +1,62 @@
1
- import type { InjectedProvider, ProviderList, ProviderMeta } from '@subwallet/extension-inject/types';
2
- import type { ProviderInterfaceEmitCb, ProviderInterfaceEmitted } from '@polkadot/rpc-provider/types';
3
- import type { AnyFunction } from '@polkadot/types/types';
4
- import type { SendRequest } from './types';
5
- declare type CallbackHandler = (error?: null | Error, value?: unknown) => void;
6
- interface SubscriptionHandler {
7
- callback: CallbackHandler;
8
- type: string;
9
- }
10
- /**
11
- * @name PostMessageProvider
12
- *
13
- * @description Extension provider to be used by dapps
14
- */
15
- export default class PostMessageProvider implements InjectedProvider {
16
- #private;
17
- /**
18
- * @param {function} sendRequest The function to be called to send requests to the node
19
- * @param {function} subscriptionNotificationHandler Channel for receiving subscription messages
20
- */
21
- constructor(_sendRequest: SendRequest);
22
- /**
23
- * @description Returns a clone of the object
24
- */
25
- clone(): PostMessageProvider;
26
- /**
27
- * @description Manually disconnect from the connection, clearing autoconnect logic
28
- */
29
- connect(): Promise<void>;
30
- /**
31
- * @description Manually disconnect from the connection, clearing autoconnect logic
32
- */
33
- disconnect(): Promise<void>;
34
- /**
35
- * @summary `true` when this provider supports subscriptions
36
- */
37
- get hasSubscriptions(): boolean;
38
- /**
39
- * @summary Whether the node is connected or not.
40
- * @return {boolean} true if connected
41
- */
42
- get isConnected(): boolean;
43
- listProviders(): Promise<ProviderList>;
44
- /**
45
- * @summary Listens on events after having subscribed using the [[subscribe]] function.
46
- * @param {ProviderInterfaceEmitted} type Event
47
- * @param {ProviderInterfaceEmitCb} sub Callback
48
- * @return unsubscribe function
49
- */
50
- on(type: ProviderInterfaceEmitted, sub: ProviderInterfaceEmitCb): () => void;
51
- send(method: string, params: unknown[], _?: boolean, subscription?: SubscriptionHandler): Promise<any>;
52
- /**
53
- * @summary Spawn a provider on the extension background.
54
- */
55
- startProvider(key: string): Promise<ProviderMeta>;
56
- subscribe(type: string, method: string, params: unknown[], callback: AnyFunction): Promise<number>;
57
- /**
58
- * @summary Allows unsubscribing to subscriptions made with [[subscribe]].
59
- */
60
- unsubscribe(type: string, method: string, id: number): Promise<boolean>;
61
- }
62
- export {};
1
+ import type { InjectedProvider, ProviderList, ProviderMeta } from '@subwallet/extension-inject/types';
2
+ import type { ProviderInterfaceEmitCb, ProviderInterfaceEmitted } from '@polkadot/rpc-provider/types';
3
+ import type { AnyFunction } from '@polkadot/types/types';
4
+ import type { SendRequest } from './types';
5
+ declare type CallbackHandler = (error?: null | Error, value?: unknown) => void;
6
+ interface SubscriptionHandler {
7
+ callback: CallbackHandler;
8
+ type: string;
9
+ }
10
+ /**
11
+ * @name PostMessageProvider
12
+ *
13
+ * @description Extension provider to be used by dapps
14
+ */
15
+ export default class PostMessageProvider implements InjectedProvider {
16
+ #private;
17
+ /**
18
+ * @param {function} sendRequest The function to be called to send requests to the node
19
+ * @param {function} subscriptionNotificationHandler Channel for receiving subscription messages
20
+ */
21
+ constructor(_sendRequest: SendRequest);
22
+ /**
23
+ * @description Returns a clone of the object
24
+ */
25
+ clone(): PostMessageProvider;
26
+ /**
27
+ * @description Manually disconnect from the connection, clearing autoconnect logic
28
+ */
29
+ connect(): Promise<void>;
30
+ /**
31
+ * @description Manually disconnect from the connection, clearing autoconnect logic
32
+ */
33
+ disconnect(): Promise<void>;
34
+ /**
35
+ * @summary `true` when this provider supports subscriptions
36
+ */
37
+ get hasSubscriptions(): boolean;
38
+ /**
39
+ * @summary Whether the node is connected or not.
40
+ * @return {boolean} true if connected
41
+ */
42
+ get isConnected(): boolean;
43
+ listProviders(): Promise<ProviderList>;
44
+ /**
45
+ * @summary Listens on events after having subscribed using the [[subscribe]] function.
46
+ * @param {ProviderInterfaceEmitted} type Event
47
+ * @param {ProviderInterfaceEmitCb} sub Callback
48
+ * @return unsubscribe function
49
+ */
50
+ on(type: ProviderInterfaceEmitted, sub: ProviderInterfaceEmitCb): () => void;
51
+ send(method: string, params: unknown[], _?: boolean, subscription?: SubscriptionHandler): Promise<any>;
52
+ /**
53
+ * @summary Spawn a provider on the extension background.
54
+ */
55
+ startProvider(key: string): Promise<ProviderMeta>;
56
+ subscribe(type: string, method: string, params: unknown[], callback: AnyFunction): Promise<number>;
57
+ /**
58
+ * @summary Allows unsubscribing to subscriptions made with [[subscribe]].
59
+ */
60
+ unsubscribe(type: string, method: string, id: number): Promise<boolean>;
61
+ }
62
+ export {};
@@ -1,14 +1,14 @@
1
- // Copyright 2019-2022 @subwallet/extension-base authors & contributors
1
+ // Copyright 2019-2022 @polkadot/extension-base authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  import EventEmitter from 'eventemitter3';
4
4
  import { isUndefined, logger } from '@polkadot/util';
5
5
  const l = logger('PostMessageProvider');
6
6
  // External to class, this.# is not private enough (yet)
7
7
  let sendRequest;
8
- /**
9
- * @name PostMessageProvider
10
- *
11
- * @description Extension provider to be used by dapps
8
+ /**
9
+ * @name PostMessageProvider
10
+ *
11
+ * @description Extension provider to be used by dapps
12
12
  */
13
13
 
14
14
  export default class PostMessageProvider {
@@ -20,25 +20,25 @@ export default class PostMessageProvider {
20
20
 
21
21
  #subscriptions = {}; // {[(type,subscriptionId)]: callback}
22
22
 
23
- /**
24
- * @param {function} sendRequest The function to be called to send requests to the node
25
- * @param {function} subscriptionNotificationHandler Channel for receiving subscription messages
23
+ /**
24
+ * @param {function} sendRequest The function to be called to send requests to the node
25
+ * @param {function} subscriptionNotificationHandler Channel for receiving subscription messages
26
26
  */
27
27
 
28
28
  constructor(_sendRequest) {
29
29
  this.#eventemitter = new EventEmitter();
30
30
  sendRequest = _sendRequest;
31
31
  }
32
- /**
33
- * @description Returns a clone of the object
32
+ /**
33
+ * @description Returns a clone of the object
34
34
  */
35
35
 
36
36
 
37
37
  clone() {
38
38
  return new PostMessageProvider(sendRequest);
39
39
  }
40
- /**
41
- * @description Manually disconnect from the connection, clearing autoconnect logic
40
+ /**
41
+ * @description Manually disconnect from the connection, clearing autoconnect logic
42
42
  */
43
43
  // eslint-disable-next-line @typescript-eslint/require-await
44
44
 
@@ -47,8 +47,8 @@ export default class PostMessageProvider {
47
47
  // FIXME This should see if the extension's state's provider can disconnect
48
48
  console.error('PostMessageProvider.disconnect() is not implemented.');
49
49
  }
50
- /**
51
- * @description Manually disconnect from the connection, clearing autoconnect logic
50
+ /**
51
+ * @description Manually disconnect from the connection, clearing autoconnect logic
52
52
  */
53
53
  // eslint-disable-next-line @typescript-eslint/require-await
54
54
 
@@ -57,8 +57,8 @@ export default class PostMessageProvider {
57
57
  // FIXME This should see if the extension's state's provider can disconnect
58
58
  console.error('PostMessageProvider.disconnect() is not implemented.');
59
59
  }
60
- /**
61
- * @summary `true` when this provider supports subscriptions
60
+ /**
61
+ * @summary `true` when this provider supports subscriptions
62
62
  */
63
63
 
64
64
 
@@ -66,9 +66,9 @@ export default class PostMessageProvider {
66
66
  // FIXME This should see if the extension's state's provider has subscriptions
67
67
  return true;
68
68
  }
69
- /**
70
- * @summary Whether the node is connected or not.
71
- * @return {boolean} true if connected
69
+ /**
70
+ * @summary Whether the node is connected or not.
71
+ * @return {boolean} true if connected
72
72
  */
73
73
 
74
74
 
@@ -79,11 +79,11 @@ export default class PostMessageProvider {
79
79
  listProviders() {
80
80
  return sendRequest('pub(rpc.listProviders)', undefined);
81
81
  }
82
- /**
83
- * @summary Listens on events after having subscribed using the [[subscribe]] function.
84
- * @param {ProviderInterfaceEmitted} type Event
85
- * @param {ProviderInterfaceEmitCb} sub Callback
86
- * @return unsubscribe function
82
+ /**
83
+ * @summary Listens on events after having subscribed using the [[subscribe]] function.
84
+ * @param {ProviderInterfaceEmitted} type Event
85
+ * @param {ProviderInterfaceEmitCb} sub Callback
86
+ * @return unsubscribe function
87
87
  */
88
88
 
89
89
 
@@ -117,8 +117,8 @@ export default class PostMessageProvider {
117
117
  params
118
118
  });
119
119
  }
120
- /**
121
- * @summary Spawn a provider on the extension background.
120
+ /**
121
+ * @summary Spawn a provider on the extension background.
122
122
  */
123
123
 
124
124
 
@@ -148,8 +148,8 @@ export default class PostMessageProvider {
148
148
  type
149
149
  });
150
150
  }
151
- /**
152
- * @summary Allows unsubscribing to subscriptions made with [[subscribe]].
151
+ /**
152
+ * @summary Allows unsubscribing to subscriptions made with [[subscribe]].
153
153
  */
154
154
 
155
155
 
package/page/Signer.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- import type { Signer as SignerInterface, SignerResult } from '@polkadot/api/types';
2
- import type { SignerPayloadJSON, SignerPayloadRaw } from '@polkadot/types/types';
3
- import type { SendRequest } from './types';
4
- export default class Signer implements SignerInterface {
5
- constructor(_sendRequest: SendRequest);
6
- signPayload(payload: SignerPayloadJSON): Promise<SignerResult>;
7
- signRaw(payload: SignerPayloadRaw): Promise<SignerResult>;
8
- }
1
+ import type { Signer as SignerInterface, SignerResult } from '@polkadot/api/types';
2
+ import type { SignerPayloadJSON, SignerPayloadRaw } from '@polkadot/types/types';
3
+ import type { SendRequest } from './types';
4
+ export default class Signer implements SignerInterface {
5
+ constructor(_sendRequest: SendRequest);
6
+ signPayload(payload: SignerPayloadJSON): Promise<SignerResult>;
7
+ signRaw(payload: SignerPayloadRaw): Promise<SignerResult>;
8
+ }
package/page/Signer.js CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright 2019-2022 @subwallet/extension-base authors & contributors
1
+ // Copyright 2019-2022 @polkadot/extension-base authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  // External to class, this.# is not private enough (yet)
4
4
  let sendRequest;
package/page/index.d.ts CHANGED
@@ -1,16 +1,16 @@
1
- import type { MessageTypes, MessageTypesWithNoSubscriptions, MessageTypesWithNullRequest, MessageTypesWithSubscriptions, RequestTypes, ResponseTypes, SubscriptionMessageTypes, TransportResponseMessage } from '@subwallet/extension-base/background/types';
2
- import Injected from './Injected';
3
- export interface Handler {
4
- resolve: (data?: any) => void;
5
- reject: (error: Error) => void;
6
- subscriber?: (data: any) => void;
7
- }
8
- export declare type Handlers = Record<string, Handler>;
9
- export declare function sendMessage<TMessageType extends MessageTypesWithNullRequest>(message: TMessageType): Promise<ResponseTypes[TMessageType]>;
10
- export declare function sendMessage<TMessageType extends MessageTypesWithNoSubscriptions>(message: TMessageType, request: RequestTypes[TMessageType]): Promise<ResponseTypes[TMessageType]>;
11
- export declare function sendMessage<TMessageType extends MessageTypesWithSubscriptions>(message: TMessageType, request: RequestTypes[TMessageType], subscriber: (data: SubscriptionMessageTypes[TMessageType]) => void): Promise<ResponseTypes[TMessageType]>;
12
- export declare function enable(origin: string): Promise<Injected>;
13
- export declare function redirectIfPhishing(): Promise<boolean>;
14
- export declare function handleResponse<TMessageType extends MessageTypes>(data: TransportResponseMessage<TMessageType> & {
15
- subscription?: string;
16
- }): void;
1
+ import type { MessageTypes, MessageTypesWithNoSubscriptions, MessageTypesWithNullRequest, MessageTypesWithSubscriptions, RequestTypes, ResponseTypes, SubscriptionMessageTypes, TransportResponseMessage } from '../background/types';
2
+ import Injected from './Injected';
3
+ export interface Handler {
4
+ resolve: (data?: any) => void;
5
+ reject: (error: Error) => void;
6
+ subscriber?: (data: any) => void;
7
+ }
8
+ export declare type Handlers = Record<string, Handler>;
9
+ export declare function sendMessage<TMessageType extends MessageTypesWithNullRequest>(message: TMessageType): Promise<ResponseTypes[TMessageType]>;
10
+ export declare function sendMessage<TMessageType extends MessageTypesWithNoSubscriptions>(message: TMessageType, request: RequestTypes[TMessageType]): Promise<ResponseTypes[TMessageType]>;
11
+ export declare function sendMessage<TMessageType extends MessageTypesWithSubscriptions>(message: TMessageType, request: RequestTypes[TMessageType], subscriber: (data: SubscriptionMessageTypes[TMessageType]) => void): Promise<ResponseTypes[TMessageType]>;
12
+ export declare function enable(origin: string): Promise<Injected>;
13
+ export declare function redirectIfPhishing(): Promise<boolean>;
14
+ export declare function handleResponse<TMessageType extends MessageTypes>(data: TransportResponseMessage<TMessageType> & {
15
+ subscription?: string;
16
+ }): void;
package/page/index.js CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright 2019-2022 @subwallet/extension authors & contributors
1
+ // Copyright 2019-2022 @polkadot/extension authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  import { MESSAGE_ORIGIN_PAGE } from "../defaults.js";
4
4
  import { getId } from "../utils/getId.js";
package/page/types.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import type { MessageTypesWithNoSubscriptions, MessageTypesWithNullRequest, MessageTypesWithSubscriptions, RequestTypes, ResponseTypes, SubscriptionMessageTypes } from '../background/types';
2
- export interface SendRequest {
3
- <TMessageType extends MessageTypesWithNullRequest>(message: TMessageType): Promise<ResponseTypes[TMessageType]>;
4
- <TMessageType extends MessageTypesWithNoSubscriptions>(message: TMessageType, request: RequestTypes[TMessageType]): Promise<ResponseTypes[TMessageType]>;
5
- <TMessageType extends MessageTypesWithSubscriptions>(message: TMessageType, request: RequestTypes[TMessageType], subscriber: (data: SubscriptionMessageTypes[TMessageType]) => void): Promise<ResponseTypes[TMessageType]>;
6
- }
1
+ import type { MessageTypesWithNoSubscriptions, MessageTypesWithNullRequest, MessageTypesWithSubscriptions, RequestTypes, ResponseTypes, SubscriptionMessageTypes } from '../background/types';
2
+ export interface SendRequest {
3
+ <TMessageType extends MessageTypesWithNullRequest>(message: TMessageType): Promise<ResponseTypes[TMessageType]>;
4
+ <TMessageType extends MessageTypesWithNoSubscriptions>(message: TMessageType, request: RequestTypes[TMessageType]): Promise<ResponseTypes[TMessageType]>;
5
+ <TMessageType extends MessageTypesWithSubscriptions>(message: TMessageType, request: RequestTypes[TMessageType], subscriber: (data: SubscriptionMessageTypes[TMessageType]) => void): Promise<ResponseTypes[TMessageType]>;
6
+ }
@@ -1,6 +1,6 @@
1
- import type { KeyringJson, KeyringStore } from '@polkadot/ui-keyring/types';
2
- import BaseStore from './Base';
3
- export default class AccountsStore extends BaseStore<KeyringJson> implements KeyringStore {
4
- constructor();
5
- set(key: string, value: KeyringJson, update?: () => void): void;
6
- }
1
+ import type { KeyringJson, KeyringStore } from '@polkadot/ui-keyring/types';
2
+ import BaseStore from './Base';
3
+ export default class AccountsStore extends BaseStore<KeyringJson> implements KeyringStore {
4
+ constructor();
5
+ set(key: string, value: KeyringJson, update?: () => void): void;
6
+ }
@@ -1,4 +1,4 @@
1
- // Copyright 2019-2022 @subwallet/extension-base authors & contributors
1
+ // Copyright 2019-2022 @polkadot/extension-base authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  import { EXTENSION_PREFIX } from "../defaults.js";
4
4
  import BaseStore from "./Base.js";
package/stores/Base.d.ts CHANGED
@@ -1,10 +1,10 @@
1
- export default abstract class BaseStore<T> {
2
- #private;
3
- constructor(prefix: string | null);
4
- getPrefix(): string;
5
- all(update: (key: string, value: T) => void): void;
6
- allMap(update: (value: Record<string, T>) => void): void;
7
- get(_key: string, update: (value: T) => void): void;
8
- remove(_key: string, update?: () => void): void;
9
- set(_key: string, value: T, update?: () => void): void;
10
- }
1
+ export default abstract class BaseStore<T> {
2
+ #private;
3
+ constructor(prefix: string | null);
4
+ getPrefix(): string;
5
+ all(update: (key: string, value: T) => void): void;
6
+ allMap(update: (value: Record<string, T>) => void): void;
7
+ get(_key: string, update: (value: T) => void): void;
8
+ remove(_key: string, update?: () => void): void;
9
+ set(_key: string, value: T, update?: () => void): void;
10
+ }
package/stores/Base.js CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright 2019-2022 @subwallet/extension-base authors & contributors
1
+ // Copyright 2019-2022 @polkadot/extension-base authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  const lastError = type => {
4
4
  const error = chrome.runtime.lastError;
@@ -1,5 +1,5 @@
1
- import type { MetadataDef } from '@subwallet/extension-inject/types';
2
- import BaseStore from './Base';
3
- export default class MetadataStore extends BaseStore<MetadataDef> {
4
- constructor();
5
- }
1
+ import type { MetadataDef } from '@subwallet/extension-inject/types';
2
+ import BaseStore from './Base';
3
+ export default class MetadataStore extends BaseStore<MetadataDef> {
4
+ constructor();
5
+ }
@@ -1,4 +1,4 @@
1
- // Copyright 2019-2022 @subwallet/extension-base authors & contributors
1
+ // Copyright 2019-2022 @polkadot/extension-base authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  import { EXTENSION_PREFIX } from "../defaults.js";
4
4
  import BaseStore from "./Base.js";
package/stores/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export { default as AccountsStore } from './Accounts';
2
- export { default as MetadataStore } from './Metadata';
1
+ export { default as AccountsStore } from './Accounts';
2
+ export { default as MetadataStore } from './Metadata';
package/stores/index.js CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright 2019-2022 @subwallet/extension-base authors & contributors
1
+ // Copyright 2019-2022 @polkadot/extension-base authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  export { default as AccountsStore } from "./Accounts.js";
4
4
  export { default as MetadataStore } from "./Metadata.js";
package/types.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- export interface Message extends MessageEvent {
2
- data: {
3
- error?: string;
4
- id: string;
5
- origin: string;
6
- response?: string;
7
- subscription?: string;
8
- };
9
- }
1
+ export interface Message extends MessageEvent {
2
+ data: {
3
+ error?: string;
4
+ id: string;
5
+ origin: string;
6
+ response?: string;
7
+ subscription?: string;
8
+ };
9
+ }
@@ -1,2 +1,2 @@
1
- import type { KeypairType } from '@polkadot/util-crypto/types';
2
- export declare function canDerive(type?: KeypairType): boolean;
1
+ import type { KeypairType } from '@polkadot/util-crypto/types';
2
+ export declare function canDerive(type?: KeypairType): boolean;
@@ -1,4 +1,4 @@
1
- // Copyright 2019-2022 @subwallet/extension authors & contributors
1
+ // Copyright 2019-2022 @polkadot/extension authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  export function canDerive(type) {
4
4
  return !!type && ['ed25519', 'sr25519', 'ecdsa', 'ethereum'].includes(type);
package/utils/getId.d.ts CHANGED
@@ -1 +1 @@
1
- export declare function getId(): string;
1
+ export declare function getId(): string;
package/utils/getId.js CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright 2019-2022 @subwallet/extension authors & contributors
1
+ // Copyright 2019-2022 @polkadot/extension authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  import { EXTENSION_PREFIX } from "../defaults.js";
4
4
  let counter = 0;
package/utils/index.d.ts CHANGED
@@ -1 +1 @@
1
- export { canDerive } from './canDerive';
1
+ export { canDerive } from './canDerive';
package/utils/index.js CHANGED
@@ -1,3 +1,3 @@
1
- // Copyright 2019-2022 @subwallet/extension authors & contributors
1
+ // Copyright 2019-2022 @polkadot/extension authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  export { canDerive } from "./canDerive.js";