@layerzerolabs/protocol-stellar-v2 0.2.90 → 0.2.92

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/sdk/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@layerzerolabs/lz-v2-stellar-sdk",
3
- "version": "0.2.90",
3
+ "version": "0.2.92",
4
4
  "private": false,
5
5
  "description": "TypeScript SDK for endpoint-v2 Stellar contract",
6
6
  "repository": {
@@ -14,7 +14,7 @@
14
14
  "types": "dist/index.d.ts",
15
15
  "scripts": {
16
16
  "build": "tsc",
17
- "test": "vitest --run --pass-with-no-tests --typecheck"
17
+ "test": "vitest"
18
18
  },
19
19
  "dependencies": {
20
20
  "@noble/hashes": "catalog:",
@@ -28,6 +28,7 @@
28
28
  "@layerzerolabs/protocol-stellar-v2": "workspace:*",
29
29
  "@layerzerolabs/tsup-configuration": "workspace:*",
30
30
  "@layerzerolabs/typescript-configuration": "workspace:*",
31
+ "@layerzerolabs/vitest-configuration": "workspace:*",
31
32
  "typescript": "catalog:",
32
33
  "vitest": "catalog:"
33
34
  },
@@ -38,8 +39,9 @@
38
39
  "externalRepoConfig": {
39
40
  "targets": [
40
41
  "audit-external",
41
- "onesig-client",
42
- "monorepo-external"
42
+ "console-pen-test",
43
+ "monorepo-external",
44
+ "onesig-client"
43
45
  ]
44
46
  },
45
47
  "implicitDependencies": {
@@ -5,10 +5,10 @@ import { beforeAll, describe, expect, inject, it } from 'vitest';
5
5
  import { getFullyQualifiedRepoRootPath } from '@layerzerolabs/common-node-utils';
6
6
  import { Options, PacketSerializer, PacketV1Codec } from '@layerzerolabs/lz-v2-utilities';
7
7
 
8
- import { Client as CounterClient } from '../src/generated/counter';
9
- import { Client as EndpointClient } from '../src/generated/endpoint';
10
- import { Client as ExecutorHelperClient } from '../src/generated/executor_helper';
11
- import { Client as SMLClient } from '../src/generated/sml';
8
+ import { Client as CounterClient } from '../src/generated/counter.js';
9
+ import { Client as EndpointClient } from '../src/generated/endpoint.js';
10
+ import { Client as ExecutorHelperClient } from '../src/generated/executor_helper.js';
11
+ import { Client as SMLClient } from '../src/generated/sml.js';
12
12
  import {
13
13
  DEFAULT_DEPLOYER,
14
14
  EID_A,
@@ -17,11 +17,11 @@ import {
17
17
  MSG_TYPE_ABA,
18
18
  MSG_TYPE_VANILLA,
19
19
  NETWORK_PASSPHRASE,
20
- } from './suites/constants';
21
- import { deployContract } from './suites/deploy';
22
- import type { ChainAddresses } from './suites/globalSetup';
23
- import { PacketSentEvent, scanPacketSentEvents } from './suites/scan';
24
- import { assertTransactionSucceeded, createClient, signAndSendWithExecutorAuth } from './utils';
20
+ } from './suites/constants.js';
21
+ import { deployContract } from './suites/deploy.js';
22
+ import type { ChainAddresses } from './suites/globalSetup.js';
23
+ import { PacketSentEvent, scanPacketSentEvents } from './suites/scan.js';
24
+ import { assertTransactionSucceeded, createClient, signAndSendWithExecutorAuth } from './utils.js';
25
25
 
26
26
  // Chain addresses (injected from globalSetup)
27
27
  let chainA: ChainAddresses;
@@ -5,10 +5,10 @@ import { beforeAll, describe, expect, inject, it } from 'vitest';
5
5
  import { getFullyQualifiedRepoRootPath } from '@layerzerolabs/common-node-utils';
6
6
  import { Options, PacketSerializer, PacketV1Codec } from '@layerzerolabs/lz-v2-utilities';
7
7
 
8
- import { Client as CounterClient } from '../src/generated/counter';
9
- import { Client as DvnClient } from '../src/generated/dvn';
10
- import { Client as ExecutorHelperClient } from '../src/generated/executor_helper';
11
- import { Client as Uln302Client } from '../src/generated/uln302';
8
+ import { Client as CounterClient } from '../src/generated/counter.js';
9
+ import { Client as DvnClient } from '../src/generated/dvn.js';
10
+ import { Client as ExecutorHelperClient } from '../src/generated/executor_helper.js';
11
+ import { Client as Uln302Client } from '../src/generated/uln302.js';
12
12
  import {
13
13
  DEFAULT_DEPLOYER,
14
14
  DVN_SIGNER,
@@ -19,17 +19,17 @@ import {
19
19
  MSG_TYPE_COMPOSED_ABA,
20
20
  MSG_TYPE_VANILLA,
21
21
  NETWORK_PASSPHRASE,
22
- } from './suites/constants';
23
- import { deployContract } from './suites/deploy';
24
- import type { ChainAddresses } from './suites/globalSetup';
25
- import { PacketSentEvent, scanPacketSentEvents } from './suites/scan';
22
+ } from './suites/constants.js';
23
+ import { deployContract } from './suites/deploy.js';
24
+ import type { ChainAddresses } from './suites/globalSetup.js';
25
+ import { PacketSentEvent, scanPacketSentEvents } from './suites/scan.js';
26
26
  import {
27
27
  assertTransactionSucceeded,
28
28
  createClient,
29
29
  getNativeBalance,
30
30
  signAndSendWithExecutorAuth,
31
31
  signDvnAuthEntries,
32
- } from './utils';
32
+ } from './utils.js';
33
33
 
34
34
  // Chain addresses (injected from globalSetup)
35
35
  let chainA: ChainAddresses;
@@ -14,11 +14,11 @@ import { beforeAll, describe, expect, inject, it } from 'vitest';
14
14
  import { getFullyQualifiedRepoRootPath } from '@layerzerolabs/common-node-utils';
15
15
  import { PacketSerializer, PacketV1Codec } from '@layerzerolabs/lz-v2-utilities';
16
16
 
17
- import { Client as EndpointClient } from '../src/generated/endpoint';
18
- import { Client as ExecutorHelperClient } from '../src/generated/executor_helper';
19
- import { Client as OFTClient, SendParam } from '../src/generated/oft';
20
- import { Client as SACManagerClient } from '../src/generated/sac_manager';
21
- import { Client as SMLClient } from '../src/generated/sml';
17
+ import { Client as EndpointClient } from '../src/generated/endpoint.js';
18
+ import { Client as ExecutorHelperClient } from '../src/generated/executor_helper.js';
19
+ import { Client as OFTClient, SendParam } from '../src/generated/oft.js';
20
+ import { Client as SACManagerClient } from '../src/generated/sac_manager.js';
21
+ import { Client as SMLClient } from '../src/generated/sml.js';
22
22
  import {
23
23
  DEFAULT_DEPLOYER,
24
24
  EID_A,
@@ -26,17 +26,17 @@ import {
26
26
  EXECUTOR_ADMIN,
27
27
  NETWORK_PASSPHRASE,
28
28
  RPC_URL,
29
- } from './suites/constants';
30
- import { deployAssetSac, deployContract } from './suites/deploy';
31
- import type { ChainAddresses } from './suites/globalSetup';
32
- import { fundAccount } from './suites/localnet';
33
- import { PacketSentEvent, scanPacketSentEvents } from './suites/scan';
29
+ } from './suites/constants.js';
30
+ import { deployAssetSac, deployContract } from './suites/deploy.js';
31
+ import type { ChainAddresses } from './suites/globalSetup.js';
32
+ import { fundAccount } from './suites/localnet.js';
33
+ import { PacketSentEvent, scanPacketSentEvents } from './suites/scan.js';
34
34
  import {
35
35
  assertTransactionSucceeded,
36
36
  createClient,
37
37
  getTokenBalance,
38
38
  signAndSendWithExecutorAuth,
39
- } from './utils';
39
+ } from './utils.js';
40
40
 
