@railgun-community/shared-models 4.0.0-test → 4.0.2-test
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,25 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
export declare type Artifact = {
|
|
2
|
+
zkey: ArrayLike<number>;
|
|
3
|
+
wasm: Optional<ArrayLike<number>>;
|
|
4
|
+
dat: Optional<ArrayLike<number>>;
|
|
5
|
+
vkey: object;
|
|
6
|
+
};
|
|
2
7
|
export declare enum ArtifactName {
|
|
3
8
|
ZKEY = "zkey",
|
|
4
9
|
WASM = "wasm",
|
|
5
10
|
VKEY = "vkey",
|
|
6
11
|
DAT = "dat"
|
|
7
12
|
}
|
|
8
|
-
export declare type ArtifactGroup = {
|
|
9
|
-
[ArtifactName.ZKEY]: Buffer;
|
|
10
|
-
[ArtifactName.VKEY]: object;
|
|
11
|
-
[ArtifactName.WASM]: Optional<Buffer>;
|
|
12
|
-
[ArtifactName.DAT]: Optional<Buffer>;
|
|
13
|
-
};
|
|
14
13
|
export declare type ArtifactMapping = {
|
|
15
|
-
[ArtifactName
|
|
16
|
-
[ArtifactName.WASM]: string;
|
|
17
|
-
[ArtifactName.VKEY]: string;
|
|
18
|
-
[ArtifactName.DAT]: string;
|
|
14
|
+
[name in ArtifactName]: string;
|
|
19
15
|
};
|
|
20
16
|
export declare type ArtifactDownloadedGroup = {
|
|
21
|
-
[ArtifactName
|
|
22
|
-
[ArtifactName.WASM]: boolean;
|
|
23
|
-
[ArtifactName.VKEY]: boolean;
|
|
24
|
-
[ArtifactName.DAT]: boolean;
|
|
17
|
+
[name in ArtifactName]: boolean;
|
|
25
18
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"artifact.js","sourceRoot":"","sources":["../../src/models/artifact.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"artifact.js","sourceRoot":"","sources":["../../src/models/artifact.ts"],"names":[],"mappings":";;;AAOA,IAAY,YAKX;AALD,WAAY,YAAY;IACtB,6BAAa,CAAA;IACb,6BAAa,CAAA;IACb,6BAAa,CAAA;IACb,2BAAW,CAAA;AACb,CAAC,EALW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAKvB","sourcesContent":["export type Artifact = {\n zkey: ArrayLike<number>;\n wasm: Optional<ArrayLike<number>>;\n dat: Optional<ArrayLike<number>>;\n vkey: object;\n};\n\nexport enum ArtifactName {\n ZKEY = 'zkey',\n WASM = 'wasm',\n VKEY = 'vkey',\n DAT = 'dat',\n}\n\nexport type ArtifactMapping = {\n [name in ArtifactName]: string;\n};\n\nexport type ArtifactDownloadedGroup = {\n [name in ArtifactName]: boolean;\n};\n"]}
|
|
@@ -149,15 +149,21 @@ export declare type ValidateCachedProvedTransactionResponse = {
|
|
|
149
149
|
};
|
|
150
150
|
export declare type Pbkdf2Response = string;
|
|
151
151
|
declare type SendAdditionalData = {
|
|
152
|
-
recipientAddress
|
|
153
|
-
walletSource
|
|
154
|
-
memoText
|
|
152
|
+
recipientAddress: Optional<string>;
|
|
153
|
+
walletSource: Optional<string>;
|
|
154
|
+
memoText: Optional<string>;
|
|
155
155
|
};
|
|
156
156
|
export declare type RailgunSendERC20Amount = RailgunERC20Amount & SendAdditionalData;
|
|
157
157
|
export declare type RailgunSendNFTAmount = RailgunNFTAmount & SendAdditionalData;
|
|
158
|
+
declare type UnshieldAdditonalData = {
|
|
159
|
+
unshieldFee: Optional<string>;
|
|
160
|
+
};
|
|
161
|
+
export declare type RailgunUnshieldERC20Amount = RailgunSendERC20Amount & UnshieldAdditonalData;
|
|
162
|
+
export declare type RailgunUnshieldNFTAmount = RailgunSendNFTAmount & UnshieldAdditonalData;
|
|
158
163
|
declare type ReceiveAdditionalData = {
|
|
159
|
-
senderAddress
|
|
160
|
-
memoText
|
|
164
|
+
senderAddress: Optional<string>;
|
|
165
|
+
memoText: Optional<string>;
|
|
166
|
+
shieldFee: Optional<string>;
|
|
161
167
|
};
|
|
162
168
|
export declare type RailgunReceiveERC20Amount = RailgunERC20Amount & ReceiveAdditionalData;
|
|
163
169
|
export declare type RailgunReceiveNFTAmount = RailgunNFTAmount & ReceiveAdditionalData;
|
|
@@ -167,10 +173,10 @@ export declare type TransactionHistoryItem = {
|
|
|
167
173
|
transferERC20Amounts: RailgunSendERC20Amount[];
|
|
168
174
|
changeERC20Amounts: RailgunERC20Amount[];
|
|
169
175
|
relayerFeeERC20Amount?: RailgunERC20Amount;
|
|
170
|
-
unshieldERC20Amounts:
|
|
176
|
+
unshieldERC20Amounts: RailgunUnshieldERC20Amount[];
|
|
171
177
|
receiveNFTAmounts: RailgunReceiveNFTAmount[];
|
|
172
178
|
transferNFTAmounts: RailgunSendNFTAmount[];
|
|
173
|
-
unshieldNFTAmounts:
|
|
179
|
+
unshieldNFTAmounts: RailgunUnshieldNFTAmount[];
|
|
174
180
|
version: number;
|
|
175
181
|
};
|
|
176
182
|
export declare type TransactionHistorySerializedResponse = {
|
|
@@ -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;AA0DD,IAAY,SAEX;AAFD,WAAY,SAAS;IACnB,uCAAO,CAAA;AACT,CAAC,EAFW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAEpB;AA6ED;;GAEG;AACH,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,mDAAU,CAAA;IACV,qDAAW,CAAA;AACb,CAAC,EAHW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAGvB","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 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 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 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 RailgunProveTransactionResponse = {\n error?: string;\n};\n\nexport declare type RailgunTxidFromNullifiersResponse = {\n txid?: string;\n error?: string;\n};\n\nexport type RailgunPopulateTransactionResponse = {\n serializedTransaction?: string;\n nullifiers?: string[];\n error?: string;\n};\n\nexport type RailgunTransactionGasEstimateResponse = {\n gasEstimateString?: string;\n error?: string;\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 ValidateCachedProvedTransactionResponse = {\n isValid: boolean;\n error?: string;\n};\n\nexport type Pbkdf2Response = string;\n\ntype SendAdditionalData = {\n recipientAddress
|
|
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;AA0DD,IAAY,SAEX;AAFD,WAAY,SAAS;IACnB,uCAAO,CAAA;AACT,CAAC,EAFW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAEpB;AA6ED;;GAEG;AACH,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,mDAAU,CAAA;IACV,qDAAW,CAAA;AACb,CAAC,EAHW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAGvB","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 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 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 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 RailgunProveTransactionResponse = {\n error?: string;\n};\n\nexport declare type RailgunTxidFromNullifiersResponse = {\n txid?: string;\n error?: string;\n};\n\nexport type RailgunPopulateTransactionResponse = {\n serializedTransaction?: string;\n nullifiers?: string[];\n error?: string;\n};\n\nexport type RailgunTransactionGasEstimateResponse = {\n gasEstimateString?: string;\n error?: string;\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 ValidateCachedProvedTransactionResponse = {\n isValid: boolean;\n error?: 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 type TransactionHistoryItem = {\n txid: string;\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 version: number;\n};\n\nexport type TransactionHistorySerializedResponse = {\n items?: TransactionHistoryItem[];\n error?: string;\n};\n"]}
|