@railgun-community/shared-models 4.2.2 → 5.0.1
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,2 @@
|
|
|
1
|
-
import { Chain
|
|
2
|
-
export declare type RailgunBalanceRefreshTrigger = (chain: Chain, railgunWalletID: string, fullRescan: boolean) => Promise<
|
|
1
|
+
import { Chain } from './response-types';
|
|
2
|
+
export declare type RailgunBalanceRefreshTrigger = (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
|
|
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"]}
|
|
@@ -49,12 +49,6 @@ export declare type TransactionGasDetailsSerializedType2 = {
|
|
|
49
49
|
maxFeePerGasString: string;
|
|
50
50
|
maxPriorityFeePerGasString: string;
|
|
51
51
|
};
|
|
52
|
-
export declare type StartRailgunEngineResponse = {
|
|
53
|
-
error?: string;
|
|
54
|
-
};
|
|
55
|
-
export declare type DownloadInitialArtifactsResponse = {
|
|
56
|
-
error?: string;
|
|
57
|
-
};
|
|
58
52
|
export declare enum ChainType {
|
|
59
53
|
EVM = 0
|
|
60
54
|
}
|
|
@@ -75,42 +69,28 @@ export declare type MerkletreeScanUpdateEvent = {
|
|
|
75
69
|
};
|
|
76
70
|
export declare type LoadProviderResponse = {
|
|
77
71
|
feesSerialized?: FeesSerialized;
|
|
78
|
-
error?: string;
|
|
79
72
|
};
|
|
80
73
|
export declare type RailgunWalletInfo = {
|
|
81
74
|
id: string;
|
|
82
75
|
railgunAddress: string;
|
|
83
76
|
};
|
|
84
77
|
export declare type LoadRailgunWalletResponse = {
|
|
85
|
-
railgunWalletInfo
|
|
86
|
-
error?: string;
|
|
87
|
-
};
|
|
88
|
-
export declare type UnloadRailgunWalletResponse = {
|
|
89
|
-
error?: string;
|
|
78
|
+
railgunWalletInfo: RailgunWalletInfo;
|
|
90
79
|
};
|
|
91
80
|
export declare type RailgunWalletAddressDataSerialized = {
|
|
92
81
|
masterPublicKey: string;
|
|
93
82
|
viewingPublicKey: string;
|
|
94
83
|
};
|
|
95
|
-
export declare type RailgunBalanceResponse = {
|
|
96
|
-
error?: string;
|
|
97
|
-
};
|
|
98
|
-
export declare type RailgunProveTransactionResponse = {
|
|
99
|
-
error?: string;
|
|
100
|
-
};
|
|
101
84
|
export declare type RailgunTxidFromNullifiersResponse = {
|
|
102
85
|
txid?: string;
|
|
103
|
-
error?: string;
|
|
104
86
|
};
|
|
105
87
|
export declare type RailgunPopulateTransactionResponse = {
|
|
106
|
-
serializedTransaction
|
|
88
|
+
serializedTransaction: string;
|
|
107
89
|
nullifiers?: string[];
|
|
108
|
-
error?: string;
|
|
109
90
|
};
|
|
110
91
|
export declare type RailgunTransactionGasEstimateResponse = {
|
|
111
|
-
gasEstimateString
|
|
92
|
+
gasEstimateString: string;
|
|
112
93
|
relayerFeeCommitment?: CommitmentSummary;
|
|
113
|
-
error?: string;
|
|
114
94
|
};
|
|
115
95
|
export declare type RailgunERC20Amount = {
|
|
116
96
|
tokenAddress: string;
|
|
@@ -145,10 +125,6 @@ export declare type EncryptDataWithSharedKeySerialized = {
|
|
|
145
125
|
randomPubKey: string;
|
|
146
126
|
sharedKey: string;
|
|
147
127
|
};
|
|
148
|
-
export declare type ValidateCachedProvedTransactionResponse = {
|
|
149
|
-
isValid: boolean;
|
|
150
|
-
error?: string;
|
|
151
|
-
};
|
|
152
128
|
export declare type Pbkdf2Response = string;
|
|
153
129
|
declare type SendAdditionalData = {
|
|
154
130
|
recipientAddress: Optional<string>;
|
|
@@ -192,8 +168,7 @@ export declare type TransactionHistoryItem = {
|
|
|
192
168
|
category: TransactionHistoryItemCategory;
|
|
193
169
|
};
|
|
194
170
|
export declare type TransactionHistorySerializedResponse = {
|
|
195
|
-
items
|
|
196
|
-
error?: string;
|
|
171
|
+
items: TransactionHistoryItem[];
|
|
197
172
|
};
|
|
198
173
|
declare type Ciphertext = {
|
|
199
174
|
iv: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"response-types.js","sourceRoot":"","sources":["../../src/models/response-types.ts"],"names":[],"mappings":";;;AASA;;;GAGG;AACH,IAAY,UAIX;AAJD,WAAY,UAAU;IACpB,6CAAS,CAAA;IACT,6CAAS,CAAA;IACT,6CAAS,CAAA;AACX,CAAC,EAJW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAIrB;
|
|
1
|
+
{"version":3,"file":"response-types.js","sourceRoot":"","sources":["../../src/models/response-types.ts"],"names":[],"mappings":";;;AASA;;;GAGG;AACH,IAAY,UAIX;AAJD,WAAY,UAAU;IACpB,6CAAS,CAAA;IACT,6CAAS,CAAA;IACT,6CAAS,CAAA;AACX,CAAC,EAJW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAIrB;AAkDD,IAAY,SAEX;AAFD,WAAY,SAAS;IACnB,uCAAO,CAAA;AACT,CAAC,EAFW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAEpB;AA6DD;;GAEG;AACH,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,mDAAU,CAAA;IACV,qDAAW,CAAA;AACb,CAAC,EAHW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAGvB;AA0DD,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,GAA9B,sCAA8B,KAA9B,sCAA8B,QAMzC","sourcesContent":["import { BigNumber } from '@ethersproject/bignumber';\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: BigNumber;\n gasPrice: BigNumber;\n};\n\nexport type TransactionGasDetailsType1 = {\n evmGasType: EVMGasType.Type1;\n gasEstimate: BigNumber;\n gasPrice: BigNumber;\n};\n\nexport type TransactionGasDetailsType2 = {\n evmGasType: EVMGasType.Type2;\n gasEstimate: BigNumber;\n maxFeePerGas: BigNumber;\n maxPriorityFeePerGas: BigNumber;\n};\n\nexport type TransactionGasDetailsSerialized =\n | TransactionGasDetailsSerializedType0\n | TransactionGasDetailsSerializedType1\n | TransactionGasDetailsSerializedType2;\n\nexport type TransactionGasDetailsSerializedType0 = {\n evmGasType: EVMGasType.Type0;\n gasEstimateString: string;\n gasPriceString: string;\n};\n\nexport type TransactionGasDetailsSerializedType1 = {\n evmGasType: EVMGasType.Type1;\n gasEstimateString: string;\n gasPriceString: string;\n};\n\nexport type TransactionGasDetailsSerializedType2 = {\n evmGasType: EVMGasType.Type2;\n gasEstimateString: string;\n maxFeePerGasString: string;\n maxPriorityFeePerGasString: string;\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 LoadRailgunWalletResponse = {\n railgunWalletInfo: RailgunWalletInfo;\n};\n\nexport type RailgunWalletAddressDataSerialized = {\n masterPublicKey: string;\n viewingPublicKey: string;\n};\n\nexport type RailgunTxidFromNullifiersResponse = {\n txid?: string;\n};\n\nexport type RailgunPopulateTransactionResponse = {\n serializedTransaction: string;\n nullifiers?: string[];\n};\n\nexport type RailgunTransactionGasEstimateResponse = {\n gasEstimateString: string;\n relayerFeeCommitment?: CommitmentSummary;\n};\n\nexport type RailgunERC20Amount = {\n tokenAddress: string;\n amountString: string;\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 RailgunNFTAmount = {\n nftAddress: string;\n nftTokenType: NFTTokenType;\n tokenSubID: string;\n amountString: string;\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\nexport type TransactionHistorySerializedResponse = {\n items: TransactionHistoryItem[];\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"]}
|