-
Notifications
You must be signed in to change notification settings - Fork 3
chore: remove references to any in src/keri/core directory #12
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?
Conversation
647c35e to
03cad8d
Compare
67cc8d0 to
50384d4
Compare
7ffb639 to
65186c9
Compare
65186c9 to
65af0ee
Compare
7656c87 to
e3b0194
Compare
eac99c5 to
8849d57
Compare
d1eac26 to
6765c05
Compare
src/keri/core/eventing.ts
Outdated
| ) & | ||
| Record<string, unknown> & | ||
| BaseSAD; | ||
| export type InteractEventData = components['schemas']['Seal']; |
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.
As mentioned during the previous review rounds - this is actually a SealSourceTriple based on where it's used.
Interaction events can anchor any type of data, and a SealSourceTriple is a common one.
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.
@Sotatek-DukeVu Please use this:
export type SealSourceTriple = components['schemas']['Seal']; for anywhere where we use i,s,d triples, such as for approving delegations.
The generic case for interaction events can use Record<string, unknown> inline.
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.
You might need to merge main into this branch as it looks like we have changes from one of Patrick's PRs.
src/keri/core/saider.ts
Outdated
| if (code == undefined) { | ||
| if (sad[label] != '') { | ||
| super({ qb64: sad[label], code: code }); | ||
| super({ qb64: String(sad[label]), code: code }); |
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.
Not changed
| import libsodium from 'libsodium-wrappers-sumo'; | ||
| import { Tier } from '../../types/keria-api-schema.ts'; | ||
|
|
||
| export { Tier } from '../../types/keria-api-schema.ts'; |
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.
You reverted this, but we are still importing from keria-api-schema in the integration tests. Can you update the exports to make sure it's not exported to the external facing API of the library?
src/keri/core/eventing.ts
Outdated
| route: string = '', | ||
| data: any | undefined, | ||
| route: '/end/role/add', | ||
| data: EndRoleAddAttributes | undefined, |
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.
We still have as EndRoleAddAttributes in here.
src/keri/core/eventing.ts
Outdated
|
|
||
| export type DelegateInceptEventSAD = | ||
| | components['schemas']['DIP_V_1'] | ||
| | components['schemas']['DIP_V_1']; |
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.
v_2
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.
Done
src/keri/app/controller.ts
Outdated
| pre: this.pre, | ||
| keys: this.keys, | ||
| dig: this.serder.sad['d'], | ||
| dig: this.serder.sad['d'] as string, |
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.
Same here, not needed
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.
Done
| pre: this.serder.pre, | ||
| dig: this.serder.sad['d'], | ||
| pre: this.serder.pre as string, | ||
| dig: this.serder.sad['d'] as string, |
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.
Can you leave a TODO that these casts can be removed once SerderKERI and SerderACDC introduced?
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.
Done
src/keri/core/serder.ts
Outdated
| private _kind: Serials; | ||
| private _raw: string = ''; | ||
| private _sad: Dict<any> = {}; | ||
| private _sad: T; |
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.
This snippet is from saider.ts, not serder.ts, so it shouldn't reference SerderSAD.
| this.client.pidx | ||
| ); | ||
| break; | ||
| } |
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.
Let me think about this one. I'm not a fan of how this function is handled in general. We can tackle it at the end.
| s?: string | number; | ||
| } | ||
| d?: string; | ||
| i?: string; |
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.
Hmm, does i and d need to be optional? If so, maybe we should think about SerderKERI and SerderACDC for now. (But don't until I confirm tomorrow)
Remove references to any in src/keri/core directory
Issue: WebOfTrust#340