<p>I'm working through the beneficiary vesting example where we have two beneficiaries: beneficiary 2 (giver who can reclaim funds after deadline), and beneficiary 1 (must claim gift before deadline).</p>
<p>In the demo lucid claim function, i tried to parametrize the signer function like so</p>
<pre><code>async function claimVestedFunds(beneficiary: string): Promise&lt;TxHash&gt; {...
</code></pre>
<p>But I set up the wallet from the point of view of beneficiary 2 (wallet address):</p>
<pre><code>lucid.selectWalletFromSeed(secretSeed);
const addr: Address = await lucid.wallet.address();
const details: AddressDetails = getAddressDetails(addr);
const beneficiary2: string = details.paymentCredential.hash
</code></pre>
<p>Then I hard-coded beneficiary 1 PKH into the Vesting datum, but I'm not sure how to get 1 to do the signing in <code>claimVestedFunds</code></p>
<pre><code>      const tx = await lucid
            .newTx()
            .collectFrom(ourUTxO, Data.void())    
            .addSignerKey(beneficiary)              
            .attachSpendingValidator(mistery1)
            .validFrom(Date.now()-100000)
            .complete();
</code></pre>
<p>I thought this would work because these two beneficiaries are actually derived from the same seed phrase (i control both accounts).</p>
<p>My code appears to allow beneficiary 2 to vest and reclaim, but i'm not sure how to allow beneficiary 1 to sign</p>

<plutus-pioneer-program><nami-wallet><lucid>
Lucid Vesting demo, signing from two different accounts but same seed
# Lucid Vesting demo, signing from two different accounts but same seed

(Asked by: username_0 on 2023-06-30)

I'm working through the beneficiary vesting example where we have two beneficiaries: beneficiary 2 (giver who can reclaim funds after deadline), and beneficiary 1 (must claim gift before deadline).
In the demo lucid claim function, i tried to parametrize the signer function like so
async function claimVestedFunds(beneficiary: string): Promise {...

But I set up the wallet from the point of view of beneficiary 2 (wallet address):
lucid.selectWalletFromSeed(secretSeed);
const addr: Address = await lucid.wallet.address();
const details: AddressDetails = getAddressDetails(addr);
const beneficiary2: string = details.paymentCredential.hash

Then I hard-coded beneficiary 1 PKH into the Vesting datum, but I'm not sure how to get 1 to do the signing in claimVestedFunds
      const tx = await lucid
            .newTx()
            .collectFrom(ourUTxO, Data.void())    
            .addSignerKey(beneficiary)              
            .attachSpendingValidator(mistery1)
            .validFrom(Date.now()-100000)
            .complete();

I thought this would work because these two beneficiaries are actually derived from the same seed phrase (i control both accounts).
My code appears to allow beneficiary 2 to vest and reclaim, but i'm not sure how to allow beneficiary 1 to sign

**Tags:** plutus-pioneer-program, nami-wallet, lucid

---

## 0 answers

