0.5.78 • Published 3 months ago

@rarible/flow-test-common v0.5.78

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

Test account

For generating and funding flow accounts we're using flow-js-testing library Usage example for flow emulator.

import { createEmulatorAccount, createFlowEmulator, createTestAuth } from "@rarible/flow-test-common"
import { createFlowSdk } from "@rarible/flow-sdk"

/* Firstly we create an emulator instance that starts and stops flow emulator in before/after test hooks*/
createFlowEmulator(fcl, network, accountAddress, accountPrivateKey, AccountKeyIndex)

const account = createEmulatorAccount("accountNameString") // may be any string
const auth = createTestAuth(fcl, "emulator", account.address, account.pk)

/* then we can create Sdk */

const sdk = createFlowSdk(fcl, "emulator", {}, auth)

For testnet we must create and fund testnet account to create a flow account on the testnet you need to do the following steps:

  1. Generate keys for account with command flow keys generate
  2. Create account with your created public key here
  3. (Optional) fund your account by FLOW or FUSD tokens if needed here

Now we can create test auth for SDK with account private key and address

import { createTestAuth } from "@rarible/flow-test-common"
import { createFlowSdk } from "@rarible/flow-sdk"

const auth = createTestAuth(fcl, "emulator", account.address, account.pk)

const sdk = createFlowSdk(fcl, "emulator", {}, auth)
0.5.78

3 months ago

0.5.76-beta.0

4 months ago

0.5.77

4 months ago

0.5.76

5 months ago

0.5.73-fix.0

6 months ago

0.5.74

6 months ago

0.5.74-fix.0

6 months ago

0.5.74-fix.1

6 months ago

0.5.75-fix.1

6 months ago

0.5.66

11 months ago

0.5.61

1 year ago

0.5.50

1 year ago

0.5.48-alpha.0

2 years ago

0.5.48-alpha.1

2 years ago

0.5.48-alpha.2

2 years ago

0.5.48-alpha.5

2 years ago

0.5.42-alpha.1

2 years ago

0.5.43

2 years ago

0.5.41-alpha.1

2 years ago

0.5.33-alpha.10

2 years ago

0.5.30-ac.0

2 years ago

0.5.33-alpha.12

2 years ago

0.5.30

2 years ago

0.5.33-alpha.11

2 years ago

0.5.31

2 years ago

0.5.33-alpha.19

2 years ago

0.5.33-alpha.5

2 years ago

0.5.36

2 years ago

0.5.33-alpha.13

2 years ago

0.5.33-alpha.16

2 years ago

0.5.34

2 years ago

0.5.33-alpha.0

2 years ago

0.5.30-alpha.4

2 years ago

0.5.30-alpha.3

2 years ago

0.5.30-alpha.5

2 years ago

0.5.33-alpha.25

2 years ago

0.5.10

2 years ago

0.5.9

2 years ago

0.5.14

2 years ago

0.5.0

2 years ago

0.4.0

2 years ago

0.3.3

2 years ago

0.3.0

3 years ago

0.1.1

3 years ago

0.0.95

3 years ago

0.0.96

3 years ago

0.0.98

3 years ago

0.0.99

3 years ago

0.0.101

3 years ago

0.0.100

3 years ago

0.0.93

3 years ago

0.0.94

3 years ago

0.1.0

3 years ago

0.0.87

3 years ago

0.0.88

3 years ago

0.0.89

3 years ago

0.0.90

3 years ago

0.0.91

3 years ago

0.0.92

3 years ago

0.0.8

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.2

3 years ago