algosdk 1.13.0 → 1.14.0
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/README.md +6 -4
- package/dist/browser/algosdk.min.js +1 -1
- package/dist/browser/algosdk.min.js.map +1 -1
- package/dist/cjs/src/client/client.js +17 -43
- package/dist/cjs/src/client/client.js.map +1 -1
- package/dist/cjs/src/client/v2/algod/models/types.js +26 -4
- package/dist/cjs/src/client/v2/algod/models/types.js.map +1 -1
- package/dist/cjs/src/client/v2/indexer/lookupAccountTransactions.js +280 -15
- package/dist/cjs/src/client/v2/indexer/lookupAccountTransactions.js.map +1 -1
- package/dist/cjs/src/client/v2/indexer/lookupAssetByID.js +37 -1
- package/dist/cjs/src/client/v2/indexer/lookupAssetByID.js.map +1 -1
- package/dist/cjs/src/client/v2/jsonrequest.js +3 -0
- package/dist/cjs/src/client/v2/jsonrequest.js.map +1 -1
- package/dist/cjs/src/composer.js +5 -4
- package/dist/cjs/src/composer.js.map +1 -1
- package/dist/cjs/src/dryrun.js +3 -1
- package/dist/cjs/src/dryrun.js.map +1 -1
- package/dist/cjs/src/logic/langspec.json +456 -153
- package/dist/cjs/src/logicTemplates/dynamicfee.js +8 -0
- package/dist/cjs/src/logicTemplates/dynamicfee.js.map +1 -1
- package/dist/cjs/src/logicTemplates/htlc.js +5 -0
- package/dist/cjs/src/logicTemplates/htlc.js.map +1 -1
- package/dist/cjs/src/logicTemplates/limitorder.js +6 -0
- package/dist/cjs/src/logicTemplates/limitorder.js.map +1 -1
- package/dist/cjs/src/logicTemplates/periodicpayment.js +5 -0
- package/dist/cjs/src/logicTemplates/periodicpayment.js.map +1 -1
- package/dist/cjs/src/logicTemplates/split.js +6 -0
- package/dist/cjs/src/logicTemplates/split.js.map +1 -1
- package/dist/cjs/src/main.js +4 -1
- package/dist/cjs/src/main.js.map +1 -1
- package/dist/cjs/src/makeTxn.js +5 -4
- package/dist/cjs/src/makeTxn.js.map +1 -1
- package/dist/cjs/src/transaction.js +41 -9
- package/dist/cjs/src/transaction.js.map +1 -1
- package/dist/cjs/src/types/transactions/base.js +11 -2
- package/dist/cjs/src/types/transactions/base.js.map +1 -1
- package/dist/esm/src/client/client.js +17 -43
- package/dist/esm/src/client/client.js.map +1 -1
- package/dist/esm/src/client/v2/algod/models/types.js +26 -4
- package/dist/esm/src/client/v2/algod/models/types.js.map +1 -1
- package/dist/esm/src/client/v2/indexer/lookupAccountTransactions.js +280 -15
- package/dist/esm/src/client/v2/indexer/lookupAccountTransactions.js.map +1 -1
- package/dist/esm/src/client/v2/indexer/lookupAssetByID.js +37 -1
- package/dist/esm/src/client/v2/indexer/lookupAssetByID.js.map +1 -1
- package/dist/esm/src/client/v2/jsonrequest.js +3 -0
- package/dist/esm/src/client/v2/jsonrequest.js.map +1 -1
- package/dist/esm/src/composer.js +5 -4
- package/dist/esm/src/composer.js.map +1 -1
- package/dist/esm/src/dryrun.js +3 -1
- package/dist/esm/src/dryrun.js.map +1 -1
- package/dist/esm/src/logic/langspec.json +456 -153
- package/dist/esm/src/logicTemplates/dynamicfee.js +8 -0
- package/dist/esm/src/logicTemplates/dynamicfee.js.map +1 -1
- package/dist/esm/src/logicTemplates/htlc.js +5 -0
- package/dist/esm/src/logicTemplates/htlc.js.map +1 -1
- package/dist/esm/src/logicTemplates/limitorder.js +6 -0
- package/dist/esm/src/logicTemplates/limitorder.js.map +1 -1
- package/dist/esm/src/logicTemplates/periodicpayment.js +5 -0
- package/dist/esm/src/logicTemplates/periodicpayment.js.map +1 -1
- package/dist/esm/src/logicTemplates/split.js +6 -0
- package/dist/esm/src/logicTemplates/split.js.map +1 -1
- package/dist/esm/src/main.js +1 -0
- package/dist/esm/src/main.js.map +1 -1
- package/dist/esm/src/makeTxn.js +5 -4
- package/dist/esm/src/makeTxn.js.map +1 -1
- package/dist/esm/src/transaction.js +42 -10
- package/dist/esm/src/transaction.js.map +1 -1
- package/dist/esm/src/types/transactions/base.js +9 -1
- package/dist/esm/src/types/transactions/base.js.map +1 -1
- package/dist/types/src/client/client.d.ts +8 -9
- package/dist/types/src/client/v2/algod/models/types.d.ts +47 -5
- package/dist/types/src/client/v2/indexer/lookupAccountTransactions.d.ts +280 -1
- package/dist/types/src/client/v2/indexer/lookupAssetByID.d.ts +37 -0
- package/dist/types/src/client/v2/jsonrequest.d.ts +4 -0
- package/dist/types/src/composer.d.ts +2 -0
- package/dist/types/src/logicTemplates/dynamicfee.d.ts +8 -0
- package/dist/types/src/logicTemplates/htlc.d.ts +5 -0
- package/dist/types/src/logicTemplates/limitorder.d.ts +6 -0
- package/dist/types/src/logicTemplates/periodicpayment.d.ts +5 -0
- package/dist/types/src/logicTemplates/split.d.ts +6 -0
- package/dist/types/src/main.d.ts +1 -0
- package/dist/types/src/makeTxn.d.ts +41 -39
- package/dist/types/src/transaction.d.ts +3 -1
- package/dist/types/src/types/transactions/base.d.ts +10 -5
- package/dist/types/src/types/transactions/encoded.d.ts +4 -0
- package/dist/types/src/types/transactions/keyreg.d.ts +1 -1
- package/dist/types/src/types/utils.d.ts +7 -0
- package/package.json +3 -3
|
@@ -3,7 +3,44 @@ import HTTPClient from '../../client';
|
|
|
3
3
|
import IntDecoding from '../../../types/intDecoding';
|
|
4
4
|
export default class LookupAssetByID extends JSONRequest {
|
|
5
5
|
private index;
|
|
6
|
+
/**
|
|
7
|
+
* Returns asset information of the queried asset.
|
|
8
|
+
*
|
|
9
|
+
* #### Example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* const assetId = 163650;
|
|
12
|
+
* const assetInfo = await indexerClient.lookupAssetByID(assetId).do();
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2assetsasset-id)
|
|
16
|
+
* @param index - The asset ID to look up.
|
|
17
|
+
*/
|
|
6
18
|
constructor(c: HTTPClient, intDecoding: IntDecoding, index: number);
|
|
19
|
+
/**
|
|
20
|
+
* @returns `/v2/assets/${index}`
|
|
21
|
+
*/
|
|
7
22
|
path(): string;
|
|
23
|
+
/**
|
|
24
|
+
* Includes all items including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates
|
|
25
|
+
*
|
|
26
|
+
* #### Example 1
|
|
27
|
+
* ```typescript
|
|
28
|
+
* const assetInfo = await indexerClient
|
|
29
|
+
* .lookupAssetByID(assetId)
|
|
30
|
+
* .includeAll(false)
|
|
31
|
+
* .do();
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* #### Example 2
|
|
35
|
+
* ```typescript
|
|
36
|
+
* const assetInfo = await indexerClient
|
|
37
|
+
* .lookupAssetByID(assetId)
|
|
38
|
+
* .includeAll()
|
|
39
|
+
* .do();
|
|
40
|
+
* ```
|
|
41
|
+
*
|
|
42
|
+
* @param value - default true when called without passing a value
|
|
43
|
+
* @category query
|
|
44
|
+
*/
|
|
8
45
|
includeAll(value?: boolean): this;
|
|
9
46
|
}
|
|
@@ -20,6 +20,7 @@ export default abstract class JSONRequest<Data = Record<string, any>, Body = Dat
|
|
|
20
20
|
constructor(client: HTTPClient, intDecoding?: IntDecoding);
|
|
21
21
|
/**
|
|
22
22
|
* @returns The path of this request.
|
|
23
|
+
* @category JSONRequest
|
|
23
24
|
*/
|
|
24
25
|
abstract path(): string;
|
|
25
26
|
/**
|
|
@@ -28,12 +29,14 @@ export default abstract class JSONRequest<Data = Record<string, any>, Body = Dat
|
|
|
28
29
|
* Use this method to change and restructure response
|
|
29
30
|
* data as needed after receiving it from the `do()` method.
|
|
30
31
|
* @param body - Response body received
|
|
32
|
+
* @category JSONRequest
|
|
31
33
|
*/
|
|
32
34
|
prepare(body: Body): Data;
|
|
33
35
|
/**
|
|
34
36
|
* Execute the request.
|
|
35
37
|
* @param headers - Additional headers to send in the request. Optional.
|
|
36
38
|
* @returns A promise which resolves to the response data.
|
|
39
|
+
* @category JSONRequest
|
|
37
40
|
*/
|
|
38
41
|
do(headers?: Record<string, any>): Promise<Data>;
|
|
39
42
|
/**
|
|
@@ -50,6 +53,7 @@ export default abstract class JSONRequest<Data = Record<string, any>, Body = Dat
|
|
|
50
53
|
*
|
|
51
54
|
* @param method - The method to use when parsing the
|
|
52
55
|
* response for this request. Must be one of "default", "safe", "mixed", or "bigint".
|
|
56
|
+
* @category JSONRequest
|
|
53
57
|
*/
|
|
54
58
|
setIntDecoding(method: IntDecoding): this;
|
|
55
59
|
}
|
|
@@ -19,6 +19,8 @@ export interface ABIResult {
|
|
|
19
19
|
returnValue?: ABIValue;
|
|
20
20
|
/** If the SDK was unable to decode a return value, the error will be here. */
|
|
21
21
|
decodeError?: Error;
|
|
22
|
+
/** The pending transaction information from the method transaction */
|
|
23
|
+
txInfo?: Record<string, any>;
|
|
22
24
|
}
|
|
23
25
|
export declare enum AtomicTransactionComposerStatus {
|
|
24
26
|
/** The atomic group is still under construction. */
|
|
@@ -4,6 +4,8 @@ export class DynamicFee {
|
|
|
4
4
|
* specifying the fee. The fee will be determined at the moment of
|
|
5
5
|
* transfer.
|
|
6
6
|
*
|
|
7
|
+
* @deprecated This feature will be removed in v2.
|
|
8
|
+
*
|
|
7
9
|
* Constructor Parameters:
|
|
8
10
|
* @param {string} receiver: address to receive the assets
|
|
9
11
|
* @param {int} amount: amount of assets to transfer
|
|
@@ -31,6 +33,9 @@ export class DynamicFee {
|
|
|
31
33
|
* getDynamicFeeTransactions creates and signs the secondary dynamic fee transaction, updates
|
|
32
34
|
* transaction fields, and signs as the fee payer; it returns both
|
|
33
35
|
* transactions as bytes suitable for sendRaw.
|
|
36
|
+
*
|
|
37
|
+
* @deprecated This feature will be removed in v2.
|
|
38
|
+
*
|
|
34
39
|
* Parameters:
|
|
35
40
|
* @param {dict} txn - main transaction from payer's signDynamicFee output (a dict of constructor arguments, NOT a transaction.Transaction)
|
|
36
41
|
* @param {LogicSig} lsig - the signed logic received from the payer's signDynamicFee output
|
|
@@ -43,6 +48,9 @@ export function getDynamicFeeTransactions(txn: any, lsig: any, privateKey: Uint8
|
|
|
43
48
|
/**
|
|
44
49
|
* signDynamicFee returns the main transaction and signed logic needed to complete the transfer.
|
|
45
50
|
* These should be sent to the fee payer, who can use GetDynamicFeeTransactions
|
|
51
|
+
*
|
|
52
|
+
* @deprecated This feature will be removed in v2.
|
|
53
|
+
*
|
|
46
54
|
* @param {Uint8Array} contract: the bytearray representing the contract
|
|
47
55
|
* @param {Uint8Array} secretKey: the secret key for building the logic sig
|
|
48
56
|
* @param {string} genesisHash: the genesisHash to use for the txn
|
|
@@ -10,6 +10,8 @@ export class HTLC {
|
|
|
10
10
|
* 2. To owner if txn.FirstValid > expiry_round
|
|
11
11
|
* ...
|
|
12
12
|
*
|
|
13
|
+
* @deprecated This feature will be removed in v2.
|
|
14
|
+
*
|
|
13
15
|
*Parameters
|
|
14
16
|
*----------
|
|
15
17
|
* @param {string} owner: an address that can receive the asset after the expiry round
|
|
@@ -36,6 +38,9 @@ export class HTLC {
|
|
|
36
38
|
}
|
|
37
39
|
/**
|
|
38
40
|
* signTransactionWithHTLCUnlock accepts a transaction, such as a payment, and builds the HTLC-unlocking signature around that transaction
|
|
41
|
+
*
|
|
42
|
+
* @deprecated This feature will be removed in v2.
|
|
43
|
+
*
|
|
39
44
|
* @param {Uint8Array} contract : byte representation of the HTLC
|
|
40
45
|
* @param {Object} txn dictionary containing constructor arguments for a transaction
|
|
41
46
|
* @param {string} preImageAsBase64 : preimage of the hash as base64 string
|
|
@@ -19,6 +19,9 @@ export class LimitOrder {
|
|
|
19
19
|
*
|
|
20
20
|
* close-out case:
|
|
21
21
|
* txn alone, close out value after timeout
|
|
22
|
+
*
|
|
23
|
+
* @deprecated This class will be removed in v2.
|
|
24
|
+
*
|
|
22
25
|
* Constructor Parameters:
|
|
23
26
|
* @param {string} owner: the address to refund funds to on timeout
|
|
24
27
|
* @param {int} assetid: the ID of the transferred asset
|
|
@@ -47,6 +50,9 @@ export class LimitOrder {
|
|
|
47
50
|
}
|
|
48
51
|
/**
|
|
49
52
|
* returns a group transactions array which transfer funds according to the contract's ratio
|
|
53
|
+
*
|
|
54
|
+
* @deprecated This feature will be removed in v2.
|
|
55
|
+
*
|
|
50
56
|
* @param {Uint8Array} contract: byteform of the contract from the payer
|
|
51
57
|
* @param {int} assetAmount: the amount of assets to be sent
|
|
52
58
|
* @param {int} microAlgoAmount: number of microAlgos to transfer
|
|
@@ -10,6 +10,8 @@ export class PeriodicPayment {
|
|
|
10
10
|
* After expiryRound, all remaining funds in the escrow
|
|
11
11
|
* are available to receiver.
|
|
12
12
|
*
|
|
13
|
+
* @deprecated This class will be removed in v2.
|
|
14
|
+
*
|
|
13
15
|
* Constructor Parameters:
|
|
14
16
|
* @param {string} receiver: address which is authorized to receive withdrawals
|
|
15
17
|
* @param {int} amount: the amount to send each period
|
|
@@ -43,6 +45,9 @@ export class PeriodicPayment {
|
|
|
43
45
|
}
|
|
44
46
|
/**
|
|
45
47
|
* getPeriodicPaymentWithdrawalTransaction returns a signed transaction extracting funds form the contract
|
|
48
|
+
*
|
|
49
|
+
* @deprecated This feature will be removed in v2.
|
|
50
|
+
*
|
|
46
51
|
* @param {Uint8Array} contract: the bytearray defining the contract, received from the payer
|
|
47
52
|
* @param {int} fee: the fee per byte for the transaction
|
|
48
53
|
* @param {int} firstValid: the first round on which the txn will be valid
|
|
@@ -13,6 +13,9 @@ export class Split {
|
|
|
13
13
|
* (CloseRemainderTo must be zero.)
|
|
14
14
|
*
|
|
15
15
|
* After expiryRound passes, all funds can be refunded to owner.
|
|
16
|
+
*
|
|
17
|
+
* @deprecated This feature will be removed in v2.
|
|
18
|
+
*
|
|
16
19
|
* Constructor Parameters:
|
|
17
20
|
* @param {string} owner: the address to refund funds to on timeout
|
|
18
21
|
* @param {string} receiverOne: the first recipient in the split account
|
|
@@ -40,6 +43,9 @@ export class Split {
|
|
|
40
43
|
}
|
|
41
44
|
/**
|
|
42
45
|
* returns a group transactions array which transfer funds according to the contract's ratio
|
|
46
|
+
*
|
|
47
|
+
* @deprecated This feature will be removed in v2.
|
|
48
|
+
*
|
|
43
49
|
* @param {Uint8Array} contract: bytes representing the contract in question
|
|
44
50
|
* @param {int} amount: the amount to be transferred
|
|
45
51
|
* @param {int} firstRound: the first round on which the transaction group will be valid
|
package/dist/types/src/main.d.ts
CHANGED
|
@@ -69,6 +69,7 @@ export { default as Indexer } from './client/v2/indexer/indexer';
|
|
|
69
69
|
export { BaseHTTPClient, BaseHTTPClientResponse, BaseHTTPClientError, } from './client/baseHTTPClient';
|
|
70
70
|
export { waitForConfirmation } from './wait';
|
|
71
71
|
export { isValidAddress, encodeAddress, decodeAddress, getApplicationAddress, } from './encoding/address';
|
|
72
|
+
export { bytesToBigInt, bigIntToBytes } from './encoding/bigint';
|
|
72
73
|
export { encodeUint64, decodeUint64 } from './encoding/uint64';
|
|
73
74
|
export { default as generateAccount } from './account';
|
|
74
75
|
export * as modelsv2 from './client/v2/algod/models/types';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as txnBuilder from './transaction';
|
|
2
2
|
import { PaymentTxn, KeyRegistrationTxn, MustHaveSuggestedParams, MustHaveSuggestedParamsInline, AssetCreateTxn, AssetConfigTxn, AssetDestroyTxn, AssetFreezeTxn, AssetTransferTxn, AppCreateTxn, AppUpdateTxn, AppDeleteTxn, AppOptInTxn, AppCloseOutTxn, AppClearStateTxn, AppNoOpTxn } from './types/transactions';
|
|
3
|
-
import { RenameProperties, RenameProperty } from './types/utils';
|
|
3
|
+
import { RenameProperties, RenameProperty, Expand } from './types/utils';
|
|
4
4
|
/**
|
|
5
5
|
* makePaymentTxnWithSuggestedParams takes payment arguments and returns a Transaction object
|
|
6
6
|
* @param from - string representation of Algorand address of sender
|
|
@@ -36,15 +36,15 @@ export declare function makePaymentTxnWithSuggestedParams(from: PaymentTxn['from
|
|
|
36
36
|
* @Deprecated in version 2.0 this will change to use the "WithSuggestedParams" signature.
|
|
37
37
|
*/
|
|
38
38
|
export declare function makePaymentTxn(from: PaymentTxn['from'], to: PaymentTxn['to'], fee: MustHaveSuggestedParamsInline<PaymentTxn>['fee'], amount: PaymentTxn['amount'], closeRemainderTo: PaymentTxn['closeRemainderTo'], firstRound: MustHaveSuggestedParamsInline<PaymentTxn>['firstRound'], lastRound: MustHaveSuggestedParamsInline<PaymentTxn>['lastRound'], note: PaymentTxn['note'], genesisHash: MustHaveSuggestedParamsInline<PaymentTxn>['genesisHash'], genesisID: MustHaveSuggestedParamsInline<PaymentTxn>['genesisID'], rekeyTo?: PaymentTxn['reKeyTo']): txnBuilder.Transaction;
|
|
39
|
-
export declare function makePaymentTxnWithSuggestedParamsFromObject(o: Pick<RenameProperty<MustHaveSuggestedParams<PaymentTxn>, 'reKeyTo', 'rekeyTo'>, 'from' | 'to' | 'amount' | 'closeRemainderTo' | 'note' | 'suggestedParams' | 'rekeyTo'
|
|
39
|
+
export declare function makePaymentTxnWithSuggestedParamsFromObject(o: Expand<Pick<RenameProperty<MustHaveSuggestedParams<PaymentTxn>, 'reKeyTo', 'rekeyTo'>, 'from' | 'to' | 'amount' | 'closeRemainderTo' | 'note' | 'suggestedParams' | 'rekeyTo'>>): txnBuilder.Transaction;
|
|
40
40
|
/**
|
|
41
41
|
* makeKeyRegistrationTxnWithSuggestedParams takes key registration arguments and returns a Transaction object for
|
|
42
42
|
* that key registration operation
|
|
43
43
|
*
|
|
44
44
|
* @param from - string representation of Algorand address of sender
|
|
45
45
|
* @param note - uint8array of arbitrary data for sender to store
|
|
46
|
-
* @param voteKey -
|
|
47
|
-
* @param selectionKey -
|
|
46
|
+
* @param voteKey - voting key. for key deregistration, leave undefined
|
|
47
|
+
* @param selectionKey - selection key. for key deregistration, leave undefined
|
|
48
48
|
* @param voteFirst - first round on which voteKey is valid
|
|
49
49
|
* @param voteLast - last round on which voteKey is valid
|
|
50
50
|
* @param voteKeyDilution - integer
|
|
@@ -59,9 +59,10 @@ export declare function makePaymentTxnWithSuggestedParamsFromObject(o: Pick<Rena
|
|
|
59
59
|
* @param rekeyTo - rekeyTo address, optional
|
|
60
60
|
* @param nonParticipation - configure whether the address wants to stop participating. If true,
|
|
61
61
|
* voteKey, selectionKey, voteFirst, voteLast, and voteKeyDilution must be undefined.
|
|
62
|
+
* @param stateProofKey - state proof key. for key deregistration, leave undefined
|
|
62
63
|
*/
|
|
63
|
-
export declare function makeKeyRegistrationTxnWithSuggestedParams(from: KeyRegistrationTxn['from'], note: KeyRegistrationTxn['note'], voteKey: KeyRegistrationTxn['voteKey'], selectionKey: KeyRegistrationTxn['selectionKey'], voteFirst: KeyRegistrationTxn['voteFirst'], voteLast: KeyRegistrationTxn['voteLast'], voteKeyDilution: KeyRegistrationTxn['voteKeyDilution'], suggestedParams: MustHaveSuggestedParams<KeyRegistrationTxn>['suggestedParams'], rekeyTo?: KeyRegistrationTxn['reKeyTo'], nonParticipation?: false): txnBuilder.Transaction;
|
|
64
|
-
export declare function makeKeyRegistrationTxnWithSuggestedParams(from: KeyRegistrationTxn['from'], note: KeyRegistrationTxn['note'], voteKey: undefined, selectionKey: undefined, voteFirst: undefined, voteLast: undefined, voteKeyDilution: undefined, suggestedParams: MustHaveSuggestedParams<KeyRegistrationTxn>['suggestedParams'], rekeyTo?: KeyRegistrationTxn['reKeyTo'], nonParticipation?: true): txnBuilder.Transaction;
|
|
64
|
+
export declare function makeKeyRegistrationTxnWithSuggestedParams(from: KeyRegistrationTxn['from'], note: KeyRegistrationTxn['note'], voteKey: KeyRegistrationTxn['voteKey'], selectionKey: KeyRegistrationTxn['selectionKey'], voteFirst: KeyRegistrationTxn['voteFirst'], voteLast: KeyRegistrationTxn['voteLast'], voteKeyDilution: KeyRegistrationTxn['voteKeyDilution'], suggestedParams: MustHaveSuggestedParams<KeyRegistrationTxn>['suggestedParams'], rekeyTo?: KeyRegistrationTxn['reKeyTo'], nonParticipation?: false, stateProofKey?: KeyRegistrationTxn['stateProofKey']): txnBuilder.Transaction;
|
|
65
|
+
export declare function makeKeyRegistrationTxnWithSuggestedParams(from: KeyRegistrationTxn['from'], note: KeyRegistrationTxn['note'], voteKey: undefined, selectionKey: undefined, voteFirst: undefined, voteLast: undefined, voteKeyDilution: undefined, suggestedParams: MustHaveSuggestedParams<KeyRegistrationTxn>['suggestedParams'], rekeyTo?: KeyRegistrationTxn['reKeyTo'], nonParticipation?: true, stateProofKey?: undefined): txnBuilder.Transaction;
|
|
65
66
|
/**
|
|
66
67
|
* makeKeyRegistrationTxn takes key registration arguments and returns a Transaction object for
|
|
67
68
|
* that key registration operation
|
|
@@ -74,24 +75,25 @@ export declare function makeKeyRegistrationTxnWithSuggestedParams(from: KeyRegis
|
|
|
74
75
|
* @param note - uint8array of arbitrary data for sender to store
|
|
75
76
|
* @param genesisHash - string specifies hash genesis block of network in use
|
|
76
77
|
* @param genesisID - string specifies genesis ID of network in use
|
|
77
|
-
* @param voteKey -
|
|
78
|
-
* @param selectionKey -
|
|
78
|
+
* @param voteKey - voting key. for key deregistration, leave undefined
|
|
79
|
+
* @param selectionKey - selection key. for key deregistration, leave undefined
|
|
79
80
|
* @param voteFirst - first round on which voteKey is valid
|
|
80
81
|
* @param voteLast - last round on which voteKey is valid
|
|
81
82
|
* @param voteKeyDilution - integer
|
|
82
83
|
* @param rekeyTo - rekeyTo address, optional
|
|
83
84
|
* @param nonParticipation - configure whether the address wants to stop participating. If true,
|
|
84
85
|
* voteKey, selectionKey, voteFirst, voteLast, and voteKeyDilution must be undefined.
|
|
86
|
+
* @param stateProofKey - state proof key. for key deregistration, leave undefined
|
|
85
87
|
* @Deprecated in version 2.0 this will change to use the "WithSuggestedParams" signature.
|
|
86
88
|
*/
|
|
87
|
-
export declare function makeKeyRegistrationTxn(from: KeyRegistrationTxn['from'], fee: MustHaveSuggestedParamsInline<KeyRegistrationTxn>['fee'], firstRound: MustHaveSuggestedParamsInline<KeyRegistrationTxn>['firstRound'], lastRound: MustHaveSuggestedParamsInline<KeyRegistrationTxn>['lastRound'], note: KeyRegistrationTxn['note'], genesisHash: MustHaveSuggestedParamsInline<KeyRegistrationTxn>['genesisHash'], genesisID: MustHaveSuggestedParamsInline<KeyRegistrationTxn>['genesisID'], voteKey: KeyRegistrationTxn['voteKey'], selectionKey: KeyRegistrationTxn['selectionKey'], voteFirst: KeyRegistrationTxn['voteFirst'], voteLast: KeyRegistrationTxn['voteLast'], voteKeyDilution: KeyRegistrationTxn['voteKeyDilution'], rekeyTo?: KeyRegistrationTxn['reKeyTo'], nonParticipation?: false): txnBuilder.Transaction;
|
|
88
|
-
export declare function makeKeyRegistrationTxn(from: KeyRegistrationTxn['from'], fee: MustHaveSuggestedParamsInline<KeyRegistrationTxn>['fee'], firstRound: MustHaveSuggestedParamsInline<KeyRegistrationTxn>['firstRound'], lastRound: MustHaveSuggestedParamsInline<KeyRegistrationTxn>['lastRound'], note: KeyRegistrationTxn['note'], genesisHash: MustHaveSuggestedParamsInline<KeyRegistrationTxn>['genesisHash'], genesisID: MustHaveSuggestedParamsInline<KeyRegistrationTxn>['genesisID'], voteKey: undefined, selectionKey: undefined, voteFirst: undefined, voteLast: undefined, voteKeyDilution: undefined, rekeyTo?: KeyRegistrationTxn['reKeyTo'], nonParticipation?: true): txnBuilder.Transaction;
|
|
89
|
-
export declare function makeKeyRegistrationTxnWithSuggestedParamsFromObject(o: Pick<RenameProperty<MustHaveSuggestedParams<KeyRegistrationTxn>, 'reKeyTo', 'rekeyTo'>, 'from' | 'note' | 'voteKey' | 'selectionKey' | 'voteFirst' | 'voteLast' | 'voteKeyDilution' | 'suggestedParams' | 'rekeyTo'> & {
|
|
89
|
+
export declare function makeKeyRegistrationTxn(from: KeyRegistrationTxn['from'], fee: MustHaveSuggestedParamsInline<KeyRegistrationTxn>['fee'], firstRound: MustHaveSuggestedParamsInline<KeyRegistrationTxn>['firstRound'], lastRound: MustHaveSuggestedParamsInline<KeyRegistrationTxn>['lastRound'], note: KeyRegistrationTxn['note'], genesisHash: MustHaveSuggestedParamsInline<KeyRegistrationTxn>['genesisHash'], genesisID: MustHaveSuggestedParamsInline<KeyRegistrationTxn>['genesisID'], voteKey: KeyRegistrationTxn['voteKey'], selectionKey: KeyRegistrationTxn['selectionKey'], voteFirst: KeyRegistrationTxn['voteFirst'], voteLast: KeyRegistrationTxn['voteLast'], voteKeyDilution: KeyRegistrationTxn['voteKeyDilution'], rekeyTo?: KeyRegistrationTxn['reKeyTo'], nonParticipation?: false, stateProofKey?: KeyRegistrationTxn['stateProofKey']): txnBuilder.Transaction;
|
|
90
|
+
export declare function makeKeyRegistrationTxn(from: KeyRegistrationTxn['from'], fee: MustHaveSuggestedParamsInline<KeyRegistrationTxn>['fee'], firstRound: MustHaveSuggestedParamsInline<KeyRegistrationTxn>['firstRound'], lastRound: MustHaveSuggestedParamsInline<KeyRegistrationTxn>['lastRound'], note: KeyRegistrationTxn['note'], genesisHash: MustHaveSuggestedParamsInline<KeyRegistrationTxn>['genesisHash'], genesisID: MustHaveSuggestedParamsInline<KeyRegistrationTxn>['genesisID'], voteKey: undefined, selectionKey: undefined, voteFirst: undefined, voteLast: undefined, voteKeyDilution: undefined, rekeyTo?: KeyRegistrationTxn['reKeyTo'], nonParticipation?: true, stateProofKey?: undefined): txnBuilder.Transaction;
|
|
91
|
+
export declare function makeKeyRegistrationTxnWithSuggestedParamsFromObject(o: Expand<Pick<RenameProperty<MustHaveSuggestedParams<KeyRegistrationTxn>, 'reKeyTo', 'rekeyTo'>, 'from' | 'note' | 'voteKey' | 'selectionKey' | 'stateProofKey' | 'voteFirst' | 'voteLast' | 'voteKeyDilution' | 'suggestedParams' | 'rekeyTo'> & {
|
|
90
92
|
nonParticipation?: false;
|
|
91
|
-
}): txnBuilder.Transaction;
|
|
92
|
-
export declare function makeKeyRegistrationTxnWithSuggestedParamsFromObject(o: Pick<RenameProperty<MustHaveSuggestedParams<KeyRegistrationTxn>, 'reKeyTo', 'rekeyTo'>, 'from' | 'note' | 'suggestedParams' | 'rekeyTo'> & {
|
|
93
|
+
}>): txnBuilder.Transaction;
|
|
94
|
+
export declare function makeKeyRegistrationTxnWithSuggestedParamsFromObject(o: Expand<Pick<RenameProperty<MustHaveSuggestedParams<KeyRegistrationTxn>, 'reKeyTo', 'rekeyTo'>, 'from' | 'note' | 'suggestedParams' | 'rekeyTo'> & {
|
|
93
95
|
nonParticipation: true;
|
|
94
|
-
}): txnBuilder.Transaction;
|
|
96
|
+
}>): txnBuilder.Transaction;
|
|
95
97
|
/** makeAssetCreateTxnWithSuggestedParams takes asset creation arguments and returns a Transaction object
|
|
96
98
|
* for creating that asset
|
|
97
99
|
*
|
|
@@ -145,7 +147,7 @@ export declare function makeAssetCreateTxnWithSuggestedParams(from: AssetCreateT
|
|
|
145
147
|
* @Deprecated in version 2.0 this will change to use the "WithSuggestedParams" signature.
|
|
146
148
|
*/
|
|
147
149
|
export declare function makeAssetCreateTxn(from: AssetCreateTxn['from'], fee: MustHaveSuggestedParamsInline<AssetCreateTxn>['fee'], firstRound: MustHaveSuggestedParamsInline<AssetCreateTxn>['firstRound'], lastRound: MustHaveSuggestedParamsInline<AssetCreateTxn>['lastRound'], note: AssetCreateTxn['note'], genesisHash: MustHaveSuggestedParamsInline<AssetCreateTxn>['genesisHash'], genesisID: MustHaveSuggestedParamsInline<AssetCreateTxn>['genesisID'], total: AssetCreateTxn['assetTotal'], decimals: AssetCreateTxn['assetDecimals'], defaultFrozen: AssetCreateTxn['assetDefaultFrozen'], manager: AssetCreateTxn['assetManager'], reserve: AssetCreateTxn['assetManager'], freeze: AssetCreateTxn['assetFreeze'], clawback: AssetCreateTxn['assetClawback'], unitName: AssetCreateTxn['assetUnitName'], assetName: AssetCreateTxn['assetName'], assetURL: AssetCreateTxn['assetURL'], assetMetadataHash?: AssetCreateTxn['assetMetadataHash'], rekeyTo?: AssetCreateTxn['reKeyTo']): txnBuilder.Transaction;
|
|
148
|
-
export declare function makeAssetCreateTxnWithSuggestedParamsFromObject(o: Pick<RenameProperties<MustHaveSuggestedParams<AssetCreateTxn>, {
|
|
150
|
+
export declare function makeAssetCreateTxnWithSuggestedParamsFromObject(o: Expand<Pick<RenameProperties<MustHaveSuggestedParams<AssetCreateTxn>, {
|
|
149
151
|
reKeyTo: 'rekeyTo';
|
|
150
152
|
assetTotal: 'total';
|
|
151
153
|
assetDecimals: 'decimals';
|
|
@@ -155,7 +157,7 @@ export declare function makeAssetCreateTxnWithSuggestedParamsFromObject(o: Pick<
|
|
|
155
157
|
assetFreeze: 'freeze';
|
|
156
158
|
assetClawback: 'clawback';
|
|
157
159
|
assetUnitName: 'unitName';
|
|
158
|
-
}>, 'from' | 'note' | 'total' | 'decimals' | 'defaultFrozen' | 'manager' | 'reserve' | 'freeze' | 'clawback' | 'unitName' | 'assetName' | 'assetURL' | 'assetMetadataHash' | 'suggestedParams' | 'rekeyTo'
|
|
160
|
+
}>, 'from' | 'note' | 'total' | 'decimals' | 'defaultFrozen' | 'manager' | 'reserve' | 'freeze' | 'clawback' | 'unitName' | 'assetName' | 'assetURL' | 'assetMetadataHash' | 'suggestedParams' | 'rekeyTo'>>): txnBuilder.Transaction;
|
|
159
161
|
/** makeAssetConfigTxnWithSuggestedParams can be issued by the asset manager to change the manager, reserve, freeze, or clawback
|
|
160
162
|
* you must respecify existing addresses to keep them the same; leaving a field blank is the same as turning
|
|
161
163
|
* that feature off for this asset
|
|
@@ -201,7 +203,7 @@ export declare function makeAssetConfigTxnWithSuggestedParams(from: AssetConfigT
|
|
|
201
203
|
* @Deprecated in version 2.0 this will change to use the "WithSuggestedParams" signature.
|
|
202
204
|
*/
|
|
203
205
|
export declare function makeAssetConfigTxn(from: AssetConfigTxn['from'], fee: MustHaveSuggestedParamsInline<AssetConfigTxn>['fee'], firstRound: MustHaveSuggestedParamsInline<AssetConfigTxn>['firstRound'], lastRound: MustHaveSuggestedParamsInline<AssetConfigTxn>['lastRound'], note: AssetConfigTxn['note'], genesisHash: MustHaveSuggestedParamsInline<AssetConfigTxn>['genesisHash'], genesisID: MustHaveSuggestedParamsInline<AssetConfigTxn>['genesisID'], assetIndex: AssetConfigTxn['assetIndex'], manager: AssetConfigTxn['assetManager'], reserve: AssetConfigTxn['assetReserve'], freeze: AssetConfigTxn['assetFreeze'], clawback: AssetConfigTxn['assetClawback'], strictEmptyAddressChecking?: boolean, rekeyTo?: AssetConfigTxn['reKeyTo']): txnBuilder.Transaction;
|
|
204
|
-
export declare function makeAssetConfigTxnWithSuggestedParamsFromObject(o: Pick<RenameProperties<MustHaveSuggestedParams<AssetConfigTxn>, {
|
|
206
|
+
export declare function makeAssetConfigTxnWithSuggestedParamsFromObject(o: Expand<Pick<RenameProperties<MustHaveSuggestedParams<AssetConfigTxn>, {
|
|
205
207
|
reKeyTo: 'rekeyTo';
|
|
206
208
|
assetManager: 'manager';
|
|
207
209
|
assetReserve: 'reserve';
|
|
@@ -209,7 +211,7 @@ export declare function makeAssetConfigTxnWithSuggestedParamsFromObject(o: Pick<
|
|
|
209
211
|
assetClawback: 'clawback';
|
|
210
212
|
}>, 'from' | 'note' | 'assetIndex' | 'manager' | 'reserve' | 'freeze' | 'clawback' | 'suggestedParams' | 'rekeyTo'> & {
|
|
211
213
|
strictEmptyAddressChecking: boolean;
|
|
212
|
-
}): txnBuilder.Transaction;
|
|
214
|
+
}>): txnBuilder.Transaction;
|
|
213
215
|
/** makeAssetDestroyTxnWithSuggestedParams will allow the asset's manager to remove this asset from the ledger, so long
|
|
214
216
|
* as all outstanding assets are held by the creator.
|
|
215
217
|
*
|
|
@@ -243,7 +245,7 @@ export declare function makeAssetDestroyTxnWithSuggestedParams(from: AssetDestro
|
|
|
243
245
|
* @Deprecated in version 2.0 this will change to use the "WithSuggestedParams" signature.
|
|
244
246
|
*/
|
|
245
247
|
export declare function makeAssetDestroyTxn(from: AssetDestroyTxn['from'], fee: MustHaveSuggestedParamsInline<AssetDestroyTxn>['fee'], firstRound: MustHaveSuggestedParamsInline<AssetDestroyTxn>['firstRound'], lastRound: MustHaveSuggestedParamsInline<AssetDestroyTxn>['lastRound'], note: AssetDestroyTxn['note'], genesisHash: MustHaveSuggestedParamsInline<AssetDestroyTxn>['genesisHash'], genesisID: MustHaveSuggestedParamsInline<AssetDestroyTxn>['genesisID'], assetIndex: AssetDestroyTxn['assetIndex'], rekeyTo?: AssetDestroyTxn['reKeyTo']): txnBuilder.Transaction;
|
|
246
|
-
export declare function makeAssetDestroyTxnWithSuggestedParamsFromObject(o: Pick<RenameProperty<MustHaveSuggestedParams<AssetDestroyTxn>, 'reKeyTo', 'rekeyTo'>, 'from' | 'note' | 'assetIndex' | 'suggestedParams' | 'rekeyTo'
|
|
248
|
+
export declare function makeAssetDestroyTxnWithSuggestedParamsFromObject(o: Expand<Pick<RenameProperty<MustHaveSuggestedParams<AssetDestroyTxn>, 'reKeyTo', 'rekeyTo'>, 'from' | 'note' | 'assetIndex' | 'suggestedParams' | 'rekeyTo'>>): txnBuilder.Transaction;
|
|
247
249
|
/** makeAssetFreezeTxnWithSuggestedParams will allow the asset's freeze manager to freeze or un-freeze an account,
|
|
248
250
|
* blocking or allowing asset transfers to and from the targeted account.
|
|
249
251
|
*
|
|
@@ -281,10 +283,10 @@ export declare function makeAssetFreezeTxnWithSuggestedParams(from: AssetFreezeT
|
|
|
281
283
|
* @Deprecated in version 2.0 this will change to use the "WithSuggestedParams" signature.
|
|
282
284
|
*/
|
|
283
285
|
export declare function makeAssetFreezeTxn(from: AssetFreezeTxn['from'], fee: MustHaveSuggestedParamsInline<AssetFreezeTxn>['fee'], firstRound: MustHaveSuggestedParamsInline<AssetFreezeTxn>['firstRound'], lastRound: MustHaveSuggestedParamsInline<AssetFreezeTxn>['lastRound'], note: MustHaveSuggestedParamsInline<AssetFreezeTxn>['note'], genesisHash: MustHaveSuggestedParamsInline<AssetFreezeTxn>['genesisHash'], genesisID: MustHaveSuggestedParamsInline<AssetFreezeTxn>['genesisID'], assetIndex: AssetFreezeTxn['assetIndex'], freezeTarget: AssetFreezeTxn['freezeAccount'], freezeState: AssetFreezeTxn['freezeState'], rekeyTo?: AssetFreezeTxn['reKeyTo']): txnBuilder.Transaction;
|
|
284
|
-
export declare function makeAssetFreezeTxnWithSuggestedParamsFromObject(o: Pick<RenameProperties<MustHaveSuggestedParams<AssetFreezeTxn>, {
|
|
286
|
+
export declare function makeAssetFreezeTxnWithSuggestedParamsFromObject(o: Expand<Pick<RenameProperties<MustHaveSuggestedParams<AssetFreezeTxn>, {
|
|
285
287
|
freezeAccount: 'freezeTarget';
|
|
286
288
|
reKeyTo: 'rekeyTo';
|
|
287
|
-
}>, 'from' | 'note' | 'assetIndex' | 'freezeTarget' | 'freezeState' | 'suggestedParams' | 'rekeyTo'
|
|
289
|
+
}>, 'from' | 'note' | 'assetIndex' | 'freezeTarget' | 'freezeState' | 'suggestedParams' | 'rekeyTo'>>): txnBuilder.Transaction;
|
|
288
290
|
/** makeAssetTransferTxnWithSuggestedParams allows for the creation of an asset transfer transaction.
|
|
289
291
|
* Special case: to begin accepting assets, set amount=0 and from=to.
|
|
290
292
|
*
|
|
@@ -332,10 +334,10 @@ export declare function makeAssetTransferTxnWithSuggestedParams(from: AssetTrans
|
|
|
332
334
|
* @Deprecated in version 2.0 this will change to use the "WithSuggestedParams" signature.
|
|
333
335
|
*/
|
|
334
336
|
export declare function makeAssetTransferTxn(from: AssetTransferTxn['from'], to: AssetTransferTxn['to'], closeRemainderTo: AssetTransferTxn['closeRemainderTo'], revocationTarget: AssetTransferTxn['assetRevocationTarget'], fee: MustHaveSuggestedParamsInline<AssetTransferTxn>['fee'], amount: AssetTransferTxn['amount'], firstRound: MustHaveSuggestedParamsInline<AssetTransferTxn>['firstRound'], lastRound: MustHaveSuggestedParamsInline<AssetTransferTxn>['lastRound'], note: AssetTransferTxn['note'], genesisHash: MustHaveSuggestedParamsInline<AssetTransferTxn>['genesisHash'], genesisID: MustHaveSuggestedParamsInline<AssetTransferTxn>['genesisID'], assetIndex: AssetTransferTxn['assetIndex'], rekeyTo?: AssetTransferTxn['reKeyTo']): txnBuilder.Transaction;
|
|
335
|
-
export declare function makeAssetTransferTxnWithSuggestedParamsFromObject(o: Pick<RenameProperties<MustHaveSuggestedParams<AssetTransferTxn>, {
|
|
337
|
+
export declare function makeAssetTransferTxnWithSuggestedParamsFromObject(o: Expand<Pick<RenameProperties<MustHaveSuggestedParams<AssetTransferTxn>, {
|
|
336
338
|
assetRevocationTarget: 'revocationTarget';
|
|
337
339
|
reKeyTo: 'rekeyTo';
|
|
338
|
-
}>, 'from' | 'to' | 'closeRemainderTo' | 'revocationTarget' | 'amount' | 'note' | 'assetIndex' | 'suggestedParams' | 'rekeyTo'
|
|
340
|
+
}>, 'from' | 'to' | 'closeRemainderTo' | 'revocationTarget' | 'amount' | 'note' | 'assetIndex' | 'suggestedParams' | 'rekeyTo'>>): txnBuilder.Transaction;
|
|
339
341
|
/**
|
|
340
342
|
* Make a transaction that will create an application.
|
|
341
343
|
* @param from - address of sender
|
|
@@ -364,7 +366,7 @@ export declare function makeAssetTransferTxnWithSuggestedParamsFromObject(o: Pic
|
|
|
364
366
|
* @param extraPages - integer extra pages of memory to rent on creation of application
|
|
365
367
|
*/
|
|
366
368
|
export declare function makeApplicationCreateTxn(from: AppCreateTxn['from'], suggestedParams: MustHaveSuggestedParams<AppCreateTxn>['suggestedParams'], onComplete: AppCreateTxn['appOnComplete'], approvalProgram: AppCreateTxn['appApprovalProgram'], clearProgram: AppCreateTxn['appClearProgram'], numLocalInts: AppCreateTxn['appLocalInts'], numLocalByteSlices: AppCreateTxn['appLocalByteSlices'], numGlobalInts: AppCreateTxn['appGlobalInts'], numGlobalByteSlices: AppCreateTxn['appGlobalByteSlices'], appArgs?: AppCreateTxn['appArgs'], accounts?: AppCreateTxn['appAccounts'], foreignApps?: AppCreateTxn['appForeignApps'], foreignAssets?: AppCreateTxn['appForeignAssets'], note?: AppCreateTxn['note'], lease?: AppCreateTxn['lease'], rekeyTo?: AppCreateTxn['reKeyTo'], extraPages?: AppCreateTxn['extraPages']): txnBuilder.Transaction;
|
|
367
|
-
export declare function makeApplicationCreateTxnFromObject(o: Pick<RenameProperties<MustHaveSuggestedParams<AppCreateTxn>, {
|
|
369
|
+
export declare function makeApplicationCreateTxnFromObject(o: Expand<Pick<RenameProperties<MustHaveSuggestedParams<AppCreateTxn>, {
|
|
368
370
|
appOnComplete: 'onComplete';
|
|
369
371
|
appApprovalProgram: 'approvalProgram';
|
|
370
372
|
appClearProgram: 'clearProgram';
|
|
@@ -376,7 +378,7 @@ export declare function makeApplicationCreateTxnFromObject(o: Pick<RenamePropert
|
|
|
376
378
|
appForeignApps: 'foreignApps';
|
|
377
379
|
appForeignAssets: 'foreignAssets';
|
|
378
380
|
reKeyTo: 'rekeyTo';
|
|
379
|
-
}>, 'from' | 'suggestedParams' | 'onComplete' | 'approvalProgram' | 'clearProgram' | 'numLocalInts' | 'numLocalByteSlices' | 'numGlobalInts' | 'numGlobalByteSlices' | 'appArgs' | 'accounts' | 'foreignApps' | 'foreignAssets' | 'note' | 'lease' | 'rekeyTo' | 'extraPages'
|
|
381
|
+
}>, 'from' | 'suggestedParams' | 'onComplete' | 'approvalProgram' | 'clearProgram' | 'numLocalInts' | 'numLocalByteSlices' | 'numGlobalInts' | 'numGlobalByteSlices' | 'appArgs' | 'accounts' | 'foreignApps' | 'foreignAssets' | 'note' | 'lease' | 'rekeyTo' | 'extraPages'>>): txnBuilder.Transaction;
|
|
380
382
|
/**
|
|
381
383
|
* Make a transaction that changes an application's approval and clear programs
|
|
382
384
|
* @param from - address of sender
|
|
@@ -400,14 +402,14 @@ export declare function makeApplicationCreateTxnFromObject(o: Pick<RenamePropert
|
|
|
400
402
|
* @param rekeyTo - String representation of the Algorand address that will be used to authorize all future transactions
|
|
401
403
|
*/
|
|
402
404
|
export declare function makeApplicationUpdateTxn(from: AppUpdateTxn['from'], suggestedParams: MustHaveSuggestedParams<AppUpdateTxn>['suggestedParams'], appIndex: AppUpdateTxn['appIndex'], approvalProgram: AppUpdateTxn['appApprovalProgram'], clearProgram: AppUpdateTxn['appClearProgram'], appArgs?: AppUpdateTxn['appArgs'], accounts?: AppUpdateTxn['appAccounts'], foreignApps?: AppUpdateTxn['appForeignApps'], foreignAssets?: AppUpdateTxn['appForeignAssets'], note?: AppUpdateTxn['note'], lease?: AppUpdateTxn['lease'], rekeyTo?: AppUpdateTxn['reKeyTo']): txnBuilder.Transaction;
|
|
403
|
-
export declare function makeApplicationUpdateTxnFromObject(o: Pick<RenameProperties<MustHaveSuggestedParams<AppUpdateTxn>, {
|
|
405
|
+
export declare function makeApplicationUpdateTxnFromObject(o: Expand<Pick<RenameProperties<MustHaveSuggestedParams<AppUpdateTxn>, {
|
|
404
406
|
appApprovalProgram: 'approvalProgram';
|
|
405
407
|
appClearProgram: 'clearProgram';
|
|
406
408
|
appAccounts: 'accounts';
|
|
407
409
|
appForeignApps: 'foreignApps';
|
|
408
410
|
appForeignAssets: 'foreignAssets';
|
|
409
411
|
reKeyTo: 'rekeyTo';
|
|
410
|
-
}>, 'from' | 'suggestedParams' | 'appIndex' | 'approvalProgram' | 'clearProgram' | 'appArgs' | 'accounts' | 'foreignApps' | 'foreignAssets' | 'note' | 'lease' | 'rekeyTo'
|
|
412
|
+
}>, 'from' | 'suggestedParams' | 'appIndex' | 'approvalProgram' | 'clearProgram' | 'appArgs' | 'accounts' | 'foreignApps' | 'foreignAssets' | 'note' | 'lease' | 'rekeyTo'>>): txnBuilder.Transaction;
|
|
411
413
|
/**
|
|
412
414
|
* Make a transaction that deletes an application
|
|
413
415
|
* @param from - address of sender
|
|
@@ -429,12 +431,12 @@ export declare function makeApplicationUpdateTxnFromObject(o: Pick<RenamePropert
|
|
|
429
431
|
* @param rekeyTo - String representation of the Algorand address that will be used to authorize all future transactions
|
|
430
432
|
*/
|
|
431
433
|
export declare function makeApplicationDeleteTxn(from: AppDeleteTxn['from'], suggestedParams: MustHaveSuggestedParams<AppDeleteTxn>['suggestedParams'], appIndex: AppDeleteTxn['appIndex'], appArgs?: AppDeleteTxn['appArgs'], accounts?: AppDeleteTxn['appAccounts'], foreignApps?: AppDeleteTxn['appForeignApps'], foreignAssets?: AppDeleteTxn['appForeignAssets'], note?: AppDeleteTxn['note'], lease?: AppDeleteTxn['lease'], rekeyTo?: AppDeleteTxn['reKeyTo']): txnBuilder.Transaction;
|
|
432
|
-
export declare function makeApplicationDeleteTxnFromObject(o: Pick<RenameProperties<MustHaveSuggestedParams<AppDeleteTxn>, {
|
|
434
|
+
export declare function makeApplicationDeleteTxnFromObject(o: Expand<Pick<RenameProperties<MustHaveSuggestedParams<AppDeleteTxn>, {
|
|
433
435
|
appAccounts: 'accounts';
|
|
434
436
|
appForeignApps: 'foreignApps';
|
|
435
437
|
appForeignAssets: 'foreignAssets';
|
|
436
438
|
reKeyTo: 'rekeyTo';
|
|
437
|
-
}>, 'from' | 'suggestedParams' | 'appIndex' | 'appArgs' | 'accounts' | 'foreignApps' | 'foreignAssets' | 'note' | 'lease' | 'rekeyTo'
|
|
439
|
+
}>, 'from' | 'suggestedParams' | 'appIndex' | 'appArgs' | 'accounts' | 'foreignApps' | 'foreignAssets' | 'note' | 'lease' | 'rekeyTo'>>): txnBuilder.Transaction;
|
|
438
440
|
/**
|
|
439
441
|
* Make a transaction that opts in to use an application
|
|
440
442
|
* @param from - address of sender
|
|
@@ -456,12 +458,12 @@ export declare function makeApplicationDeleteTxnFromObject(o: Pick<RenamePropert
|
|
|
456
458
|
* @param rekeyTo - String representation of the Algorand address that will be used to authorize all future transactions
|
|
457
459
|
*/
|
|
458
460
|
export declare function makeApplicationOptInTxn(from: AppOptInTxn['from'], suggestedParams: MustHaveSuggestedParams<AppOptInTxn>['suggestedParams'], appIndex: AppOptInTxn['appIndex'], appArgs?: AppOptInTxn['appArgs'], accounts?: AppOptInTxn['appAccounts'], foreignApps?: AppOptInTxn['appForeignApps'], foreignAssets?: AppOptInTxn['appForeignAssets'], note?: AppOptInTxn['note'], lease?: AppOptInTxn['lease'], rekeyTo?: AppOptInTxn['reKeyTo']): txnBuilder.Transaction;
|
|
459
|
-
export declare function makeApplicationOptInTxnFromObject(o: Pick<RenameProperties<MustHaveSuggestedParams<AppOptInTxn>, {
|
|
461
|
+
export declare function makeApplicationOptInTxnFromObject(o: Expand<Pick<RenameProperties<MustHaveSuggestedParams<AppOptInTxn>, {
|
|
460
462
|
appAccounts: 'accounts';
|
|
461
463
|
appForeignApps: 'foreignApps';
|
|
462
464
|
appForeignAssets: 'foreignAssets';
|
|
463
465
|
reKeyTo: 'rekeyTo';
|
|
464
|
-
}>, 'from' | 'suggestedParams' | 'appIndex' | 'appArgs' | 'accounts' | 'foreignApps' | 'foreignAssets' | 'note' | 'lease' | 'rekeyTo'
|
|
466
|
+
}>, 'from' | 'suggestedParams' | 'appIndex' | 'appArgs' | 'accounts' | 'foreignApps' | 'foreignAssets' | 'note' | 'lease' | 'rekeyTo'>>): txnBuilder.Transaction;
|
|
465
467
|
/**
|
|
466
468
|
* Make a transaction that closes out a user's state in an application
|
|
467
469
|
* @param from - address of sender
|
|
@@ -483,12 +485,12 @@ export declare function makeApplicationOptInTxnFromObject(o: Pick<RenameProperti
|
|
|
483
485
|
* @param rekeyTo - String representation of the Algorand address that will be used to authorize all future transactions
|
|
484
486
|
*/
|
|
485
487
|
export declare function makeApplicationCloseOutTxn(from: AppCloseOutTxn['from'], suggestedParams: MustHaveSuggestedParams<AppCloseOutTxn>['suggestedParams'], appIndex: AppCloseOutTxn['appIndex'], appArgs?: AppCloseOutTxn['appArgs'], accounts?: AppCloseOutTxn['appAccounts'], foreignApps?: AppCloseOutTxn['appForeignApps'], foreignAssets?: AppCloseOutTxn['appForeignAssets'], note?: AppCloseOutTxn['note'], lease?: AppCloseOutTxn['lease'], rekeyTo?: AppCloseOutTxn['reKeyTo']): txnBuilder.Transaction;
|
|
486
|
-
export declare function makeApplicationCloseOutTxnFromObject(o: Pick<RenameProperties<MustHaveSuggestedParams<AppOptInTxn>, {
|
|
488
|
+
export declare function makeApplicationCloseOutTxnFromObject(o: Expand<Pick<RenameProperties<MustHaveSuggestedParams<AppOptInTxn>, {
|
|
487
489
|
appAccounts: 'accounts';
|
|
488
490
|
appForeignApps: 'foreignApps';
|
|
489
491
|
appForeignAssets: 'foreignAssets';
|
|
490
492
|
reKeyTo: 'rekeyTo';
|
|
491
|
-
}>, 'from' | 'suggestedParams' | 'appIndex' | 'appArgs' | 'accounts' | 'foreignApps' | 'foreignAssets' | 'note' | 'lease' | 'rekeyTo'
|
|
493
|
+
}>, 'from' | 'suggestedParams' | 'appIndex' | 'appArgs' | 'accounts' | 'foreignApps' | 'foreignAssets' | 'note' | 'lease' | 'rekeyTo'>>): txnBuilder.Transaction;
|
|
492
494
|
/**
|
|
493
495
|
* Make a transaction that clears a user's state in an application
|
|
494
496
|
* @param from - address of sender
|
|
@@ -510,12 +512,12 @@ export declare function makeApplicationCloseOutTxnFromObject(o: Pick<RenamePrope
|
|
|
510
512
|
* @param rekeyTo - String representation of the Algorand address that will be used to authorize all future transactions
|
|
511
513
|
*/
|
|
512
514
|
export declare function makeApplicationClearStateTxn(from: AppClearStateTxn['from'], suggestedParams: MustHaveSuggestedParams<AppClearStateTxn>['suggestedParams'], appIndex: AppClearStateTxn['appIndex'], appArgs?: AppClearStateTxn['appArgs'], accounts?: AppClearStateTxn['appAccounts'], foreignApps?: AppClearStateTxn['appForeignApps'], foreignAssets?: AppClearStateTxn['appForeignAssets'], note?: AppClearStateTxn['note'], lease?: AppClearStateTxn['lease'], rekeyTo?: AppClearStateTxn['reKeyTo']): txnBuilder.Transaction;
|
|
513
|
-
export declare function makeApplicationClearStateTxnFromObject(o: Pick<RenameProperties<MustHaveSuggestedParams<AppOptInTxn>, {
|
|
515
|
+
export declare function makeApplicationClearStateTxnFromObject(o: Expand<Pick<RenameProperties<MustHaveSuggestedParams<AppOptInTxn>, {
|
|
514
516
|
appAccounts: 'accounts';
|
|
515
517
|
appForeignApps: 'foreignApps';
|
|
516
518
|
appForeignAssets: 'foreignAssets';
|
|
517
519
|
reKeyTo: 'rekeyTo';
|
|
518
|
-
}>, 'from' | 'suggestedParams' | 'appIndex' | 'appArgs' | 'accounts' | 'foreignApps' | 'foreignAssets' | 'note' | 'lease' | 'rekeyTo'
|
|
520
|
+
}>, 'from' | 'suggestedParams' | 'appIndex' | 'appArgs' | 'accounts' | 'foreignApps' | 'foreignAssets' | 'note' | 'lease' | 'rekeyTo'>>): txnBuilder.Transaction;
|
|
519
521
|
/**
|
|
520
522
|
* Make a transaction that just calls an application, doing nothing on completion
|
|
521
523
|
* @param from - address of sender
|
|
@@ -537,17 +539,17 @@ export declare function makeApplicationClearStateTxnFromObject(o: Pick<RenamePro
|
|
|
537
539
|
* @param rekeyTo - String representation of the Algorand address that will be used to authorize all future transactions
|
|
538
540
|
*/
|
|
539
541
|
export declare function makeApplicationNoOpTxn(from: AppNoOpTxn['from'], suggestedParams: MustHaveSuggestedParams<AppNoOpTxn>['suggestedParams'], appIndex: AppNoOpTxn['appIndex'], appArgs?: AppNoOpTxn['appArgs'], accounts?: AppNoOpTxn['appAccounts'], foreignApps?: AppNoOpTxn['appForeignApps'], foreignAssets?: AppNoOpTxn['appForeignAssets'], note?: AppNoOpTxn['note'], lease?: AppNoOpTxn['lease'], rekeyTo?: AppNoOpTxn['reKeyTo']): txnBuilder.Transaction;
|
|
540
|
-
export declare function makeApplicationNoOpTxnFromObject(o: Pick<RenameProperties<MustHaveSuggestedParams<AppOptInTxn>, {
|
|
542
|
+
export declare function makeApplicationNoOpTxnFromObject(o: Expand<Pick<RenameProperties<MustHaveSuggestedParams<AppOptInTxn>, {
|
|
541
543
|
appAccounts: 'accounts';
|
|
542
544
|
appForeignApps: 'foreignApps';
|
|
543
545
|
appForeignAssets: 'foreignAssets';
|
|
544
546
|
reKeyTo: 'rekeyTo';
|
|
545
|
-
}>, 'from' | 'suggestedParams' | 'appIndex' | 'appArgs' | 'accounts' | 'foreignApps' | 'foreignAssets' | 'note' | 'lease' | 'rekeyTo'
|
|
547
|
+
}>, 'from' | 'suggestedParams' | 'appIndex' | 'appArgs' | 'accounts' | 'foreignApps' | 'foreignAssets' | 'note' | 'lease' | 'rekeyTo'>>): txnBuilder.Transaction;
|
|
546
548
|
export { OnApplicationComplete } from './types/transactions/base';
|
|
547
549
|
/**
|
|
548
550
|
* Generic function for creating any application call transaction.
|
|
549
551
|
*/
|
|
550
|
-
export declare function makeApplicationCallTxnFromObject(options: Pick<RenameProperties<MustHaveSuggestedParams<AppCreateTxn>, {
|
|
552
|
+
export declare function makeApplicationCallTxnFromObject(options: Expand<Pick<RenameProperties<MustHaveSuggestedParams<AppCreateTxn>, {
|
|
551
553
|
appOnComplete: 'onComplete';
|
|
552
554
|
appAccounts: 'accounts';
|
|
553
555
|
appForeignApps: 'foreignApps';
|
|
@@ -560,4 +562,4 @@ export declare function makeApplicationCallTxnFromObject(options: Pick<RenamePro
|
|
|
560
562
|
appLocalByteSlices: 'numLocalByteSlices';
|
|
561
563
|
appGlobalInts: 'numGlobalInts';
|
|
562
564
|
appGlobalByteSlices: 'numGlobalByteSlices';
|
|
563
|
-
}>, 'approvalProgram' | 'clearProgram' | 'numLocalInts' | 'numLocalByteSlices' | 'numGlobalInts' | 'numGlobalByteSlices'
|
|
565
|
+
}>, 'approvalProgram' | 'clearProgram' | 'numLocalInts' | 'numLocalByteSlices' | 'numGlobalInts' | 'numGlobalByteSlices'>>>): txnBuilder.Transaction;
|
|
@@ -7,7 +7,7 @@ export declare const ALGORAND_MIN_TX_FEE = 1000;
|
|
|
7
7
|
* A modified version of the transaction params. Represents the internal structure that the Transaction class uses
|
|
8
8
|
* to store inputted transaction objects.
|
|
9
9
|
*/
|
|
10
|
-
interface TransactionStorageStructure extends Omit<TransactionParams, 'from' | 'to' | 'genesisHash' | 'closeRemainderTo' | 'voteKey' | 'selectionKey' | 'assetManager' | 'assetReserve' | 'assetFreeze' | 'assetClawback' | 'assetRevocationTarget' | 'freezeAccount' | 'appAccounts' | 'suggestedParams' | 'reKeyTo'> {
|
|
10
|
+
interface TransactionStorageStructure extends Omit<TransactionParams, 'from' | 'to' | 'genesisHash' | 'closeRemainderTo' | 'voteKey' | 'selectionKey' | 'stateProofKey' | 'assetManager' | 'assetReserve' | 'assetFreeze' | 'assetClawback' | 'assetRevocationTarget' | 'freezeAccount' | 'appAccounts' | 'suggestedParams' | 'reKeyTo'> {
|
|
11
11
|
from: string | Address;
|
|
12
12
|
to: string | Address;
|
|
13
13
|
fee: number;
|
|
@@ -21,6 +21,7 @@ interface TransactionStorageStructure extends Omit<TransactionParams, 'from' | '
|
|
|
21
21
|
closeRemainderTo?: string | Address;
|
|
22
22
|
voteKey: string | Buffer;
|
|
23
23
|
selectionKey: string | Buffer;
|
|
24
|
+
stateProofKey: string | Buffer;
|
|
24
25
|
voteFirst: number;
|
|
25
26
|
voteLast: number;
|
|
26
27
|
voteKeyDilution: number;
|
|
@@ -77,6 +78,7 @@ export declare class Transaction implements TransactionStorageStructure {
|
|
|
77
78
|
closeRemainderTo?: Address;
|
|
78
79
|
voteKey: Buffer;
|
|
79
80
|
selectionKey: Buffer;
|
|
81
|
+
stateProofKey: Buffer;
|
|
80
82
|
voteFirst: number;
|
|
81
83
|
voteLast: number;
|
|
82
84
|
voteKeyDilution: number;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Enum for application transaction types.
|
|
3
3
|
*
|
|
4
|
-
* The full list is
|
|
4
|
+
* The full list is available at https://developer.algorand.org/docs/reference/transactions/
|
|
5
5
|
*/
|
|
6
6
|
export declare enum TransactionType {
|
|
7
7
|
/**
|
|
@@ -29,6 +29,7 @@ export declare enum TransactionType {
|
|
|
29
29
|
*/
|
|
30
30
|
appl = "appl"
|
|
31
31
|
}
|
|
32
|
+
export declare function isTransactionType(s: string): s is TransactionType;
|
|
32
33
|
/**
|
|
33
34
|
* Enums for application transactions on-transaction-complete behavior
|
|
34
35
|
*/
|
|
@@ -148,13 +149,17 @@ export interface TransactionParams {
|
|
|
148
149
|
*/
|
|
149
150
|
closeRemainderTo?: string;
|
|
150
151
|
/**
|
|
151
|
-
*
|
|
152
|
+
* Voting key bytes. For key deregistration, leave undefined
|
|
152
153
|
*/
|
|
153
|
-
voteKey: string;
|
|
154
|
+
voteKey: Uint8Array | string;
|
|
154
155
|
/**
|
|
155
|
-
*
|
|
156
|
+
*Selection key bytes. For key deregistration, leave undefined
|
|
156
157
|
*/
|
|
157
|
-
selectionKey: string;
|
|
158
|
+
selectionKey: Uint8Array | string;
|
|
159
|
+
/**
|
|
160
|
+
* State proof key bytes. For key deregistration, leave undefined
|
|
161
|
+
*/
|
|
162
|
+
stateProofKey: Uint8Array | string;
|
|
158
163
|
/**
|
|
159
164
|
* First round on which voteKey is valid
|
|
160
165
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TransactionType, TransactionParams } from './base';
|
|
2
2
|
import { ConstructTransaction } from './builder';
|
|
3
|
-
declare type SpecificParameters = Pick<TransactionParams, 'voteKey' | 'selectionKey' | 'voteFirst' | 'voteLast' | 'voteKeyDilution' | 'nonParticipation'>;
|
|
3
|
+
declare type SpecificParameters = Pick<TransactionParams, 'voteKey' | 'selectionKey' | 'stateProofKey' | 'voteFirst' | 'voteLast' | 'voteKeyDilution' | 'nonParticipation'>;
|
|
4
4
|
interface Overwrites {
|
|
5
5
|
type?: TransactionType.keyreg;
|
|
6
6
|
}
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Expands types for IntelliSense so they are more human readable
|
|
3
|
+
* See https://stackoverflow.com/a/69288824
|
|
4
|
+
*/
|
|
5
|
+
export declare type Expand<T> = T extends (...args: infer A) => infer R ? (...args: Expand<A>) => Expand<R> : T extends infer O ? {
|
|
6
|
+
[K in keyof O]: O[K];
|
|
7
|
+
} : never;
|
|
1
8
|
/**
|
|
2
9
|
* Same as TypeScript's Pick, but will distribute the Pick over unions
|
|
3
10
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "algosdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.14.0",
|
|
4
4
|
"description": "The official JavaScript SDK for Algorand",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@typescript-eslint/eslint-plugin": "^4.26.1",
|
|
37
37
|
"@typescript-eslint/parser": "^4.26.1",
|
|
38
38
|
"assert": "^2.0.0",
|
|
39
|
-
"chromedriver": "^
|
|
39
|
+
"chromedriver": "^99.0.0",
|
|
40
40
|
"concurrently": "^6.2.0",
|
|
41
41
|
"coveralls": "^3.1.0",
|
|
42
42
|
"cucumber": "^5.1.0",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"source-map-loader": "^2.0.2",
|
|
60
60
|
"ts-loader": "^8.3.0",
|
|
61
61
|
"ts-node": "^10.0.0",
|
|
62
|
-
"typedoc": "^0.22.
|
|
62
|
+
"typedoc": "^0.22.11",
|
|
63
63
|
"typedoc-plugin-missing-exports": "^0.22.6",
|
|
64
64
|
"typedoc-plugin-rename-defaults": "^0.4.0",
|
|
65
65
|
"typescript": "^4.2.3",
|