Skip to content

Commit eb2a40b

Browse files
authored
Merge pull request #71 from algorandfoundation/update-alpha
Update alpha from main
2 parents 1689629 + fc2eb04 commit eb2a40b

File tree

76 files changed

+2733
-1071
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+2733
-1071
lines changed

docs/code/index/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
## Classes
1010

11+
- [ApplicationSpy](classes/ApplicationSpy.md)
1112
- [AssertError](classes/AssertError.md)
1213
- [AvmError](classes/AvmError.md)
1314
- [CodeError](classes/CodeError.md)
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
[**@algorandfoundation/algorand-typescript-testing**](../../README.md)
2+
3+
***
4+
5+
[@algorandfoundation/algorand-typescript-testing](../../README.md) / [index](../README.md) / ApplicationSpy
6+
7+
# Class: ApplicationSpy\<TContract\>
8+
9+
Defined in: [src/application-spy.ts:32](https://github.com/algorandfoundation/algorand-typescript-testing/blob/main/src/application-spy.ts#L32)
10+
11+
## Type Parameters
12+
13+
### TContract
14+
15+
`TContract` *extends* `Contract` = `Contract`
16+
17+
## Constructors
18+
19+
### Constructor
20+
21+
> **new ApplicationSpy**\<`TContract`\>(`contract`?): `ApplicationSpy`\<`TContract`\>
22+
23+
Defined in: [src/application-spy.ts:44](https://github.com/algorandfoundation/algorand-typescript-testing/blob/main/src/application-spy.ts#L44)
24+
25+
#### Parameters
26+
27+
##### contract?
28+
29+
`TContract` | `ConstructorFor`\<`TContract`\>
30+
31+
#### Returns
32+
33+
`ApplicationSpy`\<`TContract`\>
34+
35+
## Properties
36+
37+
### contract?
38+
39+
> `optional` **contract**: `TContract` \| `ConstructorFor`\<`TContract`\>
40+
41+
Defined in: [src/application-spy.ts:42](https://github.com/algorandfoundation/algorand-typescript-testing/blob/main/src/application-spy.ts#L42)
42+
43+
***
44+
45+
### on
46+
47+
> `readonly` **on**: `_TypedApplicationSpyCallBacks`\<`TContract`\>
48+
49+
Defined in: [src/application-spy.ts:39](https://github.com/algorandfoundation/algorand-typescript-testing/blob/main/src/application-spy.ts#L39)
50+
51+
The `on` property is a proxy that allows you to register callbacks for specific method signatures.
52+
It dynamically creates methods based on the contract's methods.
53+
54+
## Methods
55+
56+
### notify()
57+
58+
> **notify**(`itxn`): `void`
59+
60+
Defined in: [src/application-spy.ts:50](https://github.com/algorandfoundation/algorand-typescript-testing/blob/main/src/application-spy.ts#L50)
61+
62+
#### Parameters
63+
64+
##### itxn
65+
66+
`ApplicationCallInnerTxnContext`
67+
68+
#### Returns
69+
70+
`void`
71+
72+
***
73+
74+
### onAbiCall()
75+
76+
> **onAbiCall**(`methodSignature`, `callback`): `void`
77+
78+
Defined in: [src/application-spy.ts:69](https://github.com/algorandfoundation/algorand-typescript-testing/blob/main/src/application-spy.ts#L69)
79+
80+
Registers a callback for a specific method signature.
81+
82+
#### Parameters
83+
84+
##### methodSignature
85+
86+
`bytes`
87+
88+
##### callback
89+
90+
`AppSpyCb`
91+
92+
#### Returns
93+
94+
`void`
95+
96+
***
97+
98+
### onBareCall()
99+
100+
> **onBareCall**(`callback`): `void`
101+
102+
Defined in: [src/application-spy.ts:60](https://github.com/algorandfoundation/algorand-typescript-testing/blob/main/src/application-spy.ts#L60)
103+
104+
Registers a callback for a bare call (no arguments).
105+
106+
#### Parameters
107+
108+
##### callback
109+
110+
`AppSpyCb`
111+
112+
The callback to be executed when a bare call is detected.
113+
114+
#### Returns
115+
116+
`void`

docs/code/index/classes/AssertError.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ Raised when an assertion fails
1616

1717
## Constructors
1818

19-
### new AssertError()
19+
### Constructor
2020

21-
> **new AssertError**(`message`): [`AssertError`](AssertError.md)
21+
> **new AssertError**(`message`): `AssertError`
2222
2323
Defined in: [src/errors.ts:23](https://github.com/algorandfoundation/algorand-typescript-testing/blob/main/src/errors.ts#L23)
2424

@@ -30,11 +30,11 @@ Defined in: [src/errors.ts:23](https://github.com/algorandfoundation/algorand-ty
3030

3131
#### Returns
3232

33-
[`AssertError`](AssertError.md)
33+
`AssertError`
3434

3535
#### Overrides
3636

37-
[`AvmError`](AvmError.md).[`constructor`](AvmError.md#constructors)
37+
[`AvmError`](AvmError.md).[`constructor`](AvmError.md#constructor)
3838

3939
## Properties
4040

@@ -58,7 +58,7 @@ Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1077
5858

5959
#### Inherited from
6060

61-
[`AvmError`](AvmError.md).[`message`](AvmError.md#message-1)
61+
[`AvmError`](AvmError.md).[`message`](AvmError.md#message)
6262

6363
***
6464

docs/code/index/classes/AvmError.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ the AVM to fail.
2121

2222
## Constructors
2323

24-
### new AvmError()
24+
### Constructor
2525

26-
> **new AvmError**(`message`): [`AvmError`](AvmError.md)
26+
> **new AvmError**(`message`): `AvmError`
2727
2828
Defined in: [src/errors.ts:6](https://github.com/algorandfoundation/algorand-typescript-testing/blob/main/src/errors.ts#L6)
2929

@@ -35,7 +35,7 @@ Defined in: [src/errors.ts:6](https://github.com/algorandfoundation/algorand-typ
3535

3636
#### Returns
3737

38-
[`AvmError`](AvmError.md)
38+
`AvmError`
3939

4040
#### Overrides
4141

docs/code/index/classes/CodeError.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ Raised when unsupported user code is encountered
1616

1717
## Constructors
1818

19-
### new CodeError()
19+
### Constructor
2020

21-
> **new CodeError**(`message`, `options`?): [`CodeError`](CodeError.md)
21+
> **new CodeError**(`message`, `options`?): `CodeError`
2222
2323
Defined in: [src/errors.ts:41](https://github.com/algorandfoundation/algorand-typescript-testing/blob/main/src/errors.ts#L41)
2424

@@ -34,7 +34,7 @@ Defined in: [src/errors.ts:41](https://github.com/algorandfoundation/algorand-ty
3434

3535
#### Returns
3636

37-
[`CodeError`](CodeError.md)
37+
`CodeError`
3838

3939
#### Overrides
4040

docs/code/index/classes/InternalError.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ Raised when testing code errors
1616

1717
## Constructors
1818

19-
### new InternalError()
19+
### Constructor
2020

21-
> **new InternalError**(`message`, `options`?): [`InternalError`](InternalError.md)
21+
> **new InternalError**(`message`, `options`?): `InternalError`
2222
2323
Defined in: [src/errors.ts:32](https://github.com/algorandfoundation/algorand-typescript-testing/blob/main/src/errors.ts#L32)
2424

@@ -34,7 +34,7 @@ Defined in: [src/errors.ts:32](https://github.com/algorandfoundation/algorand-ty
3434

3535
#### Returns
3636

37-
[`InternalError`](InternalError.md)
37+
`InternalError`
3838

3939
#### Overrides
4040

docs/code/index/classes/NotImplementedError.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ Defined in: [src/errors.ts:46](https://github.com/algorandfoundation/algorand-ty
1414

1515
## Constructors
1616

17-
### new NotImplementedError()
17+
### Constructor
1818

19-
> **new NotImplementedError**(`feature`): [`NotImplementedError`](NotImplementedError.md)
19+
> **new NotImplementedError**(`feature`): `NotImplementedError`
2020
2121
Defined in: [src/errors.ts:47](https://github.com/algorandfoundation/algorand-typescript-testing/blob/main/src/errors.ts#L47)
2222

@@ -28,7 +28,7 @@ Defined in: [src/errors.ts:47](https://github.com/algorandfoundation/algorand-ty
2828

2929
#### Returns
3030

31-
[`NotImplementedError`](NotImplementedError.md)
31+
`NotImplementedError`
3232

3333
#### Overrides
3434

0 commit comments

Comments
 (0)