@@ -1017,3 +1017,105 @@ export function ofcBscToken(
10171017 } )
10181018 ) ;
10191019}
1020+
1021+ /**
1022+ * Factory function for testnet ofc xrp token instances.
1023+ *
1024+ * @param id uuid v4
1025+ * @param name unique identifier of the coin
1026+ * @param fullName Complete human-readable name of the coin
1027+ * @param network Network object for this coin
1028+ * @param decimalPlaces Number of decimal places this coin supports (divisibility exponent)
1029+ * @param asset Asset which this coin represents. This is the same for both mainnet and testnet variants of a coin.
1030+ * @param kind Differentiates coins which represent fiat assets from those which represent crypto assets
1031+ * @param prefix? Optional coin prefix. Defaults to empty string
1032+ * @param suffix? Optional coin suffix. Defaults to coin name.
1033+ * @param isToken? Whether or not this account coin is a token of another coin
1034+ * @param features? Features of this coin. Defaults to the DEFAULT_FEATURES defined in `OfcCoin`
1035+ * @param primaryKeyCurve The elliptic curve for this chain/token
1036+ */
1037+ export function tofcXrpToken (
1038+ id : string ,
1039+ name : string ,
1040+ fullName : string ,
1041+ decimalPlaces : number ,
1042+ asset : UnderlyingAsset ,
1043+ kind : CoinKind = CoinKind . CRYPTO ,
1044+ features : CoinFeature [ ] = OfcCoin . DEFAULT_FEATURES ,
1045+ prefix = '' ,
1046+ suffix : string = name . replace ( / ^ o f c / , '' ) . toUpperCase ( ) ,
1047+ network : OfcNetwork = Networks . test . ofc ,
1048+ isToken = true ,
1049+ addressCoin = 'txrp' ,
1050+ primaryKeyCurve : KeyCurve = KeyCurve . Secp256k1
1051+ ) {
1052+ return Object . freeze (
1053+ new OfcCoin ( {
1054+ id,
1055+ name,
1056+ fullName,
1057+ network,
1058+ prefix,
1059+ suffix,
1060+ features,
1061+ decimalPlaces,
1062+ isToken,
1063+ asset,
1064+ kind,
1065+ addressCoin,
1066+ primaryKeyCurve,
1067+ baseUnit : BaseUnit . XRP ,
1068+ } )
1069+ ) ;
1070+ }
1071+
1072+ /**
1073+ * Factory function for ofc opetherc20 token instances.
1074+ *
1075+ * @param id uuid v4
1076+ * @param name unique identifier of the coin
1077+ * @param fullName Complete human-readable name of the coin
1078+ * @param network Network object for this coin
1079+ * @param decimalPlaces Number of decimal places this coin supports (divisibility exponent)
1080+ * @param asset Asset which this coin represents. This is the same for both mainnet and testnet variants of a coin.
1081+ * @param kind Differentiates coins which represent fiat assets from those which represent crypto assets
1082+ * @param prefix? Optional coin prefix. Defaults to empty string
1083+ * @param suffix? Optional coin suffix. Defaults to coin name.
1084+ * @param isToken? Whether or not this account coin is a token of another coin
1085+ * @param features? Features of this coin. Defaults to the DEFAULT_FEATURES defined in `OfcCoin`
1086+ * @param primaryKeyCurve The elliptic curve for this chain/token
1087+ */
1088+ export function ofcOpethErc20 (
1089+ id : string ,
1090+ name : string ,
1091+ fullName : string ,
1092+ decimalPlaces : number ,
1093+ asset : UnderlyingAsset ,
1094+ kind : CoinKind = CoinKind . CRYPTO ,
1095+ features : CoinFeature [ ] = OfcCoin . DEFAULT_FEATURES ,
1096+ prefix = '' ,
1097+ suffix : string = name . replace ( / ^ o f c / , '' ) . toUpperCase ( ) ,
1098+ network : OfcNetwork = Networks . main . ofc ,
1099+ isToken = true ,
1100+ addressCoin = 'opeth' ,
1101+ primaryKeyCurve : KeyCurve = KeyCurve . Secp256k1
1102+ ) {
1103+ return Object . freeze (
1104+ new OfcCoin ( {
1105+ id,
1106+ name,
1107+ fullName,
1108+ network,
1109+ prefix,
1110+ suffix,
1111+ features,
1112+ decimalPlaces,
1113+ isToken,
1114+ asset,
1115+ kind,
1116+ addressCoin,
1117+ primaryKeyCurve,
1118+ baseUnit : BaseUnit . ETH ,
1119+ } )
1120+ ) ;
1121+ }
0 commit comments