@railgun-community/shared-models 3.2.4 → 3.3.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.
@@ -103,11 +103,16 @@ export declare type RailgunWalletTokenAmount = {
103
103
  tokenAddress: string;
104
104
  amountString: string;
105
105
  };
106
+ export declare type RailgunTokenDataNFT = {
107
+ tokenAddress: string;
108
+ tokenType: NFTTokenType;
109
+ tokenSubID: string;
110
+ };
106
111
  export declare type RailgunWalletTokenAmountRecipient = RailgunWalletTokenAmount & {
107
112
  recipientAddress: string;
108
113
  };
109
114
  /**
110
- * Synced from TokenType (@railgun-community/engine).
115
+ * Synced NFT types from TokenType (@railgun-community/engine).
111
116
  */
112
117
  export declare enum NFTTokenType {
113
118
  ERC721 = 1,
@@ -115,8 +120,8 @@ export declare enum NFTTokenType {
115
120
  }
116
121
  export declare type RailgunNFTRecipient = {
117
122
  nftAddress: string;
118
- tokenSubIDString: string;
119
123
  nftTokenType: NFTTokenType;
124
+ tokenSubID: string;
120
125
  recipientAddress: string;
121
126
  };
122
127
  export declare type EncryptDataWithSharedKeyResponse = {
@@ -134,15 +139,19 @@ export declare type ValidateCachedProvedTransactionResponse = {
134
139
  error?: string;
135
140
  };
136
141
  export declare type Pbkdf2Response = string;
137
- export declare type RailgunWalletSendTokenAmount = RailgunWalletTokenAmount & {
142
+ declare type SendAdditionalData = {
138
143
  recipientAddress?: string;
139
144
  walletSource?: string;
140
145
  memoText?: string;
141
146
  };
142
- export declare type RailgunWalletReceiveTokenAmount = RailgunWalletTokenAmount & {
147
+ export declare type RailgunWalletSendTokenAmount = RailgunWalletTokenAmount & SendAdditionalData;
148
+ export declare type RailgunWalletSendNFT = RailgunNFTRecipient & SendAdditionalData;
149
+ declare type ReceiveAdditionalData = {
143
150
  senderAddress?: string;
144
151
  memoText?: string;
145
152
  };
153
+ export declare type RailgunWalletReceiveTokenAmount = RailgunWalletTokenAmount & ReceiveAdditionalData;
154
+ export declare type RailgunWalletReceiveNFT = RailgunNFTRecipient & ReceiveAdditionalData;
146
155
  export declare type TransactionHistoryItem = {
147
156
  txid: string;
148
157
  receiveTokenAmounts: RailgunWalletReceiveTokenAmount[];
@@ -150,9 +159,13 @@ export declare type TransactionHistoryItem = {
150
159
  changeTokenAmounts: RailgunWalletTokenAmount[];
151
160
  relayerFeeTokenAmount?: RailgunWalletTokenAmount;
152
161
  unshieldTokenAmounts: RailgunWalletSendTokenAmount[];
162
+ receiveNFTs: RailgunWalletReceiveNFT[];
163
+ transferNFTs: RailgunWalletSendNFT[];
164
+ unshieldNFTs: RailgunWalletSendNFT[];
153
165
  version: number;
154
166
  };
155
167
  export declare type TransactionHistorySerializedResponse = {
156
168
  items?: TransactionHistoryItem[];
157
169
  error?: string;
158
170
  };
171
+ export {};
@@ -6,7 +6,7 @@ var ChainType;
6
6
  ChainType[ChainType["EVM"] = 0] = "EVM";
7
7
  })(ChainType = exports.ChainType || (exports.ChainType = {}));
8
8
  /**
9
- * Synced from TokenType (@railgun-community/engine).
9
+ * Synced NFT types from TokenType (@railgun-community/engine).
10
10
  */
11
11
  var NFTTokenType;
12
12
  (function (NFTTokenType) {
@@ -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;AA2ED;;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 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 RailgunWalletTokenAmountRecipient = RailgunWalletTokenAmount & {\n recipientAddress: string;\n};\n\n/**\n * Synced from TokenType (@railgun-community/engine).\n */\nexport enum NFTTokenType {\n ERC721 = 1,\n ERC1155 = 2,\n}\n\nexport type RailgunNFTRecipient = {\n nftAddress: string;\n tokenSubIDString: string;\n nftTokenType: NFTTokenType;\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\nexport type RailgunWalletSendTokenAmount = RailgunWalletTokenAmount & {\n recipientAddress?: string;\n walletSource?: string;\n memoText?: string;\n};\n\nexport type RailgunWalletReceiveTokenAmount = RailgunWalletTokenAmount & {\n senderAddress?: string;\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"]}
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;AAiFD;;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 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 RailgunTokenDataNFT = {\n tokenAddress: string;\n tokenType: NFTTokenType;\n tokenSubID: string;\n};\n\nexport type RailgunWalletTokenAmountRecipient = RailgunWalletTokenAmount & {\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 RailgunNFTRecipient = {\n nftAddress: string;\n nftTokenType: NFTTokenType;\n tokenSubID: string;\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 RailgunWalletSendTokenAmount = RailgunWalletTokenAmount &\n SendAdditionalData;\n\nexport type RailgunWalletSendNFT = RailgunNFTRecipient & SendAdditionalData;\n\ntype ReceiveAdditionalData = {\n senderAddress?: string;\n memoText?: string;\n};\n\nexport type RailgunWalletReceiveTokenAmount = RailgunWalletTokenAmount &\n ReceiveAdditionalData;\n\nexport type RailgunWalletReceiveNFT = RailgunNFTRecipient &\n ReceiveAdditionalData;\n\nexport type TransactionHistoryItem = {\n txid: string;\n receiveTokenAmounts: RailgunWalletReceiveTokenAmount[];\n transferTokenAmounts: RailgunWalletSendTokenAmount[];\n changeTokenAmounts: RailgunWalletTokenAmount[];\n relayerFeeTokenAmount?: RailgunWalletTokenAmount;\n unshieldTokenAmounts: RailgunWalletSendTokenAmount[];\n receiveNFTs: RailgunWalletReceiveNFT[];\n transferNFTs: RailgunWalletSendNFT[];\n unshieldNFTs: RailgunWalletSendNFT[];\n version: number;\n};\n\nexport type TransactionHistorySerializedResponse = {\n items?: TransactionHistoryItem[];\n error?: string;\n};\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@railgun-community/shared-models",
3
- "version": "3.2.4",
3
+ "version": "3.3.0",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "files": [