Using "SubmitUserOp" on Krypcore, you may make it easier to communicate with your smart contract wallet. This function allows users to submit customised procedures, allowing for faster transaction processing and wallet settings updates. This simple submission method can help you streamline your digital asset management.
This deploys SubmitUserOp using this method.
API Specification
SubmitUserOp Details
POST
https://web3-proxy-dev.krypcore.com/api/v0/scWallet/SubmitUserOp
To get SubmitUserOp Details under the given instance.
Request Body
Copy {
"Data": "******",
"Message": "",
"Status": "SUCCESS"
}
Copy {
"message": "Invalid API key in request"
}
Copy {
"message": "Internal Server Error"
}
Take a look at how you might call this method using our official libraries, or via curl
Copy
curl --location 'https://web3-proxy-dev.krypcore.com/api/v0/scWallet/SubmitUserOp' \
--header 'DappId: *****' \
--header 'Authorization: *****' \
--header 'Content-Type: application/json' \
--data '{
"walletName":"ak10", "userOp": {"callData":"*****","callGasLimit":"0x34b8","initCode":"*****","maxFeePerGas":"0x6507a5c0","maxPriorityFeePerGas":"0x6507a5c0","nonce":"0x0","paymasterAndData":"0x","preVerificationGas":"0xc57e","sender":"*****","signature":"*****","verificationGasLimit":"0x53723"}
}'
Copy
var myHeaders = new Headers();
myHeaders.append("DappId", "*****");
myHeaders.append("Authorization", "*****");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"walletName": "ak10",
"userOp": {
"callData": "*****",
"callGasLimit": "0x34b8",
"initCode": "*****",
"maxFeePerGas": "0x6507a5c0",
"maxPriorityFeePerGas": "0x6507a5c0",
"nonce": "0x0",
"paymasterAndData": "0x",
"preVerificationGas": "0xc57e",
"sender": "*****",
"signature": "*****",
"verificationGasLimit": "0x53723"
}
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://web3-proxy-dev.krypcore.com/api/v0/scWallet/SubmitUserOp", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
Copy
import requests
import json
url = "https://web3-proxy-dev.krypcore.com/api/v0/scWallet/SubmitUserOp"
payload = json.dumps({
"walletName": "ak10",
"userOp": {
"callData": "*****",
"callGasLimit": "0x34b8",
"initCode": "*****",
"maxFeePerGas": "0x6507a5c0",
"maxPriorityFeePerGas": "0x6507a5c0",
"nonce": "0x0",
"paymasterAndData": "0x",
"preVerificationGas": "0xc57e",
"sender": "*****",
"signature": "*****",
"verificationGasLimit": "0x53723"
}
})
headers = {
'DappId': '*****',
'Authorization': '*****',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
Copy
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://web3-proxy-dev.krypcore.com/api/v0/scWallet/SubmitUserOp"
method := "POST"
payload := strings.NewReader(`{
"walletName":"ak10", "userOp": {"callData":"*****","callGasLimit":"0x34b8","initCode":"*****","maxFeePerGas":"0x6507a5c0","maxPriorityFeePerGas":"0x6507a5c0","nonce":"0x0","paymasterAndData":"0x","preVerificationGas":"0xc57e","sender":"*****","signature":"*****","verificationGasLimit":"0x53723"}
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("DappId", "*****")
req.Header.Add("Authorization", "*****")
req.Header.Add("Content-Type", "application/json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}