algosdk 2.9.0 → 2.10.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.
Files changed (40) hide show
  1. package/README.md +4 -4
  2. package/dist/browser/algosdk.min.js +1 -1
  3. package/dist/browser/algosdk.min.js.map +1 -1
  4. package/dist/cjs/client/v2/algod/models/types.js +27 -2
  5. package/dist/cjs/client/v2/algod/models/types.js.map +1 -1
  6. package/dist/cjs/client/v2/indexer/models/types.js +168 -3
  7. package/dist/cjs/client/v2/indexer/models/types.js.map +1 -1
  8. package/dist/cjs/transaction.js +102 -0
  9. package/dist/cjs/transaction.js.map +1 -1
  10. package/dist/cjs/types/transactions/base.js +6 -1
  11. package/dist/cjs/types/transactions/base.js.map +1 -1
  12. package/dist/cjs/types/transactions/heartbeat.js +3 -0
  13. package/dist/cjs/types/transactions/heartbeat.js.map +1 -0
  14. package/dist/cjs/types/transactions/index.js.map +1 -1
  15. package/dist/esm/client/v2/algod/models/types.js +24 -0
  16. package/dist/esm/client/v2/algod/models/types.js.map +1 -1
  17. package/dist/esm/client/v2/indexer/models/types.js +163 -1
  18. package/dist/esm/client/v2/indexer/models/types.js.map +1 -1
  19. package/dist/esm/transaction.js +102 -0
  20. package/dist/esm/transaction.js.map +1 -1
  21. package/dist/esm/types/transactions/base.js +6 -1
  22. package/dist/esm/types/transactions/base.js.map +1 -1
  23. package/dist/esm/types/transactions/heartbeat.js +2 -0
  24. package/dist/esm/types/transactions/heartbeat.js.map +1 -0
  25. package/dist/esm/types/transactions/index.js.map +1 -1
  26. package/dist/types/client/v2/algod/models/types.d.ts +17 -0
  27. package/dist/types/client/v2/indexer/models/types.d.ts +134 -1
  28. package/dist/types/transaction.d.ts +30 -2
  29. package/dist/types/types/transactions/base.d.ts +17 -1
  30. package/dist/types/types/transactions/encoded.d.ts +54 -0
  31. package/dist/types/types/transactions/heartbeat.d.ts +8 -0
  32. package/dist/types/types/transactions/index.d.ts +3 -1
  33. package/package.json +1 -1
  34. package/src/client/v2/algod/models/types.ts +32 -0
  35. package/src/client/v2/indexer/models/types.ts +294 -0
  36. package/src/transaction.ts +131 -0
  37. package/src/types/transactions/base.ts +20 -1
  38. package/src/types/transactions/encoded.ts +65 -0
  39. package/src/types/transactions/heartbeat.ts +14 -0
  40. package/src/types/transactions/index.ts +4 -1
@@ -97,6 +97,66 @@ export interface EncodedBoxReference {
97
97
  n: Uint8Array;
98
98
  }
99
99
 
100
+ /**
101
+ * A structure for an encoded heartbeat proof fields object
102
+ */
103
+ export interface EncodedHeartbeatProof {
104
+ /**
105
+ * Sig
106
+ */
107
+ s: Buffer;
108
+
109
+ /**
110
+ * PK
111
+ */
112
+ p: Buffer;
113
+
114
+ /**
115
+ * PK2
116
+ */
117
+ p2: Buffer;
118
+
119
+ /**
120
+ * PK1Sig
121
+ */
122
+ p1s: Buffer;
123
+
124
+ /**
125
+ * PK2Sig
126
+ */
127
+ p2s: Buffer;
128
+ }
129
+
130
+ /**
131
+ * A structure for an encoded heartbeat fields object
132
+ */
133
+ export interface EncodedHeartbeatFields {
134
+ /**
135
+ * HbAddress
136
+ */
137
+ a: Buffer;
138
+
139
+ /**
140
+ * HbProof
141
+ */
142
+ prf: EncodedHeartbeatProof;
143
+
144
+ /**
145
+ * HbSeed
146
+ */
147
+ sd: Buffer;
148
+
149
+ /**
150
+ * HbVoteID
151
+ */
152
+ vid: Buffer;
153
+
154
+ /**
155
+ * HbKeyDilution
156
+ */
157
+ kd: number;
158
+ }
159
+
100
160
  /**
101
161
  * A rough structure for the encoded transaction object. Every property is labelled with its associated Transaction type property
102
162
  */
@@ -330,6 +390,11 @@ export interface EncodedTransaction {
330
390
  * stateProofMessage
331
391
  */
332
392
  spmsg?: Buffer;
393
+
394
+ /**
395
+ * heartbeat fields
396
+ */
397
+ hb?: EncodedHeartbeatFields;
333
398
  }
334
399
 
335
400
  export interface EncodedSubsig {
@@ -0,0 +1,14 @@
1
+ import { TransactionType, TransactionParams } from './base';
2
+ import { ConstructTransaction } from './builder';
3
+
4
+ type SpecificParameters = Pick<TransactionParams, 'heartbeatFields'>;
5
+
6
+ interface Overwrites {
7
+ type?: TransactionType.hb;
8
+ }
9
+
10
+ type HeartbeatTransaction = ConstructTransaction<
11
+ SpecificParameters,
12
+ Overwrites
13
+ >;
14
+ export default HeartbeatTransaction;
@@ -17,6 +17,7 @@ import {
17
17
  ApplicationNoOpTransaction as AppNoOpTxn,
18
18
  } from './application';
19
19
  import StateProofTxn from './stateproof';
20
+ import HeartbeatTxn from './heartbeat';
20
21
 
21
22
  // Utilities
22
23
  export {
@@ -51,6 +52,7 @@ export {
51
52
  ApplicationNoOpTransaction as AppNoOpTxn,
52
53
  } from './application';
53
54
  export { default as StateProofTxn } from './stateproof';
55
+ export { default as HeartbeatTransaction } from './heartbeat';
54
56
 
55
57
  // All possible transaction types
56
58
  type AnyTransaction =
@@ -68,5 +70,6 @@ type AnyTransaction =
68
70
  | AppCloseOutTxn
69
71
  | AppClearStateTxn
70
72
  | AppNoOpTxn
71
- | StateProofTxn;
73
+ | StateProofTxn
74
+ | HeartbeatTxn;
72
75
  export default AnyTransaction;