-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34 from cardano-foundation/feat/is-62-update-off-…
…chain-decoupled-membership-validator feat: IS-62 update off chain code for compatibility decouple validator
- Loading branch information
Showing
30 changed files
with
618 additions
and
201 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { | ||
KEY_PACKET_ACK_PREFIX, | ||
KEY_PACKET_COMMITMENT_PREFIX, | ||
KEY_PACKET_RECEIPT_PREFIX, | ||
KEY_SEQUENCE_PREFIX, | ||
} from '../../constant'; | ||
import { channelPathForPacket } from './channel'; | ||
|
||
export function packetReceiptPath(portId: string, channelId: string, sequence: bigint): string { | ||
return `${KEY_PACKET_RECEIPT_PREFIX}/${channelPathForPacket(portId, channelId)}/${KEY_SEQUENCE_PREFIX}/${sequence.toString()}`; | ||
} | ||
|
||
export function packetCommitmentPath(portId: string, channelId: string, sequence: bigint): string { | ||
return `${KEY_PACKET_COMMITMENT_PREFIX}/${channelPathForPacket(portId, channelId)}/${KEY_SEQUENCE_PREFIX}/${sequence.toString()}`; | ||
} | ||
|
||
export function packetAcknowledgementPath(portId: string, channelId: string, sequence: bigint): string { | ||
return `${KEY_PACKET_ACK_PREFIX}/${channelPathForPacket(portId, channelId)}/${KEY_SEQUENCE_PREFIX}/${sequence.toString()}`; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { MAX_EXPECTED_TIME_PER_BLOCK } from '../../constant'; | ||
|
||
export function getBlockDelay(timeDelay: bigint): number { | ||
const expectedTimePerBlock = BigInt(MAX_EXPECTED_TIME_PER_BLOCK); | ||
return Math.ceil(Number(timeDelay / expectedTimePerBlock)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
cardano/gateway/src/shared/modules/lucid/dtos/channel/channel-open-init.dto.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
cardano/gateway/src/shared/modules/lucid/dtos/channel/channel-open-try.dto.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
cardano/gateway/src/shared/modules/lucid/dtos/connection/connection-open-ack.dto.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { PolicyId, UTxO } from '@dinhbx/lucid-custom'; | ||
|
||
export type UnsignedConnectionOpenAckDto = { | ||
connectionUtxo: UTxO; | ||
clientUtxo: UTxO; | ||
constructedAddress: string; | ||
|
||
spendConnectionRefUtxo: UTxO; | ||
verifyProofRefUTxO: UTxO; | ||
|
||
connectionTokenUnit: string; | ||
encodedSpendConnectionRedeemer: string; | ||
encodedUpdatedConnectionDatum: string; | ||
|
||
verifyProofPolicyId: PolicyId; | ||
encodedVerifyProofRedeemer: string; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.