types/app-spec
@algorandfoundation/algokit-utils / types/app-spec
Table of contents
Section titled “Table of contents”Interfaces
Section titled “Interfaces”- AppSources
- AppSpec
- CallConfig
- DeclaredSchemaValueSpec
- Hint
- ReservedSchemaValueSpec
- Schema
- SchemaSpec
- StateSchemaSpec
- Struct
Type Aliases
Section titled “Type Aliases”Functions
Section titled “Functions”Type Aliases
Section titled “Type Aliases”ABIType
Section titled “ABIType”Ƭ ABIType: string
The string name of an ABI type
Defined in
Section titled “Defined in”AVMType
Section titled “AVMType”Ƭ AVMType: "uint64" | "bytes"
AVM data type
Defined in
Section titled “Defined in”CallConfigValue
Section titled “CallConfigValue”Ƭ CallConfigValue: "NEVER" | "CALL" | "CREATE" | "ALL"
The various call configs:
NEVER: Will not be calledCALL: Can be called during a non-create call i.e. app id != 0CREATE: Can be called during a create call i.e. app id = 0ALL: Can be during a create OR non-create call
Defined in
Section titled “Defined in”DefaultArgument
Section titled “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
Section titled “Defined in”FieldName
Section titled “FieldName”Ƭ FieldName: string
The name of a field
Defined in
Section titled “Defined in”HintSpec
Section titled “HintSpec”Ƭ HintSpec: Record<string, Hint>
A lookup of encoded method call spec to hint
Defined in
Section titled “Defined in”StateSchema
Section titled “StateSchema”Ƭ StateSchema: Object
Schema spec summary for global or local storage
Type declaration
Section titled “Type declaration”| Name | Type | Description |
|---|---|---|
num_byte_slices | number | Number of byte slots |
num_uints | number | Number of uint slots |
Defined in
Section titled “Defined in”StructElement
Section titled “StructElement”Ƭ StructElement: [FieldName, ABIType]
The elements of the struct/tuple: FieldName, ABIType
Defined in
Section titled “Defined in”Functions
Section titled “Functions”arc32ToArc56
Section titled “arc32ToArc56”▸ arc32ToArc56(appSpec): Arc56Contract
Converts an ARC-32 Application Specification to an ARC-56 Contract
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
appSpec | AppSpec | The ARC-32 Application Specification |
Returns
Section titled “Returns”The ARC-56 Contract
Example
const arc56AppSpec = arc32ToArc56(arc32AppSpec);