SPLTokenProcessor

Class in @sentio/sdk/solana/builtin

Defined in @sentio/sdk/solana/builtin

Extends

Extended by

Constructors

Constructor

new SPLTokenProcessor(options: SolanaBindOptions): SPLTokenProcessor;

Parameters

ParameterType
optionsSolanaBindOptions

Returns

SPLTokenProcessor

Inherited from

SolanaBaseProcessor.constructor

Properties

PropertyModifierTypeDefault valueOverridesInherited from
addresspublicstringundefined-SolanaBaseProcessor.address
baseLabels?publicLabelsundefined-SolanaBaseProcessor.baseLabels
blockHandlerspublicSolanaBlockHandlerEntry<any>[][]-SolanaBaseProcessor.blockHandlers
configpublicIndexConfigureundefined-SolanaBaseProcessor.config
contractNamepublicstringundefined-SolanaBaseProcessor.contractName
endpointpublicstringundefined-SolanaBaseProcessor.endpoint
fromParsedInstructionpublic(instruction: object) => Instruction | nullundefinedSolanaBaseProcessor.fromParsedInstruction-
instructionCoderpublicInstructionCoderundefined-SolanaBaseProcessor.instructionCoder
instructionHandlerMappublicMap<string, InstructionHandlerEntry>undefined-SolanaBaseProcessor.instructionHandlerMap
networkpublicSolanaChainIdundefined-SolanaBaseProcessor.network
processInnerInstructionpublicbooleanundefined-SolanaBaseProcessor.processInnerInstruction

Methods

decodeInstruction()

decodeInstruction(rawInstruction: string): Instruction | null;

Parameters

ParameterType
rawInstructionstring

Returns

Instruction | null

Inherited from

SolanaBaseProcessor.decodeInstruction


endBlock()

endBlock(endBlock: number | bigint): SPLTokenProcessor;

Parameters

ParameterType
endBlocknumber | bigint

Returns

SPLTokenProcessor

Inherited from

SolanaBaseProcessor.endBlock


getInstructionHandler()

getInstructionHandler(parsedInstruction: Instruction): 
  | InstructionHandlerEntry
  | undefined;

Parameters

ParameterType
parsedInstructionInstruction

Returns

| InstructionHandlerEntry | undefined

Inherited from

SolanaBaseProcessor.getInstructionHandler


getParsedInstruction()

getParsedInstruction(ins: 
  | string
  | {
  info: any;
  type: string;
}): Instruction | null;

Parameters

ParameterType
ins| string | { info: any; type: string; }

Returns

Instruction | null

Inherited from

SolanaBaseProcessor.getParsedInstruction


getPartitionKey()

getPartitionKey(parsedInstruction: Instruction, handlerEntry: InstructionHandlerEntry): Promise<string | undefined>;

Parameters

ParameterType
parsedInstructionInstruction
handlerEntryInstructionHandlerEntry

Returns

Promise<string | undefined>

Inherited from

SolanaBaseProcessor.getPartitionKey


handleBlock()

handleBlock(rawBlock: Data_SolBlock, handlerEntry: SolanaBlockHandlerEntry<BlockResponse>): Promise<ProcessResult>;

Parameters

ParameterType
rawBlockData_SolBlock
handlerEntrySolanaBlockHandlerEntry<BlockResponse>

Returns

Promise<ProcessResult>

Inherited from

SolanaBaseProcessor.handleBlock


handleInstruction()

handleInstruction(
   parsedInstruction: Instruction, 
   accounts: string[], 
   handlerEntry: InstructionHandlerEntry, 
   data: Data_SolInstruction
): Promise<ProcessResult>;

Parameters

ParameterType
parsedInstructionInstruction
accountsstring[]
handlerEntryInstructionHandlerEntry
dataData_SolInstruction

Returns

Promise<ProcessResult>

Inherited from

SolanaBaseProcessor.handleInstruction


onAmountToUiAmount()

onAmountToUiAmount(handler: (data: object, ctx: SolanaContext) => void, handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>): this;

Parameters

ParameterType
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

ParameterType
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

ParameterType
handler(data: object, ctx: SolanaContext) => void
handlerOptions?HandlerOptions<SolanaFetchConfig, Instruction>

Returns

this


onBlockInterval()

onBlockInterval(
   handler: SolanaBlockHandler<BlockResponse>, 
   blockInterval?: number, 
   backfillBlockInterval?: number
): this;

