SPLTokenProcessor
Class in @sentio/sdk/solana/builtin
Defined in @sentio/sdk/solana/builtin
Extends
Extended by
Constructors
Constructor
new SPLTokenProcessor(options: SolanaBindOptions): SPLTokenProcessor;Parameters
| Parameter | Type |
|---|---|
options | SolanaBindOptions |
Returns
SPLTokenProcessor
Inherited from
SolanaBaseProcessor.constructor
Properties
| Property | Modifier | Type | Default value | Overrides | Inherited from |
|---|---|---|---|---|---|
address | public | string | undefined | - | SolanaBaseProcessor.address |
baseLabels? | public | Labels | undefined | - | SolanaBaseProcessor.baseLabels |
blockHandlers | public | SolanaBlockHandlerEntry<any>[] | [] | - | SolanaBaseProcessor.blockHandlers |
config | public | IndexConfigure | undefined | - | SolanaBaseProcessor.config |
contractName | public | string | undefined | - | SolanaBaseProcessor.contractName |
endpoint | public | string | undefined | - | SolanaBaseProcessor.endpoint |
fromParsedInstruction | public | (instruction: object) => Instruction | null | undefined | SolanaBaseProcessor.fromParsedInstruction | - |
instructionCoder | public | InstructionCoder | undefined | - | SolanaBaseProcessor.instructionCoder |
instructionHandlerMap | public | Map<string, InstructionHandlerEntry> | undefined | - | SolanaBaseProcessor.instructionHandlerMap |
network | public | SolanaChainId | undefined | - | SolanaBaseProcessor.network |
processInnerInstruction | public | boolean | undefined | - | SolanaBaseProcessor.processInnerInstruction |
Methods
decodeInstruction()
decodeInstruction(rawInstruction: string): Instruction | null;Parameters
| Parameter | Type |
|---|---|
rawInstruction | string |
Returns
Instruction | null
Inherited from
SolanaBaseProcessor.decodeInstruction
endBlock()
endBlock(endBlock: number | bigint): SPLTokenProcessor;Parameters
| Parameter | Type |
|---|---|
endBlock | number | bigint |
Returns
SPLTokenProcessor
Inherited from
getInstructionHandler()
getInstructionHandler(parsedInstruction: Instruction):
| InstructionHandlerEntry
| undefined;Parameters
| Parameter | Type |
|---|---|
parsedInstruction | Instruction |
Returns
| InstructionHandlerEntry
| undefined
Inherited from
SolanaBaseProcessor.getInstructionHandler
getParsedInstruction()
getParsedInstruction(ins:
| string
| {
info: any;
type: string;
}): Instruction | null;Parameters
| Parameter | Type |
|---|---|
ins | | string | { info: any; type: string; } |
Returns
Instruction | null
Inherited from
SolanaBaseProcessor.getParsedInstruction
getPartitionKey()
getPartitionKey(parsedInstruction: Instruction, handlerEntry: InstructionHandlerEntry): Promise<string | undefined>;Parameters
| Parameter | Type |
|---|---|
parsedInstruction | Instruction |
handlerEntry | InstructionHandlerEntry |
Returns
Promise<string | undefined>
Inherited from
SolanaBaseProcessor.getPartitionKey
handleBlock()
handleBlock(rawBlock: Data_SolBlock, handlerEntry: SolanaBlockHandlerEntry<BlockResponse>): Promise<ProcessResult>;Parameters
| Parameter | Type |
|---|---|
rawBlock | Data_SolBlock |
handlerEntry | SolanaBlockHandlerEntry<BlockResponse> |
Returns
Promise<ProcessResult>
Inherited from
SolanaBaseProcessor.handleBlock
handleInstruction()
handleInstruction(
parsedInstruction: Instruction,
accounts: string[],
handlerEntry: InstructionHandlerEntry,
data: Data_SolInstruction
): Promise<ProcessResult>;Parameters
| Parameter | Type |
|---|---|
parsedInstruction | Instruction |
accounts | string[] |
handlerEntry | InstructionHandlerEntry |
data | Data_SolInstruction |
Returns
Promise<ProcessResult>
Inherited from
SolanaBaseProcessor.handleInstruction
onAmountToUiAmount()
onAmountToUiAmount(handler: (data: object, ctx: SolanaContext) => void, handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>): this;Parameters
| Parameter | Type |
|---|---|
handler | (data: object, ctx: SolanaContext) => void |
handlerOptions? | HandlerOptions<SolanaFetchConfig, Instruction> |
Returns
this
onApprove()
onApprove(handler: (data: object, ctx: SolanaContext) => void, handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>): this;Parameters
| Parameter | Type |
|---|---|
handler | (data: object, ctx: SolanaContext) => void |
handlerOptions? | HandlerOptions<SolanaFetchConfig, Instruction> |
Returns
this
onApproveChecked()
onApproveChecked(handler: (data: object, ctx: SolanaContext) => void, handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>): this;Parameters
| Parameter | Type |
|---|---|
handler | (data: object, ctx: SolanaContext) => void |
handlerOptions? | HandlerOptions<SolanaFetchConfig, Instruction> |
Returns
this
onBlockInterval()
onBlockInterval(
handler: SolanaBlockHandler<BlockResponse>,
blockInterval?: number,
backfillBlockInterval?: number
): this;Parameters
| Parameter | Type | Default value |
|---|---|---|
handler | SolanaBlockHandler<BlockResponse> | undefined |
blockInterval | number | 1000 |
backfillBlockInterval | number | 4000 |
Returns
this
Inherited from
SolanaBaseProcessor.onBlockInterval
onBurn()
onBurn(handler: (data: object, ctx: SolanaContext) => void, handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>): this;Parameters
| Parameter | Type |
|---|---|
handler | (data: object, ctx: SolanaContext) => void |
handlerOptions? | HandlerOptions<SolanaFetchConfig, Instruction> |
Returns
this
onBurnChecked()
onBurnChecked(handler: (data: object, ctx: SolanaContext) => void, handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>): this;Parameters
| Parameter | Type |
|---|---|
handler | (data: object, ctx: SolanaContext) => void |
handlerOptions? | HandlerOptions<SolanaFetchConfig, Instruction> |
Returns
this
onCloseAccount()
onCloseAccount(handler: (data: object, ctx: SolanaContext) => void, handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>): this;Parameters
| Parameter | Type |
|---|---|
handler | (data: object, ctx: SolanaContext) => void |
handlerOptions? | HandlerOptions<SolanaFetchConfig, Instruction> |
Returns
this
onCreateNativeMint()
onCreateNativeMint(handler: (data: object, ctx: SolanaContext) => void, handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>): this;Parameters
| Parameter | Type |
|---|---|
handler | (data: object, ctx: SolanaContext) => void |
handlerOptions? | HandlerOptions<SolanaFetchConfig, Instruction> |
Returns
this
onDefaultAccountStateExtension()
onDefaultAccountStateExtension(handler: (data: object, ctx: SolanaContext) => void, handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>): this;Parameters
| Parameter | Type |
|---|---|
handler | (data: object, ctx: SolanaContext) => void |
handlerOptions? | HandlerOptions<SolanaFetchConfig, Instruction> |
Returns
this
onFreezeAccount()
onFreezeAccount(handler: (data: object, ctx: SolanaContext) => void, handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>): this;Parameters
| Parameter | Type |
|---|---|
handler | (data: object, ctx: SolanaContext) => void |
handlerOptions? | HandlerOptions<SolanaFetchConfig, Instruction> |
Returns
this
onGetAccountDataSize()
onGetAccountDataSize(handler: (data: object, ctx: SolanaContext) => void, handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>): this;Parameters
| Parameter | Type |
|---|---|
handler | (data: object, ctx: SolanaContext) => void |
handlerOptions? | HandlerOptions<SolanaFetchConfig, Instruction> |
Returns
this
onInitializeAccount()
onInitializeAccount(handler: (data: object, ctx: SolanaContext) => void, handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>): this;Parameters
| Parameter | Type |
|---|---|
handler | (data: object, ctx: SolanaContext) => void |
handlerOptions? | HandlerOptions<SolanaFetchConfig, Instruction> |
Returns
this
onInitializeAccount2()
onInitializeAccount2(handler: (data: object, ctx: SolanaContext) => void, handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>): this;Parameters
| Parameter | Type |
|---|---|
handler | (data: object, ctx: SolanaContext) => void |
handlerOptions? | HandlerOptions<SolanaFetchConfig, Instruction> |
Returns
this
onInitializeAccount3()
onInitializeAccount3(handler: (data: object, ctx: SolanaContext) => void, handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>): this;Parameters
| Parameter | Type |
|---|---|
handler | (data: object, ctx: SolanaContext) => void |
handlerOptions? | HandlerOptions<SolanaFetchConfig, Instruction> |
Returns
this
onInitializeImmutableOwner()
onInitializeImmutableOwner(handler: (data: object, ctx: SolanaContext) => void, handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>): this;Parameters
| Parameter | Type |
|---|---|
handler | (data: object, ctx: SolanaContext) => void |
handlerOptions? | HandlerOptions<SolanaFetchConfig, Instruction> |
Returns
this
onInitializeMint()
onInitializeMint(handler: (data: object, ctx: SolanaContext) => void, handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>): this;Parameters
| Parameter | Type |
|---|---|
handler | (data: object, ctx: SolanaContext) => void |
handlerOptions? | HandlerOptions<SolanaFetchConfig, Instruction> |
Returns
this
onInitializeMintCloseAuthority()
onInitializeMintCloseAuthority(handler: (data: object, ctx: SolanaContext) => void, handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>): this;Parameters
| Parameter | Type |
|---|---|
handler | (data: object, ctx: SolanaContext) => void |
handlerOptions? | HandlerOptions<SolanaFetchConfig, Instruction> |
Returns
this
onInitializeMultisig()
onInitializeMultisig(handler: (data: object, ctx: SolanaContext) => void, handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>): this;Parameters
| Parameter | Type |
|---|---|
handler | (data: object, ctx: SolanaContext) => void |
handlerOptions? | HandlerOptions<SolanaFetchConfig, Instruction> |
Returns
this
onInstruction()
onInstruction<T extends Instruction = Instruction>(
instructionName: string,
handler: SolanaInstructionHandler<T>,
handlerOptions?: HandlerOptions<SolanaFetchConfig, T>
): SPLTokenProcessor;Type Parameters
| Type Parameter | Default type |
|---|---|
T extends Instruction | Instruction |
Parameters
| Parameter | Type |
|---|---|
instructionName | string |
handler | SolanaInstructionHandler<T> |
handlerOptions? | HandlerOptions<SolanaFetchConfig, T> |
Returns
SPLTokenProcessor
Inherited from
SolanaBaseProcessor.onInstruction
onInterval()
onInterval<T>(
handler: SolanaBlockHandler<T>,
timeInterval:
| HandleInterval
| undefined,
slotInterval:
| HandleInterval
| undefined
): this;Type Parameters
| Type Parameter |
|---|
T |
Parameters
| Parameter | Type |
|---|---|
handler | SolanaBlockHandler<T> |
timeInterval | | HandleInterval | undefined |
slotInterval | | HandleInterval | undefined |
Returns
this
Inherited from
SolanaBaseProcessor.onInterval
onMemoTransferExtension()
onMemoTransferExtension(handler: (data: object, ctx: SolanaContext) => void, handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>): this;Parameters
| Parameter | Type |
|---|---|
handler | (data: object, ctx: SolanaContext) => void |
handlerOptions? | HandlerOptions<SolanaFetchConfig, Instruction> |
Returns
this
onMintTo()
onMintTo(handler: (data: object, ctx: SolanaContext) => void, handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>): this;Parameters
| Parameter | Type |
|---|---|
handler | (data: object, ctx: SolanaContext) => void |
handlerOptions? | HandlerOptions<SolanaFetchConfig, Instruction> |
Returns
this
onMintToChecked()
onMintToChecked(handler: (data: object, ctx: SolanaContext) => void, handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>): this;Parameters
| Parameter | Type |
|---|---|
handler | (data: object, ctx: SolanaContext) => void |
handlerOptions? | HandlerOptions<SolanaFetchConfig, Instruction> |
Returns
this
onReallocate()
onReallocate(handler: (data: object, ctx: SolanaContext) => void, handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>): this;Parameters
| Parameter | Type |
|---|---|
handler | (data: object, ctx: SolanaContext) => void |
handlerOptions? | HandlerOptions<SolanaFetchConfig, Instruction> |
Returns
this
onRevoke()
onRevoke(handler: (data: object, ctx: SolanaContext) => void, handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>): this;Parameters
| Parameter | Type |
|---|---|
handler | (data: object, ctx: SolanaContext) => void |
handlerOptions? | HandlerOptions<SolanaFetchConfig, Instruction> |
Returns
this
onSetAuthority()
onSetAuthority(handler: (data: any, ctx: SolanaContext) => void, handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>): this;Parameters
| Parameter | Type |
|---|---|
handler | (data: any, ctx: SolanaContext) => void |
handlerOptions? | HandlerOptions<SolanaFetchConfig, Instruction> |
Returns
this
onSyncNative()
onSyncNative(handler: (data: object, ctx: SolanaContext) => void, handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>): this;Parameters
| Parameter | Type |
|---|---|
handler | (data: object, ctx: SolanaContext) => void |
handlerOptions? | HandlerOptions<SolanaFetchConfig, Instruction> |
Returns
this
onThawAccount()
onThawAccount(handler: (data: object, ctx: SolanaContext) => void, handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>): this;Parameters
| Parameter | Type |
|---|---|
handler | (data: object, ctx: SolanaContext) => void |
handlerOptions? | HandlerOptions<SolanaFetchConfig, Instruction> |
Returns
this
onTimeInterval()
onTimeInterval(
handler: SolanaBlockHandler<BlockResponse>,
timeIntervalInMinutes?: number,
backfillTimeIntervalInMinutes?: number
): this;Parameters
| Parameter | Type | Default value |
|---|---|---|
handler | SolanaBlockHandler<BlockResponse> | undefined |
timeIntervalInMinutes | number | 60 |
backfillTimeIntervalInMinutes | number | 240 |
Returns
this
Inherited from
SolanaBaseProcessor.onTimeInterval
onTransfer()
onTransfer(handler: (data: object, ctx: SolanaContext) => void, handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>): this;Parameters
| Parameter | Type |
|---|---|
handler | (data: object, ctx: SolanaContext) => void |
handlerOptions? | HandlerOptions<SolanaFetchConfig, Instruction> |
Returns
this
onTransferChecked()
onTransferChecked(handler: (data: object, ctx: SolanaContext) => void, handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>): this;Parameters
| Parameter | Type |
|---|---|
handler | (data: object, ctx: SolanaContext) => void |
handlerOptions? | HandlerOptions<SolanaFetchConfig, Instruction> |
Returns
this
onTransferFeeExtension()
onTransferFeeExtension(handler: (data: object, ctx: SolanaContext) => void, handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>): this;Parameters
| Parameter | Type |
|---|---|
handler | (data: object, ctx: SolanaContext) => void |
handlerOptions? | HandlerOptions<SolanaFetchConfig, Instruction> |
Returns
this
onUiAmountToAmount()
onUiAmountToAmount(handler: (data: object, ctx: SolanaContext) => void, handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>): this;Parameters
| Parameter | Type |
|---|---|
handler | (data: object, ctx: SolanaContext) => void |
handlerOptions? | HandlerOptions<SolanaFetchConfig, Instruction> |
Returns
this
startSlot()
startSlot(startSlot: number | bigint): SPLTokenProcessor;Parameters
| Parameter | Type |
|---|---|
startSlot | number | bigint |
Returns
SPLTokenProcessor
Inherited from
bind()
static bind(options: SolanaBindOptions): SPLTokenProcessor;For a given function, creates a bound function that has the same body as the original function. The this object of the bound function is associated with the specified object, and has the specified initial parameters.
Parameters
| Parameter | Type |
|---|---|
options | SolanaBindOptions |
Returns
SPLTokenProcessor