Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import org.lfdecentralizedtrust.splice.http.v0.definitions.{
AllocateAmuletResponse,
GetBuyTrafficRequestStatusResponse,
GetTransferOfferStatusResponse,
ListMintingDelegationProposalsResponse,
ListMintingDelegationsResponse,
TransferInstructionResultResponse,
}
import org.lfdecentralizedtrust.splice.util.{Contract, ContractWithState}
Expand Down Expand Up @@ -600,6 +602,57 @@ abstract class WalletAppReference(
httpCommand(HttpWalletAppClient.TokenStandard.RejectAllocationRequest(id))
}
}

@Help.Summary("List MintingDelegationProposals")
@Help.Description(
"List all MintingDelegationProposal contracts where the user is the delegate."
)
def listMintingDelegationProposals(
after: Option[Long] = None,
limit: Option[Int] = None,
): ListMintingDelegationProposalsResponse =
consoleEnvironment.run {
httpCommand(HttpWalletAppClient.ListMintingDelegationProposals(after, limit))
}

@Help.Summary("Accept MintingDelegationProposal")
@Help.Description(
"Accept a MintingDelegationProposal, creating a MintingDelegation contract and archiving an existing contract."
)
def acceptMintingDelegationProposal(contractId: String): String =
consoleEnvironment.run {
httpCommand(HttpWalletAppClient.AcceptMintingDelegationProposal(contractId))
}

@Help.Summary("Reject MintingDelegationProposal")
@Help.Description(
"Reject a MintingDelegationProposal."
)
def rejectMintingDelegationProposal(contractId: String): Unit =
consoleEnvironment.run {
httpCommand(HttpWalletAppClient.RejectMintingDelegationProposal(contractId))
}

@Help.Summary("List MintingDelegations")
@Help.Description(
"List all MintingDelegation contracts where the user is the delegate."
)
def listMintingDelegations(
after: Option[Long] = None,
limit: Option[Int] = None,
): ListMintingDelegationsResponse =
consoleEnvironment.run {
httpCommand(HttpWalletAppClient.ListMintingDelegations(after, limit))
}

@Help.Summary("Reject MintingDelegation")
@Help.Description(
"Reject/terminate a MintingDelegation contract."
)
def rejectMintingDelegation(contractId: String): Unit =
consoleEnvironment.run {
httpCommand(HttpWalletAppClient.RejectMintingDelegation(contractId))
}
}

/** Client (aka remote) reference to a wallet app in the style of ParticipantClientReference, i.e.,
Expand Down
Loading
Loading