@algorandfoundation/algokit-utils 9.2.0 → 9.2.1-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/_virtual/_rolldown/runtime.js +33 -0
- package/_virtual/_rolldown/runtime.mjs +13 -0
- package/account/account.d.ts +25 -30
- package/account/account.js +151 -146
- package/account/account.js.map +1 -1
- package/account/account.mjs +149 -144
- package/account/account.mjs.map +1 -1
- package/account/get-account-config-from-environment.d.ts +7 -2
- package/account/get-account-config-from-environment.js +19 -21
- package/account/get-account-config-from-environment.js.map +1 -1
- package/account/get-account-config-from-environment.mjs +19 -19
- package/account/get-account-config-from-environment.mjs.map +1 -1
- package/account/get-account.d.ts +14 -12
- package/account/get-account.js +56 -59
- package/account/get-account.js.map +1 -1
- package/account/get-account.mjs +56 -57
- package/account/get-account.mjs.map +1 -1
- package/account/get-dispenser-account.d.ts +9 -5
- package/account/get-dispenser-account.js +20 -18
- package/account/get-dispenser-account.js.map +1 -1
- package/account/get-dispenser-account.mjs +20 -16
- package/account/get-dispenser-account.mjs.map +1 -1
- package/account/mnemonic-account.d.ts +7 -3
- package/account/mnemonic-account.js +17 -17
- package/account/mnemonic-account.js.map +1 -1
- package/account/mnemonic-account.mjs +15 -15
- package/account/mnemonic-account.mjs.map +1 -1
- package/amount.d.ts +40 -35
- package/amount.js +33 -34
- package/amount.js.map +1 -1
- package/amount.mjs +33 -32
- package/amount.mjs.map +1 -1
- package/app-client.d.ts +10 -6
- package/app-client.js +91 -86
- package/app-client.js.map +1 -1
- package/app-client.mjs +91 -84
- package/app-client.mjs.map +1 -1
- package/app-deploy.d.ts +26 -24
- package/app-deploy.js +235 -253
- package/app-deploy.js.map +1 -1
- package/app-deploy.mjs +233 -251
- package/app-deploy.mjs.map +1 -1
- package/app.d.ts +45 -46
- package/app.js +253 -271
- package/app.js.map +1 -1
- package/app.mjs +249 -267
- package/app.mjs.map +1 -1
- package/asset.d.ts +16 -12
- package/asset.js +116 -122
- package/asset.js.map +1 -1
- package/asset.mjs +116 -120
- package/asset.mjs.map +1 -1
- package/config.d.ts +7 -2
- package/config.js +5 -7
- package/config.js.map +1 -1
- package/config.mjs +5 -4
- package/config.mjs.map +1 -1
- package/debugging/debugging.d.ts +5 -1
- package/debugging/debugging.js +11 -11
- package/debugging/debugging.js.map +1 -1
- package/debugging/debugging.mjs +11 -9
- package/debugging/debugging.mjs.map +1 -1
- package/dispenser-client.d.ts +7 -2
- package/dispenser-client.js +23 -24
- package/dispenser-client.js.map +1 -1
- package/dispenser-client.mjs +23 -22
- package/dispenser-client.mjs.map +1 -1
- package/index.d.ts +27 -18
- package/index.js +140 -143
- package/index.mjs +27 -29
- package/indexer-lookup.d.ts +18 -11
- package/indexer-lookup.js +112 -120
- package/indexer-lookup.js.map +1 -1
- package/indexer-lookup.mjs +105 -118
- package/indexer-lookup.mjs.map +1 -1
- package/localnet/get-kmd-wallet-account.d.ts +9 -7
- package/localnet/get-kmd-wallet-account.js +28 -26
- package/localnet/get-kmd-wallet-account.js.map +1 -1
- package/localnet/get-kmd-wallet-account.mjs +28 -24
- package/localnet/get-kmd-wallet-account.mjs.map +1 -1
- package/localnet/get-localnet-dispenser-account.d.ts +7 -5
- package/localnet/get-localnet-dispenser-account.js +17 -15
- package/localnet/get-localnet-dispenser-account.js.map +1 -1
- package/localnet/get-localnet-dispenser-account.mjs +17 -13
- package/localnet/get-localnet-dispenser-account.mjs.map +1 -1
- package/localnet/get-or-create-kmd-wallet-account.d.ts +10 -8
- package/localnet/get-or-create-kmd-wallet-account.js +28 -26
- package/localnet/get-or-create-kmd-wallet-account.js.map +1 -1
- package/localnet/get-or-create-kmd-wallet-account.mjs +28 -24
- package/localnet/get-or-create-kmd-wallet-account.mjs.map +1 -1
- package/localnet/is-localnet.d.ts +7 -3
- package/localnet/is-localnet.js +9 -10
- package/localnet/is-localnet.js.map +1 -1
- package/localnet/is-localnet.mjs +9 -8
- package/localnet/is-localnet.mjs.map +1 -1
- package/network-client.d.ts +17 -15
- package/network-client.js +115 -116
- package/network-client.js.map +1 -1
- package/network-client.mjs +115 -114
- package/network-client.mjs.map +1 -1
- package/package.json +12 -3
- package/testing/account.d.ts +11 -9
- package/testing/account.js +31 -33
- package/testing/account.js.map +1 -1
- package/testing/account.mjs +29 -31
- package/testing/account.mjs.map +1 -1
- package/testing/fixtures/algokit-log-capture-fixture.d.ts +7 -2
- package/testing/fixtures/algokit-log-capture-fixture.js +36 -41
- package/testing/fixtures/algokit-log-capture-fixture.js.map +1 -1
- package/testing/fixtures/algokit-log-capture-fixture.mjs +36 -39
- package/testing/fixtures/algokit-log-capture-fixture.mjs.map +1 -1
- package/testing/fixtures/algorand-fixture.d.ts +9 -4
- package/testing/fixtures/algorand-fixture.js +67 -62
- package/testing/fixtures/algorand-fixture.js.map +1 -1
- package/testing/fixtures/algorand-fixture.mjs +66 -59
- package/testing/fixtures/algorand-fixture.mjs.map +1 -1
- package/testing/index.d.ts +7 -5
- package/testing/index.js +13 -18
- package/testing/index.mjs +7 -7
- package/testing/indexer.d.ts +5 -1
- package/testing/indexer.js +28 -37
- package/testing/indexer.js.map +1 -1
- package/testing/indexer.mjs +28 -35
- package/testing/indexer.mjs.map +1 -1
- package/testing/test-logger.d.ts +41 -36
- package/testing/test-logger.js +71 -76
- package/testing/test-logger.js.map +1 -1
- package/testing/test-logger.mjs +71 -74
- package/testing/test-logger.mjs.map +1 -1
- package/testing/transaction-logger.d.ts +30 -27
- package/testing/transaction-logger.js +77 -93
- package/testing/transaction-logger.js.map +1 -1
- package/testing/transaction-logger.mjs +74 -90
- package/testing/transaction-logger.mjs.map +1 -1
- package/transaction/legacy-bridge.js +100 -111
- package/transaction/legacy-bridge.js.map +1 -1
- package/transaction/legacy-bridge.mjs +97 -108
- package/transaction/legacy-bridge.mjs.map +1 -1
- package/transaction/perform-atomic-transaction-composer-simulate.d.ts +7 -5
- package/transaction/perform-atomic-transaction-composer-simulate.js +31 -36
- package/transaction/perform-atomic-transaction-composer-simulate.js.map +1 -1
- package/transaction/perform-atomic-transaction-composer-simulate.mjs +28 -33
- package/transaction/perform-atomic-transaction-composer-simulate.mjs.map +1 -1
- package/transaction/transaction.d.ts +34 -35
- package/transaction/transaction.js +716 -914
- package/transaction/transaction.js.map +1 -1
- package/transaction/transaction.mjs +713 -911
- package/transaction/transaction.mjs.map +1 -1
- package/transfer/transfer-algos.d.ts +9 -5
- package/transfer/transfer-algos.js +26 -27
- package/transfer/transfer-algos.js.map +1 -1
- package/transfer/transfer-algos.mjs +26 -25
- package/transfer/transfer-algos.mjs.map +1 -1
- package/transfer/transfer.d.ts +11 -8
- package/transfer/transfer.js +94 -100
- package/transfer/transfer.js.map +1 -1
- package/transfer/transfer.mjs +94 -98
- package/transfer/transfer.mjs.map +1 -1
- package/types/account-manager.d.ts +432 -429
- package/types/account-manager.js +591 -602
- package/types/account-manager.js.map +1 -1
- package/types/account-manager.mjs +587 -599
- package/types/account-manager.mjs.map +1 -1
- package/types/account.d.ts +192 -202
- package/types/account.js +91 -88
- package/types/account.js.map +1 -1
- package/types/account.mjs +88 -86
- package/types/account.mjs.map +1 -1
- package/types/algo-http-client-with-retry.d.ts +15 -10
- package/types/algo-http-client-with-retry.js +70 -92
- package/types/algo-http-client-with-retry.js.map +1 -1
- package/types/algo-http-client-with-retry.mjs +69 -90
- package/types/algo-http-client-with-retry.mjs.map +1 -1
- package/types/algorand-client-transaction-creator.d.ts +778 -771
- package/types/algorand-client-transaction-creator.js +733 -732
- package/types/algorand-client-transaction-creator.js.map +1 -1
- package/types/algorand-client-transaction-creator.mjs +732 -730
- package/types/algorand-client-transaction-creator.mjs.map +1 -1
- package/types/algorand-client-transaction-sender.d.ts +1090 -1360
- package/types/algorand-client-transaction-sender.js +930 -961
- package/types/algorand-client-transaction-sender.js.map +1 -1
- package/types/algorand-client-transaction-sender.mjs +927 -959
- package/types/algorand-client-transaction-sender.mjs.map +1 -1
- package/types/algorand-client.d.ts +239 -236
- package/types/algorand-client.js +322 -320
- package/types/algorand-client.js.map +1 -1
- package/types/algorand-client.mjs +321 -318
- package/types/algorand-client.mjs.map +1 -1
- package/types/amount.d.ts +47 -43
- package/types/amount.js +66 -70
- package/types/amount.js.map +1 -1
- package/types/amount.mjs +63 -68
- package/types/amount.mjs.map +1 -1
- package/types/app-arc56.d.ts +235 -272
- package/types/app-arc56.js +124 -170
- package/types/app-arc56.js.map +1 -1
- package/types/app-arc56.mjs +121 -168
- package/types/app-arc56.mjs.map +1 -1
- package/types/app-client.d.ts +1128 -2009
- package/types/app-client.js +1633 -1791
- package/types/app-client.js.map +1 -1
- package/types/app-client.mjs +1624 -1783
- package/types/app-client.mjs.map +1 -1
- package/types/app-deployer.d.ts +139 -141
- package/types/app-deployer.js +344 -384
- package/types/app-deployer.js.map +1 -1
- package/types/app-deployer.mjs +341 -382
- package/types/app-deployer.mjs.map +1 -1
- package/types/app-factory.d.ts +762 -932
- package/types/app-factory.js +496 -488
- package/types/app-factory.js.map +1 -1
- package/types/app-factory.mjs +491 -484
- package/types/app-factory.mjs.map +1 -1
- package/types/app-manager.d.ts +304 -310
- package/types/app-manager.js +422 -475
- package/types/app-manager.js.map +1 -1
- package/types/app-manager.mjs +419 -473
- package/types/app-manager.mjs.map +1 -1
- package/types/app-spec.d.ts +118 -117
- package/types/app-spec.js +125 -135
- package/types/app-spec.js.map +1 -1
- package/types/app-spec.mjs +121 -132
- package/types/app-spec.mjs.map +1 -1
- package/types/app.d.ts +229 -241
- package/types/app.js +36 -28
- package/types/app.js.map +1 -1
- package/types/app.mjs +33 -26
- package/types/app.mjs.map +1 -1
- package/types/asset-manager.d.ts +204 -199
- package/types/asset-manager.js +165 -174
- package/types/asset-manager.js.map +1 -1
- package/types/asset-manager.mjs +164 -172
- package/types/asset-manager.mjs.map +1 -1
- package/types/asset.d.ts +95 -91
- package/types/asset.js +0 -3
- package/types/asset.mjs +0 -2
- package/types/async-event-emitter.d.ts +18 -13
- package/types/async-event-emitter.js +37 -49
- package/types/async-event-emitter.js.map +1 -1
- package/types/async-event-emitter.mjs +36 -47
- package/types/async-event-emitter.mjs.map +1 -1
- package/types/client-manager.d.ts +453 -451
- package/types/client-manager.js +602 -598
- package/types/client-manager.js.map +1 -1
- package/types/client-manager.mjs +597 -594
- package/types/client-manager.mjs.map +1 -1
- package/types/composer.d.ts +1211 -1258
- package/types/composer.js +1436 -1498
- package/types/composer.js.map +1 -1
- package/types/composer.mjs +1430 -1493
- package/types/composer.mjs.map +1 -1
- package/types/config.d.ts +53 -48
- package/types/config.js +78 -77
- package/types/config.js.map +1 -1
- package/types/config.mjs +77 -75
- package/types/config.mjs.map +1 -1
- package/types/debugging.d.ts +25 -23
- package/types/debugging.js +9 -11
- package/types/debugging.js.map +1 -1
- package/types/debugging.mjs +8 -9
- package/types/debugging.mjs.map +1 -1
- package/types/dispenser-client.d.ts +57 -52
- package/types/dispenser-client.js +120 -141
- package/types/dispenser-client.js.map +1 -1
- package/types/dispenser-client.mjs +119 -139
- package/types/dispenser-client.mjs.map +1 -1
- package/types/expand.d.ts +5 -3
- package/types/expand.js +0 -3
- package/types/expand.mjs +0 -2
- package/types/indexer.d.ts +104 -100
- package/types/indexer.js +36 -31
- package/types/indexer.js.map +1 -1
- package/types/indexer.mjs +32 -30
- package/types/indexer.mjs.map +1 -1
- package/types/instance-of.d.ts +5 -3
- package/types/instance-of.js +0 -3
- package/types/instance-of.mjs +0 -2
- package/types/kmd-account-manager.d.ts +75 -70
- package/types/kmd-account-manager.js +150 -184
- package/types/kmd-account-manager.js.map +1 -1
- package/types/kmd-account-manager.mjs +147 -182
- package/types/kmd-account-manager.mjs.map +1 -1
- package/types/lifecycle-events.d.ts +13 -8
- package/types/lifecycle-events.js +10 -7
- package/types/lifecycle-events.js.map +1 -1
- package/types/lifecycle-events.mjs +9 -7
- package/types/lifecycle-events.mjs.map +1 -1
- package/types/logging.d.ts +15 -11
- package/types/logging.js +30 -31
- package/types/logging.js.map +1 -1
- package/types/logging.mjs +29 -29
- package/types/logging.mjs.map +1 -1
- package/types/logic-error.d.ts +33 -29
- package/types/logic-error.js +50 -49
- package/types/logic-error.js.map +1 -1
- package/types/logic-error.mjs +49 -47
- package/types/logic-error.mjs.map +1 -1
- package/types/network-client.d.ts +32 -27
- package/types/network-client.js +10 -9
- package/types/network-client.js.map +1 -1
- package/types/network-client.mjs +9 -7
- package/types/network-client.mjs.map +1 -1
- package/types/testing.d.ts +131 -132
- package/types/testing.js +0 -3
- package/types/testing.mjs +0 -2
- package/types/transaction.d.ts +110 -110
- package/types/transaction.js +0 -3
- package/types/transaction.mjs +0 -2
- package/types/transfer.d.ts +70 -66
- package/types/transfer.js +0 -3
- package/types/transfer.mjs +0 -2
- package/util.js +73 -118
- package/util.js.map +1 -1
- package/util.mjs +73 -116
- package/util.mjs.map +1 -1
- package/account/index.d.ts +0 -5
- package/debugging/index.d.ts +0 -1
- package/index.js.map +0 -1
- package/index.mjs.map +0 -1
- package/localnet/index.d.ts +0 -4
- package/testing/_asset.d.ts +0 -3
- package/testing/fixtures/index.d.ts +0 -2
- package/testing/index.js.map +0 -1
- package/testing/index.mjs.map +0 -1
- package/transaction/index.d.ts +0 -2
- package/transaction/legacy-bridge.d.ts +0 -35
- package/transfer/index.d.ts +0 -2
- package/types/asset.js.map +0 -1
- package/types/asset.mjs.map +0 -1
- package/types/expand.js.map +0 -1
- package/types/expand.mjs.map +0 -1
- package/types/instance-of.js.map +0 -1
- package/types/instance-of.mjs.map +0 -1
- package/types/testing.js.map +0 -1
- package/types/testing.mjs.map +0 -1
- package/types/transaction.js.map +0 -1
- package/types/transaction.mjs.map +0 -1
- package/types/transfer.js.map +0 -1
- package/types/transfer.mjs.map +0 -1
- package/util.d.ts +0 -48
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __exportAll = (all, no_symbols) => {
|
|
9
|
+
let target = {};
|
|
10
|
+
for (var name in all) __defProp(target, name, {
|
|
11
|
+
get: all[name],
|
|
12
|
+
enumerable: true
|
|
13
|
+
});
|
|
14
|
+
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
15
|
+
return target;
|
|
16
|
+
};
|
|
17
|
+
var __copyProps = (to, from, except, desc) => {
|
|
18
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
19
|
+
key = keys[i];
|
|
20
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
21
|
+
get: ((k) => from[k]).bind(null, key),
|
|
22
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
return to;
|
|
26
|
+
};
|
|
27
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
28
|
+
value: mod,
|
|
29
|
+
enumerable: true
|
|
30
|
+
}) : target, mod));
|
|
31
|
+
//#endregion
|
|
32
|
+
exports.__exportAll = __exportAll;
|
|
33
|
+
exports.__toESM = __toESM;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __exportAll = (all, no_symbols) => {
|
|
4
|
+
let target = {};
|
|
5
|
+
for (var name in all) __defProp(target, name, {
|
|
6
|
+
get: all[name],
|
|
7
|
+
enumerable: true
|
|
8
|
+
});
|
|
9
|
+
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
10
|
+
return target;
|
|
11
|
+
};
|
|
12
|
+
//#endregion
|
|
13
|
+
export { __exportAll };
|
package/account/account.d.ts
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { AccountAssetInformation, MultisigAccount, SigningAccount, TransactionSignerAccount } from
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import Kmd = algosdk.Kmd;
|
|
8
|
-
import MultisigMetadata = algosdk.MultisigMetadata;
|
|
9
|
-
import TransactionSigner = algosdk.TransactionSigner;
|
|
10
|
-
import AccountInformationModel = algosdk.modelsv2.Account;
|
|
1
|
+
import { AlgoAmount } from "../types/amount.js";
|
|
2
|
+
import { AccountAssetInformation, MultisigAccount, SigningAccount, TransactionSignerAccount } from "../types/account.js";
|
|
3
|
+
import { SendTransactionFrom } from "../types/transaction.js";
|
|
4
|
+
import algosdk from "algosdk";
|
|
5
|
+
|
|
6
|
+
//#region src/account/account.d.ts
|
|
11
7
|
/**
|
|
12
8
|
* @deprecated Use `algorand.account.multisig(multisigParams, signingAccounts)` or `new MultisigAccount(multisigParams, signingAccounts)` instead.
|
|
13
9
|
*
|
|
@@ -16,7 +12,7 @@ import AccountInformationModel = algosdk.modelsv2.Account;
|
|
|
16
12
|
* @param signingAccounts The signers that are currently present
|
|
17
13
|
* @returns A multisig account wrapper
|
|
18
14
|
*/
|
|
19
|
-
|
|
15
|
+
declare function multisigAccount(multisigParams: MultisigMetadata, signingAccounts: (Account | SigningAccount)[]): MultisigAccount;
|
|
20
16
|
/**
|
|
21
17
|
* @deprecated Use `algorand.account.rekeyed(sender, account)` or `new SigningAccount(account, sender)` instead.
|
|
22
18
|
*
|
|
@@ -25,7 +21,7 @@ export declare function multisigAccount(multisigParams: MultisigMetadata, signin
|
|
|
25
21
|
* @param sender The address of the rekeyed account that will act as a sender
|
|
26
22
|
* @returns The SigningAccount wrapper
|
|
27
23
|
*/
|
|
28
|
-
|
|
24
|
+
declare function rekeyedAccount(signer: Account, sender: string): SigningAccount;
|
|
29
25
|
/**
|
|
30
26
|
* @deprecated Use `algorand.account.getSigner(sender)` (after previously registering the signer with `setSigner`) or `{ addr: sender, signer }` instead.
|
|
31
27
|
*
|
|
@@ -34,7 +30,7 @@ export declare function rekeyedAccount(signer: Account, sender: string): Signing
|
|
|
34
30
|
* @param sender The address of sender account
|
|
35
31
|
* @returns The SigningAccount wrapper
|
|
36
32
|
*/
|
|
37
|
-
|
|
33
|
+
declare function transactionSignerAccount(signer: TransactionSigner, sender: string): TransactionSignerAccount;
|
|
38
34
|
/**
|
|
39
35
|
* @deprecated Use `algorand.account.random()` or `algosdk.generateAccount()` instead.
|
|
40
36
|
*
|
|
@@ -43,7 +39,7 @@ export declare function transactionSignerAccount(signer: TransactionSigner, send
|
|
|
43
39
|
* This is a wrapper around algosdk.generateAccount to provide a more friendly/obvious name.
|
|
44
40
|
*
|
|
45
41
|
*/
|
|
46
|
-
|
|
42
|
+
declare function randomAccount(): Account;
|
|
47
43
|
/**
|
|
48
44
|
* @deprecated Use `algorand.account.fromEnvironment(name, fundWith)` or `new AccountManager(clientManager).fromEnvironment()` instead.
|
|
49
45
|
*
|
|
@@ -76,9 +72,9 @@ export declare function randomAccount(): Account;
|
|
|
76
72
|
* @param kmdClient An optional KMD client to use to create an account (when targeting LocalNet), if not specified then a default KMD client will be loaded from environment variables
|
|
77
73
|
* @returns The requested account with private key loaded from the environment variables or when targeting LocalNet from KMD (idempotently creating and funding the account)
|
|
78
74
|
*/
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
75
|
+
declare function mnemonicAccountFromEnvironment(account: string | {
|
|
76
|
+
name: string;
|
|
77
|
+
fundWith?: AlgoAmount;
|
|
82
78
|
}, algod: Algodv2, kmdClient?: Kmd): Promise<Account | SigningAccount>;
|
|
83
79
|
/**
|
|
84
80
|
* @deprecated Use `algosdk.decodeAddress` instead.
|
|
@@ -87,7 +83,7 @@ export declare function mnemonicAccountFromEnvironment(account: string | {
|
|
|
87
83
|
*
|
|
88
84
|
* @param account Either an account (with private key loaded) or the string address of an account
|
|
89
85
|
*/
|
|
90
|
-
|
|
86
|
+
declare function getAccountAddressAsUint8Array(account: SendTransactionFrom | string): Uint8Array<ArrayBufferLike>;
|
|
91
87
|
/**
|
|
92
88
|
* @deprecated Use `algosdk.encodeAddress` instead.
|
|
93
89
|
*
|
|
@@ -95,15 +91,12 @@ export declare function getAccountAddressAsUint8Array(account: SendTransactionFr
|
|
|
95
91
|
*
|
|
96
92
|
* @param addressEncodedInB64 The base64 encoded version of the underlying byte array of the address public key
|
|
97
93
|
*/
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
[key in keyof T]: ToNumberIfExtends<T[key], number | bigint>;
|
|
101
|
-
};
|
|
94
|
+
declare function getAccountAddressAsString(addressEncodedInB64: string): string;
|
|
95
|
+
type NumberConverter<T extends AccountInformationModel> = { [key in keyof T]: ToNumberIfExtends<T[key], number | bigint> };
|
|
102
96
|
type ToNumberIfExtends<K, E> = K extends E ? number : K;
|
|
103
97
|
/** @deprecated Account information at a given round. */
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
authAddr?: string;
|
|
98
|
+
type AccountInformation = Omit<NumberConverter<AccountInformationModel>, 'getEncodingSchema' | 'toEncodingData' | 'authAddr'> & {
|
|
99
|
+
/** (spend) the address against which signing should be checked. If empty, the address of the current account is used. This field can be updated in any transaction by setting the RekeyTo field. */authAddr?: string;
|
|
107
100
|
};
|
|
108
101
|
/**
|
|
109
102
|
* @deprecated Use `algorand.account.getInformation(sender)` or `new AccountManager(clientManager).getInformation(sender)` instead.
|
|
@@ -116,12 +109,12 @@ export type AccountInformation = Omit<NumberConverter<AccountInformationModel>,
|
|
|
116
109
|
* const accountInfo = await account.getInformation(address, algod);
|
|
117
110
|
* ```
|
|
118
111
|
*
|
|
119
|
-
* [Response data schema details](https://dev.algorand.co/reference/rest-
|
|
112
|
+
* [Response data schema details](https://dev.algorand.co/reference/rest-api/algod/operations/accountinformation/)
|
|
120
113
|
* @param sender The address of the sender/account to look up
|
|
121
114
|
* @param algod The algod instance
|
|
122
115
|
* @returns The account information
|
|
123
116
|
*/
|
|
124
|
-
|
|
117
|
+
declare function getAccountInformation(sender: string | SendTransactionFrom, algod: Algodv2): Promise<AccountInformation>;
|
|
125
118
|
/**
|
|
126
119
|
* @deprecated Use `algorand.asset.getAccountInformation(sender, assetId)` or `new AssetManager(...).getAccountInformation(sender, assetId)` instead.
|
|
127
120
|
*
|
|
@@ -134,11 +127,13 @@ export declare function getAccountInformation(sender: string | SendTransactionFr
|
|
|
134
127
|
* const accountInfo = await account.getAccountAssetInformation(address, assetId, algod);
|
|
135
128
|
* ```
|
|
136
129
|
*
|
|
137
|
-
* [Response data schema details](https://dev.algorand.co/reference/rest-
|
|
130
|
+
* [Response data schema details](https://dev.algorand.co/reference/rest-api/algod/operations/accountassetinformation/)
|
|
138
131
|
* @param sender The address of the sender/account to look up
|
|
139
132
|
* @param assetId The ID of the asset to return a holding for
|
|
140
133
|
* @param algod The algod instance
|
|
141
134
|
* @returns The account asset holding information
|
|
142
135
|
*/
|
|
143
|
-
|
|
144
|
-
|
|
136
|
+
declare function getAccountAssetInformation(sender: string | SendTransactionFrom, assetId: number | bigint, algod: Algodv2): Promise<AccountAssetInformation>;
|
|
137
|
+
//#endregion
|
|
138
|
+
export { AccountInformation, NumberConverter, getAccountAddressAsString, getAccountAddressAsUint8Array, getAccountAssetInformation, getAccountInformation, mnemonicAccountFromEnvironment, multisigAccount, randomAccount, rekeyedAccount, transactionSignerAccount };
|
|
139
|
+
//# sourceMappingURL=account.d.ts.map
|
package/account/account.js
CHANGED
|
@@ -1,175 +1,179 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
const require_runtime = require("../_virtual/_rolldown/runtime.js");
|
|
2
|
+
const require_transaction = require("../transaction/transaction.js");
|
|
3
|
+
const require_account = require("../types/account.js");
|
|
4
|
+
const require_client_manager = require("../types/client-manager.js");
|
|
5
|
+
const require_account_manager = require("../types/account-manager.js");
|
|
6
|
+
const require_algorand_client = require("../types/algorand-client.js");
|
|
7
|
+
let algosdk = require("algosdk");
|
|
8
|
+
algosdk = require_runtime.__toESM(algosdk);
|
|
9
|
+
//#region src/account/account.ts
|
|
10
10
|
/**
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
* @deprecated Use `algorand.account.multisig(multisigParams, signingAccounts)` or `new MultisigAccount(multisigParams, signingAccounts)` instead.
|
|
12
|
+
*
|
|
13
|
+
* Returns an account wrapper that supports partial or full multisig signing.
|
|
14
|
+
* @param multisigParams The parameters that define the multisig account
|
|
15
|
+
* @param signingAccounts The signers that are currently present
|
|
16
|
+
* @returns A multisig account wrapper
|
|
17
|
+
*/
|
|
18
18
|
function multisigAccount(multisigParams, signingAccounts) {
|
|
19
|
-
|
|
19
|
+
return new require_account.MultisigAccount(multisigParams, signingAccounts);
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
22
|
+
* @deprecated Use `algorand.account.rekeyed(sender, account)` or `new SigningAccount(account, sender)` instead.
|
|
23
|
+
*
|
|
24
|
+
* Returns an account wrapper that supports a rekeyed account.
|
|
25
|
+
* @param signer The account, with private key loaded, that is signing
|
|
26
|
+
* @param sender The address of the rekeyed account that will act as a sender
|
|
27
|
+
* @returns The SigningAccount wrapper
|
|
28
|
+
*/
|
|
29
29
|
function rekeyedAccount(signer, sender) {
|
|
30
|
-
|
|
30
|
+
return new require_account.SigningAccount(signer, sender);
|
|
31
31
|
}
|
|
32
32
|
/**
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
33
|
+
* @deprecated Use `algorand.account.getSigner(sender)` (after previously registering the signer with `setSigner`) or `{ addr: sender, signer }` instead.
|
|
34
|
+
*
|
|
35
|
+
* Returns an account wrapper that supports a transaction signer with associated sender address.
|
|
36
|
+
* @param signer The transaction signer
|
|
37
|
+
* @param sender The address of sender account
|
|
38
|
+
* @returns The SigningAccount wrapper
|
|
39
|
+
*/
|
|
40
40
|
function transactionSignerAccount(signer, sender) {
|
|
41
|
-
|
|
41
|
+
return {
|
|
42
|
+
addr: algosdk.Address.fromString(sender),
|
|
43
|
+
signer
|
|
44
|
+
};
|
|
42
45
|
}
|
|
43
46
|
/**
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
* @deprecated Use `algorand.account.random()` or `algosdk.generateAccount()` instead.
|
|
48
|
+
*
|
|
49
|
+
* Returns a new, random Algorand account with secret key loaded.
|
|
50
|
+
*
|
|
51
|
+
* This is a wrapper around algosdk.generateAccount to provide a more friendly/obvious name.
|
|
52
|
+
*
|
|
53
|
+
*/
|
|
51
54
|
function randomAccount() {
|
|
52
|
-
|
|
53
|
-
return algosdk.generateAccount();
|
|
55
|
+
return algosdk.default.generateAccount();
|
|
54
56
|
}
|
|
55
57
|
/**
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
58
|
+
* @deprecated Use `algorand.account.fromEnvironment(name, fundWith)` or `new AccountManager(clientManager).fromEnvironment()` instead.
|
|
59
|
+
*
|
|
60
|
+
* Returns an Algorand account with private key loaded by convention from environment variables based on the given name identifier.
|
|
61
|
+
*
|
|
62
|
+
* Note: This function expects to run in a Node.js environment.
|
|
63
|
+
*
|
|
64
|
+
* ## Convention:
|
|
65
|
+
* * **Non-LocalNet:** will load process.env['\{NAME\}_MNEMONIC'] as a mnemonic secret; **Note: Be careful how the mnemonic is handled**,
|
|
66
|
+
* never commit it into source control and ideally load it via a secret storage service rather than the file system.
|
|
67
|
+
* If process.env['\{NAME\}_SENDER'] is defined then it will use that for the sender address (i.e. to support rekeyed accounts)
|
|
68
|
+
* * **LocalNet:** will load the account from a KMD wallet called \{NAME\} and if that wallet doesn't exist it will create it and fund the account for you
|
|
69
|
+
*
|
|
70
|
+
* This allows you to write code that will work seamlessly in production and local development (LocalNet) without manual config locally (including when you reset the LocalNet).
|
|
71
|
+
*
|
|
72
|
+
* @example Default
|
|
73
|
+
*
|
|
74
|
+
* If you have a mnemonic secret loaded into `process.env.MY_ACCOUNT_MNEMONIC` then you can call the following to get that private key loaded into an account object:
|
|
75
|
+
* ```typescript
|
|
76
|
+
* const account = await mnemonicAccountFromEnvironment('MY_ACCOUNT', algod)
|
|
77
|
+
* ```
|
|
78
|
+
*
|
|
79
|
+
* If that code runs against LocalNet then a wallet called `MY_ACCOUNT` will automatically be created with an account that is automatically funded with 1000 (default) ALGO from the default LocalNet dispenser.
|
|
80
|
+
* If not running against LocalNet then it will use proces.env.MY_ACCOUNT_MNEMONIC as the private key and (if present) process.env.MY_ACCOUNT_SENDER as the sender address.
|
|
81
|
+
*
|
|
82
|
+
* @param account The details of the account to get, either the name identifier (string) or an object with:
|
|
83
|
+
* * `name`: string: The name identifier of the account
|
|
84
|
+
* * `fundWith`: The amount to fund the account with when it gets created (when targeting LocalNet), if not specified then 1000 ALGO will be funded from the dispenser account
|
|
85
|
+
* @param algod An algod client
|
|
86
|
+
* @param kmdClient An optional KMD client to use to create an account (when targeting LocalNet), if not specified then a default KMD client will be loaded from environment variables
|
|
87
|
+
* @returns The requested account with private key loaded from the environment variables or when targeting LocalNet from KMD (idempotently creating and funding the account)
|
|
88
|
+
*/
|
|
87
89
|
async function mnemonicAccountFromEnvironment(account, algod, kmdClient) {
|
|
88
|
-
|
|
90
|
+
return (await new require_account_manager.AccountManager(new require_client_manager.ClientManager({
|
|
91
|
+
algod,
|
|
92
|
+
kmd: kmdClient
|
|
93
|
+
})).fromEnvironment(typeof account === "string" ? account : account.name, typeof account === "string" ? void 0 : account.fundWith)).account;
|
|
89
94
|
}
|
|
90
95
|
/**
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
96
|
+
* @deprecated Use `algosdk.decodeAddress` instead.
|
|
97
|
+
*
|
|
98
|
+
* Returns an account's address as a byte array
|
|
99
|
+
*
|
|
100
|
+
* @param account Either an account (with private key loaded) or the string address of an account
|
|
101
|
+
*/
|
|
97
102
|
function getAccountAddressAsUint8Array(account) {
|
|
98
|
-
|
|
103
|
+
return algosdk.default.decodeAddress(typeof account === "string" ? account : require_transaction.getSenderAddress(account)).publicKey;
|
|
99
104
|
}
|
|
100
105
|
/**
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
106
|
+
* @deprecated Use `algosdk.encodeAddress` instead.
|
|
107
|
+
*
|
|
108
|
+
* Returns the string address of an Algorand account from a base64 encoded version of the underlying byte array of the address public key
|
|
109
|
+
*
|
|
110
|
+
* @param addressEncodedInB64 The base64 encoded version of the underlying byte array of the address public key
|
|
111
|
+
*/
|
|
107
112
|
function getAccountAddressAsString(addressEncodedInB64) {
|
|
108
|
-
|
|
113
|
+
return algosdk.default.encodeAddress(Buffer.from(addressEncodedInB64, "base64"));
|
|
109
114
|
}
|
|
110
115
|
/**
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
116
|
+
* @deprecated Use `algorand.account.getInformation(sender)` or `new AccountManager(clientManager).getInformation(sender)` instead.
|
|
117
|
+
*
|
|
118
|
+
* Returns the given sender account's current status, balance and spendable amounts.
|
|
119
|
+
*
|
|
120
|
+
* @example
|
|
121
|
+
* ```typescript
|
|
122
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
123
|
+
* const accountInfo = await account.getInformation(address, algod);
|
|
124
|
+
* ```
|
|
125
|
+
*
|
|
126
|
+
* [Response data schema details](https://dev.algorand.co/reference/rest-api/algod/operations/accountinformation/)
|
|
127
|
+
* @param sender The address of the sender/account to look up
|
|
128
|
+
* @param algod The algod instance
|
|
129
|
+
* @returns The account information
|
|
130
|
+
*/
|
|
126
131
|
async function getAccountInformation(sender, algod) {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
};
|
|
132
|
+
const account = await algod.accountInformation(require_transaction.getSenderAddress(sender)).do();
|
|
133
|
+
return {
|
|
134
|
+
...account,
|
|
135
|
+
address: account.address.toString(),
|
|
136
|
+
authAddr: account.authAddr ? account.authAddr.toString() : void 0,
|
|
137
|
+
amount: Number(account.amount),
|
|
138
|
+
amountWithoutPendingRewards: Number(account.amountWithoutPendingRewards),
|
|
139
|
+
minBalance: Number(account.minBalance),
|
|
140
|
+
pendingRewards: Number(account.pendingRewards),
|
|
141
|
+
rewards: Number(account.rewards),
|
|
142
|
+
round: Number(account.round),
|
|
143
|
+
totalAppsOptedIn: Number(account.totalAppsOptedIn),
|
|
144
|
+
totalAssetsOptedIn: Number(account.totalAssetsOptedIn),
|
|
145
|
+
totalCreatedApps: Number(account.totalCreatedApps),
|
|
146
|
+
totalCreatedAssets: Number(account.totalCreatedAssets),
|
|
147
|
+
appsTotalExtraPages: account.appsTotalExtraPages !== void 0 ? Number(account.appsTotalExtraPages) : void 0,
|
|
148
|
+
rewardBase: account.rewardBase !== void 0 ? Number(account.rewardBase) : void 0,
|
|
149
|
+
totalBoxBytes: account.totalBoxBytes !== void 0 ? Number(account.totalBoxBytes) : void 0,
|
|
150
|
+
totalBoxes: account.totalBoxes !== void 0 ? Number(account.totalBoxes) : void 0,
|
|
151
|
+
lastHeartbeat: account.lastHeartbeat !== void 0 ? Number(account.lastHeartbeat) : void 0,
|
|
152
|
+
lastProposed: account.lastProposed !== void 0 ? Number(account.lastProposed) : void 0
|
|
153
|
+
};
|
|
150
154
|
}
|
|
151
155
|
/**
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
156
|
+
* @deprecated Use `algorand.asset.getAccountInformation(sender, assetId)` or `new AssetManager(...).getAccountInformation(sender, assetId)` instead.
|
|
157
|
+
*
|
|
158
|
+
* Returns the given sender account's asset holding for a given asset.
|
|
159
|
+
*
|
|
160
|
+
* @example
|
|
161
|
+
* ```typescript
|
|
162
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
163
|
+
* const assetId = 123345;
|
|
164
|
+
* const accountInfo = await account.getAccountAssetInformation(address, assetId, algod);
|
|
165
|
+
* ```
|
|
166
|
+
*
|
|
167
|
+
* [Response data schema details](https://dev.algorand.co/reference/rest-api/algod/operations/accountassetinformation/)
|
|
168
|
+
* @param sender The address of the sender/account to look up
|
|
169
|
+
* @param assetId The ID of the asset to return a holding for
|
|
170
|
+
* @param algod The algod instance
|
|
171
|
+
* @returns The account asset holding information
|
|
172
|
+
*/
|
|
169
173
|
async function getAccountAssetInformation(sender, assetId, algod) {
|
|
170
|
-
|
|
174
|
+
return require_algorand_client.AlgorandClient.fromClients({ algod }).asset.getAccountInformation(require_transaction.getSenderAddress(sender), BigInt(assetId));
|
|
171
175
|
}
|
|
172
|
-
|
|
176
|
+
//#endregion
|
|
173
177
|
exports.getAccountAddressAsString = getAccountAddressAsString;
|
|
174
178
|
exports.getAccountAddressAsUint8Array = getAccountAddressAsUint8Array;
|
|
175
179
|
exports.getAccountAssetInformation = getAccountAssetInformation;
|
|
@@ -179,4 +183,5 @@ exports.multisigAccount = multisigAccount;
|
|
|
179
183
|
exports.randomAccount = randomAccount;
|
|
180
184
|
exports.rekeyedAccount = rekeyedAccount;
|
|
181
185
|
exports.transactionSignerAccount = transactionSignerAccount;
|
|
182
|
-
|
|
186
|
+
|
|
187
|
+
//# sourceMappingURL=account.js.map
|
package/account/account.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account.js","sources":["../../src/account/account.ts"],"sourcesContent":["import algosdk, { Address } from 'algosdk'\nimport { getSenderAddress } from '../transaction/transaction'\nimport { AccountAssetInformation, MultisigAccount, SigningAccount, TransactionSignerAccount } from '../types/account'\nimport { AccountManager } from '../types/account-manager'\nimport { AlgorandClient } from '../types/algorand-client'\nimport { AlgoAmount } from '../types/amount'\nimport { ClientManager } from '../types/client-manager'\nimport { SendTransactionFrom } from '../types/transaction'\nimport Account = algosdk.Account\nimport Algodv2 = algosdk.Algodv2\nimport Kmd = algosdk.Kmd\nimport MultisigMetadata = algosdk.MultisigMetadata\nimport TransactionSigner = algosdk.TransactionSigner\nimport AccountInformationModel = algosdk.modelsv2.Account\n\n/**\n * @deprecated Use `algorand.account.multisig(multisigParams, signingAccounts)` or `new MultisigAccount(multisigParams, signingAccounts)` instead.\n *\n * Returns an account wrapper that supports partial or full multisig signing.\n * @param multisigParams The parameters that define the multisig account\n * @param signingAccounts The signers that are currently present\n * @returns A multisig account wrapper\n */\nexport function multisigAccount(multisigParams: MultisigMetadata, signingAccounts: (Account | SigningAccount)[]) {\n return new MultisigAccount(multisigParams, signingAccounts)\n}\n\n/**\n * @deprecated Use `algorand.account.rekeyed(sender, account)` or `new SigningAccount(account, sender)` instead.\n *\n * Returns an account wrapper that supports a rekeyed account.\n * @param signer The account, with private key loaded, that is signing\n * @param sender The address of the rekeyed account that will act as a sender\n * @returns The SigningAccount wrapper\n */\nexport function rekeyedAccount(signer: Account, sender: string) {\n return new SigningAccount(signer, sender)\n}\n\n/**\n * @deprecated Use `algorand.account.getSigner(sender)` (after previously registering the signer with `setSigner`) or `{ addr: sender, signer }` instead.\n *\n * Returns an account wrapper that supports a transaction signer with associated sender address.\n * @param signer The transaction signer\n * @param sender The address of sender account\n * @returns The SigningAccount wrapper\n */\nexport function transactionSignerAccount(signer: TransactionSigner, sender: string): TransactionSignerAccount {\n return { addr: Address.fromString(sender), signer }\n}\n\n/**\n * @deprecated Use `algorand.account.random()` or `algosdk.generateAccount()` instead.\n *\n * Returns a new, random Algorand account with secret key loaded.\n *\n * This is a wrapper around algosdk.generateAccount to provide a more friendly/obvious name.\n *\n */\nexport function randomAccount(): Account {\n // This method is confusingly named, so this function provides a more dev friendly \"wrapper\" name\n return algosdk.generateAccount()\n}\n\n/**\n * @deprecated Use `algorand.account.fromEnvironment(name, fundWith)` or `new AccountManager(clientManager).fromEnvironment()` instead.\n *\n * Returns an Algorand account with private key loaded by convention from environment variables based on the given name identifier.\n *\n * Note: This function expects to run in a Node.js environment.\n *\n * ## Convention:\n * * **Non-LocalNet:** will load process.env['\\{NAME\\}_MNEMONIC'] as a mnemonic secret; **Note: Be careful how the mnemonic is handled**,\n * never commit it into source control and ideally load it via a secret storage service rather than the file system.\n * If process.env['\\{NAME\\}_SENDER'] is defined then it will use that for the sender address (i.e. to support rekeyed accounts)\n * * **LocalNet:** will load the account from a KMD wallet called \\{NAME\\} and if that wallet doesn't exist it will create it and fund the account for you\n *\n * This allows you to write code that will work seamlessly in production and local development (LocalNet) without manual config locally (including when you reset the LocalNet).\n *\n * @example Default\n *\n * If you have a mnemonic secret loaded into `process.env.MY_ACCOUNT_MNEMONIC` then you can call the following to get that private key loaded into an account object:\n * ```typescript\n * const account = await mnemonicAccountFromEnvironment('MY_ACCOUNT', algod)\n * ```\n *\n * If that code runs against LocalNet then a wallet called `MY_ACCOUNT` will automatically be created with an account that is automatically funded with 1000 (default) ALGO from the default LocalNet dispenser.\n * If not running against LocalNet then it will use proces.env.MY_ACCOUNT_MNEMONIC as the private key and (if present) process.env.MY_ACCOUNT_SENDER as the sender address.\n *\n * @param account The details of the account to get, either the name identifier (string) or an object with:\n * * `name`: string: The name identifier of the account\n * * `fundWith`: The amount to fund the account with when it gets created (when targeting LocalNet), if not specified then 1000 ALGO will be funded from the dispenser account\n * @param algod An algod client\n * @param kmdClient An optional KMD client to use to create an account (when targeting LocalNet), if not specified then a default KMD client will be loaded from environment variables\n * @returns The requested account with private key loaded from the environment variables or when targeting LocalNet from KMD (idempotently creating and funding the account)\n */\nexport async function mnemonicAccountFromEnvironment(\n account: string | { name: string; fundWith?: AlgoAmount },\n algod: Algodv2,\n kmdClient?: Kmd,\n): Promise<Account | SigningAccount> {\n return (\n await new AccountManager(new ClientManager({ algod, kmd: kmdClient })).fromEnvironment(\n typeof account === 'string' ? account : account.name,\n typeof account === 'string' ? undefined : account.fundWith,\n )\n ).account\n}\n\n/**\n * @deprecated Use `algosdk.decodeAddress` instead.\n *\n * Returns an account's address as a byte array\n *\n * @param account Either an account (with private key loaded) or the string address of an account\n */\nexport function getAccountAddressAsUint8Array(account: SendTransactionFrom | string) {\n return algosdk.decodeAddress(typeof account === 'string' ? account : getSenderAddress(account)).publicKey\n}\n\n/**\n * @deprecated Use `algosdk.encodeAddress` instead.\n *\n * Returns the string address of an Algorand account from a base64 encoded version of the underlying byte array of the address public key\n *\n * @param addressEncodedInB64 The base64 encoded version of the underlying byte array of the address public key\n */\nexport function getAccountAddressAsString(addressEncodedInB64: string): string {\n return algosdk.encodeAddress(Buffer.from(addressEncodedInB64, 'base64'))\n}\n\nexport type NumberConverter<T extends AccountInformationModel> = { [key in keyof T]: ToNumberIfExtends<T[key], number | bigint> }\ntype ToNumberIfExtends<K, E> = K extends E ? number : K\n/** @deprecated Account information at a given round. */\nexport type AccountInformation = Omit<NumberConverter<AccountInformationModel>, 'getEncodingSchema' | 'toEncodingData' | 'authAddr'> & {\n /** (spend) the address against which signing should be checked. If empty, the address of the current account is used. This field can be updated in any transaction by setting the RekeyTo field. */\n authAddr?: string\n}\n\n/**\n * @deprecated Use `algorand.account.getInformation(sender)` or `new AccountManager(clientManager).getInformation(sender)` instead.\n *\n * Returns the given sender account's current status, balance and spendable amounts.\n *\n * @example\n * ```typescript\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const accountInfo = await account.getInformation(address, algod);\n * ```\n *\n * [Response data schema details](https://dev.algorand.co/reference/rest-apis/algod/#accountinformation)\n * @param sender The address of the sender/account to look up\n * @param algod The algod instance\n * @returns The account information\n */\nexport async function getAccountInformation(sender: string | SendTransactionFrom, algod: Algodv2): Promise<AccountInformation> {\n const account = await algod.accountInformation(getSenderAddress(sender)).do()\n\n return {\n ...account,\n address: account.address.toString(),\n authAddr: account.authAddr ? account.authAddr.toString() : undefined,\n // None of these can practically overflow 2^53\n amount: Number(account.amount),\n amountWithoutPendingRewards: Number(account.amountWithoutPendingRewards),\n minBalance: Number(account.minBalance),\n pendingRewards: Number(account.pendingRewards),\n rewards: Number(account.rewards),\n round: Number(account.round),\n totalAppsOptedIn: Number(account.totalAppsOptedIn),\n totalAssetsOptedIn: Number(account.totalAssetsOptedIn),\n totalCreatedApps: Number(account.totalCreatedApps),\n totalCreatedAssets: Number(account.totalCreatedAssets),\n appsTotalExtraPages: account.appsTotalExtraPages !== undefined ? Number(account.appsTotalExtraPages) : undefined,\n rewardBase: account.rewardBase !== undefined ? Number(account.rewardBase) : undefined,\n totalBoxBytes: account.totalBoxBytes !== undefined ? Number(account.totalBoxBytes) : undefined,\n totalBoxes: account.totalBoxes !== undefined ? Number(account.totalBoxes) : undefined,\n lastHeartbeat: account.lastHeartbeat !== undefined ? Number(account.lastHeartbeat) : undefined,\n lastProposed: account.lastProposed !== undefined ? Number(account.lastProposed) : undefined,\n }\n}\n\n/**\n * @deprecated Use `algorand.asset.getAccountInformation(sender, assetId)` or `new AssetManager(...).getAccountInformation(sender, assetId)` instead.\n *\n * Returns the given sender account's asset holding for a given asset.\n *\n * @example\n * ```typescript\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const assetId = 123345;\n * const accountInfo = await account.getAccountAssetInformation(address, assetId, algod);\n * ```\n *\n * [Response data schema details](https://dev.algorand.co/reference/rest-apis/algod/#accountassetinformation)\n * @param sender The address of the sender/account to look up\n * @param assetId The ID of the asset to return a holding for\n * @param algod The algod instance\n * @returns The account asset holding information\n */\nexport async function getAccountAssetInformation(\n sender: string | SendTransactionFrom,\n assetId: number | bigint,\n algod: Algodv2,\n): Promise<AccountAssetInformation> {\n return AlgorandClient.fromClients({ algod }).asset.getAccountInformation(getSenderAddress(sender), BigInt(assetId))\n}\n"],"names":["MultisigAccount","SigningAccount","Address","AccountManager","ClientManager","getSenderAddress","AlgorandClient"],"mappings":";;;;;;;;;AAeA;;;;;;;AAOG;AACa,SAAA,eAAe,CAAC,cAAgC,EAAE,eAA6C,EAAA;AAC7G,IAAA,OAAO,IAAIA,6BAAe,CAAC,cAAc,EA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AS,GAAG,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,GAAG,SAAS;AAC9F,QAAA,UAAU,EAAE,OAAO,CAAC,UAAU,KAAK,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,SAAS;AACrF,QAAA,aAAa,EAAE,OAAO,CAAC,aAAa,KAAK,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,GAAG,SAAS;AAC9F,QAAA,YAAY,EAAE,OAAO,CAAC,YAAY,KAAK,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,GAAG,SAAS;KAC5F;AACH;AAEA;;;;;;;;;;;;;;;;;AAiBG;AACI,eAAe,0BAA0B,CAC9C,MAAoC,EACpC,OAAwB,EACxB,KAAc,EAAA;IAEd,OAAOC,mCAAc,CAAC,WAAW,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,qBAAqB,CAACD,4BAAgB,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;AACrH;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"account.js","names":["MultisigAccount","SigningAccount","Address","AccountManager","ClientManager","getSenderAddress","AlgorandClient"],"sources":["../../src/account/account.ts"],"sourcesContent":["import algosdk, { Address } from 'algosdk'\nimport { getSenderAddress } from '../transaction/transaction'\nimport { AccountAssetInformation, MultisigAccount, SigningAccount, TransactionSignerAccount } from '../types/account'\nimport { AccountManager } from '../types/account-manager'\nimport { AlgorandClient } from '../types/algorand-client'\nimport { AlgoAmount } from '../types/amount'\nimport { ClientManager } from '../types/client-manager'\nimport { SendTransactionFrom } from '../types/transaction'\nimport Account = algosdk.Account\nimport Algodv2 = algosdk.Algodv2\nimport Kmd = algosdk.Kmd\nimport MultisigMetadata = algosdk.MultisigMetadata\nimport TransactionSigner = algosdk.TransactionSigner\nimport AccountInformationModel = algosdk.modelsv2.Account\n\n/**\n * @deprecated Use `algorand.account.multisig(multisigParams, signingAccounts)` or `new MultisigAccount(multisigParams, signingAccounts)` instead.\n *\n * Returns an account wrapper that supports partial or full multisig signing.\n * @param multisigParams The parameters that define the multisig account\n * @param signingAccounts The signers that are currently present\n * @returns A multisig account wrapper\n */\nexport function multisigAccount(multisigParams: MultisigMetadata, signingAccounts: (Account | SigningAccount)[]) {\n return new MultisigAccount(multisigParams, signingAccounts)\n}\n\n/**\n * @deprecated Use `algorand.account.rekeyed(sender, account)` or `new SigningAccount(account, sender)` instead.\n *\n * Returns an account wrapper that supports a rekeyed account.\n * @param signer The account, with private key loaded, that is signing\n * @param sender The address of the rekeyed account that will act as a sender\n * @returns The SigningAccount wrapper\n */\nexport function rekeyedAccount(signer: Account, sender: string) {\n return new SigningAccount(signer, sender)\n}\n\n/**\n * @deprecated Use `algorand.account.getSigner(sender)` (after previously registering the signer with `setSigner`) or `{ addr: sender, signer }` instead.\n *\n * Returns an account wrapper that supports a transaction signer with associated sender address.\n * @param signer The transaction signer\n * @param sender The address of sender account\n * @returns The SigningAccount wrapper\n */\nexport function transactionSignerAccount(signer: TransactionSigner, sender: string): TransactionSignerAccount {\n return { addr: Address.fromString(sender), signer }\n}\n\n/**\n * @deprecated Use `algorand.account.random()` or `algosdk.generateAccount()` instead.\n *\n * Returns a new, random Algorand account with secret key loaded.\n *\n * This is a wrapper around algosdk.generateAccount to provide a more friendly/obvious name.\n *\n */\nexport function randomAccount(): Account {\n // This method is confusingly named, so this function provides a more dev friendly \"wrapper\" name\n return algosdk.generateAccount()\n}\n\n/**\n * @deprecated Use `algorand.account.fromEnvironment(name, fundWith)` or `new AccountManager(clientManager).fromEnvironment()` instead.\n *\n * Returns an Algorand account with private key loaded by convention from environment variables based on the given name identifier.\n *\n * Note: This function expects to run in a Node.js environment.\n *\n * ## Convention:\n * * **Non-LocalNet:** will load process.env['\\{NAME\\}_MNEMONIC'] as a mnemonic secret; **Note: Be careful how the mnemonic is handled**,\n * never commit it into source control and ideally load it via a secret storage service rather than the file system.\n * If process.env['\\{NAME\\}_SENDER'] is defined then it will use that for the sender address (i.e. to support rekeyed accounts)\n * * **LocalNet:** will load the account from a KMD wallet called \\{NAME\\} and if that wallet doesn't exist it will create it and fund the account for you\n *\n * This allows you to write code that will work seamlessly in production and local development (LocalNet) without manual config locally (including when you reset the LocalNet).\n *\n * @example Default\n *\n * If you have a mnemonic secret loaded into `process.env.MY_ACCOUNT_MNEMONIC` then you can call the following to get that private key loaded into an account object:\n * ```typescript\n * const account = await mnemonicAccountFromEnvironment('MY_ACCOUNT', algod)\n * ```\n *\n * If that code runs against LocalNet then a wallet called `MY_ACCOUNT` will automatically be created with an account that is automatically funded with 1000 (default) ALGO from the default LocalNet dispenser.\n * If not running against LocalNet then it will use proces.env.MY_ACCOUNT_MNEMONIC as the private key and (if present) process.env.MY_ACCOUNT_SENDER as the sender address.\n *\n * @param account The details of the account to get, either the name identifier (string) or an object with:\n * * `name`: string: The name identifier of the account\n * * `fundWith`: The amount to fund the account with when it gets created (when targeting LocalNet), if not specified then 1000 ALGO will be funded from the dispenser account\n * @param algod An algod client\n * @param kmdClient An optional KMD client to use to create an account (when targeting LocalNet), if not specified then a default KMD client will be loaded from environment variables\n * @returns The requested account with private key loaded from the environment variables or when targeting LocalNet from KMD (idempotently creating and funding the account)\n */\nexport async function mnemonicAccountFromEnvironment(\n account: string | { name: string; fundWith?: AlgoAmount },\n algod: Algodv2,\n kmdClient?: Kmd,\n): Promise<Account | SigningAccount> {\n return (\n await new AccountManager(new ClientManager({ algod, kmd: kmdClient })).fromEnvironment(\n typeof account === 'string' ? account : account.name,\n typeof account === 'string' ? undefined : account.fundWith,\n )\n ).account\n}\n\n/**\n * @deprecated Use `algosdk.decodeAddress` instead.\n *\n * Returns an account's address as a byte array\n *\n * @param account Either an account (with private key loaded) or the string address of an account\n */\nexport function getAccountAddressAsUint8Array(account: SendTransactionFrom | string) {\n return algosdk.decodeAddress(typeof account === 'string' ? account : getSenderAddress(account)).publicKey\n}\n\n/**\n * @deprecated Use `algosdk.encodeAddress` instead.\n *\n * Returns the string address of an Algorand account from a base64 encoded version of the underlying byte array of the address public key\n *\n * @param addressEncodedInB64 The base64 encoded version of the underlying byte array of the address public key\n */\nexport function getAccountAddressAsString(addressEncodedInB64: string): string {\n return algosdk.encodeAddress(Buffer.from(addressEncodedInB64, 'base64'))\n}\n\nexport type NumberConverter<T extends AccountInformationModel> = { [key in keyof T]: ToNumberIfExtends<T[key], number | bigint> }\ntype ToNumberIfExtends<K, E> = K extends E ? number : K\n/** @deprecated Account information at a given round. */\nexport type AccountInformation = Omit<NumberConverter<AccountInformationModel>, 'getEncodingSchema' | 'toEncodingData' | 'authAddr'> & {\n /** (spend) the address against which signing should be checked. If empty, the address of the current account is used. This field can be updated in any transaction by setting the RekeyTo field. */\n authAddr?: string\n}\n\n/**\n * @deprecated Use `algorand.account.getInformation(sender)` or `new AccountManager(clientManager).getInformation(sender)` instead.\n *\n * Returns the given sender account's current status, balance and spendable amounts.\n *\n * @example\n * ```typescript\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const accountInfo = await account.getInformation(address, algod);\n * ```\n *\n * [Response data schema details](https://dev.algorand.co/reference/rest-api/algod/operations/accountinformation/)\n * @param sender The address of the sender/account to look up\n * @param algod The algod instance\n * @returns The account information\n */\nexport async function getAccountInformation(sender: string | SendTransactionFrom, algod: Algodv2): Promise<AccountInformation> {\n const account = await algod.accountInformation(getSenderAddress(sender)).do()\n\n return {\n ...account,\n address: account.address.toString(),\n authAddr: account.authAddr ? account.authAddr.toString() : undefined,\n // None of these can practically overflow 2^53\n amount: Number(account.amount),\n amountWithoutPendingRewards: Number(account.amountWithoutPendingRewards),\n minBalance: Number(account.minBalance),\n pendingRewards: Number(account.pendingRewards),\n rewards: Number(account.rewards),\n round: Number(account.round),\n totalAppsOptedIn: Number(account.totalAppsOptedIn),\n totalAssetsOptedIn: Number(account.totalAssetsOptedIn),\n totalCreatedApps: Number(account.totalCreatedApps),\n totalCreatedAssets: Number(account.totalCreatedAssets),\n appsTotalExtraPages: account.appsTotalExtraPages !== undefined ? Number(account.appsTotalExtraPages) : undefined,\n rewardBase: account.rewardBase !== undefined ? Number(account.rewardBase) : undefined,\n totalBoxBytes: account.totalBoxBytes !== undefined ? Number(account.totalBoxBytes) : undefined,\n totalBoxes: account.totalBoxes !== undefined ? Number(account.totalBoxes) : undefined,\n lastHeartbeat: account.lastHeartbeat !== undefined ? Number(account.lastHeartbeat) : undefined,\n lastProposed: account.lastProposed !== undefined ? Number(account.lastProposed) : undefined,\n }\n}\n\n/**\n * @deprecated Use `algorand.asset.getAccountInformation(sender, assetId)` or `new AssetManager(...).getAccountInformation(sender, assetId)` instead.\n *\n * Returns the given sender account's asset holding for a given asset.\n *\n * @example\n * ```typescript\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const assetId = 123345;\n * const accountInfo = await account.getAccountAssetInformation(address, assetId, algod);\n * ```\n *\n * [Response data schema details](https://dev.algorand.co/reference/rest-api/algod/operations/accountassetinformation/)\n * @param sender The address of the sender/account to look up\n * @param assetId The ID of the asset to return a holding for\n * @param algod The algod instance\n * @returns The account asset holding information\n */\nexport async function getAccountAssetInformation(\n sender: string | SendTransactionFrom,\n assetId: number | bigint,\n algod: Algodv2,\n): Promise<AccountAssetInformation> {\n return AlgorandClient.fromClients({ algod }).asset.getAccountInformation(getSenderAddress(sender), BigInt(assetId))\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAuBA,SAAgB,gBAAgB,gBAAkC,iBAA+C;CAC/G,OAAO,IAAIA,gBAAAA,gBAAgB,gBAAgB,eAAe;AAC5D;;;;;;;;;AAUA,SAAgB,eAAe,QAAiB,QAAgB;CAC9D,OAAO,IAAIC,gBAAAA,eAAe,QAAQ,MAAM;AAC1C;;;;;;;;;AAUA,SAAgB,yBAAyB,QAA2B,QAA0C;CAC5G,OAAO;EAAE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