Skip to content
Open
Show file tree
Hide file tree
Changes from 126 commits
Commits
Show all changes
142 commits
Select commit Hold shift + click to select a range
9a313a3
Implement Asset encoding and decoding with associated types and methods
aruokhai Nov 17, 2025
99e524f
Implement OP_RETURN encoding and decoding for Asset struct
aruokhai Nov 18, 2025
00bceae
Refactor Asset struct and update encoding/decoding for ControlOutput
aruokhai Nov 19, 2025
a485da4
Refactor Asset struct to replace ControlOutput with ControlPubkey and…
aruokhai Nov 19, 2025
ceaae90
Added Logic to Build Asset Transfer Logic
aruokhai Nov 19, 2025
5be0b54
Merge branch 'master' into ark-asset
altafan Nov 21, 2025
bf54472
Implement asset validation logic and enhance error handling in transa…
aruokhai Nov 21, 2025
18bb7ed
Merge remote-tracking branch 'origin/ark-asset' into ark-asset
aruokhai Nov 21, 2025
f12610c
fixed asset tlv encoding and decoding
aruokhai Nov 21, 2025
c669682
Add unit tests for asset encoding and decoding functions
aruokhai Nov 21, 2025
b9fd748
Enhance asset transaction validation with clearer error messages and …
aruokhai Nov 21, 2025
64240be
Merge remote-tracking branch 'origin/master' into ark-asset
aruokhai Nov 21, 2025
7ec66ee
Refactor asset encoding functions to use consistent naming convention…
aruokhai Nov 22, 2025
49b5b61
Add Asset field to Vtxo struct and IsSeal field to Input struct
aruokhai Nov 26, 2025
b90c677
Add AssetOutput struct and update RegisterMessage to include AssetOut…
aruokhai Nov 26, 2025
8802830
Implement asset handling in intent processing and transaction building
aruokhai Nov 26, 2025
7b3dfbd
Refactor proof and service layers to use wire.OutPoint for outpoints;…
aruokhai Nov 26, 2025
90085d4
added Teleport Vtxoscript
aruokhai Nov 27, 2025
8f016e0
added asset teleport pubkey
aruokhai Nov 28, 2025
f06847b
Enhance asset handling by adding teleport hash and pubkey to Receiver…
aruokhai Nov 28, 2025
25ec9c0
Refactor teleport pubkey comparison and error handling in getOutputVt…
aruokhai Dec 1, 2025
7ec6ffc
Refactor asset transaction validation to ensure proper handling of re…
aruokhai Dec 1, 2025
3ec8cfe
added support for minting and burning
aruokhai Dec 1, 2025
b21d6a9
Refactor asset handling to support asset groups; update encoding, dec…
aruokhai Dec 2, 2025
00269b5
Implement asset transaction rebuilding logic; add support for asset g…
aruokhai Dec 3, 2025
69be853
Refactor asset transaction validation and encoding; update control as…
aruokhai Dec 3, 2025
458e572
Enhance control asset handling in BuildAssetTxs; ensure proper identi…
aruokhai Dec 5, 2025
8755d34
Fix control asset handling in BuildAssetTxs; ensure checkpoint inputs…
aruokhai Dec 5, 2025
3f4259f
debugging
aruokhai Dec 5, 2025
2fa69c4
Refactor control asset handling in BuildAssetTxs; improve vtxo search…
aruokhai Dec 5, 2025
30f8e3a
Refactor BuildAssetTxs to derive transaction IDs for control asset in…
aruokhai Dec 5, 2025
6336dbc
Refactor asset handling to replace Txid with Txhash; improve consiste…
aruokhai Dec 5, 2025
bf6efd1
Remove unnecessary bytes comparison in buildAssetCheckpointTx; simpli…
aruokhai Dec 5, 2025
1008480
Refactor asset transaction validation and rebuilding; enhance control…
aruokhai Dec 5, 2025
e74fa62
implemented storing of asset and its metadata
aruokhai Dec 8, 2025
23cfb48
Refactor BuildAssetTxs to improve control and normal asset handling; …
aruokhai Dec 9, 2025
576fa80
Add unit tests for asset transaction rebuilding
aruokhai Dec 9, 2025
94cfd15
Add asset retrieval method to indexer service
aruokhai Dec 9, 2025
b4d1a18
Add asset repository implementations for BadgerDB and Postgress
aruokhai Dec 11, 2025
eab7d61
feat: Enhance asset handling in indexer service
aruokhai Dec 11, 2025
cc66b36
implemented encoding for immutable asset metadata
aruokhai Dec 11, 2025
0160bbc
feat: Add immutable field to asset model and update related queries
aruokhai Dec 12, 2025
bc3a85f
Implement sub-dust key handling in asset group and related transactions
aruokhai Dec 12, 2025
afbf1f5
feat: Update EncodeOpret method to accept an amount parameter and adj…
aruokhai Dec 12, 2025
475df2b
Refactors asset decoding to simplify logic and remove batch ID
aruokhai Dec 12, 2025
a2d7eba
feat: support multiple control and normal assets in asset group OP_RE…
aruokhai Dec 16, 2025
29b88e2
feat: Update asset inputs to use teleport commitments to checkpoint h…
aruokhai Dec 16, 2025
ada7ce9
feat: Introduce TeleportWitness to AssetInput, encapsulating public k…
aruokhai Dec 16, 2025
0202f29
feat: Implement teleport asset storage and simplify teleport asset le…
aruokhai Dec 16, 2025
4575fb2
feat: replace TeleportWitness PublicKey with Script and update commit…
aruokhai Dec 16, 2025
83bc94f
feat: implement `Get` and `Update` for `TeleportAsset` and persist it…
aruokhai Dec 16, 2025
503bffe
feat: Validate teleport asset exists and is not claimed before proces…
aruokhai Dec 17, 2025
0988459
feat: Make Asset.ControlAssetId optional by changing its type to a po…
aruokhai Dec 17, 2025
67a7b17
fix multiasset checkpoint building
aruokhai Dec 17, 2025
b1356b5
refactor: Streamline asset validation and storage logic by consolidat…
aruokhai Dec 17, 2025
a38298f
fix: prevent updating asset metadata when the provided list is empty
aruokhai Dec 17, 2025
b94ba96
feat: add `DeriveAssetGroupFromTx` to extract asset group from transa…
aruokhai Dec 17, 2025
a2d3a4e
refactor: Aggregate asset VTXOs for single anchor insertion, adjust r…
aruokhai Dec 17, 2025
290378c
refactor: Decouple asset output processing from output indexes and re…
aruokhai Dec 18, 2025
ceb2c42
refactor: remove redundant `AssetAmount` field from `Receiver`, add `…
aruokhai Dec 18, 2025
dd3840e
feat: Add teleport hash subscription and event tracking to indexer.
aruokhai Dec 22, 2025
48b0fb6
feat: Add an `immutable` field to the `Asset` message and update its …
aruokhai Dec 22, 2025
6b6f2e4
feat: Include asset ID in asset anchor creation and retrieval operati…
aruokhai Dec 22, 2025
3689fb5
feat: Enhance TeleportEvent structure with asset ID and amount fields…
aruokhai Dec 26, 2025
85253b1
Refactor asset management: rename tables and update queries
aruokhai Dec 29, 2025
dd8b49f
feat: Implement duplicate asset output vout checks in asset transacti…
aruokhai Dec 29, 2025
0929702
Align With Protocol spec
aruokhai Jan 5, 2026
d85a862
feat: Add control asset existence verification for new issuances in a…
aruokhai Jan 5, 2026
712548a
fix: aligning more to protocol spec, by removing Asset Input hash
aruokhai Jan 5, 2026
cae1a90
fix: update function call to BuildAssetTxs for asset transaction reco…
aruokhai Jan 5, 2026
6f211fc
ensure non uniqueness of controlid so as to ensure metadata update
aruokhai Jan 6, 2026
96f2759
fix: change asset output and input types from uint16 to uint32 for pr…
aruokhai Jan 6, 2026
14b735a
refactor: remove TODO comments for asset builder and subdust key in t…
aruokhai Jan 6, 2026
fb84ec5
refactor: rename AssetGroup to AssetPacket and update related functions
aruokhai Jan 7, 2026
253aa17
improve validation: check control asset before proceeding
aruokhai Jan 7, 2026
f63e8ee
debug: log control asset during validation of normal assets
aruokhai Jan 7, 2026
f987328
refactor: replace direct control asset validation with dedicated method
aruokhai Jan 7, 2026
40c1cf0
Merge remote-tracking branch 'origin/master' into ark-asset
aruokhai Jan 7, 2026
0105ccd
lint fix
aruokhai Jan 7, 2026
108941e
refactor: remove unused restoreWatchingVtxos function and clean up im…
aruokhai Jan 7, 2026
3572f46
feat: Add Control Asset ID to Asset Group functionality
aruokhai Jan 13, 2026
3908e05
GetIntentsByTxid scaffolding
bitcoin-coder-bob Jan 14, 2026
6d478ad
refactor: seperate subdust packet from asset packet
aruokhai Jan 14, 2026
38a9a38
refactor: fix Intent to implicitly derive AssetGroup Details from the…
aruokhai Jan 14, 2026
b7630a6
refractor: split AssetPacket and SubdustPacket
aruokhai Jan 14, 2026
f0b2b4e
store intents with txid, custom migration for sqlite & postgres, badg…
bitcoin-coder-bob Jan 14, 2026
40e700e
add txid to intent in badger addOrUpdateRound
bitcoin-coder-bob Jan 14, 2026
ae83eb9
change buf.Dockerfile back
bitcoin-coder-bob Jan 14, 2026
268f178
migration to handle indexes, views, badger fixes
bitcoin-coder-bob Jan 15, 2026
428583a
linting
bitcoin-coder-bob Jan 15, 2026
fc536f3
Added extension abstraction for VTXOs and migrated asset data to exte…
aruokhai Jan 15, 2026
0568933
bring in changes from master
bitcoin-coder-bob Jan 15, 2026
8c5e844
context usage fix, badger intent index do not err on error
bitcoin-coder-bob Jan 15, 2026
fa2121e
lint check, schema fix on migration
bitcoin-coder-bob Jan 15, 2026
a78f19c
remove left join for migration on vtxo_new
bitcoin-coder-bob Jan 15, 2026
8cf98fd
Create index on intent txid in custom migration
bitcoin-coder-bob Jan 15, 2026
dee9d59
- Add a uniqueness check for asset input vins during asset transition…
aruokhai Jan 15, 2026
469d492
test dummy values, remove index creation from migration files, assume…
bitcoin-coder-bob Jan 15, 2026
3645815
lint
bitcoin-coder-bob Jan 15, 2026
57081ec
attempt to simplify txid migration for intent table
bitcoin-coder-bob Jan 15, 2026
366cc27
lint
bitcoin-coder-bob Jan 15, 2026
a03f7f4
run backfill only when txid column already exists
bitcoin-coder-bob Jan 15, 2026
0b8604a
postgres migration call
bitcoin-coder-bob Jan 16, 2026
e9d2091
check txid existence in postgres migration
bitcoin-coder-bob Jan 16, 2026
6f51a74
postgres syntax fix
bitcoin-coder-bob Jan 16, 2026
7fae7fe
remove PrepareContext
bitcoin-coder-bob Jan 16, 2026
4487985
read all rows before updating
bitcoin-coder-bob Jan 16, 2026
8391abb
log
bitcoin-coder-bob Jan 16, 2026
475352c
backfill badger txids in intents
bitcoin-coder-bob Jan 16, 2026
87924e3
Remove badger migration for intent txid
bitcoin-coder-bob Jan 16, 2026
f460212
tests for sqlite and postgres migrations
bitcoin-coder-bob Jan 16, 2026
769d26e
linting
bitcoin-coder-bob Jan 16, 2026
8edeaf8
Refactor asset teleport handling and related structures
aruokhai Jan 18, 2026
1bc961c
refactor: update teleport asset structure and related database queries
aruokhai Jan 18, 2026
5531489
refactor: enhance asset validation error handling and metadata integr…
aruokhai Jan 19, 2026
2b83e99
feat: Replace TLV-based asset group encoding/decoding with a custom b…
aruokhai Jan 19, 2026
1df3d19
Comment cleanup
bitcoin-coder-bob Jan 19, 2026
db44f15
err handling in backfillIntent
bitcoin-coder-bob Jan 19, 2026
9cfbb83
remove extra txid derivation
bitcoin-coder-bob Jan 19, 2026
27c13e0
test missing intent, fxn for dup migration code, badger intent err ha…
bitcoin-coder-bob Jan 19, 2026
ee73a29
err check ordering
bitcoin-coder-bob Jan 19, 2026
79fe6db
unexport fxn, cleanup fxn in test
bitcoin-coder-bob Jan 20, 2026
7278814
fix: add Vtxo extensions to tx event subscription vtxos
aruokhai Jan 20, 2026
76eb292
Merge remote-tracking branch 'origin/bob/GetIntentWithTxid' into ark-…
aruokhai Jan 20, 2026
7403746
refactor: update teleport input validation to use intent proof from r…
aruokhai Jan 20, 2026
2aa9ef9
fix packet out being verified
aruokhai Jan 20, 2026
ba1fb42
refactor: streamline teleport asset validation and insertion logic in…
aruokhai Jan 20, 2026
9ba2f87
Merge remote-tracking branch 'origin/master' into ark-asset
aruokhai Jan 20, 2026
49152ab
debugging
aruokhai Jan 20, 2026
4f6b466
refactor: remove unused asset handling logic in getOutputVtxosLeaves …
aruokhai Jan 20, 2026
02cf0a5
refactor: enhance asset forfeit transaction verification and encoding…
aruokhai Jan 20, 2026
6634f65
reintroduce changes
aruokhai Jan 21, 2026
8f6e3d8
Fixes & Renaming
altafan Jan 21, 2026
c2952ce
Merge branch 'master' into ark-asset
altafan Jan 21, 2026
e7ae434
Drop (un)subscribe for teleport hashes rpcs & Fix permissions
altafan Jan 21, 2026
f5d7d8e
Fixes
altafan Jan 21, 2026
88c6f8d
Remove debug log
altafan Jan 21, 2026
10fed22
Lint
altafan Jan 21, 2026
ef8111c
Go mod tidy
altafan Jan 21, 2026
eb50b11
refactor: rename `AssetId.TxHash` to `Txid`, update `TeleportWitness`…
aruokhai Jan 22, 2026
428056d
fix: Use `input.Witness.Index` instead of `input.Vin` for teleport in…
aruokhai Jan 22, 2026
8d4e7de
Fix
altafan Jan 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 26 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,31 @@ run-light: clean
$(call setup_env, envs/arkd.light.env)
@go run ./cmd/arkd

## run-local: run arkd locally with explicit env vars (no container hostnames)
run-local: clean
@echo "Running arkd locally with explicit environment variables..."
@ARKD_LOG_LEVEL=6 \
ARKD_NO_MACAROONS=true \
ARKD_VTXO_TREE_EXPIRY=511 \
ARKD_SCHEDULER_TYPE=block \
ARKD_UNILATERAL_EXIT_DELAY=512 \
ARKD_BOARDING_EXIT_DELAY=1024 \
ARKD_CHECKPOINT_EXIT_DELAY=10 \
ARKD_DATADIR=./data/regtest \
ARKD_WALLET_ADDR=127.0.0.1:6060 \
ARKD_ESPLORA_URL=http://localhost:3000 \
ARKD_ROUND_MIN_PARTICIPANTS_COUNT=$${ARKD_ROUND_MIN_PARTICIPANTS_COUNT:-1} \
ARKD_ROUND_MAX_PARTICIPANTS_COUNT=$${ARKD_ROUND_MAX_PARTICIPANTS_COUNT:-128} \
ARKD_VTXO_MIN_AMOUNT=1 \
ARKD_LIVE_STORE_TYPE=inmemory \
ARKD_EVENT_DB_TYPE=badger \
ARKD_DB_TYPE=sqlite \
ARKD_SESSION_DURATION=$${ARKD_SESSION_DURATION:-10} \
ARKD_ROUND_REPORT_ENABLED=$${ARKD_ROUND_REPORT_ENABLED:-true} \
ARKD_BAN_THRESHOLD=1 \
ARKD_ONCHAIN_OUTPUT_FEE=100 \
go run ./cmd/arkd

## test: runs unit and component tests
test: pgtest redis-up
@sleep 2
Expand Down Expand Up @@ -217,4 +242,4 @@ run-simulation:
## pprof: run pprof tool (e.g. make pprof PROFILE=heap)
pprof:
@echo "Running pprof..."
@go tool pprof -http=:8080 http://localhost:7071/debug/pprof/$(PROFILE)
@go tool pprof -http=:8080 http://localhost:7071/debug/pprof/$(PROFILE)
295 changes: 295 additions & 0 deletions api-spec/openapi/swagger/ark/v1/indexer.openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,47 @@
"version": "version not set"
},
"paths": {
"/v1/indexer/assetGroup/{asset_id}": {
"get": {
"tags": [
"IndexerService"
],
"description": "GetAsset returns the asset information and metadata for the specified asset ID.",
"operationId": "IndexerService_GetAssetGroup",
"parameters": [
{
"name": "assetId",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "a successful response.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetAssetGroupResponse"
}
}
}
},
"default": {
"description": "An unexpected error response.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Status"
}
}
}
}
}
}
},
"/v1/indexer/batch/{batch_outpoint.txid}/{batch_outpoint.vout}/sweepTxs": {
"get": {
"tags": [
Expand Down Expand Up @@ -465,6 +506,88 @@
}
}
},
"/v1/indexer/teleport/subscribe": {
"post": {
"tags": [
"IndexerService"
],
"description": "SubscribeForTeleportHash allows to subscribe for tx notifications related to the provided\nteleport hashes. It can also be used to update an existing subscribtion by adding new hashes to it.",
"operationId": "IndexerService_SubscribeForTeleportHash",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SubscribeForTeleportHashRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "a successful response.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SubscribeForTeleportHashResponse"
}
}
}
},
"default": {
"description": "An unexpected error response.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Status"
}
}
}
}
}
}
},
"/v1/indexer/teleport/unsubscribe": {
"post": {
"tags": [
"IndexerService"
],
"description": "UnsubscribeForTeleportHash allows to remove teleport hashes from an existing subscription.",
"operationId": "IndexerService_UnsubscribeForTeleportHash",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnsubscribeForTeleportHashRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "a successful response.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnsubscribeForTeleportHashResponse"
}
}
}
},
"default": {
"description": "An unexpected error response.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Status"
}
}
}
}
}
}
},
"/v1/indexer/virtualTx/{txids}": {
"get": {
"tags": [
Expand Down Expand Up @@ -731,6 +854,61 @@
}
}
},
"AssetGroup": {
"title": "AssetGroup",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"immutable": {
"type": "boolean"
},
"metadata": {
"type": "array",
"items": {
"$ref": "#/components/schemas/AssetMetadata"
}
},
"quantity": {
"type": "integer",
"format": "uint64"
}
}
},
"AssetMetadata": {
"title": "AssetMetadata",
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"GetAssetGroupRequest": {
"title": "GetAssetGroupRequest",
"type": "object",
"properties": {
"assetId": {
"type": "string"
}
}
},
"GetAssetGroupResponse": {
"title": "GetAssetGroupResponse",
"type": "object",
"properties": {
"assetGroup": {
"$ref": "#/components/schemas/AssetGroup"
},
"assetId": {
"type": "string"
}
}
},
"GetBatchSweepTransactionsRequest": {
"title": "GetBatchSweepTransactionsRequest",
"type": "object",
Expand Down Expand Up @@ -1047,6 +1225,19 @@
}
}
},
"IndexerAsset": {
"title": "IndexerAsset",
"type": "object",
"properties": {
"amount": {
"type": "integer",
"format": "uint64"
},
"assetId": {
"type": "string"
}
}
},
"IndexerBatch": {
"title": "IndexerBatch",
"type": "object",
Expand Down Expand Up @@ -1103,6 +1294,15 @@
"type": "string",
"default": "INDEXER_CHAINED_TX_TYPE_UNSPECIFIED"
},
"IndexerExtension": {
"title": "IndexerExtension",
"type": "object",
"properties": {
"asset": {
"$ref": "#/components/schemas/IndexerAsset"
}
}
},
"IndexerHeartbeat": {
"title": "IndexerHeartbeat",
"type": "object"
Expand Down Expand Up @@ -1202,6 +1402,19 @@
"$ref": "#/components/schemas/IndexerVtxo"
}
},
"teleportEvents": {
"type": "array",
"description": "List of teleport events involved in the transaction",
"items": {
"$ref": "#/components/schemas/TeleportEvent"
}
},
"teleportHashes": {
"type": "array",
"items": {
"type": "string"
}
},
"tx": {
"type": "string"
},
Expand Down Expand Up @@ -1286,6 +1499,12 @@
"type": "integer",
"format": "int64"
},
"extensions": {
"type": "array",
"items": {
"$ref": "#/components/schemas/IndexerExtension"
}
},
"isPreconfirmed": {
"type": "boolean"
},
Expand Down Expand Up @@ -1356,6 +1575,62 @@
}
}
},
"SubscribeForTeleportHashRequest": {
"title": "SubscribeForTeleportHashRequest",
"type": "object",
"properties": {
"subscriptionId": {
"type": "string",
"description": "If set, update an existing subscription"
},
"teleportHashes": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"SubscribeForTeleportHashResponse": {
"title": "SubscribeForTeleportHashResponse",
"type": "object",
"properties": {
"subscriptionId": {
"type": "string"
}
}
},
"TeleportEvent": {
"title": "TeleportEvent",
"type": "object",
"properties": {
"amount": {
"type": "integer",
"format": "uint64"
},
"anchorOutpoint": {
"type": "string"
},
"assetId": {
"type": "string"
},
"createdAt": {
"type": "integer",
"format": "int64"
},
"expiresAt": {
"type": "integer",
"format": "int64"
},
"outputVout": {
"type": "integer",
"format": "uint32"
},
"teleportHash": {
"type": "string"
}
}
},
"UnsubscribeForScriptsRequest": {
"title": "UnsubscribeForScriptsRequest",
"type": "object",
Expand All @@ -1375,6 +1650,26 @@
"UnsubscribeForScriptsResponse": {
"title": "UnsubscribeForScriptsResponse",
"type": "object"
},
"UnsubscribeForTeleportHashRequest": {
"title": "UnsubscribeForTeleportHashRequest",
"type": "object",
"properties": {
"subscriptionId": {
"type": "string"
},
"teleportHashes": {
"type": "array",
"description": "If empty, unsubscribe all teleport hashes",
"items": {
"type": "string"
}
}
}
},
"UnsubscribeForTeleportHashResponse": {
"title": "UnsubscribeForTeleportHashResponse",
"type": "object"
}
}
},
Expand Down
Loading
Loading