@ocap/mcrypto 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 CHANGED
@@ -2,7 +2,7 @@ import type { BytesType, EncodingType, KeyPairType } from '@ocap/util';
2
2
  import type { LiteralUnion } from 'type-fest';
3
3
  export type KeyType = LiteralUnion<'ED25519' | 'SECP256K1' | 'ETHEREUM', string>;
4
4
  export type HashType = LiteralUnion<'KECCAK' | 'SHA3' | 'KECCAK_384' | 'SHA3_384' | 'KECCAK_512' | 'SHA3_512' | 'SHA2', string>;
5
- export type RoleType = LiteralUnion<'ROLE_ACCOUNT' | 'ROLE_NODE' | 'ROLE_DEVICE' | 'ROLE_APPLICATION' | 'ROLE_SMART_CONTRACT' | 'ROLE_BOT' | 'ROLE_ASSET' | 'ROLE_STAKE' | 'ROLE_VALIDATOR' | 'ROLE_GROUP' | 'ROLE_GROUP' | 'ROLE_TX' | 'ROLE_TETHER' | 'ROLE_SWAP' | 'ROLE_DELEGATION' | 'ROLE_VC' | 'ROLE_BLOCKLET' | 'ROLE_STORE' | 'ROLE_TOKEN' | 'ROLE_FACTORY' | 'ROLE_ROLLUP' | 'ROLE_STORAGE' | 'ROLE_PROFILE' | 'ROLE_PASSKEY' | 'ROLE_ANY', string>;
5
+ export type RoleType = LiteralUnion<'ROLE_ACCOUNT' | 'ROLE_NODE' | 'ROLE_DEVICE' | 'ROLE_APPLICATION' | 'ROLE_SMART_CONTRACT' | 'ROLE_BOT' | 'ROLE_ASSET' | 'ROLE_STAKE' | 'ROLE_VALIDATOR' | 'ROLE_GROUP' | 'ROLE_GROUP' | 'ROLE_TX' | 'ROLE_TETHER' | 'ROLE_SWAP' | 'ROLE_DELEGATION' | 'ROLE_VC' | 'ROLE_BLOCKLET' | 'ROLE_STORE' | 'ROLE_TOKEN' | 'ROLE_FACTORY' | 'ROLE_ROLLUP' | 'ROLE_STORAGE' | 'ROLE_PROFILE' | 'ROLE_PASSKEY' | 'ROLE_TOKEN_FACTORY' | 'ROLE_ANY', string>;
6
6
  export type AddressType = LiteralUnion<'BASE16' | 'BASE58', string>;
