-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unified REST APIs for working with Bitcoin #55
Comments
Jotting down currently known APIs pros & cons for designing the Unified API. Mempool.spaceLink
Cons
Blockchain.comPros
Cons
BlockCypherPros
Cons
UnisatLink
Cons
Unified APILink: We need to design. :) The API should support the following important functionalities
References |
As discussed on Discord, the following methods in electrs should be extended to handle
{
"p": "brc-20",
"op": "mint",
"tick": "ordi",
"amt": "1"
}
|
What about all the other APIs, e.g., the ones exposed by unisat to also inscribe BRC20 and ordinals plus the functions around BRC20 lists, holders, history, ...? https://docs.unisat.io/dev/open-api/brc20 I'd like to please have a more extensive proposal from you @nakul1010 @ns212 that covers:
|
I was trying to add the APIs without changing much of the electrum structure and without adding an indexer. But if u want most of the functionality, then an indexer needs to be added. The following methods in the local environment can be accessible at endpoint
{
"data": {
"utxo": [
{
"address": "string",
"codeType": 0,
"height": 0,
"idx": 0,
"inscriptions": [
{
"inscriptionId": "string",
"inscriptionNumber": 0,
"isBRC20": true,
}
],
"satoshi": 10000,
"scriptPk": "string",
"scriptType": "string",
"txid": "string",
}
]
}
}
{
"data": {
"inscriptions": [
{
"inscriptionId": "string",
"inscriptionNumber": 0,
"isBRC20": true,
},
{
"inscriptionId": "string",
"inscriptionNumber": 1,
"isBRC20": true,
}
]
}
}
{
"data": {
"height": 813863,
"total": 42905,
"start": 0,
"detail": [
"ordi",
"meme",
"abcd",
]
}
}
{
"data": {
"ticker": "ordi",
"overallBalance": "644000",
"historyInscriptions": [
{
"data": null,
"inscriptionNumber": 8196044,
"inscriptionId": "decd853d761285b772b9dfcb4dc60d05df5cca07c46b5a6d6e9ef9a9f816e20di0",
"confirmations": 0
},
{
"data": null,
"inscriptionNumber": 8122019,
"inscriptionId": "5e79c838aabf8f13c80a504ad0166c6fdc9310568458f63fc0d7d59b32b5afc3i0",
"confirmations": 0
},
{
"data": null,
"inscriptionNumber": 8122017,
"inscriptionId": "a883d254d6c625413e33d68d2c5b73eb78c403d4c0521e7492931cafb5ef7c7fi0",
"confirmations": 0
},
{
"data": null,
"inscriptionNumber": 8122018,
"inscriptionId": "e1a2b505460926764e322f154a814d3624e7d6c33a6172fb94133611f77301a8i0",
"confirmations": 0
},
{
"data": null,
"inscriptionNumber": 8196043,
"inscriptionId": "8380dbaf93ba6b441d12633920d692864dddc8a574fa4818039ad20064ceb451i0",
"confirmations": 0
},
{
"data": null,
"inscriptionNumber": 8076373,
"inscriptionId": "bc00977dbd87fb22f54f5c1b4eba781991243ffefebfbe639db45983246dbfe5i0",
"confirmations": 0
},
{
"data": null,
"inscriptionNumber": 8076372,
"inscriptionId": "9115ce42d15d1ffb878a6af1077bde8a2da765f3e299c3fd915a5b353230a812i0",
"confirmations": 0
}
]
}
}
{
"code": 0,
"msg": "ok",
"data": {
"cursor": 0,
"total": 29,
"totalConfirmed": 29,
"totalUnconfirmed": 0,
"totalUnconfirmedSpend": 0,
"utxo": [
{
"txid": "0328b6bb6d749cf2d2535eb5cef939a0f5db5bdf4540b80ff773c3a85888c2bb",
"satoshi": 546,
"scriptType": "0020",
"inscriptions": [
{
"inscriptionNumber": 22818979,
"inscriptionId": "a6cba6a3bd2cde4b7a600638838de5387aeb4f061968fb894f0cf14e0ee3b0edi0",
"isBRC20": true
}
]
},
{
"txid": "c42584248fb93e0b8e51db8344d53cdaa3eb12e5e73e6ae72d855d23aa1a9b0b",
"satoshi": 546,
"inscriptions": [
{
"inscriptionNumber": 23338832,
"inscriptionId": "9774f5827c242962d3f12f599221370f9e9d8b121605e6e29e6a32863717d96ei0",
"isBRC20": true
}
]
},
]
}
}
{
"code": 0,
"msg": "ok",
"data": {
"Inscriptions": [
{
"inscriptionId": "9774f5827c242962d3f12f599221370f9e9d8b121605e6e29e6a32863717d96ei0",
"index": 0
},
{
"inscriptionId": "9774f5827c242962d3f12f599221370f9e9d8b121605e6e29e6a32863717d96ei0",
"index":1
},
{
"inscriptionId": "9774f5827c242962d3f12f599221370f9e9d8b121605e6e29e6a32863717d96ei0",
"index": 2
}
]
}
}
{
"receiveAddress": "",
"feeRate": 1,
"outputValue": 546,
"devAddress": "",
"devFee": 0,
"brc20Ticker": "",
"brc20Max": "",
"brc20Limit": ""
}
{
"code": 0,
"msg": "string",
"data": {
"amount": 3000,
"paidAmount": 0,
"status": "pending",
"feeRate": 0,
"minerFee": 0,
"files": [
{
"filename": "10000.sats",
"inscriptionId": "",
"status": "pending"
}
]
}
}
{
"receiveAddress": "",
"feeRate": 1,
"outputValue": 546,
"devAddress": "",
"devFee": 0,
"brc20Ticker": "",
"brc20Max": "",
"brc20Limit": ""
}
{
"code": 0,
"msg": "string",
"data": {
"amount": 3000,
"status": "pending",
"paidAmount": 0,
"feeRate": 0,
"minerFee": 0,
"files": [
{
"filename": "10000.sats",
"inscriptionId": "",
"status": "pending"
}
]
}
}
{
"receiveAddress": "",
"feeRate": 1,
"outputValue": 546,
"devAddress": "",
"devFee": 0,
"brc20Ticker": "",
"brc20Max": "",
"brc20Limit": ""
}
{
"code": 0,
"msg": "string",
"data": {
"amount": 3000,
"paidAmount": 0,
"status": "pending",
"feeRate": 0,
"minerFee": 0,
"files": [
{
"filename": "10000.sats",
"inscriptionId": "",
"status": "pending"
}
]
}
} Still Unknowns
Proposal to implementToDos in serial order
|
Closed in #73 |
Is your feature request related to a problem? Please describe.
Protocols built on top of Bitcoin have various APIs available, but they are early stage and often lack documentation. Moreover, they are not well integrated with existing REST APIs like electrs.
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: