@railgun-community/shared-models 5.6.0 → 5.6.2

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.
@@ -1,2 +1,3 @@
1
+ import { TXIDVersion } from './engine';
1
2
  import { Chain } from './response-types';
2
- export type RailgunBalanceRefreshTrigger = (chain: Chain, railgunWalletID: string, fullRescan: boolean) => Promise<void>;
3
+ export type RailgunBalanceRefreshTrigger = (txidVersion: TXIDVersion, chain: Chain, railgunWalletID: string, fullRescan: boolean) => Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"function-types.js","sourceRoot":"","sources":["../../src/models/function-types.ts"],"names":[],"mappings":"","sourcesContent":["import { Chain } from './response-types';\n\nexport type RailgunBalanceRefreshTrigger = (\n chain: Chain,\n railgunWalletID: string,\n fullRescan: boolean,\n) => Promise<void>;\n"]}
1
+ {"version":3,"file":"function-types.js","sourceRoot":"","sources":["../../src/models/function-types.ts"],"names":[],"mappings":"","sourcesContent":["import { TXIDVersion } from './engine';\nimport { Chain } from './response-types';\n\nexport type RailgunBalanceRefreshTrigger = (\n txidVersion: TXIDVersion,\n chain: Chain,\n railgunWalletID: string,\n fullRescan: boolean,\n) => Promise<void>;\n"]}
@@ -1,4 +1,5 @@
1
1
  /// <reference types="../types/global" />
2
+ import { TXIDVersion } from './engine';
2
3
  import { NetworkName } from './network-config';
