File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ export interface CantonConstructorOptions {
88 network : BaseNetwork ;
99 features : CoinFeature [ ] ;
1010 asset : UnderlyingAsset ;
11+ prefix ?: string ;
12+ suffix ?: string ;
1113 primaryKeyCurve : KeyCurve ;
1214}
1315
@@ -42,6 +44,8 @@ export class Canton extends BaseCoin {
4244 * @param {String } fullName complete human-readable name of the coin
4345 * @param {BaseNetwork } network network object for this coin
4446 * @param {UnderlyingAsset } asset asset which this coin represents. This is the same for both mainNet and testNet variants of a coin.
47+ * @param {string } prefix optional coin prefix. Defaults to empty string
48+ * @param {string } suffix optional coin suffix. Defaults to coin name.
4549 * @param {CoinFeature[] } features features of this coin. Defaults to the CANTON_DEFAULT_FEATURES defined in `account`
4650 * @param {KeyCurve } primaryKeyCurve the elliptic curve for this chain/token
4751 */
@@ -52,7 +56,9 @@ export function canton(
5256 network : BaseNetwork ,
5357 asset : UnderlyingAsset ,
5458 features : CoinFeature [ ] ,
55- primaryKeyCurve : KeyCurve = KeyCurve . Ed25519
59+ primaryKeyCurve : KeyCurve = KeyCurve . Ed25519 ,
60+ prefix = '' ,
61+ suffix : string = name . toUpperCase ( )
5662) : Readonly < Canton > {
5763 return Object . freeze (
5864 new Canton ( {
@@ -62,6 +68,8 @@ export function canton(
6268 network,
6369 features,
6470 asset,
71+ prefix,
72+ suffix,
6573 primaryKeyCurve,
6674 } )
6775 ) ;
You can’t perform that action at this time.
0 commit comments