0.35.0 • Published 8 months ago

@requestnetwork/request-logic v0.35.0

Weekly downloads
113
License
MIT
Repository
github
Last release
8 months ago

@requestnetwork/request-logic

@requestnetwork/request-logic is a typescript library part of the Request Network protocol. It is the default implementation of the Request Logic layer. This layer is responsible for the business logic: properties and actions of requests.

Request logic creates actions, that are signed and sends them to the layer below, Transaction.

Installation

npm install @requestnetwork/request-logic

Usage

See packages/usage-examples/request-logic.ts.

Features

  • createRequest : create a request
  • createEncryptedRequest : create an encrypted request
  • acceptRequest : accept a request
  • cancelRequest : cancel a request
  • increaseExpectedAmountRequest : increase the amount of a request
  • reduceExpectedAmountRequest : reduce the amount of a request
  • getFirstRequestFromTopic : get the first request from the actions indexed by a topic (should be used with requestId)
  • getRequestsByTopic : get all the requests for a topic
  • computeRequestId : compute the ID of a request before actually creating it.

Action topics

When an action is sent to the Transaction layer, strings named topics can be attached to it. These topics are used to index the action and, therefore, allow to retrieve it later in order to reconstruct the request.

Every action has at least its request id as a topic.

When creating a request, arbitrary topics can be attached to the createRequest action to index the request. For example, it can be the identity of the request creator in order to be able, later, to retrieve every request created by a user. Other actions than createRequest doesn't need additional topics since it contains the request id that can be linked to the corresponding createRequest action of the request.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Read the contributing guide

License

MIT

0.35.1-next.2082

8 months ago

0.35.1-next.2080

8 months ago

0.35.1-next.2081

8 months ago

0.35.1-next.2079

9 months ago

0.35.1-next.2078

9 months ago

0.35.1-next.2077

9 months ago

0.35.1-next.2076

9 months ago

0.35.1-next.2072

9 months ago

0.35.1-next.2073

9 months ago

0.35.1-next.2074

9 months ago

0.35.1-next.2075

9 months ago

0.35.1-next.2069

10 months ago

0.35.1-next.2068

10 months ago

0.35.1-next.2071

10 months ago

0.35.1-next.2067

10 months ago

0.35.1-next.2066

10 months ago

0.35.1-next.2065

10 months ago

0.35.1-next.2064

10 months ago

0.35.1-next.2063

10 months ago

0.33.1-next.2051

12 months ago

0.33.1-next.2053

12 months ago

0.33.1-next.2052

12 months ago

0.34.0

12 months ago

0.35.0

12 months ago

0.26.1-next.711

12 months ago

0.26.1-next.710

12 months ago

0.26.1-next.709

12 months ago

0.35.1-next.2061

12 months ago

0.35.1-next.2062

11 months ago

0.34.1-next.2057

12 months ago

0.32.0

1 year ago

0.31.0

1 year ago

0.30.0

1 year ago

0.29.1-next.1982

2 years ago

0.29.1-next.1981

2 years ago

0.29.1-next.1979

2 years ago

0.29.1-next.1980

2 years ago

0.29.1-next.1978

2 years ago

0.29.1-next.1977

2 years ago

0.29.0

2 years ago

0.28.1-next.1976

2 years ago

0.28.1-next.1974

2 years ago

0.28.1-next.1971

2 years ago

0.28.1-next.1973

2 years ago

0.28.1-next.1969

2 years ago

0.28.1-next.1959

2 years ago

0.28.1-next.1958

2 years ago

0.28.1-next.1960

2 years ago

0.28.1-next.1967

2 years ago

0.28.1-next.1966

2 years ago

0.28.1-next.1965

2 years ago

0.28.1-next.1964

2 years ago

0.28.1-next.1963

2 years ago

0.28.1-next.1962

2 years ago

0.28.1-next.1961

2 years ago

0.28.1-next.1957

2 years ago

0.28.1-next.1956

