@layerzerolabs/protocol-stellar-v2 0.2.61 → 0.2.62
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/docs/layerzero-v2-on-stellar.md +28 -10
- package/package.json +4 -4
- package/sdk/package.json +1 -1
|
@@ -139,7 +139,8 @@ Base framework for building cross-chain applications.
|
|
|
139
139
|
|
|
140
140
|
Standardized cross-chain token bridge implementation.
|
|
141
141
|
|
|
142
|
-
**Location**: `contracts/oapps/oft/`
|
|
142
|
+
**Location**: `contracts/oapps/oft-core/` (core traits) and `contracts/oapps/oft/`
|
|
143
|
+
(token types and extensions)
|
|
143
144
|
|
|
144
145
|
**Key traits**:
|
|
145
146
|
|
|
@@ -197,11 +198,15 @@ sequenceDiagram
|
|
|
197
198
|
participant OApp
|
|
198
199
|
|
|
199
200
|
rect rgb(240, 248, 255)
|
|
200
|
-
Note over DVN,
|
|
201
|
+
Note over DVN, ReceiveLib: Step 1a: DVN Attestation
|
|
201
202
|
Note over DVN: Monitor source chain for PacketSent
|
|
202
203
|
Note over DVN: Wait for block confirmations
|
|
203
|
-
DVN->>ReceiveLib: verify(packet_header, payload_hash)
|
|
204
|
+
DVN->>ReceiveLib: verify(dvn, packet_header, payload_hash, confirmations)
|
|
204
205
|
Note over ReceiveLib: Record DVN attestation
|
|
206
|
+
Note over ReceiveLib: (repeat for each DVN in quorum)
|
|
207
|
+
|
|
208
|
+
Note over ReceiveLib, Endpoint: Step 1b: Commit (permissionless)
|
|
209
|
+
ReceiveLib->>ReceiveLib: commit_verification(packet_header, payload_hash)
|
|
205
210
|
Note over ReceiveLib: Check if quorum reached
|
|
206
211
|
ReceiveLib->>Endpoint: verify(origin, receiver, payload_hash)
|
|
207
212
|
Note over Endpoint: Store payload_hash
|
|
@@ -372,17 +377,30 @@ EVM DVN Flow (external calls):
|
|
|
372
377
|
The self-call pattern for configuration fails on Soroban because the DVN cannot
|
|
373
378
|
call itself. The solution is to implement DVN as an **Abstract Account** (custom
|
|
374
379
|
account). Soroban's custom account interface allows contracts to define
|
|
375
|
-
authorization logic via `__check_auth`.
|
|
376
|
-
|
|
380
|
+
authorization logic via `__check_auth`. The DVN's `__check_auth` only authorizes
|
|
381
|
+
**self-calls** (calls targeting the DVN contract itself). For self-configuration,
|
|
382
|
+
the multisig quorum directly authorizes calls to the DVN's own functions (e.g.,
|
|
383
|
+
`set_admin`, `set_signer`). For external calls like `ULN302.verify()`, the DVN
|
|
384
|
+
exposes an `execute_transaction(calls)` function that is itself a self-call
|
|
385
|
+
validated by `__check_auth`, then dispatches each call to the target contract:
|
|
377
386
|
|
|
378
387
|
```
|
|
379
|
-
Stellar DVN Flow (Abstract Account):
|
|
388
|
+
Stellar DVN Flow (self-configuration via Abstract Account):
|
|
380
389
|
┌─────────────┐ ┌─────────────┐
|
|
381
|
-
│ Admin │───►│
|
|
382
|
-
│ (submits │ │
|
|
383
|
-
│ tx with │ │ │
|
|
384
|
-
│ DVN auth) │ │ │
|
|
390
|
+
│ Admin │───►│ DVN │ __check_auth validates multisig
|
|
391
|
+
│ (submits │ │ .set_admin()│ for the self-call
|
|
392
|
+
│ tx with │ │ │
|
|
393
|
+
│ DVN auth) │ │ │
|
|
385
394
|
└─────────────┘ └─────────────┘
|
|
395
|
+
|
|
396
|
+
Stellar DVN Flow (external calls via execute_transaction):
|
|
397
|
+
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
|
|
398
|
+
│ Admin │───►│ DVN │───►│ ULN302 │
|
|
399
|
+
│ (submits │ │ .execute_ │ │ .verify() │
|
|
400
|
+
│ tx with │ │ transaction│ │ │
|
|
401
|
+
│ DVN auth) │ │ (__check_ │ │ │
|
|
402
|
+
│ │ │ auth) │ │ │
|
|
403
|
+
└─────────────┘ └─────────────┘ └─────────────┘
|
|
386
404
|
```
|
|
387
405
|
|
|
388
406
|
The DVN's `__check_auth` validates:
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@layerzerolabs/protocol-stellar-v2",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.62",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "LZBL-1.2",
|
|
6
6
|
"devDependencies": {
|
|
7
7
|
"@types/node": "^22.18.6",
|
|
8
8
|
"tsx": "^4.19.3",
|
|
9
9
|
"typescript": "^5.8.2",
|
|
10
|
-
"@layerzerolabs/
|
|
11
|
-
"@layerzerolabs/
|
|
12
|
-
"@layerzerolabs/
|
|
10
|
+
"@layerzerolabs/vm-tooling-stellar": "0.2.62",
|
|
11
|
+
"@layerzerolabs/stellar-ts-bindings-gen": "0.2.62",
|
|
12
|
+
"@layerzerolabs/common-node-utils": "0.2.62"
|
|
13
13
|
},
|
|
14
14
|
"publishConfig": {
|
|
15
15
|
"access": "restricted",
|