@algorandfoundation/algokit-utils 9.2.1 → 9.2.2
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/account.d.ts
CHANGED
|
@@ -1,209 +1,219 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import algosdk, { Address } from 'algosdk';
|
|
2
|
+
import { AlgoAmount } from './amount';
|
|
3
|
+
import ApplicationLocalState = algosdk.modelsv2.ApplicationLocalState;
|
|
4
|
+
import ApplicationStateSchema = algosdk.modelsv2.ApplicationStateSchema;
|
|
5
|
+
import AssetHolding = algosdk.modelsv2.AssetHolding;
|
|
6
|
+
import Application = algosdk.modelsv2.Application;
|
|
7
|
+
import Asset = algosdk.modelsv2.Asset;
|
|
8
|
+
import AccountParticipation = algosdk.modelsv2.AccountParticipation;
|
|
9
|
+
import Account = algosdk.Account;
|
|
10
|
+
import MultisigMetadata = algosdk.MultisigMetadata;
|
|
11
|
+
import Transaction = algosdk.Transaction;
|
|
12
|
+
import TransactionSigner = algosdk.TransactionSigner;
|
|
5
13
|
/**
|
|
6
14
|
* The account name identifier used for fund dispensing in test environments
|
|
7
15
|
*/
|
|
8
|
-
declare const DISPENSER_ACCOUNT = "DISPENSER";
|
|
16
|
+
export declare const DISPENSER_ACCOUNT = "DISPENSER";
|
|
9
17
|
/** Account wrapper that supports partial or full multisig signing. */
|
|
10
|
-
declare class MultisigAccount {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
18
|
+
export declare class MultisigAccount {
|
|
19
|
+
_params: algosdk.MultisigMetadata;
|
|
20
|
+
_signingAccounts: (algosdk.Account | SigningAccount)[];
|
|
21
|
+
_addr: Address;
|
|
22
|
+
_signer: TransactionSigner;
|
|
23
|
+
/** The parameters for the multisig account */
|
|
24
|
+
get params(): Readonly<algosdk.MultisigMetadata>;
|
|
25
|
+
/** The list of accounts that are present to sign */
|
|
26
|
+
get signingAccounts(): Readonly<(algosdk.Account | SigningAccount)[]>;
|
|
27
|
+
/** The address of the multisig account */
|
|
28
|
+
get addr(): Readonly<Address>;
|
|
29
|
+
/** The transaction signer for the multisig account */
|
|
30
|
+
get signer(): TransactionSigner;
|
|
31
|
+
constructor(multisigParams: MultisigMetadata, signingAccounts: (Account | SigningAccount)[]);
|
|
32
|
+
/**
|
|
33
|
+
* Sign the given transaction
|
|
34
|
+
* @param transaction Either a transaction object or a raw, partially signed transaction
|
|
35
|
+
* @returns The transaction signed by the present signers
|
|
36
|
+
* @example
|
|
37
|
+
* ```typescript
|
|
38
|
+
* const signedTxn = multisigAccount.sign(myTransaction)
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
sign(transaction: Transaction | Uint8Array): Uint8Array;
|
|
34
42
|
}
|
|
35
43
|
/** Account wrapper that supports a rekeyed account */
|
|
36
|
-
declare class SigningAccount implements Account {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
44
|
+
export declare class SigningAccount implements Account {
|
|
45
|
+
private _account;
|
|
46
|
+
private _signer;
|
|
47
|
+
private _sender;
|
|
48
|
+
/**
|
|
49
|
+
* Algorand address of the sender
|
|
50
|
+
*/
|
|
51
|
+
get addr(): Readonly<Address>;
|
|
52
|
+
/**
|
|
53
|
+
* Secret key belonging to the signer
|
|
54
|
+
*/
|
|
55
|
+
get sk(): Readonly<Uint8Array>;
|
|
56
|
+
/**
|
|
57
|
+
* Transaction signer for the underlying signing account
|
|
58
|
+
*/
|
|
59
|
+
get signer(): TransactionSigner;
|
|
60
|
+
/**
|
|
61
|
+
* Algorand account of the sender address and signer private key
|
|
62
|
+
*/
|
|
63
|
+
get sender(): Account;
|
|
64
|
+
constructor(account: Account, sender: string | Address | undefined);
|
|
57
65
|
}
|
|
58
66
|
/** A wrapper around `TransactionSigner` that also has the sender address. */
|
|
59
|
-
interface TransactionSignerAccount {
|
|
60
|
-
|
|
61
|
-
|
|
67
|
+
export interface TransactionSignerAccount {
|
|
68
|
+
addr: Readonly<Address>;
|
|
69
|
+
signer: TransactionSigner;
|
|
62
70
|
}
|
|
63
71
|
/** Account information at a given round. */
|
|
64
|
-
type AccountInformation = {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
72
|
+
export type AccountInformation = {
|
|
73
|
+
/**
|
|
74
|
+
* The account public key
|
|
75
|
+
*/
|
|
76
|
+
address: Address;
|
|
77
|
+
/** The balance of Algo currently held by the account. */
|
|
78
|
+
balance: AlgoAmount;
|
|
79
|
+
/**
|
|
80
|
+
* The amount of Algo in the account, without the pending rewards.
|
|
81
|
+
*/
|
|
82
|
+
amountWithoutPendingRewards: AlgoAmount;
|
|
83
|
+
/**
|
|
84
|
+
* Algo balance required to be held by the account.
|
|
85
|
+
*
|
|
86
|
+
* The requirement grows based on asset and application usage.
|
|
87
|
+
*/
|
|
88
|
+
minBalance: AlgoAmount;
|
|
89
|
+
/**
|
|
90
|
+
* Amount of Algo of pending rewards in this account.
|
|
91
|
+
*/
|
|
92
|
+
pendingRewards: AlgoAmount;
|
|
93
|
+
/**
|
|
94
|
+
* Total rewards of Algo the account has received, including pending
|
|
95
|
+
* rewards.
|
|
96
|
+
*/
|
|
97
|
+
rewards: AlgoAmount;
|
|
98
|
+
/**
|
|
99
|
+
* The round number for which this information is relevant.
|
|
100
|
+
*/
|
|
101
|
+
validAsOfRound: bigint;
|
|
102
|
+
/**
|
|
103
|
+
* Delegation status of the account's Algo:
|
|
104
|
+
* * Offline - indicates that the associated account is delegated.
|
|
105
|
+
* * Online - indicates that the associated account used as part of the delegation pool.
|
|
106
|
+
* * NotParticipating - indicates that the associated account is neither a delegator nor a delegate.
|
|
107
|
+
*/
|
|
108
|
+
status: string;
|
|
109
|
+
/**
|
|
110
|
+
* The count of all applications that have been opted in, equivalent to the count
|
|
111
|
+
* of application local data (AppLocalState objects) stored in this account.
|
|
112
|
+
*/
|
|
113
|
+
totalAppsOptedIn: number;
|
|
114
|
+
/**
|
|
115
|
+
* The count of all assets that have been opted in, equivalent to the count of
|
|
116
|
+
* AssetHolding objects held by this account.
|
|
117
|
+
*/
|
|
118
|
+
totalAssetsOptedIn: number;
|
|
119
|
+
/**
|
|
120
|
+
* The count of all apps (AppParams objects) created by this account.
|
|
121
|
+
*/
|
|
122
|
+
totalCreatedApps: number;
|
|
123
|
+
/**
|
|
124
|
+
* The count of all assets (AssetParams objects) created by this account.
|
|
125
|
+
*/
|
|
126
|
+
totalCreatedAssets: number;
|
|
127
|
+
/**
|
|
128
|
+
* Applications local data stored in this account.
|
|
129
|
+
*/
|
|
130
|
+
appsLocalState?: ApplicationLocalState[];
|
|
131
|
+
/**
|
|
132
|
+
* The sum of all extra application program pages for this account.
|
|
133
|
+
*/
|
|
134
|
+
appsTotalExtraPages?: number;
|
|
135
|
+
/**
|
|
136
|
+
* (tsch) stores the sum of all of the local schemas and global schemas in this
|
|
137
|
+
* account.
|
|
138
|
+
* Note: the raw account uses `StateSchema` for this type.
|
|
139
|
+
*/
|
|
140
|
+
appsTotalSchema?: ApplicationStateSchema;
|
|
141
|
+
/**
|
|
142
|
+
* Assets held by this account.
|
|
143
|
+
*/
|
|
144
|
+
assets?: AssetHolding[];
|
|
145
|
+
/**
|
|
146
|
+
* The address against which signing should be checked. If empty, the
|
|
147
|
+
* address of the current account is used. This field can be updated in any
|
|
148
|
+
* transaction by setting the `RekeyTo` field.
|
|
149
|
+
*/
|
|
150
|
+
authAddr?: Address;
|
|
151
|
+
/**
|
|
152
|
+
* Parameters of applications created by this account including app global data.
|
|
153
|
+
*/
|
|
154
|
+
createdApps?: Application[];
|
|
155
|
+
/**
|
|
156
|
+
* (apar) parameters of assets created by this account.
|
|
157
|
+
* Note: the raw account uses `map[int] -> Asset` for this type.
|
|
158
|
+
*/
|
|
159
|
+
createdAssets?: Asset[];
|
|
160
|
+
/**
|
|
161
|
+
* AccountParticipation describes the parameters used by this account in consensus
|
|
162
|
+
* protocol.
|
|
163
|
+
*/
|
|
164
|
+
participation?: AccountParticipation;
|
|
165
|
+
/**
|
|
166
|
+
* Used as part of the rewards computation. Only applicable to accounts
|
|
167
|
+
* which are participating.
|
|
168
|
+
*/
|
|
169
|
+
rewardBase?: number;
|
|
170
|
+
/**
|
|
171
|
+
* Indicates what type of signature is used by this account, must be one of:
|
|
172
|
+
* * sig
|
|
173
|
+
* * msig
|
|
174
|
+
* * lsig
|
|
175
|
+
*/
|
|
176
|
+
sigType?: string;
|
|
177
|
+
/**
|
|
178
|
+
* The total number of bytes used by this account's app's box keys and
|
|
179
|
+
* values.
|
|
180
|
+
*/
|
|
181
|
+
totalBoxBytes?: number;
|
|
182
|
+
/**
|
|
183
|
+
* The number of existing boxes created by this account's app.
|
|
184
|
+
*/
|
|
185
|
+
totalBoxes?: number;
|
|
186
|
+
/**
|
|
187
|
+
* The round in which this account last went online, or explicitly renewed their
|
|
188
|
+
* online status.
|
|
189
|
+
*/
|
|
190
|
+
lastHeartbeatRound?: bigint;
|
|
191
|
+
/**
|
|
192
|
+
* The round in which this account last proposed the block.
|
|
193
|
+
*/
|
|
194
|
+
lastProposedRound?: bigint;
|
|
186
195
|
};
|
|
187
196
|
/** Account asset holding information at a given round. */
|
|
188
|
-
type AccountAssetInformation = {
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
197
|
+
export type AccountAssetInformation = {
|
|
198
|
+
/** The ID of the asset held. */
|
|
199
|
+
assetId: bigint;
|
|
200
|
+
/** The current balance of that asset holding. */
|
|
201
|
+
balance: bigint;
|
|
202
|
+
/** Whether or not the asset is frozen for the account. */
|
|
203
|
+
frozen: boolean;
|
|
204
|
+
/** The round as at which the holding was correct. */
|
|
205
|
+
round: bigint;
|
|
193
206
|
};
|
|
194
207
|
/**
|
|
195
208
|
* @deprecated The methods that use this can be achieved using `AccountManager` instead.
|
|
196
209
|
* Config for an account config */
|
|
197
|
-
interface AccountConfig {
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
210
|
+
export interface AccountConfig {
|
|
211
|
+
/** Mnemonic for an account */
|
|
212
|
+
accountMnemonic: string;
|
|
213
|
+
/** Address of a rekeyed account */
|
|
214
|
+
senderAddress?: string;
|
|
215
|
+
/** Account name used to retrieve config */
|
|
216
|
+
accountName: string;
|
|
217
|
+
/** @deprecated Renamed to senderAddress in 2.3.1 */
|
|
218
|
+
senderMnemonic?: string;
|
|
206
219
|
}
|
|
207
|
-
//#endregion
|
|
208
|
-
export { AccountAssetInformation, AccountConfig, AccountInformation, DISPENSER_ACCOUNT, MultisigAccount, SigningAccount, TransactionSignerAccount };
|
|
209
|
-
//# sourceMappingURL=account.d.ts.map
|
|
@@ -1,17 +1,12 @@
|
|
|
1
|
-
import { BaseHTTPClientResponse, Query, URLTokenBaseHTTPClient } from
|
|
2
|
-
|
|
3
|
-
//#region src/types/algo-http-client-with-retry.d.ts
|
|
1
|
+
import { BaseHTTPClientResponse, Query, URLTokenBaseHTTPClient } from 'algosdk/client';
|
|
4
2
|
/** A HTTP Client that wraps the Algorand SDK HTTP Client with retries */
|
|
5
|
-
declare class AlgoHttpClientWithRetry extends URLTokenBaseHTTPClient {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
3
|
+
export declare class AlgoHttpClientWithRetry extends URLTokenBaseHTTPClient {
|
|
4
|
+
private static readonly MAX_TRIES;
|
|
5
|
+
private static readonly MAX_BACKOFF_MS;
|
|
6
|
+
private static readonly RETRY_STATUS_CODES;
|
|
7
|
+
private static readonly RETRY_ERROR_CODES;
|
|
8
|
+
private callWithRetry;
|
|
9
|
+
get(relativePath: string, query?: Query<string>, requestHeaders?: Record<string, string>): Promise<BaseHTTPClientResponse>;
|
|
10
|
+
post(relativePath: string, data: Uint8Array, query?: Query<string>, requestHeaders?: Record<string, string>): Promise<BaseHTTPClientResponse>;
|
|
11
|
+
delete(relativePath: string, data: Uint8Array, query?: Query<string>, requestHeaders?: Record<string, string>): Promise<BaseHTTPClientResponse>;
|
|
14
12
|
}
|
|
15
|
-
//#endregion
|
|
16
|
-
export { AlgoHttpClientWithRetry };
|
|
17
|
-
//# sourceMappingURL=algo-http-client-with-retry.d.ts.map
|