Skip to content

Commit

Permalink
Merge pull request #6 from sandrocsimas/main
Browse files Browse the repository at this point in the history
Support Omni XEP network
  • Loading branch information
mrtnetwork authored Nov 30, 2024
2 parents e15d60c + 0d823ff commit a137c20
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
3 changes: 2 additions & 1 deletion lib/bip/bip/conf/bip49/bip49_coins.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class Bip49Coins extends BipCoins {
static const Bip49Coins litecoin = Bip49Coins._('litecoin');
static const Bip49Coins zcash = Bip49Coins._('zcash');
static const Bip49Coins pepecoin = Bip49Coins._('pepecoin');
static const Bip49Coins omniXep = Bip49Coins._('omniXep');

// Test nets
static const Bip49Coins bitcoinCashTestnet =
Expand All @@ -29,7 +30,6 @@ class Bip49Coins extends BipCoins {
static const Bip49Coins litecoinTestnet = Bip49Coins._('litecoinTestnet');
static const Bip49Coins zcashTestnet = Bip49Coins._('zcashTestnet');
static const Bip49Coins pepecoinTestnet = Bip49Coins._('pepecoinTestnet');
static const Bip49Coins omniXep = Bip49Coins._('omniXep');

final String name;

Expand Down Expand Up @@ -79,6 +79,7 @@ class Bip49Coins extends BipCoins {
Bip49Coins.pepecoinTestnet: Bip49Conf.pepeTestnet,
Bip49Coins.omniXep: Bip49Conf.omniXepMainNet
};

@override
BipProposal get proposal => BipProposal.bip49;
}
12 changes: 6 additions & 6 deletions lib/bip/bip/conf/bip49/bip49_conf.dart
Original file line number Diff line number Diff line change
Expand Up @@ -411,20 +411,20 @@ class Bip49Conf {
"net_ver": CoinsConf.pepeTestnet.params.p2shNetVer!,
});

/// Configuration for pepecoin main net
/// Configuration for Omni XEP main net
static final BipCoinConfig omniXepMainNet = BipCoinConfig(
coinNames: CoinsConf.omniXep.coinName,
coinNames: CoinsConf.omniXepMainNet.coinName,
coinIdx: Slip44.omniXep,
isTestnet: false,
defPath: derPathNonHardenedFull,
keyNetVer: Bip32KeyNetVersions(
List<int>.from([0x04, 0x88, 0xB2, 0x1E]),
List<int>.from([0x04, 0x88, 0xAD, 0xE4]),
List<int>.from([0x04, 0x88, 0xb2, 0x1e]),
List<int>.from([0x04, 0x88, 0xad, 0xe4]),
),
wifNetVer: CoinsConf.omniXep.params.wifNetVer,
wifNetVer: CoinsConf.omniXepMainNet.params.wifNetVer,
type: EllipticCurveTypes.secp256k1,
addressEncoder: ([dynamic kwargs]) => P2SHAddrEncoder(),
addrParams: {
"net_ver": CoinsConf.omniXep.params.p2shNetVer!,
"net_ver": CoinsConf.omniXepMainNet.params.p2shNetVer!,
});
}
7 changes: 4 additions & 3 deletions lib/bip/coin_conf/coins_conf.dart
Original file line number Diff line number Diff line change
Expand Up @@ -708,12 +708,13 @@ class CoinsConf {
);

/// Configuration for Omni XEP main net
static const CoinConf omniXep = CoinConf(
coinName: CoinNames("Omni XEP", "XEP"),
static const CoinConf omniXepMainNet = CoinConf(
coinName: CoinNames("Omni XEP", "OXEP"),
params: CoinParams(
p2pkhNetVer: [0x37],
p2shNetVer: [0x89],
wifNetVer: [0xA2],
wifNetVer: [0xa2],
p2wpkhHrp: "ep",
),
);
}
4 changes: 1 addition & 3 deletions lib/bip/slip/slip44/slip44.dart
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,6 @@ class Slip44 {
static const int avalanche = 9000;
static const int celo = 52752;
static const int piNetwork = 314159;

static const int pepecoin = 3434;

static const int omniXep = 547;
static const int omniXep = 597;
}

0 comments on commit a137c20

Please sign in to comment.