Skip to content

Commit

Permalink
chore: removing makerx/tsconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
aorumbayev committed Sep 26, 2024
1 parent dd38b42 commit 3bb2d49
Show file tree
Hide file tree
Showing 15 changed files with 85 additions and 39 deletions.
6 changes: 3 additions & 3 deletions docs/code/classes/types_composer.default.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ ___

### txns

`Private` **txns**: `Txn`[] = `[]`
`Private` **txns**: [`Txn`](../modules/types_composer.md#txn)[] = `[]`

Transactions that have not yet been composed

Expand Down Expand Up @@ -1017,7 +1017,7 @@ Builds all transaction types apart from `txnWithSigner`, `atc` and `methodCall`

| Name | Type |
| :------ | :------ |
| `txn` | `Txn` |
| `txn` | [`Txn`](../modules/types_composer.md#txn) |
| `suggestedParams` | `SuggestedParams` |

#### Returns
Expand All @@ -1038,7 +1038,7 @@ ___

| Name | Type |
| :------ | :------ |
| `txn` | `Txn` |
| `txn` | [`Txn`](../modules/types_composer.md#txn) |
| `suggestedParams` | `SuggestedParams` |

#### Returns
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ If neither the environment variable 'ALGOKIT_DISPENSER_ACCESS_TOKEN' nor the aut

#### Defined in

[src/types/dispenser-client.ts:69](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/dispenser-client.ts#L69)
[src/types/dispenser-client.ts:73](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/dispenser-client.ts#L73)

## Properties

Expand All @@ -88,7 +88,7 @@ If neither the environment variable 'ALGOKIT_DISPENSER_ACCESS_TOKEN' nor the aut

#### Defined in

[src/types/dispenser-client.ts:66](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/dispenser-client.ts#L66)
[src/types/dispenser-client.ts:70](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/dispenser-client.ts#L70)

___

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

#### Defined in

[src/types/dispenser-client.ts:67](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/dispenser-client.ts#L67)
[src/types/dispenser-client.ts:71](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/dispenser-client.ts#L71)

## Accessors

Expand All @@ -114,7 +114,7 @@ The authentication token used for API requests.

#### Defined in

[src/types/dispenser-client.ts:85](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/dispenser-client.ts#L85)
[src/types/dispenser-client.ts:89](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/dispenser-client.ts#L89)

___

Expand All @@ -130,7 +130,7 @@ The timeout for API requests, in seconds.

#### Defined in

[src/types/dispenser-client.ts:89](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/dispenser-client.ts#L89)
[src/types/dispenser-client.ts:93](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/dispenser-client.ts#L93)

## Methods

Expand All @@ -155,7 +155,7 @@ DispenserFundResponse: An object containing the transaction ID and funded amount

#### Defined in

[src/types/dispenser-client.ts:150](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/dispenser-client.ts#L150)
[src/types/dispenser-client.ts:155](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/dispenser-client.ts#L155)

___

Expand All @@ -173,7 +173,7 @@ DispenserLimitResponse: An object containing the funding limit amount.

#### Defined in

[src/types/dispenser-client.ts:176](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/dispenser-client.ts#L176)
[src/types/dispenser-client.ts:181](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/dispenser-client.ts#L181)

___

Expand All @@ -200,7 +200,7 @@ The API response.

#### Defined in

[src/types/dispenser-client.ts:103](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/dispenser-client.ts#L103)
[src/types/dispenser-client.ts:107](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/dispenser-client.ts#L107)

___

Expand All @@ -222,4 +222,4 @@ Sends a refund request to the dispenser API for the specified refundTxnId.

#### Defined in

[src/types/dispenser-client.ts:167](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/dispenser-client.ts#L167)
[src/types/dispenser-client.ts:172](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/dispenser-client.ts#L172)
15 changes: 15 additions & 0 deletions docs/code/classes/types_logic_error.LogicError.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Wraps key functionality around processing logic errors

### Properties

- [cause](types_logic_error.LogicError.md#cause)
- [led](types_logic_error.LogicError.md#led)
- [lines](types_logic_error.LogicError.md#lines)
- [message](types_logic_error.LogicError.md#message)
Expand Down Expand Up @@ -65,6 +66,20 @@ Error.constructor

## Properties

### cause

`Optional` **cause**: `unknown`

#### Inherited from

Error.cause

#### Defined in

node_modules/typescript/lib/lib.es2022.error.d.ts:24

___

### led

**led**: [`LogicErrorDetails`](../interfaces/types_logic_error.LogicErrorDetails.md)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ The number of µAlgo that was funded.

#### Defined in

[src/types/dispenser-client.ts:22](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/dispenser-client.ts#L22)
[src/types/dispenser-client.ts:26](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/dispenser-client.ts#L26)

___

Expand All @@ -35,4 +35,4 @@ The ID of the transaction that was issued to fund the account.

#### Defined in

[src/types/dispenser-client.ts:20](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/dispenser-client.ts#L20)
[src/types/dispenser-client.ts:24](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/dispenser-client.ts#L24)
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ The limit, in µAlgo, that you can currently fund.

#### Defined in

[src/types/dispenser-client.ts:28](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/dispenser-client.ts#L28)
[src/types/dispenser-client.ts:32](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/dispenser-client.ts#L32)
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ The API auth token

#### Defined in

[src/types/dispenser-client.ts:34](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/dispenser-client.ts#L34)
[src/types/dispenser-client.ts:38](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/dispenser-client.ts#L38)

___

Expand All @@ -35,4 +35,4 @@ The request timeout in seconds

#### Defined in

[src/types/dispenser-client.ts:36](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/dispenser-client.ts#L36)
[src/types/dispenser-client.ts:40](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/dispenser-client.ts#L40)
21 changes: 19 additions & 2 deletions docs/code/modules/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
### Type Aliases

- [AccountInformation](index.md#accountinformation)
- [NumberConverter](index.md#numberconverter)

### Variables

Expand Down Expand Up @@ -168,7 +169,7 @@ Re-exports [searchTransactions](index.indexer.md#searchtransactions)

### AccountInformation

Ƭ **AccountInformation**: `Omit`\<`NumberConverter`\<`AccountInformationModel`\>, ``"get_obj_for_encoding"``\>
Ƭ **AccountInformation**: `Omit`\<[`NumberConverter`](index.md#numberconverter)\<`AccountInformationModel`\>, ``"get_obj_for_encoding"``\>

**`Deprecated`**

Expand All @@ -178,6 +179,22 @@ Account information at a given round.

[src/account/account.ts:135](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/account/account.ts#L135)

___

### NumberConverter

Ƭ **NumberConverter**\<`T`\>: \{ [key in keyof T]: ToNumberIfExtends\<T[key], number \| bigint\> }

#### Type parameters

| Name | Type |
| :------ | :------ |
| `T` | extends `AccountInformationModel` |

#### Defined in

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

## Variables

### Config
Expand Down Expand Up @@ -2641,7 +2658,7 @@ This function persists the source maps for the given sources.

#### Defined in

[src/debugging/debugging.ts:10](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/debugging/debugging.ts#L10)
[src/debugging/debugging.ts:8](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/debugging/debugging.ts#L8)

___

Expand Down
11 changes: 11 additions & 0 deletions docs/code/modules/types_composer.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
- [OnlineKeyRegistrationParams](types_composer.md#onlinekeyregistrationparams)
- [PaymentParams](types_composer.md#paymentparams)
- [SimulateOptions](types_composer.md#simulateoptions)
- [Txn](types_composer.md#txn)

### Variables

Expand Down Expand Up @@ -355,6 +356,16 @@ Options to control a simulate request

[src/types/composer.ts:24](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L24)

___

### Txn

Ƭ **Txn**: [`PaymentParams`](types_composer.md#paymentparams) & \{ `type`: ``"pay"`` } \| [`AssetCreateParams`](types_composer.md#assetcreateparams) & \{ `type`: ``"assetCreate"`` } \| [`AssetConfigParams`](types_composer.md#assetconfigparams) & \{ `type`: ``"assetConfig"`` } \| [`AssetFreezeParams`](types_composer.md#assetfreezeparams) & \{ `type`: ``"assetFreeze"`` } \| [`AssetDestroyParams`](types_composer.md#assetdestroyparams) & \{ `type`: ``"assetDestroy"`` } \| [`AssetTransferParams`](types_composer.md#assettransferparams) & \{ `type`: ``"assetTransfer"`` } \| [`AssetOptInParams`](types_composer.md#assetoptinparams) & \{ `type`: ``"assetOptIn"`` } \| [`AssetOptOutParams`](types_composer.md#assetoptoutparams) & \{ `type`: ``"assetOptOut"`` } \| [`AppCallParams`](types_composer.md#appcallparams) \| [`AppCreateParams`](types_composer.md#appcreateparams) \| [`AppUpdateParams`](types_composer.md#appupdateparams) & \{ `type`: ``"appCall"`` } \| [`OnlineKeyRegistrationParams`](types_composer.md#onlinekeyregistrationparams) & \{ `type`: ``"keyReg"`` } \| `algosdk.TransactionWithSigner` & \{ `type`: ``"txnWithSigner"`` } \| \{ `atc`: `algosdk.AtomicTransactionComposer` ; `type`: ``"atc"`` } \| [`AppCallMethodCall`](types_composer.md#appcallmethodcall) \| [`AppCreateMethodCall`](types_composer.md#appcreatemethodcall) \| [`AppUpdateMethodCall`](types_composer.md#appupdatemethodcall) & \{ `type`: ``"methodCall"`` }

#### Defined in

[src/types/composer.ts:435](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L435)

## Variables

### MAX\_TRANSACTION\_GROUP\_SIZE
Expand Down
16 changes: 8 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"build:1-compile": "rollup -c --configPlugin typescript",
"build:3-copy-pkg-json": "npx --yes @makerx/ts-toolkit@latest copy-package-json --custom-sections module main type types exports",
"build:4-copy-readme": "cpy README.md dist",
"test": "dotenv -e .env -- jest --coverage --passWithNoTests",
"test": "dotenv -e .env -- jest --coverage --passWithNoTests --silent",
"lint": "eslint ./src/ --ext .ts",
"lint:fix": "eslint ./src/ --ext .ts --fix",
"check-types": "tsc --noEmit",
Expand Down Expand Up @@ -69,10 +69,10 @@
"@commitlint/config-conventional": "^17.7.0",
"@makerx/eslint-config": "^3.1.0",
"@makerx/prettier-config": "^2.0.0",
"@makerx/ts-config": "^1.0.1",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-typescript": "^11.1.6",
"@tsconfig/node18": "^18.2.2",
"@tsconfig/node20": "^20.1.4",
"@types/jest": "^29.5.2",
"@types/uuid": "^9.0.2",
"algosdk": "^2.7.0",
Expand Down
2 changes: 1 addition & 1 deletion src/account/account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export function getAccountAddressAsString(addressEncodedInB64: string): string {
return algosdk.encodeAddress(Buffer.from(addressEncodedInB64, 'base64'))
}

type NumberConverter<T extends AccountInformationModel> = { [key in keyof T]: ToNumberIfExtends<T[key], number | bigint> }
export type NumberConverter<T extends AccountInformationModel> = { [key in keyof T]: ToNumberIfExtends<T[key], number | bigint> }
type ToNumberIfExtends<K, E> = K extends E ? number : K
/** @deprecated Account information at a given round. */
export type AccountInformation = Omit<NumberConverter<AccountInformationModel>, 'get_obj_for_encoding'>
Expand Down
2 changes: 0 additions & 2 deletions src/debugging/debugging.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
*
* This function persists the source maps for the given sources.
*
* @param param0 The parameters to define the persistence
*
* @returns A promise that resolves when the source maps have been persisted.
*/
export async function persistSourceMaps(_params: unknown): Promise<void> {
Expand Down
2 changes: 1 addition & 1 deletion src/types/composer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ export type AppMethodCall<T> = Expand<Omit<T, 'args'>> & {
)[]
}

type Txn =
export type Txn =
| (PaymentParams & { type: 'pay' })
| (AssetCreateParams & { type: 'assetCreate' })
| (AssetConfigParams & { type: 'assetConfig' })
Expand Down
15 changes: 10 additions & 5 deletions src/types/dispenser-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ const DISPENSER_BASE_URL = 'https://api.dispenser.algorandfoundation.tools'
const DEFAULT_DISPENSER_REQUEST_TIMEOUT = 15
const DISPENSER_ACCESS_TOKEN_KEY = 'ALGOKIT_DISPENSER_ACCESS_TOKEN'

interface ErrorResponse {
code?: string
}

enum DispenserAssetName {
Algo = 0,
}
Expand Down Expand Up @@ -128,10 +132,11 @@ export class TestNetDispenserApiClient {
// suppress exception
}

if (error_response && error_response.code) {
error_message = error_response.code
if (error_response && (error_response as ErrorResponse).code) {
error_message = (error_response as ErrorResponse).code!
} else if (response.status === 400) {
error_message = (await response.json()).message
const errorResponse = (await response.json()) as { message: string }
error_message = errorResponse.message
}

throw new Error(error_message)
Expand All @@ -155,7 +160,7 @@ export class TestNetDispenserApiClient {
'POST',
)

const content = await response.json()
const content = (await response.json()) as { txID: string; amount: number }
return { txId: content.txID, amount: content.amount }
}

Expand All @@ -180,7 +185,7 @@ export class TestNetDispenserApiClient {
null,
'GET',
)
const content = await response.json()
const content = (await response.json()) as { amount: number }

return { amount: content.amount }
}
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "@makerx/ts-config",
"extends": "@tsconfig/node20/tsconfig.json",
"compilerOptions": {
"module": "ESNext",
"target": "ES2020",
Expand Down

0 comments on commit 3bb2d49

Please sign in to comment.