Skip to content

Commit

Permalink
Fix code imports
Browse files Browse the repository at this point in the history
Co-authored-by: Lucas Tortora <[email protected]>
  • Loading branch information
Dr-Electron and lucas-tortora authored Jan 9, 2024
1 parent 78f03a3 commit 16be17e
Show file tree
Hide file tree
Showing 34 changed files with 248 additions and 266 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ with the node to get the latest outputs. The sync function also returns the bala
<div className={'hide-code-block-extras'}>

```rust reference
https://github.com/iotaledger/iota-sdk/blob/develop/sdk/examples/how_tos/accounts_and_addresses/check_balance.rs#L28
https://github.com/iotaledger/iota-sdk/blob/develop/sdk/examples/how_tos/accounts_and_addresses/check_balance.rs#L32
```

</div>
Expand All @@ -57,7 +57,7 @@ https://github.com/iotaledger/iota-sdk/blob/develop/sdk/examples/how_tos/account
<div className={'hide-code-block-extras'}>

```typescript reference
https://github.com/iotaledger/iota-sdk/blob/develop/bindings/nodejs/examples/how_tos/accounts_and_addresses/check-balance.ts#L27
https://github.com/iotaledger/iota-sdk/blob/develop/bindings/nodejs/examples/how_tos/accounts_and_addresses/check-balance.ts#L29
```

</div>
Expand All @@ -76,7 +76,7 @@ https://github.com/iotaledger/iota-sdk/blob/develop/bindings/nodejs/examples/how
<div className={'hide-code-block-extras'}>

```python reference
https://github.com/iotaledger/iota-sdk/blob/develop/bindings/python/examples/how_tos/accounts_and_addresses/check_balance.py#L17
https://github.com/iotaledger/iota-sdk/blob/develop/bindings/python/examples/how_tos/accounts_and_addresses/check_balance.py#L18-L22
```

</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ number of UTXOs, which can improve transaction efficiency and reduce storage dep
<div className={'hide-code-block-extras'}>

```rust reference
https://github.com/iotaledger/iota-sdk/blob/develop/sdk/examples/how_tos/accounts_and_addresses/consolidate_outputs.rs#L46
https://github.com/iotaledger/iota-sdk/blob/develop/sdk/examples/how_tos/accounts_and_addresses/consolidate_outputs.rs#L52
```

</div>
Expand All @@ -41,7 +41,7 @@ https://github.com/iotaledger/iota-sdk/blob/develop/sdk/examples/how_tos/account
<div className={'hide-code-block-extras'}>

```rust reference
https://github.com/iotaledger/iota-sdk/blob/develop/sdk/examples/how_tos/accounts_and_addresses/consolidate_outputs.rs#L62-L64
https://github.com/iotaledger/iota-sdk/blob/develop/sdk/examples/how_tos/accounts_and_addresses/consolidate_outputs.rs#L68-L70
```

</div>
Expand All @@ -52,7 +52,7 @@ https://github.com/iotaledger/iota-sdk/blob/develop/sdk/examples/how_tos/account
<div className={'hide-code-block-extras'}>

```rust reference
https://github.com/iotaledger/iota-sdk/blob/develop/sdk/examples/how_tos/accounts_and_addresses/consolidate_outputs.rs#L68-L70
https://github.com/iotaledger/iota-sdk/blob/develop/sdk/examples/how_tos/accounts_and_addresses/consolidate_outputs.rs#L74-L76
```

</div>
Expand All @@ -69,40 +69,29 @@ https://github.com/iotaledger/iota-sdk/blob/develop/sdk/examples/how_tos/account
<div className={'hide-code-block-extras'}>

```typescript reference
https://github.com/iotaledger/iota-sdk/blob/develop/bindings/nodejs/examples/how_tos/accounts_and_addresses/consolidate-outputs.ts#L51
https://github.com/iotaledger/iota-sdk/blob/develop/bindings/nodejs/examples/how_tos/accounts_and_addresses/consolidate-outputs.ts#L48
```

</div>

