types/app-spec
@algorandfoundation/algokit-utils / types/app-spec
Table of contents
Interfaces
- AppSources
- AppSpec
- CallConfig
- DeclaredSchemaValueSpec
- Hint
- ReservedSchemaValueSpec
- Schema
- SchemaSpec
- StateSchemaSpec
- Struct
Type Aliases
Functions
Type Aliases
ABIType
Ƭ ABIType: string
The string name of an ABI type
Defined in
AVMType
Ƭ AVMType: "uint64"
| "bytes"
AVM data type
Defined in
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
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
FieldName
Ƭ FieldName: string
The name of a field
Defined in
HintSpec
Ƭ HintSpec: Record
<string
, Hint
>
A lookup of encoded method call spec to hint
Defined in
StateSchema
Ƭ StateSchema: Object
Schema spec summary for global or local storage
Type declaration
Name | Type | Description |
---|---|---|
num_byte_slices | number | Number of byte slots |
num_uints | number | Number of uint slots |
Defined in
StructElement
Ƭ StructElement: [FieldName
, ABIType
]
The elements of the struct/tuple: FieldName
, ABIType
Defined in
Functions
arc32ToArc56
▸ arc32ToArc56(appSpec
): Arc56Contract
Converts an ARC-32 Application Specification to an ARC-56 Contract
Parameters
Name | Type | Description |
---|---|---|
appSpec | AppSpec | The ARC-32 Application Specification |
Returns
The ARC-56 Contract
Example
const arc56AppSpec = arc32ToArc56(arc32AppSpec);