@@ -1587,3 +1587,109 @@ export function tofcaptToken(
15871587 } )
15881588 ) ;
15891589}
1590+
1591+ /**
1592+ * Factory function for ofc nep141 token instances.
1593+ *
1594+ * @param id uuid v4
1595+ * @param name unique identifier of the coin
1596+ * @param fullName Complete human-readable name of the coin
1597+ * @param features
1598+ * @param prefix
1599+ * @param suffix
1600+ * @param network Network object for this coin
1601+ * @param decimalPlaces Number of decimal places this coin supports (divisibility exponent)
1602+ * @param asset Asset which this coin represents. This is the same for both mainnet and testnet variants of a coin.
1603+ * @param kind Differentiates coins which represent fiat assets from those which represent crypto assets
1604+ * @param isToken
1605+ * @param addressCoin
1606+ * @param primaryKeyCurve The elliptic curve for this chain/token
1607+ */
1608+
1609+ export function ofcnep141Token (
1610+ id : string ,
1611+ name : string ,
1612+ fullName : string ,
1613+ decimalPlaces : number ,
1614+ asset : UnderlyingAsset ,
1615+ features : CoinFeature [ ] = OfcCoin . DEFAULT_FEATURES ,
1616+ kind : CoinKind = CoinKind . CRYPTO ,
1617+ prefix = '' ,
1618+ suffix : string = name . replace ( / ^ o f c / , '' ) . toUpperCase ( ) ,
1619+ network : OfcNetwork = Networks . main . ofc ,
1620+ isToken = true ,
1621+ addressCoin = 'near' ,
1622+ primaryKeyCurve : KeyCurve = KeyCurve . Ed25519
1623+ ) {
1624+ return Object . freeze (
1625+ new OfcCoin ( {
1626+ id,
1627+ name,
1628+ fullName,
1629+ network,
1630+ prefix,
1631+ suffix,
1632+ features,
1633+ decimalPlaces,
1634+ isToken,
1635+ asset,
1636+ kind,
1637+ addressCoin,
1638+ primaryKeyCurve,
1639+ baseUnit : BaseUnit . NEAR ,
1640+ } )
1641+ ) ;
1642+ }
1643+
1644+ /**
1645+ * Factory function for tofc nep141 token instances.
1646+ *
1647+ * @param id uuid v4
1648+ * @param name unique identifier of the coin
1649+ * @param fullName Complete human-readable name of the coin
1650+ * @param features
1651+ * @param prefix
1652+ * @param suffix
1653+ * @param network Network object for this coin
1654+ * @param decimalPlaces Number of decimal places this coin supports (divisibility exponent)
1655+ * @param asset Asset which this coin represents. This is the same for both mainnet and testnet variants of a coin.
1656+ * @param kind Differentiates coins which represent fiat assets from those which represent crypto assets
1657+ * @param isToken
1658+ * @param addressCoin
1659+ * @param primaryKeyCurve The elliptic curve for this chain/token
1660+ */
1661+
1662+ export function tofcnep141Token (
1663+ id : string ,
1664+ name : string ,
1665+ fullName : string ,
1666+ decimalPlaces : number ,
1667+ asset : UnderlyingAsset ,
1668+ features : CoinFeature [ ] = OfcCoin . DEFAULT_FEATURES ,
1669+ kind : CoinKind = CoinKind . CRYPTO ,
1670+ prefix = '' ,
1671+ suffix : string = name . replace ( / ^ o f c / , '' ) . toUpperCase ( ) ,
1672+ network : OfcNetwork = Networks . test . ofc ,
1673+ isToken = true ,
1674+ addressCoin = 'tnear' ,
1675+ primaryKeyCurve : KeyCurve = KeyCurve . Ed25519
1676+ ) {
1677+ return Object . freeze (
1678+ new OfcCoin ( {
1679+ id,
1680+ name,
1681+ fullName,
1682+ network,
1683+ prefix,
1684+ suffix,
1685+ features,
1686+ decimalPlaces,
1687+ isToken,
1688+ asset,
1689+ kind,
1690+ addressCoin,
1691+ primaryKeyCurve,
1692+ baseUnit : BaseUnit . NEAR ,
1693+ } )
1694+ ) ;
1695+ }
0 commit comments