Skip to content

Commit

Permalink
Merge pull request #30 from deso-protocol/lockups-types
Browse files Browse the repository at this point in the history
Add types for lockups
  • Loading branch information
lazynina authored Feb 14, 2024
2 parents 819bc0e + 996d9a0 commit 6d4a6e3
Showing 1 changed file with 70 additions and 0 deletions.
70 changes: 70 additions & 0 deletions src/backend-types/deso-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5728,3 +5728,73 @@ export interface StakeEntryResponse {
StakeAmountNanos: string; // HEX string
ExtraData: Record<string, string>;
}

export interface LockedBalanceEntryResponse {
HODLerPublicKeyBase58Check: string;
ProfilePublicKeyBase58Check: string;
UnlockTimestampNanoSecs: number;
VestingEndTimestampNanoSecs: number;
BalanceBaseUnits: string; // HEX string
ProfileEntryResponse?: ProfileEntryResponse;
HODLerProfileEntryResponse?: ProfileEntryResponse;
}

export interface LockupYieldCurvePointResponse {
ProfilePublicKeyBase58Check: string;
LockupDurationNanoSecs: number;
LockupYieldAPYBasisPoints: number;
ProfileEntryResponse?: ProfileEntryResponse;
}

export interface CoinLockupRequest {
TransactorPublicKeyBase58Check: string;
ProfilePublicKeyBase58Check: string;
RecipientPublicKeyBase58Check: string;
UnlockTimestampNanoSecs: number;
VestingEndTimestampNanoSecs: number;
LockupAmountBaseUnits: string; // HEX string
ExtraData: Record<string, string>;
MinFeeRateNanosPerKB: number;
TransactionFees: TransactionFee[];
}

export interface UpdateCoinLockupParamsRequest {
TransactorPublicKeyBase58Check: string;
LockupYieldDurationNanoSecs: number;
LockupYieldAPYBasisPoints: number;
RemoveYieldCurvePoint: boolean;
NewLockupTransferRestrictions: boolean;
LockupTransferRestrictionStatus: string; // TODO: introduce TransferRestrictionStatusString enum and use everywhere.
ExtraData: Record<string, string>;
MinFeeRateNanosPerKB: number;
TransactionFees: TransactionFee[];
}

export interface CoinLockupTransferRequest {
TransactorPublicKeyBase58Check: string;
ProfilePublicKeyBase58Check: string;
RecipientPublicKeyBase58Check: string;
UnlockTimestampNanoSecs: number;
LockedCoinsToTransferBaseUnits: string; // HEX string
ExtraData: Record<string, string>;
MinFeeRateNanosPerKB: number;
TransactionFees: TransactionFee[];
}

export interface CoinUnlockRequest {
TransactorPublicKeyBase58Check: string;
ProfilePublicKeyBase58Check: string;
ExtraData: Record<string, string>;
MinFeeRateNanosPerKB: number;
TransactionFees: TransactionFee[];
}

export interface CoinLockResponse {
SpendAmountNanos: number;
TotalInputNanos: number;
ChangeAmountNanos: number;
FeeNanos: number;
Transaction: MsgDeSoTxn;
TransactionHex: string;
TxnHashHex: string;
}

0 comments on commit 6d4a6e3

Please sign in to comment.