2 years ago

0.28.1-next.1955

2 years ago

0.27.1-next.1939

2 years ago

0.27.1-next.1938

2 years ago

0.27.1-next.1937

2 years ago

0.27.1-next.1943

2 years ago

0.27.1-next.1942

2 years ago

0.27.1-next.1941

2 years ago

0.27.1-next.1940

2 years ago

0.27.1-next.1947

2 years ago

0.27.1-next.1946

2 years ago

0.27.1-next.1945

2 years ago

0.27.1-next.1944

2 years ago

0.27.1-next.1936

2 years ago

0.27.1-next.1933

2 years ago

0.27.0

2 years ago

0.27.1-next.1949

2 years ago

0.27.1-next.1948

2 years ago

0.28.0

2 years ago

0.27.1-next.1953

2 years ago

0.27.1-next.1952

2 years ago

0.27.1-next.1950

2 years ago

0.26.10

3 years ago

0.26.9

4 years ago

0.26.9-next.1462

4 years ago

0.26.9-next.1461

4 years ago

0.26.9-next.1458

4 years ago

0.26.9-next.1459

4 years ago

0.26.9-next.1457

4 years ago

0.26.9-next.1456

4 years ago

0.26.9-next.1455

4 years ago

0.26.7-next.1430

4 years ago

0.26.7-next.1432

4 years ago

0.26.7-next.1431

4 years ago

0.26.7-next.1429

4 years ago

0.26.8-next.1448

4 years ago

0.26.8-next.1447

4 years ago

0.26.8-next.1449

4 years ago

0.26.8

4 years ago

0.26.9-next.1450

4 years ago

0.26.9-next.1451

4 years ago

0.26.9-next.1452

4 years ago

0.26.9-next.1453

4 years ago

0.26.9-next.1454

4 years ago

0.26.8-next.1437

4 years ago

0.26.8-next.1436

4 years ago

0.26.8-next.1439

4 years ago

0.26.8-next.1438

4 years ago

0.26.8-next.1444

4 years ago

0.26.8-next.1443

4 years ago

0.26.8-next.1446

4 years ago

0.26.8-next.1445

4 years ago

0.26.8-next.1442

4 years ago

0.26.8-next.1441

4 years ago

0.26.8-next.1435

4 years ago

0.26.8-next.1434

4 years ago

0.26.7-next.1426

4 years ago

0.26.7-next.1428

4 years ago

0.26.7

4 years ago

0.26.7-next.1425

4 years ago

0.26.7-next.1424

4 years ago

0.26.7-next.1421

4 years ago

0.26.7-next.1423

4 years ago

0.26.7-next.1422

4 years ago

0.26.7-next.1420

4 years ago

0.26.7-next.1416

4 years ago

0.26.7-next.1418

4 years ago

0.26.7-next.1417

4 years ago

0.26.7-next.1419

4 years ago

0.26.7-next.1415

4 years ago

0.26.7-next.1414

4 years ago

0.26.7-next.1413

4 years ago

0.26.7-next.1412

4 years ago

0.26.7-next.1411

4 years ago

0.26.7-next.1410

4 years ago

0.26.7-next.1407

4 years ago

0.26.7-next.1409

4 years ago

0.26.7-next.1408

4 years ago

0.26.6-next.1403

4 years ago

0.26.6-next.1404

4 years ago

0.26.6

4 years ago

0.26.7-next.1405

4 years ago

0.26.5-next.1401

4 years ago

0.26.5-next.1402

4 years ago

0.26.5-next.1398

4 years ago

0.26.5-next.1393

4 years ago

0.26.5-next.1395

4 years ago

0.26.5-next.1394

4 years ago

0.26.5-next.1399

4 years ago

0.26.5-next.1392

4 years ago

0.26.5-next.1391

4 years ago

0.26.5-next.1400

4 years ago

0.26.5

4 years ago

0.26.4

4 years ago

0.26.3

4 years ago

