Skip to content

AppID

A stateful Algorand application

Extended by

Constructors

new AppID()

new AppID(): AppID

Returns

AppID

Properties

address

readonly address: Address

The contract address for this application

Source

types/global.d.ts:551


approvalProgram

readonly approvalProgram: Brand<string, "bytes">

The approval program for the application

Source

types/global.d.ts:527


clearStateProgram

readonly clearStateProgram: Brand<string, "bytes">

The clear state program for the application

Source

types/global.d.ts:530


creator

readonly creator: Address

The creator of this application

Source

types/global.d.ts:548


extraProgramPages

readonly extraProgramPages: uint64

The number of extra program pages

Source

types/global.d.ts:545


globalNumByteSlice

readonly globalNumByteSlice: uint64

The number of reserved byteslices in global state

Source

types/global.d.ts:536


globalNumUint

readonly globalNumUint: uint64

The number of reserved uint64s in global state

Source

types/global.d.ts:533


id

readonly id: uint64

The application index

Source

types/global.d.ts:521


localNumByteSlice

readonly localNumByteSlice: uint64

The number of reserved byteslices in local state

Source

types/global.d.ts:542


localNumUint

readonly localNumUint: uint64

The number of reserved uint64s in local state

Source

types/global.d.ts:539


zeroIndex

static readonly zeroIndex: AppID

Application index 0

Source

types/global.d.ts:524

Methods

globalState()

globalState(key): unknown

Get the global state value for the given key. MUST use an as expression to specify the value type.

Parameters

key: BytesLike

Returns

unknown

Example

someApp.globalState('someKey') as uint64[];

Source

types/global.d.ts:561


globalStateExists()

globalStateExists(key): boolean

Check if the given key exists in the global state

Parameters

key: BytesLike

Returns

boolean

Source

types/global.d.ts:576


localState()

localState(account, key): unknown

Get the local state value for the given account and key. MUST use an as expression to specify the value type.

Parameters

account: Address

key: BytesLike

Returns

unknown

Example

someApp.localState(this.txn.sender, 'someKey') as uint64[];

Source

types/global.d.ts:571


localStateExists()

localStateExists(account, key): boolean

Check if the given key exists in the local state

Parameters

account: Address

key: BytesLike

Returns

boolean

Source

types/global.d.ts:581


fromUint64()

static fromUint64(appID): AppID

Get an Application instance for the application with the given application index

Parameters

appID: uint64

Returns

AppID

Source

types/global.d.ts:518