@railgun-community/shared-models 3.5.1 → 3.6.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.
|
@@ -54,8 +54,8 @@ export declare type Chain = {
|
|
|
54
54
|
};
|
|
55
55
|
export declare type RailgunBalancesEvent = {
|
|
56
56
|
chain: Chain;
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
erc20Amounts: RailgunERC20Amount[];
|
|
58
|
+
nftAmounts: RailgunNFTAmount[];
|
|
59
59
|
railgunWalletID: string;
|
|
60
60
|
};
|
|
61
61
|
export declare type MerkletreeScanUpdateEvent = {
|
|
@@ -85,10 +85,6 @@ export declare type RailgunWalletAddressDataSerialized = {
|
|
|
85
85
|
export declare type RailgunBalanceResponse = {
|
|
86
86
|
error?: string;
|
|
87
87
|
};
|
|
88
|
-
export declare type RailgunERC20Balance = {
|
|
89
|
-
tokenAddress: string;
|
|
90
|
-
balanceString: string;
|
|
91
|
-
};
|
|
92
88
|
export declare type RailgunProveTransactionResponse = {
|
|
93
89
|
error?: string;
|
|
94
90
|
};
|
|
@@ -100,11 +96,11 @@ export declare type RailgunTransactionGasEstimateResponse = {
|
|
|
100
96
|
gasEstimateString?: string;
|
|
101
97
|
error?: string;
|
|
102
98
|
};
|
|
103
|
-
export declare type
|
|
99
|
+
export declare type RailgunERC20Amount = {
|
|
104
100
|
tokenAddress: string;
|
|
105
101
|
amountString: string;
|
|
106
102
|
};
|
|
107
|
-
export declare type
|
|
103
|
+
export declare type RailgunERC20AmountRecipient = RailgunERC20Amount & {
|
|
108
104
|
recipientAddress: string;
|
|
109
105
|
};
|
|
110
106
|
/**
|
|
@@ -114,13 +110,13 @@ export declare enum NFTTokenType {
|
|
|
114
110
|
ERC721 = 1,
|
|
115
111
|
ERC1155 = 2
|
|
116
112
|
}
|
|
117
|
-
export declare type
|
|
113
|
+
export declare type RailgunNFTAmount = {
|
|
118
114
|
nftAddress: string;
|
|
119
115
|
nftTokenType: NFTTokenType;
|
|
120
116
|
tokenSubID: string;
|
|
121
117
|
amountString: string;
|
|
122
118
|
};
|
|
123
|
-
export declare type RailgunNFTAmountRecipient =
|
|
119
|
+
export declare type RailgunNFTAmountRecipient = RailgunNFTAmount & {
|
|
124
120
|
recipientAddress: string;
|
|
125
121
|
};
|
|
126
122
|
export declare type EncryptDataWithSharedKeyResponse = {
|
|
@@ -143,24 +139,24 @@ declare type SendAdditionalData = {
|
|
|
143
139
|
walletSource?: string;
|
|
144
140
|
memoText?: string;
|
|
145
141
|
};
|
|
146
|
-
export declare type
|
|
147
|
-
export declare type
|
|
142
|
+
export declare type RailgunSendERC20Amount = RailgunERC20Amount & SendAdditionalData;
|
|
143
|
+
export declare type RailgunSendNFTAmount = RailgunNFTAmount & SendAdditionalData;
|
|
148
144
|
declare type ReceiveAdditionalData = {
|
|
149
145
|
senderAddress?: string;
|
|
150
146
|
memoText?: string;
|
|
151
147
|
};
|
|
152
|
-
export declare type
|
|
153
|
-
export declare type
|
|
148
|
+
export declare type RailgunWalletReceiveERC20Amount = RailgunERC20Amount & ReceiveAdditionalData;
|
|
149
|
+
export declare type RailgunWalletReceiveNFTAmount = RailgunNFTAmount & ReceiveAdditionalData;
|
|
154
150
|
export declare type TransactionHistoryItem = {
|
|
155
151
|
txid: string;
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
152
|
+
receiveERC20Amounts: RailgunWalletReceiveERC20Amount[];
|
|
153
|
+
transferERC20Amounts: RailgunSendERC20Amount[];
|
|
154
|
+
changeERC20Amounts: RailgunERC20Amount[];
|
|
155
|
+
relayerFeeERC20Amount?: RailgunERC20Amount;
|
|
156
|
+
unshieldERC20Amounts: RailgunSendERC20Amount[];
|
|
157
|
+
receiveNFTAmounts: RailgunWalletReceiveNFTAmount[];
|
|
158
|
+
transferNFTAmounts: RailgunSendNFTAmount[];
|
|
159
|
+
unshieldNFTAmounts: RailgunSendNFTAmount[];
|
|
164
160
|
version: number;
|
|
165
161
|
};
|
|
166
162
|
export declare type TransactionHistorySerializedResponse = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"response-types.js","sourceRoot":"","sources":["../../src/models/response-types.ts"],"names":[],"mappings":";;;AAiEA,IAAY,SAEX;AAFD,WAAY,SAAS;IACnB,uCAAO,CAAA;AACT,CAAC,EAFW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAEpB;
|
|
1
|
+
{"version":3,"file":"response-types.js","sourceRoot":"","sources":["../../src/models/response-types.ts"],"names":[],"mappings":";;;AAiEA,IAAY,SAEX;AAFD,WAAY,SAAS;IACnB,uCAAO,CAAA;AACT,CAAC,EAFW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAEpB;AAuED;;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 { EVMGasType, FeesSerialized } from './network-config';\n\nexport type RailgunAPICiphertext = {\n iv: string;\n data: string[];\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 type RailgunPopulateTransactionResponse = {\n serializedTransaction?: 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?: string;\n walletSource?: string;\n memoText?: string;\n};\n\nexport type RailgunSendERC20Amount = RailgunERC20Amount & SendAdditionalData;\n\nexport type RailgunSendNFTAmount = RailgunNFTAmount & SendAdditionalData;\n\ntype ReceiveAdditionalData = {\n senderAddress?: string;\n memoText?: string;\n};\n\nexport type RailgunWalletReceiveERC20Amount = RailgunERC20Amount &\n ReceiveAdditionalData;\n\nexport type RailgunWalletReceiveNFTAmount = RailgunNFTAmount &\n ReceiveAdditionalData;\n\nexport type TransactionHistoryItem = {\n txid: string;\n receiveERC20Amounts: RailgunWalletReceiveERC20Amount[];\n transferERC20Amounts: RailgunSendERC20Amount[];\n changeERC20Amounts: RailgunERC20Amount[];\n relayerFeeERC20Amount?: RailgunERC20Amount;\n unshieldERC20Amounts: RailgunSendERC20Amount[];\n receiveNFTAmounts: RailgunWalletReceiveNFTAmount[];\n transferNFTAmounts: RailgunSendNFTAmount[];\n unshieldNFTAmounts: RailgunSendNFTAmount[];\n version: number;\n};\n\nexport type TransactionHistorySerializedResponse = {\n items?: TransactionHistoryItem[];\n error?: string;\n};\n"]}
|