@0xobelisk/sui-client 1.0.1 → 1.0.3

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/dist/index.mjs CHANGED
@@ -1470,21 +1470,23 @@ var Dubhe = class {
1470
1470
  }
1471
1471
  async state({
1472
1472
  schema,
1473
- struct,
1473
+ field,
1474
1474
  objectId,
1475
1475
  storageType,
1476
1476
  params
1477
1477
  }) {
1478
1478
  const tx = new Transaction2();
1479
1479
  const moduleName = `${schema}_schema`;
1480
- const functionName = `get_${struct}`;
1480
+ const functionName = `get_${field}`;
1481
1481
  const schemaObject = tx.object(objectId);
1482
1482
  const storageValueMatch = storageType.match(/^StorageValue<(.+)>$/);
1483
1483
  const storageMapMatch = storageType.match(/^StorageMap<(.+),\s*(.+)>$/);
1484
1484
  const storageDoubleMapMatch = storageType.match(
1485
1485
  /^StorageDoubleMap<(.+),\s*(.+),\s*(.+)>$/
1486
1486
  );
1487
- let processedParams = [schemaObject];
1487
+ let processedParams = [
1488
+ schemaObject
1489
+ ];
1488
1490
  if (storageValueMatch) {
1489
1491
  if (params.length > 0) {
1490
1492
  console.warn(
@@ -1787,21 +1789,21 @@ _processKeyParameter = new WeakSet();
1787
1789
  processKeyParameter_fn = function(tx, keyType, value) {
1788
1790
  switch (keyType.toLowerCase()) {
1789
1791
  case "u8":
1790
- return tx.pure(value, "u8");
1792
+ return tx.pure.u8(value);
1791
1793
  case "u16":
1792
- return tx.pure(value, "u16");
1794
+ return tx.pure.u16(value);
1793
1795
  case "u32":
1794
- return tx.pure(value, "u32");
1796
+ return tx.pure.u32(value);
1795
1797
  case "u64":
1796
- return tx.pure(value, "u64");
1798
+ return tx.pure.u64(value);
1797
1799
  case "u128":
1798
- return tx.pure(value, "u128");
1800
+ return tx.pure.u128(value);
1799
1801
  case "u256":
1800
- return tx.pure(value, "u256");
1802
+ return tx.pure.u256(value);
1801
1803
  case "bool":
1802
- return tx.pure(value, "bool");
1804
+ return tx.pure.bool(value);
1803
1805
  case "address":
1804
- return tx.pure(value, "address");
1806
+ return tx.pure.address(value);
1805
1807
  default:
1806
1808
  if (keyType.includes("::")) {
1807
1809
  return tx.object(value);