@hardkas/bridge-local 0.9.0-alpha → 0.9.1-alpha
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/README.md +34 -29
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -1,29 +1,34 @@
|
|
|
1
|
-
# `@hardkas/bridge-local`
|
|
2
|
-
|
|
3
|
-
The `bridge-local` package acts as an offline, deterministic laboratory for Kaspa L1 -> Igra L2 bridge interactions. It is **not** a production bridge client; it is an assumption-aware simulator.
|
|
4
|
-
|
|
5
|
-
## 1. Bridge Simulation Variants
|
|
6
|
-
|
|
7
|
-
In HardKAS, "bridging" involves generating deterministic payloads and analyzing cross-chain logic without actually burning funds on mainnet or waiting for finality.
|
|
8
|
-
|
|
9
|
-
### Flow: Local Plan (`hardkas bridge local plan`)
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
1
|
+
# `@hardkas/bridge-local`
|
|
2
|
+
|
|
3
|
+
The `bridge-local` package acts as an offline, deterministic laboratory for Kaspa L1 -> Igra L2 bridge interactions. It is **not** a production bridge client; it is an assumption-aware simulator.
|
|
4
|
+
|
|
5
|
+
## 1. Bridge Simulation Variants
|
|
6
|
+
|
|
7
|
+
In HardKAS, "bridging" involves generating deterministic payloads and analyzing cross-chain logic without actually burning funds on mainnet or waiting for finality.
|
|
8
|
+
|
|
9
|
+
### Flow: Local Plan (`hardkas bridge local plan`)
|
|
10
|
+
|
|
11
|
+
1. Fetches current UTXO balances from the local Kaspa simnet node.
|
|
12
|
+
2. Constructs an L1 Kaspa transaction that pays to the simulated bridge contract address.
|
|
13
|
+
3. Attaches an OP_RETURN payload containing the L2 Igra receiver address.
|
|
14
|
+
4. Persists a `BridgePlan` artifact, logging the L1 and L2 linkage.
|
|
15
|
+
|
|
16
|
+
### Variant: Prefix Mining Simulation (`hardkas bridge local simulate --prefix abc`)
|
|
17
|
+
|
|
18
|
+
To test how bridge indexing reacts to specific transaction IDs:
|
|
19
|
+
|
|
20
|
+
1. The simulator overrides standard PRNG algorithms.
|
|
21
|
+
2. It forcefully increments an internal nonce on the Kaspa L1 payload until the resulting `txId` SHA-256 hash begins with the requested prefix (`abc`).
|
|
22
|
+
3. This computationally intense simulation is confined entirely to memory and only persists the final successful `BridgePlan` artifact.
|
|
23
|
+
|
|
24
|
+
## 2. Security Assumptions (Pre-ZK Phase)
|
|
25
|
+
|
|
26
|
+
HardKAS natively documents and enforces the evolutionary phases of the Kasplex/Igra bridge architecture.
|
|
27
|
+
|
|
28
|
+
### Variant: Trustless Exit Constraints
|
|
29
|
+
|
|
30
|
+
If an AI agent or a developer attempts to simulate a "trustless withdrawal" from L2 back to L1:
|
|
31
|
+
|
|
32
|
+
1. The `bridge-local` policy engine checks the `phase` metadata variable.
|
|
33
|
+
2. In the current `0.7.9-alpha` (Pre-ZK phase), `trustlessExit` is hardcoded to `false`.
|
|
34
|
+
3. The SDK throws a `PROTOCOL_ASSUMPTION_VIOLATION` if the user tries to assert a ZK exit proof that does not yet exist in the underlying protocol architecture.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hardkas/bridge-local",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.1-alpha",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -12,12 +12,12 @@
|
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@hardkas/
|
|
16
|
-
"@hardkas/
|
|
17
|
-
"@hardkas/
|
|
18
|
-
"@hardkas/config": "0.9.
|
|
19
|
-
"@hardkas/
|
|
20
|
-
"@hardkas/
|
|
15
|
+
"@hardkas/accounts": "0.9.1-alpha",
|
|
16
|
+
"@hardkas/core": "0.9.1-alpha",
|
|
17
|
+
"@hardkas/tx-builder": "0.9.1-alpha",
|
|
18
|
+
"@hardkas/config": "0.9.1-alpha",
|
|
19
|
+
"@hardkas/sessions": "0.9.1-alpha",
|
|
20
|
+
"@hardkas/artifacts": "0.9.1-alpha"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"tsup": "^8.3.5",
|