-
Notifications
You must be signed in to change notification settings - Fork 1
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
Showing
1 changed file
with
36 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
(interface fungible-xchain-v1 | ||
|
||
" This interface offers a standard capability for cross-chain \ | ||
\ transfers and associated events. " | ||
|
||
(defcap TRANSFER_XCHAIN:bool | ||
( sender:string | ||
receiver:string | ||
amount:decimal | ||
target-chain:string | ||
) | ||
@doc " Managed capability sealing AMOUNT for transfer \ | ||
\ from SENDER to RECEIVER on TARGET-CHAIN. Permits \ | ||
\ any number of cross-chain transfers up to AMOUNT." | ||
|
||
@managed amount TRANSFER_XCHAIN-mgr | ||
) | ||
|
||
(defun TRANSFER_XCHAIN-mgr:decimal | ||
( managed:decimal | ||
requested:decimal | ||
) | ||
@doc " Allows TRANSFER-XCHAIN AMOUNT to be less than or \ | ||
\ equal managed quantity as a one-shot, returning 0.0." | ||
) | ||
|
||
(defcap TRANSFER_XCHAIN_RECD:bool | ||
( sender:string | ||
receiver:string | ||
amount:decimal | ||
source-chain:string | ||
) | ||
@doc "Event emitted on receipt of cross-chain transfer." | ||
@event | ||
) | ||
) |