0.26.2

5 years ago

0.26.1

5 years ago

0.26.1-next.1351

5 years ago

0.26.0

5 years ago

0.9.0-next.1

5 years ago

0.25.0

5 years ago

0.24.1-next.1335

5 years ago

0.24.0

5 years ago

0.23.1-next.1332

5 years ago

0.23.1-next.1331

5 years ago

0.23.0

5 years ago

0.22.1-next.1327

5 years ago

0.22.0

5 years ago

0.21.1-next.1326

5 years ago

0.21.0

5 years ago

0.20.1-next.1322

5 years ago

0.20.0

5 years ago

0.19.1-next.1312

5 years ago

0.19.1-next.1310

5 years ago

0.19.0

5 years ago

0.18.0

5 years ago

0.17.0

5 years ago

0.16.1-next.1279

5 years ago

0.17.1-next.1280

5 years ago

0.16.1-next.1278

5 years ago

0.15.1-next.1276

5 years ago

0.16.0

5 years ago

0.15.1-next.1272

5 years ago

0.15.0

5 years ago

0.14.1-next.1267

5 years ago

0.14.0

5 years ago

0.13.0

5 years ago

0.12.1-next.1231

5 years ago

0.12.1-next.1230

5 years ago

0.12.0

5 years ago

0.11.1-next.1227

5 years ago

0.11.1-next.1218

5 years ago

0.11.1-next.1217

5 years ago

0.11.0

5 years ago

0.10.1-next.1215

5 years ago

0.10.1-next.1207

5 years ago

0.10.1-next.1206

5 years ago

0.10.0

5 years ago

0.9.1-next.1203

5 years ago

0.9.1-next.1201

5 years ago

0.9.1-next.1202

5 years ago

0.9.0

5 years ago

0.9.1-next.1192

5 years ago

0.8.4-next.1187

5 years ago

0.8.4-next.1186

5 years ago

0.8.4-next.1185

5 years ago

0.8.4-next.1183

5 years ago

0.8.4-next.1182

5 years ago

0.8.4-next.1181

5 years ago

0.8.4-next.1180

5 years ago

0.8.4-next.1176

5 years ago

0.8.4-next.1175

5 years ago

0.8.4-next.1177

5 years ago

0.8.4-next.1174

5 years ago

0.8.4-next.1173

5 years ago

0.8.4-next.1171

5 years ago

0.8.4-next.1165

5 years ago

0.8.4-next.1164

5 years ago

0.8.4-next.1163

5 years ago

0.8.4-next.1161

5 years ago

0.8.3

5 years ago

0.8.3-next.1156

6 years ago

0.8.2

6 years ago

0.8.2-next.1148

6 years ago

0.8.2-next.1147

6 years ago

0.8.2-next.1145

6 years ago

0.8.2-next.1143

6 years ago

0.8.2-next.1142

6 years ago

0.8.2-next.1140

6 years ago

0.8.2-next.1138

6 years ago

0.8.2-next.1134

6 years ago

0.8.2-next.1130

6 years ago

0.8.1

6 years ago

0.8.0

6 years ago

0.7.1

6 years ago

0.7.0

6 years ago

0.6.0

6 years ago

0.5.0

6 years ago

0.4.0

6 years ago

0.3.0

6 years ago

0.2.1-alpha.0

6 years ago

0.2.0

6 years ago

0.1.1-alpha.12

6 years ago

0.1.1-alpha.11

6 years ago

0.1.1-alpha.10

6 years ago

0.1.1-alpha.9

6 years ago

0.1.1-alpha.8

6 years ago

0.1.1-alpha.7

6 years ago

0.1.1-alpha.6

6 years ago

0.1.1-alpha.5

6 years ago

0.1.1-alpha.4

6 years ago

0.1.1-alpha.3

6 years ago

0.1.1-alpha.2

6 years ago

0.1.1-alpha.1

6 years ago

0.1.1-alpha.0

6 years ago