ethers-io / ethers.objc

Fast, simple and complete library for Ethereum in Objective-C.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sign Message Problem

daQiuQiu opened this issue · comments

Hi,
im using signMessage method in Account.h, but i cant get any result.

  • (void)ethSign:(NSString *)str {
    if (self.account) {
    NSLog(@"address = %@ str = %@",self.account.address,str);
    NSData *strdata = [str dataUsingEncoding:NSUTF8StringEncoding];
    // NSData *data = [RLPSerialization dataWithObject:strdata error:&error];
    Signature *sig = [self.account signMessage:strdata];
    NSLog(@"sig = %c, desc = %@",sig.v,sig.description);
    }
    }

I'm trying to sign a string message, could you help me please?
@ricmoo

Nerver mind
found your accountTest.