-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add HandleProvider interface and handle support implementation …
…to TxBuilder
- Loading branch information
Showing
22 changed files
with
332 additions
and
26 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './types'; |
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,33 @@ | ||
import { Cardano, Point, Provider } from '../..'; | ||
|
||
export type Handle = string; | ||
|
||
/** | ||
* @param policyId a hex encoded policyID | ||
* @param handle a personalized string to identify a user | ||
* @param hasDatum a boolean to indicated whether it contains a datum | ||
* @param resolvedAddresses the addresses resolved from the handle | ||
* @param resolvedAt the point at which the Handle was resolved | ||
*/ | ||
export interface HandleResolution { | ||
policyId: Cardano.PolicyId; | ||
handle: Handle; | ||
hasDatum: boolean; | ||
resolvedAddresses: { | ||
cardano: Cardano.PaymentAddress; | ||
}; | ||
resolvedAt: Point; | ||
} | ||
|
||
export interface ResolveHandlesArgs { | ||
handles: Handle[]; | ||
} | ||
|
||
/** | ||
* @param handles array | ||
* @returns | ||
* @param HandleResolution or null | ||
*/ | ||
export interface HandleProvider extends Provider { | ||
resolveHandles(args: ResolveHandlesArgs): Promise<Array<HandleResolution | null>>; | ||
} |
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
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.