File tree Expand file tree Collapse file tree 3 files changed +6
-30
lines changed Expand file tree Collapse file tree 3 files changed +6
-30
lines changed Original file line number Diff line number Diff line change @@ -3,9 +3,9 @@ const Endian = std.builtin.Endian;
33const  Secp256k1  =  std .crypto .ecc .Secp256k1 ;
44const  Keccak256  =  std .crypto .hash .sha3 .Keccak256 ;
55
6- const  Privkey  =  [32 ]u8 ;
7- const  Pubkey  =  [33 ]u8 ;
8- const  EthAddress  =  [20 ]u8 ;
6+ pub   const  Privkey  =  [32 ]u8 ;
7+ pub   const  Pubkey  =  [33 ]u8 ;
8+ pub   const  EthAddress  =  [20 ]u8 ;
99
1010// StealthAddress is an implementation of EIP-5564 for the `schemeId`=0x00 (i.e: SECP256k1, with view tags) 
1111// In the future, we can generalize the code if more schemes are added. 
Original file line number Diff line number Diff line change 1- const  std  =  @import ("std" );
2- 
3- pub  fn  main () ! void  {
4-     // Prints to stderr (it's a shortcut based on `std.io.getStdErr()`) 
5-     std .debug .print ("All your {s} are belong to us.\n " , .{"codebase" });
6- 
7-     // stdout is for the actual output of your application, for example if you 
8-     // are implementing gzip, then only the compressed bytes should be sent to 
9-     // stdout, not any debugging messages. 
10-     const  stdout_file  =  std .io .getStdOut ().writer ();
11-     var  bw  =  std .io .bufferedWriter (stdout_file );
12-     const  stdout  =  bw .writer ();
13- 
14-     try  stdout .print ("Run `zig build test` to run the tests.\n " , .{});
15- 
16-     try  bw .flush (); // don't forget to flush! 
17- }
18- 
19- test  "simple test"  {
20-     var  list  =  std .ArrayList (i32 ).init (std .testing .allocator );
21-     defer  list .deinit (); // try commenting this out and see if zig detects the memory leak! 
22-     try  list .append (42 );
23-     try  std .testing .expectEqual (@as (i32 , 42 ), list .pop ());
24- }
1+ pub  fn  main () ! void  {}
Original file line number Diff line number Diff line change 1- const  std  =  @import ("std" );
2- const  testing  =  std .testing ;
1+ pub  const  eip5564  =  @import ("eip5564.zig" );
32
43test  "stealth address"  {
5-     _  =  @import ("stealth_address .zig" );
4+     _  =  @import ("eip5564 .zig" );
65}
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments