Exemple #1
0
def clientFromSigner(signer, looper, nodeSet, tdir):
    wallet = Wallet(signer.identifier)
    wallet.addSigner(signer)
    s = genTestClient(nodeSet, tmpdir=tdir, identifier=signer.identifier)
    looper.add(s)
    looper.run(s.ensureConnectedToNodes())
    return s
Exemple #2
0
def nonSponsor(looper, nodeSet, tdir):
    sseed = b'this is a secret sponsor seed...'
    signer = SimpleSigner(seed=sseed)
    c, _ = genTestClient(nodeSet, tmpdir=tdir)
    w = Wallet(c.name)
    w.addSigner(signer=signer)
    c.registerObserver(w.handleIncomingReply)
    looper.add(c)
    looper.run(c.ensureConnectedToNodes())
    return c, w
Exemple #3
0
def anotherSponsor(genned, steward, stewardWallet, tdir, looper):
    sseed = b'this is 1 secret sponsor seed...'
    signer = SimpleSigner(seed=sseed)
    c, _ = genTestClient(genned, tmpdir=tdir)
    w = Wallet(c.name)
    w.addSigner(signer=signer)
    c.registerObserver(w.handleIncomingReply)
    looper.add(c)
    looper.run(c.ensureConnectedToNodes())
    createNym(looper, signer.verstr, steward, stewardWallet, SPONSOR)
    return c, w
Exemple #4
0
def testNonSponsoredNymCanDoGetNym(genned, addedSponsor, sponsorWallet, tdir,
                                   looper):
    signer = SimpleSigner()
    someClient, _ = genTestClient(genned, tmpdir=tdir)
    wallet = Wallet(someClient.name)
    wallet.addSigner(signer=signer)
    someClient.registerObserver(wallet.handleIncomingReply)
    looper.add(someClient)
    looper.run(someClient.ensureConnectedToNodes())
    needle = sponsorWallet.defaultId
    makeGetNymRequest(someClient, wallet, needle)
    looper.run(eventually(someClient.hasNym, needle, retryWait=1, timeout=5))
Exemple #5
0
def stewardWallet():
    wallet = Wallet('steward')
    seed = b'is a pit   seed, or somepin else'
    wallet.addSigner(seed=seed)
    assert wallet.defaultId == 'LRtO/oin94hzKKCVG4GOG1eMuH7uVMJ3txDUHBX2BqY='
    return wallet
Exemple #6
0
def sponsorWallet():
    wallet = Wallet('sponsor')
    seed = b'sponsors are people too.........'
    wallet.addSigner(seed=seed)
    return wallet
Exemple #7
0
def clientAndWallet1(client1Signer, looper, nodeSet, tdir, up):
    client, wallet = genTestClient(nodeSet, tmpdir=tdir)
    wallet = Wallet(client.name)
    wallet.addSigner(signer=client1Signer)
    return client, wallet
Exemple #8
0
def _newWallet(name=None):
    signer = SimpleSigner()
    w = Wallet(name or signer.identifier)
    w.addSigner(signer=signer)
    return w
Exemple #9
0
def addUser(looper, creatorClient, creatorWallet, name):
    wallet = Wallet(name)
    wallet.addSigner()
    createNym(looper, wallet.defaultId, creatorClient, creatorWallet)
    return wallet