Skip to content

Commit

Permalink
Merge branch '2.0' into feat/auto-txn-capabilities
Browse files Browse the repository at this point in the history
  • Loading branch information
DaughterOfMars authored Mar 1, 2024
2 parents f7ec1fb + f84b5a0 commit f135042
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
12 changes: 8 additions & 4 deletions bindings/nodejs/lib/types/block/output/output.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { TokenScheme, TokenSchemeDiscriminator } from './token-scheme';
import { AccountId, NftId, AnchorId, DelegationId } from '../id';
import { EpochIndex } from '../../block/slot';
import { NativeToken } from '../../models/native-token';
import { Address, AddressDiscriminator, AccountAddress } from '../address';

export type OutputId = HexEncodedString;

Expand Down Expand Up @@ -344,7 +345,10 @@ class DelegationOutput extends Output {
/**
* The Account ID of the validator to which this output is delegating.
*/
readonly validatorId: AccountId;
@Type(() => Address, {
discriminator: AddressDiscriminator,
})
readonly validatorAddress: Address;
/**
* The index of the first epoch for which this output delegates.
*/
Expand All @@ -365,7 +369,7 @@ class DelegationOutput extends Output {
* @param amount The amount of the output.
* @param delegatedAmount The amount of delegated coins.
* @param delegationId Unique identifier of the Delegation Output, which is the BLAKE2b-256 hash of the Output ID that created it.
* @param validatorId The Account ID of the validator to which this output is delegating.
* @param validatorAddress The Account address of the validator to which this output is delegating.
* @param startEpoch The index of the first epoch for which this output delegates.
* @param endEpoch The index of the last epoch for which this output delegates.
* @param unlockConditions The unlock conditions of the output.
Expand All @@ -374,15 +378,15 @@ class DelegationOutput extends Output {
amount: u64,
delegatedAmount: u64,
delegationId: DelegationId,
validatorId: AccountId,
validatorAddress: AccountAddress,
startEpoch: EpochIndex,
endEpoch: EpochIndex,
unlockConditions: UnlockCondition[],
) {
super(OutputType.Delegation, amount);
this.delegatedAmount = delegatedAmount;
this.delegationId = delegationId;
this.validatorId = validatorId;
this.validatorAddress = validatorAddress;
this.startEpoch = startEpoch;
this.endEpoch = endEpoch;
this.unlockConditions = unlockConditions;
Expand Down
3 changes: 2 additions & 1 deletion bindings/python/iota_sdk/client/_node_core_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,8 @@ def get_included_block(self, transaction_id: TransactionId) -> Block:
'transactionId': transaction_id
}))

def get_included_block_raw(self, transaction_id: TransactionId) -> List[int]:
def get_included_block_raw(
self, transaction_id: TransactionId) -> List[int]:
"""Returns the earliest confirmed block containing the transaction with the given ID, as raw bytes.
GET /api/core/v3/transactions/{transactionId}/included-block
Expand Down
3 changes: 2 additions & 1 deletion bindings/python/iota_sdk/types/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from iota_sdk.types.feature import deserialize_features, SenderFeature, IssuerFeature, MetadataFeature, TagFeature, NativeTokenFeature
from iota_sdk.types.token_scheme import SimpleTokenScheme
from iota_sdk.types.unlock_condition import deserialize_unlock_conditions, AddressUnlockCondition, StateControllerAddressUnlockCondition, GovernorAddressUnlockCondition, StorageDepositReturnUnlockCondition, TimelockUnlockCondition, ExpirationUnlockCondition, ImmutableAccountAddressUnlockCondition
from iota_sdk.types.address import AccountAddress


class OutputType(IntEnum):
Expand Down Expand Up @@ -284,7 +285,7 @@ class DelegationOutput:
encoder=str
))
delegation_id: HexStr
validator_address: HexStr
validator_address: AccountAddress
start_epoch: EpochIndex
end_epoch: EpochIndex
unlock_conditions: List[AddressUnlockCondition] = field(metadata=config(
Expand Down

0 comments on commit f135042

Please sign in to comment.