@algorandfoundation/algokit-utils 6.2.1 → 6.3.0-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.
Files changed (159) hide show
  1. package/account/account.d.ts +13 -5
  2. package/account/account.d.ts.map +1 -1
  3. package/account/account.js +26 -6
  4. package/account/account.js.map +1 -1
  5. package/account/account.mjs +26 -6
  6. package/account/account.mjs.map +1 -1
  7. package/account/get-account.d.ts +4 -4
  8. package/account/get-account.js +2 -2
  9. package/account/get-account.mjs +2 -2
  10. package/amount.d.ts +28 -6
  11. package/amount.d.ts.map +1 -1
  12. package/amount.js +31 -11
  13. package/amount.js.map +1 -1
  14. package/amount.mjs +30 -12
  15. package/amount.mjs.map +1 -1
  16. package/asset.d.ts +10 -0
  17. package/asset.d.ts.map +1 -1
  18. package/asset.js +71 -198
  19. package/asset.js.map +1 -1
  20. package/asset.mjs +72 -199
  21. package/asset.mjs.map +1 -1
  22. package/dispenser-client.d.ts +1 -1
  23. package/dispenser-client.js +2 -2
  24. package/dispenser-client.js.map +1 -1
  25. package/dispenser-client.mjs +2 -2
  26. package/dispenser-client.mjs.map +1 -1
  27. package/index.d.ts +4 -3
  28. package/index.d.ts.map +1 -1
  29. package/index.js +11 -8
  30. package/index.js.map +1 -1
  31. package/index.mjs +6 -4
  32. package/index.mjs.map +1 -1
  33. package/localnet/get-or-create-kmd-wallet-account.d.ts +1 -1
  34. package/localnet/get-or-create-kmd-wallet-account.js +1 -1
  35. package/localnet/get-or-create-kmd-wallet-account.mjs +1 -1
  36. package/package.json +3 -2
  37. package/testing/_asset.d.ts +2 -4
  38. package/testing/_asset.d.ts.map +1 -1
  39. package/testing/account.js +8 -2
  40. package/testing/account.js.map +1 -1
  41. package/testing/account.mjs +8 -2
  42. package/testing/account.mjs.map +1 -1
  43. package/testing/fixtures/algorand-fixture.d.ts +1 -1
  44. package/testing/fixtures/algorand-fixture.js +7 -2
  45. package/testing/fixtures/algorand-fixture.js.map +1 -1
  46. package/testing/fixtures/algorand-fixture.mjs +7 -2
  47. package/testing/fixtures/algorand-fixture.mjs.map +1 -1
  48. package/transaction/legacy-bridge.d.ts +10 -0
  49. package/transaction/legacy-bridge.d.ts.map +1 -0
  50. package/transaction/legacy-bridge.js +35 -0
  51. package/transaction/legacy-bridge.js.map +1 -0
  52. package/transaction/legacy-bridge.mjs +33 -0
  53. package/transaction/legacy-bridge.mjs.map +1 -0
  54. package/transaction/transaction.d.ts +1 -1
  55. package/transaction/transaction.js +5 -5
  56. package/transaction/transaction.js.map +1 -1
  57. package/transaction/transaction.mjs +5 -5
  58. package/transaction/transaction.mjs.map +1 -1
  59. package/transfer/transfer-algos.d.ts +4 -2
  60. package/transfer/transfer-algos.d.ts.map +1 -1
  61. package/transfer/transfer-algos.js +13 -22
  62. package/transfer/transfer-algos.js.map +1 -1
  63. package/transfer/transfer-algos.mjs +14 -23
  64. package/transfer/transfer-algos.mjs.map +1 -1
  65. package/transfer/transfer.d.ts +8 -1
  66. package/transfer/transfer.d.ts.map +1 -1
  67. package/transfer/transfer.js +57 -94
  68. package/transfer/transfer.js.map +1 -1
  69. package/transfer/transfer.mjs +58 -95
  70. package/transfer/transfer.mjs.map +1 -1
  71. package/types/account-manager.d.ts +141 -24
  72. package/types/account-manager.d.ts.map +1 -1
  73. package/types/account-manager.js +217 -44
  74. package/types/account-manager.js.map +1 -1
  75. package/types/account-manager.mjs +216 -43
  76. package/types/account-manager.mjs.map +1 -1
  77. package/types/account.d.ts +122 -7
  78. package/types/account.d.ts.map +1 -1
  79. package/types/account.js.map +1 -1
  80. package/types/account.mjs.map +1 -1
  81. package/types/algorand-client-transaction-creator.d.ts +289 -0
  82. package/types/algorand-client-transaction-creator.d.ts.map +1 -0
  83. package/types/algorand-client-transaction-creator.js +299 -0
  84. package/types/algorand-client-transaction-creator.js.map +1 -0
  85. package/types/algorand-client-transaction-creator.mjs +297 -0
  86. package/types/algorand-client-transaction-creator.mjs.map +1 -0
  87. package/types/algorand-client-transaction-sender.d.ts +433 -0
  88. package/types/algorand-client-transaction-sender.d.ts.map +1 -0
  89. package/types/algorand-client-transaction-sender.js +422 -0
  90. package/types/algorand-client-transaction-sender.js.map +1 -0
  91. package/types/algorand-client-transaction-sender.mjs +420 -0
  92. package/types/algorand-client-transaction-sender.mjs.map +1 -0
  93. package/types/algorand-client.d.ts +28 -78
  94. package/types/algorand-client.d.ts.map +1 -1
  95. package/types/algorand-client.js +33 -122
  96. package/types/algorand-client.js.map +1 -1
  97. package/types/algorand-client.mjs +34 -123
  98. package/types/algorand-client.mjs.map +1 -1
  99. package/types/amount.d.ts +18 -6
  100. package/types/amount.d.ts.map +1 -1
  101. package/types/amount.js +33 -10
  102. package/types/amount.js.map +1 -1
  103. package/types/amount.mjs +33 -10
  104. package/types/amount.mjs.map +1 -1
  105. package/types/app-client.d.ts +3 -3
  106. package/types/app-client.d.ts.map +1 -1
  107. package/types/app-client.js +7 -10
  108. package/types/app-client.js.map +1 -1
  109. package/types/app-client.mjs +8 -11
  110. package/types/app-client.mjs.map +1 -1
  111. package/types/asset-manager.d.ts +205 -0
  112. package/types/asset-manager.d.ts.map +1 -0
  113. package/types/asset-manager.js +180 -0
  114. package/types/asset-manager.js.map +1 -0
  115. package/types/asset-manager.mjs +178 -0
  116. package/types/asset-manager.mjs.map +1 -0
  117. package/types/asset.d.ts +4 -4
  118. package/types/asset.d.ts.map +1 -1
  119. package/types/client-manager.d.ts +40 -2
  120. package/types/client-manager.d.ts.map +1 -1
  121. package/types/client-manager.js +44 -3
  122. package/types/client-manager.js.map +1 -1
  123. package/types/client-manager.mjs +44 -3
  124. package/types/client-manager.mjs.map +1 -1
  125. package/types/composer.d.ts +226 -68
  126. package/types/composer.d.ts.map +1 -1
  127. package/types/composer.js +78 -64
  128. package/types/composer.js.map +1 -1
  129. package/types/composer.mjs +75 -64
  130. package/types/composer.mjs.map +1 -1
  131. package/types/dispenser-client.d.ts +12 -4
  132. package/types/dispenser-client.d.ts.map +1 -1
  133. package/types/dispenser-client.js +9 -9
  134. package/types/dispenser-client.js.map +1 -1
  135. package/types/dispenser-client.mjs +9 -9
  136. package/types/dispenser-client.mjs.map +1 -1
  137. package/types/indexer.d.ts +7 -7
  138. package/types/indexer.d.ts.map +1 -1
  139. package/types/kmd-account-manager.d.ts +3 -3
  140. package/types/kmd-account-manager.js +6 -6
  141. package/types/kmd-account-manager.js.map +1 -1
  142. package/types/kmd-account-manager.mjs +7 -7
  143. package/types/kmd-account-manager.mjs.map +1 -1
  144. package/types/network-client.d.ts +7 -1
  145. package/types/network-client.d.ts.map +1 -1
  146. package/types/network-client.js +10 -0
  147. package/types/network-client.js.map +1 -1
  148. package/types/network-client.mjs +9 -0
  149. package/types/network-client.mjs.map +1 -1
  150. package/types/testing.d.ts +1 -1
  151. package/types/testing.d.ts.map +1 -1
  152. package/types/transfer.d.ts +8 -7
  153. package/types/transfer.d.ts.map +1 -1
  154. package/util.d.ts +13 -0
  155. package/util.d.ts.map +1 -1
  156. package/util.js +25 -0
  157. package/util.js.map +1 -1
  158. package/util.mjs +24 -1
  159. package/util.mjs.map +1 -1
