SolanaGlobalProcessor
Class in @sentio/sdk/solana
Defined in @sentio/sdk/solana
Extends
Constructors
Constructor
new SolanaGlobalProcessor(options: SolanaBindOptions): SolanaGlobalProcessor;Parameters
| Parameter | Type |
|---|---|
options | SolanaBindOptions |
Returns
SolanaGlobalProcessor
Overrides
SolanaBaseProcessor.constructor
Properties
| Property | Modifier | Type | Default value | 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): SolanaGlobalProcessor;Parameters
| Parameter | Type |
|---|---|
endBlock | number | bigint |
Returns
SolanaGlobalProcessor
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
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
onInstruction()
onInstruction<T extends Instruction = Instruction>(
instructionName: string,
handler: SolanaInstructionHandler<T>,
handlerOptions?: HandlerOptions<SolanaFetchConfig, T>
): SolanaGlobalProcessor;Type Parameters
| Type Parameter | Default type |
|---|---|
T extends Instruction | Instruction |
Parameters
| Parameter | Type |
|---|---|
instructionName | string |
handler | SolanaInstructionHandler<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
| Parameter | Type |
|---|---|
handler | SolanaBlockHandler<T> |
timeInterval | | HandleInterval | undefined |
slotInterval | | HandleInterval | undefined |
Returns
this
Inherited from
SolanaBaseProcessor.onInterval
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
startSlot()
startSlot(startSlot: number | bigint): SolanaGlobalProcessor;Parameters
| Parameter | Type |
|---|---|
startSlot | number | bigint |
Returns
SolanaGlobalProcessor
Inherited from
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
| Parameter | Type |
|---|---|
options | Omit<SolanaBindOptions, "address"> |
Returns
SolanaGlobalProcessor