41
41
  // Chain addresses (injected from globalSetup)
42
42
  let chainA: ChainAddresses;
@@ -15,11 +15,11 @@ import { beforeAll, describe, expect, it } from 'vitest';
15
15
 
16
16
  import { getFullyQualifiedRepoRootPath } from '@layerzerolabs/common-node-utils';
17
17
 
18
- import { Client as SACManagerClient } from '../src/generated/sac_manager';
19
- import { DEFAULT_DEPLOYER, NETWORK_PASSPHRASE, RPC_URL } from './suites/constants';
20
- import { deployAssetSac, deployContract } from './suites/deploy';
21
- import { fundAccount } from './suites/localnet';
22
- import { getTokenAuthorized, getTokenBalance } from './utils';
18
+ import { Client as SACManagerClient } from '../src/generated/sac_manager.js';
19
+ import { DEFAULT_DEPLOYER, NETWORK_PASSPHRASE, RPC_URL } from './suites/constants.js';
20
+ import { deployAssetSac, deployContract } from './suites/deploy.js';
21
+ import { fundAccount } from './suites/localnet.js';
22
+ import { getTokenAuthorized, getTokenBalance } from './utils.js';
23
23
 
24
24
  // ============================================================================
25
25
  // Test Accounts
@@ -1,6 +1,6 @@
1
1
  import { Asset, Keypair, Networks } from '@stellar/stellar-sdk';
