@quicknode/sdk 0.5.0 → 0.5.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.
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "directory": "packages/libs/api/sdk"
7
7
  },
8
8
  "license": "MIT",
9
- "version": "0.5.0",
9
+ "version": "0.5.1",
10
10
  "main": "./src/index.js",
11
11
  "module": "./src/index.esm.js",
12
12
  "types": "./src/index.d.ts",
package/src/index.esm.js CHANGED
@@ -8202,9 +8202,10 @@ class NFTQueries {
8202
8202
  }
8203
8203
  getNFTsByWalletAddress(variables) {
8204
8204
  return __awaiter(this, void 0, void 0, function* () {
8205
+ const { address } = variables, otherVariables = __rest(variables, ["address"]);
8205
8206
  return yield this.client.query({
8206
8207
  query: getWalletAddressNFTsRawQuery,
8207
- variables,
8208
+ variables: Object.assign({ address: address.toLowerCase() }, otherVariables),
8208
8209
  });
8209
8210
  });
8210
8211
  }
@@ -8218,26 +8219,28 @@ class NFTQueries {
8218
8219
  }
8219
8220
  getNFTsByContractAddress(variables) {
8220
8221
  return __awaiter(this, void 0, void 0, function* () {
8222
+ const { address } = variables, otherVariables = __rest(variables, ["address"]);
8221
8223
  return yield this.client.query({
8222
8224
  query: getContractAddressNFTsRawQuery,
8223
- variables,
8225
+ variables: Object.assign({ address: address.toLowerCase() }, otherVariables),
8224
8226
  });
8225
8227
  });
8226
8228
  }
8227
8229
  getCollectionDetails(variables) {
8228
8230
  return __awaiter(this, void 0, void 0, function* () {
8231
+ const { address } = variables, otherVariables = __rest(variables, ["address"]);
8229
8232
  return yield this.client.query({
8230
8233
  query: getCollectionDetailsRawQuery,
8231
- variables,
8234
+ variables: Object.assign({ address: address.toLowerCase() }, otherVariables),
8232
8235
  });
8233
8236
  });
8234
8237
  }
