@railgun-community/shared-models 6.0.3 → 6.0.7
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.
package/dist/models/relayer.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="../types/global" />
|
|
2
2
|
import { TXIDVersion } from './engine';
|
|
3
|
-
import { ChainType,
|
|
3
|
+
import { ChainType, CommitmentCiphertextV2, CommitmentCiphertextV3, PreTransactionPOIsPerTxidLeafPerList } from './response-types';
|
|
4
4
|
export type RelayerFeeMessageData = {
|
|
5
5
|
fees: MapType<string>;
|
|
6
6
|
feeExpiration: number;
|
|
@@ -40,7 +40,7 @@ export type RelayerRawParamsTransact = RelayerRawParamsShared & {
|
|
|
40
40
|
};
|
|
41
41
|
export type RelayerRawParamsPreAuthorize = RelayerRawParamsShared & {
|
|
42
42
|
gasLimit: string;
|
|
43
|
-
commitmentCiphertext:
|
|
43
|
+
commitmentCiphertext: CommitmentCiphertextV2 | CommitmentCiphertextV3;
|
|
44
44
|
commitmentHash: string;
|
|
45
45
|
};
|
|
46
46
|
export type RelayerPreAuthorization = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"relayer.js","sourceRoot":"","sources":["../../src/models/relayer.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"relayer.js","sourceRoot":"","sources":["../../src/models/relayer.ts"],"names":[],"mappings":";;;AAiFA,IAAY,uBAMX;AAND,WAAY,uBAAuB;IACjC,0CAAe,CAAA;IACf,kDAAuB,CAAA;IACvB,kDAAuB,CAAA;IACvB,wDAA6B,CAAA;IAC7B,4DAAiC,CAAA;AACnC,CAAC,EANW,uBAAuB,uCAAvB,uBAAuB,QAMlC","sourcesContent":["import { TXIDVersion } from './engine';\nimport {\n ChainType,\n CommitmentCiphertextV2,\n CommitmentCiphertextV3,\n PreTransactionPOIsPerTxidLeafPerList,\n} from './response-types';\n\nexport type RelayerFeeMessageData = {\n fees: MapType<string>;\n feeExpiration: number;\n feesID: string;\n railgunAddress: string;\n identifier: Optional<string>;\n availableWallets: number;\n version: string;\n relayAdapt: string;\n requiredPOIListKeys: string[];\n};\n\nexport type RelayerFeeMessage = {\n data: string; // hex-encoded FeeMessageData\n signature: string; // hex-encoded signature\n};\n\ntype EncryptedData = [string, string];\n\nexport type RelayerEncryptedMethodParams = {\n pubkey: string;\n encryptedData: EncryptedData;\n};\n\ntype RelayerRawParamsShared = {\n txidVersion: TXIDVersion;\n chainID: number;\n chainType: ChainType;\n feesID: string;\n relayerViewingKey: string;\n devLog: boolean;\n minVersion: string;\n maxVersion: string;\n};\n\nexport type RelayerRawParamsTransact = RelayerRawParamsShared & {\n to: string;\n data: string;\n minGasPrice: string;\n useRelayAdapt: boolean;\n preTransactionPOIsPerTxidLeafPerList: PreTransactionPOIsPerTxidLeafPerList;\n};\n\nexport type RelayerRawParamsPreAuthorize = RelayerRawParamsShared & {\n gasLimit: string;\n commitmentCiphertext: CommitmentCiphertextV2 | CommitmentCiphertextV3;\n commitmentHash: string;\n};\n\nexport type RelayerPreAuthorization = {\n gasLimit: string;\n commitmentHash: string;\n expiration: number;\n};\n\nexport type RelayerSignedPreAuthorization = RelayerPreAuthorization & {\n signature: string;\n};\n\nexport type CachedTokenFee = {\n feePerUnitGas: string;\n expiration: number;\n feesID: string;\n availableWallets: number;\n relayAdapt: string;\n};\n\nexport type SelectedRelayer = {\n railgunAddress: string;\n tokenAddress: string;\n tokenFee: CachedTokenFee;\n};\n\nexport enum RelayerConnectionStatus {\n Error = 'Error',\n Searching = 'Searching',\n Connected = 'Connected',\n Disconnected = 'Disconnected',\n AllUnavailable = 'AllUnavailable',\n}\n"]}
|
|
@@ -221,15 +221,29 @@ type Ciphertext = {
|
|
|
221
221
|
tag: string;
|
|
222
222
|
data: string[];
|
|
223
223
|
};
|
|
224
|
-
export
|
|
224
|
+
export declare enum XChaChaEncryptionAlgorithm {
|
|
225
|
+
XChaCha = "XChaCha",
|
|
226
|
+
XChaChaPoly1305 = "XChaChaPoly1305"
|
|
227
|
+
}
|
|
228
|
+
export type CiphertextXChaCha = {
|
|
229
|
+
algorithm: XChaChaEncryptionAlgorithm;
|
|
230
|
+
nonce: string;
|
|
231
|
+
bundle: string;
|
|
232
|
+
};
|
|
233
|
+
export type CommitmentCiphertextV2 = {
|
|
225
234
|
ciphertext: Ciphertext;
|
|
226
235
|
blindedSenderViewingKey: string;
|
|
227
236
|
blindedReceiverViewingKey: string;
|
|
228
237
|
annotationData: string;
|
|
229
238
|
memo: string;
|
|
230
239
|
};
|
|
240
|
+
export type CommitmentCiphertextV3 = {
|
|
241
|
+
ciphertext: CiphertextXChaCha;
|
|
242
|
+
blindedSenderViewingKey: string;
|
|
243
|
+
blindedReceiverViewingKey: string;
|
|
244
|
+
};
|
|
231
245
|
export type CommitmentSummary = {
|
|
232
|
-
commitmentCiphertext:
|
|
246
|
+
commitmentCiphertext: CommitmentCiphertextV2 | CommitmentCiphertextV3;
|
|
233
247
|
commitmentHash: string;
|
|
234
248
|
};
|
|
235
249
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TransactionHistoryItemCategory = exports.NFTTokenType = exports.POIProofEventStatus = exports.ChainType = exports.EVMGasType = void 0;
|
|
3
|
+
exports.XChaChaEncryptionAlgorithm = 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).
|
|
@@ -38,4 +38,9 @@ var TransactionHistoryItemCategory;
|
|
|
38
38
|
TransactionHistoryItemCategory["TransferReceiveERC20s"] = "TransferReceiveERC20s";
|
|
39
39
|
TransactionHistoryItemCategory["Unknown"] = "Unknown";
|
|
40
40
|
})(TransactionHistoryItemCategory || (exports.TransactionHistoryItemCategory = TransactionHistoryItemCategory = {}));
|
|
41
|
+
var XChaChaEncryptionAlgorithm;
|
|
42
|
+
(function (XChaChaEncryptionAlgorithm) {
|
|
43
|
+
XChaChaEncryptionAlgorithm["XChaCha"] = "XChaCha";
|
|
44
|
+
XChaChaEncryptionAlgorithm["XChaChaPoly1305"] = "XChaChaPoly1305";
|
|
45
|
+
})(XChaChaEncryptionAlgorithm || (exports.XChaChaEncryptionAlgorithm = XChaChaEncryptionAlgorithm = {}));
|
|
41
46
|
//# sourceMappingURL=response-types.js.map
|
|
@@ -1 +1 @@
|
|
|
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;AAgBD,IAAY,mBAKX;AALD,WAAY,mBAAmB;IAC7B,4DAAqC,CAAA;IACrC,gDAAyB,CAAA;IACzB,sCAAe,CAAA;IACf,gEAAyC,CAAA;AAC3C,CAAC,EALW,mBAAmB,mCAAnB,mBAAmB,QAK9B;AA4FD;;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 railgunWalletID: string;\n balanceBucket: RailgunWalletBalanceBucket;\n erc20Amounts: RailgunERC20Amount[];\n nftAmounts: RailgunNFTAmount[];\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 ProofProgressEvent = {\n progress: number;\n status: 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 Proof = {\n pi_a: [string, string];\n pi_b: [[string, string], [string, string]];\n pi_c: [string, string];\n};\n\nexport type PreTransactionPOI = {\n snarkProof: Proof;\n txidMerkleroot: string;\n poiMerkleroots: string[];\n blindedCommitmentsOut: string[];\n railgunTxidIfHasUnshield: string;\n};\n\nexport type PreTransactionPOIsPerTxidLeafPerList = Record<\n string, // listKey\n Record<\n string, // txidLeafHash\n PreTransactionPOI\n >\n>;\n\nexport type RailgunPopulateTransactionResponse = {\n transaction: ContractTransaction;\n nullifiers?: string[];\n preTransactionPOIsPerTxidLeafPerList: PreTransactionPOIsPerTxidLeafPerList;\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
|
|
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;AAgBD,IAAY,mBAKX;AALD,WAAY,mBAAmB;IAC7B,4DAAqC,CAAA;IACrC,gDAAyB,CAAA;IACzB,sCAAe,CAAA;IACf,gEAAyC,CAAA;AAC3C,CAAC,EALW,mBAAmB,mCAAnB,mBAAmB,QAK9B;AA4FD;;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;AAwBD,IAAY,0BAGX;AAHD,WAAY,0BAA0B;IACpC,iDAAmB,CAAA;IACnB,iEAAmC,CAAA;AACrC,CAAC,EAHW,0BAA0B,0CAA1B,0BAA0B,QAGrC","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 railgunWalletID: string;\n balanceBucket: RailgunWalletBalanceBucket;\n erc20Amounts: RailgunERC20Amount[];\n nftAmounts: RailgunNFTAmount[];\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 ProofProgressEvent = {\n progress: number;\n status: 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 Proof = {\n pi_a: [string, string];\n pi_b: [[string, string], [string, string]];\n pi_c: [string, string];\n};\n\nexport type PreTransactionPOI = {\n snarkProof: Proof;\n txidMerkleroot: string;\n poiMerkleroots: string[];\n blindedCommitmentsOut: string[];\n railgunTxidIfHasUnshield: string;\n};\n\nexport type PreTransactionPOIsPerTxidLeafPerList = Record<\n string, // listKey\n Record<\n string, // txidLeafHash\n PreTransactionPOI\n >\n>;\n\nexport type RailgunPopulateTransactionResponse = {\n transaction: ContractTransaction;\n nullifiers?: string[];\n preTransactionPOIsPerTxidLeafPerList: PreTransactionPOIsPerTxidLeafPerList;\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 enum XChaChaEncryptionAlgorithm {\n XChaCha = 'XChaCha',\n XChaChaPoly1305 = 'XChaChaPoly1305',\n}\n\nexport type CiphertextXChaCha = {\n algorithm: XChaChaEncryptionAlgorithm;\n nonce: string;\n bundle: string;\n};\n\nexport type CommitmentCiphertextV2 = {\n ciphertext: Ciphertext;\n blindedSenderViewingKey: string;\n blindedReceiverViewingKey: string;\n annotationData: string;\n memo: string;\n};\n\nexport type CommitmentCiphertextV3 = {\n ciphertext: CiphertextXChaCha;\n blindedSenderViewingKey: string;\n blindedReceiverViewingKey: string;\n};\n\nexport type CommitmentSummary = {\n commitmentCiphertext: CommitmentCiphertextV2 | CommitmentCiphertextV3;\n commitmentHash: string;\n};\n"]}
|