@@ -28,9 +28,9 @@ import type {
2828import type { InferenceStaking } from "./idl" ;
2929import { getIdlWithProgramId , IDL } from "./idl" ;
3030import type {
31- InferenceStakingErrors ,
31+ InferenceStakingErrorName ,
3232 DecodedStakingProgramInstruction ,
33- InferenceStakingInstructions ,
33+ InferenceStakingInstructionName ,
3434 InstructionAccountsMap ,
3535 OperatorPoolAccountStruct ,
3636 PoolOverviewAccountStruct ,
@@ -506,7 +506,7 @@ export class InferenceStakingProgramSdk {
506506
507507 static getErrorNameFromTransactionLogs (
508508 logs : string [ ]
509- ) : InferenceStakingErrors | undefined {
509+ ) : InferenceStakingErrorName | undefined {
510510 for ( const log of logs ) {
511511 const errorName = IDL . errors . find (
512512 ( e ) =>
@@ -522,7 +522,7 @@ export class InferenceStakingProgramSdk {
522522
523523 static getErrorNameFromTransactionError (
524524 error : unknown
525- ) : InferenceStakingErrors | undefined {
525+ ) : InferenceStakingErrorName | undefined {
526526 if ( error instanceof AnchorError ) {
527527 const { errorMessage, errorCode } = error . error ;
528528 const errorName = IDL . errors . find (
@@ -538,15 +538,15 @@ export class InferenceStakingProgramSdk {
538538 }
539539
540540 static getErrorMsgFromErrorName (
541- errorName : InferenceStakingErrors | undefined
541+ errorName : InferenceStakingErrorName | undefined
542542 ) : string | undefined {
543543 const error = IDL . errors . find ( ( e ) => e . name === errorName ) ;
544544 return error ?. msg ;
545545 }
546546
547547 static getProgramErrorFromTransactionError (
548548 error : unknown
549- ) : InferenceStakingErrors | undefined {
549+ ) : InferenceStakingErrorName | undefined {
550550 const message = error instanceof Error ? error . message : null ;
551551 if ( message == null ) {
552552 return undefined ;
@@ -655,10 +655,10 @@ export class InferenceStakingProgramSdk {
655655 throw new Error ( "Failed to decode instruction" ) ;
656656 }
657657
658- const name = decodedIx . name as InferenceStakingInstructions ;
658+ const name = decodedIx . name as InferenceStakingInstructionName ;
659659
660660 const { args } =
661- decodedIx . data as RawInstructionArgsMap [ InferenceStakingInstructions ] ;
661+ decodedIx . data as RawInstructionArgsMap [ InferenceStakingInstructionName ] ;
662662
663663 const accountsMeta : AccountMeta [ ] = instruction . accounts . map (
664664 ( idx ) => {
@@ -679,7 +679,7 @@ export class InferenceStakingProgramSdk {
679679 accountsMeta
680680 ) ;
681681
682- const accounts : InstructionAccountsMap < InferenceStakingInstructions > =
682+ const accounts : InstructionAccountsMap < InferenceStakingInstructionName > =
683683 { } ;
684684
685685 for ( const account of decodedAccounts ?. accounts ?? [ ] ) {
0 commit comments