Should a request be called chainlink?
- I think it fits the name of the library, but it will be confusing for new users - wtf is a chainlink
- NO
Should I use react or finally learn Svelte?
- I am deeply familiar with React
- It would be cool to use something else
- I believe more oos contributors knows react than svelte
- React
Default folder structure (Can be customized through chainlink.config.ts
)
project-root
├── chainlink.config.ts
└── chainlink
├── requests
│ └── request1.ts
└── chains
└── chain1.ts
Chainlink will expose a defineRequest
function that gives developers the ability to create typesafe request definitions
There are 3 main parts
Functions for using Chainlink:
- Running requests
- Getting config file ...
These are defined outside of the node server and the cli so they can be used in both
This will run a next application with node. The backend functions from @chainlink/core will be used in the nextjs api
Does 2 things:
- Starting the next application
- BACKLOG CLI for running requests and chains
How a request def should go from fs to frontend
url: text - Should be the value of the Stringliteral/TemplateLiteral get --||-- queryParams: QueryParam[]
How I edit values from frontend
// Map of valid origins url: StringLiteral | TemplateLiteral
queryParams: ObjectExpression
setRequestProperty("url", string) - converts to StringLiteral | TemplateLiteral ASTNode and replaces the node based on if it has ${} in the string
setRequestProperty("queryParams", jsonObject) - will convert the jsonObject to ASTNodes and sets the node regardless of if the ASTNodes are "valid"