@arcblock/did-util 1.31.0 → 1.31.2
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/cbor.d.mts +2 -2
- package/esm/cbor.mjs +2 -2
- package/esm/index.d.mts +2 -2
- package/esm/index.mjs +2 -2
- package/esm/protobuf.d.mts +2 -2
- package/esm/protobuf.mjs +2 -2
- package/esm/shared.d.mts +7 -1
- package/esm/shared.mjs +11 -1
- package/lib/cbor.cjs +1 -0
- package/lib/cbor.d.cts +2 -2
- package/lib/index.cjs +1 -0
- package/lib/index.d.cts +2 -2
- package/lib/protobuf.cjs +1 -0
- package/lib/protobuf.d.cts +2 -2
- package/lib/shared.cjs +11 -0
- package/lib/shared.d.cts +7 -1
- package/package.json +8 -8
package/esm/cbor.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { toDelegateAddress, toStakeAddress, toTokenCharterAssetAddress } from "./shared.mjs";
|
|
1
|
+
import { toBridgeReserveAddress, toDelegateAddress, toStakeAddress, toTokenCharterAssetAddress } from "./shared.mjs";
|
|
2
2
|
import { TCreateAssetTx, TCreateFactoryTx, TCreateRollupTx, TCreateTokenFactoryTx, TCreateTokenTx } from "@ocap/types";
|
|
3
3
|
|
|
4
4
|
//#region src/cbor.d.ts
|
|
@@ -9,4 +9,4 @@ declare const toTokenAddress: (itx: Partial<TCreateTokenTx>) => string;
|
|
|
9
9
|
declare const toTokenFactoryAddress: (itx: Partial<TCreateTokenFactoryTx>) => string;
|
|
10
10
|
declare const toRollupAddress: (itx: Partial<TCreateRollupTx>) => string;
|
|
11
11
|
//#endregion
|
|
12
|
-
export { toAssetAddress, toDelegateAddress, toFactoryAddress, toItxAddress, toRollupAddress, toStakeAddress, toTokenAddress, toTokenCharterAssetAddress, toTokenFactoryAddress };
|
|
12
|
+
export { toAssetAddress, toBridgeReserveAddress, toDelegateAddress, toFactoryAddress, toItxAddress, toRollupAddress, toStakeAddress, toTokenAddress, toTokenCharterAssetAddress, toTokenFactoryAddress };
|
package/esm/cbor.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { makeCurriedAddress, toDelegateAddress, toStakeAddress, toTokenCharterAssetAddress } from "./shared.mjs";
|
|
1
|
+
import { makeCurriedAddress, toBridgeReserveAddress, toDelegateAddress, toStakeAddress, toTokenCharterAssetAddress } from "./shared.mjs";
|
|
2
2
|
import { fromHash } from "@arcblock/did";
|
|
3
3
|
import { Hasher, types } from "@ocap/mcrypto";
|
|
4
4
|
import { canonicalBytes } from "@ocap/message/cbor";
|
|
@@ -33,4 +33,4 @@ const toTokenFactoryAddress = curriedAddress("CreateTokenFactoryTx", types.RoleT
|
|
|
33
33
|
const toRollupAddress = curriedAddress("CreateRollupTx", types.RoleType.ROLE_ROLLUP);
|
|
34
34
|
|
|
35
35
|
//#endregion
|
|
36
|
-
export { toAssetAddress, toDelegateAddress, toFactoryAddress, toItxAddress, toRollupAddress, toStakeAddress, toTokenAddress, toTokenCharterAssetAddress, toTokenFactoryAddress };
|
|
36
|
+
export { toAssetAddress, toBridgeReserveAddress, toDelegateAddress, toFactoryAddress, toItxAddress, toRollupAddress, toStakeAddress, toTokenAddress, toTokenCharterAssetAddress, toTokenFactoryAddress };
|
package/esm/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { toDelegateAddress, toStakeAddress, toTokenCharterAssetAddress } from "./shared.mjs";
|
|
1
|
+
import { toBridgeReserveAddress, toDelegateAddress, toStakeAddress, toTokenCharterAssetAddress } from "./shared.mjs";
|
|
2
2
|
import { TCreateAssetTx, TCreateFactoryTx, TCreateRollupTx, TCreateTokenFactoryTx, TCreateTokenTx } from "@ocap/types";
|
|
3
3
|
|
|
4
4
|
//#region src/index.d.ts
|
|
@@ -20,4 +20,4 @@ declare const toTokenAddress: (itx: Partial<TCreateTokenTx>, encoding: ItxEncodi
|
|
|
20
20
|
declare const toTokenFactoryAddress: (itx: Partial<TCreateTokenFactoryTx>, encoding: ItxEncoding) => string;
|
|
21
21
|
declare const toRollupAddress: (itx: Partial<TCreateRollupTx>, encoding: ItxEncoding) => string;
|
|
22
22
|
//#endregion
|
|
23
|
-
export { ItxEncoding, toAssetAddress, toDelegateAddress, toFactoryAddress, toItxAddress, toRollupAddress, toStakeAddress, toTokenAddress, toTokenCharterAssetAddress, toTokenFactoryAddress };
|
|
23
|
+
export { ItxEncoding, toAssetAddress, toBridgeReserveAddress, toDelegateAddress, toFactoryAddress, toItxAddress, toRollupAddress, toStakeAddress, toTokenAddress, toTokenCharterAssetAddress, toTokenFactoryAddress };
|
package/esm/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { toDelegateAddress, toStakeAddress, toTokenCharterAssetAddress } from "./shared.mjs";
|
|
1
|
+
import { toBridgeReserveAddress, toDelegateAddress, toStakeAddress, toTokenCharterAssetAddress } from "./shared.mjs";
|
|
2
2
|
import { toItxAddress as toItxAddress$1 } from "./cbor.mjs";
|
|
3
3
|
import { toItxAddress as toItxAddress$2 } from "./protobuf.mjs";
|
|
4
4
|
import { types } from "@ocap/mcrypto";
|
|
@@ -37,4 +37,4 @@ const toTokenFactoryAddress = curriedAddress("CreateTokenFactoryTx", types.RoleT
|
|
|
37
37
|
const toRollupAddress = curriedAddress("CreateRollupTx", types.RoleType.ROLE_ROLLUP);
|
|
38
38
|
|
|
39
39
|
//#endregion
|
|
40
|
-
export { toAssetAddress, toDelegateAddress, toFactoryAddress, toItxAddress, toRollupAddress, toStakeAddress, toTokenAddress, toTokenCharterAssetAddress, toTokenFactoryAddress };
|
|
40
|
+
export { toAssetAddress, toBridgeReserveAddress, toDelegateAddress, toFactoryAddress, toItxAddress, toRollupAddress, toStakeAddress, toTokenAddress, toTokenCharterAssetAddress, toTokenFactoryAddress };
|
package/esm/protobuf.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { toDelegateAddress, toStakeAddress, toTokenCharterAssetAddress } from "./shared.mjs";
|
|
1
|
+
import { toBridgeReserveAddress, toDelegateAddress, toStakeAddress, toTokenCharterAssetAddress } from "./shared.mjs";
|
|
2
2
|
import { TCreateAssetTx, TCreateFactoryTx, TCreateRollupTx, TCreateTokenFactoryTx, TCreateTokenTx } from "@ocap/types";
|
|
3
3
|
|
|
4
4
|
//#region src/protobuf.d.ts
|
|
@@ -9,4 +9,4 @@ declare const toTokenAddress: (itx: Partial<TCreateTokenTx>) => string;
|
|
|
9
9
|
declare const toTokenFactoryAddress: (itx: Partial<TCreateTokenFactoryTx>) => string;
|
|
10
10
|
declare const toRollupAddress: (itx: Partial<TCreateRollupTx>) => string;
|
|
11
11
|
//#endregion
|
|
12
|
-
export { toAssetAddress, toDelegateAddress, toFactoryAddress, toItxAddress, toRollupAddress, toStakeAddress, toTokenAddress, toTokenCharterAssetAddress, toTokenFactoryAddress };
|
|
12
|
+
export { toAssetAddress, toBridgeReserveAddress, toDelegateAddress, toFactoryAddress, toItxAddress, toRollupAddress, toStakeAddress, toTokenAddress, toTokenCharterAssetAddress, toTokenFactoryAddress };
|
package/esm/protobuf.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { makeCurriedAddress, toDelegateAddress, toStakeAddress, toTokenCharterAssetAddress } from "./shared.mjs";
|
|
1
|
+
import { makeCurriedAddress, toBridgeReserveAddress, toDelegateAddress, toStakeAddress, toTokenCharterAssetAddress } from "./shared.mjs";
|
|
2
2
|
import { fromHash } from "@arcblock/did";
|
|
3
3
|
import { Hasher, types } from "@ocap/mcrypto";
|
|
4
4
|
import { createMessage } from "@ocap/message";
|
|
@@ -25,4 +25,4 @@ const toTokenFactoryAddress = curriedAddress("CreateTokenFactoryTx", types.RoleT
|
|
|
25
25
|
const toRollupAddress = curriedAddress("CreateRollupTx", types.RoleType.ROLE_ROLLUP);
|
|
26
26
|
|
|
27
27
|
//#endregion
|
|
28
|
-
export { toAssetAddress, toDelegateAddress, toFactoryAddress, toItxAddress, toRollupAddress, toStakeAddress, toTokenAddress, toTokenCharterAssetAddress, toTokenFactoryAddress };
|
|
28
|
+
export { toAssetAddress, toBridgeReserveAddress, toDelegateAddress, toFactoryAddress, toItxAddress, toRollupAddress, toStakeAddress, toTokenAddress, toTokenCharterAssetAddress, toTokenFactoryAddress };
|
package/esm/shared.d.mts
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
type ToItxAddressFn = (itx: Record<string, unknown>, type: string, role: number) => string;
|
|
3
3
|
declare function makeCurriedAddress(toItxAddress: ToItxAddressFn): (type: string, role: number) => (itx: Record<string, unknown>) => string;
|
|
4
4
|
declare function toStakeAddress(sender: string, receiver: string, nonce?: string): string;
|
|
5
|
+
/**
|
|
6
|
+
* Keyless reserve address of an on-chain bridge (`ROLE_BRIDGE_RESERVE`, bridge/docs/ocap-protocols.md §v2.3).
|
|
7
|
+
* Anyone can craft an address of this role without a preimage, so callers must also check the `reserve -> bridge`
|
|
8
|
+
* index; this function only answers "which address belongs to this bridge".
|
|
9
|
+
*/
|
|
10
|
+
declare function toBridgeReserveAddress(bridge: string): string;
|
|
5
11
|
declare function toDelegateAddress(delegator: string, delegatee: string): string;
|
|
6
12
|
/**
|
|
7
13
|
* Deterministically derive the companion Master Charter NFT address (`ROLE_ASSET`)
|
|
@@ -9,4 +15,4 @@ declare function toDelegateAddress(delegator: string, delegatee: string): string
|
|
|
9
15
|
*/
|
|
10
16
|
declare function toTokenCharterAssetAddress(tokenAddress: string): string;
|
|
11
17
|
//#endregion
|
|
12
|
-
export { ToItxAddressFn, makeCurriedAddress, toDelegateAddress, toStakeAddress, toTokenCharterAssetAddress };
|
|
18
|
+
export { ToItxAddressFn, makeCurriedAddress, toBridgeReserveAddress, toDelegateAddress, toStakeAddress, toTokenCharterAssetAddress };
|
package/esm/shared.mjs
CHANGED
|
@@ -26,6 +26,16 @@ function toStakeAddress(sender, receiver, nonce) {
|
|
|
26
26
|
].filter((x) => Boolean(x)).map((x) => Uint8Array.from(Buffer.from(x))));
|
|
27
27
|
return fromHash(Hasher.SHA3.hash256(buffer), types.RoleType.ROLE_STAKE);
|
|
28
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* Keyless reserve address of an on-chain bridge (`ROLE_BRIDGE_RESERVE`, bridge/docs/ocap-protocols.md §v2.3).
|
|
31
|
+
* Anyone can craft an address of this role without a preimage, so callers must also check the `reserve -> bridge`
|
|
32
|
+
* index; this function only answers "which address belongs to this bridge".
|
|
33
|
+
*/
|
|
34
|
+
function toBridgeReserveAddress(bridge) {
|
|
35
|
+
if (typeof bridge !== "string" || !bridge.trim()) throw new Error("bridge must be a non-empty string");
|
|
36
|
+
const buffer = Uint8Array.from(Buffer.from(`bridge-reserve:${toAddress(bridge.trim())}`));
|
|
37
|
+
return fromHash(Hasher.SHA3.hash256(buffer), types.RoleType.ROLE_BRIDGE_RESERVE);
|
|
38
|
+
}
|
|
29
39
|
function toDelegateAddress(delegator, delegatee) {
|
|
30
40
|
if (typeof delegator !== "string" || typeof delegatee !== "string") throw new Error("delegator and delegatee must be strings");
|
|
31
41
|
const buffer = Buffer.concat([Uint8Array.from(Buffer.from(delegator)), Uint8Array.from(Buffer.from(delegatee))]);
|
|
@@ -43,4 +53,4 @@ function toTokenCharterAssetAddress(tokenAddress) {
|
|
|
43
53
|
}
|
|
44
54
|
|
|
45
55
|
//#endregion
|
|
46
|
-
export { makeCurriedAddress, toDelegateAddress, toStakeAddress, toTokenCharterAssetAddress };
|
|
56
|
+
export { makeCurriedAddress, toBridgeReserveAddress, toDelegateAddress, toStakeAddress, toTokenCharterAssetAddress };
|
package/lib/cbor.cjs
CHANGED
|
@@ -34,6 +34,7 @@ const toRollupAddress = curriedAddress("CreateRollupTx", _ocap_mcrypto.types.Rol
|
|
|
34
34
|
|
|
35
35
|
//#endregion
|
|
36
36
|
exports.toAssetAddress = toAssetAddress;
|
|
37
|
+
exports.toBridgeReserveAddress = require_shared.toBridgeReserveAddress;
|
|
37
38
|
exports.toDelegateAddress = require_shared.toDelegateAddress;
|
|
38
39
|
exports.toFactoryAddress = toFactoryAddress;
|
|
39
40
|
exports.toItxAddress = toItxAddress;
|
package/lib/cbor.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { toDelegateAddress, toStakeAddress, toTokenCharterAssetAddress } from "./shared.cjs";
|
|
1
|
+
import { toBridgeReserveAddress, toDelegateAddress, toStakeAddress, toTokenCharterAssetAddress } from "./shared.cjs";
|
|
2
2
|
import { TCreateAssetTx, TCreateFactoryTx, TCreateRollupTx, TCreateTokenFactoryTx, TCreateTokenTx } from "@ocap/types";
|
|
3
3
|
|
|
4
4
|
//#region src/cbor.d.ts
|
|
@@ -9,4 +9,4 @@ declare const toTokenAddress: (itx: Partial<TCreateTokenTx>) => string;
|
|
|
9
9
|
declare const toTokenFactoryAddress: (itx: Partial<TCreateTokenFactoryTx>) => string;
|
|
10
10
|
declare const toRollupAddress: (itx: Partial<TCreateRollupTx>) => string;
|
|
11
11
|
//#endregion
|
|
12
|
-
export { toAssetAddress, toDelegateAddress, toFactoryAddress, toItxAddress, toRollupAddress, toStakeAddress, toTokenAddress, toTokenCharterAssetAddress, toTokenFactoryAddress };
|
|
12
|
+
export { toAssetAddress, toBridgeReserveAddress, toDelegateAddress, toFactoryAddress, toItxAddress, toRollupAddress, toStakeAddress, toTokenAddress, toTokenCharterAssetAddress, toTokenFactoryAddress };
|
package/lib/index.cjs
CHANGED
|
@@ -38,6 +38,7 @@ const toRollupAddress = curriedAddress("CreateRollupTx", _ocap_mcrypto.types.Rol
|
|
|
38
38
|
|
|
39
39
|
//#endregion
|
|
40
40
|
exports.toAssetAddress = toAssetAddress;
|
|
41
|
+
exports.toBridgeReserveAddress = require_shared.toBridgeReserveAddress;
|
|
41
42
|
exports.toDelegateAddress = require_shared.toDelegateAddress;
|
|
42
43
|
exports.toFactoryAddress = toFactoryAddress;
|
|
43
44
|
exports.toItxAddress = toItxAddress;
|
package/lib/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { toDelegateAddress, toStakeAddress, toTokenCharterAssetAddress } from "./shared.cjs";
|
|
1
|
+
import { toBridgeReserveAddress, toDelegateAddress, toStakeAddress, toTokenCharterAssetAddress } from "./shared.cjs";
|
|
2
2
|
import { TCreateAssetTx, TCreateFactoryTx, TCreateRollupTx, TCreateTokenFactoryTx, TCreateTokenTx } from "@ocap/types";
|
|
3
3
|
|
|
4
4
|
//#region src/index.d.ts
|
|
@@ -20,4 +20,4 @@ declare const toTokenAddress: (itx: Partial<TCreateTokenTx>, encoding: ItxEncodi
|
|
|
20
20
|
declare const toTokenFactoryAddress: (itx: Partial<TCreateTokenFactoryTx>, encoding: ItxEncoding) => string;
|
|
21
21
|
declare const toRollupAddress: (itx: Partial<TCreateRollupTx>, encoding: ItxEncoding) => string;
|
|
22
22
|
//#endregion
|
|
23
|
-
export { ItxEncoding, toAssetAddress, toDelegateAddress, toFactoryAddress, toItxAddress, toRollupAddress, toStakeAddress, toTokenAddress, toTokenCharterAssetAddress, toTokenFactoryAddress };
|
|
23
|
+
export { ItxEncoding, toAssetAddress, toBridgeReserveAddress, toDelegateAddress, toFactoryAddress, toItxAddress, toRollupAddress, toStakeAddress, toTokenAddress, toTokenCharterAssetAddress, toTokenFactoryAddress };
|
package/lib/protobuf.cjs
CHANGED
|
@@ -26,6 +26,7 @@ const toRollupAddress = curriedAddress("CreateRollupTx", _ocap_mcrypto.types.Rol
|
|
|
26
26
|
|
|
27
27
|
//#endregion
|
|
28
28
|
exports.toAssetAddress = toAssetAddress;
|
|
29
|
+
exports.toBridgeReserveAddress = require_shared.toBridgeReserveAddress;
|
|
29
30
|
exports.toDelegateAddress = require_shared.toDelegateAddress;
|
|
30
31
|
exports.toFactoryAddress = toFactoryAddress;
|
|
31
32
|
exports.toItxAddress = toItxAddress;
|
package/lib/protobuf.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { toDelegateAddress, toStakeAddress, toTokenCharterAssetAddress } from "./shared.cjs";
|
|
1
|
+
import { toBridgeReserveAddress, toDelegateAddress, toStakeAddress, toTokenCharterAssetAddress } from "./shared.cjs";
|
|
2
2
|
import { TCreateAssetTx, TCreateFactoryTx, TCreateRollupTx, TCreateTokenFactoryTx, TCreateTokenTx } from "@ocap/types";
|
|
3
3
|
|
|
4
4
|
//#region src/protobuf.d.ts
|
|
@@ -9,4 +9,4 @@ declare const toTokenAddress: (itx: Partial<TCreateTokenTx>) => string;
|
|
|
9
9
|
declare const toTokenFactoryAddress: (itx: Partial<TCreateTokenFactoryTx>) => string;
|
|
10
10
|
declare const toRollupAddress: (itx: Partial<TCreateRollupTx>) => string;
|
|
11
11
|
//#endregion
|
|
12
|
-
export { toAssetAddress, toDelegateAddress, toFactoryAddress, toItxAddress, toRollupAddress, toStakeAddress, toTokenAddress, toTokenCharterAssetAddress, toTokenFactoryAddress };
|
|
12
|
+
export { toAssetAddress, toBridgeReserveAddress, toDelegateAddress, toFactoryAddress, toItxAddress, toRollupAddress, toStakeAddress, toTokenAddress, toTokenCharterAssetAddress, toTokenFactoryAddress };
|
package/lib/shared.cjs
CHANGED
|
@@ -26,6 +26,16 @@ function toStakeAddress(sender, receiver, nonce) {
|
|
|
26
26
|
].filter((x) => Boolean(x)).map((x) => Uint8Array.from(Buffer.from(x))));
|
|
27
27
|
return (0, _arcblock_did.fromHash)(_ocap_mcrypto.Hasher.SHA3.hash256(buffer), _ocap_mcrypto.types.RoleType.ROLE_STAKE);
|
|
28
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* Keyless reserve address of an on-chain bridge (`ROLE_BRIDGE_RESERVE`, bridge/docs/ocap-protocols.md §v2.3).
|
|
31
|
+
* Anyone can craft an address of this role without a preimage, so callers must also check the `reserve -> bridge`
|
|
32
|
+
* index; this function only answers "which address belongs to this bridge".
|
|
33
|
+
*/
|
|
34
|
+
function toBridgeReserveAddress(bridge) {
|
|
35
|
+
if (typeof bridge !== "string" || !bridge.trim()) throw new Error("bridge must be a non-empty string");
|
|
36
|
+
const buffer = Uint8Array.from(Buffer.from(`bridge-reserve:${(0, _ocap_util.toAddress)(bridge.trim())}`));
|
|
37
|
+
return (0, _arcblock_did.fromHash)(_ocap_mcrypto.Hasher.SHA3.hash256(buffer), _ocap_mcrypto.types.RoleType.ROLE_BRIDGE_RESERVE);
|
|
38
|
+
}
|
|
29
39
|
function toDelegateAddress(delegator, delegatee) {
|
|
30
40
|
if (typeof delegator !== "string" || typeof delegatee !== "string") throw new Error("delegator and delegatee must be strings");
|
|
31
41
|
const buffer = Buffer.concat([Uint8Array.from(Buffer.from(delegator)), Uint8Array.from(Buffer.from(delegatee))]);
|
|
@@ -44,6 +54,7 @@ function toTokenCharterAssetAddress(tokenAddress) {
|
|
|
44
54
|
|
|
45
55
|
//#endregion
|
|
46
56
|
exports.makeCurriedAddress = makeCurriedAddress;
|
|
57
|
+
exports.toBridgeReserveAddress = toBridgeReserveAddress;
|
|
47
58
|
exports.toDelegateAddress = toDelegateAddress;
|
|
48
59
|
exports.toStakeAddress = toStakeAddress;
|
|
49
60
|
exports.toTokenCharterAssetAddress = toTokenCharterAssetAddress;
|
package/lib/shared.d.cts
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
type ToItxAddressFn = (itx: Record<string, unknown>, type: string, role: number) => string;
|
|
3
3
|
declare function makeCurriedAddress(toItxAddress: ToItxAddressFn): (type: string, role: number) => (itx: Record<string, unknown>) => string;
|
|
4
4
|
declare function toStakeAddress(sender: string, receiver: string, nonce?: string): string;
|
|
5
|
+
/**
|
|
6
|
+
* Keyless reserve address of an on-chain bridge (`ROLE_BRIDGE_RESERVE`, bridge/docs/ocap-protocols.md §v2.3).
|
|
7
|
+
* Anyone can craft an address of this role without a preimage, so callers must also check the `reserve -> bridge`
|
|
8
|
+
* index; this function only answers "which address belongs to this bridge".
|
|
9
|
+
*/
|
|
10
|
+
declare function toBridgeReserveAddress(bridge: string): string;
|
|
5
11
|
declare function toDelegateAddress(delegator: string, delegatee: string): string;
|
|
6
12
|
/**
|
|
7
13
|
* Deterministically derive the companion Master Charter NFT address (`ROLE_ASSET`)
|
|
@@ -9,4 +15,4 @@ declare function toDelegateAddress(delegator: string, delegatee: string): string
|
|
|
9
15
|
*/
|
|
10
16
|
declare function toTokenCharterAssetAddress(tokenAddress: string): string;
|
|
11
17
|
//#endregion
|
|
12
|
-
export { ToItxAddressFn, makeCurriedAddress, toDelegateAddress, toStakeAddress, toTokenCharterAssetAddress };
|
|
18
|
+
export { ToItxAddressFn, makeCurriedAddress, toBridgeReserveAddress, toDelegateAddress, toStakeAddress, toTokenCharterAssetAddress };
|
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.31.
|
|
4
|
+
"version": "1.31.2",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "wangshijun",
|
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
"wangshijun <shijun@arcblock.io> (https://github.com/wangshijun)"
|
|
20
20
|
],
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@arcblock/did": "1.31.
|
|
23
|
-
"@ocap/mcrypto": "1.31.
|
|
24
|
-
"@ocap/message": "1.31.
|
|
25
|
-
"@ocap/proto": "1.31.
|
|
26
|
-
"@ocap/types": "1.31.
|
|
27
|
-
"@ocap/util": "1.31.
|
|
28
|
-
"@ocap/wallet": "1.31.
|
|
22
|
+
"@arcblock/did": "1.31.2",
|
|
23
|
+
"@ocap/mcrypto": "1.31.2",
|
|
24
|
+
"@ocap/message": "1.31.2",
|
|
25
|
+
"@ocap/proto": "1.31.2",
|
|
26
|
+
"@ocap/types": "1.31.2",
|
|
27
|
+
"@ocap/util": "1.31.2",
|
|
28
|
+
"@ocap/wallet": "1.31.2"
|
|
29
29
|
},
|
|
30
30
|
"sideEffects": false,
|
|
31
31
|
"main": "./lib/index.cjs",
|