From 92e057a5cbb10c9acd3921495d23a3c41eaebcbd Mon Sep 17 00:00:00 2001 From: kds Date: Fri, 31 Oct 2025 21:22:17 +0530 Subject: [PATCH] feat(sdk-coin-canton): added prefix and suffix fields for canton coin Ticket: COIN-6301 --- modules/statics/src/canton.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/modules/statics/src/canton.ts b/modules/statics/src/canton.ts index bd02f930bc..ba50c49438 100644 --- a/modules/statics/src/canton.ts +++ b/modules/statics/src/canton.ts @@ -8,6 +8,8 @@ export interface CantonConstructorOptions { network: BaseNetwork; features: CoinFeature[]; asset: UnderlyingAsset; + prefix?: string; + suffix?: string; primaryKeyCurve: KeyCurve; } @@ -42,6 +44,8 @@ export class Canton extends BaseCoin { * @param {String} fullName complete human-readable name of the coin * @param {BaseNetwork} network network object for this coin * @param {UnderlyingAsset} asset asset which this coin represents. This is the same for both mainNet and testNet variants of a coin. + * @param {string} prefix optional coin prefix. Defaults to empty string + * @param {string} suffix optional coin suffix. Defaults to coin name. * @param {CoinFeature[]} features features of this coin. Defaults to the CANTON_DEFAULT_FEATURES defined in `account` * @param {KeyCurve} primaryKeyCurve the elliptic curve for this chain/token */ @@ -52,7 +56,9 @@ export function canton( network: BaseNetwork, asset: UnderlyingAsset, features: CoinFeature[], - primaryKeyCurve: KeyCurve = KeyCurve.Ed25519 + primaryKeyCurve: KeyCurve = KeyCurve.Ed25519, + prefix = '', + suffix: string = name.toUpperCase() ): Readonly { return Object.freeze( new Canton({ @@ -62,6 +68,8 @@ export function canton( network, features, asset, + prefix, + suffix, primaryKeyCurve, }) );