vechain-sdk-js icon indicating copy to clipboard operation
vechain-sdk-js copied to clipboard

Transaction and Contract modules :: Add the signer as input

Open Valazan opened this issue 1 year ago • 1 comments

Currently all the contract module functions (and some transaction-module functions) require signing, have the private key as an input. The idea is to replace the private key with a signer (an entity which is able to sign the transaction).

e.g.

    public load(
        address: string,
        abi: InterfaceAbi,
        callerPrivateKey?: string
    ): Contract {
        return new Contract(address, abi, this.thor, callerPrivateKey);
    }

Should become:

    public load(
        address: string,
        abi: InterfaceAbi,
        signer?: Signer
    ): Contract {
        return new Contract(address, abi, this.thor, signer);
    }
  • [x] #820
  • [ ] #821

Valazan avatar Feb 26 '24 16:02 Valazan

Dependency on #780

nwbrettski avatar Apr 08 '24 13:04 nwbrettski