@lucid-evolution/provider 0.1.7 → 0.1.8
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 +7 -6
- package/dist/index.js +7 -6
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -45,7 +45,7 @@ var import_utils = require("@lucid-evolution/utils");
|
|
|
45
45
|
// package.json
|
|
46
46
|
var package_default = {
|
|
47
47
|
name: "@lucid-evolution/provider",
|
|
48
|
-
version: "0.1.
|
|
48
|
+
version: "0.1.8",
|
|
49
49
|
description: "",
|
|
50
50
|
main: "./dist/index.js",
|
|
51
51
|
types: "./dist/index.d.ts",
|
|
@@ -449,9 +449,10 @@ var Kupmios = class {
|
|
|
449
449
|
);
|
|
450
450
|
}
|
|
451
451
|
async getDelegation(rewardAddress) {
|
|
452
|
-
const client = await this.ogmiosWsp(
|
|
453
|
-
|
|
454
|
-
|
|
452
|
+
const client = await this.ogmiosWsp(
|
|
453
|
+
"queryLedgerState/rewardAccountSummaries",
|
|
454
|
+
{ keys: [rewardAddress] }
|
|
455
|
+
);
|
|
455
456
|
return new Promise((res, rej) => {
|
|
456
457
|
client.addEventListener(
|
|
457
458
|
"message",
|
|
@@ -460,8 +461,8 @@ var Kupmios = class {
|
|
|
460
461
|
const { result } = JSON.parse(msg.data);
|
|
461
462
|
const delegation = result ? Object.values(result)[0] : {};
|
|
462
463
|
res({
|
|
463
|
-
poolId: delegation?.delegate || null,
|
|
464
|
-
rewards: BigInt(delegation?.rewards || 0)
|
|
464
|
+
poolId: delegation?.delegate?.id || null,
|
|
465
|
+
rewards: BigInt(delegation?.rewards?.ada?.lovelace || 0)
|
|
465
466
|
});
|
|
466
467
|
client.close();
|
|
467
468
|
} catch (e) {
|
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { applyDoubleCborEncoding } from "@lucid-evolution/utils";
|
|
|
6
6
|
// package.json
|
|
7
7
|
var package_default = {
|
|
8
8
|
name: "@lucid-evolution/provider",
|
|
9
|
-
version: "0.1.
|
|
9
|
+
version: "0.1.8",
|
|
10
10
|
description: "",
|
|
11
11
|
main: "./dist/index.js",
|
|
12
12
|
types: "./dist/index.d.ts",
|
|
@@ -410,9 +410,10 @@ var Kupmios = class {
|
|
|
410
410
|
);
|
|
411
411
|
}
|
|
412
412
|
async getDelegation(rewardAddress) {
|
|
413
|
-
const client = await this.ogmiosWsp(
|
|
414
|
-
|
|
415
|
-
|
|
413
|
+
const client = await this.ogmiosWsp(
|
|
414
|
+
"queryLedgerState/rewardAccountSummaries",
|
|
415
|
+
{ keys: [rewardAddress] }
|
|
416
|
+
);
|
|
416
417
|
return new Promise((res, rej) => {
|
|
417
418
|
client.addEventListener(
|
|
418
419
|
"message",
|
|
@@ -421,8 +422,8 @@ var Kupmios = class {
|
|
|
421
422
|
const { result } = JSON.parse(msg.data);
|
|
422
423
|
const delegation = result ? Object.values(result)[0] : {};
|
|
423
424
|
res({
|
|
424
|
-
poolId: delegation?.delegate || null,
|
|
425
|
-
rewards: BigInt(delegation?.rewards || 0)
|
|
425
|
+
poolId: delegation?.delegate?.id || null,
|
|
426
|
+
rewards: BigInt(delegation?.rewards?.ada?.lovelace || 0)
|
|
426
427
|
});
|
|
427
428
|
client.close();
|
|
428
429
|
} catch (e) {
|