- Introduced Aggregator.sol for Chainlink-compatible oracle functionality, including round-based updates and access control. - Added OracleWithCCIP.sol to extend Aggregator with CCIP cross-chain messaging capabilities. - Created .gitmodules to include OpenZeppelin contracts as a submodule. - Developed a comprehensive deployment guide in NEXT_STEPS_COMPLETE_GUIDE.md for Phase 2 and smart contract deployment. - Implemented Vite configuration for the orchestration portal, supporting both Vue and React frameworks. - Added server-side logic for the Multi-Cloud Orchestration Portal, including API endpoints for environment management and monitoring. - Created scripts for resource import and usage validation across non-US regions. - Added tests for CCIP error handling and integration to ensure robust functionality. - Included various new files and directories for the orchestration portal and deployment scripts.
52 lines
1.9 KiB
Solidity
52 lines
1.9 KiB
Solidity
// SPDX-License-Identifier: MIT
|
|
pragma solidity ^0.8.19;
|
|
|
|
/**
|
|
* @title AccountHashing
|
|
* @notice Utilities for hashing account identifiers with salts to protect PII
|
|
*/
|
|
library AccountHashing {
|
|
/**
|
|
* @notice Generates a hashed account reference ID
|
|
* @param rail The payment rail identifier (e.g., "FEDWIRE", "SEPA")
|
|
* @param countryCode The country code (e.g., "US", "DE")
|
|
* @param accountIdentifier The account identifier (IBAN, ABA, etc.) - should be hashed off-chain
|
|
* @param salt A unique salt for this account
|
|
* @return accountRefId The hashed account reference ID
|
|
*/
|
|
function hashAccountRef(
|
|
bytes32 rail,
|
|
bytes32 countryCode,
|
|
bytes32 accountIdentifier,
|
|
bytes32 salt
|
|
) internal pure returns (bytes32 accountRefId) {
|
|
return keccak256(abi.encodePacked(rail, countryCode, accountIdentifier, salt));
|
|
}
|
|
|
|
/**
|
|
* @notice Generates a hashed wallet reference ID
|
|
* @param chainId The chain ID where the wallet exists
|
|
* @param walletAddress The wallet address
|
|
* @param providerId The provider identifier (e.g., "METAMASK", "FIREBLOCKS")
|
|
* @return walletRefId The hashed wallet reference ID
|
|
*/
|
|
function hashWalletRef(
|
|
uint256 chainId,
|
|
address walletAddress,
|
|
bytes32 providerId
|
|
) internal pure returns (bytes32 walletRefId) {
|
|
return keccak256(abi.encodePacked(chainId, walletAddress, providerId));
|
|
}
|
|
|
|
/**
|
|
* @notice Generates an ICAN (Internal Canonical Account Number) reference ID
|
|
* @param namespace The internal namespace identifier
|
|
* @param accountId The internal account ID
|
|
* @return icanRefId The ICAN reference ID
|
|
*/
|
|
function hashICANRef(bytes32 namespace, bytes32 accountId) internal pure returns (bytes32 icanRefId) {
|
|
return keccak256(abi.encodePacked(namespace, accountId));
|
|
}
|
|
}
|
|
|