@@ -30,7 +30,7 @@ entity_key, tx_hash = client.arkiv.create_entity(
3030 " trait_type" : " beanie" ,
3131 " trait_eyes" : " blue"
3232 },
33- btl = 100_000_000 # a few years with 2s blocks
33+ expires_in = 100_000_000 # a few years with 2s blocks
3434)
3535
3636# NFT contract points to entity_key
@@ -82,7 +82,7 @@ for i in range(0, len(file_data), CHUNK_SIZE):
8282 chunk_key, _ = client.arkiv.create_entity(
8383 payload = file_data[i:i + CHUNK_SIZE ],
8484 attributes = {" file_hash" : file_hash, " chunk_index" : i // CHUNK_SIZE },
85- btl = 100_000_000
85+ expires_in = 100_000_000
8686 )
8787 chunk_keys.append(chunk_key)
8888
@@ -94,7 +94,7 @@ manifest_key, _ = client.arkiv.create_entity(
9494 " file_name" : " video.mp4" ,
9595 " chunk_keys" : " ," .join(chunk_keys),
9696 },
97- btl = 100_000_000
97+ expires_in = 100_000_000
9898)
9999
100100# Reconstruct file
@@ -243,15 +243,15 @@ proposal = client.arkiv.create_entity(
243243 " votes_against" : 0 ,
244244 " quorum" : 40000000
245245 },
246- btl = 100_000_000 # Keep for historical record
246+ expires_in = 100_000_000 # Keep for historical record
247247)
248248
249249# Update vote counts (cheap!)
250250arkiv.update_entity(
251251 proposal_key,
252252 payload = proposal.payload, # Same text
253253 attributes = {" votes_for" : 1234 , " votes_against" : 567 , " status" : " passed" },
254- btl = 100_000_000 # Keep for historical record
254+ expires_in = 100_000_000 # Keep for historical record
255255)
256256
257257# Query all active proposals
@@ -300,7 +300,7 @@ btc_price_data = client.arkiv.create_entity(
300300 " network_id" : network_id,
301301 " market" : " crypto"
302302 },
303- btl = 100_000 # Keep 1 month
303+ expires_in = 100_000 # Keep 1 month
304304)
305305
306306# Applications read latest or query history
@@ -342,7 +342,7 @@ shipment_key = client.arkiv.create_entity(
342342 " product_sku" : " PROD-789" ,
343343 " status" : " in_transit" ,
344344 },
345- btl = 10_000_000 # Keep 6 months
345+ expires_in = 10_000_000 # Keep 6 months
346346)
347347
348348status_key = client.arkiv.create_entity(
@@ -354,7 +354,7 @@ status_key = client.arkiv.create_entity(
354354 " location" : " warehouse_b" ,
355355 " temperature" : 5.0 ,
356356 }
357- btl = 10_000_000 # Keep 6 months
357+ expires_in = 10_000_000 # Keep 6 months
358358)
359359
360360delivery_key = client.arkiv.create_entity(
@@ -368,7 +368,7 @@ delivery_key = client.arkiv.create_entity(
368368 " delivery_timestamp" : delivery_timestamp,
369369 " signature" : customer_signature_hash,
370370 }
371- btl = 10_000_000 # Keep 6 months
371+ expires_in = 10_000_000 # Keep 6 months
372372)
373373
374374# Update status at each checkpoint
@@ -430,7 +430,7 @@ model_entity_key = client.arkiv.create_entity(
430430 " author" : researcher_address,
431431 " framework" : " pytorch"
432432 },
433- btl = 10_000_000
433+ expires_in = 10_000_000
434434)
435435
436436# Track experiments
@@ -446,7 +446,7 @@ experiment = client.arkiv.create_entity(
446446 " accuracy" : 95 ,
447447 " f1_score" : 93 ,
448448 },
449- btl = 5_000_000
449+ expires_in = 5_000_000
450450)
451451
452452# Provable model lineage
0 commit comments