8235
8238
  getNFTEventLogs(variables) {
8236
8239
  return __awaiter(this, void 0, void 0, function* () {
8237
- const { types = DEFAULT_LOG_FILTER_TYPES } = variables, otherVariables = __rest(variables, ["types"]);
8240
+ const { address, types = DEFAULT_LOG_FILTER_TYPES } = variables, otherVariables = __rest(variables, ["address", "types"]);
8238
8241
  return yield this.client.query({
8239
8242
  query: getNFTEventLogsRawQuery,
8240
- variables: Object.assign(Object.assign({}, otherVariables), { filter: {
8243
+ variables: Object.assign(Object.assign({}, otherVariables), { address: address.toLowerCase(), filter: {
8241
8244
  typeIn: types,
8242
8245
  } }),
8243
8246
  });
@@ -8245,18 +8248,19 @@ class NFTQueries {
8245
8248
  }
8246
8249
  getNFTDetails(variables) {
8247
8250
  return __awaiter(this, void 0, void 0, function* () {
8251
+ const { contractAddress } = variables, otherVariables = __rest(variables, ["contractAddress"]);
8248
8252
  return yield this.client.query({
8249
8253
  query: getNFTDetailsRawQuery,
8250
- variables,
8254
+ variables: Object.assign({ contractAddress: contractAddress.toLowerCase() }, otherVariables),
8251
8255
  });
8252
8256
  });
8253
8257
  }
8254
8258
  getContractEventLogs(variables) {
8255
8259
  return __awaiter(this, void 0, void 0, function* () {
8256
- const { types = DEFAULT_LOG_FILTER_TYPES } = variables, otherVariables = __rest(variables, ["types"]);
8260
+ const { address, types = DEFAULT_LOG_FILTER_TYPES } = variables, otherVariables = __rest(variables, ["address", "types"]);
8257
8261
  return yield this.client.query({
8258
8262
  query: getContractEventLogsRawQuery,
8259
- variables: Object.assign(Object.assign({}, otherVariables), { filter: {
8263
+ variables: Object.assign(Object.assign({}, otherVariables), { address: address.toLowerCase(), filter: {
8260
8264
  typeIn: types,
8261
8265
  } }),
8262
8266
  });
@@ -8264,10 +8268,11 @@ class NFTQueries {
8264
8268
  }
8265
8269
  getNFTsByWalletAndContracts(variables) {
8266
8270
  return __awaiter(this, void 0, void 0, function* () {
8267
- const { contracts } = variables, otherVariables = __rest(variables, ["contracts"]);
8271
+ const { address, contracts } = variables, otherVariables = __rest(variables, ["address", "contracts"]);
8272
+ const normalizedContracts = contracts.map((contract) => contract.toLowerCase());
8268
8273
  const response = yield this.client.query({
8269
8274
  query: getNFTsWalletAndContractsRawQuery,
8270
- variables: Object.assign(Object.assign({}, otherVariables), { filter: { contractAddressIn: contracts } }),
8275
+ variables: Object.assign(Object.assign({}, otherVariables), { address: address.toLowerCase(), filter: { contractAddressIn: normalizedContracts } }),
8271
8276
  });
8272
8277
  return response;
8273
8278
  });
package/src/index.js CHANGED
@@ -8210,9 +8210,10 @@ class NFTQueries {
8210
8210
  }
8211
8211
  getNFTsByWalletAddress(variables) {
8212
8212
  return __awaiter(this, void 0, void 0, function* () {
8213
+ const { address } = variables, otherVariables = __rest(variables, ["address"]);
8213
8214
  return yield this.client.query({
8214
8215
  query: getWalletAddressNFTsRawQuery,
8215
- variables,
8216
+ variables: Object.assign({ address: address.toLowerCase() }, otherVariables),
8216
8217
  });
8217
8218
  });
8218
8219
  }
@@ -8226,26 +8227,28 @@ class NFTQueries {
8226
8227
  }
8227
8228
  getNFTsByContractAddress(variables) {
8228
8229
  return __awaiter(this, void 0, void 0, function* () {
8230
+ const { address } = variables, otherVariables = __rest(variables, ["address"]);
8229
8231
  return yield this.client.query({
8230
8232
  query: getContractAddressNFTsRawQuery,
8231
- variables,
8233
+ variables: Object.assign({ address: address.toLowerCase() }, otherVariables),
8232
8234
  });
8233
8235
  });
8234
8236
  }
8235
8237
  getCollectionDetails(variables) {
8236
8238
  return __awaiter(this, void 0, void 0, function* () {
8239
+ const { address } = variables, otherVariables = __rest(variables, ["address"]);
8237
8240
  return yield this.client.query({
8238
8241
  query: getCollectionDetailsRawQuery,
8239
- variables,
8242
+ variables: Object.assign({ address: address.toLowerCase() }, otherVariables),
8240
8243
  });
8241
8244
  });
8242
8245
  }
8243
8246
  getNFTEventLogs(variables) {
8244
8247
  return __awaiter(this, void 0, void 0, function* () {
8245
- const { types = DEFAULT_LOG_FILTER_TYPES } = variables, otherVariables = __rest(variables, ["types"]);
8248
+ const { address, types = DEFAULT_LOG_FILTER_TYPES } = variables, otherVariables = __rest(variables, ["address", "types"]);
8246
8249
  return yield this.client.query({
8247
8250
  query: getNFTEventLogsRawQuery,
8248
- variables: Object.assign(Object.assign({}, otherVariables), { filter: {
8251
+ variables: Object.assign(Object.assign({}, otherVariables), { address: address.toLowerCase(), filter: {
8249
8252
  typeIn: types,
8250
8253
  } }),
8251
8254
  });
@@ -8253,18 +8256,19 @@ class NFTQueries {
8253
8256
  }
8254
8257
  getNFTDetails(variables) {
8255
8258
  return __awaiter(this, void 0, void 0, function* () {
8259
+ const { contractAddress } = variables, otherVariables = __rest(variables, ["contractAddress"]);
8256
8260
  return yield this.client.query({
8257
8261
  query: getNFTDetailsRawQuery,
8258
- variables,
8262
+ variables: Object.assign({ contractAddress: contractAddress.toLowerCase() }, otherVariables),
8259
8263
  });
8260
8264
  });
8261
8265
  }
8262
8266
  getContractEventLogs(variables) {
8263
8267
  return __awaiter(this, void 0, void 0, function* () {
8264
- const { types = DEFAULT_LOG_FILTER_TYPES } = variables, otherVariables = __rest(variables, ["types"]);
8268
+ const { address, types = DEFAULT_LOG_FILTER_TYPES } = variables, otherVariables = __rest(variables, ["address", "types"]);
8265
8269
  return yield this.client.query({
8266
8270
  query: getContractEventLogsRawQuery,
8267
- variables: Object.assign(Object.assign({}, otherVariables), { filter: {
8271
+ variables: Object.assign(Object.assign({}, otherVariables), { address: address.toLowerCase(), filter: {
8268
8272
  typeIn: types,
8269
8273
  } }),
8270
8274
  });
@@ -8272,10 +8276,11 @@ class NFTQueries {
8272
8276
  }
8273
8277
  getNFTsByWalletAndContracts(variables) {
8274
8278
  return __awaiter(this, void 0, void 0, function* () {
8275
- const { contracts } = variables, otherVariables = __rest(variables, ["contracts"]);
8279
+ const { address, contracts } = variables, otherVariables = __rest(variables, ["address", "contracts"]);
8280
+ const normalizedContracts = contracts.map((contract) => contract.toLowerCase());
8276
8281
  const response = yield this.client.query({
8277
8282
  query: getNFTsWalletAndContractsRawQuery,
8278
- variables: Object.assign(Object.assign({}, otherVariables), { filter: { contractAddressIn: contracts } }),
8283
+ variables: Object.assign(Object.assign({}, otherVariables), { address: address.toLowerCase(), filter: { contractAddressIn: normalizedContracts } }),
8279
8284
  });
8280
8285
  return response;
8281
8286
  });