-
Notifications
You must be signed in to change notification settings - Fork 15
Added address Verification #1
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
base: main
Are you sure you want to change the base?
Changes from 4 commits
cf5561b
8fe3bf5
6173f04
053964d
072ae8f
33303ca
b457038
d209c8c
6e686e6
f78a184
83282d4
19bb462
da1dc9b
8d3f6be
ed9b2a1
271a125
2c9bb35
a619850
f6e276c
2cc72b2
f39848c
daebc6a
3e68824
f613fcc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| /*! | ||
| * The buffer module from node.js, for the browser. | ||
| * | ||
| * @author Feross Aboukhadijeh <https://feross.org> | ||
| * @license MIT | ||
| */ | ||
|
|
||
| /*! https://mths.be/base64 v1.0.0 by @mathias | MIT license */ | ||
|
|
||
| /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */ |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,20 +1,32 @@ | ||
| type Signer = (msg: string) => PromiseLike<string> | ||
| type Signer = (msg: string) => PromiseLike<string>; | ||
|
|
||
| export function sign( | ||
| signer: Signer, | ||
| expires_in?: string | number, | ||
| body?: Object): PromiseLike<string> | ||
| signer: Signer, | ||
| expires_in?: string | number, | ||
| body?: Object | ||
| ): PromiseLike<string>; | ||
|
|
||
| export function verify( | ||
| token: string | ||
| ): { | ||
| address: string, | ||
| body: Object | ||
| } | ||
| export function verify(token: string): { | ||
| address: string; | ||
| body: Object; | ||
| }; | ||
|
|
||
| declare const Web3Token: { | ||
| sign: typeof sign, | ||
| verify: typeof verify | ||
| } | ||
| sign: typeof sign; | ||
| verify: typeof verify; | ||
| }; | ||
|
|
||
| export default Web3Token; | ||
|
|
||
| export default Web3Token | ||
| declare module "web3-cardano-token/dist/browser" { | ||
| export const Web3Token: { | ||
| sign: typeof sign; | ||
| verify: typeof verify; | ||
| }; | ||
| } | ||
| declare module "web3-cardano-token/dist/node" { | ||
| export const Web3Token: { | ||
| sign: typeof sign; | ||
| verify: typeof verify; | ||
| }; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| import { verify } from "./src/lib/verify.js"; | ||
|
|
||
| (async () => { | ||
| const token = | ||
| "eyJzaWduYXR1cmUiOiI4NDU4NjlhMzAxMjcwNDU4MjA2ZjkzODllNDUzNGUxZjUyMzQ2MzBhYTRiYTlkODZkNTQ0MmVlYjQzNmQ3MDY2ODkyZjA2OGViZTYyYmQwNmJmNjc2MTY0NjQ3MjY1NzM3MzU4MzkwMDg5NDAwMDIzZTIyZWNlYTJjYTEyMjgzYmM0YzY1Yjc4NzIzOTA1YmUzMzA2ZDE3MTZlMDM5MWZkNmM3YmJmOTNjMjIwMGRhMTEyNjMzNGZjZGQ0Njk5YzZhMTI3ZjhlZmMzMmM5OTk0NDBhYTVhNzVhMTY2Njg2MTczNjg2NTY0ZjQ1ODQwNTc2NTYyMzMyZDU0NmY2YjY1NmUyZDU2NjU3MjczNjk2ZjZlM2EyMDMxMGE0NTc4NzA2OTcyNjUyZDQ0NjE3NDY1M2EyMDU0Njg3NTJjMjAzMjM1MjA0ZTZmNzYyMDMyMzAzMjMxMjAzMDMzM2EzNTMzM2EzMzM2MjA0NzRkNTQ1ODQwYjI5YTA5NDY0OTY3MDVjMzY2NDQyNjRiODk1NzRhNTRkYjY1MTM0OGJmNzI4M2IwMjFmMmE5MTQxYmFjYzJiOGE2ZjQ4MmQ1OTQxYWE4N2Y5M2IxODk4ZTAxZDQwZTUxYmM5ODAwY2QzYTExY2E1OWQ1ZTYwNzg4ZjdhOGY0MDQiLCJib2R5IjoiV2ViMy1Ub2tlbi1WZXJzaW9uOiAxXG5FeHBpcmUtRGF0ZTogVGh1LCAyNSBOb3YgMjAyMSAwMzo1MzozNiBHTVQifQ=="; | ||
|
|
||
| console.log(await verify(token)); | ||
| })(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is
.jsneeded for import?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No its not needed