@layerzerolabs/lz-solana-sdk-v2 3.0.2 → 3.0.3

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.mjs CHANGED
@@ -14,6 +14,7 @@ import { uniformFixedSizeArray, u8, FixableBeetArgsStruct, u32, u64, bytes, u16,
14
14
  import * as beetSolana85 from '@metaplex-foundation/beet-solana';
15
15
  import * as splToken from '@solana/spl-token';
16
16
  import { Environment, EndpointId } from '@layerzerolabs/lz-definitions';
17
+ import { secp256k1 } from '@layerzerolabs/lz-foundation';
17
18
  import crypto from 'crypto';
18
19
  import { sha256 } from '@ethersproject/sha2';
19
20
 
@@ -10715,8 +10716,12 @@ var SolanaSignerExt = class _SolanaSignerExt {
10715
10716
  return new _SolanaSignerExt(signers);
10716
10717
  }
10717
10718
  async sign(message) {
10718
- const { signWithECDSA } = await import('@layerzerolabs/lz-corekit-solana');
10719
- return Promise.all(this.signers.map(async (s) => signWithECDSA(message, s.ECDSAPrivateKey)));
10719
+ return Promise.all(
10720
+ this.signers.map(async (s) => {
10721
+ const rv = await secp256k1.signHash(message, s.ECDSAPrivateKey);
10722
+ return { signature: rv.slice(0, 64), recoveryId: rv[64] };
10723
+ })
10724
+ );
10720
10725
  }
10721
10726
  };
10722
10727
  var DVN = class {