This repository has been archived by the owner on Dec 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: export methods and types from tradetrust-tt/tradetrust (#8)
* fix: export functions & types from tradetrust-tt/tradetrust * docs: add methods from tradetrust/tradetrust to README for docs * fix: add docs for wrapping and signing of verifiable documents * fix: remove wrappedV2 and wrappedV3 document methods
- Loading branch information
Showing
7 changed files
with
176 additions
and
6 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export * from './verify' | ||
export * from './utils' | ||
export * from './tradetrust' |
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// Import everything except utils from @tradetrust-tt/tradetrust | ||
import { | ||
type OpenAttestationDocument, | ||
type WrappedDocument, | ||
type SignedWrappedDocument, | ||
v2, | ||
v3, | ||
SchemaId, | ||
SUPPORTED_SIGNING_ALGORITHM, | ||
validateSchema, | ||
obfuscateDocument, | ||
verifySignature, | ||
signDocument, | ||
getData as getDataV2, | ||
isSchemaValidationError, | ||
wrapDocuments as wrapDocumentsV2, | ||
__unsafe__use__it__at__your__own__risks__wrapDocuments as wrapDocumentsV3, | ||
} from '@tradetrust-tt/tradetrust' | ||
|
||
// Re-export everything | ||
export type { WrappedDocument, SignedWrappedDocument } | ||
export { | ||
validateSchema, | ||
OpenAttestationDocument, | ||
obfuscateDocument, | ||
verifySignature, | ||
signDocument, | ||
getDataV2, | ||
isSchemaValidationError, | ||
wrapDocumentsV2, | ||
wrapDocumentsV3, | ||
v2, | ||
v3, | ||
SchemaId, | ||
SUPPORTED_SIGNING_ALGORITHM, | ||
} |
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,7 +1,8 @@ | ||
import * as CONSTANTS from './constants/VerificationErrorMessages' | ||
export * from './fragement' | ||
export * from './analytics' | ||
import * as CONSTANTS from './constants/VerificationErrorMessages' | ||
export * from './constants/supportedChains' | ||
export * from './provider/provider' | ||
export * from './tradetrust' | ||
|
||
export { CONSTANTS } |
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { utils } from '@tradetrust-tt/tradetrust' | ||
import type { DiagnoseError } from '@tradetrust-tt/tradetrust/dist/types/shared/utils' | ||
|
||
const { | ||
isTransferableAsset, | ||
getAssetId, | ||
isWrappedV2Document, | ||
isSignedWrappedV2Document, | ||
isWrappedV3Document, | ||
isSignedWrappedV3Document, | ||
isRawV2Document, | ||
isRawV3Document, | ||
isObfuscated, | ||
getDocumentData, | ||
getIssuerAddress, | ||
diagnose, | ||
} = utils | ||
|
||
export { | ||
isTransferableAsset, | ||
getAssetId, | ||
isWrappedV2Document, | ||
isSignedWrappedV2Document, | ||
isWrappedV3Document, | ||
isSignedWrappedV3Document, | ||
isRawV2Document, | ||
isRawV3Document, | ||
isObfuscated, | ||
getDocumentData, | ||
getIssuerAddress, | ||
diagnose, | ||
} | ||
|
||
export type { DiagnoseError } |