@railgun-community/shared-models 5.6.8 → 5.6.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -3,6 +3,7 @@ import { ContractTransaction } from 'ethers';
|
|
|
3
3
|
import { MerkletreeScanStatus } from './merkletree-scan';
|
|
4
4
|
import { FeesSerialized } from './network-config';
|
|
5
5
|
import { TXIDVersion } from './engine';
|
|
6
|
+
import { RailgunWalletBalanceBucket } from './balance';
|
|
6
7
|
export type RailgunAPICiphertext = {
|
|
7
8
|
iv: string;
|
|
8
9
|
data: string[];
|
|
@@ -51,7 +52,14 @@ export type RailgunBalancesEvent = {
|
|
|
51
52
|
nftAmounts: RailgunNFTAmount[];
|
|
52
53
|
railgunWalletID: string;
|
|
53
54
|
};
|
|
55
|
+
export declare enum POIProofEventStatus {
|
|
56
|
+
LoadingNextBatch = "LoadingNextBatch",
|
|
57
|
+
InProgress = "InProgress",
|
|
58
|
+
Error = "Error",
|
|
59
|
+
AllProofsCompleted = "AllProofsCompleted"
|
|
60
|
+
}
|
|
54
61
|
export type POIProofProgressEvent = {
|
|
62
|
+
status: POIProofEventStatus;
|
|
55
63
|
txidVersion: TXIDVersion;
|
|
56
64
|
chain: Chain;
|
|
57
65
|
railgunWalletID: string;
|
|
@@ -61,6 +69,7 @@ export type POIProofProgressEvent = {
|
|
|
61
69
|
railgunTxid: string;
|
|
62
70
|
index: number;
|
|
63
71
|
totalCount: number;
|
|
72
|
+
errMessage: Optional<string>;
|
|
64
73
|
};
|
|
65
74
|
export type MerkletreeScanUpdateEvent = {
|
|
66
75
|
chain: Chain;
|
|
@@ -140,21 +149,30 @@ type SendAdditionalData = {
|
|
|
140
149
|
recipientAddress: Optional<string>;
|
|
141
150
|
walletSource: Optional<string>;
|
|
142
151
|
memoText: Optional<string>;
|
|
152
|
+
hasValidPOIForActiveLists: boolean;
|
|
153
|
+
};
|
|
154
|
+
type HistoryAdditionalData = {
|
|
155
|
+
hasValidPOIForActiveLists: boolean;
|
|
143
156
|
};
|
|
144
|
-
export type
|
|
145
|
-
export type
|
|
157
|
+
export type RailgunHistoryERC20Amount = RailgunERC20Amount & HistoryAdditionalData;
|
|
158
|
+
export type RailgunHistoryNFTAmount = RailgunNFTAmount & HistoryAdditionalData;
|
|
159
|
+
export type RailgunHistorySendERC20Amount = RailgunHistoryERC20Amount & SendAdditionalData;
|
|
160
|
+
export type RailgunHistorySendNFTAmount = RailgunHistoryNFTAmount & SendAdditionalData;
|
|
146
161
|
type UnshieldAdditonalData = {
|
|
147
162
|
unshieldFee: Optional<string>;
|
|
163
|
+
hasValidPOIForActiveLists: boolean;
|
|
148
164
|
};
|
|
149
|
-
export type
|
|
150
|
-
export type
|
|
165
|
+
export type RailgunHistoryUnshieldERC20Amount = RailgunHistorySendERC20Amount & UnshieldAdditonalData;
|
|
166
|
+
export type RailgunHistoryUnshieldNFTAmount = RailgunHistorySendNFTAmount & UnshieldAdditonalData;
|
|
151
167
|
type ReceiveAdditionalData = {
|
|
152
168
|
senderAddress: Optional<string>;
|
|
153
169
|
memoText: Optional<string>;
|
|
154
170
|
shieldFee: Optional<string>;
|
|
171
|
+
hasValidPOIForActiveLists: boolean;
|
|
172
|
+
balanceBucket: RailgunWalletBalanceBucket;
|
|
155
173
|
};
|
|
156
|
-
export type
|
|
157
|
-
export type
|
|
174
|
+
export type RailgunHistoryReceiveERC20Amount = RailgunHistoryERC20Amount & ReceiveAdditionalData;
|
|
175
|
+
export type RailgunHistoryReceiveNFTAmount = RailgunHistoryNFTAmount & ReceiveAdditionalData;
|
|
158
176
|
export declare enum TransactionHistoryItemCategory {
|
|
159
177
|
ShieldERC20s = "ShieldERC20s",
|
|
160
178
|
UnshieldERC20s = "UnshieldERC20s",
|
|
@@ -167,14 +185,14 @@ export type TransactionHistoryItem = {
|
|
|
167
185
|
version: number;
|
|
168
186
|
timestamp: Optional<number>;
|
|
169
187
|
blockNumber: Optional<number>;
|
|
170
|
-
receiveERC20Amounts:
|
|
171
|
-
transferERC20Amounts:
|
|
172
|
-
changeERC20Amounts:
|
|
173
|
-
relayerFeeERC20Amount?:
|
|
174
|
-
unshieldERC20Amounts:
|
|
175
|
-
receiveNFTAmounts:
|
|
176
|
-
transferNFTAmounts:
|
|
177
|
-
unshieldNFTAmounts:
|
|
188
|
+
receiveERC20Amounts: RailgunHistoryReceiveERC20Amount[];
|
|
189
|
+
transferERC20Amounts: RailgunHistorySendERC20Amount[];
|
|
190
|
+
changeERC20Amounts: RailgunHistoryERC20Amount[];
|
|
191
|
+
relayerFeeERC20Amount?: RailgunHistoryERC20Amount;
|
|
192
|
+
unshieldERC20Amounts: RailgunHistoryUnshieldERC20Amount[];
|
|
193
|
+
receiveNFTAmounts: RailgunHistoryReceiveNFTAmount[];
|
|
194
|
+
transferNFTAmounts: RailgunHistorySendNFTAmount[];
|
|
195
|
+
unshieldNFTAmounts: RailgunHistoryUnshieldNFTAmount[];
|
|
178
196
|
category: TransactionHistoryItemCategory;
|
|
179
197
|
};
|
|
180
198
|
type Ciphertext = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TransactionHistoryItemCategory = exports.NFTTokenType = exports.ChainType = exports.EVMGasType = void 0;
|
|
3
|
+
exports.TransactionHistoryItemCategory = exports.NFTTokenType = exports.POIProofEventStatus = exports.ChainType = exports.EVMGasType = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Type0 / Type1 = non-EIP-1559 (gasPrice).
|
|
6
6
|
* Type2 = EIP-1559 (maxFeePerGas and maxPriorityFeePerGas).
|
|
@@ -15,6 +15,13 @@ var ChainType;
|
|
|
15
15
|
(function (ChainType) {
|
|
16
16
|
ChainType[ChainType["EVM"] = 0] = "EVM";
|
|
17
17
|
})(ChainType || (exports.ChainType = ChainType = {}));
|
|
18
|
+
var POIProofEventStatus;
|
|
19
|
+
(function (POIProofEventStatus) {
|
|
20
|
+
POIProofEventStatus["LoadingNextBatch"] = "LoadingNextBatch";
|
|
21
|
+
POIProofEventStatus["InProgress"] = "InProgress";
|
|
22
|
+
POIProofEventStatus["Error"] = "Error";
|
|
23
|
+
POIProofEventStatus["AllProofsCompleted"] = "AllProofsCompleted";
|
|
24
|
+
})(POIProofEventStatus || (exports.POIProofEventStatus = POIProofEventStatus = {}));
|
|
18
25
|
/**
|
|
19
26
|
* Synced NFT types from TokenType (@railgun-community/engine).
|
|
20
27
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"response-types.js","sourceRoot":"","sources":["../../src/models/response-types.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"response-types.js","sourceRoot":"","sources":["../../src/models/response-types.ts"],"names":[],"mappings":";;;AAYA;;;GAGG;AACH,IAAY,UAIX;AAJD,WAAY,UAAU;IACpB,6CAAS,CAAA;IACT,6CAAS,CAAA;IACT,6CAAS,CAAA;AACX,CAAC,EAJW,UAAU,0BAAV,UAAU,QAIrB;AA+BD,IAAY,SAEX;AAFD,WAAY,SAAS;IACnB,uCAAO,CAAA;AACT,CAAC,EAFW,SAAS,yBAAT,SAAS,QAEpB;AAeD,IAAY,mBAKX;AALD,WAAY,mBAAmB;IAC7B,4DAAqC,CAAA;IACrC,gDAAyB,CAAA;IACzB,sCAAe,CAAA;IACf,gEAAyC,CAAA;AAC3C,CAAC,EALW,mBAAmB,mCAAnB,mBAAmB,QAK9B;AAgED;;GAEG;AACH,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,mDAAU,CAAA;IACV,qDAAW,CAAA;AACb,CAAC,EAHW,YAAY,4BAAZ,YAAY,QAGvB;AAqFD,IAAY,8BAMX;AAND,WAAY,8BAA8B;IACxC,+DAA6B,CAAA;IAC7B,mEAAiC,CAAA;IACjC,2EAAyC,CAAA;IACzC,iFAA+C,CAAA;IAC/C,qDAAmB,CAAA;AACrB,CAAC,EANW,8BAA8B,8CAA9B,8BAA8B,QAMzC","sourcesContent":["/// <reference types=\"../types/global\" />\nimport { ContractTransaction } from 'ethers';\nimport { MerkletreeScanStatus } from './merkletree-scan';\nimport { FeesSerialized } from './network-config';\nimport { TXIDVersion } from './engine';\nimport { RailgunWalletBalanceBucket } from './balance';\n\nexport type RailgunAPICiphertext = {\n iv: string;\n data: string[];\n};\n\n/**\n * Type0 / Type1 = non-EIP-1559 (gasPrice).\n * Type2 = EIP-1559 (maxFeePerGas and maxPriorityFeePerGas).\n */\nexport enum EVMGasType {\n Type0 = 0,\n Type1 = 1,\n Type2 = 2,\n}\n\nexport type TransactionGasDetails =\n | TransactionGasDetailsType0\n | TransactionGasDetailsType1\n | TransactionGasDetailsType2;\n\nexport type TransactionGasDetailsType0 = {\n evmGasType: EVMGasType.Type0;\n gasEstimate: bigint;\n gasPrice: bigint;\n};\n\nexport type TransactionGasDetailsType1 = {\n evmGasType: EVMGasType.Type1;\n gasEstimate: bigint;\n gasPrice: bigint;\n};\n\nexport type TransactionGasDetailsType2 = {\n evmGasType: EVMGasType.Type2;\n gasEstimate: bigint;\n maxFeePerGas: bigint;\n maxPriorityFeePerGas: bigint;\n};\n\nexport type FeeTokenDetails = {\n tokenAddress: string;\n feePerUnitGas: bigint;\n};\n\nexport enum ChainType {\n EVM = 0,\n}\n\nexport type Chain = {\n type: ChainType;\n id: number;\n};\n\nexport type RailgunBalancesEvent = {\n txidVersion: TXIDVersion;\n chain: Chain;\n erc20Amounts: RailgunERC20Amount[];\n nftAmounts: RailgunNFTAmount[];\n railgunWalletID: string;\n};\n\nexport enum POIProofEventStatus {\n LoadingNextBatch = 'LoadingNextBatch',\n InProgress = 'InProgress',\n Error = 'Error',\n AllProofsCompleted = 'AllProofsCompleted',\n}\n\nexport type POIProofProgressEvent = {\n status: POIProofEventStatus;\n txidVersion: TXIDVersion;\n chain: Chain;\n railgunWalletID: string;\n progress: number;\n listKey: string;\n txid: string;\n railgunTxid: string;\n index: number;\n totalCount: number;\n errMessage: Optional<string>;\n};\n\nexport type MerkletreeScanUpdateEvent = {\n chain: Chain;\n scanStatus: MerkletreeScanStatus;\n progress: number;\n};\n\nexport type LoadProviderResponse = {\n feesSerialized: FeesSerialized;\n};\n\nexport type RailgunWalletInfo = {\n id: string;\n railgunAddress: string;\n};\n\nexport type RailgunWalletAddressData = {\n masterPublicKey: bigint;\n viewingPublicKey: bigint;\n};\n\nexport type RailgunTxidFromNullifiersResponse = {\n txid?: string;\n};\n\nexport type RailgunPopulateTransactionResponse = {\n transaction: ContractTransaction;\n nullifiers?: string[];\n};\n\nexport type RailgunTransactionGasEstimateResponse = {\n gasEstimate: bigint;\n relayerFeeCommitment?: CommitmentSummary;\n};\n\nexport type RailgunERC20Recipient = {\n tokenAddress: string;\n recipientAddress: string;\n};\n\nexport type RailgunERC20Amount = {\n tokenAddress: string;\n amount: bigint;\n};\n\nexport type RailgunERC20AmountRecipient = RailgunERC20Amount & {\n recipientAddress: string;\n};\n\n/**\n * Synced NFT types from TokenType (@railgun-community/engine).\n */\nexport enum NFTTokenType {\n ERC721 = 1,\n ERC1155 = 2,\n}\n\nexport type NFTAmount = {\n nftAddress: string;\n nftTokenType: NFTTokenType;\n tokenSubID: string;\n amountString: string;\n};\n\nexport type NFTAmountRecipient = NFTAmount & {\n recipientAddress: string;\n};\n\nexport type RailgunNFTAmount = {\n nftAddress: string;\n nftTokenType: NFTTokenType;\n tokenSubID: string;\n amount: bigint;\n};\n\nexport type RailgunNFTAmountRecipient = RailgunNFTAmount & {\n recipientAddress: string;\n};\n\nexport type EncryptDataWithSharedKeyResponse = {\n encryptedData: [string, string];\n randomPubKey: string;\n sharedKey: Uint8Array;\n};\n\nexport type EncryptDataWithSharedKeySerialized = {\n encryptedData: [string, string];\n randomPubKey: string;\n sharedKey: string;\n};\n\nexport type Pbkdf2Response = string;\n\ntype SendAdditionalData = {\n recipientAddress: Optional<string>;\n walletSource: Optional<string>;\n memoText: Optional<string>;\n hasValidPOIForActiveLists: boolean;\n};\n\ntype HistoryAdditionalData = {\n hasValidPOIForActiveLists: boolean;\n};\n\nexport type RailgunHistoryERC20Amount = RailgunERC20Amount &\n HistoryAdditionalData;\n\nexport type RailgunHistoryNFTAmount = RailgunNFTAmount & HistoryAdditionalData;\n\nexport type RailgunHistorySendERC20Amount = RailgunHistoryERC20Amount &\n SendAdditionalData;\n\nexport type RailgunHistorySendNFTAmount = RailgunHistoryNFTAmount &\n SendAdditionalData;\n\ntype UnshieldAdditonalData = {\n unshieldFee: Optional<string>;\n hasValidPOIForActiveLists: boolean;\n};\n\nexport type RailgunHistoryUnshieldERC20Amount = RailgunHistorySendERC20Amount &\n UnshieldAdditonalData;\n\nexport type RailgunHistoryUnshieldNFTAmount = RailgunHistorySendNFTAmount &\n UnshieldAdditonalData;\n\ntype ReceiveAdditionalData = {\n senderAddress: Optional<string>;\n memoText: Optional<string>;\n shieldFee: Optional<string>;\n hasValidPOIForActiveLists: boolean;\n balanceBucket: RailgunWalletBalanceBucket;\n};\n\nexport type RailgunHistoryReceiveERC20Amount = RailgunHistoryERC20Amount &\n ReceiveAdditionalData;\n\nexport type RailgunHistoryReceiveNFTAmount = RailgunHistoryNFTAmount &\n ReceiveAdditionalData;\n\nexport enum TransactionHistoryItemCategory {\n ShieldERC20s = 'ShieldERC20s',\n UnshieldERC20s = 'UnshieldERC20s',\n TransferSendERC20s = 'TransferSendERC20s',\n TransferReceiveERC20s = 'TransferReceiveERC20s',\n Unknown = 'Unknown',\n}\n\nexport type TransactionHistoryItem = {\n txid: string;\n version: number;\n timestamp: Optional<number>;\n blockNumber: Optional<number>;\n receiveERC20Amounts: RailgunHistoryReceiveERC20Amount[];\n transferERC20Amounts: RailgunHistorySendERC20Amount[];\n changeERC20Amounts: RailgunHistoryERC20Amount[];\n relayerFeeERC20Amount?: RailgunHistoryERC20Amount;\n unshieldERC20Amounts: RailgunHistoryUnshieldERC20Amount[];\n receiveNFTAmounts: RailgunHistoryReceiveNFTAmount[];\n transferNFTAmounts: RailgunHistorySendNFTAmount[];\n unshieldNFTAmounts: RailgunHistoryUnshieldNFTAmount[];\n category: TransactionHistoryItemCategory;\n};\n\ntype Ciphertext = {\n iv: string;\n tag: string;\n data: string[];\n};\n\nexport type CommitmentCiphertext = {\n ciphertext: Ciphertext;\n blindedSenderViewingKey: string;\n blindedReceiverViewingKey: string;\n annotationData: string;\n memo: string;\n};\n\nexport type CommitmentSummary = {\n commitmentCiphertext: CommitmentCiphertext;\n commitmentHash: string;\n};\n"]}
|