@xyo-network/erc1967-witness 3.6.1 → 4.1.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.
@@ -0,0 +1,50 @@
1
+ import { Address } from '@xylabs/hex';
2
+ import { Provider } from 'ethers';
3
+ import { Payload, Schema } from '@xyo-network/payload-model';
4
+ import { EvmWitnessConfig, EvmWitnessParams, AbstractEvmWitness, EvmAddress } from '@xyo-network/witness-evm-abstract';
5
+
6
+ declare const ERC1967_PROXY_IMPLEMENTATION_STORAGE_SLOT = "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc";
7
+ declare const ERC1967_PROXY_BEACON_STORAGE_SLOT = "0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50";
8
+ declare const ERC1967_PROXY_ADMIN_STORAGE_SLOT = "0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103";
9
+ declare const ERC1967_PROXY_ROLLBACK_STORAGE_SLOT = "0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143";
10
+ interface Erc1967DataSlots {
11
+ admin?: Address;
12
+ beacon?: Address;
13
+ implementation?: Address;
14
+ rollback?: Address;
15
+ }
16
+ interface Erc1967SlotStatus {
17
+ address: string;
18
+ beacon?: {
19
+ implementation?: Address;
20
+ };
21
+ implementation: string;
22
+ slots: Erc1967DataSlots;
23
+ }
24
+ declare const getErc1967SlotStatus: (provider: Provider, address: string, block?: number) => Promise<Erc1967SlotStatus>;
25
+
26
+ declare const Erc1967StatusSchema = "network.xyo.erc1967.status";
27
+ type Erc1967StatusSchema = typeof Erc1967StatusSchema;
28
+ type Erc1967Status = Payload<{
29
+ address: string;
30
+ beacon?: Erc1967SlotStatus['beacon'];
31
+ block: number;
32
+ chainId: number;
33
+ implementation?: Erc1967SlotStatus['implementation'];
34
+ slots?: Erc1967SlotStatus['slots'];
35
+ }, Erc1967StatusSchema>;
36
+
37
+ declare const Erc1967WitnessConfigSchema = "network.xyo.erc1967.witness.config";
38
+ type Erc1967WitnessConfigSchema = typeof Erc1967WitnessConfigSchema;
39
+ type Erc1967WitnessConfig = EvmWitnessConfig<{
40
+ address?: string;
41
+ }, Erc1967WitnessConfigSchema>;
42
+ type Erc1967WitnessParams = EvmWitnessParams<Erc1967WitnessConfig>;
43
+ declare class Erc1967Witness<TParams extends Erc1967WitnessParams = Erc1967WitnessParams> extends AbstractEvmWitness<TParams, EvmAddress, Erc1967Status> {
44
+ static readonly configSchemas: Schema[];
45
+ static readonly defaultConfigSchema: Schema;
46
+ protected observeHandler(inPayloads?: EvmAddress[]): Promise<Erc1967Status[]>;
47
+ }
48
+
49
+ export { ERC1967_PROXY_ADMIN_STORAGE_SLOT, ERC1967_PROXY_BEACON_STORAGE_SLOT, ERC1967_PROXY_IMPLEMENTATION_STORAGE_SLOT, ERC1967_PROXY_ROLLBACK_STORAGE_SLOT, Erc1967StatusSchema, Erc1967Witness, Erc1967WitnessConfigSchema, getErc1967SlotStatus };
50
+ export type { Erc1967DataSlots, Erc1967SlotStatus, Erc1967Status, Erc1967WitnessConfig, Erc1967WitnessParams };
@@ -0,0 +1,2 @@
1
+ import '@xylabs/vitest-extended';
2
+ //# sourceMappingURL=Witness.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Witness.spec.d.ts","sourceRoot":"","sources":["../../../src/spec/Witness.spec.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/erc1967-witness",
3
- "version": "3.6.1",
3
+ "version": "4.1.0",
4
4
  "description": "Typescript/Javascript Plugins for XYO Platform",
5
5
  "homepage": "https://xyo.network",
6
6
  "bugs": {
@@ -21,28 +21,28 @@
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.11.2",
33
- "@xylabs/hex": "^4.11.2",
34
- "@xyo-network/open-zeppelin-typechain": "^3.5.2",
35
- "@xyo-network/payload-model": "^3.17.1",
36
- "@xyo-network/witness-evm-abstract": "^3.17.1",
37
- "ethers": "^6.14.3"
32
+ "@xylabs/assert": "^4.13.15",
33
+ "@xylabs/hex": "^4.13.15",
34
+ "@xyo-network/open-zeppelin-typechain": "^3.5.4",
35
+ "@xyo-network/payload-model": "^4.1.1",
36
+ "@xyo-network/witness-evm-abstract": "^4.1.1",
37
+ "ethers": "^6.15.0"
38
38
  },
39
39
  "devDependencies": {
40
- "@xylabs/ts-scripts-yarn3": "^6.5.7",
41
- "@xylabs/tsconfig": "^6.5.7",
42
- "@xylabs/vitest-extended": "^4.11.2",
43
- "knip": "^5.59.0",
40
+ "@xylabs/ts-scripts-yarn3": "^7.0.0-rc.24",
41
+ "@xylabs/tsconfig": "^7.0.0-rc.24",
42
+ "@xylabs/vitest-extended": "^4.13.15",
43
+ "knip": "^5.61.3",
44
44
  "typescript": "^5.8.3",
45
- "vitest": "^3.1.4"
45
+ "vitest": "^3.2.4"
46
46
  },
47
47
  "publishConfig": {
48
48
  "access": "public"
@@ -1,4 +0,0 @@
1
- export * from './lib/index.ts';
2
- export * from './Payload.ts';
3
- export * from './Witness.ts';
4
- //# sourceMappingURL=index.d.ts.map
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes