File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -2780,6 +2780,30 @@ class Client {
2780
2780
}
2781
2781
}
2782
2782
2783
+ export class TransactionSigner {
2784
+ private key : Uint8Array [ ] ;
2785
+
2786
+ constructor ( privateKey : Uint8Array [ ] ) {
2787
+ this . key = privateKey ;
2788
+ }
2789
+
2790
+ // TODO implement signatures
2791
+ private createSignature ( ) {
2792
+ const signature = new Uint8Array ( this . key . length * 64 ) ;
2793
+ return signature ;
2794
+ }
2795
+
2796
+ private encodeSignedTransaction ( tx : Transaction , signature : Uint8Array ) : string {
2797
+ const transaction_signed = new Uint8Array ( this . key . length * 64 ) . toString ( ) ; // TODO implement
2798
+ return transaction_signed ;
2799
+ }
2800
+
2801
+ sign ( tx : Transaction ) : string {
2802
+ const signature = this . createSignature ( tx ) ;
2803
+ return this . encodeSignedTransaction ( tx , signature ) ;
2804
+ }
2805
+ }
2806
+
2783
2807
export { Client } ;
2784
2808
2785
2809
console . log ( '[Mintlayer Connect SDK] Loaded' ) ;
You can’t perform that action at this time.
0 commit comments