@tenderly/actions 0.0.6 → 0.0.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tenderly/actions",
3
- "version": "0.0.6",
3
+ "version": "0.0.9",
4
4
  "description": "Types for Web3 Actions",
5
5
  "types": "lib/actions.d.ts",
6
6
  "scripts": {
@@ -26,4 +26,4 @@
26
26
  "devDependencies": {
27
27
  "typescript": "^4.4.3"
28
28
  }
29
- }
29
+ }
package/lib/actions.d.ts DELETED
@@ -1,122 +0,0 @@
1
- /**
2
- * Function must implement ActionFn. Event payload depends on a configured trigger.
3
- */
4
- export declare type ActionFn = (ctx: Context, event: Event) => Promise<void>;
5
- /**
6
- * Event provided to function dependens on a configured trigger.
7
- */
8
- export interface Event {
9
- }
10
- /**
11
- * For trigger type "periodic"
12
- */
13
- export interface PeriodicEvent extends Event {
14
- /**
15
- * Time when this periodic event is created.
16
- */
17
- time: Date;
18
- }
19
- /**
20
- * For trigger type "webhook"
21
- */
22
- export interface WebhookEvent extends Event {
23
- /**
24
- * Time when webhook required is received.
25
- */
26
- time: Date;
27
- /**
28
- * JSON-body of POST request.
29
- */
30
- payload: any;
31
- }
32
- /**
33
- * For trigger type "block
34
- */
35
- export interface BlockEvent extends Event {
36
- /**
37
- * Chain identifier.
38
- */
39
- network: string;
40
- blockHash: string;
41
- blockNumber: number;
42
- }
43
- export interface TransactionEvent extends Event {
44
- /**
45
- * Chain identifier.
46
- */
47
- network: string;
48
- blockHash: string;
49
- blockNumber: number;
50
- /**
51
- * Transaction hash.
52
- */
53
- hash: string;
54
- from: string;
55
- to?: string;
56
- logs: Log[];
57
- /**
58
- * Hex encoded.
59
- */
60
- input: string;
61
- value: string;
62
- nonce: string;
63
- }
64
- export interface Log {
65
- /**
66
- * Hex-encoded address.
67
- */
68
- address: string;
69
- /**
70
- * Hex-encoded topics.
71
- */
72
- topics: string[];
73
- /**
74
- * Hex-encoded data.
75
- */
76
- data: string;
77
- }
78
- export interface AlertEvent extends Event {
79
- alertId: string;
80
- /**
81
- * Chain identifier.
82
- */
83
- network: string;
84
- transactionHash: string;
85
- }
86
- export interface Context {
87
- /**
88
- * Project's key-value store.
89
- */
90
- readonly storage: Storage;
91
- /**
92
- * Project's secrets.
93
- */
94
- readonly secrets: Secrets;
95
- }
96
- export interface Secrets {
97
- /**
98
- * Gets secret with key or throws if secret does not exist.
99
- */
100
- get(key: string): Promise<string>;
101
- }
102
- export interface Storage {
103
- /**
104
- * Gets storage entry.
105
- */
106
- getStr(key: string): Promise<string>;
107
- getNumber(key: string): Promise<number>;
108
- getBigInt(key: string): Promise<bigint>;
109
- getJson(key: string): Promise<any>;
110
- /**
111
- * Writes storage entry.
112
- */
113
- putStr(key: string, value: string): Promise<void>;
114
- putNumber(key: string, value: number): Promise<void>;
115
- putBigInt(key: string, value: bigint): Promise<void>;
116
- putJson(key: string, value: any): Promise<void>;
117
- /**
118
- * Deletes storage entry.
119
- */
120
- delete(key: string): Promise<void>;
121
- }
122
- //# sourceMappingURL=actions.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../src/actions.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,QAAQ,GAAG,CAAC,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;AAErE;;GAEG;AACH,MAAM,WAAW,KAAK;CAAG;AAEzB;;GAEG;AACH,MAAM,WAAW,aAAc,SAAQ,KAAK;IACxC;;OAEG;IACH,IAAI,EAAE,IAAI,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,YAAa,SAAQ,KAAK;IACvC;;OAEG;IACH,IAAI,EAAE,IAAI,CAAC;IAEX;;OAEG;IACH,OAAO,EAAE,GAAG,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,UAAW,SAAQ,KAA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AAM,CAAC,CAAA;IACvC,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACxC,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;IAEnC;;OAEG;IACH,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAClD,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACrD,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACrD,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEhD;;OAEG;IACH,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACtC"}
package/lib/actions.js DELETED
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=actions.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"actions.js","sourceRoot":"","sources":["../src/actions.ts"],"names":[],"mappings":""}