-
Notifications
You must be signed in to change notification settings - Fork 253
Historical JS endpoints #2285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Historical JS endpoints #2285
Changes from all commits
2670a8d
131d002
51af321
36691fb
2367916
ef2a32a
7e81b60
3128aac
182b63d
c0a6703
d6a60be
a770975
b24dfc3
c9cd761
68add2f
472e457
1a02063
ee9e9a2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,8 +28,10 @@ if("sgx" IN_LIST COMPILE_TARGETS) | |
| quickjs.enclave STATIC ${QUICKJS_SRC} ${CCF_DIR}/3rdparty/stub/time.c | ||
| ) | ||
| target_compile_options( | ||
| quickjs.enclave PUBLIC -nostdinc -DCONFIG_VERSION="${QUICKJS_VERSION}" | ||
| -DEMSCRIPTEN -DCONFIG_STACK_CHECK | ||
| quickjs.enclave | ||
| PUBLIC -nostdinc -DCONFIG_VERSION="${QUICKJS_VERSION}" -DEMSCRIPTEN | ||
| -DCONFIG_STACK_CHECK | ||
| PRIVATE $<$<CONFIG:Debug>:-DDUMP_LEAKS> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just to check, this is saying "when building this target in Debug, set DUMP_LEAKS", right?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah |
||
| ) | ||
| target_link_libraries(quickjs.enclave PUBLIC ${OE_TARGET_LIBC}) | ||
| set_property(TARGET quickjs.enclave PROPERTY POSITION_INDEPENDENT_CODE ON) | ||
|
|
@@ -40,7 +42,9 @@ endif() | |
|
|
||
| add_library(quickjs.host STATIC ${QUICKJS_SRC}) | ||
| target_compile_options( | ||
| quickjs.host PUBLIC -DCONFIG_VERSION="${QUICKJS_VERSION}" | ||
| quickjs.host | ||
| PUBLIC -DCONFIG_VERSION="${QUICKJS_VERSION}" | ||
| PRIVATE $<$<CONFIG:Debug>:-DDUMP_LEAKS> | ||
| ) | ||
| add_san(quickjs.host) | ||
| set_property(TARGET quickjs.host PROPERTY POSITION_INDEPENDENT_CODE ON) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -48,6 +48,26 @@ export interface KVMap { | |
|
|
||
| export type KVMaps = { [key: string]: KVMap }; | ||
|
|
||
| export interface ProofElement { | ||
| left?: string; | ||
| right?: string; | ||
| } | ||
|
|
||
| export type Proof = ProofElement[]; | ||
|
|
||
| export interface Receipt { | ||
| signature: string; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could we add a jsdoc comments like /** base64-encoded signature of the root by the node identified by nodeId */, and if we did, would it get picked up by sphinx-js? Just wondering, not requesting :)
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes and yes, see the CryptoKeyPair interface in #2313 |
||
| root: string; | ||
| proof: Proof; | ||
| leaf: string; | ||
| nodeId: string; | ||
| } | ||
|
|
||
| export interface HistoricalState { | ||
| transactionId: string; | ||
| receipt: Receipt; | ||
| } | ||
|
|
||
| interface WrapAlgoParams { | ||
| name: string; | ||
| } | ||
|
|
@@ -61,6 +81,11 @@ export interface AESKWPParams extends WrapAlgoParams { | |
| name: "AES-KWP"; | ||
| } | ||
|
|
||
| export interface RsaOaepAESKWPParams extends WrapAlgoParams { | ||
|
letmaik marked this conversation as resolved.
|
||
| name: "RSA-OAEP-AES-KWP"; | ||
| label?: ArrayBuffer; | ||
| } | ||
|
|
||
| export interface CryptoKeyPair { | ||
| privateKey: string; | ||
| publicKey: string; | ||
|
|
@@ -80,6 +105,7 @@ export interface CCF { | |
| ): ArrayBuffer; | ||
|
|
||
| kv: KVMaps; | ||
| historicalState?: HistoricalState; | ||
| } | ||
|
|
||
| export const ccf = globalThis.ccf as CCF; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.