@vleap/warps-adapter-fastset 0.1.0-alpha.36 → 0.1.0-alpha.37

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
@@ -1695,11 +1695,11 @@ var WarpFastsetExplorer = class {
1695
1695
  }
1696
1696
  };
1697
1697
 
1698
- // src/WarpFastsetResults.ts
1698
+ // src/WarpFastsetOutput.ts
1699
1699
  import {
1700
- evaluateResultsCommon,
1700
+ evaluateOutputCommon,
1701
1701
  getWarpWalletAddressFromConfig as getWarpWalletAddressFromConfig2,
1702
- parseResultsOutIndex,
1702
+ parseOutputOutIndex,
1703
1703
  WarpConstants
1704
1704
  } from "@vleap/warps";
1705
1705
 
@@ -1815,8 +1815,8 @@ var WarpFastsetSerializer = class {
1815
1815
  }
1816
1816
  };
1817
1817
 
1818
- // src/WarpFastsetResults.ts
1819
- var WarpFastsetResults = class {
1818
+ // src/WarpFastsetOutput.ts
1819
+ var WarpFastsetOutput = class {
1820
1820
  constructor(config, chain2) {
1821
1821
  this.config = config;
1822
1822
  this.chain = chain2;
@@ -1830,7 +1830,7 @@ var WarpFastsetResults = class {
1830
1830
  const rawValues = [transactionHash, blockNumber, timestamp];
1831
1831
  const stringValues = rawValues.map((v) => String(v));
1832
1832
  return {
1833
- success,
1833
+ status: success ? "success" : "error",
1834
1834
  warp,
1835
1835
  action: 0,
1836
1836
  user: getWarpWalletAddressFromConfig2(this.config, this.chain.name),
@@ -1838,16 +1838,16 @@ var WarpFastsetResults = class {
1838
1838
  tx,
1839
1839
  next: null,
1840
1840
  values: { string: stringValues, native: rawValues },
1841
- results: {},
1841
+ output: {},
1842
1842
  messages: {}
1843
1843
  };
1844
1844
  }
1845
- async extractQueryResults(warp, typedValues, actionIndex, inputs) {
1845
+ async extractQueryOutput(warp, typedValues, actionIndex, inputs) {
1846
1846
  const stringValues = typedValues.map((t) => this.serializer.typedToString(t));
1847
1847
  const nativeValues = typedValues.map((t) => this.serializer.typedToNative(t)[1]);
1848
1848
  const values = { string: stringValues, native: nativeValues };
1849
- let results = {};
1850
- if (!warp.results) return { values, results };
1849
+ let output = {};
1850
+ if (!warp.output) return { values, output };
1851
1851
  const getNestedValue = (path) => {
1852
1852
  const match = path.match(/^out\[(\d+)\]$/);
1853
1853
  if (match) {
@@ -1863,25 +1863,25 @@ var WarpFastsetResults = class {
1863
1863
  }
1864
1864
  return value;
1865
1865
  };
1866
- for (const [key, path] of Object.entries(warp.results)) {
1866
+ for (const [key, path] of Object.entries(warp.output)) {
1867
1867
  if (path.startsWith(WarpConstants.Transform.Prefix)) continue;
1868
- const currentActionIndex = parseResultsOutIndex(path);
1868
+ const currentActionIndex = parseOutputOutIndex(path);
1869
1869
  if (currentActionIndex !== null && currentActionIndex !== actionIndex) {
1870
- results[key] = null;
1870
+ output[key] = null;
1871
1871
  continue;
1872
1872
  }
1873
1873
  if (path.startsWith("out.") || path === "out" || path.startsWith("out[")) {
1874
1874
  const value = getNestedValue(path);
1875
- results[key] = value || null;
1875
+ output[key] = value || null;
1876
1876
  } else {
1877
- results[key] = path;
1877
+ output[key] = path;
1878
1878
  }
1879
1879
  }
1880
1880
  return {
1881
1881
  values,
1882
- results: await evaluateResultsCommon(
1882
+ output: await evaluateOutputCommon(
1883
1883
  warp,
1884
- results,
1884
+ output,
1885
1885
  actionIndex,
1886
1886
  inputs,
1887
1887
  this.serializer.coreSerializer,
@@ -2900,7 +2900,7 @@ var WarpFastsetWallet = class {
2900
2900
  }
2901
2901
  async sendTransaction(tx) {
2902
2902
  const { signature, ...transactionWithoutSignature } = tx;
2903
- const _cert = await this.client.submitTransaction(transactionWithoutSignature, signature);
2903
+ const _cert = await this.client.submitTransaction(transactionWithoutSignature, signature ?? null);
2904
2904
  return "TODO";
2905
2905
  }
2906
2906
  async sendTransactions(txs) {
@@ -2942,7 +2942,7 @@ function createFastsetAdapter(chainName, chainInfos) {
2942
2942
  chainInfo,
2943
2943
  builder: () => fallback.builder(),
2944
2944
  executor: new WarpFastsetExecutor(config, chainInfo),
2945
- results: new WarpFastsetResults(config, chainInfo),
2945
+ output: new WarpFastsetOutput(config, chainInfo),
2946
2946
  serializer: new WarpFastsetSerializer(),
2947
2947
  registry: fallback.registry,
2948
2948
  explorer: new WarpFastsetExplorer(chainInfo, config),