Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions packages/mesh-core-cst/src/utils/builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,11 @@ export const buildBaseAddress = (
export const buildEnterpriseAddress = (
networkId: number,
paymentKeyHash: Hash28ByteBase16,
paymentCredType: CredentialType = CredentialType.KeyHash,
): EnterpriseAddress => {
return EnterpriseAddress.fromCredentials(networkId, {
hash: paymentKeyHash,
type: CredentialType.KeyHash,
type: paymentCredType,
});
};

Expand Down Expand Up @@ -89,9 +90,10 @@ export const buildBip32PrivateKey = (
export const buildRewardAddress = (
networkId: number,
stakeKeyHash: Hash28ByteBase16,
stakeCredType: CredentialType = CredentialType.KeyHash,
): RewardAddress => {
const cred = {
type: CredentialType.KeyHash,
type: stakeCredType,
hash: stakeKeyHash,
};
return RewardAddress.fromCredentials(networkId, cred);
Expand Down