File tree Expand file tree Collapse file tree 3 files changed +16
-0
lines changed
Expand file tree Collapse file tree 3 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ import {
2020 InvalidAddressError ,
2121 extractCommonKeychain ,
2222 EDDSAMethods ,
23+ TokenEnablementConfig ,
2324} from '@bitgo/sdk-core' ;
2425import { auditEddsaPrivateKey } from '@bitgo/sdk-lib-mpc' ;
2526import { BaseCoin as StaticsBaseCoin , coins } from '@bitgo/statics' ;
@@ -111,6 +112,7 @@ export class Canton extends BaseCoin {
111112 case TransactionType . TransferAccept :
112113 case TransactionType . TransferReject :
113114 case TransactionType . TransferAcknowledge :
115+ case TransactionType . OneStepPreApproval :
114116 // There is no input for these type of transactions, so always return true.
115117 return true ;
116118 case TransactionType . Send :
@@ -200,6 +202,14 @@ export class Canton extends BaseCoin {
200202 return utils . isValidAddress ( address ) ;
201203 }
202204
205+ /** @inheritDoc */
206+ getTokenEnablementConfig ( ) : TokenEnablementConfig {
207+ return {
208+ requiresTokenEnablement : true ,
209+ supportsMultipleTokenEnablements : false ,
210+ } ;
211+ }
212+
203213 getAddressFromPublicKey ( publicKeyHex : string ) : string {
204214 const publicKeyBase64 = Buffer . from ( publicKeyHex , 'hex' ) . toString ( 'base64' ) ;
205215 return utils . getAddressFromPublicKey ( publicKeyBase64 ) ;
Original file line number Diff line number Diff line change @@ -491,6 +491,11 @@ export enum CoinFeature {
491491 * This coin supports alternative address identifier format
492492 */
493493 ALTERNATIVE_ADDRESS_IDENTIFIER = 'alternative-address-identifier' ,
494+
495+ /**
496+ * This coin supports one-step deposit
497+ */
498+ SUPPORTS_ONE_STEP_DEPOSIT = 'supports-one-step-deposit' ,
494499}
495500
496501/**
Original file line number Diff line number Diff line change @@ -711,4 +711,5 @@ export const CANTON_FEATURES = [
711711 CoinFeature . CUSTODY_BITGO_KOREA ,
712712 CoinFeature . CUSTODY_BITGO_EUROPE_APS ,
713713 CoinFeature . CUSTODY_BITGO_FRANKFURT ,
714+ CoinFeature . SUPPORTS_ONE_STEP_DEPOSIT ,
714715] ;
You can’t perform that action at this time.
0 commit comments