@@ -1,5 +1,5 @@
1
1
  import algosdk from 'algosdk';
2
- import { AccountAssetInformation, AccountInformation, MultisigAccount, SigningAccount, TransactionSignerAccount } from '../types/account';
2
+ import { AccountAssetInformation, MultisigAccount, SigningAccount, TransactionSignerAccount } from '../types/account';
3
3
  import { AlgoAmount } from '../types/amount';
4
4
  import { SendTransactionFrom } from '../types/transaction';
5
5
  import Account = algosdk.Account;
@@ -7,6 +7,7 @@ import Algodv2 = algosdk.Algodv2;
7
7
  import Kmd = algosdk.Kmd;
8
8
  import MultisigMetadata = algosdk.MultisigMetadata;
9
9
  import TransactionSigner = algosdk.TransactionSigner;
10
+ import AccountInformationModel = algosdk.modelsv2.Account;
10
11
  /**
11
12
  * @deprecated Use `algorandClient.account.multisig(multisigParams, signingAccounts)` or `new MultisigAccount(multisigParams, signingAccounts)` instead.
12
13
  *
@@ -17,7 +18,7 @@ import TransactionSigner = algosdk.TransactionSigner;
17
18
  */
18
19
  export declare function multisigAccount(multisigParams: MultisigMetadata, signingAccounts: (Account | SigningAccount)[]): MultisigAccount;
19
20
  /**
20
- * @deprecated Use `algorandClient.account.rekeyed(account, sender)` or `new SigningAccount(account, sender)` instead.
21
+ * @deprecated Use `algorandClient.account.rekeyed(sender, account)` or `new SigningAccount(account, sender)` instead.
21
22
  *
22
23
  * Returns an account wrapper that supports a rekeyed account.
23
24
  * @param signer The account, with private key loaded, that is signing
@@ -65,12 +66,12 @@ export declare function randomAccount(): Account;
65
66
  * const account = await mnemonicAccountFromEnvironment('MY_ACCOUNT', algod)
66
67
  * ```
67
68
  *
68
- * 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) ALGOs from the default LocalNet dispenser.
69
+ * 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.
69
70
  * 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.
70
71
  *
71
72
  * @param account The details of the account to get, either the name identifier (string) or an object with:
72
73
  * * `name`: string: The name identifier of the account
73
- * * `fundWith`: The amount to fund the account with when it gets created (when targeting LocalNet), if not specified then 1000 Algos will be funded from the dispenser account
74
+ * * `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
74
75
  * @param algod An algod client
75
76
  * @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
76
77
  * @returns The requested account with private key loaded from the environment variables or when targeting LocalNet from KMD (idempotently creating and funding the account)
@@ -95,6 +96,12 @@ export declare function getAccountAddressAsUint8Array(account: SendTransactionFr
95
96
  * @param addressEncodedInB64 The base64 encoded version of the underlying byte array of the address public key
96
97
  */
97
98
  export declare function getAccountAddressAsString(addressEncodedInB64: string): string;
99
+ type NumberConverter<T extends AccountInformationModel> = {
100
+ [key in keyof T]: ToNumberIfExtends<T[key], number | bigint>;
101
+ };
102
+ type ToNumberIfExtends<K, E> = K extends E ? number : K;
103
+ /** @deprecated Account information at a given round. */
104
+ export type AccountInformation = Omit<NumberConverter<AccountInformationModel>, 'get_obj_for_encoding'>;
98
105
  /**
99
106
  * @deprecated Use `algorandClient.account.getInformation(sender)` or `new AccountManager(clientManager).getInformation(sender)` instead.
100
107
  *
@@ -113,7 +120,7 @@ export declare function getAccountAddressAsString(addressEncodedInB64: string):
113
120
  */
114
121
  export declare function getAccountInformation(sender: string | SendTransactionFrom, algod: Algodv2): Promise<AccountInformation>;
115
122
  /**
116
- * @deprecated Use `algorandClient.account.getAssetInformation(sender, assetId)` or `new AccountManager(clientManager).getAssetInformation(sender, assetId)` instead.
123
+ * @deprecated Use `algorandClient.asset.getAccountInformation(sender, assetId)` or `new AssetManager(...).getAccountInformation(sender, assetId)` instead.
117
124
  *
118
125
  * Returns the given sender account's asset holding for a given asset.
119
126
  *
@@ -131,4 +138,5 @@ export declare function getAccountInformation(sender: string | SendTransactionFr
131
138
  * @returns The account asset holding information
132
139
  */
133
140
  export declare function getAccountAssetInformation(sender: string | SendTransactionFrom, assetId: number | bigint, algod: Algodv2): Promise<AccountAssetInformation>;
