@arcblock/did-util 1.21.2 → 1.22.0
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/esm/index.d.ts +5 -1
- package/esm/index.js +6 -0
- package/lib/index.d.ts +5 -1
- package/lib/index.js +7 -0
- package/package.json +8 -8
package/esm/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TCreateAssetTx, TCreateFactoryTx, TCreateRollupTx, TCreateTokenTx } from '@ocap/types';
|
|
1
|
+
import { TCreateAssetTx, TCreateFactoryTx, TCreateRollupTx, TCreateTokenTx, CreateTokenFactoryTx } from '@ocap/types';
|
|
2
2
|
/**
|
|
3
3
|
* Create an itx address
|
|
4
4
|
*/
|
|
@@ -15,6 +15,10 @@ export declare function toFactoryAddress(itx: Partial<TCreateFactoryTx>): string
|
|
|
15
15
|
* Create an token address
|
|
16
16
|
*/
|
|
17
17
|
export declare function toTokenAddress(itx: Partial<TCreateTokenTx>): string;
|
|
18
|
+
/**
|
|
19
|
+
* Create a token factory address
|
|
20
|
+
*/
|
|
21
|
+
export declare function toTokenFactoryAddress(itx: Partial<CreateTokenFactoryTx>): string;
|
|
18
22
|
/**
|
|
19
23
|
* Create an rollup address
|
|
20
24
|
*/
|
package/esm/index.js
CHANGED
|
@@ -35,6 +35,12 @@ export function toFactoryAddress(itx) {
|
|
|
35
35
|
export function toTokenAddress(itx) {
|
|
36
36
|
return toItxAddress(itx, 'CreateTokenTx', types.RoleType.ROLE_TOKEN);
|
|
37
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* Create a token factory address
|
|
40
|
+
*/
|
|
41
|
+
export function toTokenFactoryAddress(itx) {
|
|
42
|
+
return toItxAddress(itx, 'CreateTokenFactoryTx', types.RoleType.ROLE_TOKEN_FACTORY);
|
|
43
|
+
}
|
|
38
44
|
/**
|
|
39
45
|
* Create an rollup address
|
|
40
46
|
*/
|
package/lib/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TCreateAssetTx, TCreateFactoryTx, TCreateRollupTx, TCreateTokenTx } from '@ocap/types';
|
|
1
|
+
import { TCreateAssetTx, TCreateFactoryTx, TCreateRollupTx, TCreateTokenTx, CreateTokenFactoryTx } from '@ocap/types';
|
|
2
2
|
/**
|
|
3
3
|
* Create an itx address
|
|
4
4
|
*/
|
|
@@ -15,6 +15,10 @@ export declare function toFactoryAddress(itx: Partial<TCreateFactoryTx>): string
|
|
|
15
15
|
* Create an token address
|
|
16
16
|
*/
|
|
17
17
|
export declare function toTokenAddress(itx: Partial<TCreateTokenTx>): string;
|
|
18
|
+
/**
|
|
19
|
+
* Create a token factory address
|
|
20
|
+
*/
|
|
21
|
+
export declare function toTokenFactoryAddress(itx: Partial<CreateTokenFactoryTx>): string;
|
|
18
22
|
/**
|
|
19
23
|
* Create an rollup address
|
|
20
24
|
*/
|
package/lib/index.js
CHANGED
|
@@ -4,6 +4,7 @@ exports.toItxAddress = toItxAddress;
|
|
|
4
4
|
exports.toAssetAddress = toAssetAddress;
|
|
5
5
|
exports.toFactoryAddress = toFactoryAddress;
|
|
6
6
|
exports.toTokenAddress = toTokenAddress;
|
|
7
|
+
exports.toTokenFactoryAddress = toTokenFactoryAddress;
|
|
7
8
|
exports.toRollupAddress = toRollupAddress;
|
|
8
9
|
exports.toStakeAddress = toStakeAddress;
|
|
9
10
|
exports.toDelegateAddress = toDelegateAddress;
|
|
@@ -44,6 +45,12 @@ function toFactoryAddress(itx) {
|
|
|
44
45
|
function toTokenAddress(itx) {
|
|
45
46
|
return toItxAddress(itx, 'CreateTokenTx', mcrypto_1.types.RoleType.ROLE_TOKEN);
|
|
46
47
|
}
|
|
48
|
+
/**
|
|
49
|
+
* Create a token factory address
|
|
50
|
+
*/
|
|
51
|
+
function toTokenFactoryAddress(itx) {
|
|
52
|
+
return toItxAddress(itx, 'CreateTokenFactoryTx', mcrypto_1.types.RoleType.ROLE_TOKEN_FACTORY);
|
|
53
|
+
}
|
|
47
54
|
/**
|
|
48
55
|
* Create an rollup address
|
|
49
56
|
*/
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcblock/did-util",
|
|
3
3
|
"description": "Helper function to calculate did",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.22.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "wangshijun",
|
|
7
7
|
"email": "shijun@arcblock.io",
|
|
@@ -18,13 +18,13 @@
|
|
|
18
18
|
"wangshijun <shijun@arcblock.io> (https://github.com/wangshijun)"
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@arcblock/did": "1.
|
|
22
|
-
"@ocap/
|
|
23
|
-
"@ocap/
|
|
24
|
-
"@ocap/
|
|
25
|
-
"@ocap/
|
|
26
|
-
"@ocap/
|
|
27
|
-
"@ocap/
|
|
21
|
+
"@arcblock/did": "1.22.0",
|
|
22
|
+
"@ocap/mcrypto": "1.22.0",
|
|
23
|
+
"@ocap/message": "1.22.0",
|
|
24
|
+
"@ocap/proto": "1.22.0",
|
|
25
|
+
"@ocap/types": "1.22.0",
|
|
26
|
+
"@ocap/util": "1.22.0",
|
|
27
|
+
"@ocap/wallet": "1.22.0"
|
|
28
28
|
},
|
|
29
29
|
"main": "./lib/index.js",
|
|
30
30
|
"types": "./lib/index.d.ts",
|