Skip to content

Commit

Permalink
docs(root): fix ADA broadcast script
Browse files Browse the repository at this point in the history
fixed ADA broadcast script

WP-0000
  • Loading branch information
alebusse committed Feb 8, 2024
1 parent 7cc851d commit e9eeade
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions ADA.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,22 @@ const axiosConfig = {
headers: {
'Content-Type': 'application/cbor',
},
timeout: 10000,
timeout: 50000,
};

// Mainnet = https://api.koios.rest/api/v1/submittx
// Testnet = https://preprod.koios.rest/api/v1/submittx
const url = 'https://preprod.koios.rest/api/v1/submittx';

const serializedSignedTx = '84a...5f6';
const serializedSignedTx = '84a..af6';

const bytes = Uint8Array.from(Buffer.from(serializedSignedTx, 'hex'));

try {
async function main() {
const bytes = Uint8Array.from(Buffer.from(serializedSignedTx, 'hex'));
const res = await axios.post(url, bytes, axiosConfig);
console.log(res.data);
} catch (err) {
console.log(err);
}

main().catch(console.error);
```

- Run the following command to execute the script:
Expand Down

0 comments on commit e9eeade

Please sign in to comment.