Skip to content

Commit

Permalink
JS v3 generator changes (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonpaulos authored Aug 23, 2024
1 parent b6483ce commit 4d71e3c
Show file tree
Hide file tree
Showing 5 changed files with 372 additions and 71 deletions.
2 changes: 1 addition & 1 deletion scripts/generate_typescript.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ java -jar target/generator-*-jar-with-dependencies.jar \
-s "$ALGOD_SPEC" \
-t "$TEMPLATE_DIR" \
-m "$SDK_DIR/src/client/v2/algod/models" \
-p "$TEMPLATE_DIR/algod_config.properties,$TEMPLATE_DIR/parameter_order_overrides.properties" \
-p "$TEMPLATE_DIR/algod_config.properties" \

java -jar target/generator-*-jar-with-dependencies.jar \
template \
Expand Down
53 changes: 53 additions & 0 deletions typescript_templates/algod_config.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,56 @@
# changes.
use_object_params_if_greater_than=0
indexer=false
# Type override conventions:
# * All Algo and asset amounts should be bigint (including fees)
# * All round numbers should be bigint, including any quantities you would add
# to a round number (e.g. offset or duration)
# * All application and asset IDs should be bigint
# * All timestamps in nanoseconds should be bigint
# * If there is a quantity whose purpose is to be added to, subtracted from, or
# otherwise operated on with a bigint, it should be a bigint for ease of use
# * Other quantities outside of the above and which will never exceed the maximum
# safe javascript integer should be number
type_override_Account_amount=bigint
type_override_Account_amountWithoutPendingRewards=bigint
type_override_Account_minBalance=bigint
type_override_Account_pendingRewards=bigint
type_override_Account_rewards=bigint
type_override_Account_round=bigint
type_override_Account_rewardBase=bigint
type_override_AccountApplicationResponse_round=bigint
type_override_AccountAssetResponse_round=bigint
type_override_AccountParticipation_voteFirstValid=bigint
type_override_AccountParticipation_voteKeyDilution=bigint
type_override_AccountParticipation_voteLastValid=bigint
type_override_Application_id=bigint
type_override_ApplicationLocalState_id=bigint
type_override_Asset_index=bigint
type_override_AssetHolding_assetId=bigint
type_override_Box_round=bigint
type_override_BoxReference_app=bigint
type_override_GetSyncRoundResponse_round=bigint
type_override_NodeStatusResponse_catchupTime=bigint
type_override_NodeStatusResponse_lastRound=bigint
type_override_NodeStatusResponse_nextVersionRound=bigint
type_override_NodeStatusResponse_timeSinceLastRound=bigint
type_override_NodeStatusResponse_upgradeDelay=bigint
type_override_NodeStatusResponse_upgradeNextProtocolVoteBefore=bigint
type_override_PendingTransactionResponse_applicationIndex=bigint
type_override_PendingTransactionResponse_assetClosingAmount=bigint
type_override_PendingTransactionResponse_assetIndex=bigint
type_override_PendingTransactionResponse_closeRewards=bigint
type_override_PendingTransactionResponse_closingAmount=bigint
type_override_PendingTransactionResponse_confirmedRound=bigint
type_override_PendingTransactionResponse_receiverRewards=bigint
type_override_PendingTransactionResponse_senderRewards=bigint
type_override_SimulateRequest_round=bigint
type_override_SimulateResponse_lastRound=bigint
type_override_SupplyResponse_currentRound=bigint
type_override_SupplyResponse_onlineMoney=bigint
type_override_SupplyResponse_totalMoney=bigint
type_override_TransactionParametersResponse_fee=bigint
type_override_TransactionParametersResponse_lastRound=bigint
type_override_TransactionParametersResponse_minFee=bigint
type_override_TealValue_bytes=binary
type_override_TealKeyValue_key=binary
76 changes: 76 additions & 0 deletions typescript_templates/indexer_config.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,78 @@
use_object_params_if_greater_than=0
indexer=true
# Type override conventions:
# * All Algo and asset amounts should be bigint (including fees)
# * All round numbers should be bigint, including any quantities you would add
# to a round number (e.g. offset or duration)
# * All application and asset IDs should be bigint
# * All timestamps in nanoseconds should be bigint
# * If there is a quantity whose purpose is to be added to, subtracted from, or
# otherwise operated on with a bigint, it should be a bigint for ease of use
# * Other quantities outside of the above and which will never exceed the maximum
# safe javascript integer should be number
type_override_Account_amount=bigint
type_override_Account_amountWithoutPendingRewards=bigint
type_override_Account_pendingRewards=bigint
type_override_Account_rewards=bigint
type_override_Account_round=bigint
type_override_Account_rewardBase=bigint
type_override_AccountParticipation_voteFirstValid=bigint
type_override_AccountParticipation_voteKeyDilution=bigint
type_override_AccountParticipation_voteLastValid=bigint
type_override_AccountResponse_currentRound=bigint
type_override_AccountsResponse_currentRound=bigint
type_override_Application_id=bigint
type_override_ApplicationLocalState_id=bigint
type_override_ApplicationLocalStatesResponse_currentRound=bigint
type_override_ApplicationLogsResponse_applicationId=bigint
type_override_ApplicationLogsResponse_currentRound=bigint
type_override_ApplicationResponse_currentRound=bigint
type_override_ApplicationsResponse_currentRound=bigint
type_override_Asset_index=bigint
type_override_AssetBalancesResponse_currentRound=bigint
type_override_AssetHolding_assetId=bigint
type_override_AssetHoldingsResponse_currentRound=bigint
type_override_AssetResponse_currentRound=bigint
type_override_AssetsResponse_currentRound=bigint
type_override_Block_round=bigint
type_override_BlockRewards_rewardsCalculationRound=bigint
type_override_BlockRewards_rewardsLevel=bigint
type_override_BlockRewards_rewardsRate=bigint
type_override_BlockRewards_rewardsResidue=bigint
type_override_BlockUpgradeState_nextProtocolSwitchOn=bigint
type_override_BlockUpgradeState_nextProtocolVoteBefore=bigint
type_override_BlockUpgradeVote_upgradeDelay=bigint
type_override_Box_round=bigint
type_override_BoxesResponse_applicationId=bigint
type_override_HealthCheck_round=bigint
type_override_StateProofTracking_nextRound=bigint
type_override_StateProofTracking_onlineTotalWeight=bigint
type_override_StateProofTracking_type=number
type_override_StateSchema_numByteSlice=number
type_override_StateSchema_numUint=number
type_override_Transaction_fee=bigint
type_override_Transaction_firstValid=bigint
type_override_Transaction_lastValid=bigint
type_override_Transaction_closeRewards=bigint
type_override_Transaction_closingAmount=bigint
type_override_Transaction_confirmedRound=bigint
type_override_Transaction_createdApplicationIndex=bigint
type_override_Transaction_createdAssetIndex=bigint
type_override_Transaction_receiverRewards=bigint
type_override_Transaction_senderRewards=bigint
type_override_TransactionApplication_applicationId=bigint
type_override_TransactionApplication_foreignApps=bigint
type_override_TransactionApplication_foreignAssets=bigint
type_override_TransactionAssetConfig_assetId=bigint
type_override_TransactionAssetFreeze_assetId=bigint
type_override_TransactionAssetTransfer_assetId=bigint
type_override_TransactionKeyreg_voteFirstValid=bigint
type_override_TransactionKeyreg_voteKeyDilution=bigint
type_override_TransactionKeyreg_voteLastValid=bigint
type_override_TransactionPayment_amount=bigint
type_override_TransactionPayment_closeAmount=bigint
type_override_TransactionResponse_currentRound=bigint
type_override_TransactionStateProof_stateProofType=number
type_override_TransactionsResponse_currentRound=bigint
type_override_TealValue_bytes=binary
type_override_TealKeyValue_key=binary
Loading

0 comments on commit 4d71e3c

Please sign in to comment.