141
+ export {};
134
142
  //# sourceMappingURL=account.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"account.d.ts","sourceRoot":"","sources":["../../src/account/account.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAA;AAE7B,OAAO,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,eAAe,EAAE,cAAc,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAA;AAEzI,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAE5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,OAAO,GAAG,OAAO,CAAC,OAAO,CAAA;AAChC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,EAAE,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,UAAU,CAAA;CAAE,EACzD,KAAK,EAAE,OAAO,EACd,SAAS,CAAC,EAAE,GAAG,GACd,OAAO,CAAC,OAAO,GAAG,cAAc,CAAC,CAOnC;AAED;;;;;;GAMG;AACH,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,mBAAmB,GAAG,MAAM,cAElF;AAED;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CAAC,mBAAmB,EAAE,MAAM,GAAG,MAAM,CAE7E;AAED,KAAK,eAAe,CAAC,CAAC,SAAS,uBAAuB,IAAI;KAAG,GAAG,IAAI,MAAM,CAAC,GAAG,iBAAiB,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAAE,CAAA;AAC1H,KAAK,iBAAiB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,MAAM,GAAG,CAAC,CAAA;AACvD,wDAAwD;AACxD,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,eAAe,CAAC,uBAAuB,CAAC,EAAE,sBAAsB,CAAC,CAAA;AAEvG;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,mBAAmB,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAqB7H;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,0BAA0B,CAC9C,MAAM,EAAE,MAAM,GAAG,mBAAmB,EACpC,OAAO,EAAE,MAAM,GAAG,MAAM,EACxB,KAAK,EAAE,OAAO,GACb,OAAO,CAAC,uBAAuB,CAAC,CAElC"}
@@ -4,8 +4,10 @@ var algosdk = require('algosdk');
4
4
  var transaction = require('../transaction/transaction.js');
5
5
  var types_account = require('../types/account.js');
6
6
  var types_accountManager = require('../types/account-manager.js');
7
+ var types_algorandClient = require('../types/algorand-client.js');
7
8
  var types_clientManager = require('../types/client-manager.js');
8
9
 
10
+ var AccountInformationModel = algosdk.modelsv2.Account;
9
11
  /**
10
12
  * @deprecated Use `algorandClient.account.multisig(multisigParams, signingAccounts)` or `new MultisigAccount(multisigParams, signingAccounts)` instead.
11
13
  *
@@ -18,7 +20,7 @@ function multisigAccount(multisigParams, signingAccounts) {
18
20
  return new types_account.MultisigAccount(multisigParams, signingAccounts);
19
21
  }
20
22
  /**
21
- * @deprecated Use `algorandClient.account.rekeyed(account, sender)` or `new SigningAccount(account, sender)` instead.
23
+ * @deprecated Use `algorandClient.account.rekeyed(sender, account)` or `new SigningAccount(account, sender)` instead.
22
24
  *
23
25
  * Returns an account wrapper that supports a rekeyed account.
24
26
  * @param signer The account, with private key loaded, that is signing
@@ -73,12 +75,12 @@ function randomAccount() {
73
75
  * const account = await mnemonicAccountFromEnvironment('MY_ACCOUNT', algod)
74
76
  * ```
75
77
  *
76
- * 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) ALGOs from the default LocalNet dispenser.
78
+ * 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.
77
79
  * 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.
78
80
  *
79
81
  * @param account The details of the account to get, either the name identifier (string) or an object with:
80
82
  * * `name`: string: The name identifier of the account
81
- * * `fundWith`: The amount to fund the account with when it gets created (when targeting LocalNet), if not specified then 1000 Algos will be funded from the dispenser account
83
+ * * `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
82
84
  * @param algod An algod client
83
85
  * @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
84
86
  * @returns The requested account with private key loaded from the environment variables or when targeting LocalNet from KMD (idempotently creating and funding the account)
@@ -123,10 +125,28 @@ function getAccountAddressAsString(addressEncodedInB64) {
123
125
  * @returns The account information
124
126
  */
125
127
  async function getAccountInformation(sender, algod) {
126
- return new types_accountManager.AccountManager(new types_clientManager.ClientManager({ algod })).getInformation(transaction.getSenderAddress(sender));
128
+ const account = AccountInformationModel.from_obj_for_encoding(await algod.accountInformation(transaction.getSenderAddress(sender)).do());
129
+ return {
130
+ ...account,
131
+ // None of these can practically overflow 2^53
132
+ amount: Number(account.amount),
133
+ amountWithoutPendingRewards: Number(account.amountWithoutPendingRewards),
134
+ minBalance: Number(account.minBalance),
135
+ pendingRewards: Number(account.pendingRewards),
136
+ rewards: Number(account.rewards),
137
+ round: Number(account.round),
138
+ totalAppsOptedIn: Number(account.totalAppsOptedIn),
139
+ totalAssetsOptedIn: Number(account.totalAssetsOptedIn),
140
+ totalCreatedApps: Number(account.totalCreatedApps),
141
+ totalCreatedAssets: Number(account.totalCreatedAssets),
142
+ appsTotalExtraPages: account.appsTotalExtraPages ? Number(account.appsTotalExtraPages) : undefined,
143
+ rewardBase: account.rewardBase ? Number(account.rewardBase) : undefined,
144
+ totalBoxBytes: account.totalBoxBytes ? Number(account.totalBoxBytes) : undefined,
145
+ totalBoxes: account.totalBoxes ? Number(account.totalBoxes) : undefined,
146
+ };
127
147
  }
128
148
  /**
129
- * @deprecated Use `algorandClient.account.getAssetInformation(sender, assetId)` or `new AccountManager(clientManager).getAssetInformation(sender, assetId)` instead.
149
+ * @deprecated Use `algorandClient.asset.getAccountInformation(sender, assetId)` or `new AssetManager(...).getAccountInformation(sender, assetId)` instead.
130
150
  *
131
151
  * Returns the given sender account's asset holding for a given asset.
132
152
  *
@@ -144,7 +164,7 @@ async function getAccountInformation(sender, algod) {
144
164
  * @returns The account asset holding information
145
165
  */
146
166
  async function getAccountAssetInformation(sender, assetId, algod) {
147
- return new types_accountManager.AccountManager(new types_clientManager.ClientManager({ algod })).getAssetInformation(transaction.getSenderAddress(sender), assetId);
167
+ return types_algorandClient.AlgorandClient.fromClients({ algod }).asset.getAccountInformation(transaction.getSenderAddress(sender), BigInt(assetId));
148
168
  }
149
169
 
150
170
  exports.getAccountAddressAsString = getAccountAddressAsString;
