@xyo-network/witness-blockchain-abstract 4.0.3 → 4.1.1

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.
@@ -0,0 +1,25 @@
1
+ import { Provider } from 'ethers';
2
+
3
+ /**
4
+ * Returns the equivalent IPFS gateway URL for the supplied URL.
5
+ * @param urlToCheck The URL to check
6
+ * @returns If the supplied URL is an IPFS URL, it converts the URL to the
7
+ * equivalent IPFS gateway URL. Otherwise, returns the original URL.
8
+ */
9
+ declare const checkIpfsUrl: (urlToCheck: string, ipfsGateway?: string) => string;
10
+
11
+ type ProviderSource = 'infura' | 'quicknode';
12
+ type ProviderType = 'rpc' | 'wss';
13
+ interface GetProvidersFromEnvOptions {
14
+ providerSource?: ProviderSource;
15
+ providerType?: ProviderType;
16
+ }
17
+ declare const getProviderFromEnv: (chainId?: number, { providerSource, providerType }?: GetProvidersFromEnvOptions) => Provider;
18
+ declare const getSharedProviderFromEnv: (chainId?: number, options?: {
19
+ providerSource?: ProviderSource;
20
+ providerType?: ProviderType;
21
+ }) => Provider;
22
+ declare const getProvidersFromEnv: (count?: number, chainId?: number, options?: GetProvidersFromEnvOptions) => Provider[];
23
+
24
+ export { checkIpfsUrl, getProviderFromEnv, getProvidersFromEnv, getSharedProviderFromEnv };
25
+ export type { GetProvidersFromEnvOptions, ProviderSource, ProviderType };
@@ -0,0 +1,25 @@
1
+ import { Provider } from 'ethers';
2
+
3
+ /**
4
+ * Returns the equivalent IPFS gateway URL for the supplied URL.
5
+ * @param urlToCheck The URL to check
6
+ * @returns If the supplied URL is an IPFS URL, it converts the URL to the
7
+ * equivalent IPFS gateway URL. Otherwise, returns the original URL.
8
+ */
9
+ declare const checkIpfsUrl: (urlToCheck: string, ipfsGateway?: string) => string;
10
+
11
+ type ProviderSource = 'infura' | 'quicknode';
12
+ type ProviderType = 'rpc' | 'wss';
13
+ interface GetProvidersFromEnvOptions {
14
+ providerSource?: ProviderSource;
15
+ providerType?: ProviderType;
16
+ }
17
+ declare const getProviderFromEnv: (chainId?: number, { providerSource, providerType }?: GetProvidersFromEnvOptions) => Provider;
18
+ declare const getSharedProviderFromEnv: (chainId?: number, options?: {
19
+ providerSource?: ProviderSource;
20
+ providerType?: ProviderType;
21
+ }) => Provider;
22
+ declare const getProvidersFromEnv: (count?: number, chainId?: number, options?: GetProvidersFromEnvOptions) => Provider[];
23
+
24
+ export { checkIpfsUrl, getProviderFromEnv, getProvidersFromEnv, getSharedProviderFromEnv };
25
+ export type { GetProvidersFromEnvOptions, ProviderSource, ProviderType };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Returns the equivalent IPFS gateway URL for the supplied URL.
3
+ * @param urlToCheck The URL to check
4
+ * @returns If the supplied URL is an IPFS URL, it converts the URL to the
5
+ * equivalent IPFS gateway URL. Otherwise, returns the original URL.
6
+ */
7
+ export declare const checkIpfsUrl: (urlToCheck: string, ipfsGateway?: string) => string;
8
+ //# sourceMappingURL=checkIpfsUrl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkIpfsUrl.d.ts","sourceRoot":"","sources":["../../../src/lib/checkIpfsUrl.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,eAAO,MAAM,YAAY,GAAI,YAAY,MAAM,EAAE,cAAc,MAAM,KAAG,MAgCvE,CAAA"}
@@ -0,0 +1,14 @@
1
+ import type { Provider } from 'ethers';
2
+ export type ProviderSource = 'infura' | 'quicknode';
3
+ export type ProviderType = 'rpc' | 'wss';
4
+ export interface GetProvidersFromEnvOptions {
5
+ providerSource?: ProviderSource;
6
+ providerType?: ProviderType;
7
+ }
8
+ export declare const getProviderFromEnv: (chainId?: number, { providerSource, providerType }?: GetProvidersFromEnvOptions) => Provider;
9
+ export declare const getSharedProviderFromEnv: (chainId?: number, options?: {
10
+ providerSource?: ProviderSource;
11
+ providerType?: ProviderType;
12
+ }) => Provider;
13
+ export declare const getProvidersFromEnv: (count?: number, chainId?: number, options?: GetProvidersFromEnvOptions) => Provider[];
14
+ //# sourceMappingURL=getProviderFromEnv.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getProviderFromEnv.d.ts","sourceRoot":"","sources":["../../../src/lib/getProviderFromEnv.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAA;AAMtC,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,WAAW,CAAA;AACnD,MAAM,MAAM,YAAY,GAAG,KAAK,GAAG,KAAK,CAAA;AAExC,MAAM,WAAW,0BAA0B;IACzC,cAAc,CAAC,EAAE,cAAc,CAAA;IAC/B,YAAY,CAAC,EAAE,YAAY,CAAA;CAC5B;AAoBD,eAAO,MAAM,kBAAkB,GAC7B,UAAS,MAAa,EACtB,mCAAqD,0BAA+B,KACnF,QA2CF,CAAA;AAID,eAAO,MAAM,wBAAwB,GACnC,UAAS,MAAa,EACtB,UAAU;IAAE,cAAc,CAAC,EAAE,cAAc,CAAC;IAAC,YAAY,CAAC,EAAE,YAAY,CAAA;CAAE,KACzE,QAIF,CAAA;AAED,eAAO,MAAM,mBAAmB,GAAI,QAAO,MAAU,EAAE,UAAS,MAAa,EAAE,UAAS,0BAA+B,KAAG,QAAQ,EAMjI,CAAA"}
@@ -0,0 +1,3 @@
1
+ export * from './checkIpfsUrl.ts';
2
+ export * from './getProviderFromEnv.ts';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA;AACjC,cAAc,yBAAyB,CAAA"}
@@ -0,0 +1,25 @@
1
+ import { Provider } from 'ethers';
2
+
3
+ /**
4
+ * Returns the equivalent IPFS gateway URL for the supplied URL.
5
+ * @param urlToCheck The URL to check
6
+ * @returns If the supplied URL is an IPFS URL, it converts the URL to the
7
+ * equivalent IPFS gateway URL. Otherwise, returns the original URL.
8
+ */
9
+ declare const checkIpfsUrl: (urlToCheck: string, ipfsGateway?: string) => string;
10
+
11
+ type ProviderSource = 'infura' | 'quicknode';
12
+ type ProviderType = 'rpc' | 'wss';
13
+ interface GetProvidersFromEnvOptions {
14
+ providerSource?: ProviderSource;
15
+ providerType?: ProviderType;
16
+ }
17
+ declare const getProviderFromEnv: (chainId?: number, { providerSource, providerType }?: GetProvidersFromEnvOptions) => Provider;
18
+ declare const getSharedProviderFromEnv: (chainId?: number, options?: {
19
+ providerSource?: ProviderSource;
20
+ providerType?: ProviderType;
21
+ }) => Provider;
22
+ declare const getProvidersFromEnv: (count?: number, chainId?: number, options?: GetProvidersFromEnvOptions) => Provider[];
23
+
24
+ export { checkIpfsUrl, getProviderFromEnv, getProvidersFromEnv, getSharedProviderFromEnv };
25
+ export type { GetProvidersFromEnvOptions, ProviderSource, ProviderType };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Returns the equivalent IPFS gateway URL for the supplied URL.
3
+ * @param urlToCheck The URL to check
4
+ * @returns If the supplied URL is an IPFS URL, it converts the URL to the
5
+ * equivalent IPFS gateway URL. Otherwise, returns the original URL.
6
+ */
7
+ export declare const checkIpfsUrl: (urlToCheck: string, ipfsGateway?: string) => string;
8
+ //# sourceMappingURL=checkIpfsUrl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkIpfsUrl.d.ts","sourceRoot":"","sources":["../../../src/lib/checkIpfsUrl.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,eAAO,MAAM,YAAY,GAAI,YAAY,MAAM,EAAE,cAAc,MAAM,KAAG,MAgCvE,CAAA"}
@@ -0,0 +1,14 @@
1
+ import type { Provider } from 'ethers';
2
+ export type ProviderSource = 'infura' | 'quicknode';
3
+ export type ProviderType = 'rpc' | 'wss';
4
+ export interface GetProvidersFromEnvOptions {
5
+ providerSource?: ProviderSource;
6
+ providerType?: ProviderType;
7
+ }
8
+ export declare const getProviderFromEnv: (chainId?: number, { providerSource, providerType }?: GetProvidersFromEnvOptions) => Provider;
9
+ export declare const getSharedProviderFromEnv: (chainId?: number, options?: {
10
+ providerSource?: ProviderSource;
11
+ providerType?: ProviderType;
12
+ }) => Provider;
13
+ export declare const getProvidersFromEnv: (count?: number, chainId?: number, options?: GetProvidersFromEnvOptions) => Provider[];
14
+ //# sourceMappingURL=getProviderFromEnv.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getProviderFromEnv.d.ts","sourceRoot":"","sources":["../../../src/lib/getProviderFromEnv.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAA;AAMtC,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,WAAW,CAAA;AACnD,MAAM,MAAM,YAAY,GAAG,KAAK,GAAG,KAAK,CAAA;AAExC,MAAM,WAAW,0BAA0B;IACzC,cAAc,CAAC,EAAE,cAAc,CAAA;IAC/B,YAAY,CAAC,EAAE,YAAY,CAAA;CAC5B;AAoBD,eAAO,MAAM,kBAAkB,GAC7B,UAAS,MAAa,EACtB,mCAAqD,0BAA+B,KACnF,QA2CF,CAAA;AAID,eAAO,MAAM,wBAAwB,GACnC,UAAS,MAAa,EACtB,UAAU;IAAE,cAAc,CAAC,EAAE,cAAc,CAAC;IAAC,YAAY,CAAC,EAAE,YAAY,CAAA;CAAE,KACzE,QAIF,CAAA;AAED,eAAO,MAAM,mBAAmB,GAAI,QAAO,MAAU,EAAE,UAAS,MAAa,EAAE,UAAS,0BAA+B,KAAG,QAAQ,EAMjI,CAAA"}
@@ -0,0 +1,3 @@
1
+ export * from './checkIpfsUrl.ts';
2
+ export * from './getProviderFromEnv.ts';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA;AACjC,cAAc,yBAAyB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/witness-blockchain-abstract",
3
- "version": "4.0.3",
3
+ "version": "4.1.1",
4
4
  "description": "Primary SDK for using XYO Protocol 2.0",
