curl --request POST \
--url https://app.dynamicauth.com/api/v0/sdk/{environmentId}/waas/{walletId}/transactions/signAndBroadcast \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-idempotency-key: <x-idempotency-key>' \
--data '
{
"transaction": {
"evm": {
"to": "<string>",
"value": "<string>",
"data": "<string>",
"nonce": "<string>",
"gas": "<string>",
"fees": [
{
"gasPrice": "<string>",
"maxFeePerGas": "<string>",
"maxPriorityFeePerGas": "<string>"
}
],
"maxFeePerBlobGas": "<string>",
"blobVersionedHashes": [
"<string>"
]
}
},
"requestedCertainty": "safe",
"externalReference": "<string>",
"roomIds": [
"<string>"
],
"shareSetId": "95b11417-f18f-457f-8804-68e361f9164f"
}
'import requests
url = "https://app.dynamicauth.com/api/v0/sdk/{environmentId}/waas/{walletId}/transactions/signAndBroadcast"
payload = {
"transaction": { "evm": {
"to": "<string>",
"value": "<string>",
"data": "<string>",
"nonce": "<string>",
"gas": "<string>",
"fees": [
{
"gasPrice": "<string>",
"maxFeePerGas": "<string>",
"maxPriorityFeePerGas": "<string>"
}
],
"maxFeePerBlobGas": "<string>",
"blobVersionedHashes": ["<string>"]
} },
"requestedCertainty": "safe",
"externalReference": "<string>",
"roomIds": ["<string>"],
"shareSetId": "95b11417-f18f-457f-8804-68e361f9164f"
}
headers = {
"x-idempotency-key": "<x-idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-idempotency-key': '<x-idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
transaction: {
evm: {
to: '<string>',
value: '<string>',
data: '<string>',
nonce: '<string>',
gas: '<string>',
fees: [
{
gasPrice: '<string>',
maxFeePerGas: '<string>',
maxPriorityFeePerGas: '<string>'
}
],
maxFeePerBlobGas: '<string>',
blobVersionedHashes: ['<string>']
}
},
requestedCertainty: 'safe',
externalReference: '<string>',
roomIds: ['<string>'],
shareSetId: '95b11417-f18f-457f-8804-68e361f9164f'
})
};
fetch('https://app.dynamicauth.com/api/v0/sdk/{environmentId}/waas/{walletId}/transactions/signAndBroadcast', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.dynamicauth.com/api/v0/sdk/{environmentId}/waas/{walletId}/transactions/signAndBroadcast",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'transaction' => [
'evm' => [
'to' => '<string>',
'value' => '<string>',
'data' => '<string>',
'nonce' => '<string>',
'gas' => '<string>',
'fees' => [
[
'gasPrice' => '<string>',
'maxFeePerGas' => '<string>',
'maxPriorityFeePerGas' => '<string>'
]
],
'maxFeePerBlobGas' => '<string>',
'blobVersionedHashes' => [
'<string>'
]
]
],
'requestedCertainty' => 'safe',
'externalReference' => '<string>',
'roomIds' => [
'<string>'
],
'shareSetId' => '95b11417-f18f-457f-8804-68e361f9164f'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-idempotency-key: <x-idempotency-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.dynamicauth.com/api/v0/sdk/{environmentId}/waas/{walletId}/transactions/signAndBroadcast"
payload := strings.NewReader("{\n \"transaction\": {\n \"evm\": {\n \"to\": \"<string>\",\n \"value\": \"<string>\",\n \"data\": \"<string>\",\n \"nonce\": \"<string>\",\n \"gas\": \"<string>\",\n \"fees\": [\n {\n \"gasPrice\": \"<string>\",\n \"maxFeePerGas\": \"<string>\",\n \"maxPriorityFeePerGas\": \"<string>\"\n }\n ],\n \"maxFeePerBlobGas\": \"<string>\",\n \"blobVersionedHashes\": [\n \"<string>\"\n ]\n }\n },\n \"requestedCertainty\": \"safe\",\n \"externalReference\": \"<string>\",\n \"roomIds\": [\n \"<string>\"\n ],\n \"shareSetId\": \"95b11417-f18f-457f-8804-68e361f9164f\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-idempotency-key", "<x-idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.dynamicauth.com/api/v0/sdk/{environmentId}/waas/{walletId}/transactions/signAndBroadcast")
.header("x-idempotency-key", "<x-idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"transaction\": {\n \"evm\": {\n \"to\": \"<string>\",\n \"value\": \"<string>\",\n \"data\": \"<string>\",\n \"nonce\": \"<string>\",\n \"gas\": \"<string>\",\n \"fees\": [\n {\n \"gasPrice\": \"<string>\",\n \"maxFeePerGas\": \"<string>\",\n \"maxPriorityFeePerGas\": \"<string>\"\n }\n ],\n \"maxFeePerBlobGas\": \"<string>\",\n \"blobVersionedHashes\": [\n \"<string>\"\n ]\n }\n },\n \"requestedCertainty\": \"safe\",\n \"externalReference\": \"<string>\",\n \"roomIds\": [\n \"<string>\"\n ],\n \"shareSetId\": \"95b11417-f18f-457f-8804-68e361f9164f\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.dynamicauth.com/api/v0/sdk/{environmentId}/waas/{walletId}/transactions/signAndBroadcast")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-idempotency-key"] = '<x-idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"transaction\": {\n \"evm\": {\n \"to\": \"<string>\",\n \"value\": \"<string>\",\n \"data\": \"<string>\",\n \"nonce\": \"<string>\",\n \"gas\": \"<string>\",\n \"fees\": [\n {\n \"gasPrice\": \"<string>\",\n \"maxFeePerGas\": \"<string>\",\n \"maxPriorityFeePerGas\": \"<string>\"\n }\n ],\n \"maxFeePerBlobGas\": \"<string>\",\n \"blobVersionedHashes\": [\n \"<string>\"\n ]\n }\n },\n \"requestedCertainty\": \"safe\",\n \"externalReference\": \"<string>\",\n \"roomIds\": [\n \"<string>\"\n ],\n \"shareSetId\": \"95b11417-f18f-457f-8804-68e361f9164f\"\n}"
response = http.request(request)
puts response.read_body{
"transactionId": "95b11417-f18f-457f-8804-68e361f9164f",
"status": "pending_signature",
"chainType": "evm",
"chainId": "<string>",
"walletAddress": "<string>",
"idempotencyKey": "<string>",
"requestedAt": "2023-11-07T05:31:56Z",
"reason": "never_sent",
"errorMessage": "<string>",
"revertReason": "<string>",
"externalReference": "<string>",
"transactionHash": "<string>",
"blockExplorerUrls": [
"<string>"
],
"attempts": [
{
"live": true,
"transactionHash": "<string>",
"fee": {
"gasPrice": "<string>",
"maxFeePerGas": "<string>",
"maxPriorityFeePerGas": "<string>"
},
"blockExplorerUrls": [
"<string>"
]
}
],
"nonce": "<string>",
"replacementFee": {
"gasPrice": "<string>",
"maxFeePerGas": "<string>",
"maxPriorityFeePerGas": "<string>"
},
"rooms": [
{
"roomId": "<string>",
"serverKeygenIds": [
"<string>"
],
"newServerKeygenIds": [
"<string>"
],
"walletId": "95b11417-f18f-457f-8804-68e361f9164f"
}
],
"progress": {
"reached": 1,
"required": 2,
"elapsedSeconds": 1,
"detail": {
"evm": {
"confirmations": 1,
"requiredConfirmations": 2
},
"svm": {
"commitment": "processed",
"requiredCommitment": "processed"
}
}
},
"completedAt": "2023-11-07T05:31:56Z"
}{
"error": "<string>"
}{
"error": "No jwt provided!"
}{
"error": "Access Forbidden"
}{
"error": "Not Found",
"code": "not_found"
}{
"error": "Resources already exists for this Object",
"code": "email_cannot_be_null",
"payload": {
"email": "joe@email.com",
"loginProvider": "emailOnly",
"embeddedWalletName": "<string>",
"embeddedSocialSigninProvider": "emailOnly",
"mergeConflicts": {
"fromUser": {
"id": "95b11417-f18f-457f-8804-68e361f9164f",
"projectEnvironmentId": "95b11417-f18f-457f-8804-68e361f9164f",
"verifiedCredentials": [
{
"id": "95b11417-f18f-457f-8804-68e361f9164f-zerodev",
"format": "blockchain",
"signInEnabled": true,
"address": "0xbF394748301603f18d953C90F0b087CBEC0E1834",
"chain": "<string>",
"refId": "95b11417-f18f-457f-8804-68e361f9164f",
"signerRefId": "95b11417-f18f-457f-8804-68e361f9164f",
"email": "jsmith@example.com",
"name_service": {
"avatar": "<string>",
"name": "<string>"
},
"public_identifier": "<string>",
"wallet_name": "<string>",
"wallet_provider": "browserExtension",
"wallet_properties": {
"turnkeySubOrganizationId": "95b11417-f18f-457f-8804-68e361f9164f",
"turnkeyPrivateKeyId": "95b11417-f18f-457f-8804-68e361f9164f",
"turnkeyHDWalletId": "95b11417-f18f-457f-8804-68e361f9164f",
"isAuthenticatorAttached": true,
"turnkeyUserId": "95b11417-f18f-457f-8804-68e361f9164f",
"isSessionKeyCompatible": true,
"version": "V1",
"ecdsaProviderType": "zerodev_signer_to_ecdsa",
"entryPointVersion": "v6",
"kernelVersion": "v2_4"
},
"business_account_properties": {
"businessAccountId": "95b11417-f18f-457f-8804-68e361f9164f",
"businessAccountCreatedAt": "2023-11-07T05:31:56Z",
"businessAccountSignerId": "95b11417-f18f-457f-8804-68e361f9164f",
"businessAccountSignerType": "endUser",
"businessAccountMemberRole": "cfo",
"businessAccountName": "<string>",
"businessAccountExternalRef": "<string>"
},
"oauth_provider": "emailOnly",
"oauth_username": "<string>",
"oauth_display_name": "<string>",
"oauth_account_id": "<string>",
"phoneNumber": "9171113333",
"phoneCountryCode": "1",
"isoCountryCode": "US",
"oauth_account_photos": [
"<string>"
],
"oauth_emails": [
"<string>"
],
"oauth_metadata": {},
"previous_users": [
"95b11417-f18f-457f-8804-68e361f9164f"
],
"embedded_wallet_id": "<string>",
"wallet_additional_addresses": [
{
"address": "<string>",
"type": "ordinals",
"publicKey": "<string>",
"network": "<string>"
}
],
"lastSelectedAt": "2023-11-07T05:31:56Z",
"verifiedAt": "2023-11-07T05:31:56Z"
}
],
"lastVerifiedCredentialId": "95b11417-f18f-457f-8804-68e361f9164f-zerodev",
"sessionId": "95b11417-f18f-457f-8804-68e361f9164f",
"alias": "An example name",
"country": "US",
"email": "jsmith@example.com",
"firstName": "An example name",
"jobTitle": "An example name",
"lastName": "An example name",
"phoneNumber": "<string>",
"policiesConsent": true,
"tShirtSize": "An example name",
"team": "An example name",
"username": "An example name",
"firstVisit": "2023-11-07T05:31:56Z",
"lastVisit": "2023-11-07T05:31:56Z",
"newUser": true,
"metadata": {},
"mfaBackupCodeAcknowledgement": "pending",
"btcWallet": "<string>",
"kdaWallet": "<string>",
"ltcWallet": "<string>",
"ckbWallet": "<string>",
"kasWallet": "<string>",
"dogeWallet": "<string>",
"emailNotification": true,
"discordNotification": true,
"newsletterNotification": true,
"lists": [
"<string>"
],
"scope": "superuser marketing operations",
"missingFields": [
{
"name": "<string>",
"required": true,
"enabled": true,
"unique": true,
"verify": true,
"type": "standard",
"validationRules": {
"unique": true,
"regex": "^0x",
"validOptions": [
{
"label": "small"
},
{
"label": "medium"
},
{
"label": "large"
}
],
"checkboxText": "Agree to the terms and conditions"
},
"validationType": "text",
"label": "<string>",
"position": 123
}
]
},
"conflicts": [
{
"field": {
"name": "<string>",
"required": true,
"enabled": true,
"unique": true,
"verify": true,
"type": "standard",
"validationRules": {
"unique": true,
"regex": "^0x",
"validOptions": [
{
"label": "small"
},
{
"label": "medium"
},
{
"label": "large"
}
],
"checkboxText": "Agree to the terms and conditions"
},
"validationType": "text",
"label": "<string>",
"position": 123
},
"fromUser": {
"userId": "95b11417-f18f-457f-8804-68e361f9164f",
"value": "An example name"
},
"currentUser": {
"userId": "95b11417-f18f-457f-8804-68e361f9164f",
"value": "An example name"
}
}
]
},
"intent": {},
"additionalMessages": [
"<string>"
]
}
}{
"error": "Resources already exists for this Object",
"code": "email_cannot_be_null",
"payload": {
"email": "joe@email.com",
"loginProvider": "emailOnly",
"embeddedWalletName": "<string>",
"embeddedSocialSigninProvider": "emailOnly",
"mergeConflicts": {
"fromUser": {
"id": "95b11417-f18f-457f-8804-68e361f9164f",
"projectEnvironmentId": "95b11417-f18f-457f-8804-68e361f9164f",
"verifiedCredentials": [
{
"id": "95b11417-f18f-457f-8804-68e361f9164f-zerodev",
"format": "blockchain",
"signInEnabled": true,
"address": "0xbF394748301603f18d953C90F0b087CBEC0E1834",
"chain": "<string>",
"refId": "95b11417-f18f-457f-8804-68e361f9164f",
"signerRefId": "95b11417-f18f-457f-8804-68e361f9164f",
"email": "jsmith@example.com",
"name_service": {
"avatar": "<string>",
"name": "<string>"
},
"public_identifier": "<string>",
"wallet_name": "<string>",
"wallet_provider": "browserExtension",
"wallet_properties": {
"turnkeySubOrganizationId": "95b11417-f18f-457f-8804-68e361f9164f",
"turnkeyPrivateKeyId": "95b11417-f18f-457f-8804-68e361f9164f",
"turnkeyHDWalletId": "95b11417-f18f-457f-8804-68e361f9164f",
"isAuthenticatorAttached": true,
"turnkeyUserId": "95b11417-f18f-457f-8804-68e361f9164f",
"isSessionKeyCompatible": true,
"version": "V1",
"ecdsaProviderType": "zerodev_signer_to_ecdsa",
"entryPointVersion": "v6",
"kernelVersion": "v2_4"
},
"business_account_properties": {
"businessAccountId": "95b11417-f18f-457f-8804-68e361f9164f",
"businessAccountCreatedAt": "2023-11-07T05:31:56Z",
"businessAccountSignerId": "95b11417-f18f-457f-8804-68e361f9164f",
"businessAccountSignerType": "endUser",
"businessAccountMemberRole": "cfo",
"businessAccountName": "<string>",
"businessAccountExternalRef": "<string>"
},
"oauth_provider": "emailOnly",
"oauth_username": "<string>",
"oauth_display_name": "<string>",
"oauth_account_id": "<string>",
"phoneNumber": "9171113333",
"phoneCountryCode": "1",
"isoCountryCode": "US",
"oauth_account_photos": [
"<string>"
],
"oauth_emails": [
"<string>"
],
"oauth_metadata": {},
"previous_users": [
"95b11417-f18f-457f-8804-68e361f9164f"
],
"embedded_wallet_id": "<string>",
"wallet_additional_addresses": [
{
"address": "<string>",
"type": "ordinals",
"publicKey": "<string>",
"network": "<string>"
}
],
"lastSelectedAt": "2023-11-07T05:31:56Z",
"verifiedAt": "2023-11-07T05:31:56Z"
}
],
"lastVerifiedCredentialId": "95b11417-f18f-457f-8804-68e361f9164f-zerodev",
"sessionId": "95b11417-f18f-457f-8804-68e361f9164f",
"alias": "An example name",
"country": "US",
"email": "jsmith@example.com",
"firstName": "An example name",
"jobTitle": "An example name",
"lastName": "An example name",
"phoneNumber": "<string>",
"policiesConsent": true,
"tShirtSize": "An example name",
"team": "An example name",
"username": "An example name",
"firstVisit": "2023-11-07T05:31:56Z",
"lastVisit": "2023-11-07T05:31:56Z",
"newUser": true,
"metadata": {},
"mfaBackupCodeAcknowledgement": "pending",
"btcWallet": "<string>",
"kdaWallet": "<string>",
"ltcWallet": "<string>",
"ckbWallet": "<string>",
"kasWallet": "<string>",
"dogeWallet": "<string>",
"emailNotification": true,
"discordNotification": true,
"newsletterNotification": true,
"lists": [
"<string>"
],
"scope": "superuser marketing operations",
"missingFields": [
{
"name": "<string>",
"required": true,
"enabled": true,
"unique": true,
"verify": true,
"type": "standard",
"validationRules": {
"unique": true,
"regex": "^0x",
"validOptions": [
{
"label": "small"
},
{
"label": "medium"
},
{
"label": "large"
}
],
"checkboxText": "Agree to the terms and conditions"
},
"validationType": "text",
"label": "<string>",
"position": 123
}
]
},
"conflicts": [
{
"field": {
"name": "<string>",
"required": true,
"enabled": true,
"unique": true,
"verify": true,
"type": "standard",
"validationRules": {
"unique": true,
"regex": "^0x",
"validOptions": [
{
"label": "small"
},
{
"label": "medium"
},
{
"label": "large"
}
],
"checkboxText": "Agree to the terms and conditions"
},
"validationType": "text",
"label": "<string>",
"position": 123
},
"fromUser": {
"userId": "95b11417-f18f-457f-8804-68e361f9164f",
"value": "An example name"
},
"currentUser": {
"userId": "95b11417-f18f-457f-8804-68e361f9164f",
"value": "An example name"
}
}
]
},
"intent": {},
"additionalMessages": [
"<string>"
]
}
}{
"error": "Too Many Requests"
}{
"error": "Internal Server Error"
}Sign a transaction with a WaaS wallet and send it
Opens a signing room per attempt and returns the transaction record. Once signing finishes, Dynamic assembles the transaction and sends it; the signed transaction is never returned. Repeating the idempotency key with the same transaction returns the original record.
curl --request POST \
--url https://app.dynamicauth.com/api/v0/sdk/{environmentId}/waas/{walletId}/transactions/signAndBroadcast \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-idempotency-key: <x-idempotency-key>' \
--data '
{
"transaction": {
"evm": {
"to": "<string>",
"value": "<string>",
"data": "<string>",
"nonce": "<string>",
"gas": "<string>",
"fees": [
{
"gasPrice": "<string>",
"maxFeePerGas": "<string>",
"maxPriorityFeePerGas": "<string>"
}
],
"maxFeePerBlobGas": "<string>",
"blobVersionedHashes": [
"<string>"
]
}
},
"requestedCertainty": "safe",
"externalReference": "<string>",
"roomIds": [
"<string>"
],
"shareSetId": "95b11417-f18f-457f-8804-68e361f9164f"
}
'import requests
url = "https://app.dynamicauth.com/api/v0/sdk/{environmentId}/waas/{walletId}/transactions/signAndBroadcast"
payload = {
"transaction": { "evm": {
"to": "<string>",
"value": "<string>",
"data": "<string>",
"nonce": "<string>",
"gas": "<string>",
"fees": [
{
"gasPrice": "<string>",
"maxFeePerGas": "<string>",
"maxPriorityFeePerGas": "<string>"
}
],
"maxFeePerBlobGas": "<string>",
"blobVersionedHashes": ["<string>"]
} },
"requestedCertainty": "safe",
"externalReference": "<string>",
"roomIds": ["<string>"],
"shareSetId": "95b11417-f18f-457f-8804-68e361f9164f"
}
headers = {
"x-idempotency-key": "<x-idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-idempotency-key': '<x-idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
transaction: {
evm: {
to: '<string>',
value: '<string>',
data: '<string>',
nonce: '<string>',
gas: '<string>',
fees: [
{
gasPrice: '<string>',
maxFeePerGas: '<string>',
maxPriorityFeePerGas: '<string>'
}
],
maxFeePerBlobGas: '<string>',
blobVersionedHashes: ['<string>']
}
},
requestedCertainty: 'safe',
externalReference: '<string>',
roomIds: ['<string>'],
shareSetId: '95b11417-f18f-457f-8804-68e361f9164f'
})
};
fetch('https://app.dynamicauth.com/api/v0/sdk/{environmentId}/waas/{walletId}/transactions/signAndBroadcast', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.dynamicauth.com/api/v0/sdk/{environmentId}/waas/{walletId}/transactions/signAndBroadcast",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'transaction' => [
'evm' => [
'to' => '<string>',
'value' => '<string>',
'data' => '<string>',
'nonce' => '<string>',
'gas' => '<string>',
'fees' => [
[
'gasPrice' => '<string>',
'maxFeePerGas' => '<string>',
'maxPriorityFeePerGas' => '<string>'
]
],
'maxFeePerBlobGas' => '<string>',
'blobVersionedHashes' => [
'<string>'
]
]
],
'requestedCertainty' => 'safe',
'externalReference' => '<string>',
'roomIds' => [
'<string>'
],
'shareSetId' => '95b11417-f18f-457f-8804-68e361f9164f'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-idempotency-key: <x-idempotency-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.dynamicauth.com/api/v0/sdk/{environmentId}/waas/{walletId}/transactions/signAndBroadcast"
payload := strings.NewReader("{\n \"transaction\": {\n \"evm\": {\n \"to\": \"<string>\",\n \"value\": \"<string>\",\n \"data\": \"<string>\",\n \"nonce\": \"<string>\",\n \"gas\": \"<string>\",\n \"fees\": [\n {\n \"gasPrice\": \"<string>\",\n \"maxFeePerGas\": \"<string>\",\n \"maxPriorityFeePerGas\": \"<string>\"\n }\n ],\n \"maxFeePerBlobGas\": \"<string>\",\n \"blobVersionedHashes\": [\n \"<string>\"\n ]\n }\n },\n \"requestedCertainty\": \"safe\",\n \"externalReference\": \"<string>\",\n \"roomIds\": [\n \"<string>\"\n ],\n \"shareSetId\": \"95b11417-f18f-457f-8804-68e361f9164f\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-idempotency-key", "<x-idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.dynamicauth.com/api/v0/sdk/{environmentId}/waas/{walletId}/transactions/signAndBroadcast")
.header("x-idempotency-key", "<x-idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"transaction\": {\n \"evm\": {\n \"to\": \"<string>\",\n \"value\": \"<string>\",\n \"data\": \"<string>\",\n \"nonce\": \"<string>\",\n \"gas\": \"<string>\",\n \"fees\": [\n {\n \"gasPrice\": \"<string>\",\n \"maxFeePerGas\": \"<string>\",\n \"maxPriorityFeePerGas\": \"<string>\"\n }\n ],\n \"maxFeePerBlobGas\": \"<string>\",\n \"blobVersionedHashes\": [\n \"<string>\"\n ]\n }\n },\n \"requestedCertainty\": \"safe\",\n \"externalReference\": \"<string>\",\n \"roomIds\": [\n \"<string>\"\n ],\n \"shareSetId\": \"95b11417-f18f-457f-8804-68e361f9164f\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.dynamicauth.com/api/v0/sdk/{environmentId}/waas/{walletId}/transactions/signAndBroadcast")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-idempotency-key"] = '<x-idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"transaction\": {\n \"evm\": {\n \"to\": \"<string>\",\n \"value\": \"<string>\",\n \"data\": \"<string>\",\n \"nonce\": \"<string>\",\n \"gas\": \"<string>\",\n \"fees\": [\n {\n \"gasPrice\": \"<string>\",\n \"maxFeePerGas\": \"<string>\",\n \"maxPriorityFeePerGas\": \"<string>\"\n }\n ],\n \"maxFeePerBlobGas\": \"<string>\",\n \"blobVersionedHashes\": [\n \"<string>\"\n ]\n }\n },\n \"requestedCertainty\": \"safe\",\n \"externalReference\": \"<string>\",\n \"roomIds\": [\n \"<string>\"\n ],\n \"shareSetId\": \"95b11417-f18f-457f-8804-68e361f9164f\"\n}"
response = http.request(request)
puts response.read_body{
"transactionId": "95b11417-f18f-457f-8804-68e361f9164f",
"status": "pending_signature",
"chainType": "evm",
"chainId": "<string>",
"walletAddress": "<string>",
"idempotencyKey": "<string>",
"requestedAt": "2023-11-07T05:31:56Z",
"reason": "never_sent",
"errorMessage": "<string>",
"revertReason": "<string>",
"externalReference": "<string>",
"transactionHash": "<string>",
"blockExplorerUrls": [
"<string>"
],
"attempts": [
{
"live": true,
"transactionHash": "<string>",
"fee": {
"gasPrice": "<string>",
"maxFeePerGas": "<string>",
"maxPriorityFeePerGas": "<string>"
},
"blockExplorerUrls": [
"<string>"
]
}
],
"nonce": "<string>",
"replacementFee": {
"gasPrice": "<string>",
"maxFeePerGas": "<string>",
"maxPriorityFeePerGas": "<string>"
},
"rooms": [
{
"roomId": "<string>",
"serverKeygenIds": [
"<string>"
],
"newServerKeygenIds": [
"<string>"
],
"walletId": "95b11417-f18f-457f-8804-68e361f9164f"
}
],
"progress": {
"reached": 1,
"required": 2,
"elapsedSeconds": 1,
"detail": {
"evm": {
"confirmations": 1,
"requiredConfirmations": 2
},
"svm": {
"commitment": "processed",
"requiredCommitment": "processed"
}
}
},
"completedAt": "2023-11-07T05:31:56Z"
}{
"error": "<string>"
}{
"error": "No jwt provided!"
}{
"error": "Access Forbidden"
}{
"error": "Not Found",
"code": "not_found"
}{
"error": "Resources already exists for this Object",
"code": "email_cannot_be_null",
"payload": {
"email": "joe@email.com",
"loginProvider": "emailOnly",
"embeddedWalletName": "<string>",
"embeddedSocialSigninProvider": "emailOnly",
"mergeConflicts": {
"fromUser": {
"id": "95b11417-f18f-457f-8804-68e361f9164f",
"projectEnvironmentId": "95b11417-f18f-457f-8804-68e361f9164f",
"verifiedCredentials": [
{
"id": "95b11417-f18f-457f-8804-68e361f9164f-zerodev",
"format": "blockchain",
"signInEnabled": true,
"address": "0xbF394748301603f18d953C90F0b087CBEC0E1834",
"chain": "<string>",
"refId": "95b11417-f18f-457f-8804-68e361f9164f",
"signerRefId": "95b11417-f18f-457f-8804-68e361f9164f",
"email": "jsmith@example.com",
"name_service": {
"avatar": "<string>",
"name": "<string>"
},
"public_identifier": "<string>",
"wallet_name": "<string>",
"wallet_provider": "browserExtension",
"wallet_properties": {
"turnkeySubOrganizationId": "95b11417-f18f-457f-8804-68e361f9164f",
"turnkeyPrivateKeyId": "95b11417-f18f-457f-8804-68e361f9164f",
"turnkeyHDWalletId": "95b11417-f18f-457f-8804-68e361f9164f",
"isAuthenticatorAttached": true,
"turnkeyUserId": "95b11417-f18f-457f-8804-68e361f9164f",
"isSessionKeyCompatible": true,
"version": "V1",
"ecdsaProviderType": "zerodev_signer_to_ecdsa",
"entryPointVersion": "v6",
"kernelVersion": "v2_4"
},
"business_account_properties": {
"businessAccountId": "95b11417-f18f-457f-8804-68e361f9164f",
"businessAccountCreatedAt": "2023-11-07T05:31:56Z",
"businessAccountSignerId": "95b11417-f18f-457f-8804-68e361f9164f",
"businessAccountSignerType": "endUser",
"businessAccountMemberRole": "cfo",
"businessAccountName": "<string>",
"businessAccountExternalRef": "<string>"
},
"oauth_provider": "emailOnly",
"oauth_username": "<string>",
"oauth_display_name": "<string>",
"oauth_account_id": "<string>",
"phoneNumber": "9171113333",
"phoneCountryCode": "1",
"isoCountryCode": "US",
"oauth_account_photos": [
"<string>"
],
"oauth_emails": [
"<string>"
],
"oauth_metadata": {},
"previous_users": [
"95b11417-f18f-457f-8804-68e361f9164f"
],
"embedded_wallet_id": "<string>",
"wallet_additional_addresses": [
{
"address": "<string>",
"type": "ordinals",
"publicKey": "<string>",
"network": "<string>"
}
],
"lastSelectedAt": "2023-11-07T05:31:56Z",
"verifiedAt": "2023-11-07T05:31:56Z"
}
],
"lastVerifiedCredentialId": "95b11417-f18f-457f-8804-68e361f9164f-zerodev",
"sessionId": "95b11417-f18f-457f-8804-68e361f9164f",
"alias": "An example name",
"country": "US",
"email": "jsmith@example.com",
"firstName": "An example name",
"jobTitle": "An example name",
"lastName": "An example name",
"phoneNumber": "<string>",
"policiesConsent": true,
"tShirtSize": "An example name",
"team": "An example name",
"username": "An example name",
"firstVisit": "2023-11-07T05:31:56Z",
"lastVisit": "2023-11-07T05:31:56Z",
"newUser": true,
"metadata": {},
"mfaBackupCodeAcknowledgement": "pending",
"btcWallet": "<string>",
"kdaWallet": "<string>",
"ltcWallet": "<string>",
"ckbWallet": "<string>",
"kasWallet": "<string>",
"dogeWallet": "<string>",
"emailNotification": true,
"discordNotification": true,
"newsletterNotification": true,
"lists": [
"<string>"
],
"scope": "superuser marketing operations",
"missingFields": [
{
"name": "<string>",
"required": true,
"enabled": true,
"unique": true,
"verify": true,
"type": "standard",
"validationRules": {
"unique": true,
"regex": "^0x",
"validOptions": [
{
"label": "small"
},
{
"label": "medium"
},
{
"label": "large"
}
],
"checkboxText": "Agree to the terms and conditions"
},
"validationType": "text",
"label": "<string>",
"position": 123
}
]
},
"conflicts": [
{
"field": {
"name": "<string>",
"required": true,
"enabled": true,
"unique": true,
"verify": true,
"type": "standard",
"validationRules": {
"unique": true,
"regex": "^0x",
"validOptions": [
{
"label": "small"
},
{
"label": "medium"
},
{
"label": "large"
}
],
"checkboxText": "Agree to the terms and conditions"
},
"validationType": "text",
"label": "<string>",
"position": 123
},
"fromUser": {
"userId": "95b11417-f18f-457f-8804-68e361f9164f",
"value": "An example name"
},
"currentUser": {
"userId": "95b11417-f18f-457f-8804-68e361f9164f",
"value": "An example name"
}
}
]
},
"intent": {},
"additionalMessages": [
"<string>"
]
}
}{
"error": "Resources already exists for this Object",
"code": "email_cannot_be_null",
"payload": {
"email": "joe@email.com",
"loginProvider": "emailOnly",
"embeddedWalletName": "<string>",
"embeddedSocialSigninProvider": "emailOnly",
"mergeConflicts": {
"fromUser": {
"id": "95b11417-f18f-457f-8804-68e361f9164f",
"projectEnvironmentId": "95b11417-f18f-457f-8804-68e361f9164f",
"verifiedCredentials": [
{
"id": "95b11417-f18f-457f-8804-68e361f9164f-zerodev",
"format": "blockchain",
"signInEnabled": true,
"address": "0xbF394748301603f18d953C90F0b087CBEC0E1834",
"chain": "<string>",
"refId": "95b11417-f18f-457f-8804-68e361f9164f",
"signerRefId": "95b11417-f18f-457f-8804-68e361f9164f",
"email": "jsmith@example.com",
"name_service": {
"avatar": "<string>",
"name": "<string>"
},
"public_identifier": "<string>",
"wallet_name": "<string>",
"wallet_provider": "browserExtension",
"wallet_properties": {
"turnkeySubOrganizationId": "95b11417-f18f-457f-8804-68e361f9164f",
"turnkeyPrivateKeyId": "95b11417-f18f-457f-8804-68e361f9164f",
"turnkeyHDWalletId": "95b11417-f18f-457f-8804-68e361f9164f",
"isAuthenticatorAttached": true,
"turnkeyUserId": "95b11417-f18f-457f-8804-68e361f9164f",
"isSessionKeyCompatible": true,
"version": "V1",
"ecdsaProviderType": "zerodev_signer_to_ecdsa",
"entryPointVersion": "v6",
"kernelVersion": "v2_4"
},
"business_account_properties": {
"businessAccountId": "95b11417-f18f-457f-8804-68e361f9164f",
"businessAccountCreatedAt": "2023-11-07T05:31:56Z",
"businessAccountSignerId": "95b11417-f18f-457f-8804-68e361f9164f",
"businessAccountSignerType": "endUser",
"businessAccountMemberRole": "cfo",
"businessAccountName": "<string>",
"businessAccountExternalRef": "<string>"
},
"oauth_provider": "emailOnly",
"oauth_username": "<string>",
"oauth_display_name": "<string>",
"oauth_account_id": "<string>",
"phoneNumber": "9171113333",
"phoneCountryCode": "1",
"isoCountryCode": "US",
"oauth_account_photos": [
"<string>"
],
"oauth_emails": [
"<string>"
],
"oauth_metadata": {},
"previous_users": [
"95b11417-f18f-457f-8804-68e361f9164f"
],
"embedded_wallet_id": "<string>",
"wallet_additional_addresses": [
{
"address": "<string>",
"type": "ordinals",
"publicKey": "<string>",
"network": "<string>"
}
],
"lastSelectedAt": "2023-11-07T05:31:56Z",
"verifiedAt": "2023-11-07T05:31:56Z"
}
],
"lastVerifiedCredentialId": "95b11417-f18f-457f-8804-68e361f9164f-zerodev",
"sessionId": "95b11417-f18f-457f-8804-68e361f9164f",
"alias": "An example name",
"country": "US",
"email": "jsmith@example.com",
"firstName": "An example name",
"jobTitle": "An example name",
"lastName": "An example name",
"phoneNumber": "<string>",
"policiesConsent": true,
"tShirtSize": "An example name",
"team": "An example name",
"username": "An example name",
"firstVisit": "2023-11-07T05:31:56Z",
"lastVisit": "2023-11-07T05:31:56Z",
"newUser": true,
"metadata": {},
"mfaBackupCodeAcknowledgement": "pending",
"btcWallet": "<string>",
"kdaWallet": "<string>",
"ltcWallet": "<string>",
"ckbWallet": "<string>",
"kasWallet": "<string>",
"dogeWallet": "<string>",
"emailNotification": true,
"discordNotification": true,
"newsletterNotification": true,
"lists": [
"<string>"
],
"scope": "superuser marketing operations",
"missingFields": [
{
"name": "<string>",
"required": true,
"enabled": true,
"unique": true,
"verify": true,
"type": "standard",
"validationRules": {
"unique": true,
"regex": "^0x",
"validOptions": [
{
"label": "small"
},
{
"label": "medium"
},
{
"label": "large"
}
],
"checkboxText": "Agree to the terms and conditions"
},
"validationType": "text",
"label": "<string>",
"position": 123
}
]
},
"conflicts": [
{
"field": {
"name": "<string>",
"required": true,
"enabled": true,
"unique": true,
"verify": true,
"type": "standard",
"validationRules": {
"unique": true,
"regex": "^0x",
"validOptions": [
{
"label": "small"
},
{
"label": "medium"
},
{
"label": "large"
}
],
"checkboxText": "Agree to the terms and conditions"
},
"validationType": "text",
"label": "<string>",
"position": 123
},
"fromUser": {
"userId": "95b11417-f18f-457f-8804-68e361f9164f",
"value": "An example name"
},
"currentUser": {
"userId": "95b11417-f18f-457f-8804-68e361f9164f",
"value": "An example name"
}
}
]
},
"intent": {},
"additionalMessages": [
"<string>"
]
}
}{
"error": "Too Many Requests"
}{
"error": "Internal Server Error"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Your repeat-protection key for one transaction, unique per environment. Repeating it with the same transaction returns the original; with a different transaction, 409.
1 - 255^[-A-Za-z0-9._~!$&'()*+,;=:@/]{1,255}$Path Parameters
ID of the environment
36^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"95b11417-f18f-457f-8804-68e361f9164f"
UUID of the wallet
36^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"95b11417-f18f-457f-8804-68e361f9164f"
Body
One transaction, for the wallet's chain. Both evm and svm together are rejected with multiple_transactions.
Show child attributes
Show child attributes
How sure to be before calling the transaction confirmed. fast, safe or final, or chain: followed by the chain's own value, such as chain:12 or chain:finalized.
64^(fast|safe|final|chain:[a-z0-9]{1,58})$Your own label for this transaction, returned on every event. Not unique.
1 - 256^[\x20-\x7E]+$Signing rooms you already opened, one per attempt in fee order. When omitted, Dynamic opens them.
1 - 3 elementsMPC room identifier for one signing session
255^[A-Za-z0-9_-]+$Optional identifier of the share set this operation targets. When
omitted, the active rootUser share set for walletId is resolved
server-side.
36^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"95b11417-f18f-457f-8804-68e361f9164f"
Response
The transaction record, with the signing rooms while signing is pending
Dynamic's id for this transaction, the same on every event.
36^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"95b11417-f18f-457f-8804-68e361f9164f"
Where the transaction has got to. stalled means nobody is pushing it any more and it can return to confirming. Tolerate values you do not recognise.
pending_signature, signed, broadcasting, confirming, stalled, completed, reverted, failed evm, svm An EVM chain id, or a Solana network id (101 mainnet, 103 devnet, 201 Eclipse).
The key the transaction was requested with.
Why a transaction failed or stalled. Tolerate values you do not recognise.
never_sent, rejected, expired, replaced, nonce_gap, ceremony_failed, assembly_failed, insufficient_funds, broadcaster_stopped, broadcaster_failed Human-readable detail on a reverted or failed transaction, written by Dynamic and never a raw provider or node error. For a log or a support ticket; branch on reason instead.
512The contract's own error, when the transaction landed and reverted. Public chain output, passed through untouched and capped in length.
512Your own label, as sent.
The live attempt's hash, once it is signed.
2048Every signed version of the transaction, cheapest first.
Show child attributes
Show child attributes
EVM only. The transaction's nonce, the only safe one to reuse when replacing it.
^0x(0|[1-9a-fA-F][0-9a-fA-F]{0,63})$EVM only, while the transaction is not final. The lowest fee a replacement at the same nonce would need to displace the live attempt.
Show child attributes
Show child attributes
The signing rooms, one per attempt, while status is pending_signature.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Present when the status is terminal.
Was this page helpful?