- 🙋🏾♀️
user
inputs
transaction details (recipient, amount, token etc) and passes inputs to library. - 💻
wallet
transforms
unsafe inputs into validatedTransactionIntent
. - 🛠
library
requests
Radix Core API to build transaction from intent and returns built transaction with human-readable fee to wallet. - 🛠
library
signs
transaction - 🛠
library
submits
signed transaction to Radix Core API which promtly returns initial OK/ERR response, wallet handles this initial response. Response containstxID
. - OPTIONAL 💻
wallet
displays
transaction fee andtxID
and waits for user to confirm transaction with PIN code. - 🛠
library
finalizes
signed transaction withtxID
to Radix Core API which promtly returns initial OK/ERR response, wallet handles this initial response. - 💻
wallet
polls
status of transaction (using txID from step 5), using appropriate library api, and informs user of final CONFIRMED/REJECTED result. - 🙋🏾♀️
user
acts
on any
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# This is a simplified and modified version of | |
# https://github.com/satoshilabs/slips/blob/master/slip-0010/testvectors.py | |
# You need to install these dependencies: | |
# `python3 -m pip install cryptography` | |
# `python3 -m pip install Mnemonic` | |
import hashlib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Imported new block headers count=1 elapsed=16.499ms number=15,404,115 hash=88ee20..fc9579 | |
WARN [08-24|19:06:19.483] Unexpected trienode heal packet peer=e46f5a16 reqid=5,786,123,547,674,127,918 | |
WARN [08-24|19:06:19.491] Unexpected bytecode heal packet peer=246fde5c reqid=793,928,132,157,719,426 | |
INFO [08-24|19:06:20.875] State heal in progress accounts=112,[email protected] slots=185,[email protected] [email protected] nodes=1,097,[email protected] pending=26422 | |
WARN [08-24|19:06:20.875] Unexpected bytecode heal packet peer=774017fc reqid=4,273,106,156,886,874,214 | |
WARN [08-24|19:06:25.107] Unexpected bytecode heal packet peer=1b9b4fd4 reqid=6,018,667,262,528,546,873 | |
WARN [08-24|19:06:26.396] Unexpected trienode heal packet peer=4ce74c2f reqid=1,183,742,923,324,011,420 | |
INFO [08-24|19:06:29.985] State heal in progress accounts=112,[email protected] slots=185,[email protected] [email protected] nodes=1,099,[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it('ownedBalanceOfToken', (done) => { | |
const subs = new Subscription() | |
const radix = Radix.create().__withAPI(mockedAPI) | |
const loadKeystore = (): Promise<KeystoreT> => | |
Promise.resolve(keystoreForTest.keystore) | |
radix.login(keystoreForTest.password, loadKeystore) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Deprecated in favour of: https://github.com/radixdlt/radixdlt-javascript/blob/main/packages/application/test/mockRadix.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it('radix flow', async (done) => { | |
const subs = new Subscription() | |
const loadKeystoreFN = () => Promise.resolve(keystoreForTest.keystore) | |
const password = keystoreForTest.password | |
const walletResult = await Wallet.byLoadingAndDecryptingKeystore({ | |
password, | |
load: loadKeystoreFN | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const create = (): RadixT => { | |
/// REST OF METHOD OMITTED | |
// ... | |
// ... | |
// ... | |
/// REST OF METHOD OMITTED | |
const radix = { | |
// we forward the full `RadixAPI`, but we also provide some convenience methods based on active account/address. | |
...api, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const create = (): RadixT => { | |
/// REST OF METHOD OMITTED | |
// ... | |
// ... | |
// ... | |
/// REST OF METHOD OMITTED | |
let radix: RadixT = (undefined as unknown) as RadixT | |
const connect = (url: URL): RadixT => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import XCTest | |
@testable import RadixSDK | |
class SimplerEncryptionTests: TestCase { | |
private lazy var angelaMerkel = KeyPair() | |
private lazy var joeBiden = KeyPair() | |
private lazy var justinTrudeau = KeyPair() | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* (C) Copyright 2020 Radix DLT Ltd | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a | |
* copy of this software and associated documentation files (the “Software”), | |
* to deal in the Software without restriction, including without limitation | |
* the rights to use, copy, modify, merge, publish, distribute, sublicense, | |
* and/or sell copies of the Software, and to permit persons to whom the | |
* Software is furnished to do so, subject to the following conditions: | |
* |
NewerOlder