From 42dd8fc43142273a6841b2d39447b28231c25d82 Mon Sep 17 00:00:00 2001 From: Jean Ribeiro Date: Thu, 17 Oct 2024 19:17:43 -0300 Subject: [PATCH] feat: adds noves tx types enums --- .../src/lib/auxiliary/noves/enums/index.ts | 11 ++++++++ .../enums/noves-tx-type-cross-chain.enum.ts | 5 ++++ .../noves/enums/noves-tx-type-dex.enum.ts | 12 +++++++++ .../noves/enums/noves-tx-type-domain.enum.ts | 5 ++++ .../enums/noves-tx-type-governance.enum.ts | 6 +++++ .../noves-tx-type-infrastructure.enum.ts | 7 +++++ .../noves/enums/noves-tx-type-lending.enum.ts | 8 ++++++ .../enums/noves-tx-type-miscellaneous.enum.ts | 6 +++++ .../noves/enums/noves-tx-type-nft.enum.ts | 19 ++++++++++++++ .../noves/enums/noves-tx-type-special.enum.ts | 7 +++++ .../noves/enums/noves-tx-type-token.enum.ts | 15 +++++++++++ .../noves/enums/noves-tx-type-yield.enum.ts | 12 +++++++++ .../noves/types/noves-tx-type.type.ts | 26 +++++++++++++++++++ 13 files changed, 139 insertions(+) create mode 100644 packages/shared/src/lib/auxiliary/noves/enums/noves-tx-type-cross-chain.enum.ts create mode 100644 packages/shared/src/lib/auxiliary/noves/enums/noves-tx-type-dex.enum.ts create mode 100644 packages/shared/src/lib/auxiliary/noves/enums/noves-tx-type-domain.enum.ts create mode 100644 packages/shared/src/lib/auxiliary/noves/enums/noves-tx-type-governance.enum.ts create mode 100644 packages/shared/src/lib/auxiliary/noves/enums/noves-tx-type-infrastructure.enum.ts create mode 100644 packages/shared/src/lib/auxiliary/noves/enums/noves-tx-type-lending.enum.ts create mode 100644 packages/shared/src/lib/auxiliary/noves/enums/noves-tx-type-miscellaneous.enum.ts create mode 100644 packages/shared/src/lib/auxiliary/noves/enums/noves-tx-type-nft.enum.ts create mode 100644 packages/shared/src/lib/auxiliary/noves/enums/noves-tx-type-special.enum.ts create mode 100644 packages/shared/src/lib/auxiliary/noves/enums/noves-tx-type-token.enum.ts create mode 100644 packages/shared/src/lib/auxiliary/noves/enums/noves-tx-type-yield.enum.ts create mode 100644 packages/shared/src/lib/auxiliary/noves/types/noves-tx-type.type.ts diff --git a/packages/shared/src/lib/auxiliary/noves/enums/index.ts b/packages/shared/src/lib/auxiliary/noves/enums/index.ts index dbaec01429..edd36f0b92 100644 --- a/packages/shared/src/lib/auxiliary/noves/enums/index.ts +++ b/packages/shared/src/lib/auxiliary/noves/enums/index.ts @@ -1,2 +1,13 @@ export * from './eth-rpc-method.enum' +export * from './noves-tx-type-cross-chain.enum' +export * from './noves-tx-type-dex.enum' +export * from './noves-tx-type-domain.enum' +export * from './noves-tx-type-governance.enum' +export * from './noves-tx-type-infrastructure.enum' +export * from './noves-tx-type-lending.enum' +export * from './noves-tx-type-miscellaneous.enum' +export * from './noves-tx-type-nft.enum' +export * from './noves-tx-type-special.enum' +export * from './noves-tx-type-token.enum' +export * from './noves-tx-type-yield.enum' export * from './supported-noves-chain.enum' diff --git a/packages/shared/src/lib/auxiliary/noves/enums/noves-tx-type-cross-chain.enum.ts b/packages/shared/src/lib/auxiliary/noves/enums/noves-tx-type-cross-chain.enum.ts new file mode 100644 index 0000000000..00c0822c11 --- /dev/null +++ b/packages/shared/src/lib/auxiliary/noves/enums/noves-tx-type-cross-chain.enum.ts @@ -0,0 +1,5 @@ +// https://docs.noves.fi/reference/cross-chain +export enum NovesTxTypeCrossChain { + ReceiveFromBridge = 'receiveFromBridge', + SendToBridge = 'sendToBridge', +} diff --git a/packages/shared/src/lib/auxiliary/noves/enums/noves-tx-type-dex.enum.ts b/packages/shared/src/lib/auxiliary/noves/enums/noves-tx-type-dex.enum.ts new file mode 100644 index 0000000000..74a5117348 --- /dev/null +++ b/packages/shared/src/lib/auxiliary/noves/enums/noves-tx-type-dex.enum.ts @@ -0,0 +1,12 @@ +// https://docs.noves.fi/reference/dex-transactions +export enum NovesTxTypeDEX { + AddLiquidity = 'addLiquidity', + CancelOrderTransaction = 'cancelOrderTransaction', + CustodiedRemoveLiquidity = 'custodiedRemoveLiquidity', + DepositToExchange = 'depositToExchange', + FillOrderTransaction = 'fillOrderTransaction', + PlaceOrderTransaction = 'placeOrderTransaction', + Swap = 'swap', + RemoveLiquidity = 'removeLiquidity', + WithdrawFromExchange = 'withdrawFromExchange', +} diff --git a/packages/shared/src/lib/auxiliary/noves/enums/noves-tx-type-domain.enum.ts b/packages/shared/src/lib/auxiliary/noves/enums/noves-tx-type-domain.enum.ts new file mode 100644 index 0000000000..84db3fb271 --- /dev/null +++ b/packages/shared/src/lib/auxiliary/noves/enums/noves-tx-type-domain.enum.ts @@ -0,0 +1,5 @@ +// https://docs.noves.fi/reference/domain-services +export enum NovesTxTypeDomain { + RegisterDomain = 'registerDomain', + RenewDomain = 'renewDomain', +} diff --git a/packages/shared/src/lib/auxiliary/noves/enums/noves-tx-type-governance.enum.ts b/packages/shared/src/lib/auxiliary/noves/enums/noves-tx-type-governance.enum.ts new file mode 100644 index 0000000000..6101f25d54 --- /dev/null +++ b/packages/shared/src/lib/auxiliary/noves/enums/noves-tx-type-governance.enum.ts @@ -0,0 +1,6 @@ +// https://docs.noves.fi/reference/governance +export enum NovesTxTypeGovernance { + Delegate = 'delegate', + SignMultisig = 'signMultisig', + Vote = 'vote', +} diff --git a/packages/shared/src/lib/auxiliary/noves/enums/noves-tx-type-infrastructure.enum.ts b/packages/shared/src/lib/auxiliary/noves/enums/noves-tx-type-infrastructure.enum.ts new file mode 100644 index 0000000000..67ca420ebc --- /dev/null +++ b/packages/shared/src/lib/auxiliary/noves/enums/noves-tx-type-infrastructure.enum.ts @@ -0,0 +1,7 @@ +// https://docs.noves.fi/reference/infrastructure +export enum NovesTxTypeInfrastructure { + CreateContract = 'createContract', + DeployContract = 'deployContract', + SystemTransaction = 'systemTransaction', + ProtocolTransaction = 'protocolTransaction', +} diff --git a/packages/shared/src/lib/auxiliary/noves/enums/noves-tx-type-lending.enum.ts b/packages/shared/src/lib/auxiliary/noves/enums/noves-tx-type-lending.enum.ts new file mode 100644 index 0000000000..679f9b3c19 --- /dev/null +++ b/packages/shared/src/lib/auxiliary/noves/enums/noves-tx-type-lending.enum.ts @@ -0,0 +1,8 @@ +// https://docs.noves.fi/reference/lending +export enum NovesTxTypeLending { + Borrow = 'borrow', + DepositCollateral = 'depositCollateral', + Liquidate = 'liquidate', + RepayLoan = 'repayLoan', + WithdrawCollateral = 'withdrawCollateral', +} diff --git a/packages/shared/src/lib/auxiliary/noves/enums/noves-tx-type-miscellaneous.enum.ts b/packages/shared/src/lib/auxiliary/noves/enums/noves-tx-type-miscellaneous.enum.ts new file mode 100644 index 0000000000..44b0ee5a7a --- /dev/null +++ b/packages/shared/src/lib/auxiliary/noves/enums/noves-tx-type-miscellaneous.enum.ts @@ -0,0 +1,6 @@ +// https://docs.noves.fi/reference/miscellaneous +export enum NovesTxTypeMiscellaneous { + Admin = 'admin', + MEVTransaction = 'MEVTransaction', + GamblingTransaction = 'gamblingTransaction', +} diff --git a/packages/shared/src/lib/auxiliary/noves/enums/noves-tx-type-nft.enum.ts b/packages/shared/src/lib/auxiliary/noves/enums/noves-tx-type-nft.enum.ts new file mode 100644 index 0000000000..66245fba92 --- /dev/null +++ b/packages/shared/src/lib/auxiliary/noves/enums/noves-tx-type-nft.enum.ts @@ -0,0 +1,19 @@ +// https://docs.noves.fi/reference/nft +export enum NovesTxTypeNFT { + ApproveNFTCollection = 'approveNFTCollection', + ApproveSingleNFT = 'approveSingleNFT', + BurnNFT = 'burnNFT', + BuyNFT = 'buyNFT', + CancelNFTListing = 'cancelNFTListing', + CreateNFTListing = 'createNFTListing', + MintNFT = 'mintNFT', + PlaceNFTBid = 'placeNFTBid', + ReceiveNFT = 'receiveNFT', + SendNFT = 'sendNFT', + ReceiveNFTAirdrop = 'receiveNFTAirdrop', + SendNFTAirdrop = 'sendNFTAirdrop', + ReceiveNFTRoyalty = 'receiveNFTRoyalty', + ReceiveSpamNFT = 'receiveSpamNFT', + RevokeNFTCollectionApproval = 'revokeNFTCollectionApproval', + SellNFT = 'sellNFT', +} diff --git a/packages/shared/src/lib/auxiliary/noves/enums/noves-tx-type-special.enum.ts b/packages/shared/src/lib/auxiliary/noves/enums/noves-tx-type-special.enum.ts new file mode 100644 index 0000000000..846dddad89 --- /dev/null +++ b/packages/shared/src/lib/auxiliary/noves/enums/noves-tx-type-special.enum.ts @@ -0,0 +1,7 @@ +// https://docs.noves.fi/reference/special-types +export enum NovesTxTypeSpecial { + Composite = 'composite', + Failed = 'failed', + Unclassified = 'unclassified', + UnverifiedContract = 'unverifiedContract', +} diff --git a/packages/shared/src/lib/auxiliary/noves/enums/noves-tx-type-token.enum.ts b/packages/shared/src/lib/auxiliary/noves/enums/noves-tx-type-token.enum.ts new file mode 100644 index 0000000000..ec4c72f38d --- /dev/null +++ b/packages/shared/src/lib/auxiliary/noves/enums/noves-tx-type-token.enum.ts @@ -0,0 +1,15 @@ +// https://docs.noves.fi/reference/token +export enum NovesTxTypeToken { + ApproveToken = 'approveToken', + BurnToken = 'burnToken', + MigrateToken = 'migrateToken', + SendToken = 'sendToken', + SendTokenAirdrop = 'sendTokenAirdrop', + ReceiveSpamToken = 'receiveSpamToken', + ReceiveToken = 'receiveToken', + ReceiveTokenAirdrop = 'receiveTokenAirdrop', + Refund = 'refund', + RevokeTokenApproval = 'revokeTokenApproval', + Unwrap = 'unwrap', + Wrap = 'wrap', +} diff --git a/packages/shared/src/lib/auxiliary/noves/enums/noves-tx-type-yield.enum.ts b/packages/shared/src/lib/auxiliary/noves/enums/noves-tx-type-yield.enum.ts new file mode 100644 index 0000000000..2cb045f84a --- /dev/null +++ b/packages/shared/src/lib/auxiliary/noves/enums/noves-tx-type-yield.enum.ts @@ -0,0 +1,12 @@ +// https://docs.noves.fi/reference/yield +export enum NovesTxTypeYield { + ClaimRewards = 'claimRewards', + ClaimAndStake = 'claimAndStake', + LeveragedFarming = 'leveragedFarming', + RebalancePosition = 'rebalancePosition', + Lock = 'lock', + StakeNFT = 'stakeNFT', + StakeToken = 'stakeToken', + UnstakeNFT = 'unstakeNFT', + UnstakeToken = 'unstakeToken', +} diff --git a/packages/shared/src/lib/auxiliary/noves/types/noves-tx-type.type.ts b/packages/shared/src/lib/auxiliary/noves/types/noves-tx-type.type.ts new file mode 100644 index 0000000000..4a8ef04c7e --- /dev/null +++ b/packages/shared/src/lib/auxiliary/noves/types/noves-tx-type.type.ts @@ -0,0 +1,26 @@ +import { + NovesTxTypeCrossChain, + NovesTxTypeDEX, + NovesTxTypeToken, + NovesTxTypeNFT, + NovesTxTypeLending, + NovesTxTypeYield, + NovesTxTypeDomain, + NovesTxTypeGovernance, + NovesTxTypeInfrastructure, + NovesTxTypeSpecial, + NovesTxTypeMiscellaneous, +} from '../enums' + +export type NovesTxType = + | NovesTxTypeCrossChain + | NovesTxTypeDEX + | NovesTxTypeToken + | NovesTxTypeNFT + | NovesTxTypeLending + | NovesTxTypeYield + | NovesTxTypeDomain + | NovesTxTypeGovernance + | NovesTxTypeInfrastructure + | NovesTxTypeSpecial + | NovesTxTypeMiscellaneous