@@ -1 +1 @@
1
- {"version":3,"file":"account.js","sources":["../../src/account/account.ts"],"sourcesContent":[null],"names":["MultisigAccount","SigningAccount","AccountManager","ClientManager","getSenderAddress"],"mappings":";;;;;;;;AAaA;;;;;;;AAOG;AACa,SAAA,eAAe,CAAC,cAAgC,EAAE,eAA6C,EAAA;AAC7G,IAAA,OAAO,IAAIA,6BAAe,CAAC,cAAc,EAAE,eAAe,CAAC,CAAA;AAC7D,CAAC;AAED;;;;;;;AAOG;AACa,SAAA,cAAc,CAAC,MAAe,EAAE,MAAc,EAAA;AAC5D,IAAA,OAAO,IAAIC,4BAAc,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AAC3C,CAAC;AAED;;;;;;;AAOG;AACa,SAAA,wBAAwB,CAAC,MAAyB,EAAE,MAAc,EAAA;AAChF,IAAA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,CAAA;AACjC,CAAC;AAED;;;;;;;AAOG;SACa,aAAa,GAAA;;AAE3B,IAAA,OAAO,OAAO,CAAC,eAAe,EAAE,CAAA;AAClC,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BG;AACI,eAAe,8BAA8B,CAClD,OAAyD,EACzD,KAAc,EACd,SAAe,EAAA;IAEf,OAAO,CACL,MAAM,IAAIC,mCAAc,CAAC,IAAIC,iCAAa,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,eAAe,CACpF,OAAO,OAAO,KAAK,QAAQ,GAAG,OAAO,GAAG,OAAO,CAAC,IAAI,EACpD,OAAO,OAAO,KAAK,QAAQ,GAAG,SAAS,GAAG,OAAO,CAAC,QAAQ,CAC3D,EACD,OAAO,CAAA;AACX,CAAC;AAED;;;;;;AAMG;AACG,SAAU,6BAA6B,CAAC,OAAqC,EAAA;IACjF,OAAO,OAAO,CAAC,aAAa,CAAC,OAAO,OAAO,KAAK,QAAQ,GAAG,OAAO,GAAGC,4BAAgB,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAA;AAC3G,CAAC;AAED;;;;;;AAMG;AACG,SAAU,yBAAyB,CAAC,mBAA2B,EAAA;AACnE,IAAA,OAAO,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,mBAAmB,EAAE,QAAQ,CAAC,CAAC,CAAA;AAC1E,CAAC;AAED;;;;;;;;;;;;;;;AAeG;AACI,eAAe,qBAAqB,CAAC,MAAoC,EAAE,KAAc,EAAA;AAC9F,IAAA,OAAO,IAAIF,mCAAc,CAAC,IAAIC,iCAAa,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,cAAc,CAACC,4BAAgB,CAAC,MAAM,CAAC,CAAC,CAAA;AAClG,CAAC;AAED;;;;;;;;;;;;;;;;;AAiBG;AACI,eAAe,0BAA0B,CAC9C,MAAoC,EACpC,OAAwB,EACxB,KAAc,EAAA;IAEd,OAAO,IAAIF,mCAAc,CAAC,IAAIC,iCAAa,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,mBAAmB,CAACC,4BAAgB,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,CAAA;AAChH;;;;;;;;;;;;"}
1
+ {"version":3,"file":"account.js","sources":["../../src/account/account.ts"],"sourcesContent":[null],"names":["MultisigAccount","SigningAccount","AccountManager","ClientManager","getSenderAddress","AlgorandClient"],"mappings":";;;;;;;;;AAaA,IAAO,uBAAuB,GAAG,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAA;AAEzD;;;;;;;AAOG;AACa,SAAA,eAAe,CAAC,cAAgC,EAAE,eAA6C,EAAA;AAC7G,IAAA,OAAO,IAAIA,6BAAe,CAAC,cAAc,EAAE,eAAe,CAAC,CAAA;AAC7D,CAAC;AAED;;;;;;;AAOG;AACa,SAAA,cAA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;;;;;;;;;;;;;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,CAAA;AACrH;;;;;;;;;;;;"}
@@ -2,8 +2,10 @@ import algosdk from 'algosdk';
2
2
  import { getSenderAddress } from '../transaction/transaction.mjs';
3
3
  import { MultisigAccount, SigningAccount } from '../types/account.mjs';
4
4
  import { AccountManager } from '../types/account-manager.mjs';
5
+ import { AlgorandClient } from '../types/algorand-client.mjs';
5
6
  import { ClientManager } from '../types/client-manager.mjs';
6
7
 
8
+ var AccountInformationModel = algosdk.modelsv2.Account;
7
9
  /**
8
10
  * @deprecated Use `algorandClient.account.multisig(multisigParams, signingAccounts)` or `new MultisigAccount(multisigParams, signingAccounts)` instead.
9
11
  *
@@ -16,7 +18,7 @@ function multisigAccount(multisigParams, signingAccounts) {
16
18
  return new MultisigAccount(multisigParams, signingAccounts);
17
19
  }
18
20
  /**
19
- * @deprecated Use `algorandClient.account.rekeyed(account, sender)` or `new SigningAccount(account, sender)` instead.
21
+ * @deprecated Use `algorandClient.account.rekeyed(sender, account)` or `new SigningAccount(account, sender)` instead.
20
22
  *
21
23
  * Returns an account wrapper that supports a rekeyed account.
22
24
  * @param signer The account, with private key loaded, that is signing
@@ -71,12 +73,12 @@ function randomAccount() {
71
73
  * const account = await mnemonicAccountFromEnvironment('MY_ACCOUNT', algod)
72
74
  * ```
73
75
  *
74
- * 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) ALGOs from the default LocalNet dispenser.
76
+ * 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.
75
77
  * 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.
76
78
  *
77
79
  * @param account The details of the account to get, either the name identifier (string) or an object with:
78
80
  * * `name`: string: The name identifier of the account
79
- * * `fundWith`: The amount to fund the account with when it gets created (when targeting LocalNet), if not specified then 1000 Algos will be funded from the dispenser account
81
+ * * `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
80
82
  * @param algod An algod client
81
83
  * @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
82
84
  * @returns The requested account with private key loaded from the environment variables or when targeting LocalNet from KMD (idempotently creating and funding the account)
@@ -121,10 +123,28 @@ function getAccountAddressAsString(addressEncodedInB64) {
121
123
  * @returns The account information
122
124
  */