5
5
  "homepage": "https://xyo.network",
6
6
  "bugs": {
@@ -21,26 +21,20 @@
21
21
  "type": "module",
22
22
  "exports": {
23
23
  ".": {
24
- "types": "./dist/types/index.d.ts",
24
+ "types": "./dist/neutral/index.d.ts",
25
25
  "default": "./dist/neutral/index.mjs"
26
26
  },
27
27
  "./package.json": "./package.json"
28
28
  },
29
29
  "module": "dist/neutral/index.mjs",
30
- "types": "dist/types/index.d.ts",
30
+ "types": "dist/neutral/index.d.ts",
31
31
  "dependencies": {
32
- "@xylabs/assert": "^4.13.4",
33
- "@xylabs/object": "^4.13.4",
34
- "@xylabs/promise": "^4.13.4",
35
- "@xyo-network/abstract-witness": "^4.0.3",
36
- "@xyo-network/module-model": "^4.0.3",
37
- "@xyo-network/payload-model": "^4.0.3",
38
- "@xyo-network/witness-model": "^4.0.3",
32
+ "@xylabs/assert": "^4.13.15",
39
33
  "ethers": "^6.15.0"
40
34
  },
41
35
  "devDependencies": {
42
- "@xylabs/ts-scripts-yarn3": "^6.5.18",
43
- "@xylabs/tsconfig": "^6.5.18",
36
+ "@xylabs/ts-scripts-yarn3": "^7.0.0-rc.23",
37
+ "@xylabs/tsconfig": "^7.0.0-rc.23",
44
38
  "typescript": "^5.8.3"
45
39
  },
46
40
  "publishConfig": {
@@ -1,2 +0,0 @@
1
- export * from './lib/index.ts';
2
- //# sourceMappingURL=index.d.ts.map
File without changes
File without changes
File without changes
File without changes