-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* upgrade wasm * verify rootHash * add comment * digest verify * did verify * vp and vc verify
- Loading branch information
1 parent
65b5ecf
commit 3a26993
Showing
47 changed files
with
2,544 additions
and
1,292 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,22 @@ | ||
// Copyright 2021-2022 zcloak authors & contributors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
import { base32Decode, isBase32 } from './bs32'; | ||
import { base58Decode, isBase58 } from './bs58'; | ||
import { base64Decode, isBase64 } from './bs64'; | ||
|
||
export * from './bs32'; | ||
export * from './bs58'; | ||
export * from './bs64'; | ||
|
||
export function decodeMultibase(multibase: string): Uint8Array { | ||
if (isBase58(multibase)) { | ||
return base58Decode(multibase); | ||
} else if (isBase32(multibase)) { | ||
return base32Decode(multibase); | ||
} else if (isBase64(multibase)) { | ||
return base64Decode(multibase); | ||
} else { | ||
throw new Error(`Decode ${multibase} error, only support base58, base32, base64`); | ||
} | ||
} |
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 was deleted.
Oops, something went wrong.
4 changes: 2 additions & 2 deletions
4
packages/did/src/defaults.ts → packages/did-resolver/src/defaults.ts
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,7 @@ | ||
// Copyright 2021-2022 zcloak authors & contributors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
import { ArweaveDidResolver } from '@zcloak/did-resolver'; | ||
import { DidResolver } from '@zcloak/did-resolver/DidResolver'; | ||
import { DidResolver } from './DidResolver'; | ||
import { ArweaveDidResolver } from '.'; | ||
|
||
export const defaultResolver: DidResolver = new ArweaveDidResolver(); |
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
Oops, something went wrong.