dkg 1.1.1__tar.gz → 8.0.0a1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dkg-1.1.1 → dkg-8.0.0a1}/PKG-INFO +1 -1
- {dkg-1.1.1 → dkg-8.0.0a1}/dkg/asset.py +3 -195
- {dkg-1.1.1 → dkg-8.0.0a1}/dkg/constants.py +3 -44
- {dkg-1.1.1 → dkg-8.0.0a1}/dkg/paranet.py +0 -31
- {dkg-1.1.1 → dkg-8.0.0a1}/dkg/providers/blockchain.py +7 -11
- {dkg-1.1.1 → dkg-8.0.0a1}/dkg/utils/blockchain_request.py +0 -32
- {dkg-1.1.1 → dkg-8.0.0a1}/dkg/utils/node_request.py +0 -24
- {dkg-1.1.1 → dkg-8.0.0a1}/pyproject.toml +1 -1
- dkg-1.1.1/dkg/data/interfaces/UnfinalizedStateStorage.json +0 -171
- {dkg-1.1.1 → dkg-8.0.0a1}/LICENSE +0 -0
- {dkg-1.1.1 → dkg-8.0.0a1}/NOTICE +0 -0
- {dkg-1.1.1 → dkg-8.0.0a1}/README.md +0 -0
- {dkg-1.1.1 → dkg-8.0.0a1}/dkg/__init__.py +0 -0
- {dkg-1.1.1 → dkg-8.0.0a1}/dkg/assertion.py +0 -0
- {dkg-1.1.1 → dkg-8.0.0a1}/dkg/data/interfaces/AssertionStorage.json +0 -0
- {dkg-1.1.1 → dkg-8.0.0a1}/dkg/data/interfaces/ContentAsset.json +0 -0
- {dkg-1.1.1 → dkg-8.0.0a1}/dkg/data/interfaces/ContentAssetStorage.json +0 -0
- {dkg-1.1.1 → dkg-8.0.0a1}/dkg/data/interfaces/Hub.json +0 -0
- {dkg-1.1.1 → dkg-8.0.0a1}/dkg/data/interfaces/Paranet.json +0 -0
- {dkg-1.1.1 → dkg-8.0.0a1}/dkg/data/interfaces/ParanetIncentivesPoolFactory.json +0 -0
- {dkg-1.1.1 → dkg-8.0.0a1}/dkg/data/interfaces/ParanetKnowledgeMinersRegistry.json +0 -0
- {dkg-1.1.1 → dkg-8.0.0a1}/dkg/data/interfaces/ParanetNeurowebIncentivesPool.json +0 -0
- {dkg-1.1.1 → dkg-8.0.0a1}/dkg/data/interfaces/ParanetsRegistry.json +0 -0
- {dkg-1.1.1 → dkg-8.0.0a1}/dkg/data/interfaces/ServiceAgreementStorageProxy.json +0 -0
- {dkg-1.1.1 → dkg-8.0.0a1}/dkg/data/interfaces/Token.json +0 -0
- {dkg-1.1.1 → dkg-8.0.0a1}/dkg/dataclasses.py +0 -0
- {dkg-1.1.1 → dkg-8.0.0a1}/dkg/exceptions.py +0 -0
- {dkg-1.1.1 → dkg-8.0.0a1}/dkg/graph.py +0 -0
- {dkg-1.1.1 → dkg-8.0.0a1}/dkg/main.py +0 -0
- {dkg-1.1.1 → dkg-8.0.0a1}/dkg/manager.py +0 -0
- {dkg-1.1.1 → dkg-8.0.0a1}/dkg/method.py +0 -0
- {dkg-1.1.1 → dkg-8.0.0a1}/dkg/module.py +0 -0
- {dkg-1.1.1 → dkg-8.0.0a1}/dkg/network.py +0 -0
- {dkg-1.1.1 → dkg-8.0.0a1}/dkg/node.py +0 -0
- {dkg-1.1.1 → dkg-8.0.0a1}/dkg/providers/__init__.py +0 -0
- {dkg-1.1.1 → dkg-8.0.0a1}/dkg/providers/node_http.py +0 -0
- {dkg-1.1.1 → dkg-8.0.0a1}/dkg/types/__init__.py +0 -0
- {dkg-1.1.1 → dkg-8.0.0a1}/dkg/types/blockchain.py +0 -0
- {dkg-1.1.1 → dkg-8.0.0a1}/dkg/types/dkg_node.py +0 -0
- {dkg-1.1.1 → dkg-8.0.0a1}/dkg/types/encoding.py +0 -0
- {dkg-1.1.1 → dkg-8.0.0a1}/dkg/types/evm.py +0 -0
- {dkg-1.1.1 → dkg-8.0.0a1}/dkg/types/general.py +0 -0
- {dkg-1.1.1 → dkg-8.0.0a1}/dkg/types/generics.py +0 -0
- {dkg-1.1.1 → dkg-8.0.0a1}/dkg/types/network.py +0 -0
- {dkg-1.1.1 → dkg-8.0.0a1}/dkg/types/rdf.py +0 -0
- {dkg-1.1.1 → dkg-8.0.0a1}/dkg/utils/__init__.py +0 -0
- {dkg-1.1.1 → dkg-8.0.0a1}/dkg/utils/decorators.py +0 -0
- {dkg-1.1.1 → dkg-8.0.0a1}/dkg/utils/merkle.py +0 -0
- {dkg-1.1.1 → dkg-8.0.0a1}/dkg/utils/metadata.py +0 -0
- {dkg-1.1.1 → dkg-8.0.0a1}/dkg/utils/rdf.py +0 -0
- {dkg-1.1.1 → dkg-8.0.0a1}/dkg/utils/string_transformations.py +0 -0
- {dkg-1.1.1 → dkg-8.0.0a1}/dkg/utils/ual.py +0 -0
@@ -418,143 +418,6 @@ class KnowledgeAsset(Module):
|
|
418
418
|
"operation": json.loads(Web3.to_json(receipt)),
|
419
419
|
}
|
420
420
|
|
421
|
-
_update = Method(NodeRequest.update)
|
422
|
-
|
423
|
-
_get_block = Method(BlockchainRequest.get_block)
|
424
|
-
|
425
|
-
_get_service_agreement_data = Method(BlockchainRequest.get_service_agreement_data)
|
426
|
-
_update_asset_state = Method(BlockchainRequest.update_asset_state)
|
427
|
-
|
428
|
-
def update(
|
429
|
-
self,
|
430
|
-
ual: UAL,
|
431
|
-
content: dict[Literal["public", "private"], JSONLD],
|
432
|
-
token_amount: Wei | None = None,
|
433
|
-
content_type: Literal["JSON-LD", "N-Quads"] = "JSON-LD",
|
434
|
-
) -> dict[str, UAL | HexStr | dict[str, str]]:
|
435
|
-
parsed_ual = parse_ual(ual)
|
436
|
-
blockchain_id, content_asset_storage_address, token_id = (
|
437
|
-
parsed_ual["blockchain"],
|
438
|
-
parsed_ual["contract_address"],
|
439
|
-
parsed_ual["token_id"],
|
440
|
-
)
|
441
|
-
|
442
|
-
assertions = format_content(content, content_type)
|
443
|
-
|
444
|
-
public_assertion_id = MerkleTree(
|
445
|
-
hash_assertion_with_indexes(assertions["public"]),
|
446
|
-
sort_pairs=True,
|
447
|
-
).root
|
448
|
-
public_assertion_metadata = generate_assertion_metadata(assertions["public"])
|
449
|
-
|
450
|
-
if token_amount is None:
|
451
|
-
agreement_id = self.get_agreement_id(
|
452
|
-
content_asset_storage_address, token_id
|
453
|
-
)
|
454
|
-
# TODO: Dynamic types for namedtuples?
|
455
|
-
agreement_data: Type[AgreementData] = self._get_service_agreement_data(
|
456
|
-
agreement_id
|
457
|
-
)
|
458
|
-
|
459
|
-
timestamp_now = self._get_block("latest")["timestamp"]
|
460
|
-
current_epoch = math.floor(
|
461
|
-
(timestamp_now - agreement_data.startTime) / agreement_data.epochLength
|
462
|
-
)
|
463
|
-
epochs_left = agreement_data.epochsNumber - current_epoch
|
464
|
-
|
465
|
-
token_amount = int(
|
466
|
-
self._get_bid_suggestion(
|
467
|
-
blockchain_id,
|
468
|
-
epochs_left,
|
469
|
-
public_assertion_metadata["size"],
|
470
|
-
content_asset_storage_address,
|
471
|
-
public_assertion_id,
|
472
|
-
DEFAULT_HASH_FUNCTION_ID,
|
473
|
-
token_amount or BidSuggestionRange.LOW,
|
474
|
-
)["bidSuggestion"]
|
475
|
-
)
|
476
|
-
|
477
|
-
token_amount -= agreement_data.tokens[0]
|
478
|
-
token_amount = token_amount if token_amount > 0 else 0
|
479
|
-
|
480
|
-
current_allowance = self.get_current_allowance()
|
481
|
-
if is_allowance_increased := current_allowance < token_amount:
|
482
|
-
self.increase_allowance(token_amount)
|
483
|
-
|
484
|
-
try:
|
485
|
-
self._update_asset_state(
|
486
|
-
token_id=token_id,
|
487
|
-
assertion_id=public_assertion_id,
|
488
|
-
size=public_assertion_metadata["size"],
|
489
|
-
triples_number=public_assertion_metadata["triples_number"],
|
490
|
-
chunks_number=public_assertion_metadata["chunks_number"],
|
491
|
-
update_token_amount=token_amount,
|
492
|
-
)
|
493
|
-
except ContractLogicError as err:
|
494
|
-
if is_allowance_increased:
|
495
|
-
self.decrease_allowance(token_amount)
|
496
|
-
raise err
|
497
|
-
|
498
|
-
assertions_list = [
|
499
|
-
{
|
500
|
-
"blockchain": blockchain_id,
|
501
|
-
"contract": content_asset_storage_address,
|
502
|
-
"tokenId": token_id,
|
503
|
-
"assertionId": public_assertion_id,
|
504
|
-
"assertion": assertions["public"],
|
505
|
-
"storeType": StoreTypes.PENDING,
|
506
|
-
}
|
507
|
-
]
|
508
|
-
|
509
|
-
if content.get("private", None):
|
510
|
-
assertions_list.append(
|
511
|
-
{
|
512
|
-
"blockchain": blockchain_id,
|
513
|
-
"contract": content_asset_storage_address,
|
514
|
-
"tokenId": token_id,
|
515
|
-
"assertionId": MerkleTree(
|
516
|
-
hash_assertion_with_indexes(assertions["private"]),
|
517
|
-
sort_pairs=True,
|
518
|
-
).root,
|
519
|
-
"assertion": assertions["private"],
|
520
|
-
"storeType": StoreTypes.PENDING,
|
521
|
-
}
|
522
|
-
)
|
523
|
-
|
524
|
-
operation_id = self._local_store(assertions_list)["operationId"]
|
525
|
-
self.get_operation_result(operation_id, "local-store")
|
526
|
-
|
527
|
-
operation_id = self._update(
|
528
|
-
public_assertion_id,
|
529
|
-
assertions["public"],
|
530
|
-
blockchain_id,
|
531
|
-
content_asset_storage_address,
|
532
|
-
token_id,
|
533
|
-
DEFAULT_HASH_FUNCTION_ID,
|
534
|
-
)["operationId"]
|
535
|
-
operation_result = self.get_operation_result(operation_id, "update")
|
536
|
-
|
537
|
-
return {
|
538
|
-
"UAL": ual,
|
539
|
-
"publicAssertionId": public_assertion_id,
|
540
|
-
"operation": {
|
541
|
-
"operationId": operation_id,
|
542
|
-
"status": operation_result["status"],
|
543
|
-
},
|
544
|
-
}
|
545
|
-
|
546
|
-
_cancel_update = Method(BlockchainRequest.cancel_asset_state_update)
|
547
|
-
|
548
|
-
def cancel_update(self, ual: UAL) -> dict[str, UAL | TxReceipt]:
|
549
|
-
token_id = parse_ual(ual)["token_id"]
|
550
|
-
|
551
|
-
receipt: TxReceipt = self._cancel_update(token_id)
|
552
|
-
|
553
|
-
return {
|
554
|
-
"UAL": ual,
|
555
|
-
"operation": json.loads(Web3.to_json(receipt)),
|
556
|
-
}
|
557
|
-
|
558
421
|
_burn_asset = Method(BlockchainRequest.burn_asset)
|
559
422
|
|
560
423
|
def burn(self, ual: UAL) -> dict[str, UAL | TxReceipt]:
|
@@ -838,7 +701,10 @@ class KnowledgeAsset(Module):
|
|
838
701
|
"UAL": ual,
|
839
702
|
"operation": json.loads(Web3.to_json(receipt)),
|
840
703
|
}
|
704
|
+
|
705
|
+
_get_block = Method(BlockchainRequest.get_block)
|
841
706
|
|
707
|
+
_get_service_agreement_data = Method(BlockchainRequest.get_service_agreement_data)
|
842
708
|
_get_assertion_size = Method(BlockchainRequest.get_assertion_size)
|
843
709
|
_add_tokens = Method(BlockchainRequest.increase_asset_token_amount)
|
844
710
|
|
@@ -900,64 +766,6 @@ class KnowledgeAsset(Module):
|
|
900
766
|
"operation": json.loads(Web3.to_json(receipt)),
|
901
767
|
}
|
902
768
|
|
903
|
-
_add_update_tokens = Method(BlockchainRequest.increase_asset_update_token_amount)
|
904
|
-
|
905
|
-
def add_update_tokens(
|
906
|
-
self,
|
907
|
-
ual: UAL,
|
908
|
-
token_amount: Wei | None = None,
|
909
|
-
) -> dict[str, UAL | TxReceipt]:
|
910
|
-
parsed_ual = parse_ual(ual)
|
911
|
-
blockchain_id, content_asset_storage_address, token_id = (
|
912
|
-
parsed_ual["blockchain"],
|
913
|
-
parsed_ual["contract_address"],
|
914
|
-
parsed_ual["token_id"],
|
915
|
-
)
|
916
|
-
|
917
|
-
if token_amount is None:
|
918
|
-
agreement_id = self.get_agreement_id(
|
919
|
-
content_asset_storage_address, token_id
|
920
|
-
)
|
921
|
-
# TODO: Dynamic types for namedtuples?
|
922
|
-
agreement_data: Type[AgreementData] = self._get_service_agreement_data(
|
923
|
-
agreement_id
|
924
|
-
)
|
925
|
-
|
926
|
-
timestamp_now = self._get_block("latest")["timestamp"]
|
927
|
-
current_epoch = math.floor(
|
928
|
-
(timestamp_now - agreement_data.startTime) / agreement_data.epochLength
|
929
|
-
)
|
930
|
-
epochs_left = agreement_data.epochsNumber - current_epoch
|
931
|
-
|
932
|
-
unfinalized_state = self._get_latest_assertion_id(token_id)
|
933
|
-
unfinalized_state_size = self._get_assertion_size(unfinalized_state)
|
934
|
-
|
935
|
-
token_amount = int(
|
936
|
-
self._get_bid_suggestion(
|
937
|
-
blockchain_id,
|
938
|
-
epochs_left,
|
939
|
-
unfinalized_state_size,
|
940
|
-
content_asset_storage_address,
|
941
|
-
unfinalized_state,
|
942
|
-
DEFAULT_HASH_FUNCTION_ID,
|
943
|
-
token_amount or BidSuggestionRange.LOW,
|
944
|
-
)["bidSuggestion"]
|
945
|
-
) - sum(agreement_data.tokensInfo)
|
946
|
-
|
947
|
-
if token_amount <= 0:
|
948
|
-
raise InvalidTokenAmount(
|
949
|
-
"Token amount is bigger than default suggested amount, "
|
950
|
-
"please specify exact token_amount if you still want to add "
|
951
|
-
"more update tokens!"
|
952
|
-
)
|
953
|
-
|
954
|
-
receipt: TxReceipt = self._add_update_tokens(token_id, token_amount)
|
955
|
-
|
956
|
-
return {
|
957
|
-
"UAL": ual,
|
958
|
-
"operation": json.loads(Web3.to_json(receipt)),
|
959
|
-
}
|
960
|
-
|
961
769
|
def get_owner(self, ual: UAL) -> Address:
|
962
770
|
token_id = parse_ual(ual)["token_id"]
|
963
771
|
|
@@ -31,59 +31,18 @@ BLOCKCHAINS = {
|
|
31
31
|
},
|
32
32
|
},
|
33
33
|
"devnet": {
|
34
|
-
"otp:2160": {
|
35
|
-
"hub": "0x833048F6e6BEa78E0AAdedeCd2Dc2231dda443FB",
|
36
|
-
"rpc": "https://lofar-tm-rpc.origin-trail.network",
|
37
|
-
},
|
38
|
-
"gnosis:10200": {
|
39
|
-
"hub": "0xD2bA102A0b11944d00180eE8136208ccF87bC39A",
|
40
|
-
"rpc": "https://rpc.chiadochain.net",
|
41
|
-
"gas_price_oracle": "https://blockscout.chiadochain.net/api/v1/gas-price-oracle",
|
42
|
-
},
|
43
34
|
"base:84532": {
|
44
|
-
"hub": "
|
35
|
+
"hub": "0xaA849CAC4FA86f6b7484503f3c7a314772AED6d4",
|
45
36
|
"rpc": "https://sepolia.base.org",
|
46
37
|
}
|
47
38
|
},
|
48
39
|
"testnet": {
|
49
|
-
"otp:20430": {
|
50
|
-
"hub": "0xBbfF7Ea6b2Addc1f38A0798329e12C08f03750A6",
|
51
|
-
"rpc": "https://lofar-testnet.origin-trail.network",
|
52
|
-
},
|
53
|
-
"gnosis:10200": {
|
54
|
-
"hub": "0xC06210312C9217A0EdF67453618F5eB96668679A",
|
55
|
-
"rpc": "https://rpc.chiadochain.net",
|
56
|
-
"gas_price_oracle": "https://blockscout.chiadochain.net/api/v1/gas-price-oracle",
|
57
|
-
},
|
58
40
|
"base:84532": {
|
59
|
-
"hub": "
|
41
|
+
"hub": "0xCca0eA14540588A09c85cD6A6Fc53eA3A7010692",
|
60
42
|
"rpc": "https://sepolia.base.org",
|
61
43
|
}
|
62
44
|
},
|
63
|
-
"mainnet": {
|
64
|
-
"otp:2043": {
|
65
|
-
"hub": "0x5fA7916c48Fe6D5F1738d12Ad234b78c90B4cAdA",
|
66
|
-
"rpc": "https://astrosat-parachain-rpc.origin-trail.network",
|
67
|
-
},
|
68
|
-
"gnosis:100": {
|
69
|
-
"hub": "0xbEF14fc04F870c2dD65c13Df4faB6ba01A9c746b",
|
70
|
-
"rpc": "https://rpc.gnosischain.com/",
|
71
|
-
"gas_price_oracle": [
|
72
|
-
"https://api.gnosisscan.io/api?module=proxy&action=eth_gasPrice",
|
73
|
-
"https://blockscout.com/xdai/mainnet/api/v1/gas-price-oracle",
|
74
|
-
],
|
75
|
-
},
|
76
|
-
"base:8453": {
|
77
|
-
"hub": "0xaBfcf2ad1718828E7D3ec20435b0d0b5EAfbDf2c",
|
78
|
-
"rpc": "https://mainnet.base.org",
|
79
|
-
},
|
80
|
-
},
|
81
|
-
}
|
82
|
-
|
83
|
-
DEFAULT_GAS_PRICE_GWEI = {
|
84
|
-
"otp": 1,
|
85
|
-
"gnosis": 20,
|
86
|
-
"base": 20,
|
45
|
+
"mainnet": {},
|
87
46
|
}
|
88
47
|
|
89
48
|
DEFAULT_HASH_FUNCTION_ID = 1
|
@@ -424,37 +424,6 @@ class Paranet(Module):
|
|
424
424
|
_get_updating_knowledge_asset_states = Method(
|
425
425
|
BlockchainRequest.get_updating_knowledge_asset_states
|
426
426
|
)
|
427
|
-
_process_updated_knowledge_asset_states_metadata = Method(
|
428
|
-
BlockchainRequest.process_updated_knowledge_asset_states_metadata
|
429
|
-
)
|
430
|
-
|
431
|
-
def update_claimable_rewards(self, ual: UAL) -> dict[str, str | HexStr | TxReceipt]:
|
432
|
-
parsed_ual = parse_ual(ual)
|
433
|
-
knowledge_asset_storage, knowledge_asset_token_id = (
|
434
|
-
parsed_ual["contract_address"],
|
435
|
-
parsed_ual["token_id"],
|
436
|
-
)
|
437
|
-
|
438
|
-
paranet_id = Web3.solidity_keccak(
|
439
|
-
["address", "uint256"], [knowledge_asset_storage, knowledge_asset_token_id]
|
440
|
-
)
|
441
|
-
|
442
|
-
updating_states = self._get_updating_knowledge_asset_states(
|
443
|
-
self.manager.blockchain_provider.account.address,
|
444
|
-
paranet_id,
|
445
|
-
)
|
446
|
-
receipt: TxReceipt = self._process_updated_knowledge_asset_states_metadata(
|
447
|
-
knowledge_asset_storage,
|
448
|
-
knowledge_asset_token_id,
|
449
|
-
0,
|
450
|
-
len(updating_states),
|
451
|
-
)
|
452
|
-
|
453
|
-
return {
|
454
|
-
"paranetUAL": ual,
|
455
|
-
"paranetId": paranet_id,
|
456
|
-
"operation": json.loads(Web3.to_json(receipt)),
|
457
|
-
}
|
458
427
|
|
459
428
|
def _get_incentives_pool_contract(
|
460
429
|
self,
|
@@ -23,7 +23,7 @@ from pathlib import Path
|
|
23
23
|
from typing import Any, Type
|
24
24
|
|
25
25
|
import requests
|
26
|
-
from dkg.constants import BLOCKCHAINS
|
26
|
+
from dkg.constants import BLOCKCHAINS
|
27
27
|
from dkg.exceptions import (
|
28
28
|
AccountMissing,
|
29
29
|
EnvironmentNotSupported,
|
@@ -181,13 +181,15 @@ class BlockchainProvider:
|
|
181
181
|
"account."
|
182
182
|
)
|
183
183
|
|
184
|
-
gas_price = self.gas_price or gas_price or self._get_network_gas_price()
|
185
|
-
|
186
184
|
options = {
|
187
|
-
"gasPrice": gas_price,
|
188
185
|
"gas": gas_limit or contract_function(**args).estimate_gas(),
|
189
186
|
}
|
190
187
|
|
188
|
+
gas_price = self.gas_price or gas_price or self._get_network_gas_price()
|
189
|
+
|
190
|
+
if gas_price is not None:
|
191
|
+
options["gasPrice"] = gas_price
|
192
|
+
|
191
193
|
tx_hash = contract_function(**args).transact(options)
|
192
194
|
tx_receipt = self.w3.eth.wait_for_transaction_receipt(tx_hash)
|
193
195
|
|
@@ -213,12 +215,6 @@ class BlockchainProvider:
|
|
213
215
|
if self.environment == "development":
|
214
216
|
return None
|
215
217
|
|
216
|
-
blockchain_name, _ = self.blockchain_id.split(":")
|
217
|
-
|
218
|
-
default_gas_price = self.w3.to_wei(
|
219
|
-
DEFAULT_GAS_PRICE_GWEI[blockchain_name], "gwei"
|
220
|
-
)
|
221
|
-
|
222
218
|
def fetch_gas_price(oracle_url: str) -> Wei | None:
|
223
219
|
try:
|
224
220
|
response = requests.get(oracle_url)
|
@@ -244,7 +240,7 @@ class BlockchainProvider:
|
|
244
240
|
if gas_price is not None:
|
245
241
|
return gas_price
|
246
242
|
|
247
|
-
return
|
243
|
+
return None
|
248
244
|
|
249
245
|
def _init_contracts(self):
|
250
246
|
for contract in self.abi.keys():
|
@@ -93,23 +93,6 @@ class BlockchainRequest:
|
|
93
93
|
function="burnAsset",
|
94
94
|
args={"tokenId": int},
|
95
95
|
)
|
96
|
-
update_asset_state = ContractTransaction(
|
97
|
-
contract="ContentAsset",
|
98
|
-
function="updateAssetState",
|
99
|
-
args={
|
100
|
-
"tokenId": int,
|
101
|
-
"assertionId": bytes | HexStr,
|
102
|
-
"size": int,
|
103
|
-
"triplesNumber": int,
|
104
|
-
"chunksNumber": int,
|
105
|
-
"updateTokenAmount": int,
|
106
|
-
},
|
107
|
-
)
|
108
|
-
cancel_asset_state_update = ContractTransaction(
|
109
|
-
contract="ContentAsset",
|
110
|
-
function="cancelAssetStateUpdate",
|
111
|
-
args={"tokenId": int},
|
112
|
-
)
|
113
96
|
extend_asset_storing_period = ContractTransaction(
|
114
97
|
contract="ContentAsset",
|
115
98
|
function="extendAssetStoringPeriod",
|
@@ -120,11 +103,6 @@ class BlockchainRequest:
|
|
120
103
|
function="increaseAssetTokenAmount",
|
121
104
|
args={"tokenId": int, "tokenAmount": int},
|
122
105
|
)
|
123
|
-
increase_asset_update_token_amount = ContractTransaction(
|
124
|
-
contract="ContentAsset",
|
125
|
-
function="increaseAssetUpdateTokenAmount",
|
126
|
-
args={"tokenId": int, "tokenAmount": int},
|
127
|
-
)
|
128
106
|
|
129
107
|
transfer_asset = ContractTransaction(
|
130
108
|
contract="ContentAssetStorage",
|
@@ -249,16 +227,6 @@ class BlockchainRequest:
|
|
249
227
|
"paranetId": HexStr,
|
250
228
|
},
|
251
229
|
)
|
252
|
-
process_updated_knowledge_asset_states_metadata = ContractTransaction(
|
253
|
-
contract="Paranet",
|
254
|
-
function="processUpdatedKnowledgeAssetStatesMetadata",
|
255
|
-
args={
|
256
|
-
"paranetKAStorageContract": Address,
|
257
|
-
"paranetKATokenId": int,
|
258
|
-
"start": int,
|
259
|
-
"end": int,
|
260
|
-
},
|
261
|
-
)
|
262
230
|
|
263
231
|
is_knowledge_miner_registered = ContractCall(
|
264
232
|
contract="ParanetsRegistry",
|
@@ -69,18 +69,6 @@ class NodeRequest:
|
|
69
69
|
"hashFunctionId": int,
|
70
70
|
},
|
71
71
|
)
|
72
|
-
update = NodeCall(
|
73
|
-
method=HTTPRequestMethod.POST,
|
74
|
-
path="update",
|
75
|
-
data={
|
76
|
-
"assertionId": str,
|
77
|
-
"assertion": NQuads,
|
78
|
-
"blockchain": str,
|
79
|
-
"contract": Address,
|
80
|
-
"tokenId": int,
|
81
|
-
"hashFunctionId": int,
|
82
|
-
},
|
83
|
-
)
|
84
72
|
get = NodeCall(
|
85
73
|
method=HTTPRequestMethod.POST,
|
86
74
|
path="get",
|
@@ -115,17 +103,6 @@ class PublishOperationStatus(Enum):
|
|
115
103
|
PUBLISH_END = auto()
|
116
104
|
|
117
105
|
|
118
|
-
class UpdateOperationStatus(AutoStrEnumUpperCase):
|
119
|
-
UPDATE_START = auto()
|
120
|
-
UPDATE_INIT_START = auto()
|
121
|
-
UPDATE_INIT_END = auto()
|
122
|
-
UPDATE_REPLICATE_START = auto()
|
123
|
-
UPDATE_REPLICATE_END = auto()
|
124
|
-
VALIDATING_UPDATE_ASSERTION_REMOTE_START = auto()
|
125
|
-
VALIDATING_UPDATE_ASSERTION_REMOTE_END = auto()
|
126
|
-
UPDATE_END = auto()
|
127
|
-
|
128
|
-
|
129
106
|
class StoreTypes(AutoStrEnumUpperCase):
|
130
107
|
TRIPLE = auto()
|
131
108
|
PENDING = auto()
|
@@ -171,7 +148,6 @@ class OperationStatus(AutoStrEnumUpperCase):
|
|
171
148
|
DIAL_PROTOCOL_END = auto()
|
172
149
|
LOCAL_STORE = LocalStoreOperationStatus
|
173
150
|
PUBLISH = PublishOperationStatus
|
174
|
-
UPDATE = UpdateOperationStatus
|
175
151
|
GET = GetOperationStatus
|
176
152
|
QUERY = QueryOperationStatus
|
177
153
|
|
@@ -1,171 +0,0 @@
|
|
1
|
-
[
|
2
|
-
{
|
3
|
-
"inputs": [
|
4
|
-
{
|
5
|
-
"internalType": "address",
|
6
|
-
"name": "hubAddress",
|
7
|
-
"type": "address"
|
8
|
-
}
|
9
|
-
],
|
10
|
-
"stateMutability": "nonpayable",
|
11
|
-
"type": "constructor"
|
12
|
-
},
|
13
|
-
{
|
14
|
-
"inputs": [
|
15
|
-
{
|
16
|
-
"internalType": "uint256",
|
17
|
-
"name": "tokenId",
|
18
|
-
"type": "uint256"
|
19
|
-
}
|
20
|
-
],
|
21
|
-
"name": "deleteIssuer",
|
22
|
-
"outputs": [],
|
23
|
-
"stateMutability": "nonpayable",
|
24
|
-
"type": "function"
|
25
|
-
},
|
26
|
-
{
|
27
|
-
"inputs": [
|
28
|
-
{
|
29
|
-
"internalType": "uint256",
|
30
|
-
"name": "tokenId",
|
31
|
-
"type": "uint256"
|
32
|
-
}
|
33
|
-
],
|
34
|
-
"name": "deleteUnfinalizedState",
|
35
|
-
"outputs": [],
|
36
|
-
"stateMutability": "nonpayable",
|
37
|
-
"type": "function"
|
38
|
-
},
|
39
|
-
{
|
40
|
-
"inputs": [
|
41
|
-
{
|
42
|
-
"internalType": "uint256",
|
43
|
-
"name": "tokenId",
|
44
|
-
"type": "uint256"
|
45
|
-
}
|
46
|
-
],
|
47
|
-
"name": "getIssuer",
|
48
|
-
"outputs": [
|
49
|
-
{
|
50
|
-
"internalType": "address",
|
51
|
-
"name": "",
|
52
|
-
"type": "address"
|
53
|
-
}
|
54
|
-
],
|
55
|
-
"stateMutability": "view",
|
56
|
-
"type": "function"
|
57
|
-
},
|
58
|
-
{
|
59
|
-
"inputs": [
|
60
|
-
{
|
61
|
-
"internalType": "uint256",
|
62
|
-
"name": "tokenId",
|
63
|
-
"type": "uint256"
|
64
|
-
}
|
65
|
-
],
|
66
|
-
"name": "getUnfinalizedState",
|
67
|
-
"outputs": [
|
68
|
-
{
|
69
|
-
"internalType": "bytes32",
|
70
|
-
"name": "",
|
71
|
-
"type": "bytes32"
|
72
|
-
}
|
73
|
-
],
|
74
|
-
"stateMutability": "view",
|
75
|
-
"type": "function"
|
76
|
-
},
|
77
|
-
{
|
78
|
-
"inputs": [
|
79
|
-
{
|
80
|
-
"internalType": "uint256",
|
81
|
-
"name": "tokenId",
|
82
|
-
"type": "uint256"
|
83
|
-
}
|
84
|
-
],
|
85
|
-
"name": "hasPendingUpdate",
|
86
|
-
"outputs": [
|
87
|
-
{
|
88
|
-
"internalType": "bool",
|
89
|
-
"name": "",
|
90
|
-
"type": "bool"
|
91
|
-
}
|
92
|
-
],
|
93
|
-
"stateMutability": "view",
|
94
|
-
"type": "function"
|
95
|
-
},
|
96
|
-
{
|
97
|
-
"inputs": [],
|
98
|
-
"name": "hub",
|
99
|
-
"outputs": [
|
100
|
-
{
|
101
|
-
"internalType": "contract Hub",
|
102
|
-
"name": "",
|
103
|
-
"type": "address"
|
104
|
-
}
|
105
|
-
],
|
106
|
-
"stateMutability": "view",
|
107
|
-
"type": "function"
|
108
|
-
},
|
109
|
-
{
|
110
|
-
"inputs": [],
|
111
|
-
"name": "name",
|
112
|
-
"outputs": [
|
113
|
-
{
|
114
|
-
"internalType": "string",
|
115
|
-
"name": "",
|
116
|
-
"type": "string"
|
117
|
-
}
|
118
|
-
],
|
119
|
-
"stateMutability": "pure",
|
120
|
-
"type": "function"
|
121
|
-
},
|
122
|
-
{
|
123
|
-
"inputs": [
|
124
|
-
{
|
125
|
-
"internalType": "uint256",
|
126
|
-
"name": "tokenId",
|
127
|
-
"type": "uint256"
|
128
|
-
},
|
129
|
-
{
|
130
|
-
"internalType": "address",
|
131
|
-
"name": "issuer",
|
132
|
-
"type": "address"
|
133
|
-
}
|
134
|
-
],
|
135
|
-
"name": "setIssuer",
|
136
|
-
"outputs": [],
|
137
|
-
"stateMutability": "nonpayable",
|
138
|
-
"type": "function"
|
139
|
-
},
|
140
|
-
{
|
141
|
-
"inputs": [
|
142
|
-
{
|
143
|
-
"internalType": "uint256",
|
144
|
-
"name": "tokenId",
|
145
|
-
"type": "uint256"
|
146
|
-
},
|
147
|
-
{
|
148
|
-
"internalType": "bytes32",
|
149
|
-
"name": "state",
|
150
|
-
"type": "bytes32"
|
151
|
-
}
|
152
|
-
],
|
153
|
-
"name": "setUnfinalizedState",
|
154
|
-
"outputs": [],
|
155
|
-
"stateMutability": "nonpayable",
|
156
|
-
"type": "function"
|
157
|
-
},
|
158
|
-
{
|
159
|
-
"inputs": [],
|
160
|
-
"name": "version",
|
161
|
-
"outputs": [
|
162
|
-
{
|
163
|
-
"internalType": "string",
|
164
|
-
"name": "",
|
165
|
-
"type": "string"
|
166
|
-
}
|
167
|
-
],
|
168
|
-
"stateMutability": "pure",
|
169
|
-
"type": "function"
|
170
|
-
}
|
171
|
-
]
|
File without changes
|
{dkg-1.1.1 → dkg-8.0.0a1}/NOTICE
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|