@@ -1119,3 +1119,105 @@ export function ofcOpethErc20(
11191119 } )
11201120 ) ;
11211121}
1122+
1123+ /**
1124+ * Factory function for ofc tron token instances.
1125+ *
1126+ * @param id uuid v4
1127+ * @param name unique identifier of the coin
1128+ * @param fullName Complete human-readable name of the coin
1129+ * @param network Network object for this coin
1130+ * @param decimalPlaces Number of decimal places this coin supports (divisibility exponent)
1131+ * @param asset Asset which this coin represents. This is the same for both mainnet and testnet variants of a coin.
1132+ * @param kind Differentiates coins which represent fiat assets from those which represent crypto assets
1133+ * @param prefix? Optional coin prefix. Defaults to empty string
1134+ * @param suffix? Optional coin suffix. Defaults to coin name.
1135+ * @param isToken? Whether or not this account coin is a token of another coin
1136+ * @param features? Features of this coin. Defaults to the DEFAULT_FEATURES defined in `OfcCoin`
1137+ * @param primaryKeyCurve The elliptic curve for this chain/token
1138+ */
1139+ export function ofcTronToken (
1140+ id : string ,
1141+ name : string ,
1142+ fullName : string ,
1143+ decimalPlaces : number ,
1144+ asset : UnderlyingAsset ,
1145+ kind : CoinKind = CoinKind . CRYPTO ,
1146+ features : CoinFeature [ ] = OfcCoin . DEFAULT_FEATURES ,
1147+ prefix = '' ,
1148+ suffix : string = name . replace ( / ^ o f c / , '' ) . toUpperCase ( ) ,
1149+ network : OfcNetwork = Networks . main . ofc ,
1150+ isToken = true ,
1151+ addressCoin = 'trx' ,
1152+ primaryKeyCurve : KeyCurve = KeyCurve . Secp256k1
1153+ ) {
1154+ return Object . freeze (
1155+ new OfcCoin ( {
1156+ id,
1157+ name,
1158+ fullName,
1159+ network,
1160+ prefix,
1161+ suffix,
1162+ features,
1163+ decimalPlaces,
1164+ isToken,
1165+ asset,
1166+ kind,
1167+ addressCoin,
1168+ primaryKeyCurve,
1169+ baseUnit : BaseUnit . TRX ,
1170+ } )
1171+ ) ;
1172+ }
1173+
1174+ /**
1175+ * Factory function for ofc tron token instances.
1176+ *
1177+ * @param id uuid v4
1178+ * @param name unique identifier of the coin
1179+ * @param fullName Complete human-readable name of the coin
1180+ * @param network Network object for this coin
1181+ * @param decimalPlaces Number of decimal places this coin supports (divisibility exponent)
1182+ * @param asset Asset which this coin represents. This is the same for both mainnet and testnet variants of a coin.
1183+ * @param kind Differentiates coins which represent fiat assets from those which represent crypto assets
1184+ * @param prefix? Optional coin prefix. Defaults to empty string
1185+ * @param suffix? Optional coin suffix. Defaults to coin name.
1186+ * @param isToken? Whether or not this account coin is a token of another coin
1187+ * @param features? Features of this coin. Defaults to the DEFAULT_FEATURES defined in `OfcCoin`
1188+ * @param primaryKeyCurve The elliptic curve for this chain/token
1189+ */
1190+ export function tofcTronToken (
1191+ id : string ,
1192+ name : string ,
1193+ fullName : string ,
1194+ decimalPlaces : number ,
1195+ asset : UnderlyingAsset ,
1196+ kind : CoinKind = CoinKind . CRYPTO ,
1197+ features : CoinFeature [ ] = OfcCoin . DEFAULT_FEATURES ,
1198+ prefix = '' ,
1199+ suffix : string = name . replace ( / ^ o f c / , '' ) . toUpperCase ( ) ,
1200+ network : OfcNetwork = Networks . main . ofc ,
1201+ isToken = true ,
1202+ addressCoin = 'ttrx' ,
1203+ primaryKeyCurve : KeyCurve = KeyCurve . Secp256k1
1204+ ) {
1205+ return Object . freeze (
1206+ new OfcCoin ( {
1207+ id,
1208+ name,
1209+ fullName,
1210+ network,
1211+ prefix,
1212+ suffix,
1213+ features,
1214+ decimalPlaces,
1215+ isToken,
1216+ asset,
1217+ kind,
1218+ addressCoin,
1219+ primaryKeyCurve,
1220+ baseUnit : BaseUnit . TRX ,
1221+ } )
1222+ ) ;
1223+ }
0 commit comments