I am doing trying to initialize a new Protocol Kit as explained in this Safe tutorial: https://docs.safe.global/sdk/protocol-kit#confirm-the-transaction-second-confirmation
I have this piece of code
import Safe, {SafeConfig, SafeFactory} from "@safe-global/protocol-kit";
const protocolKit = await Safe.init({
provider: RPC_URL,
signer: OWNER_1_PRIVATE_KEY,
safeAddress: SAFE_ADDRESS
})
And when I run the code, it is returning this error:
const protocolKit = await Safe.init({
^
TypeError: Safe.init is not a function
I don't understand why... since I see that the init
function is defined here:
https://github.com/safe-global/safe-core-sdk/blob/main/packages/protocol-kit/src/Safe.ts#L100