@railgun-community/shared-models 1.4.0 → 2.0.3
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/network-config.d.ts +8 -8
- package/dist/models/network-config.js +26 -25
- package/dist/models/network-config.js.map +1 -1
- package/dist/models/proof.d.ts +2 -2
- package/dist/models/proof.js +2 -2
- package/dist/models/proof.js.map +1 -1
- package/dist/models/response-types.d.ts +1 -0
- package/dist/models/response-types.js.map +1 -1
- package/package.json +1 -1
|
@@ -10,8 +10,8 @@ export declare enum NetworkName {
|
|
|
10
10
|
Hardhat = "Hardhat"
|
|
11
11
|
}
|
|
12
12
|
export declare type FeesSerialized = {
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
shield: string;
|
|
14
|
+
unshield: string;
|
|
15
15
|
nft: string;
|
|
16
16
|
};
|
|
17
17
|
declare type BaseToken = {
|
|
@@ -42,8 +42,8 @@ export declare enum RailgunProxyContract {
|
|
|
42
42
|
EthereumGoerli = "0xe8bEa99BB438C2f3D533604D33258d74d5eE4824",
|
|
43
43
|
BNBChain = "0x590162bf4b50f6576a459b75309ee21d92178a10",
|
|
44
44
|
PolygonPOS = "0x19b620929f97b7b990801496c3b361ca5def8c71",
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
PolygonMumbai = "0x3ee8306321d992483BDC9c69B8F622Ba3FFF05B6",
|
|
46
|
+
Hardhat = "0x610178dA211FEF7D417bC0e6FeD39F05609AD788"
|
|
47
47
|
}
|
|
48
48
|
export declare enum RelayAdaptContract {
|
|
49
49
|
Ethereum = "0x22af4EDBeA3De885dDa8f0a0653E6209e44e5B84",
|
|
@@ -51,8 +51,8 @@ export declare enum RelayAdaptContract {
|
|
|
51
51
|
EthereumGoerli = "0xD147B7Dfa636a1c50A52bF6A6FE910680274eE24",
|
|
52
52
|
BNBChain = "0x20d868C7F1Eb706C46641ADD2f849c5DBf4dB158",
|
|
53
53
|
PolygonPOS = "0x30D8AD0339e2CF160620589f2DBa1765126A5fDC",
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
PolygonMumbai = "0x8B936B018CeA1c1cc14961CAdabD36E7fe9192cD",
|
|
55
|
+
Hardhat = "0xc5a5C42992dECbae36851359345FE25997F5C42d"
|
|
56
56
|
}
|
|
57
57
|
export declare enum RailgunProxyDeploymentBlock {
|
|
58
58
|
Ethereum = 14737691,
|
|
@@ -67,10 +67,10 @@ export declare enum BaseTokenWrappedAddress {
|
|
|
67
67
|
EthereumWETH = "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
|
|
68
68
|
EthereumRopstenWETH = "0xc778417e063141139fce010982780140aa0cd5ab",
|
|
69
69
|
EthereumGoerliWETH = "0xb4fbf271143f4fbf7b91a5ded31805e42b2208d6",
|
|
70
|
-
HardhatWETH = "0x322813Fd9A801c5507c9de605d63CEA4f2CE6c44",
|
|
71
70
|
BinanceWBNB = "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c",
|
|
72
71
|
PolygonWMATIC = "0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270",
|
|
73
|
-
PolygonMumbaiWMATIC = "0x9c3C9283D3e44854697Cd22D3Faa240Cfb032889"
|
|
72
|
+
PolygonMumbaiWMATIC = "0x9c3C9283D3e44854697Cd22D3Faa240Cfb032889",
|
|
73
|
+
HardhatWETH = "0x09635F643e140090A9A8Dcd712eD6285858ceBef"
|
|
74
74
|
}
|
|
75
75
|
/**
|
|
76
76
|
* Type0 = non-EIP-1559 (gasPrice).
|
|
@@ -24,8 +24,8 @@ var RailgunProxyContract;
|
|
|
24
24
|
RailgunProxyContract["EthereumGoerli"] = "0xe8bEa99BB438C2f3D533604D33258d74d5eE4824";
|
|
25
25
|
RailgunProxyContract["BNBChain"] = "0x590162bf4b50f6576a459b75309ee21d92178a10";
|
|
26
26
|
RailgunProxyContract["PolygonPOS"] = "0x19b620929f97b7b990801496c3b361ca5def8c71";
|
|
27
|
-
RailgunProxyContract["Hardhat"] = "0x0165878A594ca255338adfa4d48449f69242Eb8F";
|
|
28
27
|
RailgunProxyContract["PolygonMumbai"] = "0x3ee8306321d992483BDC9c69B8F622Ba3FFF05B6";
|
|
28
|
+
RailgunProxyContract["Hardhat"] = "0x610178dA211FEF7D417bC0e6FeD39F05609AD788";
|
|
29
29
|
})(RailgunProxyContract = exports.RailgunProxyContract || (exports.RailgunProxyContract = {}));
|
|
30
30
|
var RelayAdaptContract;
|
|
31
31
|
(function (RelayAdaptContract) {
|
|
@@ -34,8 +34,8 @@ var RelayAdaptContract;
|
|
|
34
34
|
RelayAdaptContract["EthereumGoerli"] = "0xD147B7Dfa636a1c50A52bF6A6FE910680274eE24";
|
|
35
35
|
RelayAdaptContract["BNBChain"] = "0x20d868C7F1Eb706C46641ADD2f849c5DBf4dB158";
|
|
36
36
|
RelayAdaptContract["PolygonPOS"] = "0x30D8AD0339e2CF160620589f2DBa1765126A5fDC";
|
|
37
|
-
RelayAdaptContract["Hardhat"] = "0xa85233C63b9Ee964Add6F2cffe00Fd84eb32338f";
|
|
38
37
|
RelayAdaptContract["PolygonMumbai"] = "0x8B936B018CeA1c1cc14961CAdabD36E7fe9192cD";
|
|
38
|
+
RelayAdaptContract["Hardhat"] = "0xc5a5C42992dECbae36851359345FE25997F5C42d";
|
|
39
39
|
})(RelayAdaptContract = exports.RelayAdaptContract || (exports.RelayAdaptContract = {}));
|
|
40
40
|
var RailgunProxyDeploymentBlock;
|
|
41
41
|
(function (RailgunProxyDeploymentBlock) {
|
|
@@ -52,10 +52,10 @@ var BaseTokenWrappedAddress;
|
|
|
52
52
|
BaseTokenWrappedAddress["EthereumWETH"] = "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2";
|
|
53
53
|
BaseTokenWrappedAddress["EthereumRopstenWETH"] = "0xc778417e063141139fce010982780140aa0cd5ab";
|
|
54
54
|
BaseTokenWrappedAddress["EthereumGoerliWETH"] = "0xb4fbf271143f4fbf7b91a5ded31805e42b2208d6";
|
|
55
|
-
BaseTokenWrappedAddress["HardhatWETH"] = "0x322813Fd9A801c5507c9de605d63CEA4f2CE6c44";
|
|
56
55
|
BaseTokenWrappedAddress["BinanceWBNB"] = "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c";
|
|
57
56
|
BaseTokenWrappedAddress["PolygonWMATIC"] = "0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270";
|
|
58
57
|
BaseTokenWrappedAddress["PolygonMumbaiWMATIC"] = "0x9c3C9283D3e44854697Cd22D3Faa240Cfb032889";
|
|
58
|
+
BaseTokenWrappedAddress["HardhatWETH"] = "0x09635F643e140090A9A8Dcd712eD6285858ceBef";
|
|
59
59
|
})(BaseTokenWrappedAddress = exports.BaseTokenWrappedAddress || (exports.BaseTokenWrappedAddress = {}));
|
|
60
60
|
/**
|
|
61
61
|
* Type0 = non-EIP-1559 (gasPrice).
|
|
@@ -193,28 +193,6 @@ exports.NETWORK_CONFIG = (_a = {},
|
|
|
193
193
|
evmGasType: EVMGasType.Type2,
|
|
194
194
|
shouldQuickSync: true
|
|
195
195
|
},
|
|
196
|
-
_a[NetworkName.Hardhat] = {
|
|
197
|
-
chain: {
|
|
198
|
-
type: response_types_1.ChainType.EVM,
|
|
199
|
-
id: 31337
|
|
200
|
-
},
|
|
201
|
-
name: NetworkName.Hardhat,
|
|
202
|
-
publicName: 'Hardhat Testnet',
|
|
203
|
-
shortPublicName: 'Hardhat',
|
|
204
|
-
coingeckoId: '',
|
|
205
|
-
baseToken: {
|
|
206
|
-
symbol: 'ETH',
|
|
207
|
-
wrappedSymbol: 'WETH',
|
|
208
|
-
wrappedAddress: BaseTokenWrappedAddress.HardhatWETH,
|
|
209
|
-
decimals: 18
|
|
210
|
-
},
|
|
211
|
-
proxyContract: RailgunProxyContract.Hardhat,
|
|
212
|
-
relayAdaptContract: RelayAdaptContract.Hardhat,
|
|
213
|
-
deploymentBlock: RailgunProxyDeploymentBlock.Hardhat,
|
|
214
|
-
isDevOnlyNetwork: true,
|
|
215
|
-
evmGasType: EVMGasType.Type2,
|
|
216
|
-
shouldQuickSync: false
|
|
217
|
-
},
|
|
218
196
|
_a[NetworkName.PolygonMumbai] = {
|
|
219
197
|
chain: {
|
|
220
198
|
type: response_types_1.ChainType.EVM,
|
|
@@ -238,6 +216,29 @@ exports.NETWORK_CONFIG = (_a = {},
|
|
|
238
216
|
evmGasType: EVMGasType.Type2,
|
|
239
217
|
shouldQuickSync: true
|
|
240
218
|
},
|
|
219
|
+
_a[NetworkName.Hardhat] = {
|
|
220
|
+
chain: {
|
|
221
|
+
type: response_types_1.ChainType.EVM,
|
|
222
|
+
id: 31337
|
|
223
|
+
},
|
|
224
|
+
name: NetworkName.Hardhat,
|
|
225
|
+
publicName: 'Hardhat Testnet',
|
|
226
|
+
shortPublicName: 'Hardhat',
|
|
227
|
+
coingeckoId: '',
|
|
228
|
+
baseToken: {
|
|
229
|
+
symbol: 'ETH',
|
|
230
|
+
wrappedSymbol: 'WETH',
|
|
231
|
+
wrappedAddress: BaseTokenWrappedAddress.HardhatWETH,
|
|
232
|
+
decimals: 18
|
|
233
|
+
},
|
|
234
|
+
proxyContract: RailgunProxyContract.Hardhat,
|
|
235
|
+
relayAdaptContract: RelayAdaptContract.Hardhat,
|
|
236
|
+
deploymentBlock: RailgunProxyDeploymentBlock.Hardhat,
|
|
237
|
+
isDevOnlyNetwork: true,
|
|
238
|
+
isTestnet: true,
|
|
239
|
+
evmGasType: EVMGasType.Type2,
|
|
240
|
+
shouldQuickSync: false
|
|
241
|
+
},
|
|
241
242
|
_a);
|
|
242
243
|
var networkForChain = function (chain) {
|
|
243
244
|
return Object.values(exports.NETWORK_CONFIG).find(function (network) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"network-config.js","sourceRoot":"","sources":["../../src/models/network-config.ts"],"names":[],"mappings":";;;;AAAA,mDAAoD;AAEpD,IAAY,WAcX;AAdD,WAAY,WAAW;IACrB,WAAW;IACX,kCAAmB,CAAA;IACnB,oCAAqB,CAAA;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AAe,mBAK1B","sourcesContent":["import { Chain, ChainType } from './response-types';\n\nexport enum NetworkName {\n // Mainnets\n Railgun = 'Railgun',\n Ethereum = 'Ethereum',\n BNBChain = 'BNB_Chain',\n Polygon = 'Polygon',\n\n // Testnets\n EthereumRopsten_DEPRECATED = 'Ethereum_Ropsten',\n EthereumGoerli = 'Ethereum_Goerli',\n PolygonMumbai = 'Polygon_Mumbai',\n\n // Dev only\n Hardhat = 'Hardhat',\n}\n\nexport type FeesSerialized = {\n deposit: string;\n withdraw: string;\n nft: string;\n};\n\ntype BaseToken = {\n symbol: string;\n wrappedSymbol: string;\n wrappedAddress: BaseTokenWrappedAddress;\n decimals: number;\n};\n\nexport type Network = {\n chain: Chain;\n name: NetworkName;\n publicName: string;\n shortPublicName: string;\n coingeckoId: string;\n baseToken: BaseToken;\n proxyContract: RailgunProxyContract;\n relayAdaptContract: RelayAdaptContract;\n deploymentBlock: RailgunProxyDeploymentBlock;\n isDevOnlyNetwork?: boolean;\n isTestnet?: boolean;\n evmGasType: EVMGasType;\n shouldQuickSync: boolean;\n deprecated?: boolean;\n};\n\nexport enum RailgunProxyContract {\n Ethereum = '0xfa7093cdd9ee6932b4eb2c9e1cde7ce00b1fa4b9',\n EthereumRopsten = '0x1c2A4092e2a436d78FcdF3a178a4E1ed87f0bB8F',\n EthereumGoerli = '0xe8bEa99BB438C2f3D533604D33258d74d5eE4824',\n BNBChain = '0x590162bf4b50f6576a459b75309ee21d92178a10',\n PolygonPOS = '0x19b620929f97b7b990801496c3b361ca5def8c71',\n Hardhat = '0x0165878A594ca255338adfa4d48449f69242Eb8F',\n PolygonMumbai = '0x3ee8306321d992483BDC9c69B8F622Ba3FFF05B6',\n}\n\nexport enum RelayAdaptContract {\n Ethereum = '0x22af4EDBeA3De885dDa8f0a0653E6209e44e5B84',\n EthereumRopsten = '0x95abeff80554b23cefe1d3f8dcff3b7d90e28045',\n EthereumGoerli = '0xD147B7Dfa636a1c50A52bF6A6FE910680274eE24',\n BNBChain = '0x20d868C7F1Eb706C46641ADD2f849c5DBf4dB158',\n PolygonPOS = '0x30D8AD0339e2CF160620589f2DBa1765126A5fDC',\n Hardhat = '0xa85233C63b9Ee964Add6F2cffe00Fd84eb32338f',\n PolygonMumbai = '0x8B936B018CeA1c1cc14961CAdabD36E7fe9192cD',\n}\n\nexport enum RailgunProxyDeploymentBlock {\n Ethereum = 14737691,\n EthereumRopsten = 12226000,\n EthereumGoerli = 7795991,\n BNBChain = 17633701,\n PolygonPOS = 28083766,\n Hardhat = 0,\n PolygonMumbai = 28697343,\n}\n\nexport enum BaseTokenWrappedAddress {\n EthereumWETH = '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', // WETH\n EthereumRopstenWETH = '0xc778417e063141139fce010982780140aa0cd5ab', // (Ropsten) WETH\n EthereumGoerliWETH = '0xb4fbf271143f4fbf7b91a5ded31805e42b2208d6', // (Goerli) WETH\n HardhatWETH = '0x322813Fd9A801c5507c9de605d63CEA4f2CE6c44', // (Hardhat) WETH\n BinanceWBNB = '0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c', // WBNB\n PolygonWMATIC = '0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270', // WMATIC\n PolygonMumbaiWMATIC = '0x9c3C9283D3e44854697Cd22D3Faa240Cfb032889', // (Mumbai) WMATIC\n}\n\n/**\n * Type0 = non-EIP-1559 (gasPrice).\n * Type1 = EIP-1559 (maxFeePerGas and maxPriorityFeePerGas).\n */\nexport enum EVMGasType {\n Type0 = 'Type0',\n Type2 = 'Type2',\n}\n\nexport const NETWORK_CONFIG: { [name in NetworkName]: Network } = {\n [NetworkName.Railgun]: {\n chain: {\n type: -1,\n id: -1,\n },\n name: NetworkName.Railgun,\n publicName: 'RAILGUN',\n shortPublicName: '',\n coingeckoId: '',\n baseToken: {} as BaseToken,\n proxyContract: RailgunProxyContract.Ethereum,\n relayAdaptContract: RelayAdaptContract.Ethereum,\n deploymentBlock: RailgunProxyDeploymentBlock.Ethereum,\n evmGasType: EVMGasType.Type2,\n shouldQuickSync: false,\n },\n [NetworkName.Ethereum]: {\n chain: {\n type: ChainType.EVM,\n id: 1,\n },\n name: NetworkName.Ethereum,\n publicName: 'Ethereum',\n shortPublicName: 'Ethereum',\n coingeckoId: 'ethereum',\n baseToken: {\n symbol: 'ETH',\n wrappedSymbol: 'WETH',\n wrappedAddress: BaseTokenWrappedAddress.EthereumWETH,\n decimals: 18,\n },\n proxyContract: RailgunProxyContract.Ethereum,\n relayAdaptContract: RelayAdaptContract.Ethereum,\n deploymentBlock: RailgunProxyDeploymentBlock.Ethereum,\n evmGasType: EVMGasType.Type2,\n shouldQuickSync: true,\n },\n [NetworkName.EthereumRopsten_DEPRECATED]: {\n deprecated: true,\n chain: {\n type: ChainType.EVM,\n id: 3,\n },\n name: NetworkName.EthereumRopsten_DEPRECATED,\n publicName: 'Ropsten Testnet',\n shortPublicName: 'Ropsten',\n coingeckoId: 'ethereum',\n baseToken: {\n symbol: 'ETH',\n wrappedSymbol: 'WETH',\n wrappedAddress: BaseTokenWrappedAddress.EthereumRopstenWETH,\n decimals: 18,\n },\n proxyContract: RailgunProxyContract.EthereumRopsten,\n relayAdaptContract: RelayAdaptContract.EthereumRopsten,\n deploymentBlock: RailgunProxyDeploymentBlock.EthereumRopsten,\n isDevOnlyNetwork: true,\n isTestnet: true,\n evmGasType: EVMGasType.Type2,\n shouldQuickSync: false,\n },\n [NetworkName.EthereumGoerli]: {\n chain: {\n type: ChainType.EVM,\n id: 5,\n },\n name: NetworkName.EthereumGoerli,\n publicName: 'Görli Testnet',\n shortPublicName: 'Görli',\n coingeckoId: 'ethereum',\n baseToken: {\n symbol: 'ETH',\n wrappedSymbol: 'WETH',\n wrappedAddress: BaseTokenWrappedAddress.EthereumGoerliWETH,\n decimals: 18,\n },\n proxyContract: RailgunProxyContract.EthereumGoerli,\n relayAdaptContract: RelayAdaptContract.EthereumGoerli,\n deploymentBlock: RailgunProxyDeploymentBlock.EthereumGoerli,\n isDevOnlyNetwork: true,\n isTestnet: true,\n evmGasType: EVMGasType.Type2,\n shouldQuickSync: true,\n },\n [NetworkName.BNBChain]: {\n chain: {\n type: ChainType.EVM,\n id: 56,\n },\n name: NetworkName.BNBChain,\n publicName: 'BNB Chain',\n shortPublicName: 'BSC',\n coingeckoId: 'binance-smart-chain',\n baseToken: {\n symbol: 'BNB',\n wrappedSymbol: 'WBNB',\n wrappedAddress: BaseTokenWrappedAddress.BinanceWBNB,\n decimals: 18,\n },\n proxyContract: RailgunProxyContract.BNBChain,\n relayAdaptContract: RelayAdaptContract.BNBChain,\n deploymentBlock: RailgunProxyDeploymentBlock.BNBChain,\n evmGasType: EVMGasType.Type0,\n shouldQuickSync: true,\n },\n [NetworkName.Polygon]: {\n chain: {\n type: ChainType.EVM,\n id: 137,\n },\n name: NetworkName.Polygon,\n publicName: 'Polygon PoS',\n shortPublicName: 'Polygon',\n coingeckoId: 'polygon-pos',\n baseToken: {\n symbol: 'MATIC',\n wrappedSymbol: 'WMATIC',\n wrappedAddress: BaseTokenWrappedAddress.PolygonWMATIC,\n decimals: 18,\n },\n proxyContract: RailgunProxyContract.PolygonPOS,\n relayAdaptContract: RelayAdaptContract.PolygonPOS,\n deploymentBlock: RailgunProxyDeploymentBlock.PolygonPOS,\n evmGasType: EVMGasType.Type2,\n shouldQuickSync: true,\n },\n [NetworkName.Hardhat]: {\n chain: {\n type: ChainType.EVM,\n id: 31337,\n },\n name: NetworkName.Hardhat,\n publicName: 'Hardhat Testnet',\n shortPublicName: 'Hardhat',\n coingeckoId: '',\n baseToken: {\n symbol: 'ETH',\n wrappedSymbol: 'WETH',\n wrappedAddress: BaseTokenWrappedAddress.HardhatWETH,\n decimals: 18,\n },\n proxyContract: RailgunProxyContract.Hardhat,\n relayAdaptContract: RelayAdaptContract.Hardhat,\n deploymentBlock: RailgunProxyDeploymentBlock.Hardhat,\n isDevOnlyNetwork: true,\n evmGasType: EVMGasType.Type2,\n shouldQuickSync: false,\n },\n [NetworkName.PolygonMumbai]: {\n chain: {\n type: ChainType.EVM,\n id: 80001,\n },\n name: NetworkName.PolygonMumbai,\n publicName: 'Mumbai Testnet',\n shortPublicName: 'Mumbai',\n coingeckoId: 'polygon-pos',\n baseToken: {\n symbol: 'MATIC',\n wrappedSymbol: 'WMATIC',\n wrappedAddress: BaseTokenWrappedAddress.PolygonMumbaiWMATIC,\n decimals: 18,\n },\n proxyContract: RailgunProxyContract.PolygonMumbai,\n relayAdaptContract: RelayAdaptContract.PolygonMumbai,\n deploymentBlock: RailgunProxyDeploymentBlock.PolygonMumbai,\n isDevOnlyNetwork: true,\n isTestnet: true,\n evmGasType: EVMGasType.Type2,\n shouldQuickSync: true,\n },\n};\n\nexport const networkForChain = (chain: Chain): Optional<Network> => {\n return Object.values(NETWORK_CONFIG).find(\n network =>\n network.chain.type === chain.type && network.chain.id === chain.id,\n );\n};\n"]}
|
|
1
|
+
{"version":3,"file":"network-config.js","sourceRoot":"","sources":["../../src/models/network-config.ts"],"names":[],"mappings":";;;;AAAA,mDAAoD;AAEpD,IAAY,WAcX;AAdD,WAAY,WAAW;IACrB,WAAW;IACX,kCAAmB,CAAA;IACnB,oCAAqB,CAAA;IACrB,qCAAsB,CAAA;IACtB,kCAAmB,CAAA;IAEnB,WAAW;IACX,8DAA+C,CAAA;IAC/C,iDAAkC,CAAA;IAClC,+CAAgC,CAAA;IAEhC,WAAW;IACX,kCAAmB,CAAA;AACrB,CAAC,EAdW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QActB;AAgCD,IAAY,oBAQX;AARD,WAAY,oBAAoB;IAC9B,+EAAuD,CAAA;IACvD,sFAA8D,CAAA;IAC9D,qFAA6D,CAAA;IAC7D,+EAAuD,CAAA;IACvD,iFAAyD,CAAA;IACzD,oFAA4D,CAAA;IAC5D,8EAAsD,CAAA;AACxD,CAAC,EARW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAQ/B;AAED,IAAY,kBAQX;AARD,WAAY,kBAAkB;IAC5B,6EAAuD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O;QACzB,UAAU,EAAE,iBAAiB;QAC7B,eAAe,EAAE,SAAS;QAC1B,WAAW,EAAE,EAAE;QACf,SAAS,EAAE;YACT,MAAM,EAAE,KAAK;YACb,aAAa,EAAE,MAAM;YACrB,cAAc,EAAE,uBAAuB,CAAC,WAAW;YACnD,QAAQ,EAAE,EAAE;SACb;QACD,aAAa,EAAE,oBAAoB,CAAC,OAAO;QAC3C,kBAAkB,EAAE,kBAAkB,CAAC,OAAO;QAC9C,eAAe,EAAE,2BAA2B,CAAC,OAAO;QACpD,gBAAgB,EAAE,IAAI;QACtB,SAAS,EAAE,IAAI;QACf,UAAU,EAAE,UAAU,CAAC,KAAK;QAC5B,eAAe,EAAE,KAAK;KACvB;QACD;AAEK,IAAM,eAAe,GAAG,UAAC,KAAY;IAC1C,OAAO,MAAM,CAAC,MAAM,CAAC,sBAAc,CAAC,CAAC,IAAI,CACvC,UAAA,OAAO;QACL,OAAA,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI,IAAI,OAAO,CAAC,KAAK,CAAC,EAAE,KAAK,KAAK,CAAC,EAAE;IAAlE,CAAkE,CACrE,CAAC;AACJ,CAAC,CAAC;AALW,QAAA,eAAe,mBAK1B","sourcesContent":["import { Chain, ChainType } from './response-types';\n\nexport enum NetworkName {\n // Mainnets\n Railgun = 'Railgun',\n Ethereum = 'Ethereum',\n BNBChain = 'BNB_Chain',\n Polygon = 'Polygon',\n\n // Testnets\n EthereumRopsten_DEPRECATED = 'Ethereum_Ropsten',\n EthereumGoerli = 'Ethereum_Goerli',\n PolygonMumbai = 'Polygon_Mumbai',\n\n // Dev only\n Hardhat = 'Hardhat',\n}\n\nexport type FeesSerialized = {\n shield: string;\n unshield: string;\n nft: string;\n};\n\ntype BaseToken = {\n symbol: string;\n wrappedSymbol: string;\n wrappedAddress: BaseTokenWrappedAddress;\n decimals: number;\n};\n\nexport type Network = {\n chain: Chain;\n name: NetworkName;\n publicName: string;\n shortPublicName: string;\n coingeckoId: string;\n baseToken: BaseToken;\n proxyContract: RailgunProxyContract;\n relayAdaptContract: RelayAdaptContract;\n deploymentBlock: RailgunProxyDeploymentBlock;\n isDevOnlyNetwork?: boolean;\n isTestnet?: boolean;\n evmGasType: EVMGasType;\n shouldQuickSync: boolean;\n deprecated?: boolean;\n};\n\nexport enum RailgunProxyContract {\n Ethereum = '0xfa7093cdd9ee6932b4eb2c9e1cde7ce00b1fa4b9',\n EthereumRopsten = '0x1c2A4092e2a436d78FcdF3a178a4E1ed87f0bB8F',\n EthereumGoerli = '0xe8bEa99BB438C2f3D533604D33258d74d5eE4824',\n BNBChain = '0x590162bf4b50f6576a459b75309ee21d92178a10',\n PolygonPOS = '0x19b620929f97b7b990801496c3b361ca5def8c71',\n PolygonMumbai = '0x3ee8306321d992483BDC9c69B8F622Ba3FFF05B6',\n Hardhat = '0x610178dA211FEF7D417bC0e6FeD39F05609AD788',\n}\n\nexport enum RelayAdaptContract {\n Ethereum = '0x22af4EDBeA3De885dDa8f0a0653E6209e44e5B84',\n EthereumRopsten = '0x95abeff80554b23cefe1d3f8dcff3b7d90e28045',\n EthereumGoerli = '0xD147B7Dfa636a1c50A52bF6A6FE910680274eE24',\n BNBChain = '0x20d868C7F1Eb706C46641ADD2f849c5DBf4dB158',\n PolygonPOS = '0x30D8AD0339e2CF160620589f2DBa1765126A5fDC',\n PolygonMumbai = '0x8B936B018CeA1c1cc14961CAdabD36E7fe9192cD',\n Hardhat = '0xc5a5C42992dECbae36851359345FE25997F5C42d',\n}\n\nexport enum RailgunProxyDeploymentBlock {\n Ethereum = 14737691,\n EthereumRopsten = 12226000,\n EthereumGoerli = 7795991,\n BNBChain = 17633701,\n PolygonPOS = 28083766,\n Hardhat = 0,\n PolygonMumbai = 28697343,\n}\n\nexport enum BaseTokenWrappedAddress {\n EthereumWETH = '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', // WETH\n EthereumRopstenWETH = '0xc778417e063141139fce010982780140aa0cd5ab', // (Ropsten) WETH\n EthereumGoerliWETH = '0xb4fbf271143f4fbf7b91a5ded31805e42b2208d6', // (Goerli) WETH\n BinanceWBNB = '0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c', // WBNB\n PolygonWMATIC = '0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270', // WMATIC\n PolygonMumbaiWMATIC = '0x9c3C9283D3e44854697Cd22D3Faa240Cfb032889', // (Mumbai) WMATIC\n HardhatWETH = '0x09635F643e140090A9A8Dcd712eD6285858ceBef', // (Hardhat) WETH\n}\n\n/**\n * Type0 = non-EIP-1559 (gasPrice).\n * Type1 = EIP-1559 (maxFeePerGas and maxPriorityFeePerGas).\n */\nexport enum EVMGasType {\n Type0 = 'Type0',\n Type2 = 'Type2',\n}\n\nexport const NETWORK_CONFIG: { [name in NetworkName]: Network } = {\n [NetworkName.Railgun]: {\n chain: {\n type: -1,\n id: -1,\n },\n name: NetworkName.Railgun,\n publicName: 'RAILGUN',\n shortPublicName: '',\n coingeckoId: '',\n baseToken: {} as BaseToken,\n proxyContract: RailgunProxyContract.Ethereum,\n relayAdaptContract: RelayAdaptContract.Ethereum,\n deploymentBlock: RailgunProxyDeploymentBlock.Ethereum,\n evmGasType: EVMGasType.Type2,\n shouldQuickSync: false,\n },\n [NetworkName.Ethereum]: {\n chain: {\n type: ChainType.EVM,\n id: 1,\n },\n name: NetworkName.Ethereum,\n publicName: 'Ethereum',\n shortPublicName: 'Ethereum',\n coingeckoId: 'ethereum',\n baseToken: {\n symbol: 'ETH',\n wrappedSymbol: 'WETH',\n wrappedAddress: BaseTokenWrappedAddress.EthereumWETH,\n decimals: 18,\n },\n proxyContract: RailgunProxyContract.Ethereum,\n relayAdaptContract: RelayAdaptContract.Ethereum,\n deploymentBlock: RailgunProxyDeploymentBlock.Ethereum,\n evmGasType: EVMGasType.Type2,\n shouldQuickSync: true,\n },\n [NetworkName.EthereumRopsten_DEPRECATED]: {\n deprecated: true,\n chain: {\n type: ChainType.EVM,\n id: 3,\n },\n name: NetworkName.EthereumRopsten_DEPRECATED,\n publicName: 'Ropsten Testnet',\n shortPublicName: 'Ropsten',\n coingeckoId: 'ethereum',\n baseToken: {\n symbol: 'ETH',\n wrappedSymbol: 'WETH',\n wrappedAddress: BaseTokenWrappedAddress.EthereumRopstenWETH,\n decimals: 18,\n },\n proxyContract: RailgunProxyContract.EthereumRopsten,\n relayAdaptContract: RelayAdaptContract.EthereumRopsten,\n deploymentBlock: RailgunProxyDeploymentBlock.EthereumRopsten,\n isDevOnlyNetwork: true,\n isTestnet: true,\n evmGasType: EVMGasType.Type2,\n shouldQuickSync: false,\n },\n [NetworkName.EthereumGoerli]: {\n chain: {\n type: ChainType.EVM,\n id: 5,\n },\n name: NetworkName.EthereumGoerli,\n publicName: 'Görli Testnet',\n shortPublicName: 'Görli',\n coingeckoId: 'ethereum',\n baseToken: {\n symbol: 'ETH',\n wrappedSymbol: 'WETH',\n wrappedAddress: BaseTokenWrappedAddress.EthereumGoerliWETH,\n decimals: 18,\n },\n proxyContract: RailgunProxyContract.EthereumGoerli,\n relayAdaptContract: RelayAdaptContract.EthereumGoerli,\n deploymentBlock: RailgunProxyDeploymentBlock.EthereumGoerli,\n isDevOnlyNetwork: true,\n isTestnet: true,\n evmGasType: EVMGasType.Type2,\n shouldQuickSync: true,\n },\n [NetworkName.BNBChain]: {\n chain: {\n type: ChainType.EVM,\n id: 56,\n },\n name: NetworkName.BNBChain,\n publicName: 'BNB Chain',\n shortPublicName: 'BSC',\n coingeckoId: 'binance-smart-chain',\n baseToken: {\n symbol: 'BNB',\n wrappedSymbol: 'WBNB',\n wrappedAddress: BaseTokenWrappedAddress.BinanceWBNB,\n decimals: 18,\n },\n proxyContract: RailgunProxyContract.BNBChain,\n relayAdaptContract: RelayAdaptContract.BNBChain,\n deploymentBlock: RailgunProxyDeploymentBlock.BNBChain,\n evmGasType: EVMGasType.Type0,\n shouldQuickSync: true,\n },\n [NetworkName.Polygon]: {\n chain: {\n type: ChainType.EVM,\n id: 137,\n },\n name: NetworkName.Polygon,\n publicName: 'Polygon PoS',\n shortPublicName: 'Polygon',\n coingeckoId: 'polygon-pos',\n baseToken: {\n symbol: 'MATIC',\n wrappedSymbol: 'WMATIC',\n wrappedAddress: BaseTokenWrappedAddress.PolygonWMATIC,\n decimals: 18,\n },\n proxyContract: RailgunProxyContract.PolygonPOS,\n relayAdaptContract: RelayAdaptContract.PolygonPOS,\n deploymentBlock: RailgunProxyDeploymentBlock.PolygonPOS,\n evmGasType: EVMGasType.Type2,\n shouldQuickSync: true,\n },\n [NetworkName.PolygonMumbai]: {\n chain: {\n type: ChainType.EVM,\n id: 80001,\n },\n name: NetworkName.PolygonMumbai,\n publicName: 'Mumbai Testnet',\n shortPublicName: 'Mumbai',\n coingeckoId: 'polygon-pos',\n baseToken: {\n symbol: 'MATIC',\n wrappedSymbol: 'WMATIC',\n wrappedAddress: BaseTokenWrappedAddress.PolygonMumbaiWMATIC,\n decimals: 18,\n },\n proxyContract: RailgunProxyContract.PolygonMumbai,\n relayAdaptContract: RelayAdaptContract.PolygonMumbai,\n deploymentBlock: RailgunProxyDeploymentBlock.PolygonMumbai,\n isDevOnlyNetwork: true,\n isTestnet: true,\n evmGasType: EVMGasType.Type2,\n shouldQuickSync: true,\n },\n [NetworkName.Hardhat]: {\n chain: {\n type: ChainType.EVM,\n id: 31337,\n },\n name: NetworkName.Hardhat,\n publicName: 'Hardhat Testnet',\n shortPublicName: 'Hardhat',\n coingeckoId: '',\n baseToken: {\n symbol: 'ETH',\n wrappedSymbol: 'WETH',\n wrappedAddress: BaseTokenWrappedAddress.HardhatWETH,\n decimals: 18,\n },\n proxyContract: RailgunProxyContract.Hardhat,\n relayAdaptContract: RelayAdaptContract.Hardhat,\n deploymentBlock: RailgunProxyDeploymentBlock.Hardhat,\n isDevOnlyNetwork: true,\n isTestnet: true,\n evmGasType: EVMGasType.Type2,\n shouldQuickSync: false,\n },\n};\n\nexport const networkForChain = (chain: Chain): Optional<Network> => {\n return Object.values(NETWORK_CONFIG).find(\n network =>\n network.chain.type === chain.type && network.chain.id === chain.id,\n );\n};\n"]}
|
package/dist/models/proof.d.ts
CHANGED
package/dist/models/proof.js
CHANGED
|
@@ -4,8 +4,8 @@ exports.ProofType = void 0;
|
|
|
4
4
|
var ProofType;
|
|
5
5
|
(function (ProofType) {
|
|
6
6
|
ProofType["Transfer"] = "Transfer";
|
|
7
|
-
ProofType["
|
|
8
|
-
ProofType["
|
|
7
|
+
ProofType["Unshield"] = "Unshield";
|
|
8
|
+
ProofType["UnshieldBaseToken"] = "UnshieldBaseToken";
|
|
9
9
|
ProofType["CrossContractCalls"] = "CrossContractCalls";
|
|
10
10
|
})(ProofType = exports.ProofType || (exports.ProofType = {}));
|
|
11
11
|
//# sourceMappingURL=proof.js.map
|
package/dist/models/proof.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proof.js","sourceRoot":"","sources":["../../src/models/proof.ts"],"names":[],"mappings":";;;AAAA,IAAY,SAKX;AALD,WAAY,SAAS;IACnB,kCAAqB,CAAA;IACrB,kCAAqB,CAAA;IACrB,oDAAuC,CAAA;IACvC,sDAAyC,CAAA;AAC3C,CAAC,EALW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAKpB","sourcesContent":["export enum ProofType {\n Transfer = 'Transfer',\n
|
|
1
|
+
{"version":3,"file":"proof.js","sourceRoot":"","sources":["../../src/models/proof.ts"],"names":[],"mappings":";;;AAAA,IAAY,SAKX;AALD,WAAY,SAAS;IACnB,kCAAqB,CAAA;IACrB,kCAAqB,CAAA;IACrB,oDAAuC,CAAA;IACvC,sDAAyC,CAAA;AAC3C,CAAC,EALW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAKpB","sourcesContent":["export enum ProofType {\n Transfer = 'Transfer',\n Unshield = 'Unshield',\n UnshieldBaseToken = 'UnshieldBaseToken',\n CrossContractCalls = 'CrossContractCalls',\n}\n"]}
|
|
@@ -122,6 +122,7 @@ export declare type TransactionHistoryItem = {
|
|
|
122
122
|
transferTokenAmounts: RailgunWalletSendTokenAmount[];
|
|
123
123
|
changeTokenAmounts: RailgunWalletTokenAmount[];
|
|
124
124
|
relayerFeeTokenAmount?: RailgunWalletTokenAmount;
|
|
125
|
+
unshieldTokenAmounts: RailgunWalletSendTokenAmount[];
|
|
125
126
|
version: number;
|
|
126
127
|
};
|
|
127
128
|
export declare type TransactionHistorySerializedResponse = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"response-types.js","sourceRoot":"","sources":["../../src/models/response-types.ts"],"names":[],"mappings":";;;AAmDA,IAAY,SAEX;AAFD,WAAY,SAAS;IACnB,uCAAO,CAAA;AACT,CAAC,EAFW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAEpB","sourcesContent":["import { BigNumber } from '@ethersproject/bignumber';\nimport { MerkletreeScanStatus } from './merkletree-scan';\nimport { EVMGasType, FeesSerialized } from './network-config';\n\nexport type RailgunAPICiphertext = {\n iv: string;\n data: string[];\n};\n\nexport type TransactionGasDetails =\n | TransactionGasDetailsType0\n | TransactionGasDetailsType2;\n\nexport type TransactionGasDetailsType0 = {\n evmGasType: EVMGasType.Type0;\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 | TransactionGasDetailsSerializedType2;\n\nexport type TransactionGasDetailsSerializedType0 = {\n evmGasType: EVMGasType.Type0;\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 type StartRailgunEngineResponse = {\n error?: string;\n};\n\nexport type DownloadInitialArtifactsResponse = {\n error?: 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 tokenBalancesSerialized: RailgunShieldedTokenBalanceSerialized[];\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 error?: string;\n};\n\nexport type RailgunWalletInfo = {\n id: string;\n railgunAddress: string;\n};\n\nexport type LoadRailgunWalletResponse = {\n railgunWalletInfo?: RailgunWalletInfo;\n error?: string;\n};\n\nexport type UnloadRailgunWalletResponse = {\n error?: string;\n};\n\nexport type RailgunWalletAddressDataSerialized = {\n masterPublicKey: string;\n viewingPublicKey: string;\n};\n\nexport type RailgunBalanceResponse = {\n error?: string;\n};\n\nexport type RailgunShieldedTokenBalanceSerialized = {\n tokenAddress: string;\n balanceString: string;\n};\n\nexport type RailgunProveTransactionResponse = {\n error?: string;\n};\n\nexport type RailgunPopulateTransactionResponse = {\n serializedTransaction?: string;\n error?: string;\n};\n\nexport type RailgunTransactionGasEstimateResponse = {\n gasEstimateString?: string;\n error?: string;\n};\n\nexport type RailgunWalletTokenAmount = {\n tokenAddress: string;\n amountString: 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 ValidateCachedProvedTransactionResponse = {\n isValid: boolean;\n error?: string;\n};\n\nexport type Pbkdf2Response = string;\n\nexport type RailgunWalletSendTokenAmount = RailgunWalletTokenAmount & {\n recipientAddress?: string;\n walletSource?: string;\n memoText?: string;\n};\n\nexport type RailgunWalletReceiveTokenAmount = RailgunWalletTokenAmount & {\n memoText?: string;\n};\n\nexport type TransactionHistoryItem = {\n txid: string;\n receiveTokenAmounts: RailgunWalletReceiveTokenAmount[];\n transferTokenAmounts: RailgunWalletSendTokenAmount[];\n changeTokenAmounts: RailgunWalletTokenAmount[];\n relayerFeeTokenAmount?: RailgunWalletTokenAmount;\n version: number;\n};\n\nexport type TransactionHistorySerializedResponse = {\n items?: TransactionHistoryItem[];\n error?: string;\n};\n"]}
|
|
1
|
+
{"version":3,"file":"response-types.js","sourceRoot":"","sources":["../../src/models/response-types.ts"],"names":[],"mappings":";;;AAmDA,IAAY,SAEX;AAFD,WAAY,SAAS;IACnB,uCAAO,CAAA;AACT,CAAC,EAFW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAEpB","sourcesContent":["import { BigNumber } from '@ethersproject/bignumber';\nimport { MerkletreeScanStatus } from './merkletree-scan';\nimport { EVMGasType, FeesSerialized } from './network-config';\n\nexport type RailgunAPICiphertext = {\n iv: string;\n data: string[];\n};\n\nexport type TransactionGasDetails =\n | TransactionGasDetailsType0\n | TransactionGasDetailsType2;\n\nexport type TransactionGasDetailsType0 = {\n evmGasType: EVMGasType.Type0;\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 | TransactionGasDetailsSerializedType2;\n\nexport type TransactionGasDetailsSerializedType0 = {\n evmGasType: EVMGasType.Type0;\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 type StartRailgunEngineResponse = {\n error?: string;\n};\n\nexport type DownloadInitialArtifactsResponse = {\n error?: 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 tokenBalancesSerialized: RailgunShieldedTokenBalanceSerialized[];\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 error?: string;\n};\n\nexport type RailgunWalletInfo = {\n id: string;\n railgunAddress: string;\n};\n\nexport type LoadRailgunWalletResponse = {\n railgunWalletInfo?: RailgunWalletInfo;\n error?: string;\n};\n\nexport type UnloadRailgunWalletResponse = {\n error?: string;\n};\n\nexport type RailgunWalletAddressDataSerialized = {\n masterPublicKey: string;\n viewingPublicKey: string;\n};\n\nexport type RailgunBalanceResponse = {\n error?: string;\n};\n\nexport type RailgunShieldedTokenBalanceSerialized = {\n tokenAddress: string;\n balanceString: string;\n};\n\nexport type RailgunProveTransactionResponse = {\n error?: string;\n};\n\nexport type RailgunPopulateTransactionResponse = {\n serializedTransaction?: string;\n error?: string;\n};\n\nexport type RailgunTransactionGasEstimateResponse = {\n gasEstimateString?: string;\n error?: string;\n};\n\nexport type RailgunWalletTokenAmount = {\n tokenAddress: string;\n amountString: 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 ValidateCachedProvedTransactionResponse = {\n isValid: boolean;\n error?: string;\n};\n\nexport type Pbkdf2Response = string;\n\nexport type RailgunWalletSendTokenAmount = RailgunWalletTokenAmount & {\n recipientAddress?: string;\n walletSource?: string;\n memoText?: string;\n};\n\nexport type RailgunWalletReceiveTokenAmount = RailgunWalletTokenAmount & {\n memoText?: string;\n};\n\nexport type TransactionHistoryItem = {\n txid: string;\n receiveTokenAmounts: RailgunWalletReceiveTokenAmount[];\n transferTokenAmounts: RailgunWalletSendTokenAmount[];\n changeTokenAmounts: RailgunWalletTokenAmount[];\n relayerFeeTokenAmount?: RailgunWalletTokenAmount;\n unshieldTokenAmounts: RailgunWalletSendTokenAmount[];\n version: number;\n};\n\nexport type TransactionHistorySerializedResponse = {\n items?: TransactionHistoryItem[];\n error?: string;\n};\n"]}
|