Skip to content

Commit

Permalink
Merge main into release
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Sep 4, 2023
2 parents de46859 + 2d452b1 commit 0a14167
Show file tree
Hide file tree
Showing 41 changed files with 1,619 additions and 624 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ name: Pull Request
on:
pull_request:
branches: [main]
paths-ignore:
- '**/*.md'

permissions:
contents: read
Expand All @@ -13,6 +11,7 @@ jobs:
pull_request:
uses: makerxstudio/shared-config/.github/workflows/node-ci.yml@main
with:
node-version: 18.x
working-directory: ./
run-commit-lint: true
run-build: true
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
name: Continuous Integration
uses: makerxstudio/shared-config/.github/workflows/node-ci.yml@main
with:
node-version: 18.x
run-commit-lint: true
pre-test-script: |
pipx install algokit
Expand Down Expand Up @@ -49,6 +50,7 @@ jobs:
- ci
- check_docs
with:
node-version: 18.x
build-path: dist
artifact-name: package

Expand Down
File renamed without changes.
File renamed without changes.
6 changes: 5 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,16 @@ This library can be installed from NPM using your favourite npm client, e.g.:
npm install @algorandfoundation/algokit-utils
```

## Peer Dependencies

This library requires `algosdk` as a peer dependency. Ensure you have it installed in your project.

# Usage

To use this library simply include the following at the top of your file:

```typescript
import * as algokit from '@algorandfoudation/algokit-utils'
import * as algokit from '@algorandfoundation/algokit-utils'
```

Then you can use intellisense to auto-complete the various functions that are available by typing `algokit.` in your favourite Integrated Development Environment (IDE), or you can refer to the [reference documentation](code/modules/index.md).
Expand Down
3 changes: 2 additions & 1 deletion docs/capabilities/account.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ AlgoKit Utils provides a few helper methods to take one of these `SendTransactio

In order to get the accounts you can use the underlying algosdk methods where relevant, or you can use the following AlgoKit Utils functions (all of which return a type compatible with `SendTransactionFrom`):

- [`algokit.getAccount(name, algod, kmd?)`](../code/modules/index.md#) - Returns an Algorand account with private key loaded by convention based on the given name identifier - either by idempotently creating the account in KMD or from environment variable via `process.env['{NAME}_MNEMONIC']` and (optionally) `process.env['{NAME}_SENDER']` (if account is rekeyed)
- [`algokit.mnemonicAccountFromEnvironment(account, algod, kmd?)`](../code/modules/index.md#mnemonicaccountfromenvironment) - Returns an Algorand account with private key loaded by convention based on the given name identifier - either by idempotently creating the account in KMD or from environment variable via `process.env['{NAME}_MNEMONIC']` and (optionally) `process.env['{NAME}_SENDER']` (if account is rekeyed)
- This allows you to have powerful code that will automatically create and fund an account by name locally and when deployed against TestNet/MainNet will automatically resolve from environment variables, without having to have different code
- Note: `account` can either be a string name, or an object with `{name: string, fundWith?: AlgoAmount}`, where `fundWith` allows you to control how many ALGOs are seeded into an account created in KMD
- [`algokit.mnemonicAccount(mnemonicSecret)`](../code/modules/index.md#mnemonicaccount) - Returns an Algorand account (`algosdk.Account`) with secret key loaded (i.e. that can sign transactions) by taking the mnemonic secret.
- [`algokit.multisigAccount(multisigParams, signingAccounts)`](../code/modules/index.md#multisigaccount) - Returns a multisig account with one or more signing keys loaded.
- [`algokit.rekeyedAccount(signer, sender)`](../code/modules/index.md#rekeyedaccount) - Returns a `SigningAccount` representing the given rekeyed sender/signer combination
Expand Down
18 changes: 9 additions & 9 deletions docs/code/classes/testing.TestLogger.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,15 +168,6 @@ This helps ensure that the provided configuration items won't appear

https://jestjs.io/docs/snapshot-testing#2-tests-should-be-deterministic

**`Example`**

Jest Example
```typescript
const logger = new TestLogger()
...
expect(logger.getLogSnapshot()).toMatchSnapshot()
```

#### Parameters

| Name | Type | Description |
Expand All @@ -189,6 +180,15 @@ expect(logger.getLogSnapshot()).toMatchSnapshot()

The snapshotted logs.

**`Example`**

Jest Example
```typescript
const logger = new TestLogger()
...
expect(logger.getLogSnapshot()).toMatchSnapshot()
```

#### Defined in

[src/testing/test-logger.ts:47](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/testing/test-logger.ts#L47)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ A HTTP Client that wraps the Algorand SDK HTTP Client with retries

#### Defined in

[src/types/urlTokenBaseHTTPClient.ts:45](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/urlTokenBaseHTTPClient.ts#L45)
[src/types/urlTokenBaseHTTPClient.ts:48](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/urlTokenBaseHTTPClient.ts#L48)

## Properties

Expand Down
Loading

0 comments on commit 0a14167

Please sign in to comment.