Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix OperationType types #741

Closed
wants to merge 3 commits into from
Closed
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
31 changes: 22 additions & 9 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,13 @@ export namespace OperationType {
type ClaimClaimableBalance = 'claimClaimableBalance';
type BeginSponsoringFutureReserves = 'beginSponsoringFutureReserves';
type EndSponsoringFutureReserves = 'endSponsoringFutureReserves';
type RevokeSponsorship = 'revokeSponsorship';
type RevokeAccountSponsorship = 'revokeAccountSponsorship';
type RevokeTrustlineSponsorship = 'revokeTrustlineSponsorship';
type RevokeOfferSponsorship = 'revokeOfferSponsorship';
type RevokeDataSponsorship = 'revokeDataSponsorship';
type RevokeClaimableBalanceSponsorship = 'revokeClaimableBalanceSponsorship';
type RevokeLiquidityPoolSponsorship = 'revokeLiquidityPoolSponsorship';
type RevokeSignerSponsorship = 'revokeSignerSponsorship';
type Clawback = 'clawback';
type ClawbackClaimableBalance = 'clawbackClaimableBalance';
type SetTrustLineFlags = 'setTrustLineFlags';
Expand Down Expand Up @@ -391,7 +397,14 @@ export type OperationType =
| OperationType.ClaimClaimableBalance
| OperationType.BeginSponsoringFutureReserves
| OperationType.EndSponsoringFutureReserves
| OperationType.RevokeSponsorship
| OperationType.RevokeAccountSponsorship
| OperationType.RevokeTrustlineSponsorship
| OperationType.RevokeTrustlineSponsorship
| OperationType.RevokeOfferSponsorship
| OperationType.RevokeDataSponsorship
| OperationType.RevokeClaimableBalanceSponsorship
| OperationType.RevokeLiquidityPoolSponsorship
| OperationType.RevokeSignerSponsorship
| OperationType.Clawback
| OperationType.ClawbackClaimableBalance
| OperationType.SetTrustLineFlags
Expand Down Expand Up @@ -792,52 +805,52 @@ export namespace Operation {
options: OperationOptions.BaseOptions
): xdr.Operation<EndSponsoringFutureReserves>;

interface RevokeAccountSponsorship extends BaseOperation<OperationType.RevokeSponsorship> {
interface RevokeAccountSponsorship extends BaseOperation<OperationType.RevokeAccountSponsorship> {
account: string;
}
function revokeAccountSponsorship(
options: OperationOptions.RevokeAccountSponsorship
): xdr.Operation<RevokeAccountSponsorship>;

interface RevokeTrustlineSponsorship extends BaseOperation<OperationType.RevokeSponsorship> {
interface RevokeTrustlineSponsorship extends BaseOperation<OperationType.RevokeTrustlineSponsorship> {
account: string;
asset: Asset | LiquidityPoolId;
}
function revokeTrustlineSponsorship(
options: OperationOptions.RevokeTrustlineSponsorship
): xdr.Operation<RevokeTrustlineSponsorship>;

interface RevokeOfferSponsorship extends BaseOperation<OperationType.RevokeSponsorship> {
interface RevokeOfferSponsorship extends BaseOperation<OperationType.RevokeOfferSponsorship> {
seller: string;
offerId: string;
}
function revokeOfferSponsorship(
options: OperationOptions.RevokeOfferSponsorship
): xdr.Operation<RevokeOfferSponsorship>;

interface RevokeDataSponsorship extends BaseOperation<OperationType.RevokeSponsorship> {
interface RevokeDataSponsorship extends BaseOperation<OperationType.RevokeDataSponsorship> {
account: string;
name: string;
}
function revokeDataSponsorship(
options: OperationOptions.RevokeDataSponsorship
): xdr.Operation<RevokeDataSponsorship>;

interface RevokeClaimableBalanceSponsorship extends BaseOperation<OperationType.RevokeSponsorship> {
interface RevokeClaimableBalanceSponsorship extends BaseOperation<OperationType.RevokeClaimableBalanceSponsorship> {
balanceId: string;
}
function revokeClaimableBalanceSponsorship(
options: OperationOptions.RevokeClaimableBalanceSponsorship
): xdr.Operation<RevokeClaimableBalanceSponsorship>;

interface RevokeLiquidityPoolSponsorship extends BaseOperation<OperationType.RevokeSponsorship> {
interface RevokeLiquidityPoolSponsorship extends BaseOperation<OperationType.RevokeLiquidityPoolSponsorship> {
liquidityPoolId: string;
}
function revokeLiquidityPoolSponsorship(
options: OperationOptions.RevokeLiquidityPoolSponsorship
): xdr.Operation<RevokeLiquidityPoolSponsorship>;

interface RevokeSignerSponsorship extends BaseOperation<OperationType.RevokeSponsorship> {
interface RevokeSignerSponsorship extends BaseOperation<OperationType.RevokeSignerSponsorship> {
account: string;
signer: SignerKeyOptions;
}
Expand Down