Create And Execute Txn

The "Create and Execute Transaction" feature in the KrypC wallet-dev Service API enables users to seamlessly generate and execute transactions on the blockchain, providing a straightforward method for interacting with digital assets and facilitating secure financial transactions.

This will allow to create a transaction and execute transactions in the network.

API Specification

Create And Execute Txn API

POST https://api.krypcore.com/api/v0/devWallet/createAndExecuteTx

To create and execute Txn API under given instance.

Headers

NameTypeDescription

DappId*

String

DappId

Authorization*

String

User Auth key obtained

Request Body

NameTypeDescription

privateKey*

String

Private key

to*

String

To Address

chainId*

String

Chain ID

method*

String

Method

params*

String

Params

isContractTxn*

String

IsContractTxn

contractABI*

String

ContractABI

{
    "Data": {
        "txHash": "0x1de7289389106c8cdd6b244aab2b73bab5231d79e149210b68baa536564f47cb"
    },
    "Message": "Signed and executed txn successfully",
    "Status": "SUCCESS"
}

Take a look at how you might call this method using our official libraries, or via curl


curl --location 'https://api.krypcore.com/api/v0/devWallet/createAndExecuteTx' \
--header 'DappId: **********' \
--header 'Authorization: **********' \
--header 'subscriptionId: ********' \
--header 'Content-Type: application/json' \
--data '{
    "privateKey": "**********",
    "to": "**********",
    "chainId": 80001,
    "method": "store",
    "params": [
        {
            "type": "uint256",
            "value": "35"
        }
    ],
    "isContractTxn": true,
    "contractABI": "[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"num\",\"type\":\"uint256\"}],\"name\":\"store\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"retrieve\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]"
}'

Last updated