@mysten/seal 1.0.0 → 1.1.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/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @mysten/seal
2
2
 
3
+ ## 1.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 8957bc4: [seal] use vector instead of vecmap for partial key servers
8
+
9
+ ## 1.0.1
10
+
11
+ ### Patch Changes
12
+
13
+ - 99d1e00: Add default export condition
14
+ - Updated dependencies [99d1e00]
15
+ - @mysten/bcs@2.0.2
16
+ - @mysten/sui@2.3.2
17
+
3
18
  ## 1.0.0
4
19
 
5
20
  ### Minor Changes
package/dist/bcs.mjs CHANGED
@@ -60,10 +60,7 @@ const ServerType = bcs$1.enum("ServerType", {
60
60
  Committee: bcs$1.struct("Committee", {
61
61
  version: bcs$1.u32(),
62
62
  threshold: bcs$1.u16(),
63
- partialKeyServers: bcs$1.vector(bcs$1.struct("VecMapEntry", {
64
- key: bcs$1.Address,
65
- value: PartialKeyServer
66
- }))
63
+ partialKeyServers: bcs$1.vector(PartialKeyServer)
67
64
  })
68
65
  });
69
66
  /**
package/dist/bcs.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"bcs.mjs","names":["bcs"],"sources":["../src/bcs.ts"],"sourcesContent":["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { fromHex, toHex } from '@mysten/bcs';\nimport { bcs } from '@mysten/sui/bcs';\n\nexport const IBEEncryptions = bcs.enum('IBEEncryptions', {\n\tBonehFranklinBLS12381: bcs.struct('BonehFranklinBLS12381', {\n\t\tnonce: bcs.bytes(96),\n\t\tencryptedShares: bcs.vector(bcs.bytes(32)),\n\t\tencryptedRandomness: bcs.bytes(32),\n\t}),\n});\n\nexport const Ciphertext = bcs.enum('Ciphertext', {\n\tAes256Gcm: bcs.struct('Aes256Gcm', {\n\t\tblob: bcs.byteVector(),\n\t\taad: bcs.option(bcs.byteVector()),\n\t}),\n\tHmac256Ctr: bcs.struct('Hmac256Ctr', {\n\t\tblob: bcs.byteVector(),\n\t\taad: bcs.option(bcs.byteVector()),\n\t\tmac: bcs.bytes(32),\n\t}),\n\tPlain: bcs.struct('Plain', {}),\n});\n\n/**\n * The encrypted object format. Should be aligned with the Rust implementation.\n */\nexport const EncryptedObject = bcs.struct('EncryptedObject', {\n\tversion: bcs.u8(),\n\tpackageId: bcs.Address,\n\tid: bcs.byteVector().transform({\n\t\toutput: (val) => toHex(val),\n\t\tinput: (val: string) => fromHex(val),\n\t}),\n\tservices: bcs.vector(bcs.tuple([bcs.Address, bcs.u8()])),\n\tthreshold: bcs.u8(),\n\tencryptedShares: IBEEncryptions,\n\tciphertext: Ciphertext,\n});\n\n/**\n * The Move struct for the KeyServerV1 object.\n */\nexport const KeyServerMoveV1 = bcs.struct('KeyServerV1', {\n\tname: bcs.string(),\n\turl: bcs.string(),\n\tkeyType: bcs.u8(),\n\tpk: bcs.byteVector(),\n});\n\n/**\n * The Move struct for PartialKeyServer.\n */\nexport const PartialKeyServer = bcs.struct('PartialKeyServer', {\n\tname: bcs.string(),\n\turl: bcs.string(),\n\tpartialPk: bcs.byteVector(),\n\tpartyId: bcs.u16(),\n});\n\n/**\n * The Move enum for ServerType (V2).\n */\nexport const ServerType = bcs.enum('ServerType', {\n\tIndependent: bcs.struct('Independent', {\n\t\turl: bcs.string(),\n\t}),\n\tCommittee: bcs.struct('Committee', {\n\t\tversion: bcs.u32(),\n\t\tthreshold: bcs.u16(),\n\t\tpartialKeyServers: bcs.vector(\n\t\t\tbcs.struct('VecMapEntry', {\n\t\t\t\tkey: bcs.Address,\n\t\t\t\tvalue: PartialKeyServer,\n\t\t\t}),\n\t\t),\n\t}),\n});\n\n/**\n * The Move struct for the KeyServerV2 object.\n */\nexport const KeyServerMoveV2 = bcs.struct('KeyServerV2', {\n\tname: bcs.string(),\n\tkeyType: bcs.u8(),\n\tpk: bcs.byteVector(),\n\tserverType: ServerType,\n});\n\n/**\n * The Move struct for the parent object.\n */\nexport const KeyServerMove = bcs.struct('KeyServer', {\n\tid: bcs.Address,\n\tfirstVersion: bcs.u64(), // latest version\n\tlastVersion: bcs.u64(), // oldest version\n});\n"],"mappings":";;;;AAMA,MAAa,iBAAiBA,MAAI,KAAK,kBAAkB,EACxD,uBAAuBA,MAAI,OAAO,yBAAyB;CAC1D,OAAOA,MAAI,MAAM,GAAG;CACpB,iBAAiBA,MAAI,OAAOA,MAAI,MAAM,GAAG,CAAC;CAC1C,qBAAqBA,MAAI,MAAM,GAAG;CAClC,CAAC,EACF,CAAC;AAEF,MAAa,aAAaA,MAAI,KAAK,cAAc;CAChD,WAAWA,MAAI,OAAO,aAAa;EAClC,MAAMA,MAAI,YAAY;EACtB,KAAKA,MAAI,OAAOA,MAAI,YAAY,CAAC;EACjC,CAAC;CACF,YAAYA,MAAI,OAAO,cAAc;EACpC,MAAMA,MAAI,YAAY;EACtB,KAAKA,MAAI,OAAOA,MAAI,YAAY,CAAC;EACjC,KAAKA,MAAI,MAAM,GAAG;EAClB,CAAC;CACF,OAAOA,MAAI,OAAO,SAAS,EAAE,CAAC;CAC9B,CAAC;;;;AAKF,MAAa,kBAAkBA,MAAI,OAAO,mBAAmB;CAC5D,SAASA,MAAI,IAAI;CACjB,WAAWA,MAAI;CACf,IAAIA,MAAI,YAAY,CAAC,UAAU;EAC9B,SAAS,QAAQ,MAAM,IAAI;EAC3B,QAAQ,QAAgB,QAAQ,IAAI;EACpC,CAAC;CACF,UAAUA,MAAI,OAAOA,MAAI,MAAM,CAACA,MAAI,SAASA,MAAI,IAAI,CAAC,CAAC,CAAC;CACxD,WAAWA,MAAI,IAAI;CACnB,iBAAiB;CACjB,YAAY;CACZ,CAAC;;;;AAKF,MAAa,kBAAkBA,MAAI,OAAO,eAAe;CACxD,MAAMA,MAAI,QAAQ;CAClB,KAAKA,MAAI,QAAQ;CACjB,SAASA,MAAI,IAAI;CACjB,IAAIA,MAAI,YAAY;CACpB,CAAC;;;;AAKF,MAAa,mBAAmBA,MAAI,OAAO,oBAAoB;CAC9D,MAAMA,MAAI,QAAQ;CAClB,KAAKA,MAAI,QAAQ;CACjB,WAAWA,MAAI,YAAY;CAC3B,SAASA,MAAI,KAAK;CAClB,CAAC;;;;AAKF,MAAa,aAAaA,MAAI,KAAK,cAAc;CAChD,aAAaA,MAAI,OAAO,eAAe,EACtC,KAAKA,MAAI,QAAQ,EACjB,CAAC;CACF,WAAWA,MAAI,OAAO,aAAa;EAClC,SAASA,MAAI,KAAK;EAClB,WAAWA,MAAI,KAAK;EACpB,mBAAmBA,MAAI,OACtBA,MAAI,OAAO,eAAe;GACzB,KAAKA,MAAI;GACT,OAAO;GACP,CAAC,CACF;EACD,CAAC;CACF,CAAC;;;;AAKF,MAAa,kBAAkBA,MAAI,OAAO,eAAe;CACxD,MAAMA,MAAI,QAAQ;CAClB,SAASA,MAAI,IAAI;CACjB,IAAIA,MAAI,YAAY;CACpB,YAAY;CACZ,CAAC;;;;AAKF,MAAa,gBAAgBA,MAAI,OAAO,aAAa;CACpD,IAAIA,MAAI;CACR,cAAcA,MAAI,KAAK;CACvB,aAAaA,MAAI,KAAK;CACtB,CAAC"}
1
+ {"version":3,"file":"bcs.mjs","names":["bcs"],"sources":["../src/bcs.ts"],"sourcesContent":["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { fromHex, toHex } from '@mysten/bcs';\nimport { bcs } from '@mysten/sui/bcs';\n\nexport const IBEEncryptions = bcs.enum('IBEEncryptions', {\n\tBonehFranklinBLS12381: bcs.struct('BonehFranklinBLS12381', {\n\t\tnonce: bcs.bytes(96),\n\t\tencryptedShares: bcs.vector(bcs.bytes(32)),\n\t\tencryptedRandomness: bcs.bytes(32),\n\t}),\n});\n\nexport const Ciphertext = bcs.enum('Ciphertext', {\n\tAes256Gcm: bcs.struct('Aes256Gcm', {\n\t\tblob: bcs.byteVector(),\n\t\taad: bcs.option(bcs.byteVector()),\n\t}),\n\tHmac256Ctr: bcs.struct('Hmac256Ctr', {\n\t\tblob: bcs.byteVector(),\n\t\taad: bcs.option(bcs.byteVector()),\n\t\tmac: bcs.bytes(32),\n\t}),\n\tPlain: bcs.struct('Plain', {}),\n});\n\n/**\n * The encrypted object format. Should be aligned with the Rust implementation.\n */\nexport const EncryptedObject = bcs.struct('EncryptedObject', {\n\tversion: bcs.u8(),\n\tpackageId: bcs.Address,\n\tid: bcs.byteVector().transform({\n\t\toutput: (val) => toHex(val),\n\t\tinput: (val: string) => fromHex(val),\n\t}),\n\tservices: bcs.vector(bcs.tuple([bcs.Address, bcs.u8()])),\n\tthreshold: bcs.u8(),\n\tencryptedShares: IBEEncryptions,\n\tciphertext: Ciphertext,\n});\n\n/**\n * The Move struct for the KeyServerV1 object.\n */\nexport const KeyServerMoveV1 = bcs.struct('KeyServerV1', {\n\tname: bcs.string(),\n\turl: bcs.string(),\n\tkeyType: bcs.u8(),\n\tpk: bcs.byteVector(),\n});\n\n/**\n * The Move struct for PartialKeyServer.\n */\nexport const PartialKeyServer = bcs.struct('PartialKeyServer', {\n\tname: bcs.string(),\n\turl: bcs.string(),\n\tpartialPk: bcs.byteVector(),\n\tpartyId: bcs.u16(),\n});\n\n/**\n * The Move enum for ServerType (V2).\n */\nexport const ServerType = bcs.enum('ServerType', {\n\tIndependent: bcs.struct('Independent', {\n\t\turl: bcs.string(),\n\t}),\n\tCommittee: bcs.struct('Committee', {\n\t\tversion: bcs.u32(),\n\t\tthreshold: bcs.u16(),\n\t\tpartialKeyServers: bcs.vector(PartialKeyServer),\n\t}),\n});\n\n/**\n * The Move struct for the KeyServerV2 object.\n */\nexport const KeyServerMoveV2 = bcs.struct('KeyServerV2', {\n\tname: bcs.string(),\n\tkeyType: bcs.u8(),\n\tpk: bcs.byteVector(),\n\tserverType: ServerType,\n});\n\n/**\n * The Move struct for the parent object.\n */\nexport const KeyServerMove = bcs.struct('KeyServer', {\n\tid: bcs.Address,\n\t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KAAKA,MAAI,QAAQ;CACjB,WAAWA,MAAI,YAAY;CAC3B,SAASA,MAAI,KAAK;CAClB,CAAC;;;;AAKF,MAAa,aAAaA,MAAI,KAAK,cAAc;CAChD,aAAaA,MAAI,OAAO,eAAe,EACtC,KAAKA,MAAI,QAAQ,EACjB,CAAC;CACF,WAAWA,MAAI,OAAO,aAAa;EAClC,SAASA,MAAI,KAAK;EAClB,WAAWA,MAAI,KAAK;EACpB,mBAAmBA,MAAI,OAAO,iBAAiB;EAC/C,CAAC;CACF,CAAC;;;;AAKF,MAAa,kBAAkBA,MAAI,OAAO,eAAe;CACxD,MAAMA,MAAI,QAAQ;CAClB,SAASA,MAAI,IAAI;CACjB,IAAIA,MAAI,YAAY;CACpB,YAAY;CACZ,CAAC;;;;AAKF,MAAa,gBAAgBA,MAAI,OAAO,aAAa;CACpD,IAAIA,MAAI;CACR,cAAcA,MAAI,KAAK;CACvB,aAAaA,MAAI,KAAK;CACtB,CAAC"}
package/dist/version.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  //#region src/version.ts
2
- const PACKAGE_VERSION = "1.0.0";
2
+ const PACKAGE_VERSION = "1.1.0";
3
3
 
4
4
  //#endregion
5
5
  export { PACKAGE_VERSION };
@@ -1 +1 @@
1
- {"version":3,"file":"version.mjs","names":[],"sources":["../src/version.ts"],"sourcesContent":["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\n// This file is generated by genversion.mjs. Do not edit it directly.\n\nexport const PACKAGE_VERSION = '1.0.0';\n"],"mappings":";AAKA,MAAa,kBAAkB"}
1
+ {"version":3,"file":"version.mjs","names":[],"sources":["../src/version.ts"],"sourcesContent":["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\n// This file is generated by genversion.mjs. Do not edit it directly.\n\nexport const PACKAGE_VERSION = '1.1.0';\n"],"mappings":";AAKA,MAAa,kBAAkB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mysten/seal",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "Seal SDK",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Mysten Labs <build@mystenlabs.com>",
@@ -10,7 +10,8 @@
10
10
  "exports": {
11
11
  ".": {
12
12
  "types": "./dist/index.d.mts",
13
- "import": "./dist/index.mjs"
13
+ "import": "./dist/index.mjs",
14
+ "default": "./dist/index.mjs"
14
15
  }
15
16
  },
16
17
  "sideEffects": false,
@@ -31,15 +32,15 @@
31
32
  "@types/node": "^25.0.8",
32
33
  "typescript": "^5.9.3",
33
34
  "vitest": "^4.0.17",
34
- "@mysten/sui": "^2.0.0"
35
+ "@mysten/sui": "^2.5.0"
35
36
  },
36
37
  "dependencies": {
37
38
  "@noble/curves": "^2.0.1",
38
39
  "@noble/hashes": "^2.0.1",
39
- "@mysten/bcs": "^2.0.0"
40
+ "@mysten/bcs": "^2.0.2"
40
41
  },
41
42
  "peerDependencies": {
42
- "@mysten/sui": "^2.0.0"
43
+ "@mysten/sui": "^2.5.0"
43
44
  },
44
45
  "scripts": {
45
46
  "clean": "rm -rf tsconfig.tsbuildinfo ./dist",