@lukso/transaction-view-core 0.6.5 → 0.6.6-dev.45215f7
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/.turbo/turbo-build.log +11 -11
- package/.turbo/turbo-typecheck.log +1 -1
- package/CHANGELOG.md +15 -0
- package/dist/index.cjs +102 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +34 -16
- package/dist/index.d.ts +34 -16
- package/dist/index.js +105 -3
- package/dist/index.js.map +1 -1
- package/package.json +11 -6
- package/src/components/transaction-playback.ts +162 -19
- package/tsup.config.ts +3 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
WARN Issue while reading "/home/runner/work/service-auth-simple/service-auth-simple/.npmrc". Failed to replace env in config: ${LUKSO_NPM_TOKEN}
|
|
2
2
|
|
|
3
|
-
> @lukso/transaction-view-core@0.6.
|
|
3
|
+
> @lukso/transaction-view-core@0.6.6 build /home/runner/work/service-auth-simple/service-auth-simple/packages/transaction-view-core
|
|
4
4
|
> tsup
|
|
5
5
|
|
|
6
6
|
[34mCLI[39m Building entry: src/index.ts, src/shared/index.ts, src/styles/index.ts
|
|
@@ -11,24 +11,24 @@
|
|
|
11
11
|
[34mESM[39m Build start
|
|
12
12
|
[34mCJS[39m Build start
|
|
13
13
|
[34mDTS[39m Build start
|
|
14
|
-
[32mCJS[39m [1mdist/index.cjs [22m[
|
|
14
|
+
[32mCJS[39m [1mdist/index.cjs [22m[32m279.94 KB[39m
|
|
15
15
|
[32mCJS[39m [1mdist/shared/index.cjs [22m[32m209.95 KB[39m
|
|
16
16
|
[32mCJS[39m [1mdist/styles/index.cjs [22m[32m133.22 KB[39m
|
|
17
|
-
[32mCJS[39m [1mdist/
|
|
18
|
-
[32mCJS[39m [1mdist/index.cjs.map [22m[32m381.60 KB[39m
|
|
17
|
+
[32mCJS[39m [1mdist/index.cjs.map [22m[32m388.13 KB[39m
|
|
19
18
|
[32mCJS[39m [1mdist/shared/index.cjs.map [22m[32m272.16 KB[39m
|
|
20
|
-
[32mCJS[39m
|
|
21
|
-
[
|
|
19
|
+
[32mCJS[39m [1mdist/styles/index.cjs.map [22m[32m141.45 KB[39m
|
|
20
|
+
[32mCJS[39m ⚡️ Build success in 5417ms
|
|
21
|
+
[32mESM[39m [1mdist/index.js [22m[32m271.04 KB[39m
|
|
22
22
|
[32mESM[39m [1mdist/shared/index.js [22m[32m204.53 KB[39m
|
|
23
23
|
[32mESM[39m [1mdist/styles/index.js [22m[32m132.18 KB[39m
|
|
24
|
-
[32mESM[39m [1mdist/index.js.map [22m[
|
|
24
|
+
[32mESM[39m [1mdist/index.js.map [22m[32m387.37 KB[39m
|
|
25
25
|
[32mESM[39m [1mdist/shared/index.js.map [22m[32m271.29 KB[39m
|
|
26
26
|
[32mESM[39m [1mdist/styles/index.js.map [22m[32m141.39 KB[39m
|
|
27
|
-
[32mESM[39m ⚡️ Build success in
|
|
28
|
-
[32mDTS[39m ⚡️ Build success in
|
|
27
|
+
[32mESM[39m ⚡️ Build success in 5419ms
|
|
28
|
+
[32mDTS[39m ⚡️ Build success in 11454ms
|
|
29
29
|
[32mDTS[39m [1mdist/styles/index.d.ts [22m[32m233.00 B[39m
|
|
30
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[
|
|
30
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m17.84 KB[39m
|
|
31
31
|
[32mDTS[39m [1mdist/shared/index.d.ts [22m[32m23.60 KB[39m
|
|
32
32
|
[32mDTS[39m [1mdist/styles/index.d.cts [22m[32m233.00 B[39m
|
|
33
|
-
[32mDTS[39m [1mdist/index.d.cts [22m[
|
|
33
|
+
[32mDTS[39m [1mdist/index.d.cts [22m[32m17.85 KB[39m
|
|
34
34
|
[32mDTS[39m [1mdist/shared/index.d.cts [22m[32m23.60 KB[39m
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
WARN Issue while reading "/home/runner/work/service-auth-simple/service-auth-simple/.npmrc". Failed to replace env in config: ${LUKSO_NPM_TOKEN}
|
|
2
2
|
|
|
3
|
-
> @lukso/transaction-view-core@0.6.
|
|
3
|
+
> @lukso/transaction-view-core@0.6.6 typecheck /home/runner/work/service-auth-simple/service-auth-simple/packages/transaction-view-core
|
|
4
4
|
> tsc --noEmit
|
|
5
5
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.6.6](https://github.com/lukso-network/service-auth-simple/compare/transaction-view-core-v0.6.5...transaction-view-core-v0.6.6) (2026-01-07)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* Allow passing of raw transactions to playback ([#88](https://github.com/lukso-network/service-auth-simple/issues/88)) ([e27d626](https://github.com/lukso-network/service-auth-simple/commit/e27d626303991ad1cba737647d562bdfe246f299))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Dependencies
|
|
12
|
+
|
|
13
|
+
* The following workspace dependencies were updated
|
|
14
|
+
* dependencies
|
|
15
|
+
* @lukso/transaction-decoder bumped to 1.3.6
|
|
16
|
+
* @lukso/transaction-view-headless bumped to 0.4.6
|
|
17
|
+
|
|
3
18
|
## [0.6.5](https://github.com/lukso-network/service-auth-simple/compare/transaction-view-core-v0.6.4...transaction-view-core-v0.6.5) (2026-01-05)
|
|
4
19
|
|
|
5
20
|
|
package/dist/index.cjs
CHANGED
|
@@ -4310,6 +4310,7 @@ PermissionsBlock = __decorateClass([
|
|
|
4310
4310
|
], PermissionsBlock);
|
|
4311
4311
|
|
|
4312
4312
|
// src/components/transaction-playback.ts
|
|
4313
|
+
var import_transaction_decoder = require("@lukso/transaction-decoder");
|
|
4313
4314
|
var import_transaction_view_headless10 = require("@lukso/transaction-view-headless");
|
|
4314
4315
|
var import_lit20 = require("lit");
|
|
4315
4316
|
var import_decorators19 = require("lit/decorators.js");
|
|
@@ -4460,6 +4461,7 @@ var TransactionPlayback = class extends CoreLitElement {
|
|
|
4460
4461
|
this.index = 1;
|
|
4461
4462
|
this.debug = false;
|
|
4462
4463
|
this.isLoading = false;
|
|
4464
|
+
this.isDecoding = false;
|
|
4463
4465
|
this.componentContainerRef = (0, import_ref.createRef)();
|
|
4464
4466
|
this.loader = getGlobalLitLoader();
|
|
4465
4467
|
this.handleHeaderInfo = (event) => {
|
|
@@ -4476,7 +4478,13 @@ var TransactionPlayback = class extends CoreLitElement {
|
|
|
4476
4478
|
};
|
|
4477
4479
|
}
|
|
4478
4480
|
willUpdate(changedProperties) {
|
|
4479
|
-
if (changedProperties.has("
|
|
4481
|
+
if (changedProperties.has("rawTransaction") || changedProperties.has("chain")) {
|
|
4482
|
+
if (this.rawTransaction) {
|
|
4483
|
+
this.decodeRawTransaction();
|
|
4484
|
+
return;
|
|
4485
|
+
}
|
|
4486
|
+
}
|
|
4487
|
+
if (changedProperties.has("transaction") || changedProperties.has("decodedTransaction") || changedProperties.has("index") || changedProperties.has("context") || changedProperties.has("variant")) {
|
|
4480
4488
|
this.loadView();
|
|
4481
4489
|
}
|
|
4482
4490
|
}
|
|
@@ -4499,9 +4507,80 @@ var TransactionPlayback = class extends CoreLitElement {
|
|
|
4499
4507
|
import_transaction_view_headless10.TransactionViewEvents.HEADER_INFO,
|
|
4500
4508
|
this.handleHeaderInfo
|
|
4501
4509
|
);
|
|
4510
|
+
if (this.decodingUnsubscribe) {
|
|
4511
|
+
this.decodingUnsubscribe();
|
|
4512
|
+
this.decodingUnsubscribe = void 0;
|
|
4513
|
+
}
|
|
4514
|
+
}
|
|
4515
|
+
/**
|
|
4516
|
+
* Decode a raw transaction locally (no server API calls)
|
|
4517
|
+
* Accepts transactions with JSON, BigintJSON, or bigint values
|
|
4518
|
+
*
|
|
4519
|
+
* Two-phase decoding:
|
|
4520
|
+
* 1. Immediate sync decoding - shows basic decoded transaction right away
|
|
4521
|
+
* 2. Async enhancement - progressively enhances with additional data
|
|
4522
|
+
*/
|
|
4523
|
+
async decodeRawTransaction() {
|
|
4524
|
+
if (!this.rawTransaction) {
|
|
4525
|
+
return;
|
|
4526
|
+
}
|
|
4527
|
+
if (!this.chain) {
|
|
4528
|
+
this.error = "Chain configuration is required when decoding raw transactions";
|
|
4529
|
+
return;
|
|
4530
|
+
}
|
|
4531
|
+
this.isDecoding = true;
|
|
4532
|
+
this.error = void 0;
|
|
4533
|
+
this.decodedTransaction = void 0;
|
|
4534
|
+
if (this.decodingUnsubscribe) {
|
|
4535
|
+
this.decodingUnsubscribe();
|
|
4536
|
+
this.decodingUnsubscribe = void 0;
|
|
4537
|
+
}
|
|
4538
|
+
try {
|
|
4539
|
+
const normalizedTx = import_transaction_decoder.JSONbigString.read(this.rawTransaction);
|
|
4540
|
+
const result = await (0, import_transaction_decoder.decodeTransaction)(normalizedTx, {
|
|
4541
|
+
chain: this.chain,
|
|
4542
|
+
plugins: [],
|
|
4543
|
+
// Use auto-registered plugins
|
|
4544
|
+
schemaPlugins: [],
|
|
4545
|
+
// Use auto-registered schema plugins
|
|
4546
|
+
wrappers: [],
|
|
4547
|
+
// No wrapper detection needed for raw transactions
|
|
4548
|
+
async: true
|
|
4549
|
+
// Enable async enhancement (ABI fetching, address resolution)
|
|
4550
|
+
});
|
|
4551
|
+
if (!Array.isArray(result)) {
|
|
4552
|
+
this.decodedTransaction = result.immediate;
|
|
4553
|
+
this.isDecoding = false;
|
|
4554
|
+
this.loadView();
|
|
4555
|
+
this.decodingUnsubscribe = result.signal.subscribe((state11) => {
|
|
4556
|
+
if (state11.data && state11.data !== this.decodedTransaction) {
|
|
4557
|
+
this.decodedTransaction = state11.data;
|
|
4558
|
+
this.loadView();
|
|
4559
|
+
}
|
|
4560
|
+
});
|
|
4561
|
+
} else {
|
|
4562
|
+
const firstResult = result[0];
|
|
4563
|
+
this.decodedTransaction = firstResult.immediate;
|
|
4564
|
+
this.isDecoding = false;
|
|
4565
|
+
this.loadView();
|
|
4566
|
+
this.decodingUnsubscribe = firstResult.signal.subscribe(
|
|
4567
|
+
(state11) => {
|
|
4568
|
+
if (state11.data && state11.data !== this.decodedTransaction) {
|
|
4569
|
+
this.decodedTransaction = state11.data;
|
|
4570
|
+
this.loadView();
|
|
4571
|
+
}
|
|
4572
|
+
}
|
|
4573
|
+
);
|
|
4574
|
+
}
|
|
4575
|
+
} catch (err) {
|
|
4576
|
+
this.error = err instanceof Error ? err.message : "Failed to decode transaction";
|
|
4577
|
+
this.isDecoding = false;
|
|
4578
|
+
console.error("Transaction decoding error:", err);
|
|
4579
|
+
}
|
|
4502
4580
|
}
|
|
4503
4581
|
async loadView() {
|
|
4504
|
-
|
|
4582
|
+
const txToDisplay = this.decodedTransaction || this.transaction;
|
|
4583
|
+
if (!txToDisplay) {
|
|
4505
4584
|
this.error = "No transaction provided";
|
|
4506
4585
|
return;
|
|
4507
4586
|
}
|
|
@@ -4510,7 +4589,7 @@ var TransactionPlayback = class extends CoreLitElement {
|
|
|
4510
4589
|
this.loadedComponent = void 0;
|
|
4511
4590
|
this.headerInfo = void 0;
|
|
4512
4591
|
try {
|
|
4513
|
-
this.playbackState = (0, import_transaction_view_headless10.createTransactionPlayback)(
|
|
4592
|
+
this.playbackState = (0, import_transaction_view_headless10.createTransactionPlayback)(txToDisplay, {
|
|
4514
4593
|
framework: "lit",
|
|
4515
4594
|
fallbackViewId: this.fallbackViewId,
|
|
4516
4595
|
context: this.context,
|
|
@@ -4632,6 +4711,14 @@ var TransactionPlayback = class extends CoreLitElement {
|
|
|
4632
4711
|
`;
|
|
4633
4712
|
}
|
|
4634
4713
|
render() {
|
|
4714
|
+
if (this.isDecoding) {
|
|
4715
|
+
return import_lit20.html`
|
|
4716
|
+
<div class="flex flex-col items-center justify-center py-15 px-5 text-neutral-60">
|
|
4717
|
+
<div class="text-32 mb-4 animate-spin">🔄</div>
|
|
4718
|
+
<div class="text-16 font-500">Decoding transaction...</div>
|
|
4719
|
+
</div>
|
|
4720
|
+
`;
|
|
4721
|
+
}
|
|
4635
4722
|
if (this.isLoading) {
|
|
4636
4723
|
return import_lit20.html`
|
|
4637
4724
|
<div class="flex flex-col items-center justify-center py-15 px-5 text-neutral-60">
|
|
@@ -4684,6 +4771,12 @@ var TransactionPlayback = class extends CoreLitElement {
|
|
|
4684
4771
|
__decorateClass([
|
|
4685
4772
|
(0, import_decorators19.property)({ type: Object })
|
|
4686
4773
|
], TransactionPlayback.prototype, "transaction", 2);
|
|
4774
|
+
__decorateClass([
|
|
4775
|
+
(0, import_decorators19.property)({ type: Object })
|
|
4776
|
+
], TransactionPlayback.prototype, "rawTransaction", 2);
|
|
4777
|
+
__decorateClass([
|
|
4778
|
+
(0, import_decorators19.property)({ type: Object })
|
|
4779
|
+
], TransactionPlayback.prototype, "chain", 2);
|
|
4687
4780
|
__decorateClass([
|
|
4688
4781
|
(0, import_decorators19.property)({ type: Number })
|
|
4689
4782
|
], TransactionPlayback.prototype, "index", 2);
|
|
@@ -4708,6 +4801,9 @@ __decorateClass([
|
|
|
4708
4801
|
__decorateClass([
|
|
4709
4802
|
(0, import_decorators19.state)()
|
|
4710
4803
|
], TransactionPlayback.prototype, "isLoading", 2);
|
|
4804
|
+
__decorateClass([
|
|
4805
|
+
(0, import_decorators19.state)()
|
|
4806
|
+
], TransactionPlayback.prototype, "isDecoding", 2);
|
|
4711
4807
|
__decorateClass([
|
|
4712
4808
|
(0, import_decorators19.state)()
|
|
4713
4809
|
], TransactionPlayback.prototype, "error", 2);
|
|
@@ -4717,6 +4813,9 @@ __decorateClass([
|
|
|
4717
4813
|
__decorateClass([
|
|
4718
4814
|
(0, import_decorators19.state)()
|
|
4719
4815
|
], TransactionPlayback.prototype, "headerInfo", 2);
|
|
4816
|
+
__decorateClass([
|
|
4817
|
+
(0, import_decorators19.state)()
|
|
4818
|
+
], TransactionPlayback.prototype, "decodedTransaction", 2);
|
|
4720
4819
|
TransactionPlayback = __decorateClass([
|
|
4721
4820
|
safeCustomElement("transaction-playback")
|
|
4722
4821
|
], TransactionPlayback);
|