-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Local store from cached file (#3413)
* Assertion in local store read from file * local store read from cached file * version bump * Increase default maximumAssertionSizeInKb to 500 MB * Increase MAX_FILE_SIZE * update assertion-tool version
- Loading branch information
1 parent
e1bab57
commit cf0a035
Showing
5 changed files
with
87 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
109 changes: 71 additions & 38 deletions
109
src/controllers/http-api/v0/request-schema/local-store-schema-v0.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,82 @@ | ||
import { LOCAL_STORE_TYPES } from '../../../../constants/constants.js'; | ||
|
||
export default (argumentsObject) => ({ | ||
type: 'array', | ||
type: ['object', 'array'], | ||
items: { | ||
type: 'object', | ||
required: ['assertionId', 'assertion'], | ||
properties: { | ||
assertionId: { | ||
type: 'string', | ||
minLength: 66, | ||
maxLength: 66, | ||
}, | ||
assertion: { | ||
type: 'array', | ||
items: { | ||
type: 'string', | ||
oneOf: [ | ||
{ | ||
type: 'object', | ||
required: ['assertionId', 'assertion'], | ||
properties: { | ||
assertionId: { | ||
type: 'string', | ||
minLength: 66, | ||
maxLength: 66, | ||
}, | ||
assertion: { | ||
type: 'array', | ||
items: { | ||
type: 'string', | ||
}, | ||
minItems: 1, | ||
}, | ||
blockchain: { | ||
enum: argumentsObject.blockchainImplementationNames, | ||
}, | ||
contract: { | ||
type: 'string', | ||
minLength: 42, | ||
maxLength: 42, | ||
}, | ||
tokenId: { | ||
type: 'number', | ||
minimum: 0, | ||
}, | ||
storeType: { | ||
enum: [ | ||
LOCAL_STORE_TYPES.TRIPLE, | ||
LOCAL_STORE_TYPES.TRIPLE_PARANET, | ||
LOCAL_STORE_TYPES.PENDING, | ||
], | ||
}, | ||
paranetUAL: { | ||
type: 'string', | ||
}, | ||
}, | ||
minItems: 1, | ||
maxItems: 2, | ||
}, | ||
blockchain: { | ||
enum: argumentsObject.blockchainImplementationNames, | ||
}, | ||
contract: { | ||
type: 'string', | ||
minLength: 42, | ||
maxLength: 42, | ||
}, | ||
tokenId: { | ||
type: 'number', | ||
minimum: 0, | ||
}, | ||
storeType: { | ||
type: { | ||
enum: [ | ||
LOCAL_STORE_TYPES.TRIPLE, | ||
LOCAL_STORE_TYPES.TRIPLE_PARANET, | ||
LOCAL_STORE_TYPES.PENDING, | ||
], | ||
{ | ||
type: 'object', | ||
required: ['filePath'], | ||
properties: { | ||
filePath: { | ||
type: 'string', | ||
}, | ||
paranetUAL: { | ||
type: 'string', | ||
}, | ||
blockchain: { | ||
enum: argumentsObject.blockchainImplementationNames, | ||
}, | ||
contract: { | ||
type: 'string', | ||
minLength: 42, | ||
maxLength: 42, | ||
}, | ||
tokenId: { | ||
type: 'number', | ||
minimum: 0, | ||
}, | ||
storeType: { | ||
enum: [ | ||
LOCAL_STORE_TYPES.TRIPLE, | ||
LOCAL_STORE_TYPES.TRIPLE_PARANET, | ||
LOCAL_STORE_TYPES.PENDING, | ||
], | ||
}, | ||
}, | ||
}, | ||
paranetUAL: { | ||
type: 'string', | ||
}, | ||
}, | ||
], | ||
}, | ||
minItems: 1, | ||
maxItems: 2, | ||
}); |