123
125
  async function getAccountInformation(sender, algod) {
124
- return new AccountManager(new ClientManager({ algod })).getInformation(getSenderAddress(sender));
126
+ const account = AccountInformationModel.from_obj_for_encoding(await algod.accountInformation(getSenderAddress(sender)).do());
127
+ return {
128
+ ...account,
129
+ // None of these can practically overflow 2^53
130
+ amount: Number(account.amount),
131
+ amountWithoutPendingRewards: Number(account.amountWithoutPendingRewards),
132
+ minBalance: Number(account.minBalance),
133
+ pendingRewards: Number(account.pendingRewards),
134
+ rewards: Number(account.rewards),
135
+ round: Number(account.round),
136
+ totalAppsOptedIn: Number(account.totalAppsOptedIn),
137
+ totalAssetsOptedIn: Number(account.totalAssetsOptedIn),
138
+ totalCreatedApps: Number(account.totalCreatedApps),
139
+ totalCreatedAssets: Number(account.totalCreatedAssets),
140
+ appsTotalExtraPages: account.appsTotalExtraPages ? Number(account.appsTotalExtraPages) : undefined,
141
+ rewardBase: account.rewardBase ? Number(account.rewardBase) : undefined,
142
+ totalBoxBytes: account.totalBoxBytes ? Number(account.totalBoxBytes) : undefined,
143
+ totalBoxes: account.totalBoxes ? Number(account.totalBoxes) : undefined,
144
+ };
125
145
  }
126
146
  /**
127
- * @deprecated Use `algorandClient.account.getAssetInformation(sender, assetId)` or `new AccountManager(clientManager).getAssetInformation(sender, assetId)` instead.
147
+ * @deprecated Use `algorandClient.asset.getAccountInformation(sender, assetId)` or `new AssetManager(...).getAccountInformation(sender, assetId)` instead.
128
148
  *
129
149
  * Returns the given sender account's asset holding for a given asset.
130
150
  *
@@ -142,7 +162,7 @@ async function getAccountInformation(sender, algod) {
142
162
  * @returns The account asset holding information
143
163
  */
144
164
  async function getAccountAssetInformation(sender, assetId, algod) {
145
- return new AccountManager(new ClientManager({ algod })).getAssetInformation(getSenderAddress(sender), assetId);
165
+ return AlgorandClient.fromClients({ algod }).asset.getAccountInformation(getSenderAddress(sender), BigInt(assetId));
146
166
  }
147
167
 
148
168
  export { getAccountAddressAsString, getAccountAddressAsUint8Array, getAccountAssetInformation, getAccountInformation, mnemonicAccountFromEnvironment, multisigAccount, randomAccount, rekeyedAccount, transactionSignerAccount };
