import { utils as t } from "@defuse-protocol/internal-utils";
import a from "bs58";
class c {
  constructor(e, n) {
    this.account = e, this.solanaWallet = n;
  }
  async signIntent(e) {
    const n = JSON.stringify({
      verifying_contract: e.verifying_contract,
      deadline: e.deadline,
      nonce: e.nonce,
      intents: e.intents,
      signer_id: e.signer_id ?? t.authHandleToIntentsUserId({
        identifier: this.account.walletAddress,
        method: "solana"
      })
    }), s = await this.solanaWallet.signMessage(
      new TextEncoder().encode(n)
    );
    return {
      payload: n,
      public_key: this.account.walletAddress,
      standard: "raw_ed25519",
      signature: a.encode(s)
    };
  }
}
export {
  c as IntentSignerSolana
};
//# sourceMappingURL=solana.js.map
