Unable to propose a transaction with Safe API Kit v2.5.11

Hello everyone, I’m trying to propose a transaction using Safe API Kit v 2.5.11 but I’m getting error ‘Not Found’

const Safe = require("@safe-global/protocol-kit");
const { ethers } = require("ethers");
const SafeApiKit = require("@safe-global/api-kit");
const {
  OperationType
} = require('@safe-global/types-kit');
const provider = new ethers.JsonRpcProvider("https://sepolia.base.org");

const transferCalled = async () => {
  const network = await provider.getNetwork();
  const chainId = network.chainId;
  const apiKit = new SafeApiKit.default({
    chainId: chainId,
  });
  const protocolKitOwner1 = await Safe.default.init({
    provider: RPC_URL,
    signer: OWNER_1_PRIVATE_KEY,
    safeAddress: SAFE_ADDRESS,
  });
  const safeTransactionData = {
    to: OWNER2,
    value: "1", // 1 wei
    data: "0x",
    operation: OperationType.Call,
  };
  const safeTransaction = await protocolKitOwner1.createTransaction({
    transactions: [safeTransactionData],
  });
  const safeTxHash = await protocolKitOwner1.getTransactionHash(
    safeTransaction
  );
  const signature = await protocolKitOwner1.signHash(safeTxHash);
  // Propose transaction to the service
  await apiKit.proposeTransaction({
    safeAddress: SAFE_ADDRESS,
    safeTransactionData: safeTransaction.data,
    safeTxHash,
    senderAddress: OWNER_1_ADDRESS,
    senderSignature: signature.data,
    origin:"My App"
  });

};
transferCalled();

what am I doing wrong ?

I’ve followed this documentation .

My config :
NodeJS : v20
Blockchain : Base Sepolia
@safe-global/api-kit”: “^2.5.11”,
@safe-global/protocol-kit”: “^5.2.4”,
@safe-global/types-kit”: “^1.0.4”,

1 Like

Hi there. The team have closed the external use of the transaction service for now and don’t have the timeline as to when this will be externally available again.

You can find instructions on how to set up your own service here:
safe-infrastructure/docs/running_locally.md at main · safe-global/safe-infrastructure · GitHub

Should you have any questions, please post your question here -
Newest 'safe-core' Questions - Ethereum Stack Exchange
Please be as detailed as possible and don’t forget to add safe-core tag to your question :folded_hands: StackOverflow’s guide to asking a good question may be helpful:
How do I ask a good question? - Help Center - Stack Overflow

2 Likes

thanks @cindylo0 , will keep in mind from next time

1 Like

Safe API has been fully restored. Please see update here - https://x.com/safe/status/1897993923773243860

2 Likes

thanks for the update @cindylo0

1 Like