Parameters

ParameterTypeDefault value
handlerSolanaBlockHandler<BlockResponse>undefined
blockIntervalnumber1000
backfillBlockIntervalnumber4000

Returns

this

Inherited from

SolanaBaseProcessor.onBlockInterval


onBurn()

onBurn(handler: (data: object, ctx: SolanaContext) => void, handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>): this;

Parameters

ParameterType
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

ParameterType
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

ParameterType
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

ParameterType
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

ParameterType
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

ParameterType
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

ParameterType
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

ParameterType
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

ParameterType
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

ParameterType
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

ParameterType
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

ParameterType
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

ParameterType
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

ParameterType
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 ParameterDefault type
T extends InstructionInstruction

Parameters

ParameterType
instructionNamestring
handlerSolanaInstructionHandler<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

ParameterType
handlerSolanaBlockHandler<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

ParameterType
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

ParameterType
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

ParameterType
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

ParameterType
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

ParameterType
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

ParameterType
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

ParameterType
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

ParameterType
handler(data: object, ctx: SolanaContext) => void
handlerOptions?HandlerOptions<SolanaFetchConfig, Instruction>

Returns

this


onTimeInterval()

onTimeInterval(
   handler: SolanaBlockHandler<BlockResponse>, 
   timeIntervalInMinutes?: number, 
   backfillTimeIntervalInMinutes?: number
): this;

Parameters

ParameterTypeDefault value
handlerSolanaBlockHandler<BlockResponse>undefined
timeIntervalInMinutesnumber60
backfillTimeIntervalInMinutesnumber240

Returns

this

Inherited from

SolanaBaseProcessor.onTimeInterval


onTransfer()

onTransfer(handler: (data: object, ctx: SolanaContext) => void, handlerOptions?: HandlerOptions<SolanaFetchConfig, Instruction>): this;

Parameters

ParameterType
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

ParameterType
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

ParameterType
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

ParameterType
handler(data: object, ctx: SolanaContext) => void
handlerOptions?HandlerOptions<SolanaFetchConfig, Instruction>

Returns

this


startSlot()

startSlot(startSlot: number | bigint): SPLTokenProcessor;

Parameters

ParameterType
startSlotnumber | bigint

Returns

SPLTokenProcessor

Inherited from

SolanaBaseProcessor.startSlot


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

ParameterType
optionsSolanaBindOptions

Returns

SPLTokenProcessor

On this page

ExtendsExtended byConstructorsConstructorParametersReturnsInherited fromPropertiesMethodsdecodeInstruction()ParametersReturnsInherited fromendBlock()ParametersReturnsInherited fromgetInstructionHandler()ParametersReturnsInherited fromgetParsedInstruction()ParametersReturnsInherited fromgetPartitionKey()ParametersReturnsInherited fromhandleBlock()ParametersReturnsInherited fromhandleInstruction()ParametersReturnsInherited fromonAmountToUiAmount()ParametersReturnsonApprove()ParametersReturnsonApproveChecked()ParametersReturnsonBlockInterval()ParametersReturnsInherited fromonBurn()ParametersReturnsonBurnChecked()ParametersReturnsonCloseAccount()ParametersReturnsonCreateNativeMint()ParametersReturnsonDefaultAccountStateExtension()ParametersReturnsonFreezeAccount()ParametersReturnsonGetAccountDataSize()ParametersReturnsonInitializeAccount()ParametersReturnsonInitializeAccount2()ParametersReturnsonInitializeAccount3()ParametersReturnsonInitializeImmutableOwner()ParametersReturnsonInitializeMint()ParametersReturnsonInitializeMintCloseAuthority()ParametersReturnsonInitializeMultisig()ParametersReturnsonInstruction()Type ParametersParametersReturnsInherited fromonInterval()Type ParametersParametersReturnsInherited fromonMemoTransferExtension()ParametersReturnsonMintTo()ParametersReturnsonMintToChecked()ParametersReturnsonReallocate()ParametersReturnsonRevoke()ParametersReturnsonSetAuthority()ParametersReturnsonSyncNative()ParametersReturnsonThawAccount()ParametersReturnsonTimeInterval()ParametersReturnsInherited fromonTransfer()ParametersReturnsonTransferChecked()ParametersReturnsonTransferFeeExtension()ParametersReturnsonUiAmountToAmount()ParametersReturnsstartSlot()ParametersReturnsInherited frombind()ParametersReturns