bitbadgesjs-sdk 0.1.0 → 0.1.2
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/README.md +1 -1
- package/dist/eip712/payload/samples/getSampleMsg.js +8 -8
- package/dist/eip712/payload/samples/getSampleMsg.js.map +1 -1
- package/dist/index.d.ts +9 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -7
- package/dist/index.js.map +1 -1
- package/dist/transactions/messages/base.d.ts +5 -1
- package/dist/transactions/messages/base.d.ts.map +1 -1
- package/dist/transactions/messages/base.js +14 -7
- package/dist/transactions/messages/base.js.map +1 -1
- package/dist/transactions/messages/bitbadges/badges/msgCreateAddressLists.d.ts +2 -1
- package/dist/transactions/messages/bitbadges/badges/msgCreateAddressLists.d.ts.map +1 -1
- package/dist/transactions/messages/bitbadges/badges/msgCreateAddressLists.js +7 -6
- package/dist/transactions/messages/bitbadges/badges/msgCreateAddressLists.js.map +1 -1
- package/dist/transactions/messages/bitbadges/badges/msgCreateCollection.d.ts +6 -1
- package/dist/transactions/messages/bitbadges/badges/msgCreateCollection.d.ts.map +1 -1
- package/dist/transactions/messages/bitbadges/badges/msgCreateCollection.js +33 -28
- package/dist/transactions/messages/bitbadges/badges/msgCreateCollection.js.map +1 -1
- package/dist/transactions/messages/bitbadges/badges/msgDeleteCollection.d.ts +2 -2
- package/dist/transactions/messages/bitbadges/badges/msgDeleteCollection.d.ts.map +1 -1
- package/dist/transactions/messages/bitbadges/badges/msgDeleteCollection.js +7 -6
- package/dist/transactions/messages/bitbadges/badges/msgDeleteCollection.js.map +1 -1
- package/dist/transactions/messages/bitbadges/badges/msgTransferBadges.d.ts +3 -1
- package/dist/transactions/messages/bitbadges/badges/msgTransferBadges.d.ts.map +1 -1
- package/dist/transactions/messages/bitbadges/badges/msgTransferBadges.js +10 -8
- package/dist/transactions/messages/bitbadges/badges/msgTransferBadges.js.map +1 -1
- package/dist/transactions/messages/bitbadges/badges/msgUniversalUpdateCollection.d.ts +7 -2
- package/dist/transactions/messages/bitbadges/badges/msgUniversalUpdateCollection.d.ts.map +1 -1
- package/dist/transactions/messages/bitbadges/badges/msgUniversalUpdateCollection.js +33 -30
- package/dist/transactions/messages/bitbadges/badges/msgUniversalUpdateCollection.js.map +1 -1
- package/dist/transactions/messages/bitbadges/badges/msgUpdateCollection.d.ts +7 -2
- package/dist/transactions/messages/bitbadges/badges/msgUpdateCollection.d.ts.map +1 -1
- package/dist/transactions/messages/bitbadges/badges/msgUpdateCollection.js +30 -26
- package/dist/transactions/messages/bitbadges/badges/msgUpdateCollection.js.map +1 -1
- package/dist/transactions/messages/bitbadges/badges/msgUpdateUserApprovals.d.ts +4 -1
- package/dist/transactions/messages/bitbadges/badges/msgUpdateUserApprovals.d.ts.map +1 -1
- package/dist/transactions/messages/bitbadges/badges/msgUpdateUserApprovals.js +15 -12
- package/dist/transactions/messages/bitbadges/badges/msgUpdateUserApprovals.js.map +1 -1
- package/dist/transactions/messages/bitbadges/protocols/msgCreateProtocol.d.ts +1 -1
- package/dist/transactions/messages/bitbadges/protocols/msgCreateProtocol.d.ts.map +1 -1
- package/dist/transactions/messages/bitbadges/protocols/msgCreateProtocol.js +4 -4
- package/dist/transactions/messages/bitbadges/protocols/msgCreateProtocol.js.map +1 -1
- package/dist/transactions/messages/bitbadges/protocols/msgDeleteProtocol.d.ts +1 -1
- package/dist/transactions/messages/bitbadges/protocols/msgDeleteProtocol.d.ts.map +1 -1
- package/dist/transactions/messages/bitbadges/protocols/msgDeleteProtocol.js +4 -4
- package/dist/transactions/messages/bitbadges/protocols/msgDeleteProtocol.js.map +1 -1
- package/dist/transactions/messages/bitbadges/protocols/msgSetCollectionForProtocol.d.ts +2 -1
- package/dist/transactions/messages/bitbadges/protocols/msgSetCollectionForProtocol.d.ts.map +1 -1
- package/dist/transactions/messages/bitbadges/protocols/msgSetCollectionForProtocol.js +7 -6
- package/dist/transactions/messages/bitbadges/protocols/msgSetCollectionForProtocol.js.map +1 -1
- package/dist/transactions/messages/bitbadges/protocols/msgUnsetCollectionForProtocol.d.ts +1 -1
- package/dist/transactions/messages/bitbadges/protocols/msgUnsetCollectionForProtocol.d.ts.map +1 -1
- package/dist/transactions/messages/bitbadges/protocols/msgUnsetCollectionForProtocol.js +4 -4
- package/dist/transactions/messages/bitbadges/protocols/msgUnsetCollectionForProtocol.js.map +1 -1
- package/dist/transactions/messages/bitbadges/protocols/msgUpdateProtocol.d.ts +1 -1
- package/dist/transactions/messages/bitbadges/protocols/msgUpdateProtocol.d.ts.map +1 -1
- package/dist/transactions/messages/bitbadges/protocols/msgUpdateProtocol.js +4 -4
- package/dist/transactions/messages/bitbadges/protocols/msgUpdateProtocol.js.map +1 -1
- package/dist/transactions/messages/bitbadges/wasmx/msgExecuteContractCompat.d.ts +1 -1
- package/dist/transactions/messages/bitbadges/wasmx/msgExecuteContractCompat.d.ts.map +1 -1
- package/dist/transactions/messages/bitbadges/wasmx/msgExecuteContractCompat.js +4 -4
- package/dist/transactions/messages/bitbadges/wasmx/msgExecuteContractCompat.js.map +1 -1
- package/dist/transactions/messages/bitbadges/wasmx/msgInstantiateContractCompat.d.ts +1 -1
- package/dist/transactions/messages/bitbadges/wasmx/msgInstantiateContractCompat.d.ts.map +1 -1
- package/dist/transactions/messages/bitbadges/wasmx/msgInstantiateContractCompat.js +4 -4
- package/dist/transactions/messages/bitbadges/wasmx/msgInstantiateContractCompat.js.map +1 -1
- package/dist/transactions/messages/bitbadges/wasmx/msgStoreCodeCompat.d.ts +1 -1
- package/dist/transactions/messages/bitbadges/wasmx/msgStoreCodeCompat.d.ts.map +1 -1
- package/dist/transactions/messages/bitbadges/wasmx/msgStoreCodeCompat.js +4 -4
- package/dist/transactions/messages/bitbadges/wasmx/msgStoreCodeCompat.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/badges/addressLists.d.ts +39 -0
- package/dist/types/badges/addressLists.d.ts.map +1 -0
- package/dist/types/badges/addressLists.js +292 -0
- package/dist/types/badges/addressLists.js.map +1 -0
- package/dist/types/badges/{typeutils/approvals.d.ts → approvals.d.ts} +26 -39
- package/dist/types/badges/approvals.d.ts.map +1 -0
- package/dist/types/badges/{typeutils/approvals.js → approvals.js} +186 -151
- package/dist/types/badges/approvals.js.map +1 -0
- package/dist/types/badges/{typeutils/permissions.d.ts → permissions.d.ts} +140 -5
- package/dist/types/badges/permissions.d.ts.map +1 -0
- package/dist/types/badges/permissions.js +2030 -0
- package/dist/types/badges/permissions.js.map +1 -0
- package/dist/types/badges/{typeutils/typeUtils.d.ts → typeUtils.d.ts} +48 -47
- package/dist/types/badges/typeUtils.d.ts.map +1 -0
- package/dist/types/badges/{typeutils/typeUtils.js → typeUtils.js} +527 -283
- package/dist/types/badges/typeUtils.js.map +1 -0
- package/dist/types/badges/userBalances.d.ts +79 -0
- package/dist/types/badges/userBalances.d.ts.map +1 -0
- package/dist/types/badges/userBalances.js +154 -0
- package/dist/types/badges/userBalances.js.map +1 -0
- package/dist/types/base.d.ts +60 -5
- package/dist/types/base.d.ts.map +1 -1
- package/dist/types/base.js +203 -8
- package/dist/types/base.js.map +1 -1
- package/dist/{utils → types}/math.d.ts +4 -1
- package/dist/types/math.d.ts.map +1 -0
- package/dist/{utils → types}/math.js +10 -1
- package/dist/types/math.js.map +1 -0
- package/dist/types/protocols/types.d.ts +32 -6
- package/dist/types/protocols/types.d.ts.map +1 -1
- package/dist/types/protocols/types.js +53 -9
- package/dist/types/protocols/types.js.map +1 -1
- package/dist/types/string-numbers.d.ts.map +1 -0
- package/dist/types/string-numbers.js.map +1 -0
- package/dist/types/types.d.ts +27 -0
- package/dist/types/types.d.ts.map +1 -0
- package/dist/{utils/types → types}/types.js +1 -19
- package/dist/types/types.js.map +1 -0
- package/dist/utils/aliases.d.ts +1 -1
- package/dist/utils/aliases.d.ts.map +1 -1
- package/dist/utils/api/BitBadgesAddressList.d.ts +96 -0
- package/dist/utils/api/BitBadgesAddressList.d.ts.map +1 -0
- package/dist/utils/api/BitBadgesAddressList.js +139 -0
- package/dist/utils/api/BitBadgesAddressList.js.map +1 -0
- package/dist/utils/{api-sdk.d.ts → api/BitBadgesApi.d.ts} +10 -18
- package/dist/utils/api/BitBadgesApi.d.ts.map +1 -0
- package/dist/utils/{api-sdk.js → api/BitBadgesApi.js} +49 -191
- package/dist/utils/api/BitBadgesApi.js.map +1 -0
- package/dist/utils/api/BitBadgesCollection.d.ts +314 -0
- package/dist/utils/api/BitBadgesCollection.d.ts.map +1 -0
- package/dist/utils/api/BitBadgesCollection.js +765 -0
- package/dist/utils/api/BitBadgesCollection.js.map +1 -0
- package/dist/utils/api/BitBadgesUserInfo.d.ts +210 -0
- package/dist/utils/api/BitBadgesUserInfo.d.ts.map +1 -0
- package/dist/utils/{types/users.js → api/BitBadgesUserInfo.js} +157 -59
- package/dist/utils/api/BitBadgesUserInfo.js.map +1 -0
- package/dist/utils/approved_transfers_casts.d.ts +1 -1
- package/dist/utils/approved_transfers_casts.d.ts.map +1 -1
- package/dist/utils/approved_transfers_casts.js +11 -11
- package/dist/utils/approved_transfers_casts.js.map +1 -1
- package/dist/utils/badgeMetadata.d.ts +3 -5
- package/dist/utils/badgeMetadata.d.ts.map +1 -1
- package/dist/utils/badgeMetadata.js +20 -28
- package/dist/utils/badgeMetadata.js.map +1 -1
- package/dist/utils/balances.d.ts +5 -5
- package/dist/utils/balances.d.ts.map +1 -1
- package/dist/utils/balances.js +70 -79
- package/dist/utils/balances.js.map +1 -1
- package/dist/utils/batch-utils.d.ts +3 -1
- package/dist/utils/batch-utils.d.ts.map +1 -1
- package/dist/utils/batch-utils.js +13 -11
- package/dist/utils/batch-utils.js.map +1 -1
- package/dist/utils/chains.d.ts +1 -11
- package/dist/utils/chains.d.ts.map +1 -1
- package/dist/utils/chains.js +5 -144
- package/dist/utils/chains.js.map +1 -1
- package/dist/utils/converter.d.ts +10 -0
- package/dist/utils/converter.d.ts.map +1 -1
- package/dist/utils/converter.js +140 -1
- package/dist/utils/converter.js.map +1 -1
- package/dist/utils/display.d.ts +2 -2
- package/dist/utils/display.d.ts.map +1 -1
- package/dist/utils/display.js +7 -6
- package/dist/utils/display.js.map +1 -1
- package/dist/utils/distribution.d.ts +2 -1
- package/dist/utils/distribution.d.ts.map +1 -1
- package/dist/utils/distribution.js +30 -27
- package/dist/utils/distribution.js.map +1 -1
- package/dist/utils/firstMatches.d.ts +2 -2
- package/dist/utils/firstMatches.d.ts.map +1 -1
- package/dist/utils/firstMatches.js +19 -19
- package/dist/utils/firstMatches.js.map +1 -1
- package/dist/utils/index.d.ts +9 -13
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +9 -13
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/metadataIds.d.ts +1 -7
- package/dist/utils/metadataIds.d.ts.map +1 -1
- package/dist/utils/metadataIds.js +6 -88
- package/dist/utils/metadataIds.js.map +1 -1
- package/dist/utils/overlaps.d.ts +1 -1
- package/dist/utils/overlaps.d.ts.map +1 -1
- package/dist/utils/overlaps.js +41 -40
- package/dist/utils/overlaps.js.map +1 -1
- package/dist/utils/types/activity.d.ts +3 -2
- package/dist/utils/types/activity.d.ts.map +1 -1
- package/dist/utils/types/activity.js +11 -10
- package/dist/utils/types/activity.js.map +1 -1
- package/dist/utils/types/api.d.ts +23 -274
- package/dist/utils/types/api.d.ts.map +1 -1
- package/dist/utils/types/api.js +50 -237
- package/dist/utils/types/api.js.map +1 -1
- package/dist/utils/types/coin.d.ts +2 -2
- package/dist/utils/types/coin.d.ts.map +1 -1
- package/dist/utils/types/coin.js +3 -3
- package/dist/utils/types/coin.js.map +1 -1
- package/dist/utils/types/collections.d.ts +55 -264
- package/dist/utils/types/collections.d.ts.map +1 -1
- package/dist/utils/types/collections.js +101 -562
- package/dist/utils/types/collections.js.map +1 -1
- package/dist/utils/types/db.d.ts +25 -63
- package/dist/utils/types/db.d.ts.map +1 -1
- package/dist/utils/types/db.js +107 -174
- package/dist/utils/types/db.js.map +1 -1
- package/dist/utils/types/metadata.d.ts +19 -59
- package/dist/utils/types/metadata.d.ts.map +1 -1
- package/dist/utils/types/metadata.js +23 -89
- package/dist/utils/types/metadata.js.map +1 -1
- package/dist/utils/types/routes.d.ts +1 -1
- package/dist/utils/types/routes.d.ts.map +1 -1
- package/dist/utils/types/routes.js.map +1 -1
- package/dist/utils/types/schemas.d.ts +1 -1
- package/dist/utils/types/schemas.d.ts.map +1 -1
- package/dist/utils/types/transfers.d.ts +6 -2
- package/dist/utils/types/transfers.d.ts.map +1 -1
- package/dist/utils/types/transfers.js +4 -3
- package/dist/utils/types/transfers.js.map +1 -1
- package/dist/utils/userApprovals.d.ts +1 -1
- package/dist/utils/userApprovals.d.ts.map +1 -1
- package/dist/utils/userApprovals.js +15 -15
- package/dist/utils/userApprovals.js.map +1 -1
- package/package.json +1 -1
- package/dist/types/badges/string-numbers.d.ts.map +0 -1
- package/dist/types/badges/string-numbers.js.map +0 -1
- package/dist/types/badges/typeutils/approvals.d.ts.map +0 -1
- package/dist/types/badges/typeutils/approvals.js.map +0 -1
- package/dist/types/badges/typeutils/permissions.d.ts.map +0 -1
- package/dist/types/badges/typeutils/permissions.js +0 -675
- package/dist/types/badges/typeutils/permissions.js.map +0 -1
- package/dist/types/badges/typeutils/typeUtils.d.ts.map +0 -1
- package/dist/types/badges/typeutils/typeUtils.js.map +0 -1
- package/dist/utils/addressLists.d.ts +0 -6
- package/dist/utils/addressLists.d.ts.map +0 -1
- package/dist/utils/addressLists.js +0 -202
- package/dist/utils/addressLists.js.map +0 -1
- package/dist/utils/api-sdk.d.ts.map +0 -1
- package/dist/utils/api-sdk.js.map +0 -1
- package/dist/utils/api-utils.d.ts +0 -6
- package/dist/utils/api-utils.d.ts.map +0 -1
- package/dist/utils/api-utils.js +0 -167
- package/dist/utils/api-utils.js.map +0 -1
- package/dist/utils/math.d.ts.map +0 -1
- package/dist/utils/math.js.map +0 -1
- package/dist/utils/permission_checks.d.ts +0 -51
- package/dist/utils/permission_checks.d.ts.map +0 -1
- package/dist/utils/permission_checks.js +0 -330
- package/dist/utils/permission_checks.js.map +0 -1
- package/dist/utils/permissions.d.ts +0 -17
- package/dist/utils/permissions.d.ts.map +0 -1
- package/dist/utils/permissions.js +0 -280
- package/dist/utils/permissions.js.map +0 -1
- package/dist/utils/types/types.d.ts +0 -42
- package/dist/utils/types/types.d.ts.map +0 -1
- package/dist/utils/types/types.js.map +0 -1
- package/dist/utils/types/users.d.ts +0 -163
- package/dist/utils/types/users.d.ts.map +0 -1
- package/dist/utils/types/users.js.map +0 -1
- package/dist/utils/uintRanges.d.ts +0 -12
- package/dist/utils/uintRanges.d.ts.map +0 -1
- package/dist/utils/uintRanges.js +0 -182
- package/dist/utils/uintRanges.js.map +0 -1
- package/dist/utils/update_checks.d.ts +0 -15
- package/dist/utils/update_checks.d.ts.map +0 -1
- package/dist/utils/update_checks.js +0 -565
- package/dist/utils/update_checks.js.map +0 -1
- package/dist/utils/validate_permissions_updates.d.ts +0 -11
- package/dist/utils/validate_permissions_updates.d.ts.map +0 -1
- package/dist/utils/validate_permissions_updates.js +0 -227
- package/dist/utils/validate_permissions_updates.js.map +0 -1
- /package/dist/types/{badges/string-numbers.d.ts → string-numbers.d.ts} +0 -0
- /package/dist/types/{badges/string-numbers.js → string-numbers.js} +0 -0
package/dist/utils/types/db.js
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UserProtocolCollectionsDoc = exports.ProtocolDoc = exports.FollowDetailsDoc = exports.BlockinAuthSignatureDoc = exports.ComplianceDoc = exports.IPFSTotalsDoc = exports.AirdropDoc = exports.RefreshDoc = exports.FetchDoc = exports.
|
|
3
|
+
exports.UserProtocolCollectionsDoc = exports.ProtocolDoc = exports.FollowDetailsDoc = exports.BlockinAuthSignatureDoc = exports.ComplianceDoc = exports.IPFSTotalsDoc = exports.AirdropDoc = exports.RefreshDoc = exports.FetchDoc = exports.MerkleChallengeIdDetails = exports.MerkleChallengeDoc = exports.ChallengeTrackerIdDetails = exports.ApprovalTrackerDoc = exports.PasswordDoc = exports.BalanceDocWithDetails = exports.BalanceDoc = exports.AddressListDoc = exports.AddressListEditKey = exports.StatusDoc = exports.LatestBlockStatus = exports.QueueDoc = exports.ProfileDoc = exports.CustomListPage = exports.CustomPage = exports.AccountDoc = exports.CollectionDoc = void 0;
|
|
4
4
|
const blockin_1 = require("blockin");
|
|
5
|
-
const
|
|
5
|
+
const approvals_1 = require("../../types/badges/approvals");
|
|
6
|
+
const base_1 = require("../../types/base");
|
|
7
|
+
const permissions_1 = require("../../types/badges/permissions");
|
|
8
|
+
const typeUtils_1 = require("../../types/badges/typeUtils");
|
|
6
9
|
const batch_utils_1 = require("../batch-utils");
|
|
7
10
|
const coin_1 = require("./coin");
|
|
11
|
+
const collections_1 = require("./collections");
|
|
8
12
|
const transfers_1 = require("./transfers");
|
|
9
|
-
|
|
13
|
+
const userBalances_1 = require("../../types/badges/userBalances");
|
|
14
|
+
class CollectionDoc extends base_1.BaseNumberTypeClass {
|
|
10
15
|
_docId;
|
|
11
16
|
_id;
|
|
12
17
|
collectionId;
|
|
@@ -31,17 +36,17 @@ class CollectionDoc extends __1.BaseNumberTypeClass {
|
|
|
31
36
|
this._docId = data._docId;
|
|
32
37
|
this._id = data._id;
|
|
33
38
|
this.collectionId = data.collectionId;
|
|
34
|
-
this.collectionMetadataTimeline = data.collectionMetadataTimeline.map((collectionMetadataTimeline) => new
|
|
35
|
-
this.badgeMetadataTimeline = data.badgeMetadataTimeline.map((badgeMetadataTimeline) => new
|
|
39
|
+
this.collectionMetadataTimeline = data.collectionMetadataTimeline.map((collectionMetadataTimeline) => new typeUtils_1.CollectionMetadataTimeline(collectionMetadataTimeline));
|
|
40
|
+
this.badgeMetadataTimeline = data.badgeMetadataTimeline.map((badgeMetadataTimeline) => new typeUtils_1.BadgeMetadataTimeline(badgeMetadataTimeline));
|
|
36
41
|
this.balancesType = data.balancesType;
|
|
37
|
-
this.offChainBalancesMetadataTimeline = data.offChainBalancesMetadataTimeline.map((offChainBalancesMetadataTimeline) => new
|
|
38
|
-
this.customDataTimeline = data.customDataTimeline.map((customDataTimeline) => new
|
|
39
|
-
this.managerTimeline = data.managerTimeline.map((managerTimeline) => new
|
|
40
|
-
this.collectionPermissions = new
|
|
41
|
-
this.collectionApprovals = data.collectionApprovals.map((collectionApproval) => new
|
|
42
|
-
this.standardsTimeline = data.standardsTimeline.map((standardsTimeline) => new
|
|
43
|
-
this.isArchivedTimeline = data.isArchivedTimeline.map((isArchivedTimeline) => new
|
|
44
|
-
this.defaultBalances = new
|
|
42
|
+
this.offChainBalancesMetadataTimeline = data.offChainBalancesMetadataTimeline.map((offChainBalancesMetadataTimeline) => new typeUtils_1.OffChainBalancesMetadataTimeline(offChainBalancesMetadataTimeline));
|
|
43
|
+
this.customDataTimeline = data.customDataTimeline.map((customDataTimeline) => new typeUtils_1.CustomDataTimeline(customDataTimeline));
|
|
44
|
+
this.managerTimeline = data.managerTimeline.map((managerTimeline) => new typeUtils_1.ManagerTimeline(managerTimeline));
|
|
45
|
+
this.collectionPermissions = new permissions_1.CollectionPermissions(data.collectionPermissions);
|
|
46
|
+
this.collectionApprovals = data.collectionApprovals.map((collectionApproval) => new approvals_1.CollectionApproval(collectionApproval));
|
|
47
|
+
this.standardsTimeline = data.standardsTimeline.map((standardsTimeline) => new typeUtils_1.StandardsTimeline(standardsTimeline));
|
|
48
|
+
this.isArchivedTimeline = data.isArchivedTimeline.map((isArchivedTimeline) => new typeUtils_1.IsArchivedTimeline(isArchivedTimeline));
|
|
49
|
+
this.defaultBalances = new userBalances_1.UserBalanceStore(data.defaultBalances);
|
|
45
50
|
this.createdBy = data.createdBy;
|
|
46
51
|
this.createdBlock = data.createdBlock;
|
|
47
52
|
this.createdTimestamp = data.createdTimestamp;
|
|
@@ -49,7 +54,7 @@ class CollectionDoc extends __1.BaseNumberTypeClass {
|
|
|
49
54
|
this.aliasAddress = data.aliasAddress;
|
|
50
55
|
}
|
|
51
56
|
convert(convertFunction) {
|
|
52
|
-
return new CollectionDoc((0,
|
|
57
|
+
return new CollectionDoc((0, base_1.deepCopy)({
|
|
53
58
|
...this,
|
|
54
59
|
collectionId: convertFunction(this.collectionId),
|
|
55
60
|
collectionMetadataTimeline: this.collectionMetadataTimeline.map((collectionMetadataTimeline) => collectionMetadataTimeline.convert(convertFunction)),
|
|
@@ -73,7 +78,7 @@ class CollectionDoc extends __1.BaseNumberTypeClass {
|
|
|
73
78
|
}
|
|
74
79
|
}
|
|
75
80
|
exports.CollectionDoc = CollectionDoc;
|
|
76
|
-
class AccountDoc extends
|
|
81
|
+
class AccountDoc extends base_1.BaseNumberTypeClass {
|
|
77
82
|
_docId;
|
|
78
83
|
_id;
|
|
79
84
|
publicKey;
|
|
@@ -100,7 +105,7 @@ class AccountDoc extends __1.BaseNumberTypeClass {
|
|
|
100
105
|
this.balance = data.balance ? new coin_1.CosmosCoin(data.balance) : undefined;
|
|
101
106
|
}
|
|
102
107
|
convert(convertFunction) {
|
|
103
|
-
return new AccountDoc((0,
|
|
108
|
+
return new AccountDoc((0, base_1.deepCopy)({
|
|
104
109
|
...this,
|
|
105
110
|
accountNumber: convertFunction(this.accountNumber),
|
|
106
111
|
sequence: convertFunction(this.sequence),
|
|
@@ -109,7 +114,37 @@ class AccountDoc extends __1.BaseNumberTypeClass {
|
|
|
109
114
|
}
|
|
110
115
|
}
|
|
111
116
|
exports.AccountDoc = AccountDoc;
|
|
112
|
-
class
|
|
117
|
+
class CustomPage extends base_1.BaseNumberTypeClass {
|
|
118
|
+
title;
|
|
119
|
+
description;
|
|
120
|
+
items;
|
|
121
|
+
constructor(data) {
|
|
122
|
+
super();
|
|
123
|
+
this.title = data.title;
|
|
124
|
+
this.description = data.description;
|
|
125
|
+
this.items = data.items;
|
|
126
|
+
}
|
|
127
|
+
convert(convertFunction) {
|
|
128
|
+
return new CustomPage((0, base_1.deepCopy)({
|
|
129
|
+
...this,
|
|
130
|
+
items: this.items.map((item) => item.convert(convertFunction)),
|
|
131
|
+
}));
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
exports.CustomPage = CustomPage;
|
|
135
|
+
class CustomListPage extends base_1.CustomTypeClass {
|
|
136
|
+
title;
|
|
137
|
+
description;
|
|
138
|
+
items;
|
|
139
|
+
constructor(data) {
|
|
140
|
+
super();
|
|
141
|
+
this.title = data.title;
|
|
142
|
+
this.description = data.description;
|
|
143
|
+
this.items = data.items;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
exports.CustomListPage = CustomListPage;
|
|
147
|
+
class ProfileDoc extends base_1.BaseNumberTypeClass {
|
|
113
148
|
_docId;
|
|
114
149
|
_id;
|
|
115
150
|
fetchedProfile;
|
|
@@ -154,32 +189,16 @@ class ProfileDoc extends __1.BaseNumberTypeClass {
|
|
|
154
189
|
this.notifications = data.notifications;
|
|
155
190
|
}
|
|
156
191
|
convert(convertFunction) {
|
|
157
|
-
return new ProfileDoc((0,
|
|
192
|
+
return new ProfileDoc((0, base_1.deepCopy)({
|
|
158
193
|
...this,
|
|
159
194
|
hiddenBadges: this.hiddenBadges?.map((hiddenBadge) => hiddenBadge.convert(convertFunction)),
|
|
160
195
|
customPages: this.customPages ? {
|
|
161
|
-
badges: this.customPages
|
|
162
|
-
|
|
163
|
-
description: customPage.description,
|
|
164
|
-
items: customPage.items.map((badge) => badge.convert(convertFunction)),
|
|
165
|
-
})),
|
|
166
|
-
lists: this.customPages?.lists.map((customPage) => ({
|
|
167
|
-
title: customPage.title,
|
|
168
|
-
description: customPage.description,
|
|
169
|
-
items: customPage.items,
|
|
170
|
-
})),
|
|
196
|
+
badges: this.customPages.badges.map((customPage) => customPage.convert(convertFunction)),
|
|
197
|
+
lists: this.customPages.lists,
|
|
171
198
|
} : undefined,
|
|
172
199
|
watchlists: this.watchlists ? {
|
|
173
|
-
badges: this.watchlists.badges.map((customPage) => (
|
|
174
|
-
|
|
175
|
-
description: customPage.description,
|
|
176
|
-
items: customPage.items.map((badge) => badge.convert(convertFunction)),
|
|
177
|
-
})),
|
|
178
|
-
lists: this.watchlists.lists.map((customPage) => ({
|
|
179
|
-
title: customPage.title,
|
|
180
|
-
description: customPage.description,
|
|
181
|
-
items: customPage.items,
|
|
182
|
-
})),
|
|
200
|
+
badges: this.watchlists.badges.map((customPage) => customPage.convert(convertFunction)),
|
|
201
|
+
lists: this.watchlists.lists,
|
|
183
202
|
} : undefined,
|
|
184
203
|
seenActivity: this.seenActivity ? convertFunction(this.seenActivity) : undefined,
|
|
185
204
|
createdAt: this.createdAt ? convertFunction(this.createdAt) : undefined,
|
|
@@ -197,7 +216,7 @@ class ProfileDoc extends __1.BaseNumberTypeClass {
|
|
|
197
216
|
}
|
|
198
217
|
}
|
|
199
218
|
exports.ProfileDoc = ProfileDoc;
|
|
200
|
-
class QueueDoc extends
|
|
219
|
+
class QueueDoc extends base_1.BaseNumberTypeClass {
|
|
201
220
|
_docId;
|
|
202
221
|
_id;
|
|
203
222
|
uri;
|
|
@@ -232,7 +251,7 @@ class QueueDoc extends __1.BaseNumberTypeClass {
|
|
|
232
251
|
this.notificationType = data.notificationType;
|
|
233
252
|
}
|
|
234
253
|
convert(convertFunction) {
|
|
235
|
-
return new QueueDoc((0,
|
|
254
|
+
return new QueueDoc((0, base_1.deepCopy)({
|
|
236
255
|
...this,
|
|
237
256
|
collectionId: convertFunction(this.collectionId),
|
|
238
257
|
loadBalanceId: convertFunction(this.loadBalanceId),
|
|
@@ -245,7 +264,7 @@ class QueueDoc extends __1.BaseNumberTypeClass {
|
|
|
245
264
|
}
|
|
246
265
|
}
|
|
247
266
|
exports.QueueDoc = QueueDoc;
|
|
248
|
-
class LatestBlockStatus extends
|
|
267
|
+
class LatestBlockStatus extends base_1.BaseNumberTypeClass {
|
|
249
268
|
height;
|
|
250
269
|
txIndex;
|
|
251
270
|
timestamp;
|
|
@@ -256,7 +275,7 @@ class LatestBlockStatus extends __1.BaseNumberTypeClass {
|
|
|
256
275
|
this.timestamp = data.timestamp;
|
|
257
276
|
}
|
|
258
277
|
convert(convertFunction) {
|
|
259
|
-
return new LatestBlockStatus((0,
|
|
278
|
+
return new LatestBlockStatus((0, base_1.deepCopy)({
|
|
260
279
|
height: convertFunction(this.height),
|
|
261
280
|
txIndex: convertFunction(this.txIndex),
|
|
262
281
|
timestamp: convertFunction(this.timestamp),
|
|
@@ -264,7 +283,7 @@ class LatestBlockStatus extends __1.BaseNumberTypeClass {
|
|
|
264
283
|
}
|
|
265
284
|
}
|
|
266
285
|
exports.LatestBlockStatus = LatestBlockStatus;
|
|
267
|
-
class StatusDoc extends
|
|
286
|
+
class StatusDoc extends base_1.BaseNumberTypeClass {
|
|
268
287
|
_docId;
|
|
269
288
|
_id;
|
|
270
289
|
block;
|
|
@@ -283,7 +302,7 @@ class StatusDoc extends __1.BaseNumberTypeClass {
|
|
|
283
302
|
this.lastXGasLimits = data.lastXGasLimits;
|
|
284
303
|
}
|
|
285
304
|
convert(convertFunction) {
|
|
286
|
-
return new StatusDoc((0,
|
|
305
|
+
return new StatusDoc((0, base_1.deepCopy)({
|
|
287
306
|
...this,
|
|
288
307
|
block: this.block.convert(convertFunction),
|
|
289
308
|
nextCollectionId: convertFunction(this.nextCollectionId),
|
|
@@ -293,7 +312,7 @@ class StatusDoc extends __1.BaseNumberTypeClass {
|
|
|
293
312
|
}
|
|
294
313
|
}
|
|
295
314
|
exports.StatusDoc = StatusDoc;
|
|
296
|
-
class AddressListEditKey extends
|
|
315
|
+
class AddressListEditKey extends base_1.BaseNumberTypeClass {
|
|
297
316
|
key;
|
|
298
317
|
expirationDate;
|
|
299
318
|
mustSignIn;
|
|
@@ -304,14 +323,14 @@ class AddressListEditKey extends __1.BaseNumberTypeClass {
|
|
|
304
323
|
this.mustSignIn = data.mustSignIn;
|
|
305
324
|
}
|
|
306
325
|
convert(convertFunction) {
|
|
307
|
-
return new AddressListEditKey((0,
|
|
326
|
+
return new AddressListEditKey((0, base_1.deepCopy)({
|
|
308
327
|
...this,
|
|
309
328
|
expirationDate: convertFunction(this.expirationDate),
|
|
310
329
|
}));
|
|
311
330
|
}
|
|
312
331
|
}
|
|
313
332
|
exports.AddressListEditKey = AddressListEditKey;
|
|
314
|
-
class AddressListDoc extends
|
|
333
|
+
class AddressListDoc extends typeUtils_1.AddressList {
|
|
315
334
|
_docId;
|
|
316
335
|
_id;
|
|
317
336
|
updateHistory;
|
|
@@ -337,7 +356,7 @@ class AddressListDoc extends __1.AddressList {
|
|
|
337
356
|
this.editKeys = data.editKeys ? data.editKeys.map((editKey) => new AddressListEditKey(editKey)) : undefined;
|
|
338
357
|
}
|
|
339
358
|
convert(convertFunction) {
|
|
340
|
-
return new AddressListDoc((0,
|
|
359
|
+
return new AddressListDoc((0, base_1.deepCopy)({
|
|
341
360
|
...this,
|
|
342
361
|
createdBlock: convertFunction(this.createdBlock),
|
|
343
362
|
lastUpdated: convertFunction(this.lastUpdated),
|
|
@@ -351,28 +370,7 @@ class AddressListDoc extends __1.AddressList {
|
|
|
351
370
|
}
|
|
352
371
|
}
|
|
353
372
|
exports.AddressListDoc = AddressListDoc;
|
|
354
|
-
|
|
355
|
-
const json = {};
|
|
356
|
-
for (const prop in obj) {
|
|
357
|
-
if (Object.prototype.hasOwnProperty.call(obj, prop)) {
|
|
358
|
-
const value = obj[prop];
|
|
359
|
-
if (typeof value !== 'undefined' && typeof value !== 'function') {
|
|
360
|
-
if (Array.isArray(value)) {
|
|
361
|
-
json[prop] = value.map((item) => (typeof item === 'object' && item !== null && typeof item.toJson === 'function') ? item.toJson() : item);
|
|
362
|
-
}
|
|
363
|
-
else if (typeof value === 'object' && value !== null && typeof value.toJson === 'function') {
|
|
364
|
-
json[prop] = value.toJson();
|
|
365
|
-
}
|
|
366
|
-
else {
|
|
367
|
-
json[prop] = value;
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
}
|
|
371
|
-
}
|
|
372
|
-
return json;
|
|
373
|
-
}
|
|
374
|
-
exports.convertClassPropertiesToJson = convertClassPropertiesToJson;
|
|
375
|
-
class BalanceDoc extends __1.BaseNumberTypeClass {
|
|
373
|
+
class BalanceDoc extends base_1.BaseNumberTypeClass {
|
|
376
374
|
_docId;
|
|
377
375
|
_id;
|
|
378
376
|
collectionId;
|
|
@@ -403,17 +401,17 @@ class BalanceDoc extends __1.BaseNumberTypeClass {
|
|
|
403
401
|
this.isPermanent = data.isPermanent;
|
|
404
402
|
this.contentHash = data.contentHash;
|
|
405
403
|
this.updateHistory = data.updateHistory;
|
|
406
|
-
this.balances = data.balances.map((balance) => new
|
|
407
|
-
this.incomingApprovals = data.incomingApprovals.map((incomingApproval) => new
|
|
408
|
-
this.outgoingApprovals = data.outgoingApprovals.map((outgoingApproval) => new
|
|
409
|
-
this.userPermissions = new
|
|
404
|
+
this.balances = data.balances.map((balance) => new typeUtils_1.Balance(balance));
|
|
405
|
+
this.incomingApprovals = data.incomingApprovals.map((incomingApproval) => new approvals_1.UserIncomingApproval(incomingApproval));
|
|
406
|
+
this.outgoingApprovals = data.outgoingApprovals.map((outgoingApproval) => new approvals_1.UserOutgoingApproval(outgoingApproval));
|
|
407
|
+
this.userPermissions = new permissions_1.UserPermissions(data.userPermissions);
|
|
410
408
|
this.autoApproveSelfInitiatedIncomingTransfers = data.autoApproveSelfInitiatedIncomingTransfers;
|
|
411
409
|
this.autoApproveSelfInitiatedOutgoingTransfers = data.autoApproveSelfInitiatedOutgoingTransfers;
|
|
412
410
|
}
|
|
413
411
|
convert(convertFunction) {
|
|
414
|
-
return new BalanceDoc((0,
|
|
412
|
+
return new BalanceDoc((0, base_1.deepCopy)({
|
|
415
413
|
...this,
|
|
416
|
-
...new
|
|
414
|
+
...new userBalances_1.UserBalanceStore(this).convert(convertFunction),
|
|
417
415
|
collectionId: convertFunction(this.collectionId),
|
|
418
416
|
fetchedAt: this.fetchedAt ? convertFunction(this.fetchedAt) : undefined,
|
|
419
417
|
fetchedAtBlock: this.fetchedAtBlock ? convertFunction(this.fetchedAtBlock) : undefined,
|
|
@@ -426,7 +424,7 @@ class BalanceDoc extends __1.BaseNumberTypeClass {
|
|
|
426
424
|
}
|
|
427
425
|
}
|
|
428
426
|
exports.BalanceDoc = BalanceDoc;
|
|
429
|
-
class BalanceDocWithDetails extends
|
|
427
|
+
class BalanceDocWithDetails extends base_1.BaseNumberTypeClass {
|
|
430
428
|
outgoingApprovals;
|
|
431
429
|
incomingApprovals;
|
|
432
430
|
userPermissions;
|
|
@@ -460,12 +458,12 @@ class BalanceDocWithDetails extends __1.BaseNumberTypeClass {
|
|
|
460
458
|
this.isPermanent = data.isPermanent;
|
|
461
459
|
this.contentHash = data.contentHash;
|
|
462
460
|
this.updateHistory = data.updateHistory;
|
|
463
|
-
this.balances = data.balances.map((balance) => new
|
|
461
|
+
this.balances = data.balances.map((balance) => new typeUtils_1.Balance(balance));
|
|
464
462
|
this.autoApproveSelfInitiatedIncomingTransfers = data.autoApproveSelfInitiatedIncomingTransfers;
|
|
465
463
|
this.autoApproveSelfInitiatedOutgoingTransfers = data.autoApproveSelfInitiatedOutgoingTransfers;
|
|
466
464
|
}
|
|
467
465
|
convert(convertFunction) {
|
|
468
|
-
return new BalanceDocWithDetails((0,
|
|
466
|
+
return new BalanceDocWithDetails((0, base_1.deepCopy)({
|
|
469
467
|
...this,
|
|
470
468
|
collectionId: convertFunction(this.collectionId),
|
|
471
469
|
fetchedAt: this.fetchedAt ? convertFunction(this.fetchedAt) : undefined,
|
|
@@ -483,7 +481,7 @@ class BalanceDocWithDetails extends __1.BaseNumberTypeClass {
|
|
|
483
481
|
}
|
|
484
482
|
}
|
|
485
483
|
exports.BalanceDocWithDetails = BalanceDocWithDetails;
|
|
486
|
-
class PasswordDoc extends
|
|
484
|
+
class PasswordDoc extends base_1.BaseNumberTypeClass {
|
|
487
485
|
_docId;
|
|
488
486
|
_id;
|
|
489
487
|
cid;
|
|
@@ -501,10 +499,10 @@ class PasswordDoc extends __1.BaseNumberTypeClass {
|
|
|
501
499
|
this.docClaimedByCollection = data.docClaimedByCollection;
|
|
502
500
|
this.collectionId = data.collectionId;
|
|
503
501
|
this.claimedUsers = data.claimedUsers;
|
|
504
|
-
this.challengeDetails = data.challengeDetails ? new ChallengeDetails(data.challengeDetails) : undefined;
|
|
502
|
+
this.challengeDetails = data.challengeDetails ? new collections_1.ChallengeDetails(data.challengeDetails) : undefined;
|
|
505
503
|
}
|
|
506
504
|
convert(convertFunction) {
|
|
507
|
-
return new PasswordDoc((0,
|
|
505
|
+
return new PasswordDoc((0, base_1.deepCopy)({
|
|
508
506
|
...this,
|
|
509
507
|
collectionId: convertFunction(this.collectionId),
|
|
510
508
|
challengeDetails: this.challengeDetails ? this.challengeDetails.convert(convertFunction) : undefined,
|
|
@@ -513,34 +511,7 @@ class PasswordDoc extends __1.BaseNumberTypeClass {
|
|
|
513
511
|
}
|
|
514
512
|
}
|
|
515
513
|
exports.PasswordDoc = PasswordDoc;
|
|
516
|
-
class
|
|
517
|
-
leavesDetails;
|
|
518
|
-
tree;
|
|
519
|
-
treeOptions;
|
|
520
|
-
numLeaves;
|
|
521
|
-
currCode;
|
|
522
|
-
hasPassword;
|
|
523
|
-
password;
|
|
524
|
-
constructor(data) {
|
|
525
|
-
super();
|
|
526
|
-
this.leavesDetails = data.leavesDetails;
|
|
527
|
-
this.tree = data.tree;
|
|
528
|
-
this.treeOptions = data.treeOptions;
|
|
529
|
-
this.numLeaves = data.numLeaves;
|
|
530
|
-
this.currCode = data.currCode;
|
|
531
|
-
this.hasPassword = data.hasPassword;
|
|
532
|
-
this.password = data.password;
|
|
533
|
-
}
|
|
534
|
-
convert(convertFunction) {
|
|
535
|
-
return new ChallengeDetails((0, __1.deepCopy)({
|
|
536
|
-
...this,
|
|
537
|
-
numLeaves: this.numLeaves ? convertFunction(this.numLeaves) : undefined,
|
|
538
|
-
currCode: this.currCode !== undefined && BigInt(this.currCode ?? -1n) >= 0 ? convertFunction(this.currCode) : undefined,
|
|
539
|
-
}));
|
|
540
|
-
}
|
|
541
|
-
}
|
|
542
|
-
exports.ChallengeDetails = ChallengeDetails;
|
|
543
|
-
class ApprovalTrackerDoc extends __1.AmountTrackerIdDetails {
|
|
514
|
+
class ApprovalTrackerDoc extends typeUtils_1.AmountTrackerIdDetails {
|
|
544
515
|
_docId;
|
|
545
516
|
_id;
|
|
546
517
|
numTransfers;
|
|
@@ -548,12 +519,12 @@ class ApprovalTrackerDoc extends __1.AmountTrackerIdDetails {
|
|
|
548
519
|
constructor(data) {
|
|
549
520
|
super(data);
|
|
550
521
|
this.numTransfers = data.numTransfers;
|
|
551
|
-
this.amounts = data.amounts.map((amount) => new
|
|
522
|
+
this.amounts = data.amounts.map((amount) => new typeUtils_1.Balance(amount));
|
|
552
523
|
this._docId = data._docId;
|
|
553
524
|
this._id = data._id;
|
|
554
525
|
}
|
|
555
526
|
convert(convertFunction) {
|
|
556
|
-
return new ApprovalTrackerDoc((0,
|
|
527
|
+
return new ApprovalTrackerDoc((0, base_1.deepCopy)({
|
|
557
528
|
...this,
|
|
558
529
|
...super.convert(convertFunction),
|
|
559
530
|
numTransfers: convertFunction(this.numTransfers),
|
|
@@ -562,7 +533,7 @@ class ApprovalTrackerDoc extends __1.AmountTrackerIdDetails {
|
|
|
562
533
|
}
|
|
563
534
|
}
|
|
564
535
|
exports.ApprovalTrackerDoc = ApprovalTrackerDoc;
|
|
565
|
-
class ChallengeTrackerIdDetails extends
|
|
536
|
+
class ChallengeTrackerIdDetails extends base_1.BaseNumberTypeClass {
|
|
566
537
|
collectionId;
|
|
567
538
|
challengeId;
|
|
568
539
|
challengeLevel;
|
|
@@ -575,14 +546,14 @@ class ChallengeTrackerIdDetails extends __1.BaseNumberTypeClass {
|
|
|
575
546
|
this.approverAddress = data.approverAddress;
|
|
576
547
|
}
|
|
577
548
|
convert(convertFunction) {
|
|
578
|
-
return new ChallengeTrackerIdDetails((0,
|
|
549
|
+
return new ChallengeTrackerIdDetails((0, base_1.deepCopy)({
|
|
579
550
|
...this,
|
|
580
551
|
collectionId: convertFunction(this.collectionId),
|
|
581
552
|
}));
|
|
582
553
|
}
|
|
583
554
|
}
|
|
584
555
|
exports.ChallengeTrackerIdDetails = ChallengeTrackerIdDetails;
|
|
585
|
-
class MerkleChallengeDoc extends
|
|
556
|
+
class MerkleChallengeDoc extends base_1.BaseNumberTypeClass {
|
|
586
557
|
_docId;
|
|
587
558
|
_id;
|
|
588
559
|
collectionId;
|
|
@@ -601,7 +572,7 @@ class MerkleChallengeDoc extends __1.BaseNumberTypeClass {
|
|
|
601
572
|
this.usedLeafIndices = data.usedLeafIndices;
|
|
602
573
|
}
|
|
603
574
|
convert(convertFunction) {
|
|
604
|
-
return new MerkleChallengeDoc((0,
|
|
575
|
+
return new MerkleChallengeDoc((0, base_1.deepCopy)({
|
|
605
576
|
...this,
|
|
606
577
|
collectionId: convertFunction(this.collectionId),
|
|
607
578
|
usedLeafIndices: this.usedLeafIndices.map(convertFunction),
|
|
@@ -609,7 +580,7 @@ class MerkleChallengeDoc extends __1.BaseNumberTypeClass {
|
|
|
609
580
|
}
|
|
610
581
|
}
|
|
611
582
|
exports.MerkleChallengeDoc = MerkleChallengeDoc;
|
|
612
|
-
class MerkleChallengeIdDetails extends
|
|
583
|
+
class MerkleChallengeIdDetails extends base_1.BaseNumberTypeClass {
|
|
613
584
|
collectionId;
|
|
614
585
|
challengeId;
|
|
615
586
|
challengeLevel;
|
|
@@ -624,7 +595,7 @@ class MerkleChallengeIdDetails extends __1.BaseNumberTypeClass {
|
|
|
624
595
|
this.usedLeafIndices = data.usedLeafIndices;
|
|
625
596
|
}
|
|
626
597
|
convert(convertFunction) {
|
|
627
|
-
return new MerkleChallengeIdDetails((0,
|
|
598
|
+
return new MerkleChallengeIdDetails((0, base_1.deepCopy)({
|
|
628
599
|
...this,
|
|
629
600
|
collectionId: convertFunction(this.collectionId),
|
|
630
601
|
usedLeafIndices: this.usedLeafIndices.map(convertFunction),
|
|
@@ -632,45 +603,7 @@ class MerkleChallengeIdDetails extends __1.BaseNumberTypeClass {
|
|
|
632
603
|
}
|
|
633
604
|
}
|
|
634
605
|
exports.MerkleChallengeIdDetails = MerkleChallengeIdDetails;
|
|
635
|
-
class
|
|
636
|
-
details;
|
|
637
|
-
constructor(data) {
|
|
638
|
-
super(data);
|
|
639
|
-
this.details = data.details;
|
|
640
|
-
}
|
|
641
|
-
convert(convertFunction) {
|
|
642
|
-
const converted = new MerkleChallengeWithDetails((0, __1.deepCopy)({
|
|
643
|
-
...this,
|
|
644
|
-
...super.convert(convertFunction),
|
|
645
|
-
details: this.details ? this.details.convert(convertFunction) : undefined,
|
|
646
|
-
}));
|
|
647
|
-
return converted;
|
|
648
|
-
}
|
|
649
|
-
}
|
|
650
|
-
exports.MerkleChallengeWithDetails = MerkleChallengeWithDetails;
|
|
651
|
-
class ApprovalInfoDetails extends __1.BaseNumberTypeClass {
|
|
652
|
-
name;
|
|
653
|
-
description;
|
|
654
|
-
hasPassword;
|
|
655
|
-
password;
|
|
656
|
-
challengeDetails;
|
|
657
|
-
constructor(data) {
|
|
658
|
-
super();
|
|
659
|
-
this.name = data.name;
|
|
660
|
-
this.description = data.description;
|
|
661
|
-
this.hasPassword = data.hasPassword;
|
|
662
|
-
this.password = data.password;
|
|
663
|
-
this.challengeDetails = data.challengeDetails ? new ChallengeDetails(data.challengeDetails) : undefined;
|
|
664
|
-
}
|
|
665
|
-
convert(convertFunction) {
|
|
666
|
-
return new ApprovalInfoDetails((0, __1.deepCopy)({
|
|
667
|
-
...this,
|
|
668
|
-
challengeDetails: this.challengeDetails ? this.challengeDetails.convert(convertFunction) : undefined,
|
|
669
|
-
}));
|
|
670
|
-
}
|
|
671
|
-
}
|
|
672
|
-
exports.ApprovalInfoDetails = ApprovalInfoDetails;
|
|
673
|
-
class FetchDoc extends __1.BaseNumberTypeClass {
|
|
606
|
+
class FetchDoc extends base_1.BaseNumberTypeClass {
|
|
674
607
|
_docId;
|
|
675
608
|
_id;
|
|
676
609
|
content;
|
|
@@ -689,7 +622,7 @@ class FetchDoc extends __1.BaseNumberTypeClass {
|
|
|
689
622
|
this._id = data._id;
|
|
690
623
|
}
|
|
691
624
|
convert(convertFunction) {
|
|
692
|
-
return new FetchDoc((0,
|
|
625
|
+
return new FetchDoc((0, base_1.deepCopy)({
|
|
693
626
|
...this,
|
|
694
627
|
content: this.content ? this.db === 'Metadata' ?
|
|
695
628
|
this.content.convert(convertFunction) : this.db === 'ApprovalInfo' ?
|
|
@@ -700,7 +633,7 @@ class FetchDoc extends __1.BaseNumberTypeClass {
|
|
|
700
633
|
}
|
|
701
634
|
}
|
|
702
635
|
exports.FetchDoc = FetchDoc;
|
|
703
|
-
class RefreshDoc extends
|
|
636
|
+
class RefreshDoc extends base_1.BaseNumberTypeClass {
|
|
704
637
|
_docId;
|
|
705
638
|
_id;
|
|
706
639
|
collectionId;
|
|
@@ -713,7 +646,7 @@ class RefreshDoc extends __1.BaseNumberTypeClass {
|
|
|
713
646
|
this.refreshRequestTime = data.refreshRequestTime;
|
|
714
647
|
}
|
|
715
648
|
convert(convertFunction) {
|
|
716
|
-
return new RefreshDoc((0,
|
|
649
|
+
return new RefreshDoc((0, base_1.deepCopy)({
|
|
717
650
|
...this,
|
|
718
651
|
collectionId: convertFunction(this.collectionId),
|
|
719
652
|
refreshRequestTime: convertFunction(this.refreshRequestTime),
|
|
@@ -721,7 +654,7 @@ class RefreshDoc extends __1.BaseNumberTypeClass {
|
|
|
721
654
|
}
|
|
722
655
|
}
|
|
723
656
|
exports.RefreshDoc = RefreshDoc;
|
|
724
|
-
class AirdropDoc extends
|
|
657
|
+
class AirdropDoc extends base_1.BaseNumberTypeClass {
|
|
725
658
|
_docId;
|
|
726
659
|
_id;
|
|
727
660
|
airdropped;
|
|
@@ -736,14 +669,14 @@ class AirdropDoc extends __1.BaseNumberTypeClass {
|
|
|
736
669
|
this.hash = data.hash;
|
|
737
670
|
}
|
|
738
671
|
convert(convertFunction) {
|
|
739
|
-
return new AirdropDoc((0,
|
|
672
|
+
return new AirdropDoc((0, base_1.deepCopy)({
|
|
740
673
|
...this,
|
|
741
674
|
timestamp: convertFunction(this.timestamp),
|
|
742
675
|
}));
|
|
743
676
|
}
|
|
744
677
|
}
|
|
745
678
|
exports.AirdropDoc = AirdropDoc;
|
|
746
|
-
class IPFSTotalsDoc extends
|
|
679
|
+
class IPFSTotalsDoc extends base_1.BaseNumberTypeClass {
|
|
747
680
|
_docId;
|
|
748
681
|
_id;
|
|
749
682
|
bytesUploaded;
|
|
@@ -754,14 +687,14 @@ class IPFSTotalsDoc extends __1.BaseNumberTypeClass {
|
|
|
754
687
|
this._id = data._id;
|
|
755
688
|
}
|
|
756
689
|
convert(convertFunction) {
|
|
757
|
-
return new IPFSTotalsDoc((0,
|
|
690
|
+
return new IPFSTotalsDoc((0, base_1.deepCopy)({
|
|
758
691
|
...this,
|
|
759
692
|
bytesUploaded: convertFunction(this.bytesUploaded),
|
|
760
693
|
}));
|
|
761
694
|
}
|
|
762
695
|
}
|
|
763
696
|
exports.IPFSTotalsDoc = IPFSTotalsDoc;
|
|
764
|
-
class ComplianceDoc extends
|
|
697
|
+
class ComplianceDoc extends base_1.BaseNumberTypeClass {
|
|
765
698
|
_docId;
|
|
766
699
|
_id;
|
|
767
700
|
badges;
|
|
@@ -776,7 +709,7 @@ class ComplianceDoc extends __1.BaseNumberTypeClass {
|
|
|
776
709
|
this._id = data._id;
|
|
777
710
|
}
|
|
778
711
|
convert(convertFunction) {
|
|
779
|
-
return new ComplianceDoc((0,
|
|
712
|
+
return new ComplianceDoc((0, base_1.deepCopy)({
|
|
780
713
|
...this,
|
|
781
714
|
badges: {
|
|
782
715
|
nsfw: this.badges.nsfw.map(x => { return { ...x, collectionId: convertFunction(x.collectionId), badgeIds: x.badgeIds.map(y => y.convert(convertFunction)) }; }),
|
|
@@ -786,7 +719,7 @@ class ComplianceDoc extends __1.BaseNumberTypeClass {
|
|
|
786
719
|
}
|
|
787
720
|
}
|
|
788
721
|
exports.ComplianceDoc = ComplianceDoc;
|
|
789
|
-
class BlockinAuthSignatureDoc extends
|
|
722
|
+
class BlockinAuthSignatureDoc extends base_1.BaseNumberTypeClass {
|
|
790
723
|
_docId;
|
|
791
724
|
_id;
|
|
792
725
|
signature;
|
|
@@ -811,7 +744,7 @@ class BlockinAuthSignatureDoc extends __1.BaseNumberTypeClass {
|
|
|
811
744
|
this._id = data._id;
|
|
812
745
|
}
|
|
813
746
|
convert(convertFunction) {
|
|
814
|
-
return new BlockinAuthSignatureDoc((0,
|
|
747
|
+
return new BlockinAuthSignatureDoc((0, base_1.deepCopy)({
|
|
815
748
|
...this,
|
|
816
749
|
createdAt: convertFunction(this.createdAt),
|
|
817
750
|
params: (0, blockin_1.convertChallengeParams)(this.params, convertFunction),
|
|
@@ -820,7 +753,7 @@ class BlockinAuthSignatureDoc extends __1.BaseNumberTypeClass {
|
|
|
820
753
|
}
|
|
821
754
|
}
|
|
822
755
|
exports.BlockinAuthSignatureDoc = BlockinAuthSignatureDoc;
|
|
823
|
-
class FollowDetailsDoc extends
|
|
756
|
+
class FollowDetailsDoc extends base_1.BaseNumberTypeClass {
|
|
824
757
|
_docId;
|
|
825
758
|
_id;
|
|
826
759
|
cosmosAddress;
|
|
@@ -841,7 +774,7 @@ class FollowDetailsDoc extends __1.BaseNumberTypeClass {
|
|
|
841
774
|
this._id = data._id;
|
|
842
775
|
}
|
|
843
776
|
convert(convertFunction) {
|
|
844
|
-
return new FollowDetailsDoc((0,
|
|
777
|
+
return new FollowDetailsDoc((0, base_1.deepCopy)({
|
|
845
778
|
...this,
|
|
846
779
|
followingCount: convertFunction(this.followingCount),
|
|
847
780
|
followersCount: convertFunction(this.followersCount),
|
|
@@ -850,7 +783,7 @@ class FollowDetailsDoc extends __1.BaseNumberTypeClass {
|
|
|
850
783
|
}
|
|
851
784
|
}
|
|
852
785
|
exports.FollowDetailsDoc = FollowDetailsDoc;
|
|
853
|
-
class ProtocolDoc extends
|
|
786
|
+
class ProtocolDoc extends base_1.BaseNumberTypeClass {
|
|
854
787
|
_docId;
|
|
855
788
|
_id;
|
|
856
789
|
name;
|
|
@@ -869,13 +802,13 @@ class ProtocolDoc extends __1.BaseNumberTypeClass {
|
|
|
869
802
|
this.isFrozen = data.isFrozen;
|
|
870
803
|
}
|
|
871
804
|
convert(convertFunction) {
|
|
872
|
-
return new ProtocolDoc((0,
|
|
805
|
+
return new ProtocolDoc((0, base_1.deepCopy)({
|
|
873
806
|
...this,
|
|
874
807
|
}));
|
|
875
808
|
}
|
|
876
809
|
}
|
|
877
810
|
exports.ProtocolDoc = ProtocolDoc;
|
|
878
|
-
class UserProtocolCollectionsDoc extends
|
|
811
|
+
class UserProtocolCollectionsDoc extends base_1.BaseNumberTypeClass {
|
|
879
812
|
_docId;
|
|
880
813
|
_id;
|
|
881
814
|
protocols;
|
|
@@ -886,7 +819,7 @@ class UserProtocolCollectionsDoc extends __1.BaseNumberTypeClass {
|
|
|
886
819
|
this.protocols = data.protocols;
|
|
887
820
|
}
|
|
888
821
|
convert(convertFunction) {
|
|
889
|
-
return new UserProtocolCollectionsDoc((0,
|
|
822
|
+
return new UserProtocolCollectionsDoc((0, base_1.deepCopy)({
|
|
890
823
|
...this,
|
|
891
824
|
protocols: Object.fromEntries(Object.entries(this.protocols).map(([key, value]) => [key, convertFunction(value)])),
|
|
892
825
|
}));
|