@lucid-evolution/provider 0.1.12 → 0.1.13

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.cjs CHANGED
@@ -47,7 +47,7 @@ var import_utils = require("@lucid-evolution/utils");
47
47
  // package.json
48
48
  var package_default = {
49
49
  name: "@lucid-evolution/provider",
50
- version: "0.1.12",
50
+ version: "0.1.13",
51
51
  description: "",
52
52
  main: "./dist/index.js",
53
53
  types: "./dist/index.d.ts",
@@ -501,9 +501,9 @@ var Kupmios = class {
501
501
  }, checkInterval);
502
502
  });
503
503
  }
504
- async submitTx(tx) {
505
- const client = await this.ogmiosWsp("SubmitTx", {
506
- submit: tx
504
+ async submitTx(cbor) {
505
+ const client = await this.ogmiosWsp("submitTransaction", {
506
+ transaction: { cbor }
507
507
  });
508
508
  return new Promise((res, rej) => {
509
509
  client.addEventListener(
@@ -511,10 +511,10 @@ var Kupmios = class {
511
511
  (msg) => {
512
512
  try {
513
513
  const { result } = JSON.parse(msg.data);
514
- if (result.SubmitSuccess)
515
- res(result.SubmitSuccess.txId);
514
+ if (result.transaction)
515
+ res(result.transaction.id);
516
516
  else
517
- rej(result.SubmitFail);
517
+ rej(result.error);
518
518
  client.close();
519
519
  } catch (e) {
520
520
  rej(e);
package/dist/index.d.cts CHANGED
@@ -48,7 +48,7 @@ declare class Kupmios implements Provider {
48
48
  getDelegation(rewardAddress: RewardAddress): Promise<Delegation>;
49
49
  getDatum(datumHash: DatumHash): Promise<Datum>;
50
50
  awaitTx(txHash: TxHash, checkInterval?: number): Promise<boolean>;
51
- submitTx(tx: Transaction): Promise<TxHash>;
51
+ submitTx(cbor: Transaction): Promise<TxHash>;
52
52
  private kupmiosUtxosToUtxos;
53
53
  private ogmiosWsp;
54
54
  }
package/dist/index.d.ts CHANGED
@@ -48,7 +48,7 @@ declare class Kupmios implements Provider {
48
48
  getDelegation(rewardAddress: RewardAddress): Promise<Delegation>;
49
49
  getDatum(datumHash: DatumHash): Promise<Datum>;
50
50
  awaitTx(txHash: TxHash, checkInterval?: number): Promise<boolean>;
51
- submitTx(tx: Transaction): Promise<TxHash>;
51
+ submitTx(cbor: Transaction): Promise<TxHash>;
52
52
  private kupmiosUtxosToUtxos;
53
53
  private ogmiosWsp;
54
54
  }
package/dist/index.js CHANGED
@@ -8,7 +8,7 @@ import { applyDoubleCborEncoding } from "@lucid-evolution/utils";
8
8
  // package.json
9
9
  var package_default = {
10
10
  name: "@lucid-evolution/provider",
11
- version: "0.1.12",
11
+ version: "0.1.13",
12
12
  description: "",
13
13
  main: "./dist/index.js",
14
14
  types: "./dist/index.d.ts",
@@ -462,9 +462,9 @@ var Kupmios = class {
462
462
  }, checkInterval);
463
463
  });
464
464
  }
465
- async submitTx(tx) {
466
- const client = await this.ogmiosWsp("SubmitTx", {
467
- submit: tx
465
+ async submitTx(cbor) {
466
+ const client = await this.ogmiosWsp("submitTransaction", {
467
+ transaction: { cbor }
468
468
  });
469
469
  return new Promise((res, rej) => {
470
470
  client.addEventListener(
@@ -472,10 +472,10 @@ var Kupmios = class {
472
472
  (msg) => {
473
473
  try {
474
474
  const { result } = JSON.parse(msg.data);
475
- if (result.SubmitSuccess)
476
- res(result.SubmitSuccess.txId);
475
+ if (result.transaction)
476
+ res(result.transaction.id);
477
477
  else
478
- rej(result.SubmitFail);
478
+ rej(result.error);
479
479
  client.close();
480
480
  } catch (e) {
481
481
  rej(e);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lucid-evolution/provider",
3
- "version": "0.1.12",
3
+ "version": "0.1.13",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -27,8 +27,8 @@
27
27
  "dependencies": {
28
28
  "@dcspark/cardano-multiplatform-lib-nodejs": "^5.3.0",
29
29
  "@dcspark/cardano-multiplatform-lib-browser": "^5.3.0",
30
- "@lucid-evolution/core-types": "0.1.6",
31
30
  "@lucid-evolution/core-utils": "0.1.6",
31
+ "@lucid-evolution/core-types": "0.1.6",
32
32
  "@lucid-evolution/utils": "0.1.9"
33
33
  },
34
34
  "devDependencies": {