- Core API version: 1.0.0
- Package version: 1.0.0
This Core/System API client is generated from the Core/System API spec using an Open API Generator. However, the current python generator is rather buggy, so we've had to customise the generation with templates to get a working client.
For more information on this, or to regenerate, check out the regeneration folder.
Both of the API clients are generated over the top of each other, so
See the API specifications on the Radix docs site.
Python >= 3.6
If the python package is hosted on a repository, you can install directly using:
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
(you may need to run pip
with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
)
Then import the package:
import core_client
Install via Setuptools.
python setup.py install --user
(or sudo python setup.py install
to install the package for all users)
Then import the package:
import core_client
Please follow the installation procedure and then run the following:
import time
import core_client
from pprint import pprint
from core_client.api import construction_api
from core_client.model.construction_build_request import ConstructionBuildRequest
from core_client.model.construction_build_response import ConstructionBuildResponse
from core_client.model.construction_derive_request import ConstructionDeriveRequest
from core_client.model.construction_derive_response import ConstructionDeriveResponse
from core_client.model.construction_finalize_request import ConstructionFinalizeRequest
from core_client.model.construction_finalize_response import ConstructionFinalizeResponse
from core_client.model.construction_hash_request import ConstructionHashRequest
from core_client.model.construction_hash_response import ConstructionHashResponse
from core_client.model.construction_parse_request import ConstructionParseRequest
from core_client.model.construction_parse_response import ConstructionParseResponse
from core_client.model.construction_submit_request import ConstructionSubmitRequest
from core_client.model.construction_submit_response import ConstructionSubmitResponse
from core_client.model.unexpected_error import UnexpectedError
# Defining the host is optional and defaults to http://localhost:3333
# See configuration.py for a list of all supported configuration parameters.
configuration = core_client.Configuration(
host = "http://localhost:3333"
)
# Enter a context with an instance of the API client
with core_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = construction_api.ConstructionApi(api_client)
construction_build_request = ConstructionBuildRequest(
network_identifier=NetworkIdentifier(
network="network_example",
),
operation_groups=[
OperationGroup(
operations=[
Operation(
type="type_example",
entity_identifier=EntityIdentifier(
address="address_example",
sub_entity=SubEntity(
address="address_example",
metadata=SubEntityMetadata(
validator_address="validator_address_example",
epoch_unlock=1,
),
),
),
substate=Substate(
substate_operation="BOOTUP",
substate_identifier=SubstateIdentifier(
identifier="identifier_example",
),
),
amount=ResourceAmount(
value=BigInteger("-80728"),
resource_identifier=ResourceIdentifier(),
),
data=Data(
action="CREATE",
data_object=DataObject(),
),
metadata={},
),
],
metadata={},
),
],
fee_payer=EntityIdentifier(
address="address_example",
sub_entity=SubEntity(
address="address_example",
metadata=SubEntityMetadata(
validator_address="validator_address_example",
epoch_unlock=1,
),
),
),
message="message_example",
disable_resource_allocate_and_destroy=True,
) # ConstructionBuildRequest |
try:
# Build Transaction
api_response = api_instance.construction_build_post(construction_build_request)
pprint(api_response)
except core_client.ApiException as e:
print("Exception when calling ConstructionApi->construction_build_post: %s\n" % e)
All URIs are relative to http://localhost:3333
Class | Method | HTTP request | Description |
---|---|---|---|
ConstructionApi | construction_build_post | POST /construction/build | Build Transaction |
ConstructionApi | construction_derive_post | POST /construction/derive | Derive Entity Identifier |
ConstructionApi | construction_finalize_post | POST /construction/finalize | Finalize Transaction |
ConstructionApi | construction_hash_post | POST /construction/hash | Get Transaction Hash |
ConstructionApi | construction_parse_post | POST /construction/parse | Parse Transaction |
ConstructionApi | construction_submit_post | POST /construction/submit | Submit Transaction |
EngineApi | engine_configuration_post | POST /engine/configuration | Get Engine Configuration |
EngineApi | engine_forks_voting_results_post | POST /engine/forks-voting-results | Get forks voting results for the given epoch |
EngineApi | engine_status_post | POST /engine/status | Get Engine Current Status |
EntityApi | entity_post | POST /entity | Get Entity Information |
KeyApi | key_list_post | POST /key/list | Get public keys |
KeyApi | key_sign_post | POST /key/sign | Sign transaction |
KeyApi | key_vote_post | POST /key/vote | Vote for the candidate fork (if present) |
KeyApi | key_withdraw_vote_post | POST /key/withdraw-vote | Withdraw the vote for the candidate fork |
MempoolApi | mempool_post | POST /mempool | Get Mempool Transactions |
MempoolApi | mempool_transaction_post | POST /mempool/transaction | Get Mempool Transaction |
NetworkApi | network_configuration_post | POST /network/configuration | Get Network Configuration |
NetworkApi | network_status_post | POST /network/status | Get Network Status |
TransactionsApi | transactions_post | POST /transactions | Get Committed Transactions |
- AboveMaximumValidatorFeeIncreaseError
- AboveMaximumValidatorFeeIncreaseErrorAllOf
- Bech32HRPs
- BelowMinimumStakeError
- BelowMinimumStakeErrorAllOf
- BigInteger
- CommittedTransaction
- CommittedTransactionMetadata
- CommittedTransactionsRequest
- CommittedTransactionsResponse
- ConstructionBuildRequest
- ConstructionBuildResponse
- ConstructionDeriveRequest
- ConstructionDeriveRequestMetadata
- ConstructionDeriveRequestMetadataAccount
- ConstructionDeriveRequestMetadataExitingUnstakes
- ConstructionDeriveRequestMetadataExitingUnstakesAllOf
- ConstructionDeriveRequestMetadataPreparedStakes
- ConstructionDeriveRequestMetadataPreparedStakesAllOf
- ConstructionDeriveRequestMetadataPreparedUnstakes
- ConstructionDeriveRequestMetadataToken
- ConstructionDeriveRequestMetadataTokenAllOf
- ConstructionDeriveRequestMetadataValidator
- ConstructionDeriveRequestMetadataValidatorSystem
- ConstructionDeriveResponse
- ConstructionFinalizeRequest
- ConstructionFinalizeResponse
- ConstructionHashRequest
- ConstructionHashResponse
- ConstructionParseRequest
- ConstructionParseResponse
- ConstructionSubmitRequest
- ConstructionSubmitResponse
- CoreError
- Data
- DataObject
- DataObjectNotSupportedByEntityError
- DataObjectNotSupportedByEntityErrorAllOf
- EngineCheckpoint
- EngineConfiguration
- EngineConfigurationRequest
- EngineConfigurationResponse
- EngineIdentifier
- EngineStateIdentifier
- EngineStatusRequest
- EngineStatusResponse
- EntityIdentifier
- EntityRequest
- EntityResponse
- EntitySetIdentifier
- EpochData
- EpochDataAllOf
- FeeConstructionError
- FeeConstructionErrorAllOf
- FeeTable
- Fork
- ForkVotingResult
- ForksVotingResultsRequest
- ForksVotingResultsResponse
- InternalServerError
- InternalServerErrorAllOf
- InvalidAddressError
- InvalidAddressErrorAllOf
- InvalidDataObjectError
- InvalidDataObjectErrorAllOf
- InvalidFeePayerEntityError
- InvalidFeePayerEntityErrorAllOf
- InvalidHexError
- InvalidHexErrorAllOf
- InvalidJsonError
- InvalidJsonErrorAllOf
- InvalidPartialStateIdentifierError
- InvalidPartialStateIdentifierErrorAllOf
- InvalidPublicKeyError
- InvalidPublicKeyErrorAllOf
- InvalidSignatureError
- InvalidSignatureErrorAllOf
- InvalidSubEntityError
- InvalidSubEntityErrorAllOf
- InvalidTransactionError
- InvalidTransactionErrorAllOf
- InvalidTransactionHashError
- InvalidTransactionHashErrorAllOf
- KeyListRequest
- KeyListResponse
- KeySignRequest
- KeySignResponse
- MempoolFullError
- MempoolFullErrorAllOf
- MempoolRequest
- MempoolResponse
- MempoolTransactionRequest
- MempoolTransactionResponse
- MessageTooLongError
- MessageTooLongErrorAllOf
- NetworkConfigurationResponse
- NetworkConfigurationResponseVersion
- NetworkIdentifier
- NetworkNotSupportedError
- NetworkNotSupportedErrorAllOf
- NetworkStatusRequest
- NetworkStatusResponse
- NotEnoughNativeTokensForFeesError
- NotEnoughNativeTokensForFeesErrorAllOf
- NotEnoughResourcesError
- NotEnoughResourcesErrorAllOf
- NotValidatorEntityError
- NotValidatorEntityErrorAllOf
- NotValidatorOwnerError
- NotValidatorOwnerErrorAllOf
- Operation
- OperationGroup
- ParsedTransactionMetadata
- PartialStateIdentifier
- Peer
- PreparedValidatorFee
- PreparedValidatorFeeAllOf
- PreparedValidatorOwner
- PreparedValidatorOwnerAllOf
- PreparedValidatorRegistered
- PreparedValidatorRegisteredAllOf
- PublicKey
- PublicKeyEntry
- PublicKeyIdentifiers
- PublicKeyNotSupportedError
- PublicKeyNotSupportedErrorAllOf
- ResourceAmount
- ResourceDepositOperationNotSupportedByEntityError
- ResourceDepositOperationNotSupportedByEntityErrorAllOf
- ResourceIdentifier
- ResourceWithdrawOperationNotSupportedByEntityError
- ResourceWithdrawOperationNotSupportedByEntityErrorAllOf
- RoundData
- RoundDataAllOf
- Signature
- StakeUnitResourceIdentifier
- StakeUnitResourceIdentifierAllOf
- StateIdentifier
- StateIdentifierNotFoundError
- StateIdentifierNotFoundErrorAllOf
- SubEntity
- SubEntityMetadata
- Substate
- SubstateDependencyNotFoundError
- SubstateDependencyNotFoundErrorAllOf
- SubstateIdentifier
- SubstateTypeIdentifier
- SyncStatus
- TokenData
- TokenDataAllOf
- TokenMetadata
- TokenMetadataAllOf
- TokenResourceIdentifier
- TokenResourceIdentifierAllOf
- Transaction
- TransactionIdentifier
- TransactionIdentifierHash
- TransactionNotFoundError
- TransactionNotFoundErrorAllOf
- UnclaimedRadixEngineAddress
- UnexpectedError
- UpSubstateFeeEntry
- UpcomingFork
- UpdateVoteRequest
- UpdateVoteResponse
- Validator
- ValidatorAllowDelegation
- ValidatorAllowDelegationAllOf
- ValidatorBFTData
- ValidatorBFTDataAllOf
- ValidatorData
- ValidatorDataAllOf
- ValidatorMetadata
- ValidatorMetadataAllOf
- ValidatorSystemMetadata
- ValidatorSystemMetadataAllOf
- VirtualParentData
- VirtualParentDataAllOf
All endpoints do not require authorization.
If the OpenAPI document is large, imports in core_client.apis and core_client.models may fail with a RecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions:
Solution 1: Use specific imports for apis and models like:
from core_client.api.default_api import DefaultApi
from core_client.model.pet import Pet
Solution 2: Before importing the package, adjust the maximum recursion limit as shown below:
import sys
sys.setrecursionlimit(1500)
import core_client
from core_client.apis import *
from core_client.models import *