How can we grantPermission on Iroha with iOS code to android
Closed this issue · 1 comments
Engineering12345 commented
I have sample code from ios and don't know how to write this code to andion :
func grantPermission(publicKey :String,priKey:String, transaction: IRTransaction,
reducedRecoveryHash:
Data, reducedAdminGrantHash: Data) throws -> IRTransaction {
let publicKeyData = NSData(hexString: publicKey)! as Data
let publicKey = IREd25519PublicKey(rawData: publicKeyData)!
let privateKeyData = NSData(hexString: priKey)! as Data
let privateKey = IREd25519PrivateKey(rawData: privateKeyData)!
let signer = IREd25519Sha512Signer(privateKey: privateKey)!
let reducedHash = try transaction.batchHash()
let tx = try transaction
.batched([reducedHash, reducedRecoveryHash, reducedAdminGrantHash], batchType: .atomic)
.signed(withSignatories: [signer], signatoryPublicKeys: [publicKey])
return tx
}
Pobepto commented
Hi! It's library for JavaScript not for Android, better to open this question in Java repository