2
2
 
3
- import { Secp256k1KeyPair } from '../secp256k1';
3
+ import { Secp256k1KeyPair } from '../secp256k1.js';
4
4
 
5
5
  const CORE_URL = 'http://localhost:8086';
6
6
  export const RPC_URL = `${CORE_URL}/soroban/rpc`;
@@ -16,7 +16,7 @@ import {
16
16
  RPC_URL,
17
17
  ZRO_ASSET,
18
18
  ZRO_DISTRIBUTOR,
19
- } from './constants';
19
+ } from './constants.js';
20
20
 
21
21
  /**
22
22
  * Query and display the TTL (Time To Live) of uploaded WASM code
@@ -5,17 +5,17 @@ import type { GlobalSetupContext } from 'vitest/node';
5
5
 
6
6
  import { getFullyQualifiedRepoRootPath } from '@layerzerolabs/common-node-utils';
7
7
 
8
- import { Client as DvnClient } from '../../src/generated/dvn';
9
- import { Client as DvnFeeLibClient } from '../../src/generated/dvn_fee_lib';
10
- import { Client as EndpointClient } from '../../src/generated/endpoint';
11
- import { Client as ExecutorClient } from '../../src/generated/executor';
12
- import { Client as ExecutorFeeLibClient } from '../../src/generated/executor_fee_lib';
13
- import { Client as ExecutorHelperClient } from '../../src/generated/executor_helper';
14
- import { Client as PriceFeedClient } from '../../src/generated/price_feed';
15
- import { Client as SMLClient } from '../../src/generated/sml';
16
- import { Client as TreasuryClient } from '../../src/generated/treasury';
17
- import { Client as Uln302Client } from '../../src/generated/uln302';
18
- import { createClient } from '../utils';
8
+ import { Client as DvnClient } from '../../src/generated/dvn.js';
9
+ import { Client as DvnFeeLibClient } from '../../src/generated/dvn_fee_lib.js';
10
+ import { Client as EndpointClient } from '../../src/generated/endpoint.js';
11
+ import { Client as ExecutorClient } from '../../src/generated/executor.js';
12
+ import { Client as ExecutorFeeLibClient } from '../../src/generated/executor_fee_lib.js';
13
+ import { Client as ExecutorHelperClient } from '../../src/generated/executor_helper.js';
14
+ import { Client as PriceFeedClient } from '../../src/generated/price_feed.js';
15
+ import { Client as SMLClient } from '../../src/generated/sml.js';
16
+ import { Client as TreasuryClient } from '../../src/generated/treasury.js';
17
+ import { Client as Uln302Client } from '../../src/generated/uln302.js';
18
+ import { createClient } from '../utils.js';
19
19
  import {
20
20
  CHAIN_B_DEPLOYER,
21
21
  DEFAULT_DEPLOYER,
@@ -27,9 +27,9 @@ import {
27
27
  NATIVE_TOKEN_ADDRESS,
28
28
  RPC_URL,
29
29
  ZRO_TOKEN_ADDRESS,
30
- } from './constants';
31
- import { deployContract, uploadWasm } from './deploy';
32
- import { startStellarLocalnet, stopStellarLocalnet } from './localnet';
30
+ } from './constants.js';
31
+ import { deployContract, uploadWasm } from './deploy.js';
32
+ import { startStellarLocalnet, stopStellarLocalnet } from './localnet.js';
33
33
 
34
34
  /**
35
35
  * Addresses for a single chain's protocol contracts
@@ -1,6 +1,5 @@
1
- import { execSync } from 'child_process';
2
-
3
1
  import { BASE_FEE, Operation, rpc, TransactionBuilder } from '@stellar/stellar-sdk';
2
+ import { execSync } from 'node:child_process';
4
3
 
5
4
  import {
6
5
  CHAIN_B_DEPLOYER,
@@ -10,8 +9,8 @@ import {
10
9
  NETWORK_PASSPHRASE,
11
10
  RPC_URL,
12
11
  ZRO_DISTRIBUTOR,
13
- } from './constants';
14
- import { deployNativeSac, deployZroToken } from './deploy';
12
+ } from './constants.js';
13
+ import { deployNativeSac, deployZroToken } from './deploy.js';
15
14
 
16
15
  const CONTAINER_NAME = 'stellar-protocol-sdk';
17
16
  const ECR_IMAGE = '438003944538.dkr.ecr.us-east-1.amazonaws.com/layerzerolabs/stellar:2026-03-02';
@@ -1,6 +1,6 @@
1
1
  import { rpc, xdr } from '@stellar/stellar-sdk';
2
2
 
3
- import { RPC_URL } from './constants';
3
+ import { RPC_URL } from './constants.js';
4
4
 
5
5
  /**
6
6
  * Event filter for scanning contract events
@@ -70,13 +70,7 @@ export async function scanEvents(
70
70
  const parsedEvent: ParsedContractEvent = {
71
71
  type: event.type,
72
72
  contractId: event.contractId?.contractId() || '',
73
- topics: event.topic.map((t) => {
74
- try {
75
- return xdr.ScVal.fromXDR(Buffer.from(t, 'base64'));
76
- } catch {
77
- return t;
78
- }
79
- }),
73
+ topics: event.topic,
80
74
  data: event.value ? xdr.ScVal.fromXDR(event.value.toXDR()) : undefined,
81
75
  ledger: event.ledger,
82
76
  txHash: event.txHash,
@@ -6,17 +6,17 @@ import { describe, expect, it } from 'vitest';
6
6
 
7
7
  import { getFullyQualifiedRepoRootPath } from '@layerzerolabs/common-node-utils';
8
8
 
9
- import { Client as DvnClient } from '../src/generated/dvn';
10
- import { Client as UpgraderClient } from '../src/generated/upgrader';
9
+ import { Client as DvnClient } from '../src/generated/dvn.js';
10
+ import { Client as UpgraderClient } from '../src/generated/upgrader.js';
11
11
  import {
12
12
  DEFAULT_DEPLOYER,
13
13
  DVN_SIGNER,
14
14
  DVN_VID,
15
15
  NETWORK_PASSPHRASE,
16
16
  RPC_URL,
17
- } from './suites/constants';
18
- import { deployContract, uploadWasm } from './suites/deploy';
19
- import { signDvnAuthEntries } from './utils';
17
+ } from './suites/constants.js';
18
+ import { deployContract, uploadWasm } from './suites/deploy.js';
19
+ import { signDvnAuthEntries } from './utils.js';
20
20
 
21
21
  let upgraderClient: UpgraderClient;
22
22
  let dvnClient: DvnClient;
package/sdk/test/utils.ts CHANGED
@@ -15,12 +15,13 @@ import {
15
15
  } from '@stellar/stellar-sdk';
16
16
  import * as rpc from '@stellar/stellar-sdk/rpc';
17
17
 
18
+ import { Secp256k1KeyPair } from './secp256k1.js';
18
19
  import {
19
20
  DEFAULT_DEPLOYER,
20
21
  NATIVE_TOKEN_ADDRESS,
21
22
  NETWORK_PASSPHRASE,
22
23
  RPC_URL,
23
- } from './suites/constants';
24
+ } from './suites/constants.js';
24
25
 
25
26
  // ============================================================================
26
27
  // Client Factory Helper
@@ -152,8 +153,6 @@ export async function getTokenAuthorized(
152
153
  return false;
153
154
  }
154
155
 
155
- import { Secp256k1KeyPair } from './secp256k1';
156
-
157
156
  // ============================================================================
158
157
  // DVN Abstract Account Auth Signing
159
158
  // ============================================================================
@@ -0,0 +1,10 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "incremental": false,
5
+ "noEmit": true,
6
+ "rootDir": "."
7
+ },
8
+ "include": ["**/*"],
9
+ "exclude": ["dist", "node_modules"]
10
+ }
@@ -1,4 +1,4 @@
1
- import { defineConfig } from 'vitest/config';
1
+ import { defineConfig } from '@layerzerolabs/vitest-configuration';
2
2
 
3
3
  export default defineConfig({
4
4
  test: {