Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Welcome to TAAL Docs!!



curl --location 'https://arc.taal.com/v1/policy' \
--header 'Authorization: <API Key>'
List of tech stack used


chrome.runtime.onConnectExternal.addListener(port => {
console.log('Client connected', port);
port.onMessage.addListener(msg => {
console.log('onExternalMessage', msg);
});
});const port = chrome.runtime.connect(extensionId, { name: 'some-name' });
port.onMessage.addListener(console.log);
port.postMessage({ payload: 'anything' })const port = chrome.runtime.connect({ name: 'some-name' });
port.postMessage({ payload: 'anything' });
port.onMessage.addListener(msg => {
console.log('onMessage', msg);
});chrome.runtime.onMessageExternal.addListener((payload, data, cb) => {
console.log('onMessageExternal', { payload, data });
if (typeof cb === 'function') {
cb('response from background.js');
}
return true;
});chrome.runtime.sendMessage(extensionId, { payload: 'anything' }, console.log)chrome.runtime.sendMessage({ payload: 'anything' }, console.log);mkdir example
cd example
npm init -y
npm install bsv@1
npm install requestconst fs = require('fs')
const bsv = require('bsv')
// Random key produced each time...
const newKey = bsv.PrivateKey()
console.log(`Private key: ${newKey.toString()}`)
console.log(`Mainnet address: ${newKey.toAddress('mainnet').toString()}`)
console.log(`
1. Create a funding transaction by sending 1000 satoshis (0.00001 BSV) to ${newKey.toAddress('mainnet').toString()}.
2. Add your Taal apiKey, and funding transaction txid and vout to 'generated.js'.
3. Execute the generated code:
node generated.js
`)
fs.writeFileSync('generated.js', `
const bsv = require('bsv')
var request = require('request')
const privKey = bsv.PrivateKey('${newKey}')
const apiKey = "" // Add Taal mainnet API Key
const fundingTxid = "" // Add the funding transaction txid
const fundingVout = -1 // Replace with funding transaction vout
const returnAddress = "" // The address to return the 1000 satoshis (less fees)
if (apiKey === "" || fundingTxid === "" || fundingVout === -1 || returnAddress === "") {
console.log('This generated file needs an apiKey, a fundingTxid, a fundingVout and a returnAddress')
process.exit(1)
}
const utxo1 = {
txId: fundingTxid,
outputIndex: fundingVout,
address: privKey.toAddress('mainnet').toString(),
script: bsv.Script.buildPublicKeyHashOut(privKey.publicKey).toHex(),
satoshis: 1000
}
const tx1 = bsv.Transaction()
.from(utxo1)
.to(privKey.toAddress('mainnet').toString(), 800)
.change(returnAddress)
.sign(privKey)
const utxo2 = {
txId: tx1.hash,
outputIndex: 0,
address: privKey.toAddress('mainnet').toString(),
script: bsv.Script.buildPublicKeyHashOut(privKey.publicKey).toHex(),
satoshis: 800
}
const tx2 = bsv.Transaction()
.from(utxo2)
.change(returnAddress)
.sign(privKey)
const txBuffer = Buffer.concat([
tx1.toBuffer(),
tx2.toBuffer()
])
// Send the transaction to Taal API...
request.post({
url: 'https://api.taal.com/api/v1/batchBroadcast',
headers: {
'Authorization': apiKey,
'Content-Type': 'application/octet-stream'
},
body: txBuffer
}, function(error, response, body) {
console.log(error, response.statusCode, body)
})
`)node main.js 





