Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Business Source License 1.1
Business Source License 1.1 (BUSL-1.1)

License text copyright (c) 2017 MariaDB Corporation Ab, All Rights Reserved.
"Business Source License" is a trademark of MariaDB Corporation Ab.

-----------------------------------------------------------------------------
---

Parameters

Expand All @@ -17,7 +17,7 @@ Change Date: May 20, 2029

Change License: MIT

-----------------------------------------------------------------------------
---

Terms

Expand All @@ -37,18 +37,18 @@ This License does not grant you any right in any trademark or logo of Licensor o

TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON AN "AS IS" BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND TITLE.

MariaDB hereby grants you permission to use this Licenses text to license your works, and to refer to it using the trademark "Business Source License", as long as you comply with the Covenants of Licensor below.
MariaDB hereby grants you permission to use this License's text to license your works, and to refer to it using the trademark "Business Source License", as long as you comply with the Covenants of Licensor below.

-----------------------------------------------------------------------------
---

Covenants of Licensor

In consideration of the right to use this Licenses text and the "Business Source License" name and trademark, Licensor covenants to MariaDB, and to all other recipients of the licensed work to be provided by Licensor:
In consideration of the right to use this License's text and the "Business Source License" name and trademark, Licensor covenants to MariaDB, and to all other recipients of the licensed work to be provided by Licensor:

1. To specify as the Change License the GPL Version 2.0 or any later version, or a license that is compatible with GPL Version 2.0 or a later version, where "compatible" means that software provided under the Change License can be included in a program with software provided under GPL Version 2.0 or a later version. Licensor may specify additional Change Licenses without limitation.

2. To either: (a) specify an additional grant of rights to use that does not impose any additional restriction on the right granted in this License, as the Additional Use Grant; or (b) insert the text "None".

3. To specify a Change Date.

