AppLocal
Algorand TypeScript / op / AppLocal
constAppLocal:object
Defined in: op.ts:255
Get or modify Local app state
Type declaration
Section titled “Type declaration”delete()
Section titled “delete()”delete(
a,b):void
delete key B from account A’s local state of the current application
Parameters
Section titled “Parameters”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.)
Returns
Section titled “Returns”void
Native TEAL opcode: app_local_del
Min AVM version: 2
getBytes()
Section titled “getBytes()”getBytes(
a,b):bytes
local state of the key B in the current application in account A
Parameters
Section titled “Parameters”Txn.Accounts offset (or, since v4, an available account address), state key.
Returns
Section titled “Returns”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()
Section titled “getExBytes()”getExBytes(
a,b,c): readonly [bytes,boolean]
X is the local state of application B, key C in account A. Y is 1 if key existed, else 0
Parameters
Section titled “Parameters”Txn.Accounts offset (or, since v4, an available account address), available application id (or, since v4, a Txn.ForeignApps offset), state key.
Returns
Section titled “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()
Section titled “getExUint64()”getExUint64(
a,b,c): readonly [uint64,boolean]
X is the local state of application B, key C in account A. Y is 1 if key existed, else 0
Parameters
Section titled “Parameters”Txn.Accounts offset (or, since v4, an available account address), available application id (or, since v4, a Txn.ForeignApps offset), state key.
Returns
Section titled “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()
Section titled “getUint64()”getUint64(
a,b):uint64
local state of the key B in the current application in account A
Parameters
Section titled “Parameters”Txn.Accounts offset (or, since v4, an available account address), state key.
Returns
Section titled “Returns”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(
a,b,c):void
write C to key B in account A’s local state of the current application
Parameters
Section titled “Parameters”Txn.Accounts offset (or, since v4, an available account address), state key, value.
Returns
Section titled “Returns”void
Native TEAL opcode: app_local_put
Min AVM version: 2