SolanaGlobalProcessor

Class in @sentio/sdk/solana

Defined in @sentio/sdk/solana

Extends

Constructors

Constructor

new SolanaGlobalProcessor(options: SolanaBindOptions): SolanaGlobalProcessor;

Parameters

ParameterType
optionsSolanaBindOptions

Returns

SolanaGlobalProcessor

Overrides

SolanaBaseProcessor.constructor

Properties

PropertyModifierTypeDefault valueInherited from
addresspublicstringundefinedSolanaBaseProcessor.address
baseLabels?publicLabelsundefinedSolanaBaseProcessor.baseLabels
blockHandlerspublicSolanaBlockHandlerEntry<any>[][]SolanaBaseProcessor.blockHandlers
configpublicIndexConfigureundefinedSolanaBaseProcessor.config
contractNamepublicstringundefinedSolanaBaseProcessor.contractName
endpointpublicstringundefinedSolanaBaseProcessor.endpoint
fromParsedInstructionpublic(instruction: object) => Instruction | nullundefinedSolanaBaseProcessor.fromParsedInstruction
instructionCoderpublicInstructionCoderundefinedSolanaBaseProcessor.instructionCoder
instructionHandlerMappublicMap<string, InstructionHandlerEntry>undefinedSolanaBaseProcessor.instructionHandlerMap
networkpublicSolanaChainIdundefinedSolanaBaseProcessor.network
processInnerInstructionpublicbooleanundefinedSolanaBaseProcessor.processInnerInstruction

Methods

decodeInstruction()

decodeInstruction(rawInstruction: string): Instruction | null;

Parameters

ParameterType
rawInstructionstring

Returns

Instruction | null

Inherited from

SolanaBaseProcessor.decodeInstruction


endBlock()

endBlock(endBlock: number | bigint): SolanaGlobalProcessor;

Parameters

ParameterType
endBlocknumber | bigint

Returns

SolanaGlobalProcessor

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


onBlockInterval()

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

Parameters

ParameterTypeDefault value
handlerSolanaBlockHandler<BlockResponse>undefined
blockIntervalnumber1000
backfillBlockIntervalnumber4000

Returns

this

Inherited from

SolanaBaseProcessor.onBlockInterval


onInstruction()

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

Type Parameters

Type ParameterDefault type
T extends InstructionInstruction

Parameters

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

Returns

SolanaGlobalProcessor

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


onTimeInterval()

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

Parameters

ParameterTypeDefault value
handlerSolanaBlockHandler<BlockResponse>undefined
timeIntervalInMinutesnumber60
backfillTimeIntervalInMinutesnumber240

Returns

this

Inherited from

SolanaBaseProcessor.onTimeInterval


startSlot()

startSlot(startSlot: number | bigint): SolanaGlobalProcessor;

Parameters

ParameterType
startSlotnumber | bigint

Returns

SolanaGlobalProcessor

Inherited from

SolanaBaseProcessor.startSlot


bind()

static bind(options: Omit<SolanaBindOptions, "address">): SolanaGlobalProcessor;

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
optionsOmit<SolanaBindOptions, "address">

Returns

SolanaGlobalProcessor

On this page