7
7
  export interface HashFnType {
8
8
  (data: BytesType, round: number, encoding?: 'hex'): string;
@@ -159,6 +159,7 @@ export declare const types: {
159
159
  ROLE_STORAGE: number;
160
160
  ROLE_PROFILE: number;
161
161
  ROLE_PASSKEY: number;
162
+ ROLE_TOKEN_FACTORY: number;
162
163
  ROLE_ANY: number;
163
164
  };
164
165
  /**
package/esm/index.js CHANGED
@@ -131,6 +131,7 @@ export const types = {
131
131
  ROLE_STORAGE: 20,
132
132
  ROLE_PROFILE: 21,
133
133
  ROLE_PASSKEY: 22,
134
+ ROLE_TOKEN_FACTORY: 23,
134
135
  ROLE_ANY: 63,
135
136
  },
136
137
  /**
package/lib/index.d.ts CHANGED
@@ -2,7 +2,7 @@ import type { BytesType, EncodingType, KeyPairType } from '@ocap/util';
2
2
  import type { LiteralUnion } from 'type-fest';
3
3
  export type KeyType = LiteralUnion<'ED25519' | 'SECP256K1' | 'ETHEREUM', string>;
4
4
  export type HashType = LiteralUnion<'KECCAK' | 'SHA3' | 'KECCAK_384' | 'SHA3_384' | 'KECCAK_512' | 'SHA3_512' | 'SHA2', string>;
5
- export type RoleType = LiteralUnion<'ROLE_ACCOUNT' | 'ROLE_NODE' | 'ROLE_DEVICE' | 'ROLE_APPLICATION' | 'ROLE_SMART_CONTRACT' | 'ROLE_BOT' | 'ROLE_ASSET' | 'ROLE_STAKE' | 'ROLE_VALIDATOR' | 'ROLE_GROUP' | 'ROLE_GROUP' | 'ROLE_TX' | 'ROLE_TETHER' | 'ROLE_SWAP' | 'ROLE_DELEGATION' | 'ROLE_VC' | 'ROLE_BLOCKLET' | 'ROLE_STORE' | 'ROLE_TOKEN' | 'ROLE_FACTORY' | 'ROLE_ROLLUP' | 'ROLE_STORAGE' | 'ROLE_PROFILE' | 'ROLE_PASSKEY' | 'ROLE_ANY', string>;
5
+ export type RoleType = LiteralUnion<'ROLE_ACCOUNT' | 'ROLE_NODE' | 'ROLE_DEVICE' | 'ROLE_APPLICATION' | 'ROLE_SMART_CONTRACT' | 'ROLE_BOT' | 'ROLE_ASSET' | 'ROLE_STAKE' | 'ROLE_VALIDATOR' | 'ROLE_GROUP' | 'ROLE_GROUP' | 'ROLE_TX' | 'ROLE_TETHER' | 'ROLE_SWAP' | 'ROLE_DELEGATION' | 'ROLE_VC' | 'ROLE_BLOCKLET' | 'ROLE_STORE' | 'ROLE_TOKEN' | 'ROLE_FACTORY' | 'ROLE_ROLLUP' | 'ROLE_STORAGE' | 'ROLE_PROFILE' | 'ROLE_PASSKEY' | 'ROLE_TOKEN_FACTORY' | 'ROLE_ANY', string>;
6
6
  export type AddressType = LiteralUnion<'BASE16' | 'BASE58', string>;
7
7
  export interface HashFnType {
8
8
  (data: BytesType, round: number, encoding?: 'hex'): string;
@@ -159,6 +159,7 @@ export declare const types: {
159
159
  ROLE_STORAGE: number;
160
160
  ROLE_PROFILE: number;
161
161
  ROLE_PASSKEY: number;
162
+ ROLE_TOKEN_FACTORY: number;
162
163
  ROLE_ANY: number;
163
164
  };
164
165
  /**
package/lib/index.js CHANGED
@@ -140,6 +140,7 @@ exports.types = {
140
140
  ROLE_STORAGE: 20,
141
141
  ROLE_PROFILE: 21,
142
142
  ROLE_PASSKEY: 22,
143
+ ROLE_TOKEN_FACTORY: 23,
143
144
  ROLE_ANY: 63,
144
145
  },
145
146
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ocap/mcrypto",
3
- "version": "1.21.2",
3
+ "version": "1.22.0",
4
4
  "description": "Crypto lib that provides signer,crypter,hasher interface",
5
5
  "keywords": [
6
6
  "crypto",
@@ -38,7 +38,7 @@
38
38
  "ts-jest": "^29.2.5",
39
39
  "type-fest": "^3.1.0",
40
40
  "typescript": "^5.6.2",
41
- "@ocap/e2e-test": "1.21.2"
41
+ "@ocap/e2e-test": "1.22.0"
42
42
  },
43
43
  "repository": {
44
44
  "type": "git",
@@ -58,7 +58,7 @@
58
58
  "js-sha3": "^0.8.0",
59
59
  "randombytes": "^2.1.0",
60
60
  "tweetnacl": "^1.0.3",
61
- "@ocap/util": "1.21.2"
61
+ "@ocap/util": "1.22.0"
62
62
  },
63
63
  "resolutions": {
64
64
  "bn.js": "5.2.1",