mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-21 06:18:42 +02:00
* add Near Intents exchange provider integration * refactor for improved trade handling * add explorer link for trades provider. * refactor currency parsing in near Intents exchange * fix: address type for estimating send all transactions in swaps * add token and app fee config * Update near_Intents_exchange_provider.dart * add Near Intents app fee secrets and update usage * add NEAR intents app fee secrets to workflows * Update lib/view_model/exchange/exchange_view_model.dart [skip ci] * making priceUpdatedAt nullable [skip ci] --------- Co-authored-by: Serhii-Borodenko <17529954+Serhii-Borodenko@users.noreply.github.com> Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
120 lines
5.2 KiB
Dart
120 lines
5.2 KiB
Dart
import 'package:encrypt/encrypt.dart' as encrypt;
|
|
import 'package:convert/convert.dart';
|
|
|
|
class SecretKey {
|
|
const SecretKey(this.name, this.generate);
|
|
|
|
static final base = [
|
|
SecretKey('salt', () => hex.encode(encrypt.Key.fromSecureRandom(16).bytes)),
|
|
SecretKey('keychainSalt', () => hex.encode(encrypt.Key.fromSecureRandom(12).bytes)),
|
|
SecretKey('key', () => hex.encode(encrypt.Key.fromSecureRandom(16).bytes)),
|
|
SecretKey('walletSalt', () => hex.encode(encrypt.Key.fromSecureRandom(4).bytes)),
|
|
SecretKey('shortKey', () => hex.encode(encrypt.Key.fromSecureRandom(12).bytes)),
|
|
SecretKey('backupSalt', () => hex.encode(encrypt.Key.fromSecureRandom(8).bytes)),
|
|
SecretKey('backupKeychainSalt', () => hex.encode(encrypt.Key.fromSecureRandom(12).bytes)),
|
|
SecretKey('changeNowCakeWalletApiKey', () => ''),
|
|
SecretKey('changeNowMoneroApiKey', () => ''),
|
|
SecretKey('wyreSecretKey', () => ''),
|
|
SecretKey('wyreApiKey', () => ''),
|
|
SecretKey('wyreAccountId', () => ''),
|
|
SecretKey('moonPayApiKey', () => ''),
|
|
SecretKey('moonPaySecretKey', () => ''),
|
|
SecretKey('sideShiftAffiliateId', () => ''),
|
|
SecretKey('simpleSwapApiKey', () => ''),
|
|
SecretKey('simpleSwapApiKeyDesktop', () => ''),
|
|
SecretKey('anypayToken', () => ''),
|
|
SecretKey('onramperApiKey', () => ''),
|
|
SecretKey('ioniaClientId', () => ''),
|
|
SecretKey('trocadorApiKey', () => ''),
|
|
SecretKey('trocadorMoneroApiKey', () => ''),
|
|
SecretKey('trocadorExchangeMarkup', () => ''),
|
|
SecretKey('twitterBearerToken', () => ''),
|
|
SecretKey('anonPayReferralCode', () => ''),
|
|
SecretKey('fiatApiKey', () => ''),
|
|
SecretKey('chatwootWebsiteToken', () => ''),
|
|
SecretKey('exolixCakeWalletApiKey', () => ''),
|
|
SecretKey('exolixMoneroApiKey', () => ''),
|
|
SecretKey('robinhoodApplicationId', () => ''),
|
|
SecretKey('exchangeHelperApiKey', () => ''),
|
|
SecretKey('walletConnectProjectId', () => ''),
|
|
SecretKey('moralisApiKey', () => ''),
|
|
SecretKey('ankrApiKey', () => ''),
|
|
SecretKey('chainStackApiKey', () => ''),
|
|
SecretKey('swapTradeExchangeMarkup', () => ''),
|
|
SecretKey('seeds', () => ''),
|
|
SecretKey('testCakePayApiKey', () => ''),
|
|
SecretKey('cakePayApiKey', () => ''),
|
|
SecretKey('CSRFToken', () => ''),
|
|
SecretKey('authorization', () => ''),
|
|
SecretKey('meldTestApiKey', () => ''),
|
|
SecretKey('meldTestPublicKey', () => ''),
|
|
SecretKey('moneroTestWalletSeeds', () => ''),
|
|
SecretKey('moneroLegacyTestWalletSeeds ', () => ''),
|
|
SecretKey('bitcoinTestWalletSeeds', () => ''),
|
|
SecretKey('ethereumTestWalletSeeds', () => ''),
|
|
SecretKey('litecoinTestWalletSeeds', () => ''),
|
|
SecretKey('bitcoinCashTestWalletSeeds', () => ''),
|
|
SecretKey('polygonTestWalletSeeds', () => ''),
|
|
SecretKey('baseTestWalletSeeds', () => ''),
|
|
SecretKey('arbitrumTestWalletSeeds', () => ''),
|
|
SecretKey('solanaTestWalletSeeds', () => ''),
|
|
SecretKey('tronTestWalletSeeds', () => ''),
|
|
SecretKey('nanoTestWalletSeeds', () => ''),
|
|
SecretKey('wowneroTestWalletSeeds', () => ''),
|
|
SecretKey('moneroTestWalletReceiveAddress', () => ''),
|
|
SecretKey('bitcoinTestWalletReceiveAddress', () => ''),
|
|
SecretKey('ethereumTestWalletReceiveAddress', () => ''),
|
|
SecretKey('litecoinTestWalletReceiveAddress', () => ''),
|
|
SecretKey('bitcoinCashTestWalletReceiveAddress', () => ''),
|
|
SecretKey('polygonTestWalletReceiveAddress', () => ''),
|
|
SecretKey('baseTestWalletReceiveAddress', () => ''),
|
|
SecretKey('arbitrumTestWalletReceiveAddress', () => ''),
|
|
SecretKey('solanaTestWalletReceiveAddress', () => ''),
|
|
SecretKey('tronTestWalletReceiveAddress', () => ''),
|
|
SecretKey('nanoTestWalletReceiveAddress', () => ''),
|
|
SecretKey('wowneroTestWalletReceiveAddress', () => ''),
|
|
SecretKey('etherScanApiKey', () => ''),
|
|
SecretKey('polygonScanApiKey', () => ''),
|
|
SecretKey('letsExchangeBearerToken', () => ''),
|
|
SecretKey('letsExchangeAffiliateId', () => ''),
|
|
SecretKey('stealthExBearerToken', () => ''),
|
|
SecretKey('stealthExAdditionalFeePercent', () => ''),
|
|
SecretKey('moneroTestWalletBlockHeight', () => ''),
|
|
SecretKey('chainflipApiKey', () => ''),
|
|
SecretKey('chainflipAffiliateFee', () => ''),
|
|
SecretKey('kryptonimApiKey', () => ''),
|
|
SecretKey('walletGroupSalt', () => hex.encode(encrypt.Key.fromSecureRandom(16).bytes)),
|
|
SecretKey('swapsXyzApiKey', () => ''),
|
|
SecretKey('nearIntentsBearerToken', () => ''),
|
|
SecretKey('nearIntentsAppFee', () => ''),
|
|
SecretKey('nearIntentsAppFeeRecipient', () => ''),
|
|
];
|
|
|
|
static final evmChainsSecrets = [
|
|
SecretKey('etherScanApiKey', () => ''),
|
|
SecretKey('polygonScanApiKey', () => ''),
|
|
SecretKey('moralisApiKey', () => ''),
|
|
SecretKey('nowNodesApiKey ', () => ''),
|
|
];
|
|
|
|
static final solanaSecrets = [
|
|
SecretKey('ankrApiKey', () => ''),
|
|
SecretKey('nowNodesApiKey', () => ''),
|
|
SecretKey('chainStackApiKey', () => ''),
|
|
SecretKey('moralisApiKey', () => ''),
|
|
];
|
|
|
|
static final nanoSecrets = [
|
|
SecretKey('nano2ApiKey', () => ''),
|
|
SecretKey('nanoNowNodesApiKey', () => ''),
|
|
];
|
|
|
|
static final tronSecrets = [
|
|
SecretKey('tronGridApiKey', () => ''),
|
|
SecretKey('tronNowNodesApiKey', () => ''),
|
|
];
|
|
|
|
final String name;
|
|
final String Function() generate;
|
|
}
|