Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

deso-protocol-types

Package Overview
Dependencies
Maintainers
2
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

deso-protocol-types - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

2

package.json
{
"name": "deso-protocol-types",
"version": "0.1.0",
"version": "0.2.0",
"type": "commonjs",

@@ -5,0 +5,0 @@ "main": "./src/index.js",

@@ -0,1 +1,2 @@

import { BlockTemplateStats, MsgDeSoTxn, TransactionFee } from './deso-types';
export interface GetApproveResponse {

@@ -114,1 +115,204 @@ id?: string;

}
export interface GetBlockTemplateRequest {
PublicKeyBase58Check: string;
NumHeaders: number;
HeaderVersion: number;
}
export interface GetBlockTemplateResponse {
Headers: number[][];
BlockID: string;
DifficultyTargetHex: string;
ExtraNonces: number[];
LatestBlockTemplateStats: BlockTemplateStats;
}
export interface SubmitBlockRequest {
PublicKeyBase58Check: string;
Header: string[];
ExtraData: any;
BlockID: string;
}
export interface SubmitBlockResponse {
IsMainChain: boolean;
IsOrphan: boolean;
}
export declare enum DeSoNetwork {
mainnet = "mainnet",
testnet = "testnet"
}
export interface DerivedPrivateUserInfo {
derivedSeedHex: string;
derivedPublicKeyBase58Check: string;
publicKeyBase58Check: string;
btcDepositAddress: string;
ethDepositAddress: string;
expirationBlock: number;
network: DeSoNetwork;
accessSignature: string;
jwt: string;
derivedJwt: string;
messagingPublicKeyBase58Check: string;
messagingPrivateKey: string;
messagingKeyName: string;
messagingKeySignature: string;
transactionSpendingLimitHex: string | undefined;
}
export declare enum CreatorCoinLimitOperationString {
ANY = "any",
BUY = "buy",
SELL = "sell",
TRANSFER = "transfer"
}
export declare enum DAOCoinLimitOperationString {
ANY = "any",
MINT = "mint",
BURN = "burn",
DISABLE_MINTING = "disable_minting",
UPDATE_TRANSFER_RESTRICTION_STATUS = "update_transfer_restriction_status",
TRANSFER = "transfer"
}
export declare type CoinLimitOperationString = DAOCoinLimitOperationString | CreatorCoinLimitOperationString;
export interface CoinOperationLimitMap<T extends CoinLimitOperationString> {
[public_key: string]: OperationToCountMap<T>;
}
export declare type OperationToCountMap<T extends LimitOperationString> = {
[operation in T]?: number;
};
export declare type LimitOperationString = DAOCoinLimitOperationString | CreatorCoinLimitOperationString | NFTLimitOperationString;
export declare type CreatorCoinOperationLimitMap = CoinOperationLimitMap<CreatorCoinLimitOperationString>;
export declare type DAOCoinOperationLimitMap = CoinOperationLimitMap<DAOCoinLimitOperationString>;
export declare type DAOCoinLimitOrderLimitMap = {
[buying_public_key: string]: {
[selling_public_key: string]: number;
};
};
export declare enum NFTLimitOperationString {
ANY = "any",
UPDATE = "update",
BID = "nft_bid",
ACCEPT_BID = "accept_nft_bid",
TRANSFER = "transfer",
BURN = "burn",
ACCEPT_TRANSFER = "accept_nft_transfer"
}
export interface NFTOperationLimitMap {
[post_hash_hex: string]: {
[serial_number: number]: OperationToCountMap<NFTLimitOperationString>;
};
}
export declare enum TransactionType {
BasicTransfer = "BASIC_TRANSFER",
BitcoinExchange = "BITCOIN_EXCHANGE",
PrivateMessage = "PRIVATE_MESSAGE",
SubmitPost = "SUBMIT_POST",
UpdateProfile = "UPDATE_PROFILE",
UpdateBitcoinUSDExchangeRate = "UPDATE_BITCOIN_USD_EXCHANGE_RATE",
Follow = "FOLLOW",
Like = "LIKE",
CreatorCoin = "CREATOR_COIN",
SwapIdentity = "SWAP_IDENTITY",
UpdateGlobalParams = "UPDATE_GLOBAL_PARAMS",
CreatorCoinTransfer = "CREATOR_COIN_TRANSFER",
CreateNFT = "CREATE_NFT",
UpdateNFT = "UPDATE_NFT",
AcceptNFTBid = "ACCEPT_NFT_BID",
NFTBid = "NFT_BID",
NFTTransfer = "NFT_TRANSFER",
AcceptNFTTransfer = "ACCEPT_NFT_TRANSFER",
BurnNFT = "BURN_NFT",
AuthorizeDerivedKey = "AUTHORIZE_DERIVED_KEY",
MessagingGroup = "MESSAGING_GROUP",
DAOCoin = "DAO_COIN",
DAOCoinTransfer = "DAO_COIN_TRANSFER",
DAOCoinLimitOrder = "DAO_COIN_LIMIT_ORDER"
}
export interface TransactionSpendingLimitResponse {
GlobalDESOLimit: number;
TransactionCountLimitMap?: {
[k in TransactionType]?: number;
};
CreatorCoinOperationLimitMap?: CreatorCoinOperationLimitMap;
DAOCoinOperationLimitMap?: DAOCoinOperationLimitMap;
NFTOperationLimitMap?: NFTOperationLimitMap;
DAOCoinLimitOrderLimitMap?: DAOCoinLimitOrderLimitMap;
DerivedKeyMemo?: string;
}
export interface IdentityDeriveParams {
callback?: string;
webview?: boolean;
publicKey?: string;
transactionSpendingLimitResponse?: TransactionSpendingLimitResponse;
derivedPublicKey?: string;
}
export interface IdentityDeriveQueryParams {
callback?: string;
webview?: boolean;
publicKey?: string;
transactionSpendingLimitResponse?: string;
derivedPublicKey?: string;
}
export interface AuthorizeDerivedKeyParams {
OwnerPublicKeyBase58Check?: string;
DerivedPublicKeyBase58Check?: string;
ExpirationBlock?: number;
DeleteKey: boolean;
DerivedKeySignature?: boolean;
TransactionFees: TransactionFee[] | null;
MinFeeRateNanosPerKB: number;
TransactionSpendingLimitResponse?: TransactionSpendingLimitResponse;
Memo?: string;
AppName?: string;
ExtraData?: {
[k: string]: string;
};
}
export declare enum DAOCoinLimitOrderOperationTypeString {
DAOCoinLimitOrderOperationTypeStringASK = "ASK",
DAOCoinLimitOrderOperationTypeStringBID = "BID"
}
export interface DAOCoinLimitOrderWithExchangeRateAndQuantityRequest {
TransactorPublicKeyBase58Check: string;
BuyingDAOCoinCreatorPublicKeyBase58CheckOrUsername: string;
SellingDAOCoinCreatorPublicKeyBase58CheckOrUsername: string;
ExchangeRateCoinsToSellPerCoinToBuy: number;
QuantityToFill: number;
OperationType: DAOCoinLimitOrderOperationTypeString;
MinFeeRateNanosPerKB?: number;
TransactionFees: TransactionFee[] | null;
}
export interface DAOCoinLimitOrderWithCancelOrderIDRequest {
TransactorPublicKeyBase58Check: string;
CancelOrderID: string;
MinFeeRateNanosPerKB?: number;
TransactionFees: TransactionFee[] | null;
}
export interface DAOCoinLimitOrderResponse extends TransactionConstructionResponse {
SpendAmountNanos: number;
TotalInputNanos: number;
ChangeAmountNanos: number;
FeeNanos: number;
Transaction: MsgDeSoTxn;
TransactionHex: string;
TxnHashHex: string;
}
export interface GetDAOCoinLimitOrdersRequest {
DAOCoin1CreatorPublicKeyBase58CheckOrUsername: string;
DAOCoin2CreatorPublicKeyBase58CheckOrUsername: string;
}
export interface GetDAOCoinLimitOrdersResponse {
Orders: DAOCoinLimitOrderEntryResponse[];
}
export interface DAOCoinLimitOrderEntryResponse {
TransactorPublicKeyBase58Check: string;
BuyingDAOCoinCreatorPublicKeyBase58Check: string;
SellingDAOCoinCreatorPublicKeyBase58Check: string;
ExchangeRateCoinsToSellPerCoinToBuy: number;
QuantityToFill: number;
OperationType: DAOCoinLimitOrderOperationTypeString;
OrderID: string;
}
export interface GetTransactorDAOCoinLimitOrdersRequest {
TransactorPublicKeyBase58CheckOrUsername: string;
}
export interface TransactionConstructionResponse {
TransactionHex: string;
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DAOCoinLimitOrderOperationTypeString = exports.TransactionType = exports.NFTLimitOperationString = exports.DAOCoinLimitOperationString = exports.CreatorCoinLimitOperationString = exports.DeSoNetwork = void 0;
var DeSoNetwork;
(function (DeSoNetwork) {
DeSoNetwork["mainnet"] = "mainnet";
DeSoNetwork["testnet"] = "testnet";
})(DeSoNetwork = exports.DeSoNetwork || (exports.DeSoNetwork = {}));
var CreatorCoinLimitOperationString;
(function (CreatorCoinLimitOperationString) {
CreatorCoinLimitOperationString["ANY"] = "any";
CreatorCoinLimitOperationString["BUY"] = "buy";
CreatorCoinLimitOperationString["SELL"] = "sell";
CreatorCoinLimitOperationString["TRANSFER"] = "transfer";
})(CreatorCoinLimitOperationString = exports.CreatorCoinLimitOperationString || (exports.CreatorCoinLimitOperationString = {}));
var DAOCoinLimitOperationString;
(function (DAOCoinLimitOperationString) {
DAOCoinLimitOperationString["ANY"] = "any";
DAOCoinLimitOperationString["MINT"] = "mint";
DAOCoinLimitOperationString["BURN"] = "burn";
DAOCoinLimitOperationString["DISABLE_MINTING"] = "disable_minting";
DAOCoinLimitOperationString["UPDATE_TRANSFER_RESTRICTION_STATUS"] = "update_transfer_restriction_status";
DAOCoinLimitOperationString["TRANSFER"] = "transfer";
})(DAOCoinLimitOperationString = exports.DAOCoinLimitOperationString || (exports.DAOCoinLimitOperationString = {}));
var NFTLimitOperationString;
(function (NFTLimitOperationString) {
NFTLimitOperationString["ANY"] = "any";
NFTLimitOperationString["UPDATE"] = "update";
NFTLimitOperationString["BID"] = "nft_bid";
NFTLimitOperationString["ACCEPT_BID"] = "accept_nft_bid";
NFTLimitOperationString["TRANSFER"] = "transfer";
NFTLimitOperationString["BURN"] = "burn";
NFTLimitOperationString["ACCEPT_TRANSFER"] = "accept_nft_transfer";
})(NFTLimitOperationString = exports.NFTLimitOperationString || (exports.NFTLimitOperationString = {}));
var TransactionType;
(function (TransactionType) {
TransactionType["BasicTransfer"] = "BASIC_TRANSFER";
TransactionType["BitcoinExchange"] = "BITCOIN_EXCHANGE";
TransactionType["PrivateMessage"] = "PRIVATE_MESSAGE";
TransactionType["SubmitPost"] = "SUBMIT_POST";
TransactionType["UpdateProfile"] = "UPDATE_PROFILE";
TransactionType["UpdateBitcoinUSDExchangeRate"] = "UPDATE_BITCOIN_USD_EXCHANGE_RATE";
TransactionType["Follow"] = "FOLLOW";
TransactionType["Like"] = "LIKE";
TransactionType["CreatorCoin"] = "CREATOR_COIN";
TransactionType["SwapIdentity"] = "SWAP_IDENTITY";
TransactionType["UpdateGlobalParams"] = "UPDATE_GLOBAL_PARAMS";
TransactionType["CreatorCoinTransfer"] = "CREATOR_COIN_TRANSFER";
TransactionType["CreateNFT"] = "CREATE_NFT";
TransactionType["UpdateNFT"] = "UPDATE_NFT";
TransactionType["AcceptNFTBid"] = "ACCEPT_NFT_BID";
TransactionType["NFTBid"] = "NFT_BID";
TransactionType["NFTTransfer"] = "NFT_TRANSFER";
TransactionType["AcceptNFTTransfer"] = "ACCEPT_NFT_TRANSFER";
TransactionType["BurnNFT"] = "BURN_NFT";
TransactionType["AuthorizeDerivedKey"] = "AUTHORIZE_DERIVED_KEY";
TransactionType["MessagingGroup"] = "MESSAGING_GROUP";
TransactionType["DAOCoin"] = "DAO_COIN";
TransactionType["DAOCoinTransfer"] = "DAO_COIN_TRANSFER";
TransactionType["DAOCoinLimitOrder"] = "DAO_COIN_LIMIT_ORDER";
})(TransactionType = exports.TransactionType || (exports.TransactionType = {}));
// Temporary manual creation of classes for DAO coin limit orders
var DAOCoinLimitOrderOperationTypeString;
(function (DAOCoinLimitOrderOperationTypeString) {
DAOCoinLimitOrderOperationTypeString["DAOCoinLimitOrderOperationTypeStringASK"] = "ASK";
DAOCoinLimitOrderOperationTypeString["DAOCoinLimitOrderOperationTypeStringBID"] = "BID";
})(DAOCoinLimitOrderOperationTypeString = exports.DAOCoinLimitOrderOperationTypeString || (exports.DAOCoinLimitOrderOperationTypeString = {}));
//# sourceMappingURL=deso-types-custom.js.map

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc