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:537


approvalProgram

readonly approvalProgram: Brand<string, "bytes">

The approval program for the application

Source

types/global.d.ts:513


clearStateProgram

readonly clearStateProgram: Brand<string, "bytes">

The clear state program for the application

Source

types/global.d.ts:516


creator

readonly creator: Address

The creator of this application

Source

types/global.d.ts:534


extraProgramPages

readonly extraProgramPages: uint64

The number of extra program pages

Source

types/global.d.ts:531


globalNumByteSlice

readonly globalNumByteSlice: uint64

The number of reserved byteslices in global state

Source

types/global.d.ts:522


globalNumUint

readonly globalNumUint: uint64

The number of reserved uint64s in global state

Source

types/global.d.ts:519


id

readonly id: uint64

The application index

Source

types/global.d.ts:507


localNumByteSlice

readonly localNumByteSlice: uint64

The number of reserved byteslices in local state

Source

types/global.d.ts:528


localNumUint

readonly localNumUint: uint64

The number of reserved uint64s in local state

Source

types/global.d.ts:525


zeroIndex

static readonly zeroIndex: AppID

Application index 0

Source

types/global.d.ts:510

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:547


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:557


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:504