SolanaBaseProcessor

Class in @sentio/sdk/solana

Defined in @sentio/sdk/solana

Extended by

Constructors

Constructor

new SolanaBaseProcessor(options: SolanaBindOptions): SolanaBaseProcessor;

Parameters

ParameterType
optionsSolanaBindOptions

Returns

SolanaBaseProcessor

Properties

PropertyModifierTypeDefault value
addresspublicstringundefined
baseLabels?publicLabelsundefined
blockHandlerspublicSolanaBlockHandlerEntry<any>[][]
configpublicIndexConfigureundefined
contractNamepublicstringundefined
endpointpublicstringundefined
fromParsedInstructionpublic(instruction: object) => Instruction | nullundefined
instructionCoderpublicInstructionCoderundefined
instructionHandlerMappublicMap<string, InstructionHandlerEntry>undefined
networkpublicSolanaChainIdundefined
processInnerInstructionpublicbooleanundefined

Methods

decodeInstruction()

decodeInstruction(rawInstruction: string): Instruction | null;

Parameters

ParameterType
rawInstructionstring

Returns

Instruction | null


endBlock()

endBlock(endBlock: number | bigint): SolanaBaseProcessor;

Parameters

ParameterType
endBlocknumber | bigint

Returns

SolanaBaseProcessor


getInstructionHandler()

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

Parameters

ParameterType
parsedInstructionInstruction

Returns

| InstructionHandlerEntry | undefined


getParsedInstruction()

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

Parameters

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

Returns

Instruction | null


getPartitionKey()

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

Parameters

ParameterType
parsedInstructionInstruction
handlerEntryInstructionHandlerEntry

Returns

Promise<string | undefined>


handleBlock()

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

Parameters

ParameterType
rawBlockData_SolBlock
handlerEntrySolanaBlockHandlerEntry<BlockResponse>

Returns

Promise<ProcessResult>


handleInstruction()

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

Parameters

ParameterType
parsedInstructionInstruction
accountsstring[]
handlerEntryInstructionHandlerEntry
dataData_SolInstruction

Returns

Promise<ProcessResult>


onBlockInterval()

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

Parameters

ParameterTypeDefault value
handlerSolanaBlockHandler<BlockResponse>undefined
blockIntervalnumber1000
backfillBlockIntervalnumber4000

Returns

this


onInstruction()

onInstruction<T extends Instruction = Instruction>(
   instructionName: string, 
   handler: SolanaInstructionHandler<T>, 
   handlerOptions?: HandlerOptions<SolanaFetchConfig, T>
): SolanaBaseProcessor;

Type Parameters

Type ParameterDefault type
T extends InstructionInstruction

Parameters

ParameterType
instructionNamestring
handlerSolanaInstructionHandler<T>
handlerOptions?HandlerOptions<SolanaFetchConfig, T>

Returns

SolanaBaseProcessor


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


onTimeInterval()

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

Parameters

ParameterTypeDefault value
handlerSolanaBlockHandler<BlockResponse>undefined
timeIntervalInMinutesnumber60
backfillTimeIntervalInMinutesnumber240

Returns

this


startSlot()

startSlot(startSlot: number | bigint): SolanaBaseProcessor;

Parameters

ParameterType
startSlotnumber | bigint

Returns

SolanaBaseProcessor

On this page