2021-04-12 04:15:02 -06:00
|
|
|
/*
|
|
|
|
Copyright 2021 Yarmo Mackenbach
|
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
*/
|
2021-04-12 09:01:25 -06:00
|
|
|
const ProxyPolicy = {
|
|
|
|
ADAPTIVE: 'adaptive',
|
|
|
|
ALWAYS: 'always',
|
2021-04-15 02:21:56 -06:00
|
|
|
NEVER: 'never',
|
2021-04-12 09:01:25 -06:00
|
|
|
}
|
|
|
|
Object.freeze(ProxyPolicy)
|
|
|
|
|
2021-04-12 07:59:21 -06:00
|
|
|
const Fetcher = {
|
|
|
|
HTTP: 'http',
|
|
|
|
DNS: 'dns',
|
|
|
|
IRC: 'irc',
|
|
|
|
XMPP: 'xmpp',
|
|
|
|
MATRIX: 'matrix',
|
|
|
|
GITLAB: 'gitlab',
|
|
|
|
TWITTER: 'twitter',
|
|
|
|
}
|
|
|
|
Object.freeze(Fetcher)
|
|
|
|
|
|
|
|
const ProofAccess = {
|
2021-04-12 04:15:02 -06:00
|
|
|
GENERIC: 0,
|
|
|
|
NOCORS: 1,
|
|
|
|
GRANTED: 2,
|
2021-04-12 07:59:21 -06:00
|
|
|
SERVER: 3,
|
2021-04-12 04:15:02 -06:00
|
|
|
}
|
2021-04-12 07:59:21 -06:00
|
|
|
Object.freeze(ProofAccess)
|
2021-04-12 04:15:02 -06:00
|
|
|
|
2021-04-12 07:59:21 -06:00
|
|
|
const ProofFormat = {
|
2021-04-16 02:54:28 -06:00
|
|
|
JSON: 'json',
|
|
|
|
TEXT: 'text',
|
2021-04-12 04:15:02 -06:00
|
|
|
}
|
2021-04-12 07:59:21 -06:00
|
|
|
Object.freeze(ProofFormat)
|
2021-04-12 04:15:02 -06:00
|
|
|
|
2021-04-12 07:59:21 -06:00
|
|
|
const ClaimFormat = {
|
2021-04-12 06:31:48 -06:00
|
|
|
URI: 0,
|
|
|
|
FINGERPRINT: 1,
|
|
|
|
MESSAGE: 2,
|
|
|
|
}
|
2021-04-12 07:59:21 -06:00
|
|
|
Object.freeze(ClaimFormat)
|
2021-04-12 06:31:48 -06:00
|
|
|
|
2021-04-12 07:59:21 -06:00
|
|
|
const ClaimRelation = {
|
2021-04-12 06:31:48 -06:00
|
|
|
CONTAINS: 0,
|
|
|
|
EQUALS: 1,
|
|
|
|
ONEOF: 2,
|
|
|
|
}
|
2021-04-12 07:59:21 -06:00
|
|
|
Object.freeze(ClaimRelation)
|
2021-04-12 06:31:48 -06:00
|
|
|
|
2021-04-15 02:21:56 -06:00
|
|
|
const VerificationStatus = {
|
|
|
|
INIT: 0,
|
|
|
|
INPROGRESS: 1,
|
|
|
|
FAILED: 2,
|
|
|
|
COMPLETED: 3
|
|
|
|
}
|
|
|
|
Object.freeze(VerificationStatus)
|
|
|
|
|
2021-04-12 09:01:25 -06:00
|
|
|
exports.ProxyPolicy = ProxyPolicy
|
2021-04-12 07:59:21 -06:00
|
|
|
exports.Fetcher = Fetcher
|
|
|
|
exports.ProofAccess = ProofAccess
|
|
|
|
exports.ProofFormat = ProofFormat
|
|
|
|
exports.ClaimFormat = ClaimFormat
|
2021-04-15 02:21:56 -06:00
|
|
|
exports.ClaimRelation = ClaimRelation
|
|
|
|
exports.VerificationStatus = ClaimRelation
|