@@ -1 +1 @@
1
- {"version":3,"file":"account.mjs","sources":["../../src/account/account.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;AAaA;;;;;;;AAOG;AACa,SAAA,eAAe,CAAC,cAAgC,EAAE,eAA6C,EAAA;AAC7G,IAAA,OAAO,IAAI,eAAe,CAAC,cAAc,EAAE,eAAe,CAAC,CAAA;AAC7D,CAAC;AAED;;;;;;;AAOG;AACa,SAAA,cAAc,CAAC,MAAe,EAAE,MAAc,EAAA;AAC5D,IAAA,OAAO,IAAI,cAAc,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AAC3C,CAAC;AAED;;;;;;;AAOG;AACa,SAAA,wBAAwB,CAAC,MAAyB,EAAE,MAAc,EAAA;AAChF,IAAA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,CAAA;AACjC,CAAC;AAED;;;;;;;AAOG;SACa,aAAa,GAAA;;AAE3B,IAAA,OAAO,OAAO,CAAC,eAAe,EAAE,CAAA;AAClC,CAAC;AAED;;;;;;;;;;;;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AC,GAAG,SAAS;AAClG,QAAA,UAAU,EAAE,OAAO,CAAC,UAAU,GAAG,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,SAAS;AACvE,QAAA,aAAa,EAAE,OAAO,CAAC,aAAa,GAAG,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,GAAG,SAAS;AAChF,QAAA,UAAU,EAAE,OAAO,CAAC,UAAU,GAAG,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,SAAS;KACxE,CAAA;AACH,CAAC;AAED;;;;;;;;;;;;;;;;;AAiBG;AACI,eAAe,0BAA0B,CAC9C,MAAoC,EACpC,OAAwB,EACxB,KAAc,EAAA;IAEd,OAAO,cAAc,CAAC,WAAW,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,qBAAqB,CAAC,gBAAgB,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC,CAAA;AACrH;;;;"}
@@ -25,11 +25,11 @@ import Kmd = algosdk.Kmd;
25
25
  * const account = await getAccount('ACCOUNT', algod)
26
26
  * ```
27
27
  *
28
- * If that code runs against LocalNet then a wallet called `ACCOUNT` will automatically be created with an account that is automatically funded with 1000 (default) ALGOs from the default LocalNet dispenser.
28
+ * If that code runs against LocalNet then a wallet called `ACCOUNT` will automatically be created with an account that is automatically funded with 1000 (default) ALGO from the default LocalNet dispenser.
29
29
  *
30
30
  * @param account The details of the account to get, either the name identifier (string) or an object with:
31
31
  * * `name`: The name identifier of the account
32
- * * `fundWith`: The amount to fund the account with when it gets created (when targeting LocalNet), if not specified then 1000 Algos will be funded from the dispenser account
32
+ * * `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
33
33
  * @param algod An algod client
34
34
  * @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
35
35
  * @returns The requested account with private key loaded from the environment variables or when targeting LocalNet from KMD (idempotently creating and funding the account)
@@ -50,11 +50,11 @@ export declare function getAccount(account: {
50
50
  * const account = await getAccount({config: getAccountConfigFromEnvironment('ACCOUNT')}, algod)
51
51
  * ```
52
52
  *
53
- * If that code runs against LocalNet then a wallet called `ACCOUNT` will automatically be created with an account that is automatically funded with 1000 (default) ALGOs from the default LocalNet dispenser.
53
+ * If that code runs against LocalNet then a wallet called `ACCOUNT` will automatically be created with an account that is automatically funded with 1000 (default) ALGO from the default LocalNet dispenser.
54
54
  *
55
55
  * @param account The details of the account to get, an object with:
56
56
  * * `config`: Account configuration. To get from environment use getAccountConfigFromEnvironment(accountName)
57
- * * `fundWith`: The amount to fund the account with when it gets created (when targeting LocalNet), if not specified then 1000 Algos will be funded from the dispenser account
57
+ * * `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
58
58
  * @param algod An algod client
59
59
  * @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
60
60
  * @returns The requested account with private key loaded from the environment variables or when targeting LocalNet from KMD (idempotently creating and funding the account)
@@ -24,13 +24,13 @@ var getAccountConfigFromEnvironment = require('./get-account-config-from-environ
24
24
  * const account = await getAccount({config: getAccountConfigFromEnvironment('ACCOUNT')}, algod)
25
25
  * ```
26
26
  *
27
- * If that code runs against LocalNet then a wallet called `ACCOUNT` will automatically be created with an account that is automatically funded with 1000 (default) ALGOs from the default LocalNet dispenser.
27
+ * If that code runs against LocalNet then a wallet called `ACCOUNT` will automatically be created with an account that is automatically funded with 1000 (default) ALGO from the default LocalNet dispenser.
28
28
  *
29
29
  * @param account The details of the account to get, either the name identifier (string) or an object with:
30
30
  * * `config`: Account configuration. To get from environment use getAccountConfigFromEnvironment(accountName) OR
31
31
  * * `name`: string: The name identifier of the account (deprecated)
32
32
  * And optionally
33
- * * `fundWith`: The amount to fund the account with when it gets created (when targeting LocalNet), if not specified then 1000 Algos will be funded from the dispenser account
33
+ * * `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
34
34
  * @param algod An algod client
35
35
  * @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
36
36
  * @returns The requested account with private key loaded from the environment variables or when targeting LocalNet from KMD (idempotently creating and funding the account)
@@ -22,13 +22,13 @@ import { getAccountConfigFromEnvironment } from './get-account-config-from-envir
22
22
  * const account = await getAccount({config: getAccountConfigFromEnvironment('ACCOUNT')}, algod)
23
23
  * ```
24
24
  *
25
- * If that code runs against LocalNet then a wallet called `ACCOUNT` will automatically be created with an account that is automatically funded with 1000 (default) ALGOs from the default LocalNet dispenser.
25
+ * If that code runs against LocalNet then a wallet called `ACCOUNT` will automatically be created with an account that is automatically funded with 1000 (default) ALGO from the default LocalNet dispenser.
26
26
  *
27
27
  * @param account The details of the account to get, either the name identifier (string) or an object with:
28
28
  * * `config`: Account configuration. To get from environment use getAccountConfigFromEnvironment(accountName) OR
29
29
  * * `name`: string: The name identifier of the account (deprecated)
30
30
  * And optionally
31
- * * `fundWith`: The amount to fund the account with when it gets created (when targeting LocalNet), if not specified then 1000 Algos will be funded from the dispenser account
31
+ * * `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
32
32
  * @param algod An algod client
33
33
  * @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
34
34
  * @returns The requested account with private key loaded from the environment variables or when targeting LocalNet from KMD (idempotently creating and funding the account)
package/amount.d.ts CHANGED
@@ -1,20 +1,42 @@
1
1
  import { AlgoAmount } from './types/amount';
2
2
  declare global {
3
3
  interface Number {
4
+ /**
5
+ * Returns an `AlgoAmount` using this number of microAlgo.
6
+ */
4
7
  microAlgos(this: number): AlgoAmount;
8
+ /**
9
+ * Returns an `AlgoAmount` using this number of Algo.
10
+ */
5
11
  algos(this: number): AlgoAmount;
12
+ /**
13
+ * Returns an `AlgoAmount` using this number of microAlgo.
14
+ */
15
+ microAlgo(this: number): AlgoAmount;
16
+ /**
17
+ * Returns an `AlgoAmount` using this number of Algo.
18
+ */
19
+ algo(this: number): AlgoAmount;
6
20
  }
7
21
  }
8
- /** Returns an amount of Algos using AlgoAmount
9
- * @param algos The amount in Algos
22
+ /** Returns an amount of Algo using AlgoAmount
23
+ * @param algos The amount of Algo
10
24
  */
11
25
  export declare const algos: (algos: number) => AlgoAmount;
12
- /** Returns an amount of µAlgos using AlgoAmount
13
- * @param microAlgos The amount in µAlgos
26
+ /** Returns an amount of Algo using AlgoAmount
27
+ * @param algos The amount of Algo
28
+ */
29
+ export declare const algo: (algos: number) => AlgoAmount;
30
+ /** Returns an amount of µAlgo using AlgoAmount
31
+ * @param microAlgos The amount of µAlgo
14
32
  */
15
33
  export declare const microAlgos: (microAlgos: number) => AlgoAmount;
16
- /** Returns an amount of µAlgos to cover standard fees for the given number of transactions using AlgoAmount
17
- * @param numberOfTransactions The of standard transaction fees to return the amount of ALGOs
34
+ /** Returns an amount of µAlgo using AlgoAmount
35
+ * @param microAlgos The amount of µAlgo
36
+ */
37
+ export declare const microAlgo: (microAlgos: number) => AlgoAmount;
38
+ /** Returns an amount of µAlgo to cover standard fees for the given number of transactions using AlgoAmount
39
+ * @param numberOfTransactions The of standard transaction fees to return the amount of Algo
18
40
  */
19
41
  export declare const transactionFees: (numberOfTransactions: number) => AlgoAmount;
20
42
  //# sourceMappingURL=amount.d.ts.map
package/amount.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"amount.d.ts","sourceRoot":"","sources":["../src/amount.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAE3C,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,CAAA;QACpC,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,CAAA;KAChC;CACF;AAUD;;GAEG;AACH,eAAO,MAAM,KAAK,UAAW,MAAM,eAElC,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,UAAU,eAAgB,MAAM,eAE5C,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,eAAe,yBAA0B,MAAM,eAE3D,CAAA"}
1
+ {"version":3,"file":"amount.d.ts","sourceRoot":"","sources":["../src/amount.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAE3C,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd;;WAEG;QACH,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,CAAA;QACpC;;WAEG;QACH,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,CAAA;QAC/B;;WAEG;QACH,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,CAAA;QACnC;;WAEG;QACH,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,CAAA;KAC/B;CACF;AAkBD;;GAEG;AACH,eAAO,MAAM,KAAK,UAAW,MAAM,eAElC,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,IAAI,UAAW,MAAM,eAEjC,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,UAAU,eAAgB,MAAM,eAE5C,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,SAAS,eAAgB,MAAM,eAE3C,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,eAAe,yBAA0B,MAAM,eAE3D,CAAA"}
package/amount.js CHANGED
@@ -4,31 +4,51 @@ var algosdk = require('algosdk');
4
4
  var types_amount = require('./types/amount.js');
5
5
 
6
6
  Number.prototype.microAlgos = function () {
7
- return types_amount.AlgoAmount.MicroAlgos(this);
7
+ return types_amount.AlgoAmount.MicroAlgo(this);
8
8
  };
9
9
  Number.prototype.algos = function () {
10
- return types_amount.AlgoAmount.Algos(this);
10
+ return types_amount.AlgoAmount.Algo(this);
11
11
  };
12
- /** Returns an amount of Algos using AlgoAmount
13
- * @param algos The amount in Algos
12
+ Number.prototype.microAlgo = function () {
13
+ return types_amount.AlgoAmount.MicroAlgo(this);
14
+ };
15
+ Number.prototype.algo = function () {
16
+ return types_amount.AlgoAmount.Algo(this);
17
+ };
18
+ /** Returns an amount of Algo using AlgoAmount
19
+ * @param algos The amount of Algo
14
20
  */
15
21
  const algos = (algos) => {
16
- return types_amount.AlgoAmount.Algos(algos);
22
+ return types_amount.AlgoAmount.Algo(algos);
23
+ };
24
+ /** Returns an amount of Algo using AlgoAmount
25
+ * @param algos The amount of Algo
26
+ */
27
+ const algo = (algos) => {
28
+ return types_amount.AlgoAmount.Algo(algos);
17
29
  };
18
- /** Returns an amount of µAlgos using AlgoAmount
19
- * @param microAlgos The amount in µAlgos
30
+ /** Returns an amount of µAlgo using AlgoAmount
31
+ * @param microAlgos The amount of µAlgo
20
32
  */
21
33
  const microAlgos = (microAlgos) => {
22
- return types_amount.AlgoAmount.MicroAlgos(microAlgos);
34
+ return types_amount.AlgoAmount.MicroAlgo(microAlgos);
35
+ };
36
+ /** Returns an amount of µAlgo using AlgoAmount
37
+ * @param microAlgos The amount of µAlgo
38
+ */
39
+ const microAlgo = (microAlgos) => {
40
+ return types_amount.AlgoAmount.MicroAlgo(microAlgos);
23
41
  };
24
- /** Returns an amount of µAlgos to cover standard fees for the given number of transactions using AlgoAmount
25
- * @param numberOfTransactions The of standard transaction fees to return the amount of ALGOs
42
+ /** Returns an amount of µAlgo to cover standard fees for the given number of transactions using AlgoAmount
43
+ * @param numberOfTransactions The of standard transaction fees to return the amount of Algo
26
44
  */
27
45
  const transactionFees = (numberOfTransactions) => {
28
- return types_amount.AlgoAmount.MicroAlgos(numberOfTransactions * algosdk.ALGORAND_MIN_TX_FEE);
46
+ return types_amount.AlgoAmount.MicroAlgo(numberOfTransactions * algosdk.ALGORAND_MIN_TX_FEE);
29
47
  };
30
48
 
49
+ exports.algo = algo;
31
50
  exports.algos = algos;
51
+ exports.microAlgo = microAlgo;
32
52
  exports.microAlgos = microAlgos;
33
53
  exports.transactionFees = transactionFees;
34
54
  //# sourceMappingURL=amount.js.map
package/amount.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"amount.js","sources":["../src/amount.ts"],"sourcesContent":[null],"names":["AlgoAmount"],"mappings":";;;;;AAUA,MAAM,CAAC,SAAS,CAAC,UAAU,GAAG,YAAA;AAC5B,IAAA,OAAOA,uBAAU,CAAC,UAAU,CAAC,IAAI,CAAC,CAAA;AACpC,CAAC,CAAA;AAED,MAAM,CAAC,SAAS,CAAC,KAAK,GAAG,YAAA;AACvB,IAAA,OAAOA,uBAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;AAC/B,CAAC,CAAA;AAED;;AAEG;AACU,MAAA,KAAK,GAAG,CAAC,KAAa,KAAI;AACrC,IAAA,OAAOA,uBAAU,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;AAChC,EAAC;AAED;;AAEG;AACU,MAAA,UAAU,GAAG,CAAC,UAAkB,KAAI;AAC/C,IAAA,OAAOA,uBAAU,CAAC,UAAU,CAAC,UAAU,CAAC,CAAA;AAC1C,EAAC;AAED;;AAEG;AACU,MAAA,eAAe,GAAG,CAAC,oBAA4B,KAAI;IAC9D,OAAOA,uBAAU,CAAC,UAAU,CAAC,oBAAoB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAA;AAClF;;;;;;"}
1
+ {"version":3,"file":"amount.js","sources":["../src/amount.ts"],"sourcesContent":[null],"names":["AlgoAmount"],"mappings":";;;;;AAwBA,MAAM,CAAC,SAAS,CAAC,UAAU,GAAG,YAAA;AAC5B,IAAA,OAAOA,uBAAU,CAAC,SAAS,CAAC,IAAI,CAAC,CAAA;AACnC,CAAC,CAAA;AAED,MAAM,CAAC,SAAS,CAAC,KAAK,GAAG,YAAA;AACvB,IAAA,OAAOA,uBAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AAC9B,CAAC,CAAA;AAED,MAAM,CAAC,SAAS,CAAC,SAAS,GAAG,YAAA;AAC3B,IAAA,OAAOA,uBAAU,CAAC,SAAS,CAAC,IAAI,CAAC,CAAA;AACnC,CAAC,CAAA;AAED,MAAM,CAAC,SAAS,CAAC,IAAI,GAAG,YAAA;AACtB,IAAA,OAAOA,uBAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AAC9B,CAAC,CAAA;AAED;;AAEG;AACU,MAAA,KAAK,GAAG,CAAC,KAAa,KAAI;AACrC,IAAA,OAAOA,uBAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;AAC/B,EAAC;AAED;;AAEG;AACU,MAAA,IAAI,GAAG,CAAC,KAAa,KAAI;AACpC,IAAA,OAAOA,uBAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;AAC/B,EAAC;AAED;;AAEG;AACU,MAAA,UAAU,GAAG,CAAC,UAAkB,KAAI;AAC/C,IAAA,OAAOA,uBAAU,CAAC,SAAS,CAAC,UAAU,CAAC,CAAA;AACzC,EAAC;AAED;;AAEG;AACU,MAAA,SAAS,GAAG,CAAC,UAAkB,KAAI;AAC9C,IAAA,OAAOA,uBAAU,CAAC,SAAS,CAAC,UAAU,CAAC,CAAA;AACzC,EAAC;AAED;;AAEG;AACU,MAAA,eAAe,GAAG,CAAC,oBAA4B,KAAI;IAC9D,OAAOA,uBAAU,CAAC,SAAS,CAAC,oBAAoB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAA;AACjF;;;;;;;;"}
package/amount.mjs CHANGED
@@ -2,29 +2,47 @@ import algosdk from 'algosdk';
2
2
  import { AlgoAmount } from './types/amount.mjs';
3
3
 
4
4
  Number.prototype.microAlgos = function () {
5
- return AlgoAmount.MicroAlgos(this);
5
+ return AlgoAmount.MicroAlgo(this);
6
6
  };
7
7
  Number.prototype.algos = function () {
8
- return AlgoAmount.Algos(this);
8
+ return AlgoAmount.Algo(this);
9
9
  };
10
- /** Returns an amount of Algos using AlgoAmount
11
- * @param algos The amount in Algos
10
+ Number.prototype.microAlgo = function () {
11
+ return AlgoAmount.MicroAlgo(this);
12
+ };
13
+ Number.prototype.algo = function () {
14
+ return AlgoAmount.Algo(this);
15
+ };
16
+ /** Returns an amount of Algo using AlgoAmount
17
+ * @param algos The amount of Algo
12
18
  */
13
19
  const algos = (algos) => {
14
- return AlgoAmount.Algos(algos);
20
+ return AlgoAmount.Algo(algos);
21
+ };
22
+ /** Returns an amount of Algo using AlgoAmount
23
+ * @param algos The amount of Algo
24
+ */
25
+ const algo = (algos) => {
26
+ return AlgoAmount.Algo(algos);
15
27
  };
16
- /** Returns an amount of µAlgos using AlgoAmount
17
- * @param microAlgos The amount in µAlgos
28
+ /** Returns an amount of µAlgo using AlgoAmount
29
+ * @param microAlgos The amount of µAlgo
18
30
  */
19
31
  const microAlgos = (microAlgos) => {
20
- return AlgoAmount.MicroAlgos(microAlgos);
32
+ return AlgoAmount.MicroAlgo(microAlgos);
33
+ };
34
+ /** Returns an amount of µAlgo using AlgoAmount
35
+ * @param microAlgos The amount of µAlgo
36
+ */
37
+ const microAlgo = (microAlgos) => {
38
+ return AlgoAmount.MicroAlgo(microAlgos);
21
39
  };
22
- /** Returns an amount of µAlgos to cover standard fees for the given number of transactions using AlgoAmount
23
- * @param numberOfTransactions The of standard transaction fees to return the amount of ALGOs
40
+ /** Returns an amount of µAlgo to cover standard fees for the given number of transactions using AlgoAmount
41
+ * @param numberOfTransactions The of standard transaction fees to return the amount of Algo
24
42
  */
25
43
  const transactionFees = (numberOfTransactions) => {
26
- return AlgoAmount.MicroAlgos(numberOfTransactions * algosdk.ALGORAND_MIN_TX_FEE);
44
+ return AlgoAmount.MicroAlgo(numberOfTransactions * algosdk.ALGORAND_MIN_TX_FEE);
27
45
  };
28
46
 
29
- export { algos, microAlgos, transactionFees };
47
+ export { algo, algos, microAlgo, microAlgos, transactionFees };
30
48
  //# sourceMappingURL=amount.mjs.map
package/amount.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"amount.mjs","sources":["../src/amount.ts"],"sourcesCont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AC,CAAA;AAC9B,CAAC,CAAA;AAED;;AAEG;AACU,MAAA,KAAK,GAAG,CAAC,KAAa,KAAI;AACrC,IAAA,OAAO,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;AAC/B,EAAC;AAED;;AAEG;AACU,MAAA,IAAI,GAAG,CAAC,KAAa,KAAI;AACpC,IAAA,OAAO,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;AAC/B,EAAC;AAED;;AAEG;AACU,MAAA,UAAU,GAAG,CAAC,UAAkB,KAAI;AAC/C,IAAA,OAAO,UAAU,CAAC,SAAS,CAAC,UAAU,CAAC,CAAA;AACzC,EAAC;AAED;;AAEG;AACU,MAAA,SAAS,GAAG,CAAC,UAAkB,KAAI;AAC9C,IAAA,OAAO,UAAU,CAAC,SAAS,CAAC,UAAU,CAAC,CAAA;AACzC,EAAC;AAED;;AAEG;AACU,MAAA,eAAe,GAAG,CAAC,oBAA4B,KAAI;IAC9D,OAAO,UAAU,CAAC,SAAS,CAAC,oBAAoB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAA;AACjF;;;;"}
package/asset.d.ts CHANGED
@@ -3,6 +3,8 @@ import { AssetBulkOptInOutParams, AssetOptInParams, AssetOptOutParams, CreateAss
3
3
  import { SendTransactionResult } from './types/transaction';
4
4
  import Algodv2 = algosdk.Algodv2;
5
5
  /**
6
+ * @deprecated use `algorandClient.send.assetCreate()` / `algorandClient.transaction.assetCreate()` instead
7
+ *
6
8
  * Create an Algorand Standard Asset (ASA).
7
9
  * @param create The asset creation definition
8
10
  * @param algod An algod client
@@ -19,6 +21,8 @@ export declare function createAsset(create: CreateAssetParams, algod: Algodv2):
19
21
  };
20
22
  }>;
21
23
  /**
24
+ * @deprecated use `algorandClient.send.assetOptIn()` / `algorandClient.transaction.assetOptIn()` instead
25
+ *
22
26
  * Opt-in an account to an asset.
23
27
  * @param optIn The opt-in definition
24
28
  * @param algod An algod client
@@ -31,6 +35,8 @@ export declare function createAsset(create: CreateAssetParams, algod: Algodv2):
31
35
  */
32
36
  export declare function assetOptIn(optIn: AssetOptInParams, algod: Algodv2): Promise<SendTransactionResult>;
33
37
  /**
38
+ * @deprecated use `algorandClient.send.assetOptOut()` / `algorandClient.transaction.assetOptOut()` instead
39
+ *
34
40
  * Opt-out an account from an asset.
35
41
  * @param optOut The opt-in definition
36
42
  * @param algod An algod client
@@ -43,6 +49,8 @@ export declare function assetOptIn(optIn: AssetOptInParams, algod: Algodv2): Pro
43
49
  */
44
50
  export declare function assetOptOut(optOut: AssetOptOutParams, algod: Algodv2): Promise<SendTransactionResult>;
45
51
  /**
52
+ * @deprecated use `algorandClient.asset.bulkOptIn()` instead
53
+ *
46
54
  * Opt in to a list of assets on the Algorand blockchain.
47
55
  *
48
56
  * @param optIn - The bulk opt-in request.
@@ -53,6 +61,8 @@ export declare function assetOptOut(optOut: AssetOptOutParams, algod: Algodv2):
53
61
  */
54
62
  export declare function assetBulkOptIn(optIn: AssetBulkOptInOutParams, algod: Algodv2): Promise<Record<number, string>>;
55
63
  /**
64
+ * @deprecated use `algorandClient.asset.bulkOptOut()` instead
65
+ *
56
66
  * Opt out of multiple assets in Algorand blockchain.
57
67
  *
58
68
  * @param optOut The bulk opt-out request.
package/asset.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"asset.d.ts","sourceRoot":"","sources":["../src/asset.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAA;AAW7B,OAAO,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AAC/G,OAAO,EAAuB,qBAAqB,EAA6C,MAAM,qBAAqB,CAAA;AAC3H,OAAO,OAAO,GAAG,OAAO,CAAC,OAAO,CAAA;AAwDhC;;;;;;;;;;GAUG;AACH,wBAAsB,WAAW,CAC/B,MAAM,EAAE,iBAAiB,EACzB,KAAK,EAAE,OAAO,GACb,OAAO,CAAC,qBAAqB,GAAG;IA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