Skip to content

Commit

Permalink
bytes getters for TxId and builtin hashes
Browse files Browse the repository at this point in the history
  • Loading branch information
christianschmitz committed Jan 27, 2024
1 parent a1fe5dd commit 234a50e
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/lang/builtins/datumhash.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ DatumHash::new(bytes: ByteArray) -> DatumHash
DatumHash::from_data(data: Data) -> DatumHash
```

## Getters

### `bytes`

```helios
datum_hash.bytes -> ByteArray
```

## Operators

### `==`
Expand Down
8 changes: 8 additions & 0 deletions src/lang/builtins/mintingpolicyhash.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ Casts the generic [`ScriptHash`](./scripthash.md) type into `MintingPolicyHash`.
MintingPolicyHash::from_script_hash(hash: ScriptHash) -> MintingPolicyHash
```

## Getters

### `bytes`

```helios
mph.bytes -> ByteArray
```

## Operators

### `==`
Expand Down
8 changes: 8 additions & 0 deletions src/lang/builtins/pubkeyhash.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ PubKeyHash::new(bytes: ByteArray) -> PubKeyHash
PubKeyHash::from_data(data: Data) -> PubKeyHash
```

## Getters

### `bytes`

```helios
pkh.bytes -> ByteArray
```

## Operators

### `==`
Expand Down
8 changes: 8 additions & 0 deletions src/lang/builtins/scripthash.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ This is returned by the [`TxOutput.ref_script_hash`](./txoutput.md#ref_script_ha
ScriptHash::from_data(data: Data) -> ScriptHash
```

## Getters

### `bytes`

```helios
script_hash.bytes -> ByteArray
```

## Operators

### `==`
Expand Down
8 changes: 8 additions & 0 deletions src/lang/builtins/stakingvalidatorhash.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ Casts the generic [`ScriptHash`](./scripthash.md) type into `StakingValidatorHas
StakingValidatorHash::from_script_hash(hash: ScriptHash) -> StakingValidatorHash
```

## Getters

### `bytes`

```helios
staking_validator_hash.bytes -> ByteArray
```

## Operators

### `==`
Expand Down
6 changes: 6 additions & 0 deletions src/lang/builtins/txid.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ TxId::new(bytes: ByteArray) -> TxId
TxId::from_data(data: Data) -> TxId
```

## Getters

```helios
tx_id.bytes -> ByteArray
```

## Operators

### `==`
Expand Down
8 changes: 8 additions & 0 deletions src/lang/builtins/validatorhash.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ Casts the generic [`ScriptHash`](./scripthash.md) type into `ValidatorHash`.
ValidatorHash::from_script_hash(hash: ScriptHash) -> ValidatorHash
```

## Getters

### `bytes`

```helios
validator_hash.bytes -> ByteArray
```

## Operators

### `==`
Expand Down

0 comments on commit 234a50e

Please sign in to comment.