@xyo-network/witness-evm-abstract 4.1.2 → 4.1.4
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/browser/index.d.ts +4 -58
- package/dist/neutral/index.d.ts +4 -58
- package/dist/node/index.d.ts +4 -58
- package/package.json +11 -11
package/dist/browser/index.d.ts
CHANGED
|
@@ -1,58 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { AbstractWitness } from '@xyo-network/abstract-witness';
|
|
6
|
-
import { AnyConfigSchema } from '@xyo-network/module-model';
|
|
7
|
-
import { WitnessConfig, WitnessParams, WitnessModuleEventData, WitnessInstance, CustomWitnessInstance } from '@xyo-network/witness-model';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Returns the equivalent IPFS gateway URL for the supplied URL.
|
|
11
|
-
* @param urlToCheck The URL to check
|
|
12
|
-
* @returns If the supplied URL is an IPFS URL, it converts the URL to the
|
|
13
|
-
* equivalent IPFS gateway URL. Otherwise, returns the original URL.
|
|
14
|
-
*/
|
|
15
|
-
declare const checkIpfsUrl: (urlToCheck: string, ipfsGateway?: string) => string;
|
|
16
|
-
|
|
17
|
-
type ProviderSource = 'infura' | 'quicknode';
|
|
18
|
-
type ProviderType = 'rpc' | 'wss';
|
|
19
|
-
interface GetProvidersFromEnvOptions {
|
|
20
|
-
providerSource?: ProviderSource;
|
|
21
|
-
providerType?: ProviderType;
|
|
22
|
-
}
|
|
23
|
-
declare const getProviderFromEnv: (chainId?: number, { providerSource, providerType }?: GetProvidersFromEnvOptions) => Provider;
|
|
24
|
-
declare const getSharedProviderFromEnv: (chainId?: number, options?: {
|
|
25
|
-
providerSource?: ProviderSource;
|
|
26
|
-
providerType?: ProviderType;
|
|
27
|
-
}) => Provider;
|
|
28
|
-
declare const getProvidersFromEnv: (count?: number, chainId?: number, options?: GetProvidersFromEnvOptions) => Provider[];
|
|
29
|
-
|
|
30
|
-
declare const EvmAddressSchema: "network.xyo.evm.address";
|
|
31
|
-
type EvmAddressSchema = typeof EvmAddressSchema;
|
|
32
|
-
type EvmAddress = Payload<{
|
|
33
|
-
address?: string;
|
|
34
|
-
blockTag?: string | number;
|
|
35
|
-
chainId?: number;
|
|
36
|
-
}, EvmAddressSchema>;
|
|
37
|
-
|
|
38
|
-
declare const EvmWitnessConfigSchema: "network.xyo.evm.witness";
|
|
39
|
-
type EvmWitnessConfigSchema = typeof EvmWitnessConfigSchema;
|
|
40
|
-
type EvmWitnessConfig<TAdditional extends EmptyObject | Payload | void = void, TSchema extends string | void = void> = WitnessConfig<TAdditional, TSchema extends void ? TAdditional extends Payload ? TAdditional['schema'] : EvmWitnessConfigSchema : TSchema>;
|
|
41
|
-
type AdditionalEvmWitnessParams = {
|
|
42
|
-
providers: Provider[];
|
|
43
|
-
};
|
|
44
|
-
interface EvmWitnessParams<TConfig extends AnyConfigSchema<EvmWitnessConfig> = EvmWitnessConfig> extends WitnessParams<TConfig> {
|
|
45
|
-
providers: () => Promisable<Provider[]>;
|
|
46
|
-
}
|
|
47
|
-
declare abstract class AbstractEvmWitness<TParams extends EvmWitnessParams<AnyConfigSchema<EvmWitnessConfig>> = EvmWitnessParams, TIn extends Payload = Payload, TOut extends Payload = Payload, TEventData extends WitnessModuleEventData<WitnessInstance<TParams, TIn, TOut>, TIn, TOut> = WitnessModuleEventData<WitnessInstance<TParams, TIn, TOut>, TIn, TOut>> extends AbstractWitness<TParams, TIn, TOut, TEventData> implements CustomWitnessInstance<TParams, TIn, TOut, TEventData> {
|
|
48
|
-
static readonly configSchemas: Schema[];
|
|
49
|
-
static readonly defaultConfigSchema: Schema;
|
|
50
|
-
private _providers;
|
|
51
|
-
getProvider(cache?: boolean): Promise<Provider | undefined>;
|
|
52
|
-
getProvider(cache: boolean, error: string | true): Promise<Provider>;
|
|
53
|
-
getProviders(cache?: boolean): Promise<Provider[]>;
|
|
54
|
-
protected abstract observeHandler(payloads?: TIn[]): Promisable<TOut[]>;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export { AbstractEvmWitness, EvmAddressSchema, EvmWitnessConfigSchema, checkIpfsUrl, getProviderFromEnv, getProvidersFromEnv, getSharedProviderFromEnv };
|
|
58
|
-
export type { AdditionalEvmWitnessParams, EvmAddress, EvmWitnessConfig, EvmWitnessParams, GetProvidersFromEnvOptions, ProviderSource, ProviderType };
|
|
1
|
+
export * from './lib/index.ts';
|
|
2
|
+
export * from './model.ts';
|
|
3
|
+
export * from './Witness.ts';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
package/dist/neutral/index.d.ts
CHANGED
|
@@ -1,58 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { AbstractWitness } from '@xyo-network/abstract-witness';
|
|
6
|
-
import { AnyConfigSchema } from '@xyo-network/module-model';
|
|
7
|
-
import { WitnessConfig, WitnessParams, WitnessModuleEventData, WitnessInstance, CustomWitnessInstance } from '@xyo-network/witness-model';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Returns the equivalent IPFS gateway URL for the supplied URL.
|
|
11
|
-
* @param urlToCheck The URL to check
|
|
12
|
-
* @returns If the supplied URL is an IPFS URL, it converts the URL to the
|
|
13
|
-
* equivalent IPFS gateway URL. Otherwise, returns the original URL.
|
|
14
|
-
*/
|
|
15
|
-
declare const checkIpfsUrl: (urlToCheck: string, ipfsGateway?: string) => string;
|
|
16
|
-
|
|
17
|
-
type ProviderSource = 'infura' | 'quicknode';
|
|
18
|
-
type ProviderType = 'rpc' | 'wss';
|
|
19
|
-
interface GetProvidersFromEnvOptions {
|
|
20
|
-
providerSource?: ProviderSource;
|
|
21
|
-
providerType?: ProviderType;
|
|
22
|
-
}
|
|
23
|
-
declare const getProviderFromEnv: (chainId?: number, { providerSource, providerType }?: GetProvidersFromEnvOptions) => Provider;
|
|
24
|
-
declare const getSharedProviderFromEnv: (chainId?: number, options?: {
|
|
25
|
-
providerSource?: ProviderSource;
|
|
26
|
-
providerType?: ProviderType;
|
|
27
|
-
}) => Provider;
|
|
28
|
-
declare const getProvidersFromEnv: (count?: number, chainId?: number, options?: GetProvidersFromEnvOptions) => Provider[];
|
|
29
|
-
|
|
30
|
-
declare const EvmAddressSchema: "network.xyo.evm.address";
|
|
31
|
-
type EvmAddressSchema = typeof EvmAddressSchema;
|
|
32
|
-
type EvmAddress = Payload<{
|
|
33
|
-
address?: string;
|
|
34
|
-
blockTag?: string | number;
|
|
35
|
-
chainId?: number;
|
|
36
|
-
}, EvmAddressSchema>;
|
|
37
|
-
|
|
38
|
-
declare const EvmWitnessConfigSchema: "network.xyo.evm.witness";
|
|
39
|
-
type EvmWitnessConfigSchema = typeof EvmWitnessConfigSchema;
|
|
40
|
-
type EvmWitnessConfig<TAdditional extends EmptyObject | Payload | void = void, TSchema extends string | void = void> = WitnessConfig<TAdditional, TSchema extends void ? TAdditional extends Payload ? TAdditional['schema'] : EvmWitnessConfigSchema : TSchema>;
|
|
41
|
-
type AdditionalEvmWitnessParams = {
|
|
42
|
-
providers: Provider[];
|
|
43
|
-
};
|
|
44
|
-
interface EvmWitnessParams<TConfig extends AnyConfigSchema<EvmWitnessConfig> = EvmWitnessConfig> extends WitnessParams<TConfig> {
|
|
45
|
-
providers: () => Promisable<Provider[]>;
|
|
46
|
-
}
|
|
47
|
-
declare abstract class AbstractEvmWitness<TParams extends EvmWitnessParams<AnyConfigSchema<EvmWitnessConfig>> = EvmWitnessParams, TIn extends Payload = Payload, TOut extends Payload = Payload, TEventData extends WitnessModuleEventData<WitnessInstance<TParams, TIn, TOut>, TIn, TOut> = WitnessModuleEventData<WitnessInstance<TParams, TIn, TOut>, TIn, TOut>> extends AbstractWitness<TParams, TIn, TOut, TEventData> implements CustomWitnessInstance<TParams, TIn, TOut, TEventData> {
|
|
48
|
-
static readonly configSchemas: Schema[];
|
|
49
|
-
static readonly defaultConfigSchema: Schema;
|
|
50
|
-
private _providers;
|
|
51
|
-
getProvider(cache?: boolean): Promise<Provider | undefined>;
|
|
52
|
-
getProvider(cache: boolean, error: string | true): Promise<Provider>;
|
|
53
|
-
getProviders(cache?: boolean): Promise<Provider[]>;
|
|
54
|
-
protected abstract observeHandler(payloads?: TIn[]): Promisable<TOut[]>;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export { AbstractEvmWitness, EvmAddressSchema, EvmWitnessConfigSchema, checkIpfsUrl, getProviderFromEnv, getProvidersFromEnv, getSharedProviderFromEnv };
|
|
58
|
-
export type { AdditionalEvmWitnessParams, EvmAddress, EvmWitnessConfig, EvmWitnessParams, GetProvidersFromEnvOptions, ProviderSource, ProviderType };
|
|
1
|
+
export * from './lib/index.ts';
|
|
2
|
+
export * from './model.ts';
|
|
3
|
+
export * from './Witness.ts';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
package/dist/node/index.d.ts
CHANGED
|
@@ -1,58 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { AbstractWitness } from '@xyo-network/abstract-witness';
|
|
6
|
-
import { AnyConfigSchema } from '@xyo-network/module-model';
|
|
7
|
-
import { WitnessConfig, WitnessParams, WitnessModuleEventData, WitnessInstance, CustomWitnessInstance } from '@xyo-network/witness-model';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Returns the equivalent IPFS gateway URL for the supplied URL.
|
|
11
|
-
* @param urlToCheck The URL to check
|
|
12
|
-
* @returns If the supplied URL is an IPFS URL, it converts the URL to the
|
|
13
|
-
* equivalent IPFS gateway URL. Otherwise, returns the original URL.
|
|
14
|
-
*/
|
|
15
|
-
declare const checkIpfsUrl: (urlToCheck: string, ipfsGateway?: string) => string;
|
|
16
|
-
|
|
17
|
-
type ProviderSource = 'infura' | 'quicknode';
|
|
18
|
-
type ProviderType = 'rpc' | 'wss';
|
|
19
|
-
interface GetProvidersFromEnvOptions {
|
|
20
|
-
providerSource?: ProviderSource;
|
|
21
|
-
providerType?: ProviderType;
|
|
22
|
-
}
|
|
23
|
-
declare const getProviderFromEnv: (chainId?: number, { providerSource, providerType }?: GetProvidersFromEnvOptions) => Provider;
|
|
24
|
-
declare const getSharedProviderFromEnv: (chainId?: number, options?: {
|
|
25
|
-
providerSource?: ProviderSource;
|
|
26
|
-
providerType?: ProviderType;
|
|
27
|
-
}) => Provider;
|
|
28
|
-
declare const getProvidersFromEnv: (count?: number, chainId?: number, options?: GetProvidersFromEnvOptions) => Provider[];
|
|
29
|
-
|
|
30
|
-
declare const EvmAddressSchema: "network.xyo.evm.address";
|
|
31
|
-
type EvmAddressSchema = typeof EvmAddressSchema;
|
|
32
|
-
type EvmAddress = Payload<{
|
|
33
|
-
address?: string;
|
|
34
|
-
blockTag?: string | number;
|
|
35
|
-
chainId?: number;
|
|
36
|
-
}, EvmAddressSchema>;
|
|
37
|
-
|
|
38
|
-
declare const EvmWitnessConfigSchema: "network.xyo.evm.witness";
|
|
39
|
-
type EvmWitnessConfigSchema = typeof EvmWitnessConfigSchema;
|
|
40
|
-
type EvmWitnessConfig<TAdditional extends EmptyObject | Payload | void = void, TSchema extends string | void = void> = WitnessConfig<TAdditional, TSchema extends void ? TAdditional extends Payload ? TAdditional['schema'] : EvmWitnessConfigSchema : TSchema>;
|
|
41
|
-
type AdditionalEvmWitnessParams = {
|
|
42
|
-
providers: Provider[];
|
|
43
|
-
};
|
|
44
|
-
interface EvmWitnessParams<TConfig extends AnyConfigSchema<EvmWitnessConfig> = EvmWitnessConfig> extends WitnessParams<TConfig> {
|
|
45
|
-
providers: () => Promisable<Provider[]>;
|
|
46
|
-
}
|
|
47
|
-
declare abstract class AbstractEvmWitness<TParams extends EvmWitnessParams<AnyConfigSchema<EvmWitnessConfig>> = EvmWitnessParams, TIn extends Payload = Payload, TOut extends Payload = Payload, TEventData extends WitnessModuleEventData<WitnessInstance<TParams, TIn, TOut>, TIn, TOut> = WitnessModuleEventData<WitnessInstance<TParams, TIn, TOut>, TIn, TOut>> extends AbstractWitness<TParams, TIn, TOut, TEventData> implements CustomWitnessInstance<TParams, TIn, TOut, TEventData> {
|
|
48
|
-
static readonly configSchemas: Schema[];
|
|
49
|
-
static readonly defaultConfigSchema: Schema;
|
|
50
|
-
private _providers;
|
|
51
|
-
getProvider(cache?: boolean): Promise<Provider | undefined>;
|
|
52
|
-
getProvider(cache: boolean, error: string | true): Promise<Provider>;
|
|
53
|
-
getProviders(cache?: boolean): Promise<Provider[]>;
|
|
54
|
-
protected abstract observeHandler(payloads?: TIn[]): Promisable<TOut[]>;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export { AbstractEvmWitness, EvmAddressSchema, EvmWitnessConfigSchema, checkIpfsUrl, getProviderFromEnv, getProvidersFromEnv, getSharedProviderFromEnv };
|
|
58
|
-
export type { AdditionalEvmWitnessParams, EvmAddress, EvmWitnessConfig, EvmWitnessParams, GetProvidersFromEnvOptions, ProviderSource, ProviderType };
|
|
1
|
+
export * from './lib/index.ts';
|
|
2
|
+
export * from './model.ts';
|
|
3
|
+
export * from './Witness.ts';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/witness-evm-abstract",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.4",
|
|
4
4
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
5
5
|
"homepage": "https://xyo.network",
|
|
6
6
|
"bugs": {
|
|
@@ -29,19 +29,19 @@
|
|
|
29
29
|
"module": "dist/neutral/index.mjs",
|
|
30
30
|
"types": "dist/neutral/index.d.ts",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@xylabs/assert": "^4.13.
|
|
33
|
-
"@xylabs/object": "^4.13.
|
|
34
|
-
"@xylabs/promise": "^4.13.
|
|
35
|
-
"@xylabs/typeof": "^4.13.
|
|
36
|
-
"@xyo-network/abstract-witness": "^4.1.
|
|
37
|
-
"@xyo-network/module-model": "^4.1.
|
|
38
|
-
"@xyo-network/payload-model": "^4.1.
|
|
39
|
-
"@xyo-network/witness-model": "^4.1.
|
|
32
|
+
"@xylabs/assert": "^4.13.16",
|
|
33
|
+
"@xylabs/object": "^4.13.16",
|
|
34
|
+
"@xylabs/promise": "^4.13.16",
|
|
35
|
+
"@xylabs/typeof": "^4.13.16",
|
|
36
|
+
"@xyo-network/abstract-witness": "^4.1.4",
|
|
37
|
+
"@xyo-network/module-model": "^4.1.4",
|
|
38
|
+
"@xyo-network/payload-model": "^4.1.4",
|
|
39
|
+
"@xyo-network/witness-model": "^4.1.4",
|
|
40
40
|
"ethers": "^6.15.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@xylabs/ts-scripts-yarn3": "^7.0.0-rc.
|
|
44
|
-
"@xylabs/tsconfig": "^7.0.0-rc.
|
|
43
|
+
"@xylabs/ts-scripts-yarn3": "^7.0.0-rc.27",
|
|
44
|
+
"@xylabs/tsconfig": "^7.0.0-rc.27",
|
|
45
45
|
"typescript": "^5.8.3"
|
|
46
46
|
},
|
|
47
47
|
"publishConfig": {
|