@indexing/jiti 0.0.71 → 0.0.75

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/types.d.ts CHANGED
@@ -1,4 +1,25 @@
1
- type Template = {
1
+ export type HubEventMessage = {
2
+ data: {
3
+ type: 'MESSAGE_TYPE_NONE' | 'MESSAGE_TYPE_CAST_ADD' | 'MESSAGE_TYPE_CAST_REMOVE' | 'MESSAGE_TYPE_REACTION_ADD' | 'MESSAGE_TYPE_REACTION_REMOVE' | 'MESSAGE_TYPE_LINK_ADD' | 'MESSAGE_TYPE_LINK_REMOVE' | 'MESSAGE_TYPE_VERIFICATION_ADD_ETH_ADDRESS' | 'MESSAGE_TYPE_VERIFICATION_REMOVE' | 'MESSAGE_TYPE_USER_DATA_ADD' | 'MESSAGE_TYPE_USERNAME_PROOF';
4
+ fid: number | string;
5
+ timestamp: number;
6
+ network: string;
7
+ body: Record<string, unknown> | string;
8
+ cast_add_body?: {
9
+ embeds?: {
10
+ url?: string;
11
+ embed?: string;
12
+ }[];
13
+ };
14
+ };
15
+ hash: string;
16
+ hash_scheme: string;
17
+ signature: string;
18
+ signature_scheme: string;
19
+ signer: string;
20
+ data_bytes: string;
21
+ };
22
+ export type Template = {
2
23
  key: string;
3
24
  name: string;
4
25
  description: string;
@@ -10,7 +31,7 @@ type Template = {
10
31
  }) => unknown;
11
32
  tests: TemplateTest[];
12
33
  };
13
- type Param = {
34
+ export type Param = {
14
35
  key: string;
15
36
  name: string;
16
37
  type: 'NETWORK' | 'ADDRESS' | 'STRING' | 'NUMBER' | 'BOOLEAN';
@@ -19,31 +40,31 @@ type Param = {
19
40
  values?: string[];
20
41
  default?: string;
21
42
  };
22
- type TemplateTest = {
43
+ export type TemplateTest = {
23
44
  params: Record<string, unknown>;
24
45
  payload: `https://${string}` | Record<string, unknown>;
25
46
  output: unknown;
26
47
  };
27
- type HubEventMessage = {
28
- data: {
29
- type: 'MESSAGE_TYPE_NONE' | 'MESSAGE_TYPE_CAST_ADD' | 'MESSAGE_TYPE_CAST_REMOVE' | 'MESSAGE_TYPE_REACTION_ADD' | 'MESSAGE_TYPE_REACTION_REMOVE' | 'MESSAGE_TYPE_LINK_ADD' | 'MESSAGE_TYPE_LINK_REMOVE' | 'MESSAGE_TYPE_VERIFICATION_ADD_ETH_ADDRESS' | 'MESSAGE_TYPE_VERIFICATION_REMOVE' | 'MESSAGE_TYPE_USER_DATA_ADD' | 'MESSAGE_TYPE_USERNAME_PROOF';
30
- fid: number | string;
31
- timestamp: number;
32
- network: string;
33
- body: Record<string, unknown> | string;
34
- cast_add_body?: {
35
- embeds?: {
36
- url?: string;
37
- embed?: string;
38
- }[];
39
- };
40
- };
41
- hash: string;
42
- hash_scheme: string;
43
- signature: string;
44
- signature_scheme: string;
45
- signer: string;
46
- data_bytes: string;
48
+ export type SubTemplate = {
49
+ match: (payload: Record<string, unknown>) => boolean;
50
+ transform: Template['transform'];
51
+ tests: Template['tests'];
52
+ };
53
+ export type VMType = 'APTOS' | 'CARDANO' | 'COSMOS' | 'EVM' | 'FILECOIN' | 'HYPERCORE' | 'RIPPLE' | 'SNAPCHAIN' | 'STARKNET' | 'STELLAR' | 'SUBSTRATE' | 'SUI' | 'SVM' | 'TON' | 'UTXO';
54
+ export type NetworkType = 'APTOS' | 'APTOS_TESTNET' | 'ASTAR' | 'BITCOIN' | 'BITCOIN_TESTNET' | 'BITTENSOR' | 'CARDANO' | 'CAST_PROTOCOL' | 'DOGECOIN' | 'ECLIPSE' | 'ENJIN' | 'FARCASTER' | 'FILECOIN' | 'HYPERCORE' | 'KUSAMA' | 'LITECOIN' | 'MOVEMENT_BARDOCK' | 'POLKADOT' | 'RIPPLE' | 'SNAPCHAIN' | 'SOLANA' | 'SOLANA_DEVNET' | 'STARKNET' | 'STELLAR' | 'SUI' | 'TON' | 'ZCASH';
55
+ export type NetworkTransfer = {
56
+ amount: number | bigint;
57
+ blockNumber: number;
58
+ from: string;
59
+ index?: string;
60
+ memo?: string | number;
61
+ timestamp: string;
62
+ to: string;
63
+ token?: string;
64
+ tokenId?: string;
65
+ tokenType: 'NATIVE' | 'TOKEN' | 'NFT';
66
+ transactionGasFee: bigint;
67
+ transactionHash: string;
47
68
  };
48
69
  export const utils: {
49
70
  blockToBeat(block: Record<string, unknown>): number;
@@ -51,7 +72,7 @@ export const utils: {
51
72
  blockToTimestamp(block: Record<string, unknown>): Date;
52
73
  blockToVM(block: Record<string, unknown>): string;
53
74
  evmAddressToChecksum(address: string): string;
54
- evmChainToId(chain: string): any;
75
+ evmChainToId(chain: string): number;
55
76
  evmDecodeLog(log: Record<string, unknown> & {
56
77
  address: string;
57
78
  topics: string[];
@@ -87,11 +108,11 @@ export const utils: {
87
108
  snapchainParseEvent(evt: HubEventMessage): Record<string, unknown>;
88
109
  };
89
110
  export const templates: {
90
- filterValues: Template;
91
- raw: Template;
92
- tokenTransfers: Template;
111
+ filterValues: import("types").Template;
112
+ raw: import("types").Template;
113
+ tokenTransfers: import("types").Template;
93
114
  };
94
- export function getAllTemplates(): Template[];
115
+ export function getAllTemplates(): import("types").Template[];
95
116
  export function getTemplateByKey(key: string): any;
96
117
 
97
118
  //# sourceMappingURL=types.d.ts.map