Algorand TypeScript
    Preparing search index...

    Variable AppLocalConst

    AppLocal: {
        delete(a: uint64 | Account, b: bytes): void;
        getBytes(a: uint64 | Account, b: bytes): bytes;
        getExBytes(
            a: uint64 | Account,
            b: uint64 | Application,
            c: bytes,
        ): readonly [bytes, boolean];
        getExUint64(
            a: uint64 | Account,
            b: uint64 | Application,
            c: bytes,
        ): readonly [uint64, boolean];
        getUint64(a: uint64 | Account, b: bytes): uint64;
        put(a: uint64 | Account, b: bytes, c: uint64 | bytes): void;
    } = ...

    Get or modify Local app state

    Type declaration

    • delete: function
      • delete key B from account A's local state of the current application

        Parameters

        • a: uint64 | Account

          Txn.Accounts offset (or, since v4, an available account address), state key. Deleting a key which is already absent has no effect on the application local state. (In particular, it does not cause the program to fail.)

        • b: bytes

        Returns void

        Native TEAL opcode: app_local_del Min AVM version: 2

    • getBytes: function
      • local state of the key B in the current application in account A

        Parameters

        • a: uint64 | Account

          Txn.Accounts offset (or, since v4, an available account address), state key.

        • b: bytes

        Returns bytes

        value. The value is zero (of type uint64) if the key does not exist.

        Native TEAL opcode: app_local_get Min AVM version: 2

    • getExBytes: function
      • X is the local state of application B, key C in account A. Y is 1 if key existed, else 0

        Parameters

        • a: uint64 | Account

          Txn.Accounts offset (or, since v4, an available account address), available application id (or, since v4, a Txn.ForeignApps offset), state key.

        • b: uint64 | Application
        • c: bytes

        Returns readonly [bytes, boolean]

        did_exist flag (top of the stack, 1 if the application and key existed and 0 otherwise), value. The value is zero (of type uint64) if the key does not exist.

        Native TEAL opcode: app_local_get_ex Min AVM version: 2

    • getExUint64: function
      • X is the local state of application B, key C in account A. Y is 1 if key existed, else 0

        Parameters

        • a: uint64 | Account

          Txn.Accounts offset (or, since v4, an available account address), available application id (or, since v4, a Txn.ForeignApps offset), state key.

        • b: uint64 | Application
        • c: bytes

        Returns readonly [uint64, boolean]

        did_exist flag (top of the stack, 1 if the application and key existed and 0 otherwise), value. The value is zero (of type uint64) if the key does not exist.

        Native TEAL opcode: app_local_get_ex Min AVM version: 2

    • getUint64: function
      • local state of the key B in the current application in account A

        Parameters

        • a: uint64 | Account

          Txn.Accounts offset (or, since v4, an available account address), state key.

        • b: bytes

        Returns uint64

        value. The value is zero (of type uint64) if the key does not exist.

        Native TEAL opcode: app_local_get Min AVM version: 2

    • put: function