Skip to content
This repository was archived by the owner on Mar 8, 2024. It is now read-only.

Commit 8e663ff

Browse files
Austin King0xCLARITY
andauthored
add verified address interface [2/x] (#621)
* feat: extend account table with identity_key and address table with identity_key_signature * feat: extend TS types to reflect new DB schemas * fix: tabs, not spaces * fix: tabs, not spaces, again * fix: remove varchar limits for identity_key and identity_key_signature * feat: add VerifiedAddress type into types directory * Update src/types/verifiedAddress.ts Co-authored-by: Hans Bergren <[email protected]> * Update src/types/verifiedAddress.ts Co-authored-by: Hans Bergren <[email protected]> * Update src/types/verifiedAddress.ts Co-authored-by: Hans Bergren <[email protected]> * fix: remove field because it is being moved inside protected field * fix: duplicate field & improved comment * fix: disable linter for json import * fix: remove lint disable Co-authored-by: Hans Bergren <[email protected]>
1 parent a1f9fc6 commit 8e663ff

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

src/types/publicAPI.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export interface PaymentInformation {
3535
/**
3636
* Address information included inside of a PaymentInformation object.
3737
*/
38-
interface Address {
38+
export interface Address {
3939
readonly paymentNetwork: string
4040
readonly environment?: string
4141
readonly addressDetailsType: AddressDetailsType

src/types/verifiedAddress.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { Address } from './publicAPI'
2+
3+
/**
4+
* Object containing address information alongside signatures.
5+
*/
6+
// eslint-disable-next-line import/no-unused-modules -- will disable in next PR
7+
export interface VerifiedAddress {
8+
readonly payload: VerifiedAddressPayload
9+
readonly signatures: readonly VerifiedAddressSignature[]
10+
}
11+
12+
interface VerifiedAddressPayload {
13+
payId: string
14+
payIdAddress: Address
15+
}
16+
17+
/**
18+
* JWS object for verification.
19+
*/
20+
interface VerifiedAddressSignature {
21+
protected: string
22+
signature: string
23+
}

0 commit comments

Comments
 (0)