From abc8c8546a2b346f7d341a742ca8ec7d06c9686c Mon Sep 17 00:00:00 2001 From: Negar Abbasi Date: Fri, 12 Jul 2024 12:51:45 +1000 Subject: [PATCH] fix: state delta types --- src/types/indexer.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/types/indexer.ts b/src/types/indexer.ts index f945ddfc..33074255 100644 --- a/src/types/indexer.ts +++ b/src/types/indexer.ts @@ -194,9 +194,9 @@ export interface TransactionResult extends Record { */ lease?: string /** [ld] Local state key/value changes for the application being executed by this transaction. */ - 'local-state-delta'?: LocalStateDelta[] + 'local-state-delta'?: AccountStateDelta[] /** [gd] Global state key/value changes for the application being executed by this transaction. */ - 'global-state-delta'?: GlobalStateDelta[] + 'global-state-delta'?: StateDelta /** [rr] rewards applied to receiver account. */ 'receiver-rewards'?: number /** [rs] rewards applied to sender account. */ @@ -631,18 +631,18 @@ export interface MultisigTransactionSubSignature { signature?: string } -export interface GlobalStateDelta { +export interface EvalDeltaKeyValue { key: string value: EvalDelta } -export interface LocalStateDelta { + +export interface AccountStateDelta { address: string - delta: { - key: string - value: EvalDelta - }[] + delta: StateDelta } +export type StateDelta = EvalDeltaKeyValue[] + /** Represents a TEAL value delta. https://developer.algorand.org/docs/rest-apis/indexer/#evaldelta */ export interface EvalDelta { /** [at] delta action. */