POST https://platform.taal.com/token-studio/api/v1/project/createcurl --location 'https://platform.taal.com/token-studio/api/v1/project/create' \
--header 'Apikey: ## VALID_API_KEY ##' \
--header 'Content-Type: application/json' \
--data '{
"name": "1satcol project 1718100516565",
"isFungible": false,
"type": "single", //"collection"
"tokenProtocol": "OneSatOrdinal"
}'
{
"success": boolean,
"data": {
"projectUid": <uid>
}
}GET https://platform.taal.com/token-studio/api/v1/project/curl --location 'https://platform.taal.com/token-studio/api/v1/project/' \
--header 'Apikey: ## VALID_API_KEY ##'{
"success": boolean,
"data": {
"projectList": [
{
"uid": <uid>,
"name": string,
"network": string,
"offChainData": {
"isFungible": boolean
},
"tokenProtocol": string
}
]
}
}GET https://platform.taal.com/token-studio/api/v1/project/<projectId> curl --location 'https://platform.taal.com/token-studio/api/v1/project/<projectId>' \
--header "Apikey: ## VALID_API_KEY ##"{
"success": true,
"data": {
"uid": <uid>,
"name": string,
"tokenProtocol": string,
"network": string,
"isFungible": boolean,
"type": string
}
}POST https://platform.taal.com/token-studio/api/v1/token/one-sat-ord/create-outputcurl --location 'https://platform.taal.com/token-studio/api/v1/token/one-sat-ord/create-output' \
--header "Apikey: ## VALID_API_KEY ##" \
--header 'Content-Type: application/json' \
--data '{
"projectUid": "<projectId>",
"contentType":"text/html;charset=utf8",
"b64File":"PGh0bWw+PGJvZHk+SGVsbG8gV29ybGQ8L2JvZHk+PC9odG1sPg==",
"metadata": {
"name": "My single token 1718101145907",
"subType": "single",
"subTypeData": "{\"description\": \"this is description\" }",
"type": "ord",
"description": "this is a standalone token description",
"info": "anything",
"eyes": "green"
}
}'
{
"success": true,
"data": {
"uid": <uid>,
"type": string,
"tokenProtocol": string
}
}
DELETE https://platform.taal.com/token-studio/api/v1/output/{{outputUid}} curl --location --request DELETE 'https://platform.taal.com/token-studio/api/v1/output/{{outputUid}}' \
--header "Apikey: ## VALID_API_KEY ##" \
--header 'Content-Type: application/json'
```json
"success": true,
"data": {
"uid": "<uid>",
"createdAt": "<timestamp>",
"type": "token",
"tokenProtocol": "OneSatOrdinal",
"projectUid": "<uid>",
"transactionUid": null,
"txId": null,
"identityUid": "<uid>",
"address": null,
"metadata": { <metadata>
},
"offChainData": {
<fileData>
}
}
}
```GET https://platform.taal.com/token-studio/api/v1/output/by-project/{{projectUid}}?on-chain=0&type=collectionItem curl --location 'https://platform.taal.com/token-studio/api/v1/' \
--header "Apikey: ## VALID_API_KEY ##"{
"success": boolean,
"data": {
"outputList": [
{
"createdAt": <date>,
"uid": <uid>,
"projectUid": <uid>,
"transactionUid": <uid> (null if has not been used in a transaction yet),
"type": string,
"tokenProtocol": string,
"metadata": { //Key / value pairs e.g.
"app": string,
"eyes": string,
"info": string,
"name": string,
"type": string,
"subType": string,
"description": string,
"subTypeData": stringified JSON
},
"offChainData": {
"b64FileHash": string,
"b64FileSize": int,
"contentType": string
}
}
]
}
}
POST https://platform.taal.com/token-studio/api/v1/token/one-sat-ord/create-transactioncurl --location 'https://platform.taal.com/token-studio/api/v1/token/one-sat-ord/create-transaction' \
--header "Apikey: ## VALID_API_KEY ##" \
--header 'Content-Type: application/json' \
--data '{
"projectUid": "<projectUid>",
"publicKey": <Public Key>,
"dstAddress": <Token Recipient Address>,
"outputList": [<outputList>],
"utxoList": [
{
"outputIndex": num,
"txId": "<txId>"
}
]
}'{
"success": boolean,
"data": {
"transactionUid": <uid>,
"txObj": {<txObj>
}
}
}<projectUid><publicKey>dstAddress<Token Recipient Address>POST https://platform.taal.com/token-studio/api/v1/submitcurl --location 'https://platform.taal.com/token-studio/api/v1/submit' \
--header "Apikey: ## VALID_API_KEY ##" \
--header 'Content-Type: application/json' \
--data '{
"transactionUid": "<transactionUid>",
"tx": "<txObjSigned>"
}
' {
success: boolean,
data: {
txId: string
}
}
transactionUidtxObjSignedMandatory:
"name": NFT name
"type": "ord"
"subType": "single" //"collection" or "collectionItem",
"subTypeData": stringified JSON,
"description": string,
Other e.g. traits:
"info": "anything",
"eyes": "green"outputListtxIdoutputIndex






