@streamr/cli-tools 102.0.0-beta.2 → 102.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/streamr-internal-token-mint.ts +21 -0
- package/bin/streamr-internal.ts +1 -0
- package/dist/bin/streamr-internal-token-mint.d.ts +2 -0
- package/dist/bin/streamr-internal-token-mint.js +22 -0
- package/dist/bin/streamr-internal-token-mint.js.map +1 -0
- package/dist/bin/streamr-internal.js +1 -0
- package/dist/bin/streamr-internal.js.map +1 -1
- package/dist/package.json +6 -6
- package/package.json +6 -6
- package/test/internal-operator.test.ts +7 -7
- package/test/internal-sponsorship-sponsor.test.ts +5 -5
- package/test/storage-node.test.ts +4 -4
- package/test/stream-create.test.ts +2 -2
- package/test/stream-permission.test.ts +3 -3
- package/test/stream-publish-subscribe.test.ts +5 -5
- package/test/stream-resend.test.ts +4 -4
- package/test/stream-search.test.ts +2 -2
- package/test/stream-show.test.ts +2 -2
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import '../src/logLevel'
|
|
3
|
+
|
|
4
|
+
import { _operatorContractUtils } from '@streamr/sdk'
|
|
5
|
+
import { parseEther } from 'ethers'
|
|
6
|
+
import { createCommand } from '../src/command'
|
|
7
|
+
|
|
8
|
+
createCommand().action(async (targetAddress: string, dataTokenAmount: string, gasAmount?: string) => {
|
|
9
|
+
const adminWallet = _operatorContractUtils.getTestAdminWallet()
|
|
10
|
+
const token = _operatorContractUtils.getTestTokenContract().connect(adminWallet)
|
|
11
|
+
await (await token.mint(targetAddress, parseEther(dataTokenAmount))).wait()
|
|
12
|
+
if (gasAmount !== undefined) {
|
|
13
|
+
await (await adminWallet.sendTransaction({
|
|
14
|
+
to: targetAddress,
|
|
15
|
+
value: parseEther(gasAmount)
|
|
16
|
+
})).wait()
|
|
17
|
+
}
|
|
18
|
+
})
|
|
19
|
+
.arguments('<targetAddress> <dataTokenAmount> [gasAmount]')
|
|
20
|
+
.description('mint test tokens and optionally transfer gas to the given Ethereum address')
|
|
21
|
+
.parseAsync()
|
package/bin/streamr-internal.ts
CHANGED
|
@@ -14,4 +14,5 @@ program
|
|
|
14
14
|
.command('operator-undelegate', 'undelegate funds from an operator')
|
|
15
15
|
.command('operator-stake', 'stake operator\'s funds to a sponsorship')
|
|
16
16
|
.command('operator-unstake', 'unstake all operator\'s funds from a sponsorship')
|
|
17
|
+
.command('token-mint', 'mint test tokens')
|
|
17
18
|
.parse()
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
require("../src/logLevel");
|
|
5
|
+
const sdk_1 = require("@streamr/sdk");
|
|
6
|
+
const ethers_1 = require("ethers");
|
|
7
|
+
const command_1 = require("../src/command");
|
|
8
|
+
(0, command_1.createCommand)().action(async (targetAddress, dataTokenAmount, gasAmount) => {
|
|
9
|
+
const adminWallet = sdk_1._operatorContractUtils.getTestAdminWallet();
|
|
10
|
+
const token = sdk_1._operatorContractUtils.getTestTokenContract().connect(adminWallet);
|
|
11
|
+
await (await token.mint(targetAddress, (0, ethers_1.parseEther)(dataTokenAmount))).wait();
|
|
12
|
+
if (gasAmount !== undefined) {
|
|
13
|
+
await (await adminWallet.sendTransaction({
|
|
14
|
+
to: targetAddress,
|
|
15
|
+
value: (0, ethers_1.parseEther)(gasAmount)
|
|
16
|
+
})).wait();
|
|
17
|
+
}
|
|
18
|
+
})
|
|
19
|
+
.arguments('<targetAddress> <dataTokenAmount> [gasAmount]')
|
|
20
|
+
.description('mint test tokens and optionally transfer gas to the given Ethereum address')
|
|
21
|
+
.parseAsync();
|
|
22
|
+
//# sourceMappingURL=streamr-internal-token-mint.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"streamr-internal-token-mint.js","sourceRoot":"","sources":["../../bin/streamr-internal-token-mint.ts"],"names":[],"mappings":";;;AACA,2BAAwB;AAExB,sCAAqD;AACrD,mCAAmC;AACnC,4CAA8C;AAE9C,IAAA,uBAAa,GAAE,CAAC,MAAM,CAAC,KAAK,EAAE,aAAqB,EAAE,eAAuB,EAAE,SAAkB,EAAE,EAAE;IAChG,MAAM,WAAW,GAAG,4BAAsB,CAAC,kBAAkB,EAAE,CAAA;IAC/D,MAAM,KAAK,GAAG,4BAAsB,CAAC,oBAAoB,EAAE,CAAC,OAAO,CAAC,WAAW,CAAC,CAAA;IAChF,MAAM,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,aAAa,EAAE,IAAA,mBAAU,EAAC,eAAe,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAA;IAC3E,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;QAC1B,MAAM,CAAC,MAAM,WAAW,CAAC,eAAe,CAAC;YACrC,EAAE,EAAE,aAAa;YACjB,KAAK,EAAE,IAAA,mBAAU,EAAC,SAAS,CAAC;SAC/B,CAAC,CAAC,CAAC,IAAI,EAAE,CAAA;IACd,CAAC;AACL,CAAC,CAAC;KACG,SAAS,CAAC,+CAA+C,CAAC;KAC1D,WAAW,CAAC,4EAA4E,CAAC;KACzF,UAAU,EAAE,CAAA"}
|
|
@@ -18,5 +18,6 @@ commander_1.program
|
|
|
18
18
|
.command('operator-undelegate', 'undelegate funds from an operator')
|
|
19
19
|
.command('operator-stake', 'stake operator\'s funds to a sponsorship')
|
|
20
20
|
.command('operator-unstake', 'unstake all operator\'s funds from a sponsorship')
|
|
21
|
+
.command('token-mint', 'mint test tokens')
|
|
21
22
|
.parse();
|
|
22
23
|
//# sourceMappingURL=streamr-internal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"streamr-internal.js","sourceRoot":"","sources":["../../bin/streamr-internal.ts"],"names":[],"mappings":";;;;;;AACA,yCAAmC;AACnC,mEAAiC;AAEjC,mBAAO;KACF,OAAO,CAAC,sBAAG,CAAC,OAAO,CAAC;KACpB,KAAK,CAAC,oBAAoB,CAAC;KAC3B,WAAW,CAAC,kEAAkE,CAAC;KAC/E,OAAO,CAAC,WAAW,EAAE,mBAAmB,CAAC;KACzC,OAAO,CAAC,oBAAoB,EAAE,4BAA4B,CAAC;KAC3D,OAAO,CAAC,iBAAiB,EAAE,4CAA4C,CAAC;KACxE,OAAO,CAAC,qBAAqB,EAAE,uBAAuB,CAAC;KACvD,OAAO,CAAC,mBAAmB,EAAE,+BAA+B,CAAC;KAC7D,OAAO,CAAC,qBAAqB,EAAE,mCAAmC,CAAC;KACnE,OAAO,CAAC,gBAAgB,EAAE,0CAA0C,CAAC;KACrE,OAAO,CAAC,kBAAkB,EAAE,kDAAkD,CAAC;KAC/E,KAAK,EAAE,CAAA"}
|
|
1
|
+
{"version":3,"file":"streamr-internal.js","sourceRoot":"","sources":["../../bin/streamr-internal.ts"],"names":[],"mappings":";;;;;;AACA,yCAAmC;AACnC,mEAAiC;AAEjC,mBAAO;KACF,OAAO,CAAC,sBAAG,CAAC,OAAO,CAAC;KACpB,KAAK,CAAC,oBAAoB,CAAC;KAC3B,WAAW,CAAC,kEAAkE,CAAC;KAC/E,OAAO,CAAC,WAAW,EAAE,mBAAmB,CAAC;KACzC,OAAO,CAAC,oBAAoB,EAAE,4BAA4B,CAAC;KAC3D,OAAO,CAAC,iBAAiB,EAAE,4CAA4C,CAAC;KACxE,OAAO,CAAC,qBAAqB,EAAE,uBAAuB,CAAC;KACvD,OAAO,CAAC,mBAAmB,EAAE,+BAA+B,CAAC;KAC7D,OAAO,CAAC,qBAAqB,EAAE,mCAAmC,CAAC;KACnE,OAAO,CAAC,gBAAgB,EAAE,0CAA0C,CAAC;KACrE,OAAO,CAAC,kBAAkB,EAAE,kDAAkD,CAAC;KAC/E,OAAO,CAAC,YAAY,EAAE,kBAAkB,CAAC;KACzC,KAAK,EAAE,CAAA"}
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@streamr/cli-tools",
|
|
3
|
-
"version": "102.0.0
|
|
3
|
+
"version": "102.0.0",
|
|
4
4
|
"description": "Command line tools for Streamr",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"author": "Streamr Network AG <contact@streamr.com>",
|
|
27
27
|
"license": "AGPL-3.0",
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@streamr/dht": "102.0.0
|
|
30
|
-
"@streamr/sdk": "102.0.0
|
|
31
|
-
"@streamr/trackerless-network": "102.0.0
|
|
32
|
-
"@streamr/utils": "102.0.0
|
|
29
|
+
"@streamr/dht": "102.0.0",
|
|
30
|
+
"@streamr/sdk": "102.0.0",
|
|
31
|
+
"@streamr/trackerless-network": "102.0.0",
|
|
32
|
+
"@streamr/utils": "102.0.0",
|
|
33
33
|
"commander": "^13.1.0",
|
|
34
34
|
"easy-table": "^1.1.1",
|
|
35
35
|
"ethers": "^6.13.0",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"semver": "^7.6.3"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@streamr/test-utils": "102.0.0
|
|
41
|
+
"@streamr/test-utils": "102.0.0",
|
|
42
42
|
"@types/event-stream": "^4.0.5",
|
|
43
43
|
"@types/lodash": "^4.17.14",
|
|
44
44
|
"@types/merge2": "^1.4.4",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@streamr/cli-tools",
|
|
3
|
-
"version": "102.0.0
|
|
3
|
+
"version": "102.0.0",
|
|
4
4
|
"description": "Command line tools for Streamr",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"author": "Streamr Network AG <contact@streamr.com>",
|
|
27
27
|
"license": "AGPL-3.0",
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@streamr/dht": "102.0.0
|
|
30
|
-
"@streamr/sdk": "102.0.0
|
|
31
|
-
"@streamr/trackerless-network": "102.0.0
|
|
32
|
-
"@streamr/utils": "102.0.0
|
|
29
|
+
"@streamr/dht": "102.0.0",
|
|
30
|
+
"@streamr/sdk": "102.0.0",
|
|
31
|
+
"@streamr/trackerless-network": "102.0.0",
|
|
32
|
+
"@streamr/utils": "102.0.0",
|
|
33
33
|
"commander": "^13.1.0",
|
|
34
34
|
"easy-table": "^1.1.1",
|
|
35
35
|
"ethers": "^6.13.0",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"semver": "^7.6.3"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@streamr/test-utils": "102.0.0
|
|
41
|
+
"@streamr/test-utils": "102.0.0",
|
|
42
42
|
"@types/event-stream": "^4.0.5",
|
|
43
43
|
"@types/lodash": "^4.17.14",
|
|
44
44
|
"@types/merge2": "^1.4.4",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { _operatorContractUtils } from '@streamr/sdk'
|
|
2
|
-
import {
|
|
3
|
-
import { createTestClient, runCommand } from './utils'
|
|
4
|
-
import { parseEther, Wallet } from 'ethers'
|
|
2
|
+
import { createTestPrivateKey, createTestWallet } from '@streamr/test-utils'
|
|
5
3
|
import { wait } from '@streamr/utils'
|
|
4
|
+
import { parseEther } from 'ethers'
|
|
5
|
+
import { createTestClient, runCommand } from './utils'
|
|
6
6
|
|
|
7
7
|
const DELEGATION_AMOUNT = '20000'
|
|
8
8
|
const STAKE_AMOUNT = '10000'
|
|
@@ -12,19 +12,19 @@ const MINIMUM_DELEGATION_SECONDS = 1 // the config value defined in StreamrEnvD
|
|
|
12
12
|
describe('operator', () => {
|
|
13
13
|
|
|
14
14
|
it('happy path', async () => {
|
|
15
|
-
const client = createTestClient(await
|
|
15
|
+
const client = createTestClient(await createTestPrivateKey({ gas: true }))
|
|
16
16
|
const stream = await client.createStream('/test')
|
|
17
17
|
const sponsorshipContract = await _operatorContractUtils.deploySponsorshipContract({
|
|
18
18
|
streamId: stream.id,
|
|
19
|
-
deployer:
|
|
19
|
+
deployer: await createTestWallet({ gas: true })
|
|
20
20
|
})
|
|
21
21
|
const sponsorshipAddress: string = await sponsorshipContract.getAddress()
|
|
22
|
-
const operator = await
|
|
22
|
+
const operator = await createTestWallet({ gas: true, tokens: true })
|
|
23
23
|
const operatorContract = await _operatorContractUtils.deployOperatorContract({
|
|
24
24
|
deployer: operator
|
|
25
25
|
})
|
|
26
26
|
await _operatorContractUtils.delegate(operator, await operatorContract.getAddress(), parseEther(SELF_DELEGATION_AMOUNT))
|
|
27
|
-
const delegator = await
|
|
27
|
+
const delegator = await createTestWallet({ gas: true, tokens: true })
|
|
28
28
|
const operatorAddress: string = await operatorContract.getAddress()
|
|
29
29
|
|
|
30
30
|
// delegate
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { _operatorContractUtils } from '@streamr/sdk'
|
|
2
|
-
import {
|
|
2
|
+
import { createTestPrivateKey, createTestWallet } from '@streamr/test-utils'
|
|
3
|
+
import { parseEther } from 'ethers'
|
|
3
4
|
import { createTestClient, runCommand } from './utils'
|
|
4
|
-
import { parseEther, Wallet } from 'ethers'
|
|
5
5
|
|
|
6
6
|
const SPONSOR_AMOUNT = '12345'
|
|
7
7
|
|
|
8
8
|
describe('sponsorship-sponsor', () => {
|
|
9
9
|
|
|
10
10
|
it('happy path', async () => {
|
|
11
|
-
const client = createTestClient(await
|
|
11
|
+
const client = createTestClient(await createTestPrivateKey({ gas: true }))
|
|
12
12
|
const stream = await client.createStream('/test')
|
|
13
13
|
const sponsorshipContract = await _operatorContractUtils.deploySponsorshipContract({
|
|
14
14
|
streamId: stream.id,
|
|
15
|
-
deployer:
|
|
15
|
+
deployer: await createTestWallet({ gas: true })
|
|
16
16
|
})
|
|
17
17
|
|
|
18
|
-
const sponsorer = await
|
|
18
|
+
const sponsorer = await createTestWallet({ gas: true, tokens: true })
|
|
19
19
|
const sponsorshipAddress: string = await sponsorshipContract.getAddress()
|
|
20
20
|
await runCommand(`internal sponsorship-sponsor ${sponsorshipAddress} ${SPONSOR_AMOUNT}`, {
|
|
21
21
|
privateKey: sponsorer.privateKey
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { fetchPrivateKeyWithGas } from '@streamr/test-utils'
|
|
2
|
-
import 'jest-extended'
|
|
3
1
|
import { StreamID } from '@streamr/sdk'
|
|
4
|
-
import {
|
|
2
|
+
import { createTestPrivateKey } from '@streamr/test-utils'
|
|
5
3
|
import { until } from '@streamr/utils'
|
|
4
|
+
import 'jest-extended'
|
|
5
|
+
import { DOCKER_DEV_STORAGE_NODE, createTestClient, runCommand } from './utils'
|
|
6
6
|
|
|
7
7
|
const isStored = async (streamId: StreamID): Promise<boolean> => {
|
|
8
8
|
const output = await runCommand(`storage-node list-streams ${DOCKER_DEV_STORAGE_NODE}`)
|
|
@@ -12,7 +12,7 @@ const isStored = async (streamId: StreamID): Promise<boolean> => {
|
|
|
12
12
|
describe('storage node', () => {
|
|
13
13
|
|
|
14
14
|
it('add and remove stream', async () => {
|
|
15
|
-
const privateKey = await
|
|
15
|
+
const privateKey = await createTestPrivateKey({ gas: true })
|
|
16
16
|
const client = createTestClient(privateKey)
|
|
17
17
|
const stream = await client.createStream(`/${Date.now()}`)
|
|
18
18
|
await client.destroy()
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import { createTestPrivateKey } from '@streamr/test-utils'
|
|
1
2
|
import { Wallet } from 'ethers'
|
|
2
|
-
import { fetchPrivateKeyWithGas } from '@streamr/test-utils'
|
|
3
3
|
import { createTestClient, runCommand } from './utils'
|
|
4
4
|
|
|
5
5
|
describe('create stream', () => {
|
|
6
6
|
|
|
7
7
|
it('happy path', async () => {
|
|
8
|
-
const privateKey = await
|
|
8
|
+
const privateKey = await createTestPrivateKey({ gas: true })
|
|
9
9
|
const address = new Wallet(privateKey).address.toLowerCase()
|
|
10
10
|
const path = `/${Date.now()}`
|
|
11
11
|
const streamId = `${address}${path}`
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { fetchPrivateKeyWithGas, randomUserId } from '@streamr/test-utils'
|
|
2
|
-
import 'jest-extended'
|
|
3
1
|
import { StreamPermission } from '@streamr/sdk'
|
|
2
|
+
import { createTestPrivateKey, randomUserId } from '@streamr/test-utils'
|
|
3
|
+
import 'jest-extended'
|
|
4
4
|
import { createTestClient, runCommand } from './utils'
|
|
5
5
|
|
|
6
6
|
describe('permission', () => {
|
|
7
7
|
|
|
8
8
|
it('grant and revoke', async () => {
|
|
9
|
-
const privateKey = await
|
|
9
|
+
const privateKey = await createTestPrivateKey({ gas: true })
|
|
10
10
|
const client = createTestClient(privateKey)
|
|
11
11
|
const stream = await client.createStream(`/${Date.now()}`)
|
|
12
12
|
const otherUser = randomUserId()
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Wallet } from 'ethers'
|
|
2
|
-
import { fetchPrivateKeyWithGas } from '@streamr/test-utils'
|
|
3
|
-
import { collect } from '@streamr/utils'
|
|
4
1
|
import { StreamPermission } from '@streamr/sdk'
|
|
2
|
+
import { createTestPrivateKey } from '@streamr/test-utils'
|
|
3
|
+
import { collect } from '@streamr/utils'
|
|
4
|
+
import { Wallet } from 'ethers'
|
|
5
5
|
import { createTestClient, runCommand, startCommand } from './utils'
|
|
6
6
|
|
|
7
7
|
const TIMEOUT = 30 * 1000
|
|
@@ -13,8 +13,8 @@ describe('publish and subscribe', () => {
|
|
|
13
13
|
let streamId: string
|
|
14
14
|
|
|
15
15
|
beforeAll(async () => {
|
|
16
|
-
publisherPrivateKey = await
|
|
17
|
-
subscriberPrivateKey = await
|
|
16
|
+
publisherPrivateKey = await createTestPrivateKey({ gas: true })
|
|
17
|
+
subscriberPrivateKey = await createTestPrivateKey({ gas: true })
|
|
18
18
|
const client = createTestClient(publisherPrivateKey)
|
|
19
19
|
const stream = await client.createStream(`/${Date.now()}`)
|
|
20
20
|
await stream.grantPermissions({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { fetchPrivateKeyWithGas } from '@streamr/test-utils'
|
|
2
|
-
import range from 'lodash/range'
|
|
3
1
|
import { Message, Stream } from '@streamr/sdk'
|
|
4
|
-
import {
|
|
2
|
+
import { createTestPrivateKey } from '@streamr/test-utils'
|
|
5
3
|
import { wait } from '@streamr/utils'
|
|
4
|
+
import range from 'lodash/range'
|
|
5
|
+
import { DOCKER_DEV_STORAGE_NODE, createTestClient, runCommand } from './utils'
|
|
6
6
|
|
|
7
7
|
const parseJSONs = (lines: string[]): any[] => {
|
|
8
8
|
return lines.map((line) => JSON.parse(line))
|
|
@@ -15,7 +15,7 @@ describe('resend stream', () => {
|
|
|
15
15
|
const messages: Message[] = []
|
|
16
16
|
|
|
17
17
|
beforeAll(async () => {
|
|
18
|
-
privateKey = await
|
|
18
|
+
privateKey = await createTestPrivateKey({ gas: true })
|
|
19
19
|
const client = createTestClient(privateKey)
|
|
20
20
|
stream = await client.createStream(`/${Date.now()}`)
|
|
21
21
|
await stream.addToStorageNode(DOCKER_DEV_STORAGE_NODE, { wait: true })
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createTestPrivateKey } from '@streamr/test-utils'
|
|
2
2
|
import { randomString } from '@streamr/utils'
|
|
3
3
|
import { createTestClient, runCommand, waitForTheGraphToHaveIndexed } from './utils'
|
|
4
4
|
|
|
@@ -6,7 +6,7 @@ describe('search streams', () => {
|
|
|
6
6
|
|
|
7
7
|
it('happy path', async () => {
|
|
8
8
|
const testId = randomString(10)
|
|
9
|
-
const client = createTestClient(await
|
|
9
|
+
const client = createTestClient(await createTestPrivateKey({ gas: true }))
|
|
10
10
|
const stream1 = await client.createStream(`/${testId}-1`)
|
|
11
11
|
const stream2 = await client.createStream(`/${testId}-2`)
|
|
12
12
|
await Promise.all([
|
package/test/stream-show.test.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import { createTestPrivateKey } from '@streamr/test-utils'
|
|
1
2
|
import { Wallet } from 'ethers'
|
|
2
|
-
import { fetchPrivateKeyWithGas } from '@streamr/test-utils'
|
|
3
3
|
import { createTestClient, runCommand, waitForTheGraphToHaveIndexed } from './utils'
|
|
4
4
|
|
|
5
5
|
describe('show stream', () => {
|
|
6
6
|
|
|
7
7
|
it('happy path', async () => {
|
|
8
|
-
const creatorPrivateKey = await
|
|
8
|
+
const creatorPrivateKey = await createTestPrivateKey({ gas: true })
|
|
9
9
|
const client = createTestClient(creatorPrivateKey)
|
|
10
10
|
const stream = await client.createStream(`/${Date.now()}`)
|
|
11
11
|
await waitForTheGraphToHaveIndexed(stream, client)
|