package Ġcom . trust wallet . core . app . block chains . sol ana Ċ Ċ import Ġcom . google . protobuf . ByteString Ċ import Ġcom . trust wallet . core . app . utils . to Hex ByteArray Ċ import Ġjava . util . Base 6 4 Ċ import Ġorg . junit . Assert . assertEquals Ċ import Ġorg . junit . Test Ċ import Ġwallet . core . jni . Base 5 8 Ċ import Ġwallet . core . java . Any Signer Ċ import Ġwallet . core . jni . Coin Type Ċ import Ġwallet . core . jni . proto . NEAR Ċ import Ġwallet . core . jni . proto . NEAR . Signing Output Ċ Ċ class ĠTest NEAR Signer Ġ{ ĊĊĠĠĠ Ġinit Ġ{ ĊĠĠĠĠĠĠĠ ĠSystem . load Library (" Trust Wallet Core ") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġtest Transfer Sign () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġtransfer Action Ġ= ĠNE AR . Transfer . newBuilder (). apply Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġdeposit Ġ= ĠByte String . copyFrom (" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ". to Hex ByteArray ()) ĊĠĠĠĠĠĠĠ Ġ}. build () ĊĠĠĠĠĠĠĠ Ġval Ġsigning Input Ġ= ĠNE AR . Signing Input . newBuilder (). apply Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġsigner Id Ġ= Ġ" test . near " ĊĠĠĠĠĠĠĠĠĠĠĠ Ġnonce Ġ= Ġ 1 ĊĠĠĠĠĠĠĠĠĠĠĠ Ġreceiver Id Ġ= Ġ" wh atever . near " ĊĠĠĠĠĠĠĠĠĠĠĠ Ġadd Actions Builder (). apply Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġtransfer Ġ= Ġtransfer Action ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġblock Hash Ġ= ĠByte String . copyFrom ( Base 5 8 . decode No Check (" 2 4 4 ZQ 9 cg j 3 CQ 6 b WB dy t fr J Mu MQ 1 jd XL FG nr 4 Hh vt CT n M ")) ĊĠĠĠĠĠĠĠĠĠĠĠ ĠprivateKey Ġ= ĠByte String . copyFrom ( Base 5 8 . decode No Check (" 3 ho MW 1 H vn RL SF CL Z nv Pz We o Gw td Hz ke 3 4 B 2 c TH M 8 rh cb G 3 T bu LK t Sh Tv 3 Dv ye jn XK X KB i V 7 YP k Le q U HN 1 gh n qp Fv "). slice Array ( 0 .. 3 1 )) ĊĠĠĠĠĠĠĠ Ġ}. build () ĊĊĠĠĠĠĠĠĠ Ġval Ġoutput Ġ= ĠAny Signer . sign ( signing Input , ĠCoin Type . NEAR , ĠSign ing Output . parser ()) ĊĊĠĠĠĠĠĠĠ Ġval Ġexpected Base 6 4 String Ġ= Ġ" CQ AAA HR lc 3 Q ub mV h cg C Re z 0 mj Ut Y 9 / 7 Bs VC 9 aN ab 4 + 5 dT MO Y Ve N BU 4 R lu 3 e GD QE AAAAAAAA AD Q AA AH do YXR ld m Vy Lm 5 l YX IP p HP 9 Jp Ad 8 pa + atx Mx N 8 0 0 ED v ok NS J La Ya RD m M ML + 9 g E AAA AD AQ AAAAAAAAAAAAAAAA AAA AC W mo Mz IY bul 1 X kg 5 Ml U lg G 4 Ym j 0 t K 7 S 0 dg 6 UR D 6 X 4 c Ty Le 7 v AF mo 6 X Ex AO 2 m 4 Z FE 2 n 6 KD v fl Ob IH CL od jQ Ib 0 B " ĊĠĠĠĠĠĠĠ ĠassertEquals ( Base 6 4 . get Encoder (). encode ToString ( output . signed Transaction . toByteArray ()), Ġexpected Base 6 4 String ) ĊĠĠĠ Ġ} Ċ Ċ } Ċ