@algorandfoundation/algokit-utils 9.2.1 → 9.2.2-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/account/account.d.ts +28 -23
- package/account/get-account-config-from-environment.d.ts +2 -7
- package/account/get-account.d.ts +12 -14
- package/account/get-dispenser-account.d.ts +5 -9
- package/account/index.d.ts +5 -0
- package/account/mnemonic-account.d.ts +3 -7
- package/amount.d.ts +35 -40
- package/app-client.d.ts +6 -10
- package/app-deploy.d.ts +23 -25
- package/app.d.ts +46 -45
- package/asset.d.ts +12 -16
- package/config.d.ts +2 -7
- package/debugging/debugging.d.ts +1 -5
- package/debugging/index.d.ts +1 -0
- package/dispenser-client.d.ts +2 -7
- package/index.d.ts +18 -27
- package/indexer-lookup.d.ts +11 -18
- package/localnet/get-kmd-wallet-account.d.ts +7 -9
- package/localnet/get-localnet-dispenser-account.d.ts +5 -7
- package/localnet/get-or-create-kmd-wallet-account.d.ts +8 -10
- package/localnet/index.d.ts +4 -0
- package/localnet/is-localnet.d.ts +3 -7
- package/network-client.d.ts +15 -17
- package/package.json +1 -1
- package/testing/_asset.d.ts +3 -0
- package/testing/account.d.ts +9 -11
- package/testing/fixtures/algokit-log-capture-fixture.d.ts +2 -7
- package/testing/fixtures/algorand-fixture.d.ts +4 -9
- package/testing/fixtures/index.d.ts +2 -0
- package/testing/index.d.ts +5 -7
- package/testing/indexer.d.ts +1 -5
- package/testing/test-logger.d.ts +36 -41
- package/testing/transaction-logger.d.ts +27 -30
- package/transaction/index.d.ts +2 -0
- package/transaction/legacy-bridge.d.ts +35 -0
- package/transaction/perform-atomic-transaction-composer-simulate.d.ts +5 -7
- package/transaction/resolve-signed-transactions.d.ts +16 -0
- package/transaction/transaction.d.ts +35 -34
- package/transfer/index.d.ts +2 -0
- package/transfer/transfer-algos.d.ts +5 -9
- package/transfer/transfer.d.ts +8 -11
- package/types/account-manager.d.ts +429 -432
- package/types/account.d.ts +202 -192
- package/types/algo-http-client-with-retry.d.ts +10 -15
- package/types/algorand-client-transaction-creator.d.ts +771 -778
- package/types/algorand-client-transaction-sender.d.ts +1085 -1090
- package/types/algorand-client.d.ts +236 -239
- package/types/amount.d.ts +43 -47
- package/types/app-arc56.d.ts +272 -235
- package/types/app-client.d.ts +1151 -1128
- package/types/app-deployer.d.ts +141 -139
- package/types/app-factory.d.ts +783 -762
- package/types/app-manager.d.ts +310 -304
- package/types/app-spec.d.ts +117 -118
- package/types/app.d.ts +241 -229
- package/types/asset-manager.d.ts +199 -204
- package/types/asset.d.ts +91 -95
- package/types/async-event-emitter.d.ts +13 -18
- package/types/client-manager.d.ts +451 -453
- package/types/composer.d.ts +1257 -1210
- package/types/config.d.ts +48 -53
- package/types/debugging.d.ts +23 -25
- package/types/dispenser-client.d.ts +52 -57
- package/types/expand.d.ts +3 -5
- package/types/indexer.d.ts +66 -70
- package/types/instance-of.d.ts +3 -5
- package/types/kmd-account-manager.d.ts +70 -75
- package/types/lifecycle-events.d.ts +8 -13
- package/types/logging.d.ts +11 -15
- package/types/logic-error.d.ts +29 -33
- package/types/network-client.d.ts +27 -32
- package/types/testing.d.ts +132 -131
- package/types/transaction.d.ts +110 -110
- package/types/transfer.d.ts +66 -70
- package/util.d.ts +48 -0
package/types/app-spec.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import algosdk from 'algosdk';
|
|
2
|
+
import { Arc56Contract } from './app-arc56';
|
|
3
|
+
import ABIContractParams = algosdk.ABIContractParams;
|
|
4
|
+
import ABIMethodParams = algosdk.ABIMethodParams;
|
|
5
5
|
/**
|
|
6
6
|
* Converts an ARC-32 Application Specification to an ARC-56 Contract
|
|
7
7
|
* @param appSpec The ARC-32 Application Specification
|
|
@@ -11,30 +11,30 @@ import algosdk from "algosdk";
|
|
|
11
11
|
* const arc56AppSpec = arc32ToArc56(arc32AppSpec)
|
|
12
12
|
* ```
|
|
13
13
|
*/
|
|
14
|
-
declare function arc32ToArc56(appSpec: AppSpec): Arc56Contract;
|
|
14
|
+
export declare function arc32ToArc56(appSpec: AppSpec): Arc56Contract;
|
|
15
15
|
/** An ARC-0032 Application Specification see https://github.com/algorandfoundation/ARCs/pull/150 */
|
|
16
|
-
interface AppSpec {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
16
|
+
export interface AppSpec {
|
|
17
|
+
/** Method call hints */
|
|
18
|
+
hints: HintSpec;
|
|
19
|
+
/** The TEAL source */
|
|
20
|
+
source: AppSources;
|
|
21
|
+
/** The ABI-0004 contract definition see https://github.com/algorandfoundation/ARCs/blob/main/ARCs/arc-0004.md */
|
|
22
|
+
contract: ABIContractParams;
|
|
23
|
+
/** The values that make up the local and global state */
|
|
24
|
+
schema: SchemaSpec;
|
|
25
|
+
/** The rolled-up schema allocation values for local and global state */
|
|
26
|
+
state: StateSchemaSpec;
|
|
27
|
+
/** The config of all BARE calls (i.e. non ABI calls with no args) */
|
|
28
|
+
bare_call_config: CallConfig;
|
|
29
29
|
}
|
|
30
30
|
/** A lookup of encoded method call spec to hint */
|
|
31
|
-
type HintSpec = Record<string, Hint>;
|
|
31
|
+
export type HintSpec = Record<string, Hint>;
|
|
32
32
|
/** The TEAL source of a contract */
|
|
33
|
-
interface AppSources {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
export interface AppSources {
|
|
34
|
+
/** The TEAL source of the approval program */
|
|
35
|
+
approval: string;
|
|
36
|
+
/** The TEAL source of the clear program */
|
|
37
|
+
clear: string;
|
|
38
38
|
}
|
|
39
39
|
/** The various call configs:
|
|
40
40
|
* * `NEVER`: Will not be called
|
|
@@ -42,126 +42,125 @@ interface AppSources {
|
|
|
42
42
|
* * `CREATE`: Can be called during a create call i.e. app id = 0
|
|
43
43
|
* * `ALL`: Can be during a create OR non-create call
|
|
44
44
|
**/
|
|
45
|
-
type CallConfigValue = 'NEVER' | 'CALL' | 'CREATE' | 'ALL';
|
|
45
|
+
export type CallConfigValue = 'NEVER' | 'CALL' | 'CREATE' | 'ALL';
|
|
46
46
|
/** Call configuration for a method */
|
|
47
|
-
interface CallConfig {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
47
|
+
export interface CallConfig {
|
|
48
|
+
/** NoOp call config */
|
|
49
|
+
no_op?: CallConfigValue;
|
|
50
|
+
/** Opt-in call config */
|
|
51
|
+
opt_in?: CallConfigValue;
|
|
52
|
+
/** Close out call config */
|
|
53
|
+
close_out?: CallConfigValue;
|
|
54
|
+
/** Update call config */
|
|
55
|
+
update_application?: CallConfigValue;
|
|
56
|
+
/** Delete call config */
|
|
57
|
+
delete_application?: CallConfigValue;
|
|
58
58
|
}
|
|
59
59
|
/** Hint information for a given method call to allow client generation */
|
|
60
|
-
interface Hint {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
60
|
+
export interface Hint {
|
|
61
|
+
/** Any user-defined struct/tuple types used in the method call, keyed by parameter name or `output` for return type */
|
|
62
|
+
structs?: Record<string, Struct>;
|
|
63
|
+
read_only?: boolean;
|
|
64
|
+
default_arguments?: Record<string, DefaultArgument>;
|
|
65
|
+
call_config: CallConfig;
|
|
66
66
|
}
|
|
67
67
|
/** The name of a field */
|
|
68
|
-
type FieldName = string;
|
|
68
|
+
export type FieldName = string;
|
|
69
69
|
/** The string name of an ABI type */
|
|
70
|
-
type ABIType = string;
|
|
70
|
+
export type ABIType = string;
|
|
71
71
|
/** The elements of the struct/tuple: `FieldName`, `ABIType` */
|
|
72
|
-
type StructElement = [FieldName, ABIType];
|
|
72
|
+
export type StructElement = [FieldName, ABIType];
|
|
73
73
|
/** A user-defined struct/tuple type */
|
|
74
|
-
interface Struct {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
74
|
+
export interface Struct {
|
|
75
|
+
/** The name of the type */
|
|
76
|
+
name: string;
|
|
77
|
+
/** The elements (in order) that make up the struct/tuple */
|
|
78
|
+
elements: StructElement[];
|
|
79
79
|
}
|
|
80
80
|
/**
|
|
81
81
|
* Defines a strategy for obtaining a default value for a given ABI arg.
|
|
82
82
|
*/
|
|
83
|
-
type DefaultArgument = {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
83
|
+
export type DefaultArgument = {
|
|
84
|
+
/**
|
|
85
|
+
* The default value should be fetched by invoking an ABI method
|
|
86
|
+
*/
|
|
87
|
+
source: 'abi-method';
|
|
88
|
+
data: ABIMethodParams;
|
|
89
89
|
} | {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
90
|
+
/**
|
|
91
|
+
* The default value should be fetched from global state
|
|
92
|
+
*/
|
|
93
|
+
source: 'global-state';
|
|
94
|
+
/**
|
|
95
|
+
* The key of the state variable
|
|
96
|
+
*/
|
|
97
|
+
data: string;
|
|
98
98
|
} | {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
99
|
+
/**
|
|
100
|
+
* The default value should be fetched from the local state of the sender user
|
|
101
|
+
*/
|
|
102
|
+
source: 'local-state';
|
|
103
|
+
/**
|
|
104
|
+
* The key of the state variable
|
|
105
|
+
*/
|
|
106
|
+
data: string;
|
|
107
107
|
} | {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
108
|
+
/**
|
|
109
|
+
* The default value is a constant.
|
|
110
|
+
*/
|
|
111
|
+
source: 'constant';
|
|
112
|
+
/**
|
|
113
|
+
* The static default value to use.
|
|
114
|
+
*/
|
|
115
|
+
data: string | number;
|
|
116
116
|
};
|
|
117
117
|
/** AVM data type */
|
|
118
|
-
type AVMType = 'uint64' | 'bytes';
|
|
118
|
+
export type AVMType = 'uint64' | 'bytes';
|
|
119
119
|
/** Declared schema value specification */
|
|
120
|
-
interface DeclaredSchemaValueSpec {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
120
|
+
export interface DeclaredSchemaValueSpec {
|
|
121
|
+
/** The type of value */
|
|
122
|
+
type: AVMType;
|
|
123
|
+
/** The name of the key */
|
|
124
|
+
key: string;
|
|
125
|
+
/** A description of the variable */
|
|
126
|
+
descr?: string;
|
|
127
|
+
/** Whether or not the value is set statically (at create time only) or dynamically */
|
|
128
|
+
static?: boolean;
|
|
129
129
|
}
|
|
130
130
|
/** Reserved schema value specification */
|
|
131
|
-
interface ReservedSchemaValueSpec {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
131
|
+
export interface ReservedSchemaValueSpec {
|
|
132
|
+
/** The type of value */
|
|
133
|
+
type: AVMType;
|
|
134
|
+
/** The description of the reserved storage space */
|
|
135
|
+
descr: string;
|
|
136
|
+
/** The maximum number of slots to reserve */
|
|
137
|
+
max_keys: number;
|
|
138
138
|
}
|
|
139
139
|
/** The schema for global and local storage */
|
|
140
|
-
interface SchemaSpec {
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
140
|
+
export interface SchemaSpec {
|
|
141
|
+
/** The local storage schema */
|
|
142
|
+
local: Schema;
|
|
143
|
+
/** The global storage schema */
|
|
144
|
+
global: Schema;
|
|
145
145
|
}
|
|
146
146
|
/** The storage schema definition */
|
|
147
|
-
interface Schema {
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
147
|
+
export interface Schema {
|
|
148
|
+
/** Declared storage schema */
|
|
149
|
+
declared: Record<string, DeclaredSchemaValueSpec>;
|
|
150
|
+
/** Reserved storage schema */
|
|
151
|
+
reserved: Record<string, ReservedSchemaValueSpec>;
|
|
152
152
|
}
|
|
153
153
|
/** The rolled-up schema allocation specification for local and global state */
|
|
154
|
-
interface StateSchemaSpec {
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
154
|
+
export interface StateSchemaSpec {
|
|
155
|
+
/** Global storage spec */
|
|
156
|
+
global: StateSchema;
|
|
157
|
+
/** Local storage spec */
|
|
158
|
+
local: StateSchema;
|
|
159
159
|
}
|
|
160
160
|
/** Schema spec summary for global or local storage */
|
|
161
|
-
type StateSchema = {
|
|
162
|
-
|
|
163
|
-
|
|
161
|
+
export type StateSchema = {
|
|
162
|
+
/** Number of uint slots */
|
|
163
|
+
num_uints: number;
|
|
164
|
+
/** Number of byte slots */
|
|
165
|
+
num_byte_slices: number;
|
|
164
166
|
};
|
|
165
|
-
//#endregion
|
|
166
|
-
export { ABIType, AVMType, AppSources, AppSpec, CallConfig, CallConfigValue, DeclaredSchemaValueSpec, DefaultArgument, FieldName, Hint, HintSpec, ReservedSchemaValueSpec, Schema, SchemaSpec, StateSchema, StateSchemaSpec, Struct, StructElement, arc32ToArc56 };
|
|
167
|
-
//# sourceMappingURL=app-spec.d.ts.map
|