3. Prepare a [`Transaction`](../../references/nodejs/classes/Transaction.md) to consolidate the Outputs by calling
the [`Account.prepareConsolidateOutputs()`](../../references/nodejs/classes/Account.md#prepareconsolidateoutputs) function.

<div className={'hide-code-block-extras'}>

```typescript reference
https://github.com/iotaledger/iota-sdk/blob/develop/bindings/nodejs/examples/how_tos/accounts_and_addresses/consolidate-outputs.ts#L70-L72
```

</div>

4. Send the `Transaction` by calling the [`PreparedTransaction.send()`](../../references/nodejs/classes/PreparedTransaction.md#send)
function.
3. Send a [`Transaction`](../../references/nodejs/classes/Transaction.md) to consolidate the Outputs by calling
the [`Account.consolidateOutputs()`](../../references/nodejs/classes/Account.md#consolidateoutputs) <!-- TODO Update ref link --> function.

<div className={'hide-code-block-extras'}>

```typescript reference
https://github.com/iotaledger/iota-sdk/blob/develop/bindings/nodejs/examples/how_tos/accounts_and_addresses/consolidate-outputs.ts#L73
https://github.com/iotaledger/iota-sdk/blob/develop/bindings/nodejs/examples/how_tos/accounts_and_addresses/consolidate-outputs.ts#L67-L69
```

</div>

5. Await for the `Transaction` to get confirmed by calling the [`Account.retryTransactionUntilIncluded`](../../references/nodejs/classes/Account.md#retrytransactionuntilincluded)
4. Await for the `Transaction` to get confirmed by calling the [`Account.retryTransactionUntilIncluded`](../../references/nodejs/classes/Account.md#retrytransactionuntilincluded)
function.

<div className={'hide-code-block-extras'}>

```typescript reference
https://github.com/iotaledger/iota-sdk/blob/develop/bindings/nodejs/examples/how_tos/accounts_and_addresses/consolidate-outputs.ts#L77-L79
https://github.com/iotaledger/iota-sdk/blob/develop/bindings/nodejs/examples/how_tos/accounts_and_addresses/consolidate-outputs.ts#L73-L75
```

</div>
Expand All @@ -120,19 +109,18 @@ The following example will:
<div className={'hide-code-block-extras'}>

```python reference
https://github.com/iotaledger/iota-sdk/blob/develop/bindings/python/examples/how_tos/accounts_and_addresses/consolidate_outputs.py#L30
https://github.com/iotaledger/iota-sdk/blob/develop/bindings/python/examples/how_tos/accounts_and_addresses/consolidate_outputs.py#L32
```

</div>

3. Prepare a [`Transaction`](../../references/python/iota_sdk/types/transaction.md) to consolidate the Outputs by calling
the [`Account.prepare_consolidate_outputs()`](../../references/python/iota_sdk/wallet/account.md#prepare_consolidate_outputs) function
and [`send()`](../../references/python/iota_sdk/wallet/account.md#send) it.
the [`Account.consolidate_outputs()`](../../references/python/iota_sdk/wallet/account.md#consolidate_outputs).

<div className={'hide-code-block-extras'}>

```python reference
https://github.com/iotaledger/iota-sdk/blob/develop/bindings/python/examples/how_tos/accounts_and_addresses/consolidate_outputs.py#L48-L49
https://github.com/iotaledger/iota-sdk/blob/develop/bindings/python/examples/how_tos/accounts_and_addresses/consolidate_outputs.py#L46
```

</div>
Expand All @@ -143,7 +131,7 @@ https://github.com/iotaledger/iota-sdk/blob/develop/bindings/python/examples/how
<div className={'hide-code-block-extras'}>

```python reference
https://github.com/iotaledger/iota-sdk/blob/develop/bindings/python/examples/how_tos/accounts_and_addresses/consolidate_outputs.py#L53
https://github.com/iotaledger/iota-sdk/blob/develop/bindings/python/examples/how_tos/accounts_and_addresses/consolidate_outputs.py#L50
```

</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ assets, enabling users to send and receive transactions, and engage in various a
<div className={'hide-code-block-extras'}>

```rust reference
https://github.com/iotaledger/iota-sdk/blob/develop/sdk/examples/how_tos/accounts_and_addresses/create_account.rs#L27-L47
https://github.com/iotaledger/iota-sdk/blob/develop/sdk/examples/how_tos/accounts_and_addresses/create_account.rs#L37-L57
```

</div>
Expand All @@ -47,7 +47,7 @@ https://github.com/iotaledger/iota-sdk/blob/develop/sdk/examples/how_tos/account
<div className={'hide-code-block-extras'}>

```rust reference
https://github.com/iotaledger/iota-sdk/blob/develop/sdk/examples/how_tos/accounts_and_addresses/create_account.rs#L50
https://github.com/iotaledger/iota-sdk/blob/develop/sdk/examples/how_tos/accounts_and_addresses/create_account.rs#L60
```

</div>
Expand All @@ -61,7 +61,7 @@ https://github.com/iotaledger/iota-sdk/blob/develop/sdk/examples/how_tos/account
<div className={'hide-code-block-extras'}>

```typescript reference
https://github.com/iotaledger/iota-sdk/blob/develop/bindings/nodejs/examples/how_tos/accounts_and_addresses/create-account.ts#L35-L54
https://github.com/iotaledger/iota-sdk/blob/develop/bindings/nodejs/examples/how_tos/accounts_and_addresses/create-account.ts#L27-L46
```

</div>
Expand All @@ -73,7 +73,7 @@ https://github.com/iotaledger/iota-sdk/blob/develop/bindings/nodejs/examples/how
<div className={'hide-code-block-extras'}>

```typescript reference
https://github.com/iotaledger/iota-sdk/blob/develop/bindings/nodejs/examples/how_tos/accounts_and_addresses/create-account.ts#L57-L59
https://github.com/iotaledger/iota-sdk/blob/develop/bindings/nodejs/examples/how_tos/accounts_and_addresses/create-account.ts#L49-L51
```

</div>
Expand All @@ -87,7 +87,7 @@ https://github.com/iotaledger/iota-sdk/blob/develop/bindings/nodejs/examples/how
<div className={'hide-code-block-extras'}>

```python reference
https://github.com/iotaledger/iota-sdk/blob/develop/bindings/python/examples/how_tos/accounts_and_addresses/create_account.py#L13-L32
https://github.com/iotaledger/iota-sdk/blob/develop/bindings/python/examples/how_tos/accounts_and_addresses/create_account.py#L11-L32
```

</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ generate an address for each user in this account.
<div className={'hide-code-block-extras'}>

```rust reference
https://github.com/iotaledger/iota-sdk/blob/develop/sdk/examples/how_tos/accounts_and_addresses/create_address.rs#L44-L46
https://github.com/iotaledger/iota-sdk/blob/develop/sdk/examples/how_tos/accounts_and_addresses/create_address.rs#L48-L50
```

</div>
Expand All @@ -57,7 +57,7 @@ https://github.com/iotaledger/iota-sdk/blob/develop/sdk/examples/how_tos/account
<div className={'hide-code-block-extras'}>

```typescript reference
https://github.com/iotaledger/iota-sdk/blob/develop/bindings/nodejs/examples/how_tos/accounts_and_addresses/create-address.ts#L31
https://github.com/iotaledger/iota-sdk/blob/develop/bindings/nodejs/examples/how_tos/accounts_and_addresses/create-address.ts#L30
```

</div>
Expand All @@ -73,7 +73,7 @@ https://github.com/iotaledger/iota-sdk/blob/develop/bindings/nodejs/examples/how
<div className={'hide-code-block-extras'}>

```python reference
https://github.com/iotaledger/iota-sdk/blob/develop/bindings/python/examples/how_tos/accounts_and_addresses/create_address.py#L18
https://github.com/iotaledger/iota-sdk/blob/develop/bindings/python/examples/how_tos/accounts_and_addresses/create_address.py#L20
```

</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ platform.
<div className={'hide-code-block-extras'}>

```rust reference
https://github.com/iotaledger/iota-sdk/blob/develop/sdk/examples/how_tos/accounts_and_addresses/list_accounts.rs#L24-L26
https://github.com/iotaledger/iota-sdk/blob/develop/sdk/examples/how_tos/accounts_and_addresses/list_accounts.rs#L28-L30
```

</div>
Expand All @@ -51,7 +51,7 @@ https://github.com/iotaledger/iota-sdk/blob/develop/sdk/examples/how_tos/account
<div className={'hide-code-block-extras'}>

```typescript reference
https://github.com/iotaledger/iota-sdk/blob/develop/bindings/nodejs/examples/how_tos/accounts_and_addresses/list-accounts.ts#L23-L26
https://github.com/iotaledger/iota-sdk/blob/develop/bindings/nodejs/examples/how_tos/accounts_and_addresses/list-accounts.ts#L25-L28
```

</div>
Expand All @@ -66,7 +66,7 @@ https://github.com/iotaledger/iota-sdk/blob/develop/bindings/nodejs/examples/how
<div className={'hide-code-block-extras'}>

```python reference
https://github.com/iotaledger/iota-sdk/blob/develop/bindings/python/examples/how_tos/accounts_and_addresses/list_accounts.py#L13-L14
https://github.com/iotaledger/iota-sdk/blob/develop/bindings/python/examples/how_tos/accounts_and_addresses/list_accounts.py#L15-L16
```

</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ platform.
<div className={'hide-code-block-extras'}>

```rust reference
https://github.com/iotaledger/iota-sdk/blob/develop/sdk/examples/how_tos/accounts_and_addresses/list_addresses.rs#L22-L26
https://github.com/iotaledger/iota-sdk/blob/develop/sdk/examples/how_tos/accounts_and_addresses/list_addresses.rs#L27-L31
```

</div>
Expand All @@ -56,7 +56,7 @@ https://github.com/iotaledger/iota-sdk/blob/develop/sdk/examples/how_tos/account
<div className={'hide-code-block-extras'}>

```typescript reference
https://github.com/iotaledger/iota-sdk/blob/develop/bindings/nodejs/examples/how_tos/accounts_and_addresses/list-addresses.ts#L23-L27
https://github.com/iotaledger/iota-sdk/blob/develop/bindings/nodejs/examples/how_tos/accounts_and_addresses/list-addresses.ts#L25-L29
```

</div>
Expand All @@ -73,7 +73,7 @@ https://github.com/iotaledger/iota-sdk/blob/develop/bindings/nodejs/examples/how
<div className={'hide-code-block-extras'}>

```python reference
https://github.com/iotaledger/iota-sdk/blob/develop/bindings/python/examples/how_tos/accounts_and_addresses/list_addresses.py#L13-L18
https://github.com/iotaledger/iota-sdk/blob/develop/bindings/python/examples/how_tos/accounts_and_addresses/list_addresses.py#L17
```

</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ This guide will show you how to list all the outputs that can be unlocked by any
<div className={'hide-code-block-extras'}>

```rust reference
https://github.com/iotaledger/iota-sdk/blob/develop/sdk/examples/how_tos/accounts_and_addresses/list_outputs.rs#L29-L31
https://github.com/iotaledger/iota-sdk/blob/develop/sdk/examples/how_tos/accounts_and_addresses/list_outputs.rs#L34-L36
```

</div>
Expand All @@ -40,7 +40,7 @@ https://github.com/iotaledger/iota-sdk/blob/develop/sdk/examples/how_tos/account
<div className={'hide-code-block-extras'}>

```rust reference
https://github.com/iotaledger/iota-sdk/blob/develop/sdk/examples/how_tos/accounts_and_addresses/list_outputs.rs#L35-L37
https://github.com/iotaledger/iota-sdk/blob/develop/sdk/examples/how_tos/accounts_and_addresses/list_outputs.rs#L40-L42
```

</div>
Expand All @@ -57,7 +57,7 @@ https://github.com/iotaledger/iota-sdk/blob/develop/sdk/examples/how_tos/account
<div className={'hide-code-block-extras'}>

```typescript reference
https://github.com/iotaledger/iota-sdk/blob/develop/bindings/nodejs/examples/how_tos/accounts_and_addresses/list-outputs.ts#L27-L30
https://github.com/iotaledger/iota-sdk/blob/develop/bindings/nodejs/examples/how_tos/accounts_and_addresses/list-outputs.ts#L29-L32
```

</div>
Expand All @@ -69,7 +69,7 @@ https://github.com/iotaledger/iota-sdk/blob/develop/bindings/nodejs/examples/how
<div className={'hide-code-block-extras'}>

```typescript reference
https://github.com/iotaledger/iota-sdk/blob/develop/bindings/nodejs/examples/how_tos/accounts_and_addresses/list-outputs.ts#L32-L35
https://github.com/iotaledger/iota-sdk/blob/develop/bindings/nodejs/examples/how_tos/accounts_and_addresses/list-outputs.ts#L34-L37
```

</div>
Expand All @@ -86,7 +86,7 @@ https://github.com/iotaledger/iota-sdk/blob/develop/bindings/nodejs/examples/how
<div className={'hide-code-block-extras'}>

```python reference
https://github.com/iotaledger/iota-sdk/blob/develop/bindings/python/examples/how_tos/accounts_and_addresses/list_outputs.py#L21-L22
https://github.com/iotaledger/iota-sdk/blob/develop/bindings/python/examples/how_tos/accounts_and_addresses/list_outputs.py#L19
```

</div>
Expand All @@ -97,7 +97,7 @@ https://github.com/iotaledger/iota-sdk/blob/develop/bindings/python/examples/how
<div className={'hide-code-block-extras'}>

```python reference
https://github.com/iotaledger/iota-sdk/blob/develop/bindings/python/examples/how_tos/accounts_and_addresses/list_outputs.py#L29-L30
https://github.com/iotaledger/iota-sdk/blob/develop/bindings/python/examples/how_tos/accounts_and_addresses/list_outputs.py#L27
```

</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Also, only transactions that weren't pruned on the point of _syncing_ will be li
<div className={'hide-code-block-extras'}>

```rust reference
https://github.com/iotaledger/iota-sdk/blob/develop/sdk/examples/how_tos/accounts_and_addresses/list_transactions.rs#L37-L39
https://github.com/iotaledger/iota-sdk/blob/develop/sdk/examples/how_tos/accounts_and_addresses/list_transactions.rs#L42-L44
```

</div>
Expand All @@ -56,7 +56,7 @@ https://github.com/iotaledger/iota-sdk/blob/develop/sdk/examples/how_tos/account
<div className={'hide-code-block-extras'}>

```rust reference
https://github.com/iotaledger/iota-sdk/blob/develop/sdk/examples/how_tos/accounts_and_addresses/list_transactions.rs#L43-L45
https://github.com/iotaledger/iota-sdk/blob/develop/sdk/examples/how_tos/accounts_and_addresses/list_transactions.rs#L48-L50
```

</div>
Expand All @@ -73,7 +73,7 @@ https://github.com/iotaledger/iota-sdk/blob/develop/sdk/examples/how_tos/account
<div className={'hide-code-block-extras'}>

```typescript reference
https://github.com/iotaledger/iota-sdk/blob/develop/bindings/nodejs/examples/how_tos/accounts_and_addresses/list-transactions.ts#L26-L29
https://github.com/iotaledger/iota-sdk/blob/develop/bindings/nodejs/examples/how_tos/accounts_and_addresses/list-transactions.ts#L28-L31
```

</div>
Expand All @@ -84,7 +84,7 @@ https://github.com/iotaledger/iota-sdk/blob/develop/bindings/nodejs/examples/how
<div className={'hide-code-block-extras'}>

```typescript reference
https://github.com/iotaledger/iota-sdk/blob/develop/bindings/nodejs/examples/how_tos/accounts_and_addresses/list-transactions.ts#L31-L35
https://github.com/iotaledger/iota-sdk/blob/develop/bindings/nodejs/examples/how_tos/accounts_and_addresses/list-transactions.ts#L33-L37
```

</div>
Expand All @@ -102,7 +102,7 @@ https://github.com/iotaledger/iota-sdk/blob/develop/bindings/nodejs/examples/how
<div className={'hide-code-block-extras'}>

```python reference
https://github.com/iotaledger/iota-sdk/blob/develop/bindings/python/examples/how_tos/accounts_and_addresses/list_transactions.py#L17-L20
https://github.com/iotaledger/iota-sdk/blob/develop/bindings/python/examples/how_tos/accounts_and_addresses/list_transactions.py#L19
```

</div>
Expand All @@ -114,7 +114,7 @@ https://github.com/iotaledger/iota-sdk/blob/develop/bindings/python/examples/how
<div className={'hide-code-block-extras'}>

```python reference
https://github.com/iotaledger/iota-sdk/blob/develop/bindings/python/examples/how_tos/accounts_and_addresses/list_transactions.py#L24-L27
https://github.com/iotaledger/iota-sdk/blob/develop/bindings/python/examples/how_tos/accounts_and_addresses/list_transactions.py#L26-L27
```

</div>
Expand Down
Loading

0 comments on commit 16be17e

Please sign in to comment.