11import { ccc } from "@ckb-ccc/core" ;
2- import type {
3- Bridge ,
4- CkbConnection ,
5- SignCkbHashAllMetadata ,
6- } from "../advancedBarrel" ;
2+ import type SupeRISE from '@superise/bridge-api-types'
73
84export class CkbSigner extends ccc . Signer {
95 get type ( ) {
@@ -16,12 +12,12 @@ export class CkbSigner extends ccc.Signer {
1612
1713 private connectionStorageKey = "superise-ckb-connection" ;
1814
19- private connection ?: CkbConnection ;
15+ private connection ?: SupeRISE . CkbConnection ;
2016
21- private _uiMetadataMap : Record < string , SignCkbHashAllMetadata > = { } ;
17+ private _uiMetadataMap : Record < string , SupeRISE . SignCkbHashAllMetadata > = { } ;
2218
2319 constructor (
24- private readonly bridge : Bridge ,
20+ private readonly bridge : SupeRISE . Bridge ,
2521 client : ccc . Client ,
2622 ) {
2723 super ( client ) ;
@@ -38,7 +34,7 @@ export class CkbSigner extends ccc.Signer {
3834 const connection = localStorage . getItem ( this . connectionStorageKey ) ;
3935 if ( ! connection ) return ;
4036 try {
41- this . connection = JSON . parse ( connection ) as CkbConnection ;
37+ this . connection = JSON . parse ( connection ) as SupeRISE . CkbConnection ;
4238 } catch ( error ) {
4339 console . error ( "Failed to restore superise connection:" , error ) ;
4440 }
@@ -140,7 +136,7 @@ export class CkbSigner extends ccc.Signer {
140136
141137 public setUiMetadataForTx (
142138 tx : ccc . TransactionLike ,
143- metadata : SignCkbHashAllMetadata ,
139+ metadata : SupeRISE . SignCkbHashAllMetadata ,
144140 ) {
145141 const txHash = ccc . Transaction . from ( tx ) . hash ( ) ;
146142 this . _uiMetadataMap [ txHash ] = metadata ;
0 commit comments