@@ -131,8 +131,7 @@ export interface FiatCoinConstructorOptions extends AccountConstructorOptions {
131131}
132132
133133export interface Sip10TokenConstructorOptions extends AccountConstructorOptions {
134- contractAddress : string ;
135- contractName : string ;
134+ assetId : string ;
136135}
137136
138137export interface ContractAddress extends String {
@@ -531,15 +530,13 @@ export class FiatCoin extends BaseCoin {
531530 * the contractName on the chain.
532531 */
533532export class Sip10Token extends AccountCoinToken {
534- public contractAddress : string ;
535- public contractName : string ;
533+ public assetId : string ;
536534 constructor ( options : Sip10TokenConstructorOptions ) {
537535 super ( {
538536 ...options ,
539537 } ) ;
540538
541- this . contractAddress = options . contractAddress ;
542- this . contractName = options . contractName ;
539+ this . assetId = options . assetId ;
543540 }
544541}
545542
@@ -2612,8 +2609,7 @@ export function fiat(
26122609 * @param name unique identifier of the token
26132610 * @param fullName Complete human-readable name of the token
26142611 * @param decimalPlaces Number of decimal places this token supports (divisibility exponent)
2615- * @param contractName Contract name of this token
2616- * @param contractAddress Contract address of this token
2612+ * @param assetId A unique identifier for a token, which is in the form of contractAddress.contractName::tokenName
26172613 * @param asset Asset which this coin represents. This is the same for both mainnet and testnet variants of a coin.
26182614 * @param prefix? Optional token prefix. Defaults to empty string
26192615 * @param suffix? Optional token suffix. Defaults to token name.
@@ -2626,8 +2622,7 @@ export function sip10Token(
26262622 name : string ,
26272623 fullName : string ,
26282624 decimalPlaces : number ,
2629- contractName : string ,
2630- contractAddress : string ,
2625+ assetId : string ,
26312626 asset : UnderlyingAsset ,
26322627 features : CoinFeature [ ] = AccountCoin . DEFAULT_FEATURES ,
26332628 prefix = '' ,
@@ -2641,8 +2636,7 @@ export function sip10Token(
26412636 name,
26422637 fullName,
26432638 network,
2644- contractName,
2645- contractAddress,
2639+ assetId,
26462640 prefix,
26472641 suffix,
26482642 features,
@@ -2662,8 +2656,7 @@ export function sip10Token(
26622656 * @param name unique identifier of the token
26632657 * @param fullName Complete human-readable name of the token
26642658 * @param decimalPlaces Number of decimal places this token supports (divisibility exponent)
2665- * @param contractName Contract name of this token
2666- * @param contractAddress Contract address of this token
2659+ * @param assetId A unique identifier for a token, which is in the form of contractAddress.contractName::tokenName
26672660 * @param asset Asset which this coin represents. This is the same for both mainnet and testnet variants of a coin.
26682661 * @param prefix? Optional token prefix. Defaults to empty string
26692662 * @param suffix? Optional token suffix. Defaults to token name.
@@ -2675,25 +2668,12 @@ export function tsip10Token(
26752668 name : string ,
26762669 fullName : string ,
26772670 decimalPlaces : number ,
2678- contractName : string ,
2679- contractAddress : string ,
2671+ assetId : string ,
26802672 asset : UnderlyingAsset ,
26812673 features : CoinFeature [ ] = AccountCoin . DEFAULT_FEATURES ,
26822674 prefix = '' ,
26832675 suffix : string = name . toUpperCase ( ) ,
26842676 network : AccountNetwork = Networks . test . stx
26852677) {
2686- return sip10Token (
2687- id ,
2688- name ,
2689- fullName ,
2690- decimalPlaces ,
2691- contractName ,
2692- contractAddress ,
2693- asset ,
2694- features ,
2695- prefix ,
2696- suffix ,
2697- network
2698- ) ;
2678+ return sip10Token ( id , name , fullName , decimalPlaces , assetId , asset , features , prefix , suffix , network ) ;
26992679}
0 commit comments