algosdk 1.11.1 → 1.13.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 +17 -6
- package/dist/browser/algosdk.min.js +1 -1
- package/dist/browser/algosdk.min.js.map +1 -1
- package/dist/cjs/src/abi/abi_type.js +693 -0
- package/dist/cjs/src/abi/abi_type.js.map +1 -0
- package/dist/cjs/src/abi/contract.js +27 -0
- package/dist/cjs/src/abi/contract.js.map +1 -0
- package/dist/cjs/src/abi/index.js +19 -0
- package/dist/cjs/src/abi/index.js.map +1 -0
- package/dist/cjs/src/abi/interface.js +23 -0
- package/dist/cjs/src/abi/interface.js.map +1 -0
- package/dist/cjs/src/abi/method.js +114 -0
- package/dist/cjs/src/abi/method.js.map +1 -0
- package/dist/cjs/src/abi/reference.js +25 -0
- package/dist/cjs/src/abi/reference.js.map +1 -0
- package/dist/cjs/src/abi/transaction.js +52 -0
- package/dist/cjs/src/abi/transaction.js.map +1 -0
- package/dist/cjs/src/client/baseHTTPClient.js +3 -0
- package/dist/cjs/src/client/baseHTTPClient.js.map +1 -0
- package/dist/cjs/src/client/client.js +165 -104
- package/dist/cjs/src/client/client.js.map +1 -1
- package/dist/cjs/src/client/urlTokenBaseHTTPClient.js +138 -0
- package/dist/cjs/src/client/urlTokenBaseHTTPClient.js.map +1 -0
- package/dist/cjs/src/client/v2/algod/algod.js +262 -9
- package/dist/cjs/src/client/v2/algod/algod.js.map +1 -1
- package/dist/cjs/src/client/v2/algod/models/types.js +13 -33
- package/dist/cjs/src/client/v2/algod/models/types.js.map +1 -1
- package/dist/cjs/src/client/v2/indexer/indexer.js +168 -3
- package/dist/cjs/src/client/v2/indexer/indexer.js.map +1 -1
- package/dist/cjs/src/client/v2/indexer/lookupApplicationLogs.js +48 -0
- package/dist/cjs/src/client/v2/indexer/lookupApplicationLogs.js.map +1 -0
- package/dist/cjs/src/client/v2/indexer/lookupAssetBalances.js +98 -6
- package/dist/cjs/src/client/v2/indexer/lookupAssetBalances.js.map +1 -1
- package/dist/cjs/src/client/v2/serviceClient.js +17 -8
- package/dist/cjs/src/client/v2/serviceClient.js.map +1 -1
- package/dist/cjs/src/composer.js +439 -0
- package/dist/cjs/src/composer.js.map +1 -0
- package/dist/cjs/src/dryrun.js +103 -0
- package/dist/cjs/src/dryrun.js.map +1 -0
- package/dist/cjs/src/encoding/address.js +14 -1
- package/dist/cjs/src/encoding/address.js.map +1 -1
- package/dist/cjs/src/encoding/bigint.js +38 -0
- package/dist/cjs/src/encoding/bigint.js.map +1 -0
- package/dist/cjs/src/logic/langspec.json +392 -77
- package/dist/cjs/src/logicsig.js +2 -2
- package/dist/cjs/src/logicsig.js.map +1 -1
- package/dist/cjs/src/main.js +18 -91
- package/dist/cjs/src/main.js.map +1 -1
- package/dist/cjs/src/makeTxn.js +29 -1
- package/dist/cjs/src/makeTxn.js.map +1 -1
- package/dist/cjs/src/multisig.js +77 -2
- package/dist/cjs/src/multisig.js.map +1 -1
- package/dist/cjs/src/signer.js +66 -0
- package/dist/cjs/src/signer.js.map +1 -0
- package/dist/cjs/src/transaction.js +50 -10
- package/dist/cjs/src/transaction.js.map +1 -1
- package/dist/cjs/src/types/intDecoding.js +0 -2
- package/dist/cjs/src/types/intDecoding.js.map +1 -1
- package/dist/cjs/src/types/transactions/base.js +0 -1
- package/dist/cjs/src/types/transactions/base.js.map +1 -1
- package/dist/cjs/src/wait.js +53 -0
- package/dist/cjs/src/wait.js.map +1 -0
- package/dist/esm/src/abi/abi_type.js +680 -0
- package/dist/esm/src/abi/abi_type.js.map +1 -0
- package/dist/esm/src/abi/contract.js +23 -0
- package/dist/esm/src/abi/contract.js.map +1 -0
- package/dist/esm/src/abi/index.js +7 -0
- package/dist/esm/src/abi/index.js.map +1 -0
- package/dist/esm/src/abi/interface.js +19 -0
- package/dist/esm/src/abi/interface.js.map +1 -0
- package/dist/esm/src/abi/method.js +110 -0
- package/dist/esm/src/abi/method.js.map +1 -0
- package/dist/esm/src/abi/reference.js +21 -0
- package/dist/esm/src/abi/reference.js.map +1 -0
- package/dist/esm/src/abi/transaction.js +47 -0
- package/dist/esm/src/abi/transaction.js.map +1 -0
- package/dist/esm/src/client/baseHTTPClient.js +2 -0
- package/dist/esm/src/client/baseHTTPClient.js.map +1 -0
- package/dist/esm/src/client/client.js +165 -101
- package/dist/esm/src/client/client.js.map +1 -1
- package/dist/esm/src/client/urlTokenBaseHTTPClient.js +112 -0
- package/dist/esm/src/client/urlTokenBaseHTTPClient.js.map +1 -0
- package/dist/esm/src/client/v2/algod/algod.js +262 -9
- package/dist/esm/src/client/v2/algod/algod.js.map +1 -1
- package/dist/esm/src/client/v2/algod/models/types.js +12 -31
- package/dist/esm/src/client/v2/algod/models/types.js.map +1 -1
- package/dist/esm/src/client/v2/indexer/indexer.js +168 -3
- package/dist/esm/src/client/v2/indexer/indexer.js.map +1 -1
- package/dist/esm/src/client/v2/indexer/lookupApplicationLogs.js +42 -0
- package/dist/esm/src/client/v2/indexer/lookupApplicationLogs.js.map +1 -0
- package/dist/esm/src/client/v2/indexer/lookupAssetBalances.js +98 -6
- package/dist/esm/src/client/v2/indexer/lookupAssetBalances.js.map +1 -1
- package/dist/esm/src/client/v2/serviceClient.js +17 -8
- package/dist/esm/src/client/v2/serviceClient.js.map +1 -1
- package/dist/esm/src/composer.js +435 -0
- package/dist/esm/src/composer.js.map +1 -0
- package/dist/esm/src/dryrun.js +99 -0
- package/dist/esm/src/dryrun.js.map +1 -0
- package/dist/esm/src/encoding/address.js +12 -0
- package/dist/esm/src/encoding/address.js.map +1 -1
- package/dist/esm/src/encoding/bigint.js +33 -0
- package/dist/esm/src/encoding/bigint.js.map +1 -0
- package/dist/esm/src/logic/langspec.json +392 -77
- package/dist/esm/src/logicsig.js +2 -2
- package/dist/esm/src/logicsig.js.map +1 -1
- package/dist/esm/src/main.js +8 -85
- package/dist/esm/src/main.js.map +1 -1
- package/dist/esm/src/makeTxn.js +27 -0
- package/dist/esm/src/makeTxn.js.map +1 -1
- package/dist/esm/src/multisig.js +73 -1
- package/dist/esm/src/multisig.js.map +1 -1
- package/dist/esm/src/signer.js +59 -0
- package/dist/esm/src/signer.js.map +1 -0
- package/dist/esm/src/transaction.js +50 -10
- package/dist/esm/src/transaction.js.map +1 -1
- package/dist/esm/src/types/intDecoding.js +0 -2
- package/dist/esm/src/types/intDecoding.js.map +1 -1
- package/dist/esm/src/types/transactions/base.js +0 -1
- package/dist/esm/src/types/transactions/base.js.map +1 -1
- package/dist/esm/src/wait.js +49 -0
- package/dist/esm/src/wait.js.map +1 -0
- package/dist/types/src/abi/abi_type.d.ts +102 -0
- package/dist/types/src/abi/contract.d.ts +21 -0
- package/dist/types/src/abi/index.d.ts +6 -0
- package/dist/types/src/abi/interface.d.ts +13 -0
- package/dist/types/src/abi/method.d.ts +39 -0
- package/dist/types/src/abi/reference.d.ts +15 -0
- package/dist/types/src/abi/transaction.d.ts +33 -0
- package/dist/types/src/client/baseHTTPClient.d.ts +41 -0
- package/dist/types/src/client/client.d.ts +67 -31
- package/dist/types/src/client/kmd.d.ts +1 -1
- package/dist/types/src/client/urlTokenBaseHTTPClient.d.ts +44 -0
- package/dist/types/src/client/v2/algod/algod.d.ts +263 -9
- package/dist/types/src/client/v2/algod/models/types.d.ts +24 -37
- package/dist/types/src/client/v2/indexer/indexer.d.ts +167 -3
- package/dist/types/src/client/v2/indexer/lookupApplicationLogs.d.ts +20 -0
- package/dist/types/src/client/v2/indexer/lookupAssetBalances.d.ts +98 -0
- package/dist/types/src/client/v2/serviceClient.d.ts +6 -2
- package/dist/types/src/composer.d.ts +160 -0
- package/dist/types/src/dryrun.d.ts +20 -0
- package/dist/types/src/encoding/address.d.ts +6 -0
- package/dist/types/src/encoding/bigint.d.ts +14 -0
- package/dist/types/src/main.d.ts +9 -48
- package/dist/types/src/makeTxn.d.ts +18 -1
- package/dist/types/src/multisig.d.ts +39 -1
- package/dist/types/src/signer.d.ts +40 -0
- package/dist/types/src/wait.d.ts +11 -0
- package/package.json +6 -4
package/dist/types/src/main.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as txnBuilder from './transaction';
|
|
2
2
|
import { BidOptions } from './bid';
|
|
3
|
-
import { MultisigMetadata } from './types/multisig';
|
|
4
3
|
export declare const MULTISIG_BAD_SENDER_ERROR_MSG = "The transaction sender address and multisig preimage do not match.";
|
|
5
4
|
/**
|
|
6
5
|
* signTransaction takes an object with either payment or key registration fields and
|
|
@@ -46,50 +45,6 @@ export declare function signBytes(bytes: Uint8Array, sk: Uint8Array): Uint8Array
|
|
|
46
45
|
* @returns bool
|
|
47
46
|
*/
|
|
48
47
|
export declare function verifyBytes(bytes: Uint8Array, signature: Uint8Array, addr: string): boolean;
|
|
49
|
-
/**
|
|
50
|
-
* signMultisigTransaction takes a raw transaction (see signTransaction), a multisig preimage, a secret key, and returns
|
|
51
|
-
* a multisig transaction, which is a blob representing a transaction and multisignature account preimage. The returned
|
|
52
|
-
* multisig txn can accumulate additional signatures through mergeMultisigTransactions or appendMultisigTransaction.
|
|
53
|
-
* @param txn - object with either payment or key registration fields
|
|
54
|
-
* @param version - multisig version
|
|
55
|
-
* @param threshold - multisig threshold
|
|
56
|
-
* @param addrs - a list of Algorand addresses representing possible signers for this multisig. Order is important.
|
|
57
|
-
* @param sk - Algorand secret key. The corresponding pk should be in the pre image.
|
|
58
|
-
* @returns object containing txID, and blob of partially signed multisig transaction (with multisig preimage information)
|
|
59
|
-
* If the final calculated fee is lower than the protocol minimum fee, the fee will be increased to match the minimum.
|
|
60
|
-
*/
|
|
61
|
-
export declare function signMultisigTransaction(txn: txnBuilder.TransactionLike, { version, threshold, addrs }: MultisigMetadata, sk: Uint8Array): {
|
|
62
|
-
txID: string;
|
|
63
|
-
blob: Uint8Array;
|
|
64
|
-
};
|
|
65
|
-
/**
|
|
66
|
-
* mergeMultisigTransactions takes a list of multisig transaction blobs, and merges them.
|
|
67
|
-
* @param multisigTxnBlobs - a list of blobs representing encoded multisig txns
|
|
68
|
-
* @returns blob representing encoded multisig txn
|
|
69
|
-
*/
|
|
70
|
-
export declare function mergeMultisigTransactions(multisigTxnBlobs: Uint8Array[]): Uint8Array;
|
|
71
|
-
/**
|
|
72
|
-
* appendSignMultisigTransaction takes a multisig transaction blob, and appends our signature to it.
|
|
73
|
-
* While we could derive public key preimagery from the partially-signed multisig transaction,
|
|
74
|
-
* we ask the caller to pass it back in, to ensure they know what they are signing.
|
|
75
|
-
* @param multisigTxnBlob - an encoded multisig txn. Supports non-payment txn types.
|
|
76
|
-
* @param version - multisig version
|
|
77
|
-
* @param threshold - multisig threshold
|
|
78
|
-
* @param addrs - a list of Algorand addresses representing possible signers for this multisig. Order is important.
|
|
79
|
-
* @param sk - Algorand secret key
|
|
80
|
-
* @returns object containing txID, and blob representing encoded multisig txn
|
|
81
|
-
*/
|
|
82
|
-
export declare function appendSignMultisigTransaction(multisigTxnBlob: Uint8Array, { version, threshold, addrs }: MultisigMetadata, sk: Uint8Array): {
|
|
83
|
-
txID: string;
|
|
84
|
-
blob: Uint8Array;
|
|
85
|
-
};
|
|
86
|
-
/**
|
|
87
|
-
* multisigAddress takes multisig metadata (preimage) and returns the corresponding human readable Algorand address.
|
|
88
|
-
* @param version - mutlisig version
|
|
89
|
-
* @param threshold - multisig threshold
|
|
90
|
-
* @param addrs - list of Algorand addresses
|
|
91
|
-
*/
|
|
92
|
-
export declare function multisigAddress({ version, threshold, addrs, }: MultisigMetadata): string;
|
|
93
48
|
/**
|
|
94
49
|
* encodeObj takes a javascript object and returns its msgpack encoding
|
|
95
50
|
* Note that the encoding sorts the fields alphabetically
|
|
@@ -111,16 +66,22 @@ export { default as Kmd } from './client/kmd';
|
|
|
111
66
|
export { default as IntDecoding } from './types/intDecoding';
|
|
112
67
|
export { default as Account } from './types/account';
|
|
113
68
|
export { default as Indexer } from './client/v2/indexer/indexer';
|
|
114
|
-
export {
|
|
69
|
+
export { BaseHTTPClient, BaseHTTPClientResponse, BaseHTTPClientError, } from './client/baseHTTPClient';
|
|
70
|
+
export { waitForConfirmation } from './wait';
|
|
71
|
+
export { isValidAddress, encodeAddress, decodeAddress, getApplicationAddress, } from './encoding/address';
|
|
115
72
|
export { encodeUint64, decodeUint64 } from './encoding/uint64';
|
|
116
73
|
export { default as generateAccount } from './account';
|
|
117
|
-
export { secretKeyToMnemonic, mnemonicToSecretKey } from './mnemonic/mnemonic';
|
|
118
74
|
export * as modelsv2 from './client/v2/algod/models/types';
|
|
119
|
-
export { mnemonicToMasterDerivationKey, masterDerivationKeyToMnemonic, } from './mnemonic/mnemonic';
|
|
75
|
+
export { mnemonicToMasterDerivationKey, masterDerivationKeyToMnemonic, secretKeyToMnemonic, mnemonicToSecretKey, seedFromMnemonic, mnemonicFromSeed, } from './mnemonic/mnemonic';
|
|
120
76
|
export { microalgosToAlgos, algosToMicroalgos, INVALID_MICROALGOS_ERROR_MSG, } from './convert';
|
|
121
77
|
export { computeGroupID, assignGroupID } from './group';
|
|
122
78
|
export { LogicSigAccount, makeLogicSig, signLogicSigTransaction, signLogicSigTransactionObject, logicSigFromByte, tealSign, tealSignFromProgram, } from './logicsig';
|
|
79
|
+
export { signMultisigTransaction, mergeMultisigTransactions, appendSignMultisigTransaction, multisigAddress, } from './multisig';
|
|
123
80
|
export declare const LogicTemplates: any;
|
|
81
|
+
export * from './dryrun';
|
|
124
82
|
export * from './makeTxn';
|
|
125
83
|
export * from './transaction';
|
|
84
|
+
export * from './signer';
|
|
85
|
+
export * from './composer';
|
|
126
86
|
export * from './types';
|
|
87
|
+
export * from './abi';
|
|
@@ -455,7 +455,7 @@ export declare function makeApplicationDeleteTxnFromObject(o: Pick<RenamePropert
|
|
|
455
455
|
* @param lease - Lease a transaction
|
|
456
456
|
* @param rekeyTo - String representation of the Algorand address that will be used to authorize all future transactions
|
|
457
457
|
*/
|
|
458
|
-
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['
|
|
458
|
+
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
459
|
export declare function makeApplicationOptInTxnFromObject(o: Pick<RenameProperties<MustHaveSuggestedParams<AppOptInTxn>, {
|
|
460
460
|
appAccounts: 'accounts';
|
|
461
461
|
appForeignApps: 'foreignApps';
|
|
@@ -544,3 +544,20 @@ export declare function makeApplicationNoOpTxnFromObject(o: Pick<RenamePropertie
|
|
|
544
544
|
reKeyTo: 'rekeyTo';
|
|
545
545
|
}>, 'from' | 'suggestedParams' | 'appIndex' | 'appArgs' | 'accounts' | 'foreignApps' | 'foreignAssets' | 'note' | 'lease' | 'rekeyTo'>): txnBuilder.Transaction;
|
|
546
546
|
export { OnApplicationComplete } from './types/transactions/base';
|
|
547
|
+
/**
|
|
548
|
+
* Generic function for creating any application call transaction.
|
|
549
|
+
*/
|
|
550
|
+
export declare function makeApplicationCallTxnFromObject(options: Pick<RenameProperties<MustHaveSuggestedParams<AppCreateTxn>, {
|
|
551
|
+
appOnComplete: 'onComplete';
|
|
552
|
+
appAccounts: 'accounts';
|
|
553
|
+
appForeignApps: 'foreignApps';
|
|
554
|
+
appForeignAssets: 'foreignAssets';
|
|
555
|
+
reKeyTo: 'rekeyTo';
|
|
556
|
+
}>, 'from' | 'suggestedParams' | 'appIndex' | 'onComplete' | 'appArgs' | 'accounts' | 'foreignApps' | 'foreignAssets' | 'note' | 'lease' | 'rekeyTo' | 'extraPages'> & Partial<Pick<RenameProperties<MustHaveSuggestedParams<AppCreateTxn>, {
|
|
557
|
+
appApprovalProgram: 'approvalProgram';
|
|
558
|
+
appClearProgram: 'clearProgram';
|
|
559
|
+
appLocalInts: 'numLocalInts';
|
|
560
|
+
appLocalByteSlices: 'numLocalByteSlices';
|
|
561
|
+
appGlobalInts: 'numGlobalInts';
|
|
562
|
+
appGlobalByteSlices: 'numGlobalByteSlices';
|
|
563
|
+
}>, 'approvalProgram' | 'clearProgram' | 'numLocalInts' | 'numLocalByteSlices' | 'numGlobalInts' | 'numGlobalByteSlices'>>): txnBuilder.Transaction;
|
|
@@ -50,4 +50,42 @@ export declare class MultisigTransaction extends txnBuilder.Transaction {
|
|
|
50
50
|
*/
|
|
51
51
|
export declare function mergeMultisigTransactions(multisigTxnBlobs: Uint8Array[]): Uint8Array;
|
|
52
52
|
export declare function verifyMultisig(toBeVerified: Uint8Array, msig: EncodedMultisig, publicKey: Uint8Array): boolean;
|
|
53
|
-
|
|
53
|
+
/**
|
|
54
|
+
* signMultisigTransaction takes a raw transaction (see signTransaction), a multisig preimage, a secret key, and returns
|
|
55
|
+
* a multisig transaction, which is a blob representing a transaction and multisignature account preimage. The returned
|
|
56
|
+
* multisig txn can accumulate additional signatures through mergeMultisigTransactions or appendMultisigTransaction.
|
|
57
|
+
* @param txn - object with either payment or key registration fields
|
|
58
|
+
* @param version - multisig version
|
|
59
|
+
* @param threshold - multisig threshold
|
|
60
|
+
* @param addrs - a list of Algorand addresses representing possible signers for this multisig. Order is important.
|
|
61
|
+
* @param sk - Algorand secret key. The corresponding pk should be in the pre image.
|
|
62
|
+
* @returns object containing txID, and blob of partially signed multisig transaction (with multisig preimage information)
|
|
63
|
+
* If the final calculated fee is lower than the protocol minimum fee, the fee will be increased to match the minimum.
|
|
64
|
+
*/
|
|
65
|
+
export declare function signMultisigTransaction(txn: txnBuilder.TransactionLike, { version, threshold, addrs }: MultisigMetadata, sk: Uint8Array): {
|
|
66
|
+
txID: string;
|
|
67
|
+
blob: Uint8Array;
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* appendSignMultisigTransaction takes a multisig transaction blob, and appends our signature to it.
|
|
71
|
+
* While we could derive public key preimagery from the partially-signed multisig transaction,
|
|
72
|
+
* we ask the caller to pass it back in, to ensure they know what they are signing.
|
|
73
|
+
* @param multisigTxnBlob - an encoded multisig txn. Supports non-payment txn types.
|
|
74
|
+
* @param version - multisig version
|
|
75
|
+
* @param threshold - multisig threshold
|
|
76
|
+
* @param addrs - a list of Algorand addresses representing possible signers for this multisig. Order is important.
|
|
77
|
+
* @param sk - Algorand secret key
|
|
78
|
+
* @returns object containing txID, and blob representing encoded multisig txn
|
|
79
|
+
*/
|
|
80
|
+
export declare function appendSignMultisigTransaction(multisigTxnBlob: Uint8Array, { version, threshold, addrs }: MultisigMetadata, sk: Uint8Array): {
|
|
81
|
+
txID: string;
|
|
82
|
+
blob: Uint8Array;
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* multisigAddress takes multisig metadata (preimage) and returns the corresponding human readable Algorand address.
|
|
86
|
+
* @param version - mutlisig version
|
|
87
|
+
* @param threshold - multisig threshold
|
|
88
|
+
* @param addrs - list of Algorand addresses
|
|
89
|
+
*/
|
|
90
|
+
export declare function multisigAddress({ version, threshold, addrs, }: MultisigMetadata): string;
|
|
91
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Transaction } from './transaction';
|
|
2
|
+
import Account from './types/account';
|
|
3
|
+
import { LogicSigAccount } from './logicsig';
|
|
4
|
+
import { MultisigMetadata } from './types/multisig';
|
|
5
|
+
/**
|
|
6
|
+
* This type represents a function which can sign transactions from an atomic transaction group.
|
|
7
|
+
* @param txnGroup - The atomic group containing transactions to be signed
|
|
8
|
+
* @param indexesToSign - An array of indexes in the atomic transaction group that should be signed
|
|
9
|
+
* @returns A promise which resolves an array of encoded signed transactions. The length of the
|
|
10
|
+
* array will be the same as the length of indexesToSign, and each index i in the array
|
|
11
|
+
* corresponds to the signed transaction from txnGroup[indexesToSign[i]]
|
|
12
|
+
*/
|
|
13
|
+
export declare type TransactionSigner = (txnGroup: Transaction[], indexesToSign: number[]) => Promise<Uint8Array[]>;
|
|
14
|
+
/**
|
|
15
|
+
* Create a TransactionSigner that can sign transactions for the provided basic Account.
|
|
16
|
+
*/
|
|
17
|
+
export declare function makeBasicAccountTransactionSigner(account: Account): TransactionSigner;
|
|
18
|
+
/**
|
|
19
|
+
* Create a TransactionSigner that can sign transactions for the provided LogicSigAccount.
|
|
20
|
+
*/
|
|
21
|
+
export declare function makeLogicSigAccountTransactionSigner(account: LogicSigAccount): TransactionSigner;
|
|
22
|
+
/**
|
|
23
|
+
* Create a TransactionSigner that can sign transactions for the provided Multisig account.
|
|
24
|
+
* @param msig - The Multisig account metadata
|
|
25
|
+
* @param sks - An array of private keys belonging to the msig which should sign the transactions.
|
|
26
|
+
*/
|
|
27
|
+
export declare function makeMultiSigAccountTransactionSigner(msig: MultisigMetadata, sks: Uint8Array[]): TransactionSigner;
|
|
28
|
+
/** Represents an unsigned transactions and a signer that can authorize that transaction. */
|
|
29
|
+
export interface TransactionWithSigner {
|
|
30
|
+
/** An unsigned transaction */
|
|
31
|
+
txn: Transaction;
|
|
32
|
+
/** A transaction signer that can authorize txn */
|
|
33
|
+
signer: TransactionSigner;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Check if a value conforms to the TransactionWithSigner structure.
|
|
37
|
+
* @param value - The value to check.
|
|
38
|
+
* @returns True if an only if the value has the structure of a TransactionWithSigner.
|
|
39
|
+
*/
|
|
40
|
+
export declare function isTransactionWithSigner(value: any): value is TransactionWithSigner;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import Algodv2 from './client/v2/algod/algod';
|
|
2
|
+
/**
|
|
3
|
+
* Wait until a transaction has been confirmed or rejected by the network, or
|
|
4
|
+
* until 'waitRounds' number of rounds have passed.
|
|
5
|
+
* @param client - An Algodv2 client
|
|
6
|
+
* @param txid - The ID of the transaction to wait for.
|
|
7
|
+
* @param waitRounds - The maximum number of rounds to wait for.
|
|
8
|
+
* @returns A promise that, upon success, will resolve to the output of the
|
|
9
|
+
* `pendingTransactionInformation` call for the confirmed transaction.
|
|
10
|
+
*/
|
|
11
|
+
export declare function waitForConfirmation(client: Algodv2, txid: string, waitRounds: number): Promise<Record<string, any>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "algosdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.13.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": "^97.0.0",
|
|
40
40
|
"concurrently": "^6.2.0",
|
|
41
41
|
"coveralls": "^3.1.0",
|
|
42
42
|
"cucumber": "^5.1.0",
|
|
@@ -59,7 +59,9 @@
|
|
|
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.
|
|
62
|
+
"typedoc": "^0.22.10",
|
|
63
|
+
"typedoc-plugin-missing-exports": "^0.22.6",
|
|
64
|
+
"typedoc-plugin-rename-defaults": "^0.4.0",
|
|
63
65
|
"typescript": "^4.2.3",
|
|
64
66
|
"webpack": "^5.38.1",
|
|
65
67
|
"webpack-cli": "^4.7.2"
|
|
@@ -69,7 +71,7 @@
|
|
|
69
71
|
"prepare": "npm run build",
|
|
70
72
|
"prepare-browser-tests": "npm run build && mkdir -p tests/cucumber/browser/build && cp dist/browser/algosdk.min.* tests/cucumber/browser/build/ && webpack --config tests/cucumber/browser/webpack.config.js",
|
|
71
73
|
"build": "concurrently \"webpack --config webpack.config.js\" \"tsc -p tsconfig-esm.json\" \"tsc -p tsconfig-cjs.json\"",
|
|
72
|
-
"docs": "typedoc src/main.ts",
|
|
74
|
+
"docs": "typedoc src/main.ts --options typedoc.config.json",
|
|
73
75
|
"lint": "eslint .",
|
|
74
76
|
"lint:fix": "eslint --fix .",
|
|
75
77
|
"format": "prettier --write .",
|