tx-indexer 0.5.2 → 0.5.4
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/README.md +5 -5
- package/dist/{client-DdzTiKZ4.d.ts → client-xmDVjOy4.d.ts} +13 -1
- package/dist/client.d.ts +2 -2
- package/dist/client.js +548 -63
- package/dist/client.js.map +1 -1
- package/dist/index.d.ts +109 -5
- package/dist/index.js +570 -66
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +4 -4
- package/package.json +4 -2
- package/dist/{classification.types-Cn9IGtEC.d.ts → classification.types-h046WjuF.d.ts} +7 -7
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { R as RawTransaction, f as RawTransactionSchema, k as TokenBalance, e as TokenBalanceSchema, a as TransactionClassification, n as TransactionClassificationSchema, j as TxCategory, d as TxCategorySchema, h as TxDirection, b as TxDirectionSchema, T as TxLeg, m as TxLegRole, g as TxLegSchema, l as TxLegSide, i as TxPrimaryType, c as TxPrimaryTypeSchema } from './classification.types-
|
|
1
|
+
export { R as RawTransaction, f as RawTransactionSchema, k as TokenBalance, e as TokenBalanceSchema, a as TransactionClassification, n as TransactionClassificationSchema, j as TxCategory, d as TxCategorySchema, h as TxDirection, b as TxDirectionSchema, T as TxLeg, m as TxLegRole, g as TxLegSchema, l as TxLegSide, i as TxPrimaryType, c as TxPrimaryTypeSchema } from './classification.types-h046WjuF.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import '@solana/kit';
|
|
4
4
|
|
|
@@ -46,12 +46,12 @@ type MoneyAmount = z.infer<typeof MoneyAmountSchema>;
|
|
|
46
46
|
|
|
47
47
|
declare const CounterpartySchema: z.ZodObject<{
|
|
48
48
|
type: z.ZodEnum<{
|
|
49
|
+
unknown: "unknown";
|
|
50
|
+
protocol: "protocol";
|
|
49
51
|
person: "person";
|
|
50
52
|
merchant: "merchant";
|
|
51
53
|
exchange: "exchange";
|
|
52
|
-
protocol: "protocol";
|
|
53
54
|
own_wallet: "own_wallet";
|
|
54
|
-
unknown: "unknown";
|
|
55
55
|
}>;
|
|
56
56
|
address: z.ZodString;
|
|
57
57
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -67,9 +67,9 @@ declare const ProtocolInfoSchema: z.ZodObject<{
|
|
|
67
67
|
}, z.core.$strip>;
|
|
68
68
|
declare const CategorizationSchema: z.ZodObject<{
|
|
69
69
|
category: z.ZodEnum<{
|
|
70
|
+
fee: "fee";
|
|
70
71
|
transfer: "transfer";
|
|
71
72
|
other: "other";
|
|
72
|
-
fee: "fee";
|
|
73
73
|
income: "income";
|
|
74
74
|
expense: "expense";
|
|
75
75
|
investment: "investment";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tx-indexer",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.4",
|
|
4
4
|
"description": "A TypeScript SDK that transforms raw Solana transactions into human-readable financial data with automatic classification and protocol detection",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -31,7 +31,9 @@
|
|
|
31
31
|
"prepublishOnly": "bun run build",
|
|
32
32
|
"check-types": "tsc --noEmit",
|
|
33
33
|
"lint": "eslint .",
|
|
34
|
-
"test": "bun test",
|
|
34
|
+
"test": "bun test src/client.test.ts src/nft.test.ts",
|
|
35
|
+
"test:integration": "bun test src/__tests__/integration.test.ts",
|
|
36
|
+
"test:all": "bun test",
|
|
35
37
|
"size": "size-limit",
|
|
36
38
|
"size:why": "size-limit --why"
|
|
37
39
|
},
|
|
@@ -11,6 +11,7 @@ declare const TxPrimaryTypeSchema: z.ZodEnum<{
|
|
|
11
11
|
nft_mint: "nft_mint";
|
|
12
12
|
nft_purchase: "nft_purchase";
|
|
13
13
|
nft_sale: "nft_sale";
|
|
14
|
+
reward: "reward";
|
|
14
15
|
transfer: "transfer";
|
|
15
16
|
swap: "swap";
|
|
16
17
|
stake_deposit: "stake_deposit";
|
|
@@ -20,14 +21,13 @@ declare const TxPrimaryTypeSchema: z.ZodEnum<{
|
|
|
20
21
|
airdrop: "airdrop";
|
|
21
22
|
bridge_in: "bridge_in";
|
|
22
23
|
bridge_out: "bridge_out";
|
|
23
|
-
reward: "reward";
|
|
24
24
|
fee_only: "fee_only";
|
|
25
25
|
other: "other";
|
|
26
26
|
}>;
|
|
27
27
|
declare const TxCategorySchema: z.ZodEnum<{
|
|
28
|
+
fee: "fee";
|
|
28
29
|
transfer: "transfer";
|
|
29
30
|
other: "other";
|
|
30
|
-
fee: "fee";
|
|
31
31
|
income: "income";
|
|
32
32
|
expense: "expense";
|
|
33
33
|
investment: "investment";
|
|
@@ -92,11 +92,11 @@ declare const TxLegSideSchema: z.ZodEnum<{
|
|
|
92
92
|
credit: "credit";
|
|
93
93
|
}>;
|
|
94
94
|
declare const TxLegRoleSchema: z.ZodEnum<{
|
|
95
|
-
reward: "reward";
|
|
96
95
|
unknown: "unknown";
|
|
97
96
|
fee: "fee";
|
|
98
97
|
sent: "sent";
|
|
99
98
|
received: "received";
|
|
99
|
+
reward: "reward";
|
|
100
100
|
protocol_deposit: "protocol_deposit";
|
|
101
101
|
protocol_withdraw: "protocol_withdraw";
|
|
102
102
|
principal: "principal";
|
|
@@ -144,11 +144,11 @@ declare const TxLegSchema: z.ZodObject<{
|
|
|
144
144
|
} | undefined;
|
|
145
145
|
}>;
|
|
146
146
|
role: z.ZodEnum<{
|
|
147
|
-
reward: "reward";
|
|
148
147
|
unknown: "unknown";
|
|
149
148
|
fee: "fee";
|
|
150
149
|
sent: "sent";
|
|
151
150
|
received: "received";
|
|
151
|
+
reward: "reward";
|
|
152
152
|
protocol_deposit: "protocol_deposit";
|
|
153
153
|
protocol_withdraw: "protocol_withdraw";
|
|
154
154
|
principal: "principal";
|
|
@@ -169,6 +169,7 @@ declare const TransactionClassificationSchema: z.ZodObject<{
|
|
|
169
169
|
nft_mint: "nft_mint";
|
|
170
170
|
nft_purchase: "nft_purchase";
|
|
171
171
|
nft_sale: "nft_sale";
|
|
172
|
+
reward: "reward";
|
|
172
173
|
transfer: "transfer";
|
|
173
174
|
swap: "swap";
|
|
174
175
|
stake_deposit: "stake_deposit";
|
|
@@ -178,7 +179,6 @@ declare const TransactionClassificationSchema: z.ZodObject<{
|
|
|
178
179
|
airdrop: "airdrop";
|
|
179
180
|
bridge_in: "bridge_in";
|
|
180
181
|
bridge_out: "bridge_out";
|
|
181
|
-
reward: "reward";
|
|
182
182
|
fee_only: "fee_only";
|
|
183
183
|
other: "other";
|
|
184
184
|
}>;
|
|
@@ -188,12 +188,12 @@ declare const TransactionClassificationSchema: z.ZodObject<{
|
|
|
188
188
|
receiver: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
189
189
|
counterparty: z.ZodNullable<z.ZodObject<{
|
|
190
190
|
type: z.ZodEnum<{
|
|
191
|
+
unknown: "unknown";
|
|
192
|
+
protocol: "protocol";
|
|
191
193
|
person: "person";
|
|
192
194
|
merchant: "merchant";
|
|
193
195
|
exchange: "exchange";
|
|
194
|
-
protocol: "protocol";
|
|
195
196
|
own_wallet: "own_wallet";
|
|
196
|
-
unknown: "unknown";
|
|
197
197
|
}>;
|
|
198
198
|
address: z.ZodString;
|
|
199
199
|
name: z.ZodOptional<z.ZodString>;
|