Skip to content

Commit 31e6fa6

Browse files
committed
cleanup tsconfigs | update deps | expose more granular txns methods
1 parent 6c78742 commit 31e6fa6

17 files changed

+206
-964
lines changed

package-lock.json

+78-819
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+18-18
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,23 @@
22
"name": "algostack",
33
"version": "0.4.12",
44
"description": "",
5+
"author": "",
6+
"license": "MIT",
57
"type": "module",
6-
"main": "./dist/esm/index.js",
7-
"module": "./dist/esm/index.js",
8+
"main": "./dist/index.js",
9+
"module": "./dist/index.js",
810
"exports": {
9-
".": "./dist/esm/index.js",
10-
"./addons": "./dist/esm/modules/addons/index.js",
11-
"./cache": "./dist/esm/modules/cache/index.js",
12-
"./client": "./dist/esm/modules/client/index.js",
13-
"./nfds": "./dist/esm/modules/nfds/index.js",
14-
"./query": "./dist/esm/modules/query/index.js",
15-
"./txns": "./dist/esm/modules/txns/index.js",
16-
"./files": "./dist/esm/modules/files/index.js",
17-
"./medias": "./dist/esm/modules/medias/index.js",
18-
"./helpers": "./dist/esm/helpers/index.js",
19-
"./helpers/*": "./dist/esm/helpers/*.js",
11+
".": "./dist/index.js",
12+
"./addons": "./dist/modules/addons/index.js",
13+
"./cache": "./dist/modules/cache/index.js",
14+
"./client": "./dist/modules/client/index.js",
15+
"./nfds": "./dist/modules/nfds/index.js",
16+
"./query": "./dist/modules/query/index.js",
17+
"./txns": "./dist/modules/txns/index.js",
18+
"./files": "./dist/modules/files/index.js",
19+
"./medias": "./dist/modules/medias/index.js",
20+
"./helpers": "./dist/helpers/index.js",
21+
"./helpers/*": "./dist/helpers/*.js",
2022
"./package.json": "./package.json"
2123
},
2224
"files": [
@@ -26,11 +28,9 @@
2628
"build": "tsc -p tsconfig.json",
2729
"dev": "tsc -p tsconfig.json -w"
2830
},
29-
"author": "",
30-
"license": "MIT",
3131
"devDependencies": {
32-
"tslib": "^2.4.0",
33-
"typescript": "^4.8.2"
32+
"tslib": "^2.6.0",
33+
"typescript": "^5.1.5"
3434
},
3535
"dependencies": {
3636
"@blockshake/defly-connect": "^1.1.5",
@@ -46,7 +46,7 @@
4646
"dexie": "^3.2.4",
4747
"fake-indexeddb": "^4.0.1",
4848
"kebabcase-keys": "^1.0.0",
49-
"lodash": "^4.17.21",
49+
"lodash-es": "^4.17.21",
5050
"multiformats": "^12.0.1",
5151
"object-hash": "^3.0.0",
5252
"p-ratelimit": "^1.0.1"

src/enums.ts

+14-12
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
export * from './modules/txns/enums.js';
22

33
/**
4-
* Asset categories
5-
* ==================================================
6-
*/
4+
* Asset categories
5+
* ==================================================
6+
*/
77
export enum AssetCategory {
88
NFT = 'nft',
99
TOKEN = 'token',
1010
}
1111

12+
1213
/**
13-
* Arcs standards
14-
* ==================================================
15-
*/
14+
* Arcs standards
15+
* ==================================================
16+
*/
1617
export enum Arc {
1718
ARC3 = 'ARC3',
1819
ARC19 = 'ARC19',
@@ -21,9 +22,9 @@ export enum Arc {
2122
}
2223

2324
/**
24-
* Note encoding
25-
* ==================================================
26-
*/
25+
* Note encoding
26+
* ==================================================
27+
*/
2728
export enum Encoding {
2829
NONE = 'none',
2930
TEXT = 'text',
@@ -36,6 +37,7 @@ export enum Encoding {
3637
ADDRESS = 'address',
3738
}
3839

40+
3941
/**
4042
* Media types
4143
* ==================================================
@@ -52,9 +54,9 @@ export enum MediaType {
5254

5355

5456
/**
55-
* Available addons
56-
* ==================================================
57-
*/
57+
* Available addons
58+
* ==================================================
59+
*/
5860
export enum Addon {
5961
NFDS = 'nfds',
6062
ICON = 'icon',

src/helpers/strings.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import escapeRegExp from 'lodash/escapeRegExp.js';
1+
import escapeRegExp from 'lodash-es/escapeRegExp.js';
22

33

44

src/index.ts

+6-7
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
1-
import type { Configs } from './utils/options.js';
1+
import type { Configs } from './utils/configs.js';
2+
import type { PlugableModules } from './types.js';
3+
import type { LookupMethods, SearchMethods } from './modules/query/index.js';
24
import type Client from './modules/client/index.js';
35
import type Txns from './modules/txns/index.js';
46
import type NFDs from './modules/nfds/index.js';
57
import type Cache from './modules/cache/index.js';
68
import type Query from './modules/query/index.js';
79
import type Medias from './modules/medias/index.js';
810
import type Files from './modules/files/index.js';
9-
import type { LookupMethods, SearchMethods } from './modules/query/index.js';
10-
import type { PlugableModules } from './types.js';
11-
import merge from 'lodash/merge.js';
12-
import defaultConfigs from './utils/options.js';
13-
14-
export * from './types.js';
11+
import merge from 'lodash-es/merge.js';
12+
import defaultConfigs from './utils/configs.js';
1513
export * from './enums.js';
14+
export * from './types.js';
1615

1716
export default class AlgoStack {
1817
// Utils

src/modules/_baseModule.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
import AlgoStack from "../index.js";
2-
import { ModuleOptions } from "../types.js";
32

43

54
export class BaseModule {
6-
public options: ModuleOptions;
5+
public options: Record<string,any>;
76
protected stack: AlgoStack;
87

98
public init(stack: AlgoStack) {

src/modules/cache/cache.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { makeStrRegExpSafe } from '../../helpers/strings.js';
66
import Dexie, { DexieError } from 'dexie';
77
import objHash from 'object-hash';
88
import AlgoStack from '../../index.js';
9-
import merge from 'lodash/merge.js';
9+
import merge from 'lodash-es/merge.js';
1010

1111

1212
/**

src/modules/client/client.ts

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
import type { ConnectionSettings } from '@randlabs/myalgo-connect';
22
import { Connector } from '../../enums.js';
3-
import AlgoStack from '../../index.js';
3+
import { BaseModule } from '../_baseModule.js';
4+
import { ClientConfigs } from './types.js';
45
import Storage from '../../utils/storage.js';
56
import MyAlgo from '../../connectors/myalgo.js';
67
import Pera from '../../connectors/pera.js';
78
import Defly from '../../connectors/defly.js';
89
import Mnemonic from '../../connectors/mnemonic.js';
9-
import { BaseModule } from '../_baseModule.js';
10-
import { ClientConfigs } from './types.js';
11-
import merge from 'lodash/merge.js';
10+
import merge from 'lodash-es/merge.js';
1211

1312

1413
/**

src/modules/files/files.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { getFileType, getIpfsCid } from '../../helpers/files.js';
44
import { isIpfsProtocol, isUrl } from '../../helpers/strings.js';
55
import { BaseModule } from '../_baseModule.js';
66
import { File, FilesConfigs } from './types.js';
7-
import merge from 'lodash/merge.js';
7+
import merge from 'lodash-es/merge.js';
88

99

1010
/**

src/modules/medias/medias.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { AssetFiles, MediasConfigs } from './types.js';
77
import { BaseModule } from '../_baseModule.js';
88
import AlgoStack from '../../index.js';
99
import Files from '../files/index.js';
10-
import merge from 'lodash/merge.js';
10+
import merge from 'lodash-es/merge.js';
1111

1212

1313
/**

src/modules/nfds/nfds.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import axios from 'axios';
2-
import throttle from 'lodash/throttle.js';
3-
import chunk from 'lodash/chunk.js';
2+
import throttle from 'lodash-es/throttle.js';
3+
import chunk from 'lodash-es/chunk.js';
44
import AlgoStack from '../../index.js';
55
import type Cache from '../cache/index.js';
66
import { NFDConfigs, NFDProps, NFDQueryCallback } from './types.js';
77
import { isAddress } from '../../helpers/strings.js';
88
import { QueryParams } from '../query/types.js';
99
import { BaseModule } from '../_baseModule.js';
10-
import merge from 'lodash/merge.js';
10+
import merge from 'lodash-es/merge.js';
1111

1212

1313
/**

src/modules/txns/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
export { Transaction } from 'algosdk';
12
export { default } from './txns.js';
23
export * from './types.js';
34
export * from './enums.js';

0 commit comments

Comments
 (0)