Skip to content
Draft
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
5c5c573
feature/CM-1099 Add prototype basic nav for liveArt
markhoangcll Aug 28, 2025
a64af31
feature/CM-1099 Update package json
markhoangcll Aug 28, 2025
ba0ef5c
feature/CM-1099 Fix the tests and add extra validations on the payloa…
markhoangcll Sep 4, 2025
e4bb691
CM-1099 Make changes according to some suggestions made in PR review
markhoangcll Sep 23, 2025
372f03f
CM-1099 Add more changes after PR review
markhoangcll Sep 29, 2025
05d634b
CM-1099 Add missing changes to address the PR comments
markhoangcll Sep 30, 2025
2cc1535
CM-1099 remove unnecessary config type, add error message in api resp…
markhoangcll Sep 30, 2025
4ad49a9
CM-1099 Fix param type for prepare and parse transport functions
markhoangcll Sep 30, 2025
7e6998c
Merge branch 'main' of github.com:smartcontractkit/external-adapters-…
markhoangcll Sep 30, 2025
a775786
CM-1120 add missing fields in the package root tsconfigs, restore for…
markhoangcll Oct 1, 2025
3406afd
CM-1099 restore ftse formatted files
markhoangcll Oct 1, 2025
41a1c4c
Merge branch 'main' into feature/CM-1099_liveart_ea_nav
markhoangcll Oct 2, 2025
ff5e8bf
Update .changeset/thirty-ducks-wait.md
mmcallister-cll Oct 3, 2025
e2c52cb
Update packages/sources/liveart/src/index.ts
mmcallister-cll Oct 3, 2025
2fae932
CM-1099 Change endpoint and transport definition to match the Jira sp…
markhoangcll Oct 21, 2025
3233279
Merge branch 'feature/CM-1099_liveart_ea_nav' of github.com:smartcont…
markhoangcll Oct 21, 2025
45dd724
Merge branch 'main' of github.com:smartcontractkit/external-adapters-…
markhoangcll Oct 21, 2025
d1d79e1
CM-1099 Restore accidental changes
markhoangcll Oct 21, 2025
a9a3faf
CM-1099 Restore accidental changes for this covid-tracker
markhoangcll Oct 21, 2025
731f1d7
CM-1099 Remove unneeded imports
markhoangcll Oct 21, 2025
90b6795
CM-1099 Add tests WIP
markhoangcll Oct 22, 2025
26d82b9
CM-1099 Update adapter to return nav_per_share value
markhoangcll Oct 29, 2025
b38beb2
CM-1099 Update package.json
markhoangcll Oct 29, 2025
415ee4e
CM-1099 Update hooks in tests
markhoangcll Oct 30, 2025
7e18493
Update .changeset/thirty-ducks-wait.md
mmcallister-cll Oct 31, 2025
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
5 changes: 5 additions & 0 deletions .changeset/thirty-ducks-wait.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@chainlink/liveart-external-adapter': major
---

Create EA NAV for LiveArt
147 changes: 147 additions & 0 deletions .pnp.cjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
35 changes: 35 additions & 0 deletions packages/sources/liveart/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"name": "@chainlink/liveart-external-adapter",
"version": "1.0.0",
"description": "LiveArt NAV external adapter for Chainlink",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"files": [
"dist"
],
"repository": {
"url": "https://github.com/smartcontractkit/external-adapters-js",
"type": "git"
},
"license": "MIT",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"clean": "rm -rf dist && rm -f tsconfig.tsbuildinfo",
"prepack": "yarn build",
"build": "tsc -b",
"server": "node -e 'require(\"./src/index.ts\").server()'",
"server:dist": "node -e 'require(\"./dist/index.js\").server()'",
"start": "yarn server:dist"
},
"devDependencies": {
"@types/jest": "^29.5.14",
"@types/node": "22.14.1",
"nock": "13.5.6",
"typescript": "5.8.3"
},
"dependencies": {
"@chainlink/external-adapter-framework": "2.7.0",
"axios": "^1.11.0",
"tslib": "2.4.1"
}
}
21 changes: 21 additions & 0 deletions packages/sources/liveart/src/config/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { AdapterConfig } from '@chainlink/external-adapter-framework/config'

export type Config = {
API_BASE_URL: string
BEARER_TOKEN: string
}

export const config: AdapterConfig = new AdapterConfig({
API_BASE_URL: {
description: 'The API URL for the LiveArt data provider',
type: 'string',
required: true,
default: 'https://artwork-price-oracle-api-dev-ms.liveart.ai',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is their prod API?

},
BEARER_TOKEN: {
description: 'The Bearer token for authentication',
type: 'string',
required: true,
sensitive: true,
},
})
26 changes: 26 additions & 0 deletions packages/sources/liveart/src/endpoint/nav.ts
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

consider calling this endpoint nav (update both the filename and the name field in the AdapterEndpoint) to be in line with other nav EAs.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but its not a nav? ticket says to return all the data from the endpoint?

Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { AdapterEndpoint } from '@chainlink/external-adapter-framework/adapter'
import { InputParameters } from '@chainlink/external-adapter-framework/validation'

import { httpTransport } from '../transport/transport'

export const inputParameters = new InputParameters(
{
artwork_id: {
aliases: ['artworkId'],
required: true,
type: 'string',
description: 'The ID of the artwork to fetch',
},
},
[
{
artwork_id: 'banksy',
},
],
)

export const nav = new AdapterEndpoint({
name: 'nav',
transport: httpTransport,
inputParameters,
})
14 changes: 14 additions & 0 deletions packages/sources/liveart/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { expose, ServerInstance } from '@chainlink/external-adapter-framework'
import { Adapter } from '@chainlink/external-adapter-framework/adapter'

import { config } from './config/config'
import { nav } from './endpoint/nav'

export const adapter = new Adapter({
defaultEndpoint: nav.name,
name: 'LIVE_ART_NAV',
config,
endpoints: [nav],
})

export const server = (): Promise<ServerInstance | undefined> => expose(adapter)
5 changes: 5 additions & 0 deletions packages/sources/liveart/src/test-payload.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"requests": [{
"artwork_id": "banksy"
}]
}
Loading
Loading