@typus/typus-sdk 1.0.108 → 1.0.109

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.
@@ -4,7 +4,7 @@ export interface Vault {
4
4
  id: string;
5
5
  info: Info;
6
6
  config: Config;
7
- deposit_vault: DepositVault;
7
+ depositVault: DepositVault;
8
8
  }
9
9
  export interface Info {
10
10
  index: string;
@@ -125,7 +125,9 @@ export interface DepositVault {
125
125
  u64_padding: string[];
126
126
  bcs_padding: string[];
127
127
  }
128
- export declare function getVaults(provider: JsonRpcProvider, typusFrameworkPackageId: string, packageId: string, registry: string, indexes: string[]): Promise<Map<string, DepositShare>>;
128
+ export declare function getVaults(provider: JsonRpcProvider, typusFrameworkPackageId: string, packageId: string, registry: string, indexes: string[]): Promise<{
129
+ [key: string]: Vault;
130
+ }>;
129
131
  export interface DepositShare {
130
132
  index: string;
131
133
  activeSubVaultUserShare: string;
@@ -75,13 +75,8 @@ function getVaults(provider, typusFrameworkPackageId, packageId, registry, index
75
75
  case 1:
76
76
  results = (_a.sent()).results;
77
77
  bytes = results[results.length - 1].returnValues[0][0];
78
- console.log(JSON.stringify(bytes));
79
78
  reader = new bcs_1.BcsReader(new Uint8Array(bytes));
80
- result = Array.from(new Map()).reduce(function (map, _a) {
81
- var _b = __read(_a, 2), key = _b[0], value = _b[1];
82
- map[key] = value;
83
- return map;
84
- }, {});
79
+ result = {};
85
80
  reader.readVec(function (reader) {
86
81
  reader.read16();
87
82
  var id = (0, tools_1.AddressFromBytes)(reader.readBytes(32));
@@ -264,10 +259,9 @@ function getVaults(provider, typusFrameworkPackageId, packageId, registry, index
264
259
  id: id,
265
260
  info: info,
266
261
  config: config,
267
- deposit_vault: deposit_vault,
262
+ depositVault: deposit_vault,
268
263
  };
269
264
  });
270
- // @ts-ignore
271
265
  return [2 /*return*/, result];
272
266
  }
273
267
  });
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@typus/typus-sdk",
3
3
  "author": "Typus",
4
4
  "description": "typus sdk",
5
- "version": "1.0.108",
5
+ "version": "1.0.109",
6
6
  "dependencies": {
7
7
  "@mysten/bcs": "^0.7.3",
8
8
  "@mysten/kiosk": "^0.3.3",