@permaweb/libs 0.0.21 → 0.0.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +8 -8
- package/dist/index.cjs.map +3 -3
- package/dist/index.esm.js +3 -3
- package/dist/index.esm.js.map +3 -3
- package/dist/index.js +8 -8
- package/dist/index.js.map +3 -3
- package/dist/types/helpers/types.d.ts +22 -29
- package/dist/types/index.d.ts +3 -18
- package/dist/types/services/assets.d.ts +4 -3
- package/dist/types/services/comments.d.ts +4 -19
- package/package.json +1 -1
|
@@ -70,17 +70,15 @@ export type ProfileType = {
|
|
|
70
70
|
export type AssetCreateArgsType = {
|
|
71
71
|
name: string;
|
|
72
72
|
description: string;
|
|
73
|
-
type: string;
|
|
74
73
|
topics: string[];
|
|
75
|
-
contentType: string;
|
|
76
|
-
data: any;
|
|
77
74
|
creator: string;
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
75
|
+
data: any;
|
|
76
|
+
contentType: string;
|
|
77
|
+
assetType: string;
|
|
81
78
|
supply?: number;
|
|
82
79
|
denomination?: number;
|
|
83
80
|
transferable?: boolean;
|
|
81
|
+
metadata?: object;
|
|
84
82
|
tags?: TagType[];
|
|
85
83
|
src?: string;
|
|
86
84
|
};
|
|
@@ -102,35 +100,30 @@ export type AssetHeaderType = {
|
|
|
102
100
|
blockHeight: number | null;
|
|
103
101
|
tags?: TagType[];
|
|
104
102
|
};
|
|
105
|
-
export type
|
|
106
|
-
|
|
107
|
-
denomination: string | null;
|
|
108
|
-
balances: {
|
|
109
|
-
[key: string]: string;
|
|
110
|
-
} | null;
|
|
111
|
-
transferable: boolean | null;
|
|
112
|
-
};
|
|
113
|
-
export type AoAssetType = {
|
|
103
|
+
export type AssetDetailType = {
|
|
104
|
+
name: string;
|
|
114
105
|
ticker: string;
|
|
115
106
|
denomination: string;
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
};
|
|
119
|
-
transferable: boolean;
|
|
120
|
-
name: string;
|
|
107
|
+
totalSupply: string;
|
|
108
|
+
transferable: string;
|
|
121
109
|
creator: string;
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
110
|
+
balances: object;
|
|
111
|
+
metadata: object;
|
|
112
|
+
dateCreated: string;
|
|
113
|
+
lastUpdate: string;
|
|
114
|
+
tags?: TagType[];
|
|
115
|
+
};
|
|
116
|
+
export type CommentHeaderType = {
|
|
117
|
+
id: string;
|
|
118
|
+
content: string;
|
|
119
|
+
parentId: string;
|
|
120
|
+
rootId: string;
|
|
125
121
|
};
|
|
126
|
-
export type
|
|
127
|
-
export type CommentHeaderType = AssetHeaderType & {
|
|
122
|
+
export type CommentDetailType = {
|
|
128
123
|
content: string;
|
|
129
|
-
|
|
130
|
-
|
|
124
|
+
parentId: string;
|
|
125
|
+
rootId: string;
|
|
131
126
|
};
|
|
132
|
-
export type CommentStateType = AssetStateType;
|
|
133
|
-
export type CommentDetailType = CommentHeaderType & CommentStateType;
|
|
134
127
|
export type CommentCreateArgType = {
|
|
135
128
|
content: string;
|
|
136
129
|
creator: string;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -24,25 +24,10 @@ declare function init(deps: Helpers.DependencyType): {
|
|
|
24
24
|
parentId?: string;
|
|
25
25
|
rootId?: string;
|
|
26
26
|
}) => Promise<{
|
|
27
|
-
content: string;
|
|
28
|
-
dataSource: string;
|
|
29
|
-
rootSource: string;
|
|
30
27
|
id: string;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
description: string | null;
|
|
35
|
-
type: string | null;
|
|
36
|
-
topics: string[] | null;
|
|
37
|
-
implementation: string | null;
|
|
38
|
-
contentType: string | null;
|
|
39
|
-
renderWith: string | null;
|
|
40
|
-
thumbnail: string | null;
|
|
41
|
-
udl: Helpers.UDLicenseType | null;
|
|
42
|
-
collectionId: string | null;
|
|
43
|
-
dateCreated: number | null;
|
|
44
|
-
blockHeight: number | null;
|
|
45
|
-
tags?: Helpers.TagType[];
|
|
28
|
+
content: string;
|
|
29
|
+
parentId: string;
|
|
30
|
+
rootId: string;
|
|
46
31
|
}[]>;
|
|
47
32
|
createCollection: (args: {
|
|
48
33
|
title: string;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AssetCreateArgsType, AssetDetailType, AssetHeaderType, DependencyType, GQLNodeResponseType } from 'helpers/types';
|
|
2
2
|
export declare function createAtomicAssetWith(deps: DependencyType): (args: AssetCreateArgsType, callback?: (status: any) => void) => Promise<string>;
|
|
3
|
-
export declare function getAtomicAsset(deps: DependencyType, id: string
|
|
3
|
+
export declare function getAtomicAsset(deps: DependencyType, id: string, args?: {
|
|
4
|
+
useGateway?: boolean;
|
|
5
|
+
}): Promise<AssetDetailType | null>;
|
|
4
6
|
export declare function getAtomicAssetWith(deps: DependencyType): (id: string) => Promise<AssetDetailType | null>;
|
|
5
|
-
export declare function getAoAtomicAssetWith(deps: DependencyType): (processId: string) => Promise<AoAssetType>;
|
|
6
7
|
export declare function getAtomicAssets(ids: string[]): Promise<AssetHeaderType[] | null>;
|
|
7
8
|
export declare function buildAsset(element: GQLNodeResponseType): AssetHeaderType;
|
|
@@ -1,27 +1,12 @@
|
|
|
1
|
-
import { CommentCreateArgType, CommentDetailType, DependencyType
|
|
1
|
+
import { CommentCreateArgType, CommentDetailType, DependencyType } from 'helpers/types';
|
|
2
2
|
export declare function createCommentWith(deps: DependencyType): (args: CommentCreateArgType, callback?: (status: any) => void) => Promise<string>;
|
|
3
3
|
export declare function getCommentWith(deps: DependencyType): (id: string) => Promise<CommentDetailType | null>;
|
|
4
4
|
export declare function getCommentsWith(_deps: DependencyType): (args: {
|
|
5
5
|
parentId?: string;
|
|
6
6
|
rootId?: string;
|
|
7
7
|
}) => Promise<{
|
|
8
|
-
content: string;
|
|
9
|
-
dataSource: string;
|
|
10
|
-
rootSource: string;
|
|
11
8
|
id: string;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
description: string | null;
|
|
16
|
-
type: string | null;
|
|
17
|
-
topics: string[] | null;
|
|
18
|
-
implementation: string | null;
|
|
19
|
-
contentType: string | null;
|
|
20
|
-
renderWith: string | null;
|
|
21
|
-
thumbnail: string | null;
|
|
22
|
-
udl: import("helpers/types").UDLicenseType | null;
|
|
23
|
-
collectionId: string | null;
|
|
24
|
-
dateCreated: number | null;
|
|
25
|
-
blockHeight: number | null;
|
|
26
|
-
tags?: TagType[];
|
|
9
|
+
content: string;
|
|
10
|
+
parentId: string;
|
|
11
|
+
rootId: string;
|
|
27
12
|
}[]>;
|