algosdk 1.19.0 → 1.20.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 +4 -4
- package/dist/browser/algosdk.min.js +1 -1
- package/dist/browser/algosdk.min.js.map +1 -1
- package/dist/cjs/src/client/v2/algod/algod.js +37 -5
- package/dist/cjs/src/client/v2/algod/algod.js.map +1 -1
- package/dist/cjs/src/client/v2/algod/getTransactionProof.js +41 -0
- package/dist/cjs/src/client/v2/algod/getTransactionProof.js.map +1 -0
- package/dist/cjs/src/client/v2/algod/{proof.js → lightBlockHeaderProof.js} +5 -7
- package/dist/cjs/src/client/v2/algod/lightBlockHeaderProof.js.map +1 -0
- package/dist/cjs/src/client/v2/algod/models/types.js +117 -30
- package/dist/cjs/src/client/v2/algod/models/types.js.map +1 -1
- package/dist/cjs/src/client/v2/algod/stateproof.js +18 -0
- package/dist/cjs/src/client/v2/algod/stateproof.js.map +1 -0
- package/dist/cjs/src/client/v2/indexer/lookupAccountTransactions.js +1 -1
- package/dist/cjs/src/client/v2/indexer/searchForTransactions.js +1 -1
- package/dist/cjs/src/logic/logic.js +28 -1
- package/dist/cjs/src/logic/logic.js.map +1 -1
- package/dist/cjs/src/logicsig.js +27 -6
- package/dist/cjs/src/logicsig.js.map +1 -1
- package/dist/cjs/src/main.js +5 -1
- package/dist/cjs/src/main.js.map +1 -1
- package/dist/cjs/src/multisig.js +95 -24
- package/dist/cjs/src/multisig.js.map +1 -1
- package/dist/cjs/src/nacl/naclWrappers.js +5 -1
- package/dist/cjs/src/nacl/naclWrappers.js.map +1 -1
- package/dist/cjs/src/transaction.js +97 -0
- package/dist/cjs/src/transaction.js.map +1 -1
- package/dist/cjs/src/types/transactions/base.js +6 -1
- package/dist/cjs/src/types/transactions/base.js.map +1 -1
- package/dist/cjs/src/types/transactions/index.js.map +1 -1
- package/dist/cjs/src/types/transactions/stateproof.js +3 -0
- package/dist/cjs/src/types/transactions/stateproof.js.map +1 -0
- package/dist/esm/src/client/v2/algod/algod.js +37 -5
- package/dist/esm/src/client/v2/algod/algod.js.map +1 -1
- package/dist/esm/src/client/v2/algod/getTransactionProof.js +35 -0
- package/dist/esm/src/client/v2/algod/getTransactionProof.js.map +1 -0
- package/dist/esm/src/client/v2/algod/lightBlockHeaderProof.js +12 -0
- package/dist/esm/src/client/v2/algod/lightBlockHeaderProof.js.map +1 -0
- package/dist/esm/src/client/v2/algod/models/types.js +112 -28
- package/dist/esm/src/client/v2/algod/models/types.js.map +1 -1
- package/dist/esm/src/client/v2/algod/stateproof.js +12 -0
- package/dist/esm/src/client/v2/algod/stateproof.js.map +1 -0
- package/dist/esm/src/client/v2/indexer/lookupAccountTransactions.js +1 -1
- package/dist/esm/src/client/v2/indexer/searchForTransactions.js +1 -1
- package/dist/esm/src/logic/logic.js +28 -1
- package/dist/esm/src/logic/logic.js.map +1 -1
- package/dist/esm/src/logicsig.js +25 -5
- package/dist/esm/src/logicsig.js.map +1 -1
- package/dist/esm/src/main.js +1 -1
- package/dist/esm/src/main.js.map +1 -1
- package/dist/esm/src/multisig.js +92 -23
- package/dist/esm/src/multisig.js.map +1 -1
- package/dist/esm/src/nacl/naclWrappers.js +3 -0
- package/dist/esm/src/nacl/naclWrappers.js.map +1 -1
- package/dist/esm/src/transaction.js +97 -0
- package/dist/esm/src/transaction.js.map +1 -1
- package/dist/esm/src/types/transactions/base.js +6 -1
- package/dist/esm/src/types/transactions/base.js.map +1 -1
- package/dist/esm/src/types/transactions/index.js.map +1 -1
- package/dist/esm/src/types/transactions/stateproof.js +2 -0
- package/dist/esm/src/types/transactions/stateproof.js.map +1 -0
- package/dist/types/src/client/v2/algod/algod.d.ts +32 -4
- package/dist/types/src/client/v2/algod/getTransactionProof.d.ts +27 -0
- package/dist/types/src/client/v2/algod/{proof.d.ts → lightBlockHeaderProof.d.ts} +2 -3
- package/dist/types/src/client/v2/algod/models/types.d.ts +119 -30
- package/dist/types/src/client/v2/algod/stateproof.d.ts +8 -0
- package/dist/types/src/client/v2/indexer/lookupAccountTransactions.d.ts +1 -1
- package/dist/types/src/client/v2/indexer/searchForTransactions.d.ts +1 -1
- package/dist/types/src/logic/logic.d.ts +19 -0
- package/dist/types/src/logicsig.d.ts +6 -0
- package/dist/types/src/main.d.ts +1 -1
- package/dist/types/src/multisig.d.ts +36 -2
- package/dist/types/src/nacl/naclWrappers.d.ts +1 -0
- package/dist/types/src/transaction.d.ts +7 -0
- package/dist/types/src/types/blockHeader.d.ts +9 -1
- package/dist/types/src/types/transactions/base.d.ts +17 -1
- package/dist/types/src/types/transactions/encoded.d.ts +12 -0
- package/dist/types/src/types/transactions/index.d.ts +3 -1
- package/dist/types/src/types/transactions/stateproof.d.ts +8 -0
- package/package.json +1 -1
- package/dist/cjs/src/client/v2/algod/proof.js.map +0 -1
- package/dist/esm/src/client/v2/algod/proof.js +0 -14
- package/dist/esm/src/client/v2/algod/proof.js.map +0 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import JSONRequest from '../jsonrequest';
|
|
2
|
+
import HTTPClient from '../../client';
|
|
3
|
+
import IntDecoding from '../../../types/intDecoding';
|
|
4
|
+
export default class StateProof extends JSONRequest {
|
|
5
|
+
private round;
|
|
6
|
+
constructor(c: HTTPClient, intDecoding: IntDecoding, round: number);
|
|
7
|
+
path(): string;
|
|
8
|
+
}
|
|
@@ -55,7 +55,7 @@ export default class LookupAccountTransactions extends JSONRequest {
|
|
|
55
55
|
* .do();
|
|
56
56
|
* ```
|
|
57
57
|
*
|
|
58
|
-
* @param type - one of `pay`, `keyreg`, `acfg`, `axfer`, `afrz`, `appl`
|
|
58
|
+
* @param type - one of `pay`, `keyreg`, `acfg`, `axfer`, `afrz`, `appl`, `stpf`
|
|
59
59
|
* @category query
|
|
60
60
|
*/
|
|
61
61
|
txType(type: string): this;
|
|
@@ -42,7 +42,7 @@ export default class SearchForTransactions extends JSONRequest {
|
|
|
42
42
|
* .do();
|
|
43
43
|
* ```
|
|
44
44
|
*
|
|
45
|
-
* @param type - one of `pay`, `keyreg`, `acfg`, `axfer`, `afrz`, `appl`
|
|
45
|
+
* @param type - one of `pay`, `keyreg`, `acfg`, `axfer`, `afrz`, `appl`, `stpf`
|
|
46
46
|
* @category query
|
|
47
47
|
*/
|
|
48
48
|
txType(type: string): this;
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Utilities for working with program bytes.
|
|
3
3
|
*/
|
|
4
|
+
/** @deprecated for langspec.json is deprecated aross all SDKs */
|
|
4
5
|
export declare function parseUvarint(array: Uint8Array): [numberFound: number, size: number];
|
|
5
6
|
/** readProgram validates program for length and running cost,
|
|
6
7
|
* and additionally provides the found int variables and byte blocks
|
|
8
|
+
*
|
|
9
|
+
* @deprecated Validation relies on metadata (`langspec.json`) that
|
|
10
|
+
* does not accurately represent opcode behavior across program versions.
|
|
11
|
+
* The behavior of `readProgram` relies on `langspec.json`.
|
|
12
|
+
* Thus, this method is being deprecated.
|
|
13
|
+
*
|
|
7
14
|
* @param program - Program to check
|
|
8
15
|
* @param args - Program arguments as array of Uint8Array arrays
|
|
9
16
|
* @throws
|
|
@@ -12,15 +19,27 @@ export declare function parseUvarint(array: Uint8Array): [numberFound: number, s
|
|
|
12
19
|
export declare function readProgram(program: Uint8Array, args?: Uint8Array[]): [ints: number[], byteArrays: Uint8Array[], valid: boolean];
|
|
13
20
|
/**
|
|
14
21
|
* checkProgram validates program for length and running cost
|
|
22
|
+
*
|
|
23
|
+
* @deprecated Validation relies on metadata (`langspec.json`) that
|
|
24
|
+
* does not accurately represent opcode behavior across program versions.
|
|
25
|
+
* The behavior of `checkProgram` relies on `langspec.json`.
|
|
26
|
+
* Thus, this method is being deprecated.
|
|
27
|
+
*
|
|
15
28
|
* @param program - Program to check
|
|
16
29
|
* @param args - Program arguments as array of Uint8Array arrays
|
|
17
30
|
* @throws
|
|
18
31
|
* @returns true if success
|
|
19
32
|
*/
|
|
20
33
|
export declare function checkProgram(program: Uint8Array, args?: Uint8Array[]): boolean;
|
|
34
|
+
/** @deprecated for langspec.json is deprecated aross all SDKs */
|
|
21
35
|
export declare function checkIntConstBlock(program: Uint8Array, pc: number): number;
|
|
36
|
+
/** @deprecated for langspec.json is deprecated aross all SDKs */
|
|
22
37
|
export declare function checkByteConstBlock(program: Uint8Array, pc: number): number;
|
|
38
|
+
/** @deprecated for langspec.json is deprecated aross all SDKs */
|
|
23
39
|
export declare function checkPushIntOp(program: Uint8Array, pc: number): number;
|
|
40
|
+
/** @deprecated for langspec.json is deprecated aross all SDKs */
|
|
24
41
|
export declare function checkPushByteOp(program: Uint8Array, pc: number): number;
|
|
42
|
+
/** @deprecated for langspec.json is deprecated aross all SDKs */
|
|
25
43
|
export declare const langspecEvalMaxVersion: number;
|
|
44
|
+
/** @deprecated for langspec.json is deprecated aross all SDKs */
|
|
26
45
|
export declare const langspecLogicSigVersion: number;
|
|
@@ -8,6 +8,12 @@ interface LogicSigStorageStructure {
|
|
|
8
8
|
sig?: Uint8Array;
|
|
9
9
|
msig?: EncodedMultisig;
|
|
10
10
|
}
|
|
11
|
+
/** sanityCheckProgram performs heuristic program validation:
|
|
12
|
+
* check if passed in bytes are Algorand address or is B64 encoded, rather than Teal bytes
|
|
13
|
+
*
|
|
14
|
+
* @param program - Program bytes to check
|
|
15
|
+
*/
|
|
16
|
+
export declare function sanityCheckProgram(program: Uint8Array): void;
|
|
11
17
|
/**
|
|
12
18
|
LogicSig implementation
|
|
13
19
|
*/
|
package/dist/types/src/main.d.ts
CHANGED
|
@@ -77,7 +77,7 @@ export { mnemonicToMasterDerivationKey, masterDerivationKeyToMnemonic, secretKey
|
|
|
77
77
|
export { microalgosToAlgos, algosToMicroalgos, INVALID_MICROALGOS_ERROR_MSG, } from './convert';
|
|
78
78
|
export { computeGroupID, assignGroupID } from './group';
|
|
79
79
|
export { LogicSigAccount, makeLogicSig, signLogicSigTransaction, signLogicSigTransactionObject, logicSigFromByte, tealSign, tealSignFromProgram, } from './logicsig';
|
|
80
|
-
export { signMultisigTransaction, mergeMultisigTransactions, appendSignMultisigTransaction, multisigAddress, } from './multisig';
|
|
80
|
+
export { signMultisigTransaction, mergeMultisigTransactions, appendSignMultisigTransaction, createMultisigTransaction, appendSignRawMultisigSignature, verifyMultisig, multisigAddress, } from './multisig';
|
|
81
81
|
export { SourceMap } from './logic/sourcemap';
|
|
82
82
|
export declare const LogicTemplates: any;
|
|
83
83
|
export * from './dryrun';
|
|
@@ -12,9 +12,19 @@ export declare const MULTISIG_MERGE_WRONG_PREIMAGE_ERROR_MSG = "Cannot merge txs
|
|
|
12
12
|
export declare const MULTISIG_MERGE_SIG_MISMATCH_ERROR_MSG = "Cannot merge txs. subsigs are mismatched.";
|
|
13
13
|
export declare const MULTISIG_NO_MUTATE_ERROR_MSG = "Cannot mutate a multisig field as it would invalidate all existing signatures.";
|
|
14
14
|
export declare const MULTISIG_USE_PARTIAL_SIGN_ERROR_MSG = "Cannot sign a multisig transaction using `signTxn`. Use `partialSignTxn` instead.";
|
|
15
|
+
export declare const MULTISIG_SIGNATURE_LENGTH_ERROR_MSG = "Cannot add multisig signature. Signature is not of the correct length.";
|
|
15
16
|
interface MultisigMetadataWithPks extends Omit<MultisigMetadata, 'addrs'> {
|
|
16
17
|
pks: Uint8Array[];
|
|
17
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* createRawMultisigTransaction creates a raw, unsigned multisig transaction blob.
|
|
21
|
+
* @param txn - the actual transaction.
|
|
22
|
+
* @param version - multisig version
|
|
23
|
+
* @param threshold - multisig threshold
|
|
24
|
+
* @param pks - ordered list of public keys in this multisig
|
|
25
|
+
* @returns encoded multisig blob
|
|
26
|
+
*/
|
|
27
|
+
export declare function createMultisigTransaction(txn: txnBuilder.Transaction, { version, threshold, addrs }: MultisigMetadata): Uint8Array;
|
|
18
28
|
/**
|
|
19
29
|
* MultisigTransaction is a Transaction that also supports creating partially-signed multisig transactions.
|
|
20
30
|
*/
|
|
@@ -41,6 +51,15 @@ export declare class MultisigTransaction extends txnBuilder.Transaction {
|
|
|
41
51
|
* @returns an encoded, partially signed multisig transaction.
|
|
42
52
|
*/
|
|
43
53
|
partialSignTxn({ version, threshold, pks }: MultisigMetadataWithPks, sk: Uint8Array): Uint8Array;
|
|
54
|
+
/**
|
|
55
|
+
* partialSignWithMultisigSignature partially signs this transaction with an external raw multisig signature and returns
|
|
56
|
+
* a partially-signed multisig transaction, encoded with msgpack as a typed array.
|
|
57
|
+
* @param metadata - multisig metadata
|
|
58
|
+
* @param signerAddr - address of the signer
|
|
59
|
+
* @param signature - raw multisig signature
|
|
60
|
+
* @returns an encoded, partially signed multisig transaction.
|
|
61
|
+
*/
|
|
62
|
+
partialSignWithMultisigSignature(metadata: MultisigMetadataWithPks, signerAddr: string, signature: Uint8Array): Uint8Array;
|
|
44
63
|
static from_obj_for_encoding(txnForEnc: EncodedTransaction): MultisigTransaction;
|
|
45
64
|
}
|
|
46
65
|
/**
|
|
@@ -53,7 +72,7 @@ export declare function verifyMultisig(toBeVerified: Uint8Array, msig: EncodedMu
|
|
|
53
72
|
/**
|
|
54
73
|
* signMultisigTransaction takes a raw transaction (see signTransaction), a multisig preimage, a secret key, and returns
|
|
55
74
|
* 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
|
|
75
|
+
* multisig txn can accumulate additional signatures through mergeMultisigTransactions or appendSignMultisigTransaction.
|
|
57
76
|
* @param txn - object with either payment or key registration fields
|
|
58
77
|
* @param version - multisig version
|
|
59
78
|
* @param threshold - multisig threshold
|
|
@@ -81,9 +100,24 @@ export declare function appendSignMultisigTransaction(multisigTxnBlob: Uint8Arra
|
|
|
81
100
|
txID: string;
|
|
82
101
|
blob: Uint8Array;
|
|
83
102
|
};
|
|
103
|
+
/**
|
|
104
|
+
* appendMultisigTransactionSignature takes a multisig transaction blob, and appends a given raw signature to it.
|
|
105
|
+
* This makes it possible to compile a multisig signature using only raw signatures from external methods.
|
|
106
|
+
* @param multisigTxnBlob - an encoded multisig txn. Supports non-payment txn types.
|
|
107
|
+
* @param version - multisig version
|
|
108
|
+
* @param threshold - multisig threshold
|
|
109
|
+
* @param addrs - a list of Algorand addresses representing possible signers for this multisig. Order is important.
|
|
110
|
+
* @param signerAddr - address of the signer
|
|
111
|
+
* @param signature - raw multisig signature
|
|
112
|
+
* @returns object containing txID, and blob representing encoded multisig txn
|
|
113
|
+
*/
|
|
114
|
+
export declare function appendSignRawMultisigSignature(multisigTxnBlob: Uint8Array, { version, threshold, addrs }: MultisigMetadata, signerAddr: string, signature: Uint8Array): {
|
|
115
|
+
txID: string;
|
|
116
|
+
blob: Uint8Array;
|
|
117
|
+
};
|
|
84
118
|
/**
|
|
85
119
|
* multisigAddress takes multisig metadata (preimage) and returns the corresponding human readable Algorand address.
|
|
86
|
-
* @param version -
|
|
120
|
+
* @param version - multisig version
|
|
87
121
|
* @param threshold - multisig threshold
|
|
88
122
|
* @param addrs - list of Algorand addresses
|
|
89
123
|
*/
|
|
@@ -4,6 +4,7 @@ export declare function genericHash(arr: sha512.Message): number[];
|
|
|
4
4
|
export declare function randomBytes(length: number): Uint8Array;
|
|
5
5
|
export declare function keyPairFromSeed(seed: Uint8Array): nacl.SignKeyPair;
|
|
6
6
|
export declare function keyPair(): nacl.SignKeyPair;
|
|
7
|
+
export declare function isValidSignatureLength(len: number): boolean;
|
|
7
8
|
export declare function keyPairFromSecretKey(sk: Uint8Array): nacl.SignKeyPair;
|
|
8
9
|
export declare function sign(msg: Uint8Array, secretKey: Uint8Array): Uint8Array;
|
|
9
10
|
export declare function bytesEqual(a: Uint8Array, b: Uint8Array): boolean;
|
|
@@ -58,6 +58,9 @@ interface TransactionStorageStructure extends Omit<TransactionParams, 'from' | '
|
|
|
58
58
|
nonParticipation?: boolean;
|
|
59
59
|
group?: Buffer;
|
|
60
60
|
extraPages?: number;
|
|
61
|
+
stateProofType?: number | bigint;
|
|
62
|
+
stateProof?: Uint8Array;
|
|
63
|
+
stateProofMessage?: Uint8Array;
|
|
61
64
|
}
|
|
62
65
|
/**
|
|
63
66
|
* Transaction enables construction of Algorand transactions
|
|
@@ -115,6 +118,9 @@ export declare class Transaction implements TransactionStorageStructure {
|
|
|
115
118
|
nonParticipation?: boolean;
|
|
116
119
|
group?: Buffer;
|
|
117
120
|
extraPages?: number;
|
|
121
|
+
stateProofType?: number | bigint;
|
|
122
|
+
stateProof?: Uint8Array;
|
|
123
|
+
stateProofMessage?: Uint8Array;
|
|
118
124
|
constructor({ ...transaction }: AnyTransaction);
|
|
119
125
|
get_obj_for_encoding(): EncodedTransaction;
|
|
120
126
|
static from_obj_for_encoding(txnForEnc: EncodedTransaction): Transaction;
|
|
@@ -123,6 +129,7 @@ export declare class Transaction implements TransactionStorageStructure {
|
|
|
123
129
|
toByte(): Uint8Array;
|
|
124
130
|
rawSignTxn(sk: Uint8Array): Buffer;
|
|
125
131
|
signTxn(sk: Uint8Array): Uint8Array;
|
|
132
|
+
attachSignature(signerAddr: string, signature: Uint8Array): Uint8Array;
|
|
126
133
|
rawTxID(): Buffer;
|
|
127
134
|
txID(): string;
|
|
128
135
|
addLease(lease: Uint8Array, feePerByte?: number): void;
|
|
@@ -53,7 +53,15 @@ export default interface BlockHeader {
|
|
|
53
53
|
*/
|
|
54
54
|
ts: number;
|
|
55
55
|
/**
|
|
56
|
-
* Transaction root
|
|
56
|
+
* Transaction root SHA512_256
|
|
57
57
|
*/
|
|
58
58
|
txn: string;
|
|
59
|
+
/**
|
|
60
|
+
* Transaction root SHA256
|
|
61
|
+
*/
|
|
62
|
+
txn256: string;
|
|
63
|
+
/**
|
|
64
|
+
* StateProofTracking map of type to tracking data
|
|
65
|
+
*/
|
|
66
|
+
spt: Map<number, Uint8Array>;
|
|
59
67
|
}
|
|
@@ -27,7 +27,11 @@ export declare enum TransactionType {
|
|
|
27
27
|
/**
|
|
28
28
|
* Application transaction
|
|
29
29
|
*/
|
|
30
|
-
appl = "appl"
|
|
30
|
+
appl = "appl",
|
|
31
|
+
/**
|
|
32
|
+
* State proof transaction
|
|
33
|
+
*/
|
|
34
|
+
stpf = "stpf"
|
|
31
35
|
}
|
|
32
36
|
export declare function isTransactionType(s: string): s is TransactionType;
|
|
33
37
|
/**
|
|
@@ -309,4 +313,16 @@ export interface TransactionParams {
|
|
|
309
313
|
* Int representing extra pages of memory to rent during an application create transaction.
|
|
310
314
|
*/
|
|
311
315
|
extraPages?: number;
|
|
316
|
+
/**
|
|
317
|
+
* Uint64 identifying a particular configuration of state proofs.
|
|
318
|
+
*/
|
|
319
|
+
stateProofType?: number | bigint;
|
|
320
|
+
/**
|
|
321
|
+
* Byte array containing the state proof.
|
|
322
|
+
*/
|
|
323
|
+
stateProof?: Uint8Array;
|
|
324
|
+
/**
|
|
325
|
+
* Byte array containing the state proof message.
|
|
326
|
+
*/
|
|
327
|
+
stateProofMessage?: Uint8Array;
|
|
312
328
|
}
|
|
@@ -240,6 +240,18 @@ export interface EncodedTransaction {
|
|
|
240
240
|
* extraPages
|
|
241
241
|
*/
|
|
242
242
|
apep?: number;
|
|
243
|
+
/**
|
|
244
|
+
* stateProofType
|
|
245
|
+
*/
|
|
246
|
+
sptype?: number | bigint;
|
|
247
|
+
/**
|
|
248
|
+
* stateProof
|
|
249
|
+
*/
|
|
250
|
+
sp?: Buffer;
|
|
251
|
+
/**
|
|
252
|
+
* stateProofMessage
|
|
253
|
+
*/
|
|
254
|
+
spmsg?: Buffer;
|
|
243
255
|
}
|
|
244
256
|
export interface EncodedSubsig {
|
|
245
257
|
/**
|
|
@@ -2,6 +2,7 @@ import PaymentTxn from './payment';
|
|
|
2
2
|
import KeyRegistrationTxn from './keyreg';
|
|
3
3
|
import { AssetCreateTransaction as AssetCreateTxn, AssetConfigurationTransaction as AssetConfigTxn, AssetDestroyTransaction as AssetDestroyTxn, AssetFreezeTransaction as AssetFreezeTxn, AssetTransferTransaction as AssetTransferTxn } from './asset';
|
|
4
4
|
import { ApplicationCreateTransaction as AppCreateTxn, ApplicationUpdateTransaction as AppUpdateTxn, ApplicationDeleteTransaction as AppDeleteTxn, ApplicationOptInTransaction as AppOptInTxn, ApplicationCloseOutTransaction as AppCloseOutTxn, ApplicationClearStateTransaction as AppClearStateTxn, ApplicationNoOpTransaction as AppNoOpTxn } from './application';
|
|
5
|
+
import StateProofTxn from './stateproof';
|
|
5
6
|
export { TransactionParams, TransactionType, SuggestedParams } from './base';
|
|
6
7
|
export { MustHaveSuggestedParams, MustHaveSuggestedParamsInline, } from './builder';
|
|
7
8
|
export * from './encoded';
|
|
@@ -9,5 +10,6 @@ export { default as PaymentTxn } from './payment';
|
|
|
9
10
|
export { default as KeyRegistrationTxn } from './keyreg';
|
|
10
11
|
export { AssetCreateTransaction as AssetCreateTxn, AssetConfigurationTransaction as AssetConfigTxn, AssetDestroyTransaction as AssetDestroyTxn, AssetFreezeTransaction as AssetFreezeTxn, AssetTransferTransaction as AssetTransferTxn, } from './asset';
|
|
11
12
|
export { ApplicationCreateTransaction as AppCreateTxn, ApplicationUpdateTransaction as AppUpdateTxn, ApplicationDeleteTransaction as AppDeleteTxn, ApplicationOptInTransaction as AppOptInTxn, ApplicationCloseOutTransaction as AppCloseOutTxn, ApplicationClearStateTransaction as AppClearStateTxn, ApplicationNoOpTransaction as AppNoOpTxn, } from './application';
|
|
12
|
-
|
|
13
|
+
export { default as StateProofTxn } from './stateproof';
|
|
14
|
+
declare type AnyTransaction = PaymentTxn | KeyRegistrationTxn | AssetCreateTxn | AssetConfigTxn | AssetDestroyTxn | AssetFreezeTxn | AssetTransferTxn | AppCreateTxn | AppUpdateTxn | AppDeleteTxn | AppOptInTxn | AppCloseOutTxn | AppClearStateTxn | AppNoOpTxn | StateProofTxn;
|
|
13
15
|
export default AnyTransaction;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { TransactionType, TransactionParams } from './base';
|
|
2
|
+
import { ConstructTransaction } from './builder';
|
|
3
|
+
declare type SpecificParameters = Pick<TransactionParams, 'stateProofType' | 'stateProof' | 'stateProofMessage'>;
|
|
4
|
+
interface Overwrites {
|
|
5
|
+
type?: TransactionType.stpf;
|
|
6
|
+
}
|
|
7
|
+
declare type StateProofTransaction = ConstructTransaction<SpecificParameters, Overwrites>;
|
|
8
|
+
export default StateProofTransaction;
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"proof.js","sourceRoot":"","sources":["../../../../../../src/client/v2/algod/proof.ts"],"names":[],"mappings":";;;;;AAAA,iEAAyC;AAIzC,MAAqB,KAAM,SAAQ,qBAAW;IAC5C,YACE,CAAa,EACb,WAAwB,EAChB,KAAa,EACb,IAAY;QAEpB,KAAK,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC;QAHd,UAAK,GAAL,KAAK,CAAQ;QACb,SAAI,GAAJ,IAAI,CAAQ;QAIpB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAED,IAAI;QACF,OAAO,cAAc,IAAI,CAAC,KAAK,iBAAiB,IAAI,CAAC,IAAI,QAAQ,CAAC;IACpE,CAAC;CACF;AAhBD,wBAgBC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import JSONRequest from '../jsonrequest';
|
|
2
|
-
export default class Proof extends JSONRequest {
|
|
3
|
-
constructor(c, intDecoding, round, txID) {
|
|
4
|
-
super(c, intDecoding);
|
|
5
|
-
this.round = round;
|
|
6
|
-
this.txID = txID;
|
|
7
|
-
this.round = round;
|
|
8
|
-
this.txID = txID;
|
|
9
|
-
}
|
|
10
|
-
path() {
|
|
11
|
-
return `/v2/blocks/${this.round}/transactions/${this.txID}/proof`;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=proof.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"proof.js","sourceRoot":"","sources":["../../../../../../src/client/v2/algod/proof.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,gBAAgB,CAAC;AAIzC,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,WAAW;IAC5C,YACE,CAAa,EACb,WAAwB,EAChB,KAAa,EACb,IAAY;QAEpB,KAAK,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC;QAHd,UAAK,GAAL,KAAK,CAAQ;QACb,SAAI,GAAJ,IAAI,CAAQ;QAIpB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAED,IAAI;QACF,OAAO,cAAc,IAAI,CAAC,KAAK,iBAAiB,IAAI,CAAC,IAAI,QAAQ,CAAC;IACpE,CAAC;CACF"}
|