-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
eab65ce
commit 036d15c
Showing
2 changed files
with
13 additions
and
0 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
...ol/packages/boundwitness/packages/validator/src/lib/addresses/addressesContainsAddress.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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import type { Address } from '@xylabs/hex' | ||
import type { BoundWitness } from '@xyo-network/boundwitness-model' | ||
|
||
/** | ||
* Checks if the boundwitness contains the addresses | ||
* @param bw The boundwitness to check | ||
* @param addresses The address to check for | ||
* @returns True if the boundwitness contains the addresses | ||
*/ | ||
export const addressesContainsAddress = (bw: BoundWitness, address: Address): boolean => { | ||
return bw.addresses?.includes(address) | ||
} |
1 change: 1 addition & 0 deletions
1
packages/protocol/packages/boundwitness/packages/validator/src/lib/addresses/index.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,2 +1,3 @@ | ||
export * from './addressesContainsAddress.ts' | ||
export * from './addressesContainsAll.ts' | ||
export * from './addressesContainsAny.ts' |