Skip to content

types/app-spec

@algorandfoundation/algokit-utils / types/app-spec

Table of contents

Interfaces

Type Aliases

Functions

Type Aliases

ABIType

Ƭ ABIType: string

The string name of an ABI type

Defined in

src/types/app-spec.ts:212


AVMType

Ƭ AVMType: "uint64" | "bytes"

AVM data type

Defined in

src/types/app-spec.ts:268


CallConfigValue

Ƭ CallConfigValue: "NEVER" | "CALL" | "CREATE" | "ALL"

The various call configs:

  • NEVER: Will not be called
  • CALL: Can be called during a non-create call i.e. app id != 0
  • CREATE: Can be called during a create call i.e. app id = 0
  • ALL: Can be during a create OR non-create call

Defined in

src/types/app-spec.ts:183


DefaultArgument

Ƭ DefaultArgument: { data: ABIMethodParams ; source: "abi-method" } | { data: string ; source: "global-state" } | { data: string ; source: "local-state" } | { data: string | number ; source: "constant" }

Defines a strategy for obtaining a default value for a given ABI arg.

Defined in

src/types/app-spec.ts:228


FieldName

Ƭ FieldName: string

The name of a field

Defined in

src/types/app-spec.ts:209


HintSpec

Ƭ HintSpec: Record<string, Hint>

A lookup of encoded method call spec to hint

Defined in

src/types/app-spec.ts:167


StateSchema

Ƭ StateSchema: Object

Schema spec summary for global or local storage

Type declaration

NameTypeDescription
num_byte_slicesnumberNumber of byte slots
num_uintsnumberNumber of uint slots

Defined in

src/types/app-spec.ts:317


StructElement

Ƭ StructElement: [FieldName, ABIType]

The elements of the struct/tuple: FieldName, ABIType

Defined in

src/types/app-spec.ts:215

Functions

arc32ToArc56

arc32ToArc56(appSpec): Arc56Contract

Converts an ARC-32 Application Specification to an ARC-56 Contract

Parameters

NameTypeDescription
appSpecAppSpecThe ARC-32 Application Specification

Returns

Arc56Contract

The ARC-56 Contract

Example

const arc56AppSpec = arc32ToArc56(arc32AppSpec);

Defined in

src/types/app-spec.ts:16