4. Not to modify this License in any other way.
4. Not to modify this License in any other way.
4 changes: 2 additions & 2 deletions packages/cre-sdk-examples/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "@chainlink/cre-sdk-examples",
"private": true,
"version": "0.0.2-alpha",
"version": "0.0.3-alpha",
"type": "module",
"author": "Ernest Nowacki",
"license": "MIT",
"license": "BUSL-1.1",
"description": "Demo app with example workflows utilizing CRE TypeScript SDK. It presents usage of CRE SDK and allows SDK developers to test workflows.",
"scripts": {
"check": "biome check --write ${BIOME_PATHS:-.}",
Expand Down
10 changes: 0 additions & 10 deletions packages/cre-sdk-examples/src/workflows/README.md

This file was deleted.

14 changes: 7 additions & 7 deletions packages/cre-sdk-javy-plugin/LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Business Source License 1.1
Business Source License 1.1 (BUSL-1.1)

License text copyright (c) 2017 MariaDB Corporation Ab, All Rights Reserved.
"Business Source License" is a trademark of MariaDB Corporation Ab.

-----------------------------------------------------------------------------
---

Parameters

Expand All @@ -17,7 +17,7 @@ Change Date: May 20, 2029

Change License: MIT

-----------------------------------------------------------------------------
---

Terms

Expand All @@ -37,18 +37,18 @@ This License does not grant you any right in any trademark or logo of Licensor o

TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON AN "AS IS" BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND TITLE.

MariaDB hereby grants you permission to use this Licenses text to license your works, and to refer to it using the trademark "Business Source License", as long as you comply with the Covenants of Licensor below.
MariaDB hereby grants you permission to use this License's text to license your works, and to refer to it using the trademark "Business Source License", as long as you comply with the Covenants of Licensor below.

-----------------------------------------------------------------------------
---

Covenants of Licensor

In consideration of the right to use this Licenses text and the "Business Source License" name and trademark, Licensor covenants to MariaDB, and to all other recipients of the licensed work to be provided by Licensor:
In consideration of the right to use this License's text and the "Business Source License" name and trademark, Licensor covenants to MariaDB, and to all other recipients of the licensed work to be provided by Licensor:

1. To specify as the Change License the GPL Version 2.0 or any later version, or a license that is compatible with GPL Version 2.0 or a later version, where "compatible" means that software provided under the Change License can be included in a program with software provided under GPL Version 2.0 or a later version. Licensor may specify additional Change Licenses without limitation.

2. To either: (a) specify an additional grant of rights to use that does not impose any additional restriction on the right granted in this License, as the Additional Use Grant; or (b) insert the text "None".

3. To specify a Change Date.

4. Not to modify this License in any other way.
4. Not to modify this License in any other way.
4 changes: 2 additions & 2 deletions packages/cre-sdk-javy-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@chainlink/cre-sdk-javy-plugin",
"version": "0.0.2-alpha",
"version": "0.0.3-alpha",
"type": "module",
"bin": {
"cre-setup": "bin/setup.ts",
Expand All @@ -18,7 +18,7 @@
},
"keywords": [],
"author": "SmartContract Chainlink Limited SEZC",
"license": "SEE LICENSE IN LICENSE.md",
"license": "BUSL-1.1",
"description": "Chainlink CRE SDK Javy Plugin.",
"files": [
"bin/",
Expand Down
14 changes: 7 additions & 7 deletions packages/cre-sdk/LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Business Source License 1.1
Business Source License 1.1 (BUSL-1.1)

License text copyright (c) 2017 MariaDB Corporation Ab, All Rights Reserved.
"Business Source License" is a trademark of MariaDB Corporation Ab.

-----------------------------------------------------------------------------
---

Parameters

Expand All @@ -17,7 +17,7 @@ Change Date: May 20, 2029

Change License: MIT

-----------------------------------------------------------------------------
---

Terms

Expand All @@ -37,18 +37,18 @@ This License does not grant you any right in any trademark or logo of Licensor o

TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON AN "AS IS" BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND TITLE.

MariaDB hereby grants you permission to use this Licenses text to license your works, and to refer to it using the trademark "Business Source License", as long as you comply with the Covenants of Licensor below.
MariaDB hereby grants you permission to use this License's text to license your works, and to refer to it using the trademark "Business Source License", as long as you comply with the Covenants of Licensor below.

-----------------------------------------------------------------------------
---

Covenants of Licensor

In consideration of the right to use this Licenses text and the "Business Source License" name and trademark, Licensor covenants to MariaDB, and to all other recipients of the licensed work to be provided by Licensor:
In consideration of the right to use this License's text and the "Business Source License" name and trademark, Licensor covenants to MariaDB, and to all other recipients of the licensed work to be provided by Licensor:

1. To specify as the Change License the GPL Version 2.0 or any later version, or a license that is compatible with GPL Version 2.0 or a later version, where "compatible" means that software provided under the Change License can be included in a program with software provided under GPL Version 2.0 or a later version. Licensor may specify additional Change Licenses without limitation.

2. To either: (a) specify an additional grant of rights to use that does not impose any additional restriction on the right granted in this License, as the Additional Use Grant; or (b) insert the text "None".

3. To specify a Change Date.

4. Not to modify this License in any other way.
4. Not to modify this License in any other way.
23 changes: 13 additions & 10 deletions packages/cre-sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,22 +91,26 @@ Fetch data from external APIs with built-in consensus mechanisms:
import {
cre,
consensusMedianAggregation,
type NodeRuntime,
type HTTPSendRequester,
type Runtime,
} from "@chainlink/cre-sdk";

type Config = { apiUrl: string };

const fetchData = async (nodeRuntime: NodeRuntime<Config>) => {
const http = new cre.capabilities.HTTPClient();
const response = http
.sendRequest(nodeRuntime, { url: nodeRuntime.config.apiUrl })
.result();
const fetchData = (sendRequester: HTTPSendRequester, config: Config) => {
const response = sendRequester.sendRequest({ url: config.apiUrl }).result();
return Number.parseFloat(Buffer.from(response.body).toString("utf-8").trim());
};

const onCronTrigger = async (runtime: Runtime<Config>) => {
return await runtime.runInNodeMode(fetchData, consensusMedianAggregation())();
const onCronTrigger = (runtime: Runtime<Config>) => {
const httpCapability = new cre.capabilities.HTTPClient();
return httpCapability
.sendRequest(
runtime,
fetchData,
consensusMedianAggregation()
)(runtime.config)
.result();
};
```

Expand Down Expand Up @@ -295,8 +299,7 @@ See the [on-chain example](https://github.com/smartcontractkit/cre-sdk-typescrip
### Capabilities

- `cre.capabilities.CronCapability`: Schedule-based triggers
- `cre.capabilities.HTTPCapability`: HTTP request handling
- `cre.capabilities.HTTPClient`: HTTP client for requests
- `cre.capabilities.HTTPClient`: HTTP client for requests with consensus support
- `cre.capabilities.EVMClient`: EVM blockchain interactions

### Utilities
Expand Down
4 changes: 2 additions & 2 deletions packages/cre-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@chainlink/cre-sdk",
"version": "0.0.2-alpha",
"version": "0.0.3-alpha",
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down Expand Up @@ -64,7 +64,7 @@
"access": "public"
},
"author": "SmartContract Chainlink Limited SEZC",
"license": "SEE LICENSE IN LICENSE.md",
"license": "BUSL-1.1",
"engines": {
"bun": ">=1.2.21"
}
Expand Down