@xyo-network/evm-token-interface-diviner 4.1.0 → 4.2.0
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/neutral/index.d.ts +3 -88
- package/package.json +28 -29
package/dist/neutral/index.d.ts
CHANGED
|
@@ -1,88 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import { AnyConfigSchema } from '@xyo-network/module-model';
|
|
5
|
-
import { Payload, Schema } from '@xyo-network/payload-model';
|
|
6
|
-
import { JsonFragment } from 'ethers';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* ERC20 Token Interfaces
|
|
10
|
-
*/
|
|
11
|
-
type ERC20TokenInterfaces = 'ERC20';
|
|
12
|
-
/**
|
|
13
|
-
* ERC721 Token Interfaces
|
|
14
|
-
*/
|
|
15
|
-
type ERC721TokenInterfaces = 'ERC721' | 'ERC721TokenReceiver' | 'ERC721Metadata' | 'ERC721Enumerable';
|
|
16
|
-
/**
|
|
17
|
-
* ERC1155 Token Interfaces
|
|
18
|
-
*/
|
|
19
|
-
type ERC1155TokenInterfaces = 'ERC1155' | 'ERC1155TokenReceiver' | 'ERC1155Metadata_URI';
|
|
20
|
-
/**
|
|
21
|
-
* All Token Interfaces
|
|
22
|
-
*/
|
|
23
|
-
type TokenInterface = ERC20TokenInterfaces | ERC721TokenInterfaces | ERC1155TokenInterfaces;
|
|
24
|
-
/**
|
|
25
|
-
* The schema for the EVM Token Interface Implemented payload
|
|
26
|
-
*/
|
|
27
|
-
declare const EvmTokenInterfaceImplementedSchema = "network.xyo.evm.token.interface.implemented";
|
|
28
|
-
/**
|
|
29
|
-
* The schema for the EVM Token Interface Implemented payload
|
|
30
|
-
*/
|
|
31
|
-
type EvmTokenInterfaceImplementedSchema = typeof EvmTokenInterfaceImplementedSchema;
|
|
32
|
-
/**
|
|
33
|
-
* The EVM Token Interface Implemented payload
|
|
34
|
-
*/
|
|
35
|
-
type EvmTokenInterfaceImplemented = Payload<{
|
|
36
|
-
/**
|
|
37
|
-
* The contract address
|
|
38
|
-
*/
|
|
39
|
-
address: string;
|
|
40
|
-
/**
|
|
41
|
-
* The chain id
|
|
42
|
-
*/
|
|
43
|
-
chainId: number;
|
|
44
|
-
/**
|
|
45
|
-
* True if the contract implements the interface
|
|
46
|
-
*/
|
|
47
|
-
implemented: boolean;
|
|
48
|
-
/**
|
|
49
|
-
* The specific token interface
|
|
50
|
-
*/
|
|
51
|
-
tokenInterface: TokenInterface;
|
|
52
|
-
}, EvmTokenInterfaceImplementedSchema>;
|
|
53
|
-
/**
|
|
54
|
-
* Identity function for EvmTokenInterfaceImplemented payload
|
|
55
|
-
*/
|
|
56
|
-
declare const isEvmTokenInterfaceImplemented: (x?: unknown | null) => x is EvmTokenInterfaceImplemented;
|
|
57
|
-
|
|
58
|
-
declare const EvmTokenInterfaceImplementedDivinerConfigSchema = "network.xyo.evm.token.interface.implemented.diviner.config";
|
|
59
|
-
type EvmTokenInterfaceImplementedDivinerConfigSchema = typeof EvmTokenInterfaceImplementedDivinerConfigSchema;
|
|
60
|
-
type EvmTokenInterfaceImplementedDivinerConfig = DivinerConfig<{
|
|
61
|
-
schema: EvmTokenInterfaceImplementedDivinerConfigSchema;
|
|
62
|
-
tokenInterfaces?: TokenInterface[];
|
|
63
|
-
}>;
|
|
64
|
-
type EvmTokenInterfaceImplementedDivinerParams = DivinerParams<AnyConfigSchema<EvmTokenInterfaceImplementedDivinerConfig>>;
|
|
65
|
-
type DistributiveMappedType<T> = T extends string ? {
|
|
66
|
-
[K in T]: readonly JsonFragment[];
|
|
67
|
-
} : never;
|
|
68
|
-
type TokenInterfaceDictionary = DistributiveMappedType<TokenInterface>;
|
|
69
|
-
/**
|
|
70
|
-
* A diviner that checks if a contract implements a token interface
|
|
71
|
-
*/
|
|
72
|
-
declare class EvmTokenInterfaceImplementedDiviner<TParams extends EvmTokenInterfaceImplementedDivinerParams = EvmTokenInterfaceImplementedDivinerParams> extends AbstractDiviner<TParams, EvmContract, EvmTokenInterfaceImplemented> {
|
|
73
|
-
/**
|
|
74
|
-
* The list of supported token interfaces
|
|
75
|
-
*/
|
|
76
|
-
static readonly SupportedTokenInterfaces: Readonly<Record<TokenInterface, readonly JsonFragment[]>>;
|
|
77
|
-
static readonly configSchemas: Schema[];
|
|
78
|
-
static readonly defaultConfigSchema: Schema;
|
|
79
|
-
private _tokenInterfaces?;
|
|
80
|
-
/**
|
|
81
|
-
* The list of token interfaces to check against the contract
|
|
82
|
-
*/
|
|
83
|
-
get tokenInterfaces(): TokenInterfaceDictionary;
|
|
84
|
-
protected divineHandler(inPayloads?: EvmContract[]): Promise<EvmTokenInterfaceImplemented[]>;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
export { EvmTokenInterfaceImplementedDiviner, EvmTokenInterfaceImplementedDivinerConfigSchema, EvmTokenInterfaceImplementedSchema, isEvmTokenInterfaceImplemented };
|
|
88
|
-
export type { ERC1155TokenInterfaces, ERC20TokenInterfaces, ERC721TokenInterfaces, EvmTokenInterfaceImplemented, EvmTokenInterfaceImplementedDivinerConfig, EvmTokenInterfaceImplementedDivinerParams, TokenInterface };
|
|
1
|
+
export * from './Diviner.ts';
|
|
2
|
+
export * from './Payload.ts';
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/evm-token-interface-diviner",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.2.0",
|
|
4
4
|
"description": "Typescript/Javascript Plugins for XYO Platform",
|
|
5
5
|
"homepage": "https://xyo.network",
|
|
6
6
|
"bugs": {
|
|
@@ -29,39 +29,38 @@
|
|
|
29
29
|
"module": "dist/neutral/index.mjs",
|
|
30
30
|
"types": "dist/neutral/index.d.ts",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@xylabs/assert": "^4.
|
|
33
|
-
"@xyo-network/diviner-abstract": "^4.
|
|
34
|
-
"@xyo-network/diviner-model": "^4.
|
|
35
|
-
"@xyo-network/evm-contract-witness": "^4.
|
|
36
|
-
"@xyo-network/module-model": "^4.
|
|
32
|
+
"@xylabs/assert": "^4.15.1",
|
|
33
|
+
"@xyo-network/diviner-abstract": "^4.3.0",
|
|
34
|
+
"@xyo-network/diviner-model": "^4.3.0",
|
|
35
|
+
"@xyo-network/evm-contract-witness": "^4.2.0",
|
|
36
|
+
"@xyo-network/module-model": "^4.3.0",
|
|
37
37
|
"@xyo-network/open-zeppelin-typechain": "^3.5.4",
|
|
38
|
-
"@xyo-network/payload-model": "^4.
|
|
38
|
+
"@xyo-network/payload-model": "^4.3.0",
|
|
39
39
|
"ethers": "^6.15.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@xylabs/delay": "^4.
|
|
43
|
-
"@xylabs/ts-scripts-yarn3": "^7.0.
|
|
44
|
-
"@xylabs/tsconfig": "^7.0.
|
|
45
|
-
"@xylabs/vitest-extended": "^4.
|
|
46
|
-
"@xyo-network/archivist-memory": "^4.
|
|
47
|
-
"@xyo-network/boundwitness-model": "^4.
|
|
48
|
-
"@xyo-network/diviner-boundwitness-memory": "^4.
|
|
49
|
-
"@xyo-network/diviner-jsonpatch": "^4.
|
|
50
|
-
"@xyo-network/diviner-payload-generic": "^4.
|
|
51
|
-
"@xyo-network/diviner-payload-memory": "^4.
|
|
52
|
-
"@xyo-network/diviner-payload-model": "^4.
|
|
53
|
-
"@xyo-network/diviner-stateful": "^4.
|
|
54
|
-
"@xyo-network/diviner-temporal-indexing": "^4.
|
|
55
|
-
"@xyo-network/manifest": "^4.
|
|
56
|
-
"@xyo-network/module-factory-locator": "^4.
|
|
57
|
-
"@xyo-network/node-memory": "^4.
|
|
42
|
+
"@xylabs/delay": "^4.15.1",
|
|
43
|
+
"@xylabs/ts-scripts-yarn3": "^7.0.1",
|
|
44
|
+
"@xylabs/tsconfig": "^7.0.1",
|
|
45
|
+
"@xylabs/vitest-extended": "^4.15.1",
|
|
46
|
+
"@xyo-network/archivist-memory": "^4.3.0",
|
|
47
|
+
"@xyo-network/boundwitness-model": "^4.3.0",
|
|
48
|
+
"@xyo-network/diviner-boundwitness-memory": "^4.3.0",
|
|
49
|
+
"@xyo-network/diviner-jsonpatch": "^4.3.0",
|
|
50
|
+
"@xyo-network/diviner-payload-generic": "^4.3.0",
|
|
51
|
+
"@xyo-network/diviner-payload-memory": "^4.3.0",
|
|
52
|
+
"@xyo-network/diviner-payload-model": "^4.3.0",
|
|
53
|
+
"@xyo-network/diviner-stateful": "^4.3.0",
|
|
54
|
+
"@xyo-network/diviner-temporal-indexing": "^4.3.0",
|
|
55
|
+
"@xyo-network/manifest": "^4.3.0",
|
|
56
|
+
"@xyo-network/module-factory-locator": "^4.3.0",
|
|
57
|
+
"@xyo-network/node-memory": "^4.3.0",
|
|
58
58
|
"@xyo-network/open-zeppelin-typechain": "^3.5.4",
|
|
59
|
-
"@xyo-network/sentinel-model": "^4.
|
|
60
|
-
"@xyo-network/wallet": "^4.
|
|
61
|
-
"@xyo-network/wallet-model": "^4.
|
|
62
|
-
"@xyo-network/witness-evm-abstract": "^4.
|
|
63
|
-
"@xyo-network/witness-timestamp": "^4.
|
|
64
|
-
"knip": "^5.61.3",
|
|
59
|
+
"@xyo-network/sentinel-model": "^4.3.0",
|
|
60
|
+
"@xyo-network/wallet": "^4.3.0",
|
|
61
|
+
"@xyo-network/wallet-model": "^4.3.0",
|
|
62
|
+
"@xyo-network/witness-evm-abstract": "^4.3.0",
|
|
63
|
+
"@xyo-network/witness-timestamp": "^4.3.0",
|
|
65
64
|
"typescript": "^5.8.3",
|
|
66
65
|
"vitest": "^3.2.4"
|
|
67
66
|
},
|