Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Added inner transaction support #7

Merged
merged 10 commits into from
Feb 3, 2024
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,7 @@ subscriber.start()

## Roadmap

- Automated test coverage
- Subscribe to contract events ([ARC-28](https://github.com/algorandfoundation/ARCs/blob/main/ARCs/arc-0028.md))
- Inner transaction processing
- Multiple filters
- Dynamic filters (e.g. subscribe to axfer's for assets that you subscribe to the creation of)
- GraphQL example ideally with subscriptions
Expand Down
30 changes: 15 additions & 15 deletions docs/code/classes/index.AlgorandSubscriber.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Create a new `AlgorandSubscriber`.

#### Defined in

[subscriber.ts:27](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/subscriber.ts#L27)
[subscriber.ts:31](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/subscriber.ts#L31)

## Properties

Expand All @@ -62,7 +62,7 @@ Create a new `AlgorandSubscriber`.

#### Defined in

[subscriber.ts:16](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/subscriber.ts#L16)
[subscriber.ts:20](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/subscriber.ts#L20)

___

Expand All @@ -72,7 +72,7 @@ ___

#### Defined in

[subscriber.ts:13](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/subscriber.ts#L13)
[subscriber.ts:17](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/subscriber.ts#L17)

___

Expand All @@ -82,7 +82,7 @@ ___

#### Defined in

[subscriber.ts:17](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/subscriber.ts#L17)
[subscriber.ts:21](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/subscriber.ts#L21)

___

Expand All @@ -92,7 +92,7 @@ ___

#### Defined in

[subscriber.ts:14](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/subscriber.ts#L14)
[subscriber.ts:18](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/subscriber.ts#L18)

___

Expand All @@ -102,7 +102,7 @@ ___

#### Defined in

[subscriber.ts:19](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/subscriber.ts#L19)
[subscriber.ts:23](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/subscriber.ts#L23)

___

Expand All @@ -112,7 +112,7 @@ ___

#### Defined in

[subscriber.ts:18](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/subscriber.ts#L18)
[subscriber.ts:22](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/subscriber.ts#L22)

___

Expand All @@ -122,7 +122,7 @@ ___

#### Defined in

[subscriber.ts:15](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/subscriber.ts#L15)
[subscriber.ts:19](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/subscriber.ts#L19)

## Methods

Expand All @@ -138,7 +138,7 @@ The listener can be async and it will be awaited if so.

| Name | Type |
| :------ | :------ |
| `T` | `TransactionResult` |
| `T` | [`SubscribedTransaction`](../modules/types_subscription.md#subscribedtransaction) |

#### Parameters

Expand All @@ -155,7 +155,7 @@ The subscriber so `on`/`onBatch` calls can be chained

#### Defined in

[subscriber.ts:145](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/subscriber.ts#L145)
[subscriber.ts:149](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/subscriber.ts#L149)

___

Expand All @@ -175,7 +175,7 @@ The listener can be async and it will be awaited if so.

| Name | Type |
| :------ | :------ |
| `T` | `TransactionResult` |
| `T` | [`SubscribedTransaction`](../modules/types_subscription.md#subscribedtransaction) |

#### Parameters

Expand All @@ -192,7 +192,7 @@ The subscriber so `on`/`onBatch` calls can be chained

#### Defined in

[subscriber.ts:162](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/subscriber.ts#L162)
[subscriber.ts:166](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/subscriber.ts#L166)

___

Expand All @@ -213,7 +213,7 @@ The poll result

#### Defined in

[subscriber.ts:51](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/subscriber.ts#L51)
[subscriber.ts:55](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/subscriber.ts#L55)

___

Expand All @@ -240,7 +240,7 @@ An object that contains a promise you can wait for after calling stop

#### Defined in

[subscriber.ts:88](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/subscriber.ts#L88)
[subscriber.ts:92](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/subscriber.ts#L92)

___

Expand All @@ -264,4 +264,4 @@ A promise that can be awaited to ensure the subscriber has finished stopping

#### Defined in

[subscriber.ts:131](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/subscriber.ts#L131)
[subscriber.ts:135](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/subscriber.ts#L135)
96 changes: 90 additions & 6 deletions docs/code/interfaces/types_block.BlockTransaction.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@

[types/block](../modules/types_block.md).BlockTransaction

Data that is returned in a raw Algorand block for a single transaction

**`See`**

https://github.com/algorand/go-algorand/blob/master/data/transactions/signedtxn.go#L32

## Table of contents

### Properties
Expand All @@ -12,7 +18,13 @@
- [apid](types_block.BlockTransaction.md#apid)
- [ca](types_block.BlockTransaction.md#ca)
- [caid](types_block.BlockTransaction.md#caid)
- [dt](types_block.BlockTransaction.md#dt)
- [hgh](types_block.BlockTransaction.md#hgh)
- [hgi](types_block.BlockTransaction.md#hgi)
- [lsig](types_block.BlockTransaction.md#lsig)
- [msig](types_block.BlockTransaction.md#msig)
- [sgnr](types_block.BlockTransaction.md#sgnr)
- [sig](types_block.BlockTransaction.md#sig)
- [txn](types_block.BlockTransaction.md#txn)

## Properties
Expand All @@ -25,7 +37,7 @@ Asset closing amount in decimal units

#### Defined in

[types/block.ts:66](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L66)
[types/block.ts:72](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L72)

___

Expand All @@ -37,7 +49,7 @@ App ID when an app is created by the transaction

#### Defined in

[types/block.ts:64](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L64)
[types/block.ts:70](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L70)

___

Expand All @@ -49,7 +61,7 @@ Algo closing amount in microAlgos

#### Defined in

[types/block.ts:68](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L68)
[types/block.ts:74](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L74)

___

Expand All @@ -61,7 +73,31 @@ Asset ID when an asset is created by the transaction

#### Defined in

[types/block.ts:62](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L62)
[types/block.ts:68](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L68)

___

### dt

• `Optional` **dt**: [`BlockTransactionEvalDelta`](types_block.BlockTransactionEvalDelta.md)

The eval deltas for the block

#### Defined in

[types/block.ts:66](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L66)

___

### hgh

• `Optional` **hgh**: `boolean`

Has genesis hash

#### Defined in

[types/block.ts:78](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L78)

___

Expand All @@ -73,7 +109,55 @@ Has genesis id

#### Defined in

[types/block.ts:70](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L70)
[types/block.ts:76](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L76)

___

### lsig

• `Optional` **lsig**: [`LogicSig`](types_block.LogicSig.md)

Logic signature

#### Defined in

[types/block.ts:82](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L82)

___

### msig

• `Optional` **msig**: [`MultisigSig`](types_block.MultisigSig.md)

Transaction multisig signature

#### Defined in

[types/block.ts:84](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L84)

___

### sgnr

• `Optional` **sgnr**: `Uint8Array`

The signer, if signing with a different key than the Transaction type `from` property indicates

#### Defined in

[types/block.ts:86](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L86)

___

### sig

• `Optional` **sig**: `Uint8Array`

Transaction ED25519 signature

#### Defined in

[types/block.ts:80](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L80)

___

Expand All @@ -85,4 +169,4 @@ The encoded transaction data

#### Defined in

[types/block.ts:60](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L60)
[types/block.ts:64](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L64)
64 changes: 64 additions & 0 deletions docs/code/interfaces/types_block.BlockTransactionEvalDelta.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
[@algorandfoundation/algokit-subscriber](../README.md) / [types/block](../modules/types_block.md) / BlockTransactionEvalDelta

# Interface: BlockTransactionEvalDelta

[types/block](../modules/types_block.md).BlockTransactionEvalDelta

Eval deltas for a block

## Table of contents

### Properties

- [gd](types_block.BlockTransactionEvalDelta.md#gd)
- [itx](types_block.BlockTransactionEvalDelta.md#itx)
- [ld](types_block.BlockTransactionEvalDelta.md#ld)
- [lg](types_block.BlockTransactionEvalDelta.md#lg)

## Properties

### gd

• **gd**: `Record`\<`string`, [`BlockValueDelta`](types_block.BlockValueDelta.md)\>

The delta of global state, keyed by key

#### Defined in

[types/block.ts:126](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L126)

___

### itx

• `Optional` **itx**: [`BlockInnerTransaction`](../modules/types_block.md#blockinnertransaction)[]

Inner transactions

#### Defined in

[types/block.ts:132](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L132)

___

### ld

• **ld**: `Record`\<`number`, `Record`\<`string`, [`BlockValueDelta`](types_block.BlockValueDelta.md)\>\>

The delta of local state keyed by account ID offset in [txn.Sender, ...txn.Accounts] and then keyed by key

#### Defined in

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

___

### lg

• **lg**: `string`[]

Logs

#### Defined in

[types/block.ts:130](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L130)
Loading
Loading