Skip to content

Commit

Permalink
wip: docs(agent): add await when returning intrinsic
Browse files Browse the repository at this point in the history
  • Loading branch information
egasimus committed Apr 29, 2024
1 parent ec0557f commit d7400b9
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 27 deletions.
16 changes: 8 additions & 8 deletions packages/agent/chain.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ Construct a transaction batch.
## method [*connection.execute*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/chain.ts#L564)
Call a given program's transaction method.
<pre>
<strong>const</strong> result: <em>unknown</em> = connection.execute(
<strong>const</strong> result: <em>unknown</em> = <strong>await</strong> connection.execute(
contract,
message: <em>Message</em>,
options,
Expand All @@ -176,7 +176,7 @@ Get the balance in a given native token, of
either this connection's identity's address,
or of another given address.
<pre>
<strong>const</strong> result: <em>unknown</em> = connection.getBalanceIn(
<strong>const</strong> result: <em>unknown</em> = <strong>await</strong> connection.getBalanceIn(
token: <em>string</em>,
address,
)
Expand All @@ -187,7 +187,7 @@ Get the balance in a native token of a given address,
either in this connection's gas token,
or in another given token.
<pre>
<strong>const</strong> result: <em>unknown</em> = connection.getBalanceOf(
<strong>const</strong> result: <em>unknown</em> = <strong>await</strong> connection.getBalanceOf(
address,
token: <em>string</em>,
)
Expand All @@ -205,23 +205,23 @@ If no height is passed, gets info about the latest block.
## method [*connection.getCodeHashOfAddress*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/chain.ts#L261)
Get the code hash of a given address.
<pre>
<strong>const</strong> result: <em>string</em> = connection.getCodeHashOfAddress(
<strong>const</strong> result: <em>string</em> = <strong>await</strong> connection.getCodeHashOfAddress(
contract,
)
</pre>

## method [*connection.getCodeHashOfCodeId*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/chain.ts#L245)
Get the code hash of a given code id.
<pre>
<strong>const</strong> result: <em>string</em> = connection.getCodeHashOfCodeId(
<strong>const</strong> result: <em>string</em> = <strong>await</strong> connection.getCodeHashOfCodeId(
contract,
)
</pre>

## method [*connection.getCodeId*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/chain.ts#L229)
Get the code id of a given address.
<pre>
<strong>const</strong> result: <em>string</em> = connection.getCodeId(
<strong>const</strong> result: <em>string</em> = <strong>await</strong> connection.getCodeId(
contract,
)
</pre>
Expand Down Expand Up @@ -293,7 +293,7 @@ Query a contract.
## method [*connection.send*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/chain.ts#L428)
Send native tokens to 1 recipient.
<pre>
<strong>const</strong> result: <em>unknown</em> = connection.send(
<strong>const</strong> result: <em>unknown</em> = <strong>await</strong> connection.send(
recipient,
amounts,
options,
Expand Down Expand Up @@ -341,7 +341,7 @@ const contract = new Contract(
## method [*contract.execute*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/chain.ts#L653)
Execute a transaction on the specified instance as the specified Connection.
<pre>
<strong>const</strong> result: <em>unknown</em> = contract.execute(
<strong>const</strong> result: <em>unknown</em> = <strong>await</strong> contract.execute(
message: <em>Message</em>,
options,
)
Expand Down
36 changes: 18 additions & 18 deletions packages/agent/stub.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,14 @@ const stubBackend = new StubBackend(

## method [*stubBackend.execute*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/stub.ts#L258)
<pre>
<strong>const</strong> result: <em>unknown</em> = stubBackend.execute(
<strong>const</strong> result: <em>unknown</em> = <strong>await</strong> stubBackend.execute(
...args: <em>unknown</em>,
)
</pre>

## method [*stubBackend.export*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/stub.ts#L229)
<pre>
<strong>const</strong> result: <em>unknown</em> = stubBackend.export(
<strong>const</strong> result: <em>unknown</em> = <strong>await</strong> stubBackend.export(
...args: <em>unknown</em>,
)
</pre>
Expand All @@ -81,7 +81,7 @@ const stubBackend = new StubBackend(

## method [*stubBackend.import*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/stub.ts#L225)
<pre>
<strong>const</strong> result: <em>unknown</em> = stubBackend.import(
<strong>const</strong> result: <em>unknown</em> = <strong>await</strong> stubBackend.import(
...args: <em>unknown</em>,
)
</pre>
Expand Down Expand Up @@ -323,7 +323,7 @@ Construct a transaction batch.

## method [*stubConnection.doExecute*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/stub.ts#L125)
<pre>
<strong>const</strong> result: <em>unknown</em> = stubConnection.doExecute(
<strong>const</strong> result: <em>unknown</em> = <strong>await</strong> stubConnection.doExecute(
contract,
message: <em>Message</em>,
options,
Expand All @@ -332,7 +332,7 @@ Construct a transaction batch.

## method [*stubConnection.doGetBalance*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/stub.ts#L52)
<pre>
<strong>const</strong> result: <em>string</em> = stubConnection.doGetBalance(
<strong>const</strong> result: <em>string</em> = <strong>await</strong> stubConnection.doGetBalance(
token: <em>string</em>,
address: <em>string</em>,
)
Expand All @@ -345,21 +345,21 @@ Construct a transaction batch.

## method [*stubConnection.doGetCodeHashOfAddress*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/stub.ts#L69)
<pre>
<strong>const</strong> result: <em>string</em> = stubConnection.doGetCodeHashOfAddress(
<strong>const</strong> result: <em>string</em> = <strong>await</strong> stubConnection.doGetCodeHashOfAddress(
address: <em>string</em>,
)
</pre>

## method [*stubConnection.doGetCodeHashOfCodeId*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/stub.ts#L73)
<pre>
<strong>const</strong> result: <em>string</em> = stubConnection.doGetCodeHashOfCodeId(
<strong>const</strong> result: <em>string</em> = <strong>await</strong> stubConnection.doGetCodeHashOfCodeId(
id: <em>string</em>,
)
</pre>

## method [*stubConnection.doGetCodeId*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/stub.ts#L58)
<pre>
<strong>const</strong> result: <em>string</em> = stubConnection.doGetCodeId(
<strong>const</strong> result: <em>string</em> = <strong>await</strong> stubConnection.doGetCodeId(
address: <em>string</em>,
)
</pre>
Expand All @@ -378,7 +378,7 @@ stubConnection.doGetContractsByCodeId(

## method [*stubConnection.doGetHeight*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/stub.ts#L39)
<pre>
<strong>const</strong> result: <em>number</em> = stubConnection.doGetHeight()
<strong>const</strong> result: <em>number</em> = <strong>await</strong> stubConnection.doGetHeight()
</pre>

## method [*stubConnection.doInstantiate*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/stub.ts#L116)
Expand All @@ -399,7 +399,7 @@ stubConnection.doInstantiate(

## method [*stubConnection.doSend*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/stub.ts#L83)
<pre>
<strong>const</strong> result: <em>void</em> = stubConnection.doSend(
<strong>const</strong> result: <em>void</em> = <strong>await</strong> stubConnection.doSend(
recipient: <em>string</em>,
sums: <em>ICoin[]</em>,
opts: <em>never</em>,
Expand All @@ -408,7 +408,7 @@ stubConnection.doInstantiate(

## method [*stubConnection.doSendMany*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/stub.ts#L110)
<pre>
<strong>const</strong> result: <em>void</em> = stubConnection.doSendMany(
<strong>const</strong> result: <em>void</em> = <strong>await</strong> stubConnection.doSendMany(
outputs,
opts: <em>never</em>,
)
Expand All @@ -424,7 +424,7 @@ stubConnection.doInstantiate(
## method [*stubConnection.execute*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/chain.ts#L564)
Call a given program's transaction method.
<pre>
<strong>const</strong> result: <em>unknown</em> = stubConnection.execute(
<strong>const</strong> result: <em>unknown</em> = <strong>await</strong> stubConnection.execute(
contract,
message: <em>Message</em>,
options,
Expand All @@ -436,7 +436,7 @@ Get the balance in a given native token, of
either this connection's identity's address,
or of another given address.
<pre>
<strong>const</strong> result: <em>unknown</em> = stubConnection.getBalanceIn(
<strong>const</strong> result: <em>unknown</em> = <strong>await</strong> stubConnection.getBalanceIn(
token: <em>string</em>,
address,
)
Expand All @@ -447,7 +447,7 @@ Get the balance in a native token of a given address,
either in this connection's gas token,
or in another given token.
<pre>
<strong>const</strong> result: <em>unknown</em> = stubConnection.getBalanceOf(
<strong>const</strong> result: <em>unknown</em> = <strong>await</strong> stubConnection.getBalanceOf(
address,
token: <em>string</em>,
)
Expand All @@ -465,23 +465,23 @@ If no height is passed, gets info about the latest block.
## method [*stubConnection.getCodeHashOfAddress*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/chain.ts#L261)
Get the code hash of a given address.
<pre>
<strong>const</strong> result: <em>string</em> = stubConnection.getCodeHashOfAddress(
<strong>const</strong> result: <em>string</em> = <strong>await</strong> stubConnection.getCodeHashOfAddress(
contract,
)
</pre>

## method [*stubConnection.getCodeHashOfCodeId*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/chain.ts#L245)
Get the code hash of a given code id.
<pre>
<strong>const</strong> result: <em>string</em> = stubConnection.getCodeHashOfCodeId(
<strong>const</strong> result: <em>string</em> = <strong>await</strong> stubConnection.getCodeHashOfCodeId(
contract,
)
</pre>

## method [*stubConnection.getCodeId*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/chain.ts#L229)
Get the code id of a given address.
<pre>
<strong>const</strong> result: <em>string</em> = stubConnection.getCodeId(
<strong>const</strong> result: <em>string</em> = <strong>await</strong> stubConnection.getCodeId(
contract,
)
</pre>
Expand Down Expand Up @@ -553,7 +553,7 @@ Query a contract.
## method [*stubConnection.send*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/chain.ts#L428)
Send native tokens to 1 recipient.
<pre>
<strong>const</strong> result: <em>unknown</em> = stubConnection.send(
<strong>const</strong> result: <em>unknown</em> = <strong>await</strong> stubConnection.send(
recipient,
amounts,
options,
Expand Down
2 changes: 1 addition & 1 deletion packages/agent/tx.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ batch.instantiate(
## method [*batch.submit*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/tx.ts#L44)
Submit the batch.
<pre>
<strong>const</strong> result: <em>unknown</em> = batch.submit(
<strong>const</strong> result: <em>unknown</em> = <strong>await</strong> batch.submit(
...args: <em>unknown</em>,
)
</pre>
Expand Down

0 comments on commit d7400b9

Please sign in to comment.