@pezkuwi/extension-inject 0.62.14 → 0.62.18

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 (47) hide show
  1. package/package.json +14 -145
  2. package/src/bundle.ts +47 -0
  3. package/{chrome.js → src/chrome.ts} +4 -0
  4. package/src/crossenv.ts +6 -0
  5. package/src/cyrb53.spec.ts +30 -0
  6. package/src/cyrb53.ts +33 -0
  7. package/src/index.ts +7 -0
  8. package/src/packageDetect.ts +11 -0
  9. package/src/packageInfo.ts +6 -0
  10. package/src/types.ts +122 -0
  11. package/tsconfig.build.json +12 -0
  12. package/tsconfig.build.tsbuildinfo +1 -0
  13. package/tsconfig.spec.json +16 -0
  14. package/tsconfig.spec.tsbuildinfo +1 -0
  15. package/LICENSE +0 -201
  16. package/bundle.js +0 -25
  17. package/cjs/bundle.d.ts +0 -3
  18. package/cjs/bundle.js +0 -30
  19. package/cjs/chrome.d.ts +0 -1
  20. package/cjs/chrome.js +0 -5
  21. package/cjs/crossenv.js +0 -4
  22. package/cjs/cyrb53.js +0 -16
  23. package/cjs/index.js +0 -4
  24. package/cjs/package.json +0 -3
  25. package/cjs/packageDetect.js +0 -5
  26. package/cjs/packageInfo.js +0 -4
  27. package/cjs/types.js +0 -2
  28. package/crossenv.d.ts +0 -1
  29. package/crossenv.js +0 -2
  30. package/cyrb53.d.ts +0 -1
  31. package/cyrb53.js +0 -13
  32. package/index.d.ts +0 -1
  33. package/index.js +0 -1
  34. package/packageDetect.d.ts +0 -1
  35. package/packageDetect.js +0 -3
  36. package/packageInfo.d.ts +0 -6
  37. package/packageInfo.js +0 -1
  38. package/types.d.ts +0 -93
  39. package/types.js +0 -1
  40. /package/{bundle.d.ts → build/bundle.d.ts} +0 -0
  41. /package/{chrome.d.ts → build/chrome.d.ts} +0 -0
  42. /package/{cjs → build}/crossenv.d.ts +0 -0
  43. /package/{cjs → build}/cyrb53.d.ts +0 -0
  44. /package/{cjs → build}/index.d.ts +0 -0
  45. /package/{cjs → build}/packageDetect.d.ts +0 -0
  46. /package/{cjs → build}/packageInfo.d.ts +0 -0
  47. /package/{cjs → build}/types.d.ts +0 -0
package/types.d.ts DELETED
@@ -1,93 +0,0 @@
1
- import type { Signer as InjectedSigner } from '@pezkuwi/api/types';
2
- import type { ProviderInterface } from '@pezkuwi/rpc-provider/types';
3
- import type { ExtDef } from '@pezkuwi/types/extrinsic/signedExtensions/types';
4
- import type { HexString } from '@pezkuwi/util/types';
5
- import type { KeypairType } from '@pezkuwi/util-crypto/types';
6
- type This = typeof globalThis;
7
- export type Unsubcall = () => void;
8
- export interface InjectedAccount {
9
- address: string;
10
- genesisHash?: string | null;
11
- name?: string;
12
- type?: KeypairType;
13
- }
14
- export interface InjectedAccountWithMeta {
15
- address: string;
16
- meta: {
17
- genesisHash?: string | null;
18
- name?: string;
19
- source: string;
20
- };
21
- type?: KeypairType;
22
- }
23
- export interface InjectedAccounts {
24
- get: (anyType?: boolean) => Promise<InjectedAccount[]>;
25
- subscribe: (cb: (accounts: InjectedAccount[]) => void | Promise<void>) => Unsubcall;
26
- }
27
- export interface InjectedExtensionInfo {
28
- name: string;
29
- version: string;
30
- }
31
- export interface ProviderMeta {
32
- network: string;
33
- node: 'full' | 'light';
34
- source: string;
35
- transport: string;
36
- }
37
- export interface MetadataDefBase {
38
- chain: string;
39
- genesisHash: HexString;
40
- icon: string;
41
- ss58Format: number;
42
- chainType?: 'bizinikiwi' | 'ethereum';
43
- }
44
- export interface MetadataDef extends MetadataDefBase {
45
- color?: string;
46
- specVersion: number;
47
- tokenDecimals: number;
48
- tokenSymbol: string;
49
- types: Record<string, Record<string, string> | string>;
50
- metaCalls?: string;
51
- rawMetadata?: HexString;
52
- userExtensions?: ExtDef;
53
- }
54
- export interface InjectedMetadataKnown {
55
- genesisHash: string;
56
- specVersion: number;
57
- }
58
- export interface InjectedMetadata {
59
- get: () => Promise<InjectedMetadataKnown[]>;
60
- provide: (definition: MetadataDef) => Promise<boolean>;
61
- }
62
- export type ProviderList = Record<string, ProviderMeta>;
63
- export interface InjectedProvider extends ProviderInterface {
64
- listProviders: () => Promise<ProviderList>;
65
- startProvider: (key: string) => Promise<ProviderMeta>;
66
- }
67
- export interface InjectedProviderWithMeta {
68
- provider: InjectedProvider;
69
- meta: ProviderMeta;
70
- }
71
- export interface Injected {
72
- accounts: InjectedAccounts;
73
- metadata?: InjectedMetadata;
74
- provider?: InjectedProvider;
75
- signer: InjectedSigner;
76
- }
77
- export interface InjectedWindowProvider {
78
- connect?: (origin: string) => Promise<InjectedExtension>;
79
- enable?: (origin: string) => Promise<Injected>;
80
- version?: string;
81
- }
82
- export interface InjectedWindow extends This {
83
- injectedWeb3: Record<string, InjectedWindowProvider>;
84
- }
85
- export type InjectedExtension = InjectedExtensionInfo & Injected;
86
- export type InjectOptions = InjectedExtensionInfo;
87
- export interface Web3AccountsOptions {
88
- accountType?: KeypairType[];
89
- extensions?: string[];
90
- genesisHash?: string | null;
91
- ss58Format?: number;
92
- }
93
- export {};
package/types.js DELETED
@@ -1 +0,0 @@
1
- export {};
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes