@railgun-community/shared-models 1.3.5 → 2.0.0
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 +3 -3
- package/dist/models/network-config.js +6 -6
- 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
|
@@ -4,14 +4,14 @@ export declare enum NetworkName {
|
|
|
4
4
|
Ethereum = "Ethereum",
|
|
5
5
|
BNBChain = "BNB_Chain",
|
|
6
6
|
Polygon = "Polygon",
|
|
7
|
-
|
|
7
|
+
EthereumRopsten_DEPRECATED = "Ethereum_Ropsten",
|
|
8
8
|
EthereumGoerli = "Ethereum_Goerli",
|
|
9
9
|
PolygonMumbai = "Polygon_Mumbai",
|
|
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 = {
|
|
@@ -11,7 +11,7 @@ var NetworkName;
|
|
|
11
11
|
NetworkName["BNBChain"] = "BNB_Chain";
|
|
12
12
|
NetworkName["Polygon"] = "Polygon";
|
|
13
13
|
// Testnets
|
|
14
|
-
NetworkName["
|
|
14
|
+
NetworkName["EthereumRopsten_DEPRECATED"] = "Ethereum_Ropsten";
|
|
15
15
|
NetworkName["EthereumGoerli"] = "Ethereum_Goerli";
|
|
16
16
|
NetworkName["PolygonMumbai"] = "Polygon_Mumbai";
|
|
17
17
|
// Dev only
|
|
@@ -104,13 +104,13 @@ exports.NETWORK_CONFIG = (_a = {},
|
|
|
104
104
|
evmGasType: EVMGasType.Type2,
|
|
105
105
|
shouldQuickSync: true
|
|
106
106
|
},
|
|
107
|
-
_a[NetworkName.
|
|
108
|
-
|
|
107
|
+
_a[NetworkName.EthereumRopsten_DEPRECATED] = {
|
|
108
|
+
deprecated: true,
|
|
109
109
|
chain: {
|
|
110
110
|
type: response_types_1.ChainType.EVM,
|
|
111
111
|
id: 3
|
|
112
112
|
},
|
|
113
|
-
name: NetworkName.
|
|
113
|
+
name: NetworkName.EthereumRopsten_DEPRECATED,
|
|
114
114
|
publicName: 'Ropsten Testnet',
|
|
115
115
|
shortPublicName: 'Ropsten',
|
|
116
116
|
coingeckoId: 'ethereum',
|
|
@@ -126,8 +126,7 @@ exports.NETWORK_CONFIG = (_a = {},
|
|
|
126
126
|
isDevOnlyNetwork: true,
|
|
127
127
|
isTestnet: true,
|
|
128
128
|
evmGasType: EVMGasType.Type2,
|
|
129
|
-
shouldQuickSync: false
|
|
130
|
-
deprecated: true
|
|
129
|
+
shouldQuickSync: false
|
|
131
130
|
},
|
|
132
131
|
_a[NetworkName.EthereumGoerli] = {
|
|
133
132
|
chain: {
|
|
@@ -147,6 +146,7 @@ exports.NETWORK_CONFIG = (_a = {},
|
|
|
147
146
|
proxyContract: RailgunProxyContract.EthereumGoerli,
|
|
148
147
|
relayAdaptContract: RelayAdaptContract.EthereumGoerli,
|
|
149
148
|
deploymentBlock: RailgunProxyDeploymentBlock.EthereumGoerli,
|
|
149
|
+
isDevOnlyNetwork: true,
|
|
150
150
|
isTestnet: true,
|
|
151
151
|
evmGasType: EVMGasType.Type2,
|
|
152
152
|
shouldQuickSync: true
|
|
@@ -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;IACrB,qCAAsB,CAAA;IACtB,kCAAmB,CAAA;IAEnB,WAAW;IACX,mDAAoC,CAAA;IACpC,iDA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;SACb;QACD,aAAa,EAAE,oBAAoB,CAAC,OAAO;QAC3C,kBAAkB,EAAE,kBAAkB,CAAC,OAAO;QAC9C,eAAe,EAAE,2BAA2B,CAAC,OAAO;QACpD,gBAAgB,EAAE,IAAI;QACtB,UAAU,EAAE,UAAU,CAAC,KAAK;QAC5B,eAAe,EAAE,KAAK;KACvB;IACD,GAAC,WAAW,CAAC,aAAa,IAAG;QAC3B,KAAK,EAAE;YACL,IAAI,EAAE,0BAAS,CAAC,GAAG;YACnB,EAAE,EAAE,KAAK;SACV;QACD,IAAI,EAAE,WAAW,CAAC,aAAa;QAC/B,UAAU,EAAE,gBAAgB;QAC5B,eAAe,EAAE,QAAQ;QACzB,WAAW,EAAE,aAAa;QAC1B,SAAS,EAAE;YACT,MAAM,EAAE,OAAO;YACf,aAAa,EAAE,QAAQ;YACvB,cAAc,EAAE,uBAAuB,CAAC,mBAAmB;YAC3D,QAAQ,EAAE,EAAE;SACb;QACD,aAAa,EAAE,oBAAoB,CAAC,aAAa;QACjD,kBAAkB,EAAE,kBAAkB,CAAC,aAAa;QACpD,eAAe,EAAE,2BAA2B,CAAC,aAAa;QAC1D,gBAAgB,EAAE,IAAI;QACtB,SAAS,EAAE,IAAI;QACf,UAAU,EAAE,UAAU,CAAC,KAAK;QAC5B,eAAe,EAAE,IAAI;KACtB;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 = '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]: {\n // DEPRECATED\n chain: {\n type: ChainType.EVM,\n id: 3,\n },\n name: NetworkName.EthereumRopsten,\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 deprecated: true,\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 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,8EAAsD,CAAA;IACtD,oFAA4D,CAAA;AAC9D,CAAC,EARW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAQ/B;AAED,IAAY,kBAQX;AARD,WAAY,kBAAkB;IAC5B,6EAAuD,CAAA;IACvD,oFAA8D,CAAA;IAC9D,mFAA6D,CAAA;IAC7D,6EAAuD,CAAA;IACvD,+EAAyD,CAAA;IACzD,4EAAsD,CAAA;IACtD,kFAA4D,CAAA;AAC9D,C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B,CAAC,mBAAmB;YAC3D,QAAQ,EAAE,EAAE;SACb;QACD,aAAa,EAAE,oBAAoB,CAAC,aAAa;QACjD,kBAAkB,EAAE,kBAAkB,CAAC,aAAa;QACpD,eAAe,EAAE,2BAA2B,CAAC,aAAa;QAC1D,gBAAgB,EAAE,IAAI;QACtB,SAAS,EAAE,IAAI;QACf,UAAU,EAAE,UAAU,CAAC,KAAK;QAC5B,eAAe,EAAE,IAAI;KACtB;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 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"]}
|
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"]}
|