Skip to content

Commit 56df794

Browse files
committed
feat: Added block metadata to subscription result
refactor: Refactored exported types so they make more sense to consume outside of this library
1 parent becdaed commit 56df794

37 files changed

+1334
-453
lines changed

docs/code/enums/types_subscription.BalanceChangeRole.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Account was having an asset amount closed to it
2424

2525
#### Defined in
2626

27-
[types/subscription.ts:66](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L66)
27+
[types/subscription.ts:91](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L91)
2828

2929
___
3030

@@ -36,7 +36,7 @@ Account was receiving a transaction
3636

3737
#### Defined in
3838

39-
[types/subscription.ts:64](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L64)
39+
[types/subscription.ts:89](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L89)
4040

4141
___
4242

@@ -48,4 +48,4 @@ Account was sending a transaction (sending asset and/or spending fee if asset `0
4848

4949
#### Defined in
5050

51-
[types/subscription.ts:62](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L62)
51+
[types/subscription.ts:87](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L87)

docs/code/interfaces/types_block.Block.md

+18-18
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
[types/block](../modules/types_block.md).Block
66

7-
Data that is returned in a raw Algorand block
7+
Data that is returned in a raw Algorand block.
88

99
**`See`**
1010

@@ -44,7 +44,7 @@ since genesis.
4444

4545
#### Defined in
4646

47-
[types/block.ts:13](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L13)
47+
[types/block.ts:87](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L87)
4848

4949
___
5050

@@ -56,7 +56,7 @@ The FeeSink accepts transaction fees. It can only spend to the incentive pool.
5656

5757
#### Defined in
5858

59-
[types/block.ts:15](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L15)
59+
[types/block.ts:89](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L89)
6060

6161
___
6262

@@ -69,7 +69,7 @@ MicroAlgos for every reward unit in the next round.
6969

7070
#### Defined in
7171

72-
[types/block.ts:19](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L19)
72+
[types/block.ts:93](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L93)
7373

7474
___
7575

@@ -81,7 +81,7 @@ Genesis ID to which this block belongs.
8181

8282
#### Defined in
8383

84-
[types/block.ts:21](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L21)
84+
[types/block.ts:95](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L95)
8585

8686
___
8787

@@ -93,7 +93,7 @@ Genesis hash to which this block belongs.
9393

9494
#### Defined in
9595

96-
[types/block.ts:23](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L23)
96+
[types/block.ts:97](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L97)
9797

9898
___
9999

@@ -105,7 +105,7 @@ The hash of the previous block
105105

106106
#### Defined in
107107

108-
[types/block.ts:25](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L25)
108+
[types/block.ts:99](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L99)
109109

110110
___
111111

@@ -117,7 +117,7 @@ UpgradeState tracks the protocol upgrade state machine; proto is the current pro
117117

118118
#### Defined in
119119

120-
[types/block.ts:27](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L27)
120+
[types/block.ts:101](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L101)
121121

122122
___
123123

@@ -129,7 +129,7 @@ The number of new MicroAlgos added to the participation stake from rewards at th
129129

130130
#### Defined in
131131

132-
[types/block.ts:29](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L29)
132+
[types/block.ts:103](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L103)
133133

134134
___
135135

@@ -141,7 +141,7 @@ Round number.
141141

142142
#### Defined in
143143

144-
[types/block.ts:31](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L31)
144+
[types/block.ts:105](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L105)
145145

146146
___
147147

@@ -153,7 +153,7 @@ The round at which the RewardsRate will be recalculated.
153153

154154
#### Defined in
155155

156-
[types/block.ts:33](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L33)
156+
[types/block.ts:107](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L107)
157157

158158
___
159159

@@ -166,7 +166,7 @@ FeeSink and continually redistributes them to addresses as rewards.
166166

167167
#### Defined in
168168

169-
[types/block.ts:37](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L37)
169+
[types/block.ts:111](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L111)
170170

171171
___
172172

@@ -178,7 +178,7 @@ Sortition seed
178178

179179
#### Defined in
180180

181-
[types/block.ts:39](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L39)
181+
[types/block.ts:113](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L113)
182182

183183
___
184184

@@ -192,7 +192,7 @@ committed after this block. Genesis blocks can start at either
192192

193193
#### Defined in
194194

195-
[types/block.ts:44](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L44)
195+
[types/block.ts:118](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L118)
196196

197197
___
198198

@@ -204,7 +204,7 @@ Round time (unix timestamp)
204204

205205
#### Defined in
206206

207-
[types/block.ts:46](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L46)
207+
[types/block.ts:120](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L120)
208208

209209
___
210210

@@ -217,7 +217,7 @@ This commitment is computed based on the PaysetCommit type specified in the bloc
217217

218218
#### Defined in
219219

220-
[types/block.ts:50](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L50)
220+
[types/block.ts:124](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L124)
221221

222222
___
223223

@@ -229,7 +229,7 @@ Root of transaction vector commitment merkle tree using SHA256 hash function.
229229

230230
#### Defined in
231231

232-
[types/block.ts:54](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L54)
232+
[types/block.ts:128](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L128)
233233

234234
___
235235

@@ -241,4 +241,4 @@ The transactions within the block.
241241

242242
#### Defined in
243243

244-
[types/block.ts:56](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L56)
244+
[types/block.ts:130](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L130)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
[@algorandfoundation/algokit-subscriber](../README.md) / [types/block](../modules/types_block.md) / BlockAgreementCertificate
2+
3+
# Interface: BlockAgreementCertificate
4+
5+
[types/block](../modules/types_block.md).BlockAgreementCertificate
6+
7+
Data this is returned in a raw Algorand block to certify the block.
8+
9+
**`See`**
10+
11+
- https://github.com/algorand/go-algorand/blob/master/agreement/certificate.go
12+
- https://github.com/algorand/go-algorand/blob/master/agreement/bundle.go#L31
13+
- https://github.com/algorand/go-algorand/blob/master/agreement/proposal.go
14+
15+
## Table of contents
16+
17+
### Properties
18+
19+
- [eqv](types_block.BlockAgreementCertificate.md#eqv)
20+
- [per](types_block.BlockAgreementCertificate.md#per)
21+
- [prop](types_block.BlockAgreementCertificate.md#prop)
22+
- [rnd](types_block.BlockAgreementCertificate.md#rnd)
23+
- [step](types_block.BlockAgreementCertificate.md#step)
24+
- [vote](types_block.BlockAgreementCertificate.md#vote)
25+
26+
## Properties
27+
28+
### eqv
29+
30+
**eqv**: [`BlockVote`](types_block.BlockVote.md)[]
31+
32+
Equivocation votes
33+
34+
#### Defined in
35+
36+
[types/block.ts:40](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L40)
37+
38+
___
39+
40+
### per
41+
42+
**per**: `bigint`
43+
44+
Period represents the current period of the source.
45+
46+
#### Defined in
47+
48+
[types/block.ts:25](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L25)
49+
50+
___
51+
52+
### prop
53+
54+
**prop**: `Object`
55+
56+
The proposal
57+
58+
#### Type declaration
59+
60+
| Name | Type | Description |
61+
| :------ | :------ | :------ |
62+
| `dig` | `Uint8Array` | Block digest |
63+
| `encdig` | `Uint8Array` | Encoding digest (the cryptographic hash of the proposal) |
64+
| `oprop` | `Uint8Array` | Original proposer |
65+
66+
#### Defined in
67+
68+
[types/block.ts:29](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L29)
69+
70+
___
71+
72+
### rnd
73+
74+
**rnd**: `number`
75+
76+
Round number
77+
78+
#### Defined in
79+
80+
[types/block.ts:23](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L23)
81+
82+
___
83+
84+
### step
85+
86+
**step**: `number`
87+
88+
Step represents the current period of the source.
89+
90+
#### Defined in
91+
92+
[types/block.ts:27](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L27)
93+
94+
___
95+
96+
### vote
97+
98+
**vote**: [`BlockVote`](types_block.BlockVote.md)[]
99+
100+
Votes
101+
102+
#### Defined in
103+
104+
[types/block.ts:38](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L38)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
[@algorandfoundation/algokit-subscriber](../README.md) / [types/block](../modules/types_block.md) / BlockData
2+
3+
# Interface: BlockData
4+
5+
[types/block](../modules/types_block.md).BlockData
6+
7+
Data that is returned in a raw Algorand block.
8+
9+
## Table of contents
10+
11+
### Properties
12+
13+
- [block](types_block.BlockData.md#block)
14+
- [cert](types_block.BlockData.md#cert)
15+
16+
## Properties
17+
18+
### block
19+
20+
**block**: [`Block`](types_block.Block.md)
21+
22+
The block itself.
23+
24+
#### Defined in
25+
26+
[types/block.ts:10](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L10)
27+
28+
___
29+
30+
### cert
31+
32+
**cert**: [`BlockAgreementCertificate`](types_block.BlockAgreementCertificate.md)
33+
34+
The block certification.
35+
36+
#### Defined in
37+
38+
[types/block.ts:12](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L12)

0 commit comments

Comments
 (0)