@sentio/sdk 3.8.0-rc.2 → 3.9.0-rc.10
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/lib/aptos/aptos-processor.d.ts +3 -3
- package/lib/aptos/aptos-processor.d.ts.map +1 -1
- package/lib/aptos/aptos-processor.js.map +1 -1
- package/lib/aptos/builtin/0x1.d.ts +897 -0
- package/lib/aptos/builtin/0x1.d.ts.map +1 -1
- package/lib/aptos/builtin/0x1.js +1322 -91
- package/lib/aptos/builtin/0x1.js.map +1 -1
- package/lib/aptos/builtin/0x3.js +1 -1
- package/lib/aptos/builtin/0x3.js.map +1 -1
- package/lib/aptos/builtin/0x4.d.ts +4 -4
- package/lib/aptos/builtin/0x4.d.ts.map +1 -1
- package/lib/aptos/builtin/0x4.js +16 -16
- package/lib/aptos/builtin/0x4.js.map +1 -1
- package/lib/core/normalization.d.ts.map +1 -1
- package/lib/core/normalization.js +1 -1
- package/lib/core/normalization.js.map +1 -1
- package/lib/core/partition-handler-manager.d.ts.map +1 -1
- package/lib/core/partition-handler-manager.js +1 -1
- package/lib/core/partition-handler-manager.js.map +1 -1
- package/lib/eth/base-processor-template.d.ts.map +1 -1
- package/lib/eth/base-processor-template.js +2 -0
- package/lib/eth/base-processor-template.js.map +1 -1
- package/lib/eth/base-processor.d.ts +2 -2
- package/lib/eth/base-processor.d.ts.map +1 -1
- package/lib/eth/base-processor.js.map +1 -1
- package/lib/eth/eth.d.ts +1 -1
- package/lib/eth/eth.d.ts.map +1 -1
- package/lib/eth/eth.js +6 -5
- package/lib/eth/eth.js.map +1 -1
- package/lib/fuel/fuel-processor-template.d.ts.map +1 -1
- package/lib/fuel/fuel-processor-template.js +2 -0
- package/lib/fuel/fuel-processor-template.js.map +1 -1
- package/lib/fuel/transaction.js +8 -3
- package/lib/fuel/transaction.js.map +1 -1
- package/lib/iota/builtin/0x2.d.ts +95 -0
- package/lib/iota/builtin/0x2.d.ts.map +1 -1
- package/lib/iota/builtin/0x2.js +586 -1
- package/lib/iota/builtin/0x2.js.map +1 -1
- package/lib/iota/iota-processor.d.ts +2 -2
- package/lib/iota/iota-processor.d.ts.map +1 -1
- package/lib/iota/iota-processor.js +2 -2
- package/lib/iota/iota-processor.js.map +1 -1
- package/lib/solana/builtin/index.d.ts +1 -0
- package/lib/solana/builtin/index.d.ts.map +1 -1
- package/lib/solana/builtin/index.js +1 -0
- package/lib/solana/builtin/index.js.map +1 -1
- package/lib/solana/builtin/spl-token-2022-processor.d.ts +46 -0
- package/lib/solana/builtin/spl-token-2022-processor.d.ts.map +1 -0
- package/lib/solana/builtin/spl-token-2022-processor.js +132 -0
- package/lib/solana/builtin/spl-token-2022-processor.js.map +1 -0
- package/lib/solana/builtin/spl-token-processor.d.ts +30 -30
- package/lib/solana/builtin/spl-token-processor.d.ts.map +1 -1
- package/lib/solana/builtin/types.d.ts +1699 -81
- package/lib/solana/builtin/types.d.ts.map +1 -1
- package/lib/solana/builtin/types.js +520 -72
- package/lib/solana/builtin/types.js.map +1 -1
- package/lib/solana/codegen/codegen.js +2 -2
- package/lib/solana/codegen/codegen.js.map +1 -1
- package/lib/solana/index.d.ts +1 -1
- package/lib/solana/index.js +1 -1
- package/lib/solana/solana-context.d.ts +1 -1
- package/lib/solana/solana-context.d.ts.map +1 -1
- package/lib/solana/solana-processor.d.ts +4 -4
- package/lib/solana/solana-processor.d.ts.map +1 -1
- package/lib/solana/solana-processor.js.map +1 -1
- package/lib/solana/solana-rpc-types.d.ts +75 -0
- package/lib/solana/solana-rpc-types.d.ts.map +1 -0
- package/lib/solana/solana-rpc-types.js +2 -0
- package/lib/solana/solana-rpc-types.js.map +1 -0
- package/lib/store/codegen.js +2 -2
- package/lib/store/codegen.js.map +1 -1
- package/lib/store/decorators.d.ts.map +1 -1
- package/lib/store/decorators.js +1 -1
- package/lib/store/decorators.js.map +1 -1
- package/lib/store/store.js.map +1 -1
- package/lib/sui/builtin/0x1.d.ts +382 -270
- package/lib/sui/builtin/0x1.d.ts.map +1 -1
- package/lib/sui/builtin/0x1.js +2571 -805
- package/lib/sui/builtin/0x1.js.map +1 -1
- package/lib/sui/builtin/0x2.d.ts +1013 -730
- package/lib/sui/builtin/0x2.d.ts.map +1 -1
- package/lib/sui/builtin/0x2.js +7419 -2616
- package/lib/sui/builtin/0x2.js.map +1 -1
- package/lib/sui/builtin/0x3.d.ts +297 -297
- package/lib/sui/builtin/0x3.d.ts.map +1 -1
- package/lib/sui/builtin/0x3.js +2364 -904
- package/lib/sui/builtin/0x3.js.map +1 -1
- package/lib/sui/codegen/codegen.d.ts.map +1 -1
- package/lib/sui/codegen/codegen.js.map +1 -1
- package/lib/sui/context.d.ts +10 -9
- package/lib/sui/context.d.ts.map +1 -1
- package/lib/sui/context.js.map +1 -1
- package/lib/sui/ext/coin.d.ts.map +1 -1
- package/lib/sui/ext/coin.js +1 -1
- package/lib/sui/ext/coin.js.map +1 -1
- package/lib/sui/ext/move-dex.d.ts +3 -3
- package/lib/sui/ext/move-dex.d.ts.map +1 -1
- package/lib/sui/models.d.ts +5 -4
- package/lib/sui/models.d.ts.map +1 -1
- package/lib/sui/move-coder.d.ts.map +1 -1
- package/lib/sui/move-coder.js +1 -0
- package/lib/sui/move-coder.js.map +1 -1
- package/lib/sui/network.d.ts +2 -2
- package/lib/sui/network.d.ts.map +1 -1
- package/lib/sui/network.js +8 -8
- package/lib/sui/network.js.map +1 -1
- package/lib/sui/sui-object-processor-template.d.ts +6 -5
- package/lib/sui/sui-object-processor-template.d.ts.map +1 -1
- package/lib/sui/sui-object-processor-template.js.map +1 -1
- package/lib/sui/sui-object-processor.d.ts +15 -13
- package/lib/sui/sui-object-processor.d.ts.map +1 -1
- package/lib/sui/sui-object-processor.js +4 -2
- package/lib/sui/sui-object-processor.js.map +1 -1
- package/lib/sui/sui-processor.d.ts +8 -6
- package/lib/sui/sui-processor.d.ts.map +1 -1
- package/lib/sui/sui-processor.js +8 -12
- package/lib/sui/sui-processor.js.map +1 -1
- package/lib/sui/utils.d.ts +3 -2
- package/lib/sui/utils.d.ts.map +1 -1
- package/lib/sui/utils.js +9 -9
- package/lib/sui/utils.js.map +1 -1
- package/lib/testing/memory-database.d.ts.map +1 -1
- package/lib/testing/memory-database.js +4 -1
- package/lib/testing/memory-database.js.map +1 -1
- package/lib/testing/sui-facet.d.ts +5 -5
- package/lib/testing/sui-facet.d.ts.map +1 -1
- package/lib/testing/sui-facet.js +5 -5
- package/lib/testing/sui-facet.js.map +1 -1
- package/lib/utils/block.d.ts +1 -1
- package/lib/utils/block.d.ts.map +1 -1
- package/lib/utils/call.js +1 -1
- package/lib/utils/call.js.map +1 -1
- package/lib/utils/dex-price.js +1 -1
- package/lib/utils/dex-price.js.map +1 -1
- package/package.json +29 -22
- package/src/aptos/abis/0x1.json +8161 -2996
- package/src/aptos/abis/0x3.json +140 -75
- package/src/aptos/abis/0x4.json +75 -52
- package/src/aptos/aptos-processor.ts +9 -9
- package/src/aptos/builtin/0x1.ts +2577 -58
- package/src/aptos/builtin/0x3.ts +1 -1
- package/src/aptos/builtin/0x4.ts +18 -19
- package/src/core/normalization.ts +3 -1
- package/src/core/partition-handler-manager.ts +4 -1
- package/src/eth/base-processor-template.ts +5 -1
- package/src/eth/base-processor.ts +11 -11
- package/src/eth/eth.ts +7 -6
- package/src/fuel/fuel-processor-template.ts +3 -1
- package/src/fuel/transaction.ts +5 -5
- package/src/iota/abis/0x2.json +464 -4
- package/src/iota/builtin/0x2.ts +911 -77
- package/src/iota/iota-processor.ts +10 -10
- package/src/solana/builtin/index.ts +2 -1
- package/src/solana/builtin/spl-token-2022-processor.ts +324 -0
- package/src/solana/builtin/spl-token-processor.ts +30 -30
- package/src/solana/builtin/types.ts +659 -144
- package/src/solana/codegen/codegen.ts +6 -6
- package/src/solana/index.ts +1 -1
- package/src/solana/solana-context.ts +1 -1
- package/src/solana/solana-plugin.ts +1 -1
- package/src/solana/solana-processor.ts +11 -7
- package/src/solana/solana-rpc-types.ts +73 -0
- package/src/store/codegen.ts +2 -2
- package/src/store/decorators.ts +3 -1
- package/src/store/store.ts +1 -1
- package/src/sui/abis/0x1.json +8996 -5745
- package/src/sui/abis/0x2.json +38135 -28859
- package/src/sui/abis/0x3.json +14723 -10726
- package/src/sui/builtin/0x1.ts +4071 -1897
- package/src/sui/builtin/0x2.ts +14397 -7968
- package/src/sui/builtin/0x3.ts +3780 -2021
- package/src/sui/codegen/codegen.ts +4 -5
- package/src/sui/context.ts +15 -16
- package/src/sui/ext/coin.ts +4 -2
- package/src/sui/ext/move-dex.ts +5 -5
- package/src/sui/models.ts +5 -4
- package/src/sui/move-coder.ts +1 -0
- package/src/sui/network.ts +10 -9
- package/src/sui/sui-object-processor-template.ts +7 -6
- package/src/sui/sui-object-processor.ts +29 -21
- package/src/sui/sui-processor.ts +33 -36
- package/src/sui/utils.ts +14 -17
- package/src/testing/memory-database.ts +4 -1
- package/src/testing/sui-facet.ts +13 -13
- package/src/utils/block.ts +1 -1
- package/src/utils/call.ts +2 -2
- package/src/utils/dex-price.ts +1 -1
- package/lib/aptos/codegen/types.test.d.ts +0 -2
- package/lib/aptos/codegen/types.test.d.ts.map +0 -1
- package/lib/aptos/codegen/types.test.js.map +0 -1
- package/lib/aptos/ext/coin-event.test.d.ts +0 -2
- package/lib/aptos/ext/coin-event.test.d.ts.map +0 -1
- package/lib/aptos/ext/coin-event.test.js.map +0 -1
- package/lib/aptos/ext/coin.test.d.ts +0 -2
- package/lib/aptos/ext/coin.test.d.ts.map +0 -1
- package/lib/aptos/ext/coin.test.js.map +0 -1
- package/lib/core/database-schema.test.d.ts +0 -2
- package/lib/core/database-schema.test.d.ts.map +0 -1
- package/lib/core/database-schema.test.js.map +0 -1
- package/lib/core/event-logger.test.d.ts +0 -2
- package/lib/core/event-logger.test.d.ts.map +0 -1
- package/lib/core/event-logger.test.js.map +0 -1
- package/lib/core/normalization.test.d.ts +0 -2
- package/lib/core/normalization.test.d.ts.map +0 -1
- package/lib/core/normalization.test.js.map +0 -1
- package/lib/core/numberish.test.d.ts +0 -2
- package/lib/core/numberish.test.d.ts.map +0 -1
- package/lib/core/numberish.test.js.map +0 -1
- package/lib/eth/base-processor.test.d.ts +0 -2
- package/lib/eth/base-processor.test.d.ts.map +0 -1
- package/lib/eth/base-processor.test.js.map +0 -1
- package/lib/eth/eth.test.d.ts +0 -2
- package/lib/eth/eth.test.d.ts.map +0 -1
- package/lib/eth/eth.test.js.map +0 -1
- package/lib/eth/generic-processor.test.d.ts +0 -2
- package/lib/eth/generic-processor.test.d.ts.map +0 -1
- package/lib/eth/generic-processor.test.js.map +0 -1
- package/lib/eth/provider.test.d.ts +0 -2
- package/lib/eth/provider.test.d.ts.map +0 -1
- package/lib/eth/provider.test.js.map +0 -1
- package/lib/store/convert.test.d.ts +0 -2
- package/lib/store/convert.test.d.ts.map +0 -1
- package/lib/store/convert.test.js.map +0 -1
- package/lib/utils/block.test.d.ts +0 -2
- package/lib/utils/block.test.d.ts.map +0 -1
- package/lib/utils/block.test.js.map +0 -1
- package/lib/utils/dex-price.test.d.ts +0 -2
- package/lib/utils/dex-price.test.d.ts.map +0 -1
- package/lib/utils/dex-price.test.js.map +0 -1
- package/lib/utils/erc20.test.d.ts +0 -2
- package/lib/utils/erc20.test.d.ts.map +0 -1
- package/lib/utils/erc20.test.js.map +0 -1
- package/lib/utils/price.test.d.ts +0 -2
- package/lib/utils/price.test.d.ts.map +0 -1
- package/lib/utils/price.test.js.map +0 -1
|
@@ -79,10 +79,10 @@ export class IotaBaseProcessor {
|
|
|
79
79
|
return this.config.network
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
protected onMoveEvent(
|
|
83
|
-
handler: (event:
|
|
82
|
+
protected onMoveEvent<T extends IotaEvent = IotaEvent>(
|
|
83
|
+
handler: (event: T, ctx: IotaContext) => PromiseOrVoid,
|
|
84
84
|
filter: EventFilter | EventFilter[],
|
|
85
|
-
handlerOptions?: HandlerOptions<MoveFetchConfig,
|
|
85
|
+
handlerOptions?: HandlerOptions<MoveFetchConfig, T>
|
|
86
86
|
): IotaBaseProcessor {
|
|
87
87
|
let _filters: EventFilter[] = []
|
|
88
88
|
const _fetchConfig = MoveFetchConfig.fromPartial({ ...DEFAULT_FETCH_CONFIG, ...handlerOptions })
|
|
@@ -124,7 +124,7 @@ export class IotaBaseProcessor {
|
|
|
124
124
|
)
|
|
125
125
|
|
|
126
126
|
const decoded = await processor.coder.decodeEvent<any>(evt)
|
|
127
|
-
await handler(decoded || evt, ctx)
|
|
127
|
+
await handler((decoded || evt) as T, ctx)
|
|
128
128
|
|
|
129
129
|
return ctx.stopAndGetResult()
|
|
130
130
|
},
|
|
@@ -136,7 +136,7 @@ export class IotaBaseProcessor {
|
|
|
136
136
|
if (typeof p === 'function') {
|
|
137
137
|
const evt = JSON.parse(data.rawEvent) as IotaEvent
|
|
138
138
|
const decoded = await processor.coder.decodeEvent<any>(evt)
|
|
139
|
-
return p(decoded || evt)
|
|
139
|
+
return p((decoded || evt) as T)
|
|
140
140
|
}
|
|
141
141
|
return p
|
|
142
142
|
}
|
|
@@ -144,10 +144,10 @@ export class IotaBaseProcessor {
|
|
|
144
144
|
return this
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
-
protected onEntryFunctionCall(
|
|
148
|
-
handler: (call:
|
|
147
|
+
protected onEntryFunctionCall<T extends MoveCallIotaTransaction = MoveCallIotaTransaction>(
|
|
148
|
+
handler: (call: T, ctx: IotaContext) => PromiseOrVoid,
|
|
149
149
|
filter: FunctionNameAndCallFilter | FunctionNameAndCallFilter[],
|
|
150
|
-
handlerOptions?: HandlerOptions<MoveFetchConfig,
|
|
150
|
+
handlerOptions?: HandlerOptions<MoveFetchConfig, T>
|
|
151
151
|
): IotaBaseProcessor {
|
|
152
152
|
let _filters: FunctionNameAndCallFilter[] = []
|
|
153
153
|
const _fetchConfig = MoveFetchConfig.fromPartial({ ...DEFAULT_FETCH_CONFIG, ...handlerOptions })
|
|
@@ -198,7 +198,7 @@ export class IotaBaseProcessor {
|
|
|
198
198
|
|
|
199
199
|
// TODO maybe do in parallel
|
|
200
200
|
const decoded = await processor.coder.decodeFunctionPayload(call, programmableTx?.inputs || [])
|
|
201
|
-
await handler(decoded, ctx)
|
|
201
|
+
await handler(decoded as T, ctx)
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
204
|
return ctx.stopAndGetResult()
|
|
@@ -213,7 +213,7 @@ export class IotaBaseProcessor {
|
|
|
213
213
|
const calls: MoveCallIotaTransaction[] = getMoveCalls(tx)
|
|
214
214
|
// For simplicity, use the first call for partitioning
|
|
215
215
|
if (calls.length > 0) {
|
|
216
|
-
return p(calls[0])
|
|
216
|
+
return p(calls[0] as T)
|
|
217
217
|
}
|
|
218
218
|
return undefined
|
|
219
219
|
}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export * from './spl-token-processor.js'
|
|
1
|
+
export * from './spl-token-processor.js'
|
|
2
|
+
export * from './spl-token-2022-processor.js'
|
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
import { SPLTokenProcessor } from './spl-token-processor.js'
|
|
2
|
+
import { SolanaBindOptions, SolanaContext, SolanaFetchConfig } from '../index.js'
|
|
3
|
+
import { Instruction } from '@anchor-lang/core'
|
|
4
|
+
import {
|
|
5
|
+
ApplyPendingConfidentialTransferBalance,
|
|
6
|
+
ApproveConfidentialTransferAccount,
|
|
7
|
+
ConfidentialTransfer,
|
|
8
|
+
ConfidentialTransferCreditsToggle,
|
|
9
|
+
ConfidentialTransferWithFee,
|
|
10
|
+
ConfigureConfidentialAccountWithRegistry,
|
|
11
|
+
ConfigureConfidentialTransferAccount,
|
|
12
|
+
DepositConfidentialTransfer,
|
|
13
|
+
EmitTokenMetadataInfo,
|
|
14
|
+
EmptyConfidentialTransferAccount,
|
|
15
|
+
InitializeConfidentialTransferMint,
|
|
16
|
+
InitializeGroupMemberPointerInfo,
|
|
17
|
+
InitializeGroupPointerInfo,
|
|
18
|
+
InitializeMetadataPointerInfo,
|
|
19
|
+
InitializeMint2,
|
|
20
|
+
InitializeNonTransferableMint,
|
|
21
|
+
InitializePermanentDelegate,
|
|
22
|
+
InitializeTokenGroupInfo,
|
|
23
|
+
InitializeTokenGroupMemberInfo,
|
|
24
|
+
InitializeTokenMetadataInfo,
|
|
25
|
+
RemoveTokenMetadataKeyInfo,
|
|
26
|
+
UpdateConfidentialTransferMint,
|
|
27
|
+
UpdateGroupMemberPointerInfo,
|
|
28
|
+
UpdateGroupPointerInfo,
|
|
29
|
+
UpdateMetadataPointerInfo,
|
|
30
|
+
UpdateTokenGroupMaxSizeInfo,
|
|
31
|
+
UpdateTokenGroupUpdateAuthorityInfo,
|
|
32
|
+
UpdateTokenMetadataAuthorityInfo,
|
|
33
|
+
UpdateTokenMetadataFieldInfo,
|
|
34
|
+
UpdateTokenMetadataUpdateAuthorityInfo,
|
|
35
|
+
WithdrawConfidentialTransfer,
|
|
36
|
+
WithdrawExcessLamports,
|
|
37
|
+
} from './types.js'
|
|
38
|
+
import { HandlerOptions } from '../../core/handler-options.js'
|
|
39
|
+
|
|
40
|
+
export const SPL_TOKEN_2022_PROGRAM_ID = 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'
|
|
41
|
+
|
|
42
|
+
// Mirrors SPL Token RPC `jsonParsed` decoding of the Token-2022 program. Inherits all
|
|
43
|
+
// instructions shared with the legacy SPL Token program (transfer, mintTo, burn, etc.)
|
|
44
|
+
// from SPLTokenProcessor; this subclass adds handlers for Token-2022-only instructions.
|
|
45
|
+
export class SPLToken2022Processor extends SPLTokenProcessor {
|
|
46
|
+
static bind(options: SolanaBindOptions): SPLToken2022Processor {
|
|
47
|
+
if (options && !options.name) {
|
|
48
|
+
options.name = 'SPL Token 2022 Program'
|
|
49
|
+
}
|
|
50
|
+
return new SPLToken2022Processor(options)
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
private addHandler<T>(
|
|
54
|
+
instructionName: string,
|
|
55
|
+
handler: (data: T, ctx: SolanaContext) => void,
|
|
56
|
+
handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>
|
|
57
|
+
): this {
|
|
58
|
+
this.onInstruction(
|
|
59
|
+
instructionName,
|
|
60
|
+
(ins, ctx) => {
|
|
61
|
+
if (ins) {
|
|
62
|
+
handler(ins.data as T, ctx)
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
handlerOptions
|
|
66
|
+
)
|
|
67
|
+
return this
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
public onInitializeMint2(
|
|
71
|
+
handler: (data: InitializeMint2, ctx: SolanaContext) => void,
|
|
72
|
+
handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>
|
|
73
|
+
) {
|
|
74
|
+
return this.addHandler('initializeMint2', handler, handlerOptions)
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
public onInitializeNonTransferableMint(
|
|
78
|
+
handler: (data: InitializeNonTransferableMint, ctx: SolanaContext) => void,
|
|
79
|
+
handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>
|
|
80
|
+
) {
|
|
81
|
+
return this.addHandler('initializeNonTransferableMint', handler, handlerOptions)
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
public onInitializePermanentDelegate(
|
|
85
|
+
handler: (data: InitializePermanentDelegate, ctx: SolanaContext) => void,
|
|
86
|
+
handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>
|
|
87
|
+
) {
|
|
88
|
+
return this.addHandler('initializePermanentDelegate', handler, handlerOptions)
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
public onWithdrawExcessLamports(
|
|
92
|
+
handler: (data: WithdrawExcessLamports, ctx: SolanaContext) => void,
|
|
93
|
+
handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>
|
|
94
|
+
) {
|
|
95
|
+
return this.addHandler('withdrawExcessLamports', handler, handlerOptions)
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// Metadata Pointer
|
|
99
|
+
|
|
100
|
+
public onInitializeMetadataPointer(
|
|
101
|
+
handler: (data: InitializeMetadataPointerInfo, ctx: SolanaContext) => void,
|
|
102
|
+
handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>
|
|
103
|
+
) {
|
|
104
|
+
return this.addHandler('initializeMetadataPointer', handler, handlerOptions)
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
public onUpdateMetadataPointer(
|
|
108
|
+
handler: (data: UpdateMetadataPointerInfo, ctx: SolanaContext) => void,
|
|
109
|
+
handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>
|
|
110
|
+
) {
|
|
111
|
+
return this.addHandler('updateMetadataPointer', handler, handlerOptions)
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// Group Pointer
|
|
115
|
+
|
|
116
|
+
public onInitializeGroupPointer(
|
|
117
|
+
handler: (data: InitializeGroupPointerInfo, ctx: SolanaContext) => void,
|
|
118
|
+
handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>
|
|
119
|
+
) {
|
|
120
|
+
return this.addHandler('initializeGroupPointer', handler, handlerOptions)
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
public onUpdateGroupPointer(
|
|
124
|
+
handler: (data: UpdateGroupPointerInfo, ctx: SolanaContext) => void,
|
|
125
|
+
handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>
|
|
126
|
+
) {
|
|
127
|
+
return this.addHandler('updateGroupPointer', handler, handlerOptions)
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
public onInitializeGroupMemberPointer(
|
|
131
|
+
handler: (data: InitializeGroupMemberPointerInfo, ctx: SolanaContext) => void,
|
|
132
|
+
handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>
|
|
133
|
+
) {
|
|
134
|
+
return this.addHandler('initializeGroupMemberPointer', handler, handlerOptions)
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
public onUpdateGroupMemberPointer(
|
|
138
|
+
handler: (data: UpdateGroupMemberPointerInfo, ctx: SolanaContext) => void,
|
|
139
|
+
handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>
|
|
140
|
+
) {
|
|
141
|
+
return this.addHandler('updateGroupMemberPointer', handler, handlerOptions)
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// Token Group
|
|
145
|
+
|
|
146
|
+
public onInitializeTokenGroup(
|
|
147
|
+
handler: (data: InitializeTokenGroupInfo, ctx: SolanaContext) => void,
|
|
148
|
+
handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>
|
|
149
|
+
) {
|
|
150
|
+
return this.addHandler('initializeTokenGroup', handler, handlerOptions)
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
public onUpdateTokenGroupMaxSize(
|
|
154
|
+
handler: (data: UpdateTokenGroupMaxSizeInfo, ctx: SolanaContext) => void,
|
|
155
|
+
handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>
|
|
156
|
+
) {
|
|
157
|
+
return this.addHandler('updateTokenGroupMaxSize', handler, handlerOptions)
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
public onUpdateTokenGroupUpdateAuthority(
|
|
161
|
+
handler: (data: UpdateTokenGroupUpdateAuthorityInfo, ctx: SolanaContext) => void,
|
|
162
|
+
handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>
|
|
163
|
+
) {
|
|
164
|
+
return this.addHandler('updateTokenGroupUpdateAuthority', handler, handlerOptions)
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
public onInitializeTokenGroupMember(
|
|
168
|
+
handler: (data: InitializeTokenGroupMemberInfo, ctx: SolanaContext) => void,
|
|
169
|
+
handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>
|
|
170
|
+
) {
|
|
171
|
+
return this.addHandler('initializeTokenGroupMember', handler, handlerOptions)
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
// Token Metadata
|
|
175
|
+
|
|
176
|
+
public onInitializeTokenMetadata(
|
|
177
|
+
handler: (data: InitializeTokenMetadataInfo, ctx: SolanaContext) => void,
|
|
178
|
+
handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>
|
|
179
|
+
) {
|
|
180
|
+
return this.addHandler('initializeTokenMetadata', handler, handlerOptions)
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
public onUpdateTokenMetadataField(
|
|
184
|
+
handler: (data: UpdateTokenMetadataFieldInfo, ctx: SolanaContext) => void,
|
|
185
|
+
handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>
|
|
186
|
+
) {
|
|
187
|
+
return this.addHandler('updateTokenMetadataField', handler, handlerOptions)
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
public onRemoveTokenMetadataKey(
|
|
191
|
+
handler: (data: RemoveTokenMetadataKeyInfo, ctx: SolanaContext) => void,
|
|
192
|
+
handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>
|
|
193
|
+
) {
|
|
194
|
+
return this.addHandler('removeTokenMetadataKey', handler, handlerOptions)
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
public onUpdateTokenMetadataAuthority(
|
|
198
|
+
handler: (data: UpdateTokenMetadataAuthorityInfo, ctx: SolanaContext) => void,
|
|
199
|
+
handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>
|
|
200
|
+
) {
|
|
201
|
+
return this.addHandler('updateTokenMetadataAuthority', handler, handlerOptions)
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
public onUpdateTokenMetadataUpdateAuthority(
|
|
205
|
+
handler: (data: UpdateTokenMetadataUpdateAuthorityInfo, ctx: SolanaContext) => void,
|
|
206
|
+
handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>
|
|
207
|
+
) {
|
|
208
|
+
return this.addHandler('updateTokenMetadataUpdateAuthority', handler, handlerOptions)
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
public onEmitTokenMetadata(
|
|
212
|
+
handler: (data: EmitTokenMetadataInfo, ctx: SolanaContext) => void,
|
|
213
|
+
handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>
|
|
214
|
+
) {
|
|
215
|
+
return this.addHandler('emitTokenMetadata', handler, handlerOptions)
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
// Confidential Transfer
|
|
219
|
+
|
|
220
|
+
public onInitializeConfidentialTransferMint(
|
|
221
|
+
handler: (data: InitializeConfidentialTransferMint, ctx: SolanaContext) => void,
|
|
222
|
+
handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>
|
|
223
|
+
) {
|
|
224
|
+
return this.addHandler('initializeConfidentialTransferMint', handler, handlerOptions)
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
public onUpdateConfidentialTransferMint(
|
|
228
|
+
handler: (data: UpdateConfidentialTransferMint, ctx: SolanaContext) => void,
|
|
229
|
+
handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>
|
|
230
|
+
) {
|
|
231
|
+
return this.addHandler('updateConfidentialTransferMint', handler, handlerOptions)
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
public onConfigureConfidentialTransferAccount(
|
|
235
|
+
handler: (data: ConfigureConfidentialTransferAccount, ctx: SolanaContext) => void,
|
|
236
|
+
handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>
|
|
237
|
+
) {
|
|
238
|
+
return this.addHandler('configureConfidentialTransferAccount', handler, handlerOptions)
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
public onApproveConfidentialTransferAccount(
|
|
242
|
+
handler: (data: ApproveConfidentialTransferAccount, ctx: SolanaContext) => void,
|
|
243
|
+
handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>
|
|
244
|
+
) {
|
|
245
|
+
return this.addHandler('approveConfidentialTransferAccount', handler, handlerOptions)
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
public onEmptyConfidentialTransferAccount(
|
|
249
|
+
handler: (data: EmptyConfidentialTransferAccount, ctx: SolanaContext) => void,
|
|
250
|
+
handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>
|
|
251
|
+
) {
|
|
252
|
+
return this.addHandler('emptyConfidentialTransferAccount', handler, handlerOptions)
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
public onDepositConfidentialTransfer(
|
|
256
|
+
handler: (data: DepositConfidentialTransfer, ctx: SolanaContext) => void,
|
|
257
|
+
handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>
|
|
258
|
+
) {
|
|
259
|
+
return this.addHandler('depositConfidentialTransfer', handler, handlerOptions)
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
public onWithdrawConfidentialTransfer(
|
|
263
|
+
handler: (data: WithdrawConfidentialTransfer, ctx: SolanaContext) => void,
|
|
264
|
+
handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>
|
|
265
|
+
) {
|
|
266
|
+
return this.addHandler('withdrawConfidentialTransfer', handler, handlerOptions)
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
public onConfidentialTransfer(
|
|
270
|
+
handler: (data: ConfidentialTransfer, ctx: SolanaContext) => void,
|
|
271
|
+
handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>
|
|
272
|
+
) {
|
|
273
|
+
return this.addHandler('confidentialTransfer', handler, handlerOptions)
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
public onConfidentialTransferWithFee(
|
|
277
|
+
handler: (data: ConfidentialTransferWithFee, ctx: SolanaContext) => void,
|
|
278
|
+
handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>
|
|
279
|
+
) {
|
|
280
|
+
return this.addHandler('confidentialTransferWithFee', handler, handlerOptions)
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
public onApplyPendingConfidentialTransferBalance(
|
|
284
|
+
handler: (data: ApplyPendingConfidentialTransferBalance, ctx: SolanaContext) => void,
|
|
285
|
+
handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>
|
|
286
|
+
) {
|
|
287
|
+
return this.addHandler('applyPendingConfidentialTransferBalance', handler, handlerOptions)
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
public onEnableConfidentialTransferConfidentialCredits(
|
|
291
|
+
handler: (data: ConfidentialTransferCreditsToggle, ctx: SolanaContext) => void,
|
|
292
|
+
handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>
|
|
293
|
+
) {
|
|
294
|
+
return this.addHandler('enableConfidentialTransferConfidentialCredits', handler, handlerOptions)
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
public onDisableConfidentialTransferConfidentialCredits(
|
|
298
|
+
handler: (data: ConfidentialTransferCreditsToggle, ctx: SolanaContext) => void,
|
|
299
|
+
handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>
|
|
300
|
+
) {
|
|
301
|
+
return this.addHandler('disableConfidentialTransferConfidentialCredits', handler, handlerOptions)
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
public onEnableConfidentialTransferNonConfidentialCredits(
|
|
305
|
+
handler: (data: ConfidentialTransferCreditsToggle, ctx: SolanaContext) => void,
|
|
306
|
+
handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>
|
|
307
|
+
) {
|
|
308
|
+
return this.addHandler('enableConfidentialTransferNonConfidentialCredits', handler, handlerOptions)
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
public onDisableConfidentialTransferNonConfidentialCredits(
|
|
312
|
+
handler: (data: ConfidentialTransferCreditsToggle, ctx: SolanaContext) => void,
|
|
313
|
+
handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>
|
|
314
|
+
) {
|
|
315
|
+
return this.addHandler('disableConfidentialTransferNonConfidentialCredits', handler, handlerOptions)
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
public onConfigureConfidentialAccountWithRegistry(
|
|
319
|
+
handler: (data: ConfigureConfidentialAccountWithRegistry, ctx: SolanaContext) => void,
|
|
320
|
+
handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>
|
|
321
|
+
) {
|
|
322
|
+
return this.addHandler('configureConfidentialAccountWithRegistry', handler, handlerOptions)
|
|
323
|
+
}
|
|
324
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SolanaBaseProcessor, SolanaContext, SolanaBindOptions, SolanaFetchConfig } from "../index.js"
|
|
2
|
-
import { Instruction } from '@
|
|
2
|
+
import { Instruction } from '@anchor-lang/core'
|
|
3
3
|
import { AmountToUiAmount, Approve, ApproveChecked, Burn, BurnChecked, CloseAccount, CreateNativeMint, DefaultAccountStateExtension, FreezeAccount, GetAccountDataSize, InitializeAccount, InitializeAccount2, InitializeAccount3, InitializeImmutableOwner, InitializeMint, InitializeMintCloseAuthority, InitializeMultisig, MemoTransferExtension, MintTo, MintToChecked, Reallocate, Revoke, SyncNative, ThawAccount, Transfer, TransferChecked, TransferFeeExtension, UiAmountToAmount } from './types.js';
|
|
4
4
|
import { HandlerOptions } from '../../core/handler-options.js'
|
|
5
5
|
|
|
@@ -27,7 +27,7 @@ export class SPLTokenProcessor extends SolanaBaseProcessor {
|
|
|
27
27
|
public onInitializeMint(
|
|
28
28
|
handler: (data: InitializeMint, ctx: SolanaContext) => void,
|
|
29
29
|
handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>
|
|
30
|
-
):
|
|
30
|
+
): this {
|
|
31
31
|
this.onInstruction('initializeMint', (ins: Instruction, ctx) => {
|
|
32
32
|
if (ins) {
|
|
33
33
|
handler(ins.data as InitializeMint, ctx)
|
|
@@ -39,7 +39,7 @@ export class SPLTokenProcessor extends SolanaBaseProcessor {
|
|
|
39
39
|
public onInitializeAccount(
|
|
40
40
|
handler: (data: InitializeAccount, ctx: SolanaContext) => void,
|
|
41
41
|
handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>
|
|
42
|
-
):
|
|
42
|
+
): this {
|
|
43
43
|
this.onInstruction('initializeAccount', (ins: Instruction, ctx) => {
|
|
44
44
|
if (ins) {
|
|
45
45
|
handler(ins.data as InitializeAccount, ctx)
|
|
@@ -51,7 +51,7 @@ export class SPLTokenProcessor extends SolanaBaseProcessor {
|
|
|
51
51
|
public onInitializeAccount2(
|
|
52
52
|
handler: (data: InitializeAccount2, ctx: SolanaContext) => void,
|
|
53
53
|
handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>
|
|
54
|
-
):
|
|
54
|
+
): this {
|
|
55
55
|
this.onInstruction('initializeAccount2', (ins: Instruction, ctx) => {
|
|
56
56
|
if (ins) {
|
|
57
57
|
handler(ins.data as InitializeAccount2, ctx)
|
|
@@ -63,7 +63,7 @@ export class SPLTokenProcessor extends SolanaBaseProcessor {
|
|
|
63
63
|
public onInitializeAccount3(
|
|
64
64
|
handler: (data: InitializeAccount3, ctx: SolanaContext) => void,
|
|
65
65
|
handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>
|
|
66
|
-
):
|
|
66
|
+
): this {
|
|
67
67
|
this.onInstruction('initializeAccount3', (ins: Instruction, ctx) => {
|
|
68
68
|
if (ins) {
|
|
69
69
|
handler(ins.data as InitializeAccount3, ctx)
|
|
@@ -75,7 +75,7 @@ export class SPLTokenProcessor extends SolanaBaseProcessor {
|
|
|
75
75
|
public onInitializeMultisig(
|
|
76
76
|
handler: (data: InitializeMultisig, ctx: SolanaContext) => void,
|
|
77
77
|
handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>
|
|
78
|
-
):
|
|
78
|
+
): this {
|
|
79
79
|
this.onInstruction('initializeMultisig', (ins: Instruction, ctx) => {
|
|
80
80
|
if (ins) {
|
|
81
81
|
handler(ins.data as InitializeMultisig, ctx)
|
|
@@ -87,7 +87,7 @@ export class SPLTokenProcessor extends SolanaBaseProcessor {
|
|
|
87
87
|
public onTransfer(
|
|
88
88
|
handler: (data: Transfer, ctx: SolanaContext) => void,
|
|
89
89
|
handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>
|
|
90
|
-
):
|
|
90
|
+
): this {
|
|
91
91
|
this.onInstruction('transfer', (ins: Instruction, ctx) => {
|
|
92
92
|
if (ins) {
|
|
93
93
|
handler(ins.data as Transfer, ctx)
|
|
@@ -99,7 +99,7 @@ export class SPLTokenProcessor extends SolanaBaseProcessor {
|
|
|
99
99
|
public onApprove(
|
|
100
100
|
handler: (data: Approve, ctx: SolanaContext) => void,
|
|
101
101
|
handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>
|
|
102
|
-
):
|
|
102
|
+
): this {
|
|
103
103
|
this.onInstruction('approve', (ins: Instruction, ctx) => {
|
|
104
104
|
if (ins) {
|
|
105
105
|
handler(ins.data as Approve, ctx)
|
|
@@ -111,7 +111,7 @@ export class SPLTokenProcessor extends SolanaBaseProcessor {
|
|
|
111
111
|
public onRevoke(
|
|
112
112
|
handler: (data: Revoke, ctx: SolanaContext) => void,
|
|
113
113
|
handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>
|
|
114
|
-
):
|
|
114
|
+
): this {
|
|
115
115
|
this.onInstruction('revoke', (ins: Instruction, ctx) => {
|
|
116
116
|
if (ins) {
|
|
117
117
|
handler(ins.data as Revoke, ctx)
|
|
@@ -123,7 +123,7 @@ export class SPLTokenProcessor extends SolanaBaseProcessor {
|
|
|
123
123
|
public onSetAuthority(
|
|
124
124
|
handler: (data: any, ctx: SolanaContext) => void,
|
|
125
125
|
handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>
|
|
126
|
-
):
|
|
126
|
+
): this {
|
|
127
127
|
this.onInstruction('setAuthority', (ins: Instruction, ctx) => {
|
|
128
128
|
if (ins) {
|
|
129
129
|
handler(ins.data as any, ctx)
|
|
@@ -135,7 +135,7 @@ export class SPLTokenProcessor extends SolanaBaseProcessor {
|
|
|
135
135
|
public onMintTo(
|
|
136
136
|
handler: (data: MintTo, ctx: SolanaContext) => void,
|
|
137
137
|
handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>
|
|
138
|
-
):
|
|
138
|
+
): this {
|
|
139
139
|
this.onInstruction('mintTo', (ins: Instruction, ctx) => {
|
|
140
140
|
if (ins) {
|
|
141
141
|
handler(ins.data as MintTo, ctx)
|
|
@@ -147,7 +147,7 @@ export class SPLTokenProcessor extends SolanaBaseProcessor {
|
|
|
147
147
|
public onBurn(
|
|
148
148
|
handler: (data: Burn, ctx: SolanaContext) => void,
|
|
149
149
|
handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>
|
|
150
|
-
):
|
|
150
|
+
): this {
|
|
151
151
|
this.onInstruction('burn', (ins: Instruction, ctx) => {
|
|
152
152
|
if (ins) {
|
|
153
153
|
handler(ins.data as Burn, ctx)
|
|
@@ -159,7 +159,7 @@ export class SPLTokenProcessor extends SolanaBaseProcessor {
|
|
|
159
159
|
public onCloseAccount(
|
|
160
160
|
handler: (data: CloseAccount, ctx: SolanaContext) => void,
|
|
161
161
|
handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>
|
|
162
|
-
):
|
|
162
|
+
): this {
|
|
163
163
|
this.onInstruction('closeAccount', (ins: Instruction, ctx) => {
|
|
164
164
|
if (ins) {
|
|
165
165
|
handler(ins.data as CloseAccount, ctx)
|
|
@@ -171,7 +171,7 @@ export class SPLTokenProcessor extends SolanaBaseProcessor {
|
|
|
171
171
|
public onFreezeAccount(
|
|
172
172
|
handler: (data: FreezeAccount, ctx: SolanaContext) => void,
|
|
173
173
|
handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>
|
|
174
|
-
):
|
|
174
|
+
): this {
|
|
175
175
|
this.onInstruction('freezeAccount', (ins: Instruction, ctx) => {
|
|
176
176
|
if (ins) {
|
|
177
177
|
handler(ins.data as FreezeAccount, ctx)
|
|
@@ -183,7 +183,7 @@ export class SPLTokenProcessor extends SolanaBaseProcessor {
|
|
|
183
183
|
public onThawAccount(
|
|
184
184
|
handler: (data: ThawAccount, ctx: SolanaContext) => void,
|
|
185
185
|
handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>
|
|
186
|
-
):
|
|
186
|
+
): this {
|
|
187
187
|
this.onInstruction('thawAccount', (ins: Instruction, ctx) => {
|
|
188
188
|
if (ins) {
|
|
189
189
|
handler(ins.data as ThawAccount, ctx)
|
|
@@ -195,7 +195,7 @@ export class SPLTokenProcessor extends SolanaBaseProcessor {
|
|
|
195
195
|
public onTransferChecked(
|
|
196
196
|
handler: (data: TransferChecked, ctx: SolanaContext) => void,
|
|
197
197
|
handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>
|
|
198
|
-
):
|
|
198
|
+
): this {
|
|
199
199
|
this.onInstruction('transferChecked', (ins: Instruction, ctx) => {
|
|
200
200
|
if (ins) {
|
|
201
201
|
handler(ins.data as TransferChecked, ctx)
|
|
@@ -207,7 +207,7 @@ export class SPLTokenProcessor extends SolanaBaseProcessor {
|
|
|
207
207
|
public onApproveChecked(
|
|
208
208
|
handler: (data: ApproveChecked, ctx: SolanaContext) => void,
|
|
209
209
|
handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>
|
|
210
|
-
):
|
|
210
|
+
): this {
|
|
211
211
|
this.onInstruction('approveChecked', (ins: Instruction, ctx) => {
|
|
212
212
|
if (ins) {
|
|
213
213
|
handler(ins.data as ApproveChecked, ctx)
|
|
@@ -219,7 +219,7 @@ export class SPLTokenProcessor extends SolanaBaseProcessor {
|
|
|
219
219
|
public onMintToChecked(
|
|
220
220
|
handler: (data: MintToChecked, ctx: SolanaContext) => void,
|
|
221
221
|
handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>
|
|
222
|
-
):
|
|
222
|
+
): this {
|
|
223
223
|
this.onInstruction('mintToChecked', (ins: Instruction, ctx) => {
|
|
224
224
|
if (ins) {
|
|
225
225
|
handler(ins.data as MintToChecked, ctx)
|
|
@@ -231,7 +231,7 @@ export class SPLTokenProcessor extends SolanaBaseProcessor {
|
|
|
231
231
|
public onBurnChecked(
|
|
232
232
|
handler: (data: BurnChecked, ctx: SolanaContext) => void,
|
|
233
233
|
handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>
|
|
234
|
-
):
|
|
234
|
+
): this {
|
|
235
235
|
this.onInstruction('burnChecked', (ins: Instruction, ctx) => {
|
|
236
236
|
if (ins) {
|
|
237
237
|
handler(ins.data as BurnChecked, ctx)
|
|
@@ -243,7 +243,7 @@ export class SPLTokenProcessor extends SolanaBaseProcessor {
|
|
|
243
243
|
public onSyncNative(
|
|
244
244
|
handler: (data: SyncNative, ctx: SolanaContext) => void,
|
|
245
245
|
handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>
|
|
246
|
-
):
|
|
246
|
+
): this {
|
|
247
247
|
this.onInstruction('syncNative', (ins: Instruction, ctx) => {
|
|
248
248
|
if (ins) {
|
|
249
249
|
handler(ins.data as SyncNative, ctx)
|
|
@@ -255,7 +255,7 @@ export class SPLTokenProcessor extends SolanaBaseProcessor {
|
|
|
255
255
|
public onGetAccountDataSize(
|
|
256
256
|
handler: (data: GetAccountDataSize, ctx: SolanaContext) => void,
|
|
257
257
|
handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>
|
|
258
|
-
):
|
|
258
|
+
): this {
|
|
259
259
|
this.onInstruction('getAccountDataSize', (ins: Instruction, ctx) => {
|
|
260
260
|
if (ins) {
|
|
261
261
|
handler(ins.data as GetAccountDataSize, ctx)
|
|
@@ -267,7 +267,7 @@ export class SPLTokenProcessor extends SolanaBaseProcessor {
|
|
|
267
267
|
public onInitializeImmutableOwner(
|
|
268
268
|
handler: (data: InitializeImmutableOwner, ctx: SolanaContext) => void,
|
|
269
269
|
handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>
|
|
270
|
-
):
|
|
270
|
+
): this {
|
|
271
271
|
this.onInstruction('initializeImmutableOwner', (ins: Instruction, ctx) => {
|
|
272
272
|
if (ins) {
|
|
273
273
|
handler(ins.data as InitializeImmutableOwner, ctx)
|
|
@@ -279,7 +279,7 @@ export class SPLTokenProcessor extends SolanaBaseProcessor {
|
|
|
279
279
|
public onAmountToUiAmount(
|
|
280
280
|
handler: (data: AmountToUiAmount, ctx: SolanaContext) => void,
|
|
281
281
|
handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>
|
|
282
|
-
):
|
|
282
|
+
): this {
|
|
283
283
|
this.onInstruction('amountToUiAmount', (ins: Instruction, ctx) => {
|
|
284
284
|
if (ins) {
|
|
285
285
|
handler(ins.data as AmountToUiAmount, ctx)
|
|
@@ -291,7 +291,7 @@ export class SPLTokenProcessor extends SolanaBaseProcessor {
|
|
|
291
291
|
public onUiAmountToAmount(
|
|
292
292
|
handler: (data: UiAmountToAmount, ctx: SolanaContext) => void,
|
|
293
293
|
handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>
|
|
294
|
-
):
|
|
294
|
+
): this {
|
|
295
295
|
this.onInstruction('uiAmountToAmount', (ins: Instruction, ctx) => {
|
|
296
296
|
if (ins) {
|
|
297
297
|
handler(ins.data as UiAmountToAmount, ctx)
|
|
@@ -303,7 +303,7 @@ export class SPLTokenProcessor extends SolanaBaseProcessor {
|
|
|
303
303
|
public onInitializeMintCloseAuthority(
|
|
304
304
|
handler: (data: InitializeMintCloseAuthority, ctx: SolanaContext) => void,
|
|
305
305
|
handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>
|
|
306
|
-
):
|
|
306
|
+
): this {
|
|
307
307
|
this.onInstruction('initializeMintCloseAuthority', (ins: Instruction, ctx) => {
|
|
308
308
|
if (ins) {
|
|
309
309
|
handler(ins.data as InitializeMintCloseAuthority, ctx)
|
|
@@ -315,7 +315,7 @@ export class SPLTokenProcessor extends SolanaBaseProcessor {
|
|
|
315
315
|
public onTransferFeeExtension(
|
|
316
316
|
handler: (data: TransferFeeExtension, ctx: SolanaContext) => void,
|
|
317
317
|
handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>
|
|
318
|
-
):
|
|
318
|
+
): this {
|
|
319
319
|
this.onInstruction('transferFeeExtension', (ins: Instruction, ctx) => {
|
|
320
320
|
if (ins) {
|
|
321
321
|
handler(ins.data as TransferFeeExtension, ctx)
|
|
@@ -327,7 +327,7 @@ export class SPLTokenProcessor extends SolanaBaseProcessor {
|
|
|
327
327
|
public onDefaultAccountStateExtension(
|
|
328
328
|
handler: (data: DefaultAccountStateExtension, ctx: SolanaContext) => void,
|
|
329
329
|
handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>
|
|
330
|
-
):
|
|
330
|
+
): this {
|
|
331
331
|
this.onInstruction('defaultAccountStateExtension', (ins: Instruction, ctx) => {
|
|
332
332
|
if (ins) {
|
|
333
333
|
handler(ins.data as DefaultAccountStateExtension, ctx)
|
|
@@ -339,7 +339,7 @@ export class SPLTokenProcessor extends SolanaBaseProcessor {
|
|
|
339
339
|
public onReallocate(
|
|
340
340
|
handler: (data: Reallocate, ctx: SolanaContext) => void,
|
|
341
341
|
handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>
|
|
342
|
-
):
|
|
342
|
+
): this {
|
|
343
343
|
this.onInstruction('reallocate', (ins: Instruction, ctx) => {
|
|
344
344
|
if (ins) {
|
|
345
345
|
handler(ins.data as Reallocate, ctx)
|
|
@@ -351,7 +351,7 @@ export class SPLTokenProcessor extends SolanaBaseProcessor {
|
|
|
351
351
|
public onMemoTransferExtension(
|
|
352
352
|
handler: (data: MemoTransferExtension, ctx: SolanaContext) => void,
|
|
353
353
|
handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>
|
|
354
|
-
):
|
|
354
|
+
): this {
|
|
355
355
|
this.onInstruction('memoTransferExtension', (ins: Instruction, ctx) => {
|
|
356
356
|
if (ins) {
|
|
357
357
|
handler(ins.data as MemoTransferExtension, ctx)
|
|
@@ -363,7 +363,7 @@ export class SPLTokenProcessor extends SolanaBaseProcessor {
|
|
|
363
363
|
public onCreateNativeMint(
|
|
364
364
|
handler: (data: CreateNativeMint, ctx: SolanaContext) => void,
|
|
365
365
|
handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>
|
|
366
|
-
):
|
|
366
|
+
): this {
|
|
367
367
|
this.onInstruction('createNativeMint', (ins: Instruction, ctx) => {
|
|
368
368
|
if (ins) {
|
|
369
369
|
handler(ins.data as CreateNativeMint, ctx)
|