diff --git a/rpc/types.go b/rpc/types.go index e00d44c6..6673620e 100644 --- a/rpc/types.go +++ b/rpc/types.go @@ -234,7 +234,24 @@ type InnerInstruction struct { Index uint16 `json:"index"` // Ordered list of inner program instructions that were invoked during a single transaction instruction. - Instructions []solana.CompiledInstruction `json:"instructions"` + Instructions []CompiledInstruction `json:"instructions"` +} + +type CompiledInstruction struct { + // Index into the message.accountKeys array indicating the program account that executes this instruction. + // NOTE: it is actually a uint8, but using a uint16 because uint8 is treated as a byte everywhere, + // and that can be an issue. + ProgramIDIndex uint16 `json:"programIdIndex"` + + // List of ordered indices into the message.accountKeys array indicating which accounts to pass to the program. + // NOTE: it is actually a []uint8, but using a uint16 because []uint8 is treated as a []byte everywhere, + // and that can be an issue. + Accounts []uint16 `json:"accounts"` + + // The program input data encoded in a base-58 string. + Data solana.Base58 `json:"data"` + + StackHeight uint16 `json:"stackHeight"` } // Ok interface{} `json:"Ok"` // Transaction was successful