Jump to content

mitchlang009

Member
  • Content Count

    8
  • Joined

  • Last visited

About mitchlang009

  • Rank
    Newbie

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Thanks for the suggestion, ZerpLotto is an interesting project (with better odds than the state lottos). I might be overly paranoid but I don't think I could sleep at night if I had a server that had access to an account containing any amount of other people's money.
  2. I'm interested in how a wagering system could be built using the XRP ledger. This could be used for esports gaming where users all pay an entry fee and then the sum is paid to the winner after some event. It seems like this couldn't be completely trustless because someone has to be the authority on what the outcome was and who won, but could it be done without the third party ever holding a significant amount of the funds? The best I can think of is that when the players enter a match they have to create a conditioned escrow transaction to a third party that only the third party can fulfill. Once the match is decided, the third party releases all of the funds. The third party then sends the sum to the winner. The third party would only have the funds for a limited time so it decreases the potential for problems if the third party is attacked. There would also have to be some mechanism that prevents the third party from releasing the funds until the match is decided.
  3. I was also wondering if you could cancel an escrow transaction using a crypto condition. Could this be used for a wagering system? Person A and person B both create an escrow transaction to each other that only a trusted 3rd party C can fulfill/cancel. Based on the outcome of the wager event, C cancels one transaction and fulfills the other.
  4. In case anyone comes across this it ended up looking like this: public static func entropy() -> [UInt8]? { var bytes = [UInt8](repeating: 0, count: 16) let status = SecRandomCopyBytes(kSecRandomDefault, bytes.count, &bytes) if status == errSecSuccess { // Always test the status. return bytes } return nil } public enum SeedType { case ed25519 case secp256k1 } public static func encodeSeed(entropy: [UInt8], type: SeedType) throws -> String { if entropy.count != 16 { throw EncodeSeedError.invalidBufferSize } let version: [UInt8] = type == .ed25519 ? [0x01, 0xE1, 0x4B] : [0x21] let versionEntropy: [UInt8] = version + entropy let check = [UInt8](Data(versionEntropy).sha256().sha256().prefix(through: 3)) let versionEntropyCheck: [UInt8] = versionEntropy + check return String(base58Encoding: Data(versionEntropyCheck), alphabet: Base58String.xrpAlphabet) }
  5. I'm a little confused trying to recreate the family seed generation process using Swift for iOS and am working through all the subsequent function calls that keypairs.generateSeed() makes. Is there a written explanation or pseudocode/diagram of how the family seed is encoded from a source of entropy? Thanks!
  6. Thanks Sukrim. I wasn't sure whether the API took the least significant byte of the integers or whether it had to be an array of bytes. I found this function https://developer.apple.com/documentation/security/1399291-secrandomcopybytes, which looks to be what I need rather than generating an array of Integers. Appreciate it!
  7. Hello, So I am working on building a wallet for a project I'm working on. It is an iOS app and I am running the ripple-lib javascript API in iOS's JavaScriptCore framework. The problem is that brorand (which ripple's API uses to generate random numbers) doesn't play nice with the iOS javascript environment. So my question is if I generate the entropy in swift and pass the array of numbers to either ripple's generateAddress or generateSeed functions am I okay? It looks to me like the entropy should be an array of 16 integers, what is the range for the individual integers, 0-256? Thanks!
×
×
  • Create New...