3
4
  export type TransactProofData = {
4
5
  snarkProof: SnarkProof;
@@ -32,12 +33,15 @@ export type POIListStatus = {
32
33
  blockedShields: number;
33
34
  };
34
35
  export type GetTransactProofsParams = {
36
+ txidVersion: TXIDVersion;
35
37
  bloomFilterSerialized: string;
36
38
  };
37
39
  export type GetBlockedShieldsParams = {
40
+ txidVersion: TXIDVersion;
38
41
  bloomFilterSerialized: string;
39
42
  };
40
43
  export type SubmitTransactProofParams = {
44
+ txidVersion: TXIDVersion;
41
45
  listKey: string;
42
46
  transactProofData: TransactProofData;
43
47
  };
@@ -50,18 +54,24 @@ export type BlindedCommitmentData = {
50
54
  type: BlindedCommitmentType;
51
55
  };
52
56
  export type GetPOIsPerListParams = {
57
+ txidVersion: TXIDVersion;
53
58
  listKeys: string[];
54
59
  blindedCommitmentDatas: BlindedCommitmentData[];
55
60
  };
56
61
  export type GetMerkleProofsParams = {
62
+ txidVersion: TXIDVersion;
57
63
  listKey: string;
58
64
  blindedCommitments: string[];
59
65
  };
60
66
  export type ValidateTxidMerklerootParams = {
67
+ txidVersion: TXIDVersion;
61
68
  tree: number;
62
69
  index: number;
63
70
  merkleroot: string;
64
71
  };
72
+ export type GetLatestValidatedRailgunTxidParams = {
73
+ txidVersion: TXIDVersion;
74
+ };
65
75
  export declare enum POIStatus {
66
76
  Valid = "Valid",
67
77
  ShieldPending = "ShieldPending",
@@ -1 +1 @@
1
- {"version":3,"file":"proof-of-innocence.js","sourceRoot":"","sources":["../../src/models/proof-of-innocence.ts"],"names":[],"mappings":";;;AAmDA,IAAY,qBAGX;AAHD,WAAY,qBAAqB;IAC/B,0CAAiB,CAAA;IACjB,8CAAqB,CAAA;AACvB,CAAC,EAHW,qBAAqB,qCAArB,qBAAqB,QAGhC;AAuBD,IAAY,SAWX;AAXD,WAAY,SAAS;IACnB,6BAA6B;IAC7B,4BAAe,CAAA;IACf,iDAAiD;IACjD,4CAA+B,CAAA;IAC/B,iBAAiB;IACjB,4CAA+B,CAAA;IAC/B,kDAAkD;IAClD,8DAAiD,CAAA;IACjD,WAAW;IACX,gCAAmB,CAAA;AACrB,CAAC,EAXW,SAAS,yBAAT,SAAS,QAWpB","sourcesContent":["import { NetworkName } from './network-config';\n\nexport type TransactProofData = {\n snarkProof: SnarkProof;\n poiMerkleroots: string[];\n txidMerkleroot: string;\n txidMerklerootIndex: number;\n blindedCommitmentOutputs: string[];\n};\n\nexport type SnarkProof = {\n pi_a: [string, string];\n pi_b: [[string, string], [string, string]];\n pi_c: [string, string];\n};\n\nexport type MerkleProof = {\n leaf: string; // hash of commitment\n elements: string[];\n indices: string;\n root: string;\n};\n\nexport type ShieldQueueStatus = {\n unknown: number;\n pending: number;\n allowed: number;\n blocked: number;\n addedPOI: number;\n latestShield: Optional<string>;\n};\n\nexport type POIListStatus = {\n poiEvents: number;\n pendingTransactProofs: number;\n blockedShields: number;\n};\n\nexport type GetTransactProofsParams = {\n bloomFilterSerialized: string;\n};\n\nexport type GetBlockedShieldsParams = {\n bloomFilterSerialized: string;\n};\n\nexport type SubmitTransactProofParams = {\n listKey: string;\n transactProofData: TransactProofData;\n};\n\nexport enum BlindedCommitmentType {\n Shield = 'Shield',\n Transact = 'Transact',\n}\n\nexport type BlindedCommitmentData = {\n blindedCommitment: string;\n type: BlindedCommitmentType;\n};\n\nexport type GetPOIsPerListParams = {\n listKeys: string[];\n blindedCommitmentDatas: BlindedCommitmentData[];\n};\n\nexport type GetMerkleProofsParams = {\n listKey: string;\n blindedCommitments: string[];\n};\n\nexport type ValidateTxidMerklerootParams = {\n tree: number;\n index: number;\n merkleroot: string;\n};\n\nexport enum POIStatus {\n // POI valdated in event list\n Valid = 'Valid',\n // Shield indexed, but not allowed or blocked yet\n ShieldPending = 'ShieldPending',\n // Shield blocked\n ShieldBlocked = 'ShieldBlocked',\n // Transact proof submitted, but not validated yet\n TransactProofSubmitted = 'TransactProofSubmitted',\n // No proof\n Missing = 'Missing',\n}\n\nexport type POIsPerList = {\n [listKey: string]: POIStatus;\n};\n\nexport type POIsPerListMap = {\n [blindedCommitment: string]: POIsPerList;\n};\n\nexport type TxidMerkletreeSyncStatus = {\n currentTxidIndex: number;\n currentMerkleroot: string;\n validatedTxidIndex: number;\n validatedMerkleroot: string;\n};\n\nexport type RailgunTxidStatus = {\n currentTxidIndex: Optional<number>;\n currentMerkleroot: Optional<string>;\n validatedTxidIndex: Optional<number>;\n validatedMerkleroot: Optional<string>;\n};\n\nexport type ValidatedRailgunTxidStatus = {\n validatedTxidIndex: Optional<number>;\n validatedMerkleroot: Optional<string>;\n};\n\nexport type NodeStatusAllNetworks = {\n listKeys: string[];\n forNetwork: Partial<Record<NetworkName, NodeStatusForNetwork>>;\n};\n\nexport type NodeStatusForNetwork = {\n txidStatus: RailgunTxidStatus;\n shieldQueueStatus: ShieldQueueStatus;\n listStatuses: Record<string, POIListStatus>;\n};\n"]}
1
+ {"version":3,"file":"proof-of-innocence.js","sourceRoot":"","sources":["../../src/models/proof-of-innocence.ts"],"names":[],"mappings":";;;AAuDA,IAAY,qBAGX;AAHD,WAAY,qBAAqB;IAC/B,0CAAiB,CAAA;IACjB,8CAAqB,CAAA;AACvB,CAAC,EAHW,qBAAqB,qCAArB,qBAAqB,QAGhC;AA8BD,IAAY,SAWX;AAXD,WAAY,SAAS;IACnB,6BAA6B;IAC7B,4BAAe,CAAA;IACf,iDAAiD;IACjD,4CAA+B,CAAA;IAC/B,iBAAiB;IACjB,4CAA+B,CAAA;IAC/B,kDAAkD;IAClD,8DAAiD,CAAA;IACjD,WAAW;IACX,gCAAmB,CAAA;AACrB,CAAC,EAXW,SAAS,yBAAT,SAAS,QAWpB","sourcesContent":["import { TXIDVersion } from './engine';\nimport { NetworkName } from './network-config';\n\nexport type TransactProofData = {\n snarkProof: SnarkProof;\n poiMerkleroots: string[];\n txidMerkleroot: string;\n txidMerklerootIndex: number;\n blindedCommitmentOutputs: string[];\n};\n\nexport type SnarkProof = {\n pi_a: [string, string];\n pi_b: [[string, string], [string, string]];\n pi_c: [string, string];\n};\n\nexport type MerkleProof = {\n leaf: string; // hash of commitment\n elements: string[];\n indices: string;\n root: string;\n};\n\nexport type ShieldQueueStatus = {\n unknown: number;\n pending: number;\n allowed: number;\n blocked: number;\n addedPOI: number;\n latestShield: Optional<string>;\n};\n\nexport type POIListStatus = {\n poiEvents: number;\n pendingTransactProofs: number;\n blockedShields: number;\n};\n\nexport type GetTransactProofsParams = {\n txidVersion: TXIDVersion;\n bloomFilterSerialized: string;\n};\n\nexport type GetBlockedShieldsParams = {\n txidVersion: TXIDVersion;\n bloomFilterSerialized: string;\n};\n\nexport type SubmitTransactProofParams = {\n txidVersion: TXIDVersion;\n listKey: string;\n transactProofData: TransactProofData;\n};\n\nexport enum BlindedCommitmentType {\n Shield = 'Shield',\n Transact = 'Transact',\n}\n\nexport type BlindedCommitmentData = {\n blindedCommitment: string;\n type: BlindedCommitmentType;\n};\n\nexport type GetPOIsPerListParams = {\n txidVersion: TXIDVersion;\n listKeys: string[];\n blindedCommitmentDatas: BlindedCommitmentData[];\n};\n\nexport type GetMerkleProofsParams = {\n txidVersion: TXIDVersion;\n listKey: string;\n blindedCommitments: string[];\n};\n\nexport type ValidateTxidMerklerootParams = {\n txidVersion: TXIDVersion;\n tree: number;\n index: number;\n merkleroot: string;\n};\n\nexport type GetLatestValidatedRailgunTxidParams = {\n txidVersion: TXIDVersion;\n};\n\nexport enum POIStatus {\n // POI valdated in event list\n Valid = 'Valid',\n // Shield indexed, but not allowed or blocked yet\n ShieldPending = 'ShieldPending',\n // Shield blocked\n ShieldBlocked = 'ShieldBlocked',\n // Transact proof submitted, but not validated yet\n TransactProofSubmitted = 'TransactProofSubmitted',\n // No proof\n Missing = 'Missing',\n}\n\nexport type POIsPerList = {\n [listKey: string]: POIStatus;\n};\n\nexport type POIsPerListMap = {\n [blindedCommitment: string]: POIsPerList;\n};\n\nexport type TxidMerkletreeSyncStatus = {\n currentTxidIndex: number;\n currentMerkleroot: string;\n validatedTxidIndex: number;\n validatedMerkleroot: string;\n};\n\nexport type RailgunTxidStatus = {\n currentTxidIndex: Optional<number>;\n currentMerkleroot: Optional<string>;\n validatedTxidIndex: Optional<number>;\n validatedMerkleroot: Optional<string>;\n};\n\nexport type ValidatedRailgunTxidStatus = {\n validatedTxidIndex: Optional<number>;\n validatedMerkleroot: Optional<string>;\n};\n\nexport type NodeStatusAllNetworks = {\n listKeys: string[];\n forNetwork: Partial<Record<NetworkName, NodeStatusForNetwork>>;\n};\n\nexport type NodeStatusForNetwork = {\n txidStatus: RailgunTxidStatus;\n shieldQueueStatus: ShieldQueueStatus;\n listStatuses: Record<string, POIListStatus>;\n};\n"]}
@@ -2,6 +2,7 @@
2
2
  import { ContractTransaction } from 'ethers';
3
3
  import { MerkletreeScanStatus } from './merkletree-scan';
4
4
  import { FeesSerialized } from './network-config';
5
+ import { TXIDVersion } from './engine';
5
6
  export type RailgunAPICiphertext = {
6
7
  iv: string;
7
8
  data: string[];
@@ -44,6 +45,7 @@ export type Chain = {
44
45
  id: number;
45
46
  };
46
47
  export type RailgunBalancesEvent = {
48
+ txidVersion: TXIDVersion;
47
49
  chain: Chain;
48
50
  erc20Amounts: RailgunERC20Amount[];
49
51
  nftAmounts: RailgunNFTAmount[];
@@ -1 +1 @@
1
- {"version":3,"file":"response-types.js","sourceRoot":"","sources":["../../src/models/response-types.ts"],"names":[],"mappings":";;;AAUA;;;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;AA8DD;;GAEG;AACH,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,mDAAU,CAAA;IACV,qDAAW,CAAA;AACb,CAAC,EAHW,YAAY,4BAAZ,YAAY,QAGvB;AAqED,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';\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 chain: Chain;\n erc20Amounts: RailgunERC20Amount[];\n nftAmounts: RailgunNFTAmount[];\n railgunWalletID: 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};\n\nexport type RailgunSendERC20Amount = RailgunERC20Amount & SendAdditionalData;\n\nexport type RailgunSendNFTAmount = RailgunNFTAmount & SendAdditionalData;\n\ntype UnshieldAdditonalData = {\n unshieldFee: Optional<string>;\n};\n\nexport type RailgunUnshieldERC20Amount = RailgunSendERC20Amount &\n UnshieldAdditonalData;\n\nexport type RailgunUnshieldNFTAmount = RailgunSendNFTAmount &\n UnshieldAdditonalData;\n\ntype ReceiveAdditionalData = {\n senderAddress: Optional<string>;\n memoText: Optional<string>;\n shieldFee: Optional<string>;\n};\n\nexport type RailgunReceiveERC20Amount = RailgunERC20Amount &\n ReceiveAdditionalData;\n\nexport type RailgunReceiveNFTAmount = RailgunNFTAmount & 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: RailgunReceiveERC20Amount[];\n transferERC20Amounts: RailgunSendERC20Amount[];\n changeERC20Amounts: RailgunERC20Amount[];\n relayerFeeERC20Amount?: RailgunERC20Amount;\n unshieldERC20Amounts: RailgunUnshieldERC20Amount[];\n receiveNFTAmounts: RailgunReceiveNFTAmount[];\n transferNFTAmounts: RailgunSendNFTAmount[];\n unshieldNFTAmounts: RailgunUnshieldNFTAmount[];\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"]}
1
+ {"version":3,"file":"response-types.js","sourceRoot":"","sources":["../../src/models/response-types.ts"],"names":[],"mappings":";;;AAWA;;;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;AA+DD;;GAEG;AACH,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,mDAAU,CAAA;IACV,qDAAW,CAAA;AACb,CAAC,EAHW,YAAY,4BAAZ,YAAY,QAGvB;AAqED,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';\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 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};\n\nexport type RailgunSendERC20Amount = RailgunERC20Amount & SendAdditionalData;\n\nexport type RailgunSendNFTAmount = RailgunNFTAmount & SendAdditionalData;\n\ntype UnshieldAdditonalData = {\n unshieldFee: Optional<string>;\n};\n\nexport type RailgunUnshieldERC20Amount = RailgunSendERC20Amount &\n UnshieldAdditonalData;\n\nexport type RailgunUnshieldNFTAmount = RailgunSendNFTAmount &\n UnshieldAdditonalData;\n\ntype ReceiveAdditionalData = {\n senderAddress: Optional<string>;\n memoText: Optional<string>;\n shieldFee: Optional<string>;\n};\n\nexport type RailgunReceiveERC20Amount = RailgunERC20Amount &\n ReceiveAdditionalData;\n\nexport type RailgunReceiveNFTAmount = RailgunNFTAmount & 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: RailgunReceiveERC20Amount[];\n transferERC20Amounts: RailgunSendERC20Amount[];\n changeERC20Amounts: RailgunERC20Amount[];\n relayerFeeERC20Amount?: RailgunERC20Amount;\n unshieldERC20Amounts: RailgunUnshieldERC20Amount[];\n receiveNFTAmounts: RailgunReceiveNFTAmount[];\n transferNFTAmounts: RailgunSendNFTAmount[];\n unshieldNFTAmounts: RailgunUnshieldNFTAmount[];\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"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@railgun-community/shared-models",
3
- "version": "5.6.0",
3
+ "version": "5.6.2",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "files": [