bitbadgesjs-sdk 0.0.6 → 0.1.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.
- package/dist/amino/objectConverter.d.ts +1 -1
- package/dist/amino/objectConverter.d.ts.map +1 -1
- package/dist/amino/registry.js +3 -3
- package/dist/amino/registry.js.map +1 -1
- package/dist/eip712/payload/createTypedData.d.ts +1 -1
- package/dist/eip712/payload/createTypedData.d.ts.map +1 -1
- package/dist/eip712/payload/createTypes/parseMessage.d.ts +1 -1
- package/dist/eip712/payload/createTypes/parseMessage.d.ts.map +1 -1
- package/dist/eip712/payload/createTypes/parseMessage.js.map +1 -1
- package/dist/eip712/payload/createTypes/parsePayload.d.ts +1 -1
- package/dist/eip712/payload/createTypes/parsePayload.d.ts.map +1 -1
- package/dist/eip712/payload/createTypes/parsePayload.js.map +1 -1
- package/dist/eip712/payload/flattenPayload.d.ts +1 -1
- package/dist/eip712/payload/flattenPayload.d.ts.map +1 -1
- package/dist/eip712/payload/samples/getSampleMsg.js +1 -1
- package/dist/eip712/payload/samples/getSampleMsg.js.map +1 -1
- package/dist/index.d.ts +9 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -9
- package/dist/index.js.map +1 -1
- package/dist/transactions/messages/base.d.ts +3 -3
- package/dist/transactions/messages/base.d.ts.map +1 -1
- package/dist/transactions/messages/base.js +6 -9
- package/dist/transactions/messages/base.js.map +1 -1
- package/dist/transactions/messages/bitbadges/badges/msgCreateAddressLists.d.ts +12 -5
- package/dist/transactions/messages/bitbadges/badges/msgCreateAddressLists.d.ts.map +1 -1
- package/dist/transactions/messages/bitbadges/badges/msgCreateAddressLists.js +26 -14
- package/dist/transactions/messages/bitbadges/badges/msgCreateAddressLists.js.map +1 -1
- package/dist/transactions/messages/bitbadges/badges/msgCreateCollection.d.ts +24 -6
- package/dist/transactions/messages/bitbadges/badges/msgCreateCollection.d.ts.map +1 -1
- package/dist/transactions/messages/bitbadges/badges/msgCreateCollection.js +75 -43
- package/dist/transactions/messages/bitbadges/badges/msgCreateCollection.js.map +1 -1
- package/dist/transactions/messages/bitbadges/badges/msgDeleteCollection.d.ts +14 -6
- package/dist/transactions/messages/bitbadges/badges/msgDeleteCollection.d.ts.map +1 -1
- package/dist/transactions/messages/bitbadges/badges/msgDeleteCollection.js +32 -21
- package/dist/transactions/messages/bitbadges/badges/msgDeleteCollection.js.map +1 -1
- package/dist/transactions/messages/bitbadges/badges/msgTransferBadges.d.ts +14 -6
- package/dist/transactions/messages/bitbadges/badges/msgTransferBadges.d.ts.map +1 -1
- package/dist/transactions/messages/bitbadges/badges/msgTransferBadges.js +35 -23
- package/dist/transactions/messages/bitbadges/badges/msgTransferBadges.js.map +1 -1
- package/dist/transactions/messages/bitbadges/badges/msgUniversalUpdateCollection.d.ts +22 -6
- package/dist/transactions/messages/bitbadges/badges/msgUniversalUpdateCollection.d.ts.map +1 -1
- package/dist/transactions/messages/bitbadges/badges/msgUniversalUpdateCollection.js +118 -55
- package/dist/transactions/messages/bitbadges/badges/msgUniversalUpdateCollection.js.map +1 -1
- package/dist/transactions/messages/bitbadges/badges/msgUpdateCollection.d.ts +11 -6
- package/dist/transactions/messages/bitbadges/badges/msgUpdateCollection.d.ts.map +1 -1
- package/dist/transactions/messages/bitbadges/badges/msgUpdateCollection.js +108 -52
- package/dist/transactions/messages/bitbadges/badges/msgUpdateCollection.js.map +1 -1
- package/dist/transactions/messages/bitbadges/badges/msgUpdateUserApprovals.d.ts +23 -6
- package/dist/transactions/messages/bitbadges/badges/msgUpdateUserApprovals.d.ts.map +1 -1
- package/dist/transactions/messages/bitbadges/badges/msgUpdateUserApprovals.js +71 -31
- package/dist/transactions/messages/bitbadges/badges/msgUpdateUserApprovals.js.map +1 -1
- package/dist/transactions/messages/bitbadges/protocols/msgCreateProtocol.d.ts +15 -3
- package/dist/transactions/messages/bitbadges/protocols/msgCreateProtocol.d.ts.map +1 -1
- package/dist/transactions/messages/bitbadges/protocols/msgCreateProtocol.js +35 -6
- package/dist/transactions/messages/bitbadges/protocols/msgCreateProtocol.js.map +1 -1
- package/dist/transactions/messages/bitbadges/protocols/msgDeleteProtocol.d.ts +12 -5
- package/dist/transactions/messages/bitbadges/protocols/msgDeleteProtocol.d.ts.map +1 -1
- package/dist/transactions/messages/bitbadges/protocols/msgDeleteProtocol.js +26 -6
- package/dist/transactions/messages/bitbadges/protocols/msgDeleteProtocol.js.map +1 -1
- package/dist/transactions/messages/bitbadges/protocols/msgSetCollectionForProtocol.d.ts +14 -4
- package/dist/transactions/messages/bitbadges/protocols/msgSetCollectionForProtocol.d.ts.map +1 -1
- package/dist/transactions/messages/bitbadges/protocols/msgSetCollectionForProtocol.js +36 -6
- package/dist/transactions/messages/bitbadges/protocols/msgSetCollectionForProtocol.js.map +1 -1
- package/dist/transactions/messages/bitbadges/protocols/msgUnsetCollectionForProtocol.d.ts +12 -3
- package/dist/transactions/messages/bitbadges/protocols/msgUnsetCollectionForProtocol.d.ts.map +1 -1
- package/dist/transactions/messages/bitbadges/protocols/msgUnsetCollectionForProtocol.js +26 -6
- package/dist/transactions/messages/bitbadges/protocols/msgUnsetCollectionForProtocol.js.map +1 -1
- package/dist/transactions/messages/bitbadges/protocols/msgUpdateProtocol.d.ts +15 -3
- package/dist/transactions/messages/bitbadges/protocols/msgUpdateProtocol.d.ts.map +1 -1
- package/dist/transactions/messages/bitbadges/protocols/msgUpdateProtocol.js +35 -6
- package/dist/transactions/messages/bitbadges/protocols/msgUpdateProtocol.js.map +1 -1
- package/dist/transactions/messages/bitbadges/wasmx/msgExecuteContractCompat.d.ts +14 -3
- package/dist/transactions/messages/bitbadges/wasmx/msgExecuteContractCompat.d.ts.map +1 -1
- package/dist/transactions/messages/bitbadges/wasmx/msgExecuteContractCompat.js +32 -6
- package/dist/transactions/messages/bitbadges/wasmx/msgExecuteContractCompat.js.map +1 -1
- package/dist/transactions/messages/bitbadges/wasmx/msgInstantiateContractCompat.d.ts +14 -3
- package/dist/transactions/messages/bitbadges/wasmx/msgInstantiateContractCompat.d.ts.map +1 -1
- package/dist/transactions/messages/bitbadges/wasmx/msgInstantiateContractCompat.js +32 -11
- package/dist/transactions/messages/bitbadges/wasmx/msgInstantiateContractCompat.js.map +1 -1
- package/dist/transactions/messages/bitbadges/wasmx/msgStoreCodeCompat.d.ts +15 -2
- package/dist/transactions/messages/bitbadges/wasmx/msgStoreCodeCompat.d.ts.map +1 -1
- package/dist/transactions/messages/bitbadges/wasmx/msgStoreCodeCompat.js +26 -9
- package/dist/transactions/messages/bitbadges/wasmx/msgStoreCodeCompat.js.map +1 -1
- package/dist/transactions/messages/common.d.ts +1 -1
- package/dist/transactions/messages/common.d.ts.map +1 -1
- package/dist/transactions/messages/msgSend.d.ts +2 -2
- package/dist/transactions/messages/msgSend.d.ts.map +1 -1
- package/dist/transactions/messages/transaction.d.ts +2 -2
- package/dist/transactions/messages/transaction.d.ts.map +1 -1
- package/dist/transactions/messages/transaction.js +1 -1
- package/dist/transactions/messages/transaction.js.map +1 -1
- package/dist/transactions/messages/txRaw.d.ts +2 -2
- package/dist/transactions/messages/txRaw.d.ts.map +1 -1
- package/dist/transactions/messages/txRaw.js.map +1 -1
- package/dist/transactions/messages/web3Extension.d.ts +2 -2
- package/dist/transactions/messages/web3Extension.d.ts.map +1 -1
- package/dist/transactions/messages/web3Extension.js +4 -4
- package/dist/transactions/messages/web3Extension.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/badges/aminoRegistry.d.ts +3 -0
- package/dist/types/badges/aminoRegistry.d.ts.map +1 -0
- package/dist/types/badges/aminoRegistry.js.map +1 -0
- package/dist/{proto-types → types}/badges/string-numbers.d.ts +2 -2
- package/dist/types/badges/string-numbers.d.ts.map +1 -0
- package/dist/types/badges/string-numbers.js.map +1 -0
- package/dist/types/badges/typeutils/approvals.d.ts +320 -0
- package/dist/types/badges/typeutils/approvals.d.ts.map +1 -0
- package/dist/types/badges/typeutils/approvals.js +690 -0
- package/dist/types/badges/typeutils/approvals.js.map +1 -0
- package/dist/types/badges/typeutils/permissions.d.ts +230 -0
- package/dist/types/badges/typeutils/permissions.d.ts.map +1 -0
- package/dist/types/badges/typeutils/permissions.js +675 -0
- package/dist/types/badges/typeutils/permissions.js.map +1 -0
- package/dist/types/badges/typeutils/typeUtils.d.ts +411 -0
- package/dist/types/badges/typeutils/typeUtils.d.ts.map +1 -0
- package/dist/types/badges/typeutils/typeUtils.js +1086 -0
- package/dist/types/badges/typeutils/typeUtils.js.map +1 -0
- package/dist/{proto-types → types}/base.d.ts +1 -1
- package/dist/types/base.d.ts.map +1 -0
- package/dist/types/base.js.map +1 -0
- package/dist/types/protocols/aminoRegistry.d.ts +3 -0
- package/dist/types/protocols/aminoRegistry.d.ts.map +1 -0
- package/dist/types/protocols/aminoRegistry.js.map +1 -0
- package/dist/types/protocols/types.d.ts +24 -0
- package/dist/types/protocols/types.d.ts.map +1 -0
- package/dist/types/protocols/types.js +50 -0
- package/dist/types/protocols/types.js.map +1 -0
- package/dist/types/txRaw.d.ts.map +1 -0
- package/dist/types/txRaw.js.map +1 -0
- package/dist/{proto-types → types}/utils.d.ts +2 -1
- package/dist/types/utils.d.ts.map +1 -0
- package/dist/types/utils.js.map +1 -0
- package/dist/types/wasmx/aminoRegistry.d.ts +3 -0
- package/dist/types/wasmx/aminoRegistry.d.ts.map +1 -0
- package/dist/types/wasmx/aminoRegistry.js.map +1 -0
- package/dist/{proto-types → types}/web3Extension.d.ts +1 -1
- package/dist/types/web3Extension.d.ts.map +1 -0
- package/dist/{proto-types → types}/web3Extension.js +3 -3
- package/dist/types/web3Extension.js.map +1 -0
- package/dist/utils/addressLists.d.ts +1 -4
- package/dist/utils/addressLists.d.ts.map +1 -1
- package/dist/utils/addressLists.js +28 -44
- package/dist/utils/addressLists.js.map +1 -1
- package/dist/utils/aliases.d.ts +1 -1
- package/dist/utils/aliases.d.ts.map +1 -1
- package/dist/utils/api-sdk.d.ts +40 -45
- package/dist/utils/api-sdk.d.ts.map +1 -1
- package/dist/utils/api-sdk.js +84 -137
- package/dist/utils/api-sdk.js.map +1 -1
- package/dist/utils/api-utils.d.ts +3 -2
- package/dist/utils/api-utils.d.ts.map +1 -1
- package/dist/utils/api-utils.js +19 -37
- package/dist/utils/api-utils.js.map +1 -1
- package/dist/utils/approved_transfers_casts.d.ts.map +1 -1
- package/dist/utils/approved_transfers_casts.js +27 -24
- package/dist/utils/approved_transfers_casts.js.map +1 -1
- package/dist/utils/badgeMetadata.d.ts +4 -4
- package/dist/utils/badgeMetadata.d.ts.map +1 -1
- package/dist/utils/badgeMetadata.js +19 -17
- package/dist/utils/badgeMetadata.js.map +1 -1
- package/dist/utils/balances.d.ts +12 -16
- package/dist/utils/balances.d.ts.map +1 -1
- package/dist/utils/balances.js +119 -141
- package/dist/utils/balances.js.map +1 -1
- package/dist/utils/batch-utils.d.ts +11 -4
- package/dist/utils/batch-utils.d.ts.map +1 -1
- package/dist/utils/batch-utils.js +41 -20
- package/dist/utils/batch-utils.js.map +1 -1
- package/dist/utils/chains.d.ts +0 -2
- package/dist/utils/chains.d.ts.map +1 -1
- package/dist/utils/chains.js +12 -15
- package/dist/utils/chains.js.map +1 -1
- package/dist/utils/constants.d.ts.map +1 -1
- package/dist/utils/constants.js +5 -4
- package/dist/utils/constants.js.map +1 -1
- package/dist/utils/display.d.ts +1 -1
- package/dist/utils/display.d.ts.map +1 -1
- package/dist/utils/display.js +7 -5
- package/dist/utils/display.js.map +1 -1
- package/dist/utils/distribution.d.ts +4 -4
- package/dist/utils/distribution.d.ts.map +1 -1
- package/dist/utils/distribution.js +32 -31
- 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 +20 -19
- package/dist/utils/firstMatches.js.map +1 -1
- package/dist/utils/index.d.ts +1 -2
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -2
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/math.d.ts +8 -2
- package/dist/utils/math.d.ts.map +1 -1
- package/dist/utils/math.js +63 -15
- package/dist/utils/math.js.map +1 -1
- package/dist/utils/metadataIds.d.ts +2 -2
- package/dist/utils/metadataIds.d.ts.map +1 -1
- package/dist/utils/metadataIds.js +8 -8
- package/dist/utils/metadataIds.js.map +1 -1
- package/dist/utils/node-rest-api/balances.d.ts +1 -1
- package/dist/utils/node-rest-api/balances.d.ts.map +1 -1
- package/dist/utils/node-rest-api/gov.d.ts +1 -1
- package/dist/utils/node-rest-api/gov.d.ts.map +1 -1
- package/dist/utils/node-rest-api/staking.d.ts +1 -1
- package/dist/utils/node-rest-api/staking.d.ts.map +1 -1
- package/dist/utils/overlaps.d.ts.map +1 -1
- package/dist/utils/overlaps.js +67 -67
- package/dist/utils/overlaps.js.map +1 -1
- package/dist/utils/permission_checks.d.ts +10 -10
- package/dist/utils/permission_checks.d.ts.map +1 -1
- package/dist/utils/permission_checks.js +58 -57
- package/dist/utils/permission_checks.js.map +1 -1
- package/dist/utils/permissions.d.ts +2 -2
- package/dist/utils/permissions.d.ts.map +1 -1
- package/dist/utils/permissions.js +20 -18
- package/dist/utils/permissions.js.map +1 -1
- package/dist/utils/types/activity.d.ts +51 -74
- package/dist/utils/types/activity.d.ts.map +1 -1
- package/dist/utils/types/activity.js +118 -105
- package/dist/utils/types/activity.js.map +1 -1
- package/dist/utils/types/api.d.ts +349 -134
- package/dist/utils/types/api.d.ts.map +1 -1
- package/dist/utils/types/api.js +512 -248
- package/dist/utils/types/api.js.map +1 -1
- package/dist/utils/types/coin.d.ts +9 -3
- package/dist/utils/types/coin.d.ts.map +1 -1
- package/dist/utils/types/coin.js +17 -9
- package/dist/utils/types/coin.js.map +1 -1
- package/dist/utils/types/collections.d.ts +263 -26
- package/dist/utils/types/collections.d.ts.map +1 -1
- package/dist/utils/types/collections.js +717 -99
- package/dist/utils/types/collections.js.map +1 -1
- package/dist/utils/types/db.d.ts +434 -187
- package/dist/utils/types/db.d.ts.map +1 -1
- package/dist/utils/types/db.js +859 -502
- package/dist/utils/types/db.js.map +1 -1
- package/dist/utils/types/indexer.d.ts +2 -2
- package/dist/utils/types/indexer.d.ts.map +1 -1
- package/dist/utils/types/metadata.d.ts +77 -9
- package/dist/utils/types/metadata.d.ts.map +1 -1
- package/dist/utils/types/metadata.js +133 -18
- package/dist/utils/types/metadata.js.map +1 -1
- package/dist/utils/types/routes.d.ts +49 -47
- package/dist/utils/types/routes.d.ts.map +1 -1
- package/dist/utils/types/routes.js +50 -93
- package/dist/utils/types/routes.js.map +1 -1
- package/dist/utils/types/schemas.d.ts +120 -0
- package/dist/utils/types/schemas.d.ts.map +1 -0
- package/dist/utils/types/schemas.js +261 -0
- package/dist/utils/types/schemas.js.map +1 -0
- package/dist/utils/types/transfers.d.ts +11 -5
- package/dist/utils/types/transfers.d.ts.map +1 -1
- package/dist/utils/types/transfers.js +22 -13
- package/dist/utils/types/transfers.js.map +1 -1
- package/dist/utils/types/types.d.ts +6 -6
- package/dist/utils/types/types.d.ts.map +1 -1
- package/dist/utils/types/types.js +3 -6
- package/dist/utils/types/types.js.map +1 -1
- package/dist/utils/types/users.d.ts +125 -15
- package/dist/utils/types/users.d.ts.map +1 -1
- package/dist/utils/types/users.js +275 -57
- package/dist/utils/types/users.js.map +1 -1
- package/dist/utils/uintRanges.d.ts +10 -14
- package/dist/utils/uintRanges.d.ts.map +1 -1
- package/dist/utils/uintRanges.js +53 -65
- package/dist/utils/uintRanges.js.map +1 -1
- package/dist/utils/update_checks.d.ts +2 -2
- package/dist/utils/update_checks.d.ts.map +1 -1
- package/dist/utils/update_checks.js +247 -185
- package/dist/utils/update_checks.js.map +1 -1
- package/dist/utils/userApprovals.d.ts.map +1 -1
- package/dist/utils/userApprovals.js +19 -34
- package/dist/utils/userApprovals.js.map +1 -1
- package/dist/utils/validate_permissions_updates.d.ts +2 -2
- package/dist/utils/validate_permissions_updates.d.ts.map +1 -1
- package/dist/utils/validate_permissions_updates.js.map +1 -1
- package/package.json +8 -16
- package/dist/proto-types/badges/aminoRegistry.d.ts +0 -3
- package/dist/proto-types/badges/aminoRegistry.d.ts.map +0 -1
- package/dist/proto-types/badges/aminoRegistry.js.map +0 -1
- package/dist/proto-types/badges/string-numbers.d.ts.map +0 -1
- package/dist/proto-types/badges/string-numbers.js.map +0 -1
- package/dist/proto-types/badges/typeutils/approvals.d.ts +0 -127
- package/dist/proto-types/badges/typeutils/approvals.d.ts.map +0 -1
- package/dist/proto-types/badges/typeutils/approvals.js +0 -209
- package/dist/proto-types/badges/typeutils/approvals.js.map +0 -1
- package/dist/proto-types/badges/typeutils/permissions.d.ts +0 -88
- package/dist/proto-types/badges/typeutils/permissions.d.ts.map +0 -1
- package/dist/proto-types/badges/typeutils/permissions.js +0 -124
- package/dist/proto-types/badges/typeutils/permissions.js.map +0 -1
- package/dist/proto-types/badges/typeutils/typeUtils.d.ts +0 -119
- package/dist/proto-types/badges/typeutils/typeUtils.d.ts.map +0 -1
- package/dist/proto-types/badges/typeutils/typeUtils.js +0 -146
- package/dist/proto-types/badges/typeutils/typeUtils.js.map +0 -1
- package/dist/proto-types/base.d.ts.map +0 -1
- package/dist/proto-types/base.js.map +0 -1
- package/dist/proto-types/protocols/aminoRegistry.d.ts +0 -3
- package/dist/proto-types/protocols/aminoRegistry.d.ts.map +0 -1
- package/dist/proto-types/protocols/aminoRegistry.js.map +0 -1
- package/dist/proto-types/protocols/types.d.ts +0 -8
- package/dist/proto-types/protocols/types.d.ts.map +0 -1
- package/dist/proto-types/protocols/types.js +0 -3
- package/dist/proto-types/protocols/types.js.map +0 -1
- package/dist/proto-types/txRaw.d.ts.map +0 -1
- package/dist/proto-types/txRaw.js.map +0 -1
- package/dist/proto-types/utils.d.ts.map +0 -1
- package/dist/proto-types/utils.js.map +0 -1
- package/dist/proto-types/wasmx/aminoRegistry.d.ts +0 -3
- package/dist/proto-types/wasmx/aminoRegistry.d.ts.map +0 -1
- package/dist/proto-types/wasmx/aminoRegistry.js.map +0 -1
- package/dist/proto-types/web3Extension.d.ts.map +0 -1
- package/dist/proto-types/web3Extension.js.map +0 -1
- package/dist/utils/collections.d.ts +0 -7
- package/dist/utils/collections.d.ts.map +0 -1
- package/dist/utils/collections.js +0 -99
- package/dist/utils/collections.js.map +0 -1
- package/dist/utils/timeline_helpers.d.ts +0 -30
- package/dist/utils/timeline_helpers.d.ts.map +0 -1
- package/dist/utils/timeline_helpers.js +0 -74
- package/dist/utils/timeline_helpers.js.map +0 -1
- package/dist/utils/timelines.d.ts +0 -32
- package/dist/utils/timelines.d.ts.map +0 -1
- package/dist/utils/timelines.js +0 -106
- package/dist/utils/timelines.js.map +0 -1
- package/dist/utils/types/utils.d.ts +0 -2
- package/dist/utils/types/utils.d.ts.map +0 -1
- package/dist/utils/types/utils.js +0 -26
- package/dist/utils/types/utils.js.map +0 -1
- package/dist/utils/utils/compare.d.ts +0 -2
- package/dist/utils/utils/compare.d.ts.map +0 -1
- package/dist/utils/utils/compare.js +0 -42
- package/dist/utils/utils/compare.js.map +0 -1
- /package/dist/{proto-types → types}/badges/aminoRegistry.js +0 -0
- /package/dist/{proto-types → types}/badges/string-numbers.js +0 -0
- /package/dist/{proto-types → types}/base.js +0 -0
- /package/dist/{proto-types → types}/protocols/aminoRegistry.js +0 -0
- /package/dist/{proto-types → types}/txRaw.d.ts +0 -0
- /package/dist/{proto-types → types}/txRaw.js +0 -0
- /package/dist/{proto-types → types}/utils.js +0 -0
- /package/dist/{proto-types → types}/wasmx/aminoRegistry.js +0 -0
package/dist/utils/types/db.js
CHANGED
|
@@ -1,539 +1,896 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
7
|
-
const __1 = require("../..");
|
|
3
|
+
exports.UserProtocolCollectionsDoc = exports.ProtocolDoc = exports.FollowDetailsDoc = exports.BlockinAuthSignatureDoc = exports.ComplianceDoc = exports.IPFSTotalsDoc = exports.AirdropDoc = exports.RefreshDoc = exports.FetchDoc = exports.ApprovalInfoDetails = exports.MerkleChallengeWithDetails = exports.MerkleChallengeIdDetails = exports.MerkleChallengeDoc = exports.ChallengeTrackerIdDetails = exports.ApprovalTrackerDoc = exports.ChallengeDetails = exports.PasswordDoc = exports.BalanceDocWithDetails = exports.BalanceDoc = exports.convertClassPropertiesToJson = exports.AddressListDoc = exports.AddressListEditKey = exports.StatusDoc = exports.LatestBlockStatus = exports.QueueDoc = exports.ProfileDoc = exports.AccountDoc = exports.CollectionDoc = void 0;
|
|
8
4
|
const blockin_1 = require("blockin");
|
|
9
|
-
const
|
|
5
|
+
const __1 = require("../..");
|
|
6
|
+
const batch_utils_1 = require("../batch-utils");
|
|
10
7
|
const coin_1 = require("./coin");
|
|
11
|
-
const collections_1 = require("./collections");
|
|
12
|
-
const metadata_1 = require("./metadata");
|
|
13
|
-
;
|
|
14
8
|
const transfers_1 = require("./transfers");
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
9
|
+
class CollectionDoc extends __1.BaseNumberTypeClass {
|
|
10
|
+
_docId;
|
|
11
|
+
_id;
|
|
12
|
+
collectionId;
|
|
13
|
+
collectionMetadataTimeline;
|
|
14
|
+
badgeMetadataTimeline;
|
|
15
|
+
balancesType;
|
|
16
|
+
offChainBalancesMetadataTimeline;
|
|
17
|
+
customDataTimeline;
|
|
18
|
+
managerTimeline;
|
|
19
|
+
collectionPermissions;
|
|
20
|
+
collectionApprovals;
|
|
21
|
+
standardsTimeline;
|
|
22
|
+
isArchivedTimeline;
|
|
23
|
+
defaultBalances;
|
|
24
|
+
createdBy;
|
|
25
|
+
createdBlock;
|
|
26
|
+
createdTimestamp;
|
|
27
|
+
updateHistory;
|
|
28
|
+
aliasAddress;
|
|
29
|
+
constructor(data) {
|
|
30
|
+
super();
|
|
31
|
+
this._docId = data._docId;
|
|
32
|
+
this._id = data._id;
|
|
33
|
+
this.collectionId = data.collectionId;
|
|
34
|
+
this.collectionMetadataTimeline = data.collectionMetadataTimeline.map((collectionMetadataTimeline) => new __1.CollectionMetadataTimeline(collectionMetadataTimeline));
|
|
35
|
+
this.badgeMetadataTimeline = data.badgeMetadataTimeline.map((badgeMetadataTimeline) => new __1.BadgeMetadataTimeline(badgeMetadataTimeline));
|
|
36
|
+
this.balancesType = data.balancesType;
|
|
37
|
+
this.offChainBalancesMetadataTimeline = data.offChainBalancesMetadataTimeline.map((offChainBalancesMetadataTimeline) => new __1.OffChainBalancesMetadataTimeline(offChainBalancesMetadataTimeline));
|
|
38
|
+
this.customDataTimeline = data.customDataTimeline.map((customDataTimeline) => new __1.CustomDataTimeline(customDataTimeline));
|
|
39
|
+
this.managerTimeline = data.managerTimeline.map((managerTimeline) => new __1.ManagerTimeline(managerTimeline));
|
|
40
|
+
this.collectionPermissions = new __1.CollectionPermissions(data.collectionPermissions);
|
|
41
|
+
this.collectionApprovals = data.collectionApprovals.map((collectionApproval) => new __1.CollectionApproval(collectionApproval));
|
|
42
|
+
this.standardsTimeline = data.standardsTimeline.map((standardsTimeline) => new __1.StandardsTimeline(standardsTimeline));
|
|
43
|
+
this.isArchivedTimeline = data.isArchivedTimeline.map((isArchivedTimeline) => new __1.IsArchivedTimeline(isArchivedTimeline));
|
|
44
|
+
this.defaultBalances = new __1.UserBalanceStore(data.defaultBalances);
|
|
45
|
+
this.createdBy = data.createdBy;
|
|
46
|
+
this.createdBlock = data.createdBlock;
|
|
47
|
+
this.createdTimestamp = data.createdTimestamp;
|
|
48
|
+
this.updateHistory = data.updateHistory;
|
|
49
|
+
this.aliasAddress = data.aliasAddress;
|
|
50
|
+
}
|
|
51
|
+
convert(convertFunction) {
|
|
52
|
+
return new CollectionDoc((0, __1.deepCopy)({
|
|
53
|
+
...this,
|
|
54
|
+
collectionId: convertFunction(this.collectionId),
|
|
55
|
+
collectionMetadataTimeline: this.collectionMetadataTimeline.map((collectionMetadataTimeline) => collectionMetadataTimeline.convert(convertFunction)),
|
|
56
|
+
badgeMetadataTimeline: this.badgeMetadataTimeline.map((badgeMetadataTimeline) => badgeMetadataTimeline.convert(convertFunction)),
|
|
57
|
+
offChainBalancesMetadataTimeline: this.offChainBalancesMetadataTimeline.map((offChainBalancesMetadataTimeline) => offChainBalancesMetadataTimeline.convert(convertFunction)),
|
|
58
|
+
customDataTimeline: this.customDataTimeline.map((customDataTimeline) => customDataTimeline.convert(convertFunction)),
|
|
59
|
+
managerTimeline: this.managerTimeline.map((managerTimeline) => managerTimeline.convert(convertFunction)),
|
|
60
|
+
collectionPermissions: this.collectionPermissions.convert(convertFunction),
|
|
61
|
+
collectionApprovals: this.collectionApprovals.map((collectionApproval) => collectionApproval.convert(convertFunction)),
|
|
62
|
+
standardsTimeline: this.standardsTimeline.map((standardsTimeline) => standardsTimeline.convert(convertFunction)),
|
|
63
|
+
isArchivedTimeline: this.isArchivedTimeline.map((isArchivedTimeline) => isArchivedTimeline.convert(convertFunction)),
|
|
64
|
+
defaultBalances: this.defaultBalances.convert(convertFunction),
|
|
65
|
+
createdBlock: convertFunction(this.createdBlock),
|
|
66
|
+
createdTimestamp: convertFunction(this.createdTimestamp),
|
|
67
|
+
updateHistory: this.updateHistory.map((updateHistory) => ({
|
|
68
|
+
...updateHistory,
|
|
69
|
+
block: convertFunction(updateHistory.block),
|
|
70
|
+
blockTimestamp: convertFunction(updateHistory.blockTimestamp),
|
|
71
|
+
})),
|
|
72
|
+
}));
|
|
73
|
+
}
|
|
39
74
|
}
|
|
40
|
-
exports.
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
75
|
+
exports.CollectionDoc = CollectionDoc;
|
|
76
|
+
class AccountDoc extends __1.BaseNumberTypeClass {
|
|
77
|
+
_docId;
|
|
78
|
+
_id;
|
|
79
|
+
publicKey;
|
|
80
|
+
accountNumber;
|
|
81
|
+
pubKeyType;
|
|
82
|
+
cosmosAddress;
|
|
83
|
+
ethAddress;
|
|
84
|
+
solAddress;
|
|
85
|
+
btcAddress;
|
|
86
|
+
sequence;
|
|
87
|
+
balance;
|
|
88
|
+
constructor(data) {
|
|
89
|
+
super();
|
|
90
|
+
this._docId = data._docId;
|
|
91
|
+
this._id = data._id;
|
|
92
|
+
this.publicKey = data.publicKey;
|
|
93
|
+
this.accountNumber = data.accountNumber;
|
|
94
|
+
this.pubKeyType = data.pubKeyType;
|
|
95
|
+
this.cosmosAddress = data.cosmosAddress;
|
|
96
|
+
this.ethAddress = data.ethAddress;
|
|
97
|
+
this.solAddress = data.solAddress;
|
|
98
|
+
this.btcAddress = data.btcAddress;
|
|
99
|
+
this.sequence = data.sequence;
|
|
100
|
+
this.balance = data.balance ? new coin_1.CosmosCoin(data.balance) : undefined;
|
|
101
|
+
}
|
|
102
|
+
convert(convertFunction) {
|
|
103
|
+
return new AccountDoc((0, __1.deepCopy)({
|
|
104
|
+
...this,
|
|
105
|
+
accountNumber: convertFunction(this.accountNumber),
|
|
106
|
+
sequence: convertFunction(this.sequence),
|
|
107
|
+
balance: this.balance?.convert(convertFunction),
|
|
108
|
+
}));
|
|
109
|
+
}
|
|
48
110
|
}
|
|
49
|
-
exports.
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
111
|
+
exports.AccountDoc = AccountDoc;
|
|
112
|
+
class ProfileDoc extends __1.BaseNumberTypeClass {
|
|
113
|
+
_docId;
|
|
114
|
+
_id;
|
|
115
|
+
fetchedProfile;
|
|
116
|
+
seenActivity;
|
|
117
|
+
createdAt;
|
|
118
|
+
discord;
|
|
119
|
+
twitter;
|
|
120
|
+
github;
|
|
121
|
+
telegram;
|
|
122
|
+
readme;
|
|
123
|
+
customLinks;
|
|
124
|
+
hiddenBadges;
|
|
125
|
+
hiddenLists;
|
|
126
|
+
customPages;
|
|
127
|
+
watchlists;
|
|
128
|
+
profilePicUrl;
|
|
129
|
+
username;
|
|
130
|
+
latestSignedInChain;
|
|
131
|
+
solAddress;
|
|
132
|
+
notifications;
|
|
133
|
+
constructor(data) {
|
|
134
|
+
super();
|
|
135
|
+
this._docId = data._docId;
|
|
136
|
+
this._id = data._id;
|
|
137
|
+
this.fetchedProfile = data.fetchedProfile;
|
|
138
|
+
this.seenActivity = data.seenActivity;
|
|
139
|
+
this.createdAt = data.createdAt;
|
|
140
|
+
this.discord = data.discord;
|
|
141
|
+
this.twitter = data.twitter;
|
|
142
|
+
this.github = data.github;
|
|
143
|
+
this.telegram = data.telegram;
|
|
144
|
+
this.readme = data.readme;
|
|
145
|
+
this.customLinks = data.customLinks;
|
|
146
|
+
this.hiddenBadges = data.hiddenBadges?.map((hiddenBadge) => new batch_utils_1.BatchBadgeDetails(hiddenBadge));
|
|
147
|
+
this.hiddenLists = data.hiddenLists;
|
|
148
|
+
this.customPages = data.customPages;
|
|
149
|
+
this.watchlists = data.watchlists;
|
|
150
|
+
this.profilePicUrl = data.profilePicUrl;
|
|
151
|
+
this.username = data.username;
|
|
152
|
+
this.latestSignedInChain = data.latestSignedInChain;
|
|
153
|
+
this.solAddress = data.solAddress;
|
|
154
|
+
this.notifications = data.notifications;
|
|
155
|
+
}
|
|
156
|
+
convert(convertFunction) {
|
|
157
|
+
return new ProfileDoc((0, __1.deepCopy)({
|
|
158
|
+
...this,
|
|
159
|
+
hiddenBadges: this.hiddenBadges?.map((hiddenBadge) => hiddenBadge.convert(convertFunction)),
|
|
160
|
+
customPages: this.customPages ? {
|
|
161
|
+
badges: this.customPages?.badges.map((customPage) => ({
|
|
162
|
+
title: customPage.title,
|
|
163
|
+
description: customPage.description,
|
|
164
|
+
items: customPage.items.map((badge) => badge.convert(convertFunction)),
|
|
66
165
|
})),
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
items: customPage.items,
|
|
72
|
-
})),
|
|
73
|
-
} : undefined,
|
|
74
|
-
watchlists: item.watchlists ? {
|
|
75
|
-
badges: item.watchlists.badges.map((customPage) => ({
|
|
76
|
-
title: customPage.title,
|
|
77
|
-
description: customPage.description,
|
|
78
|
-
items: customPage.items.map((badge) => ({
|
|
79
|
-
collectionId: convertFunction(badge.collectionId),
|
|
80
|
-
badgeIds: badge.badgeIds.map((badgeId) => (0, __1.convertUintRange)(badgeId, convertFunction)),
|
|
166
|
+
lists: this.customPages?.lists.map((customPage) => ({
|
|
167
|
+
title: customPage.title,
|
|
168
|
+
description: customPage.description,
|
|
169
|
+
items: customPage.items,
|
|
81
170
|
})),
|
|
82
|
-
})),
|
|
83
|
-
lists: item.watchlists.lists.map((customPage) => ({
|
|
84
|
-
title: customPage.title,
|
|
85
|
-
description: customPage.description,
|
|
86
|
-
items: customPage.items,
|
|
87
|
-
})),
|
|
88
|
-
} : undefined,
|
|
89
|
-
notifications: item.notifications ? {
|
|
90
|
-
email: item.notifications.email,
|
|
91
|
-
emailVerification: item.notifications.emailVerification ? {
|
|
92
|
-
verified: item.notifications.emailVerification.verified,
|
|
93
|
-
token: item.notifications.emailVerification.token,
|
|
94
|
-
expiry: item.notifications.emailVerification.expiry ? convertFunction(item.notifications.emailVerification.expiry) : undefined,
|
|
95
|
-
antiPhishingCode: item.notifications.emailVerification.antiPhishingCode,
|
|
96
171
|
} : undefined,
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
172
|
+
watchlists: this.watchlists ? {
|
|
173
|
+
badges: this.watchlists.badges.map((customPage) => ({
|
|
174
|
+
title: customPage.title,
|
|
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
|
+
})),
|
|
183
|
+
} : undefined,
|
|
184
|
+
seenActivity: this.seenActivity ? convertFunction(this.seenActivity) : undefined,
|
|
185
|
+
createdAt: this.createdAt ? convertFunction(this.createdAt) : undefined,
|
|
186
|
+
notifications: this.notifications ? {
|
|
187
|
+
email: this.notifications.email,
|
|
188
|
+
emailVerification: this.notifications.emailVerification ? {
|
|
189
|
+
verified: this.notifications.emailVerification.verified,
|
|
190
|
+
token: this.notifications.emailVerification.token,
|
|
191
|
+
expiry: this.notifications.emailVerification.expiry ? convertFunction(this.notifications.emailVerification.expiry) : undefined,
|
|
192
|
+
antiPhishingCode: this.notifications.emailVerification.antiPhishingCode,
|
|
193
|
+
} : undefined,
|
|
194
|
+
preferences: this.notifications.preferences,
|
|
195
|
+
} : undefined,
|
|
196
|
+
}));
|
|
197
|
+
}
|
|
100
198
|
}
|
|
101
|
-
exports.
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
199
|
+
exports.ProfileDoc = ProfileDoc;
|
|
200
|
+
class QueueDoc extends __1.BaseNumberTypeClass {
|
|
201
|
+
_docId;
|
|
202
|
+
_id;
|
|
203
|
+
uri;
|
|
204
|
+
collectionId;
|
|
205
|
+
loadBalanceId;
|
|
206
|
+
refreshRequestTime;
|
|
207
|
+
numRetries;
|
|
208
|
+
lastFetchedAt;
|
|
209
|
+
error;
|
|
210
|
+
deletedAt;
|
|
211
|
+
nextFetchTime;
|
|
212
|
+
emailMessage;
|
|
213
|
+
recipientAddress;
|
|
214
|
+
activityDocId;
|
|
215
|
+
notificationType;
|
|
216
|
+
constructor(data) {
|
|
217
|
+
super();
|
|
218
|
+
this._docId = data._docId;
|
|
219
|
+
this._id = data._id;
|
|
220
|
+
this.uri = data.uri;
|
|
221
|
+
this.collectionId = data.collectionId;
|
|
222
|
+
this.loadBalanceId = data.loadBalanceId;
|
|
223
|
+
this.refreshRequestTime = data.refreshRequestTime;
|
|
224
|
+
this.numRetries = data.numRetries;
|
|
225
|
+
this.lastFetchedAt = data.lastFetchedAt;
|
|
226
|
+
this.error = data.error;
|
|
227
|
+
this.deletedAt = data.deletedAt;
|
|
228
|
+
this.nextFetchTime = data.nextFetchTime;
|
|
229
|
+
this.emailMessage = data.emailMessage;
|
|
230
|
+
this.recipientAddress = data.recipientAddress;
|
|
231
|
+
this.activityDocId = data.activityDocId;
|
|
232
|
+
this.notificationType = data.notificationType;
|
|
233
|
+
}
|
|
234
|
+
convert(convertFunction) {
|
|
235
|
+
return new QueueDoc((0, __1.deepCopy)({
|
|
236
|
+
...this,
|
|
237
|
+
collectionId: convertFunction(this.collectionId),
|
|
238
|
+
loadBalanceId: convertFunction(this.loadBalanceId),
|
|
239
|
+
refreshRequestTime: convertFunction(this.refreshRequestTime),
|
|
240
|
+
numRetries: convertFunction(this.numRetries),
|
|
241
|
+
lastFetchedAt: this.lastFetchedAt ? convertFunction(this.lastFetchedAt) : undefined,
|
|
242
|
+
deletedAt: this.deletedAt ? convertFunction(this.deletedAt) : undefined,
|
|
243
|
+
nextFetchTime: this.nextFetchTime ? convertFunction(this.nextFetchTime) : undefined,
|
|
244
|
+
}));
|
|
245
|
+
}
|
|
114
246
|
}
|
|
115
|
-
exports.
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
247
|
+
exports.QueueDoc = QueueDoc;
|
|
248
|
+
class LatestBlockStatus extends __1.BaseNumberTypeClass {
|
|
249
|
+
height;
|
|
250
|
+
txIndex;
|
|
251
|
+
timestamp;
|
|
252
|
+
constructor(data) {
|
|
253
|
+
super();
|
|
254
|
+
this.height = data.height;
|
|
255
|
+
this.txIndex = data.txIndex;
|
|
256
|
+
this.timestamp = data.timestamp;
|
|
257
|
+
}
|
|
258
|
+
convert(convertFunction) {
|
|
259
|
+
return new LatestBlockStatus((0, __1.deepCopy)({
|
|
260
|
+
height: convertFunction(this.height),
|
|
261
|
+
txIndex: convertFunction(this.txIndex),
|
|
262
|
+
timestamp: convertFunction(this.timestamp),
|
|
263
|
+
}));
|
|
264
|
+
}
|
|
123
265
|
}
|
|
124
|
-
exports.
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
266
|
+
exports.LatestBlockStatus = LatestBlockStatus;
|
|
267
|
+
class StatusDoc extends __1.BaseNumberTypeClass {
|
|
268
|
+
_docId;
|
|
269
|
+
_id;
|
|
270
|
+
block;
|
|
271
|
+
nextCollectionId;
|
|
272
|
+
gasPrice;
|
|
273
|
+
lastXGasAmounts;
|
|
274
|
+
lastXGasLimits;
|
|
275
|
+
constructor(data) {
|
|
276
|
+
super();
|
|
277
|
+
this._docId = data._docId;
|
|
278
|
+
this._id = data._id;
|
|
279
|
+
this.block = new LatestBlockStatus(data.block);
|
|
280
|
+
this.nextCollectionId = data.nextCollectionId;
|
|
281
|
+
this.gasPrice = data.gasPrice;
|
|
282
|
+
this.lastXGasAmounts = data.lastXGasAmounts;
|
|
283
|
+
this.lastXGasLimits = data.lastXGasLimits;
|
|
284
|
+
}
|
|
285
|
+
convert(convertFunction) {
|
|
286
|
+
return new StatusDoc((0, __1.deepCopy)({
|
|
287
|
+
...this,
|
|
288
|
+
block: this.block.convert(convertFunction),
|
|
289
|
+
nextCollectionId: convertFunction(this.nextCollectionId),
|
|
290
|
+
lastXGasLimits: this.lastXGasLimits.map((gasLimit) => convertFunction(gasLimit)),
|
|
291
|
+
lastXGasAmounts: this.lastXGasAmounts.map((gasAmount) => convertFunction(gasAmount)),
|
|
292
|
+
}));
|
|
293
|
+
}
|
|
133
294
|
}
|
|
134
|
-
exports.
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
295
|
+
exports.StatusDoc = StatusDoc;
|
|
296
|
+
class AddressListEditKey extends __1.BaseNumberTypeClass {
|
|
297
|
+
key;
|
|
298
|
+
expirationDate;
|
|
299
|
+
mustSignIn;
|
|
300
|
+
constructor(data) {
|
|
301
|
+
super();
|
|
302
|
+
this.key = data.key;
|
|
303
|
+
this.expirationDate = data.expirationDate;
|
|
304
|
+
this.mustSignIn = data.mustSignIn;
|
|
305
|
+
}
|
|
306
|
+
convert(convertFunction) {
|
|
307
|
+
return new AddressListEditKey((0, __1.deepCopy)({
|
|
308
|
+
...this,
|
|
309
|
+
expirationDate: convertFunction(this.expirationDate),
|
|
310
|
+
}));
|
|
311
|
+
}
|
|
140
312
|
}
|
|
141
|
-
exports.
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
313
|
+
exports.AddressListEditKey = AddressListEditKey;
|
|
314
|
+
class AddressListDoc extends __1.AddressList {
|
|
315
|
+
_docId;
|
|
316
|
+
_id;
|
|
317
|
+
updateHistory;
|
|
318
|
+
createdBlock;
|
|
319
|
+
lastUpdated;
|
|
320
|
+
nsfw;
|
|
321
|
+
reported;
|
|
322
|
+
private;
|
|
323
|
+
viewableWithLink;
|
|
324
|
+
editKeys;
|
|
325
|
+
constructor(data) {
|
|
326
|
+
super(data);
|
|
327
|
+
this._docId = data._docId;
|
|
328
|
+
this._id = data._id;
|
|
329
|
+
this.createdBy = data.createdBy;
|
|
330
|
+
this.updateHistory = data.updateHistory;
|
|
331
|
+
this.createdBlock = data.createdBlock;
|
|
332
|
+
this.lastUpdated = data.lastUpdated;
|
|
333
|
+
this.nsfw = data.nsfw;
|
|
334
|
+
this.reported = data.reported;
|
|
335
|
+
this.private = data.private;
|
|
336
|
+
this.viewableWithLink = data.viewableWithLink;
|
|
337
|
+
this.editKeys = data.editKeys ? data.editKeys.map((editKey) => new AddressListEditKey(editKey)) : undefined;
|
|
338
|
+
}
|
|
339
|
+
convert(convertFunction) {
|
|
340
|
+
return new AddressListDoc((0, __1.deepCopy)({
|
|
341
|
+
...this,
|
|
342
|
+
createdBlock: convertFunction(this.createdBlock),
|
|
343
|
+
lastUpdated: convertFunction(this.lastUpdated),
|
|
344
|
+
updateHistory: this.updateHistory.map((updateHistory) => ({
|
|
345
|
+
txHash: updateHistory.txHash,
|
|
346
|
+
block: convertFunction(updateHistory.block),
|
|
347
|
+
blockTimestamp: convertFunction(updateHistory.blockTimestamp),
|
|
348
|
+
})),
|
|
349
|
+
editKeys: this.editKeys ? this.editKeys.map((editKey) => editKey.convert(convertFunction)) : undefined,
|
|
350
|
+
}));
|
|
351
|
+
}
|
|
154
352
|
}
|
|
155
|
-
exports.
|
|
156
|
-
function
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
353
|
+
exports.AddressListDoc = AddressListDoc;
|
|
354
|
+
function convertClassPropertiesToJson(obj) {
|
|
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;
|
|
168
373
|
}
|
|
169
|
-
exports.
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
374
|
+
exports.convertClassPropertiesToJson = convertClassPropertiesToJson;
|
|
375
|
+
class BalanceDoc extends __1.BaseNumberTypeClass {
|
|
376
|
+
_docId;
|
|
377
|
+
_id;
|
|
378
|
+
collectionId;
|
|
379
|
+
cosmosAddress;
|
|
380
|
+
onChain;
|
|
381
|
+
uri;
|
|
382
|
+
fetchedAt;
|
|
383
|
+
fetchedAtBlock;
|
|
384
|
+
isPermanent;
|
|
385
|
+
contentHash;
|
|
386
|
+
updateHistory;
|
|
387
|
+
balances;
|
|
388
|
+
incomingApprovals;
|
|
389
|
+
outgoingApprovals;
|
|
390
|
+
userPermissions;
|
|
391
|
+
autoApproveSelfInitiatedIncomingTransfers;
|
|
392
|
+
autoApproveSelfInitiatedOutgoingTransfers;
|
|
393
|
+
constructor(data) {
|
|
394
|
+
super();
|
|
395
|
+
this._docId = data._docId;
|
|
396
|
+
this._id = data._id;
|
|
397
|
+
this.collectionId = data.collectionId;
|
|
398
|
+
this.cosmosAddress = data.cosmosAddress;
|
|
399
|
+
this.onChain = data.onChain;
|
|
400
|
+
this.uri = data.uri;
|
|
401
|
+
this.fetchedAt = data.fetchedAt;
|
|
402
|
+
this.fetchedAtBlock = data.fetchedAtBlock;
|
|
403
|
+
this.isPermanent = data.isPermanent;
|
|
404
|
+
this.contentHash = data.contentHash;
|
|
405
|
+
this.updateHistory = data.updateHistory;
|
|
406
|
+
this.balances = data.balances.map((balance) => new __1.Balance(balance));
|
|
407
|
+
this.incomingApprovals = data.incomingApprovals.map((incomingApproval) => new __1.UserIncomingApproval(incomingApproval));
|
|
408
|
+
this.outgoingApprovals = data.outgoingApprovals.map((outgoingApproval) => new __1.UserOutgoingApproval(outgoingApproval));
|
|
409
|
+
this.userPermissions = new __1.UserPermissions(data.userPermissions);
|
|
410
|
+
this.autoApproveSelfInitiatedIncomingTransfers = data.autoApproveSelfInitiatedIncomingTransfers;
|
|
411
|
+
this.autoApproveSelfInitiatedOutgoingTransfers = data.autoApproveSelfInitiatedOutgoingTransfers;
|
|
412
|
+
}
|
|
413
|
+
convert(convertFunction) {
|
|
414
|
+
return new BalanceDoc((0, __1.deepCopy)({
|
|
415
|
+
...this,
|
|
416
|
+
...new __1.UserBalanceStore(this).convert(convertFunction),
|
|
417
|
+
collectionId: convertFunction(this.collectionId),
|
|
418
|
+
fetchedAt: this.fetchedAt ? convertFunction(this.fetchedAt) : undefined,
|
|
419
|
+
fetchedAtBlock: this.fetchedAtBlock ? convertFunction(this.fetchedAtBlock) : undefined,
|
|
420
|
+
updateHistory: this.updateHistory.map((updateHistory) => ({
|
|
421
|
+
txHash: updateHistory.txHash,
|
|
422
|
+
block: convertFunction(updateHistory.block),
|
|
423
|
+
blockTimestamp: convertFunction(updateHistory.blockTimestamp),
|
|
424
|
+
})),
|
|
425
|
+
}));
|
|
426
|
+
}
|
|
185
427
|
}
|
|
186
|
-
exports.
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
428
|
+
exports.BalanceDoc = BalanceDoc;
|
|
429
|
+
class BalanceDocWithDetails extends __1.BaseNumberTypeClass {
|
|
430
|
+
outgoingApprovals;
|
|
431
|
+
incomingApprovals;
|
|
432
|
+
userPermissions;
|
|
433
|
+
_docId;
|
|
434
|
+
_id;
|
|
435
|
+
collectionId;
|
|
436
|
+
cosmosAddress;
|
|
437
|
+
onChain;
|
|
438
|
+
uri;
|
|
439
|
+
fetchedAt;
|
|
440
|
+
fetchedAtBlock;
|
|
441
|
+
isPermanent;
|
|
442
|
+
contentHash;
|
|
443
|
+
updateHistory;
|
|
444
|
+
balances;
|
|
445
|
+
autoApproveSelfInitiatedIncomingTransfers;
|
|
446
|
+
autoApproveSelfInitiatedOutgoingTransfers;
|
|
447
|
+
constructor(data) {
|
|
448
|
+
super();
|
|
449
|
+
this._docId = data._docId;
|
|
450
|
+
this._id = data._id;
|
|
451
|
+
this.outgoingApprovals = data.outgoingApprovals;
|
|
452
|
+
this.incomingApprovals = data.incomingApprovals;
|
|
453
|
+
this.userPermissions = data.userPermissions;
|
|
454
|
+
this.collectionId = data.collectionId;
|
|
455
|
+
this.cosmosAddress = data.cosmosAddress;
|
|
456
|
+
this.onChain = data.onChain;
|
|
457
|
+
this.uri = data.uri;
|
|
458
|
+
this.fetchedAt = data.fetchedAt;
|
|
459
|
+
this.fetchedAtBlock = data.fetchedAtBlock;
|
|
460
|
+
this.isPermanent = data.isPermanent;
|
|
461
|
+
this.contentHash = data.contentHash;
|
|
462
|
+
this.updateHistory = data.updateHistory;
|
|
463
|
+
this.balances = data.balances.map((balance) => new __1.Balance(balance));
|
|
464
|
+
this.autoApproveSelfInitiatedIncomingTransfers = data.autoApproveSelfInitiatedIncomingTransfers;
|
|
465
|
+
this.autoApproveSelfInitiatedOutgoingTransfers = data.autoApproveSelfInitiatedOutgoingTransfers;
|
|
466
|
+
}
|
|
467
|
+
convert(convertFunction) {
|
|
468
|
+
return new BalanceDocWithDetails((0, __1.deepCopy)({
|
|
469
|
+
...this,
|
|
470
|
+
collectionId: convertFunction(this.collectionId),
|
|
471
|
+
fetchedAt: this.fetchedAt ? convertFunction(this.fetchedAt) : undefined,
|
|
472
|
+
fetchedAtBlock: this.fetchedAtBlock ? convertFunction(this.fetchedAtBlock) : undefined,
|
|
473
|
+
updateHistory: this.updateHistory.map((updateHistory) => ({
|
|
474
|
+
txHash: updateHistory.txHash,
|
|
475
|
+
block: convertFunction(updateHistory.block),
|
|
476
|
+
blockTimestamp: convertFunction(updateHistory.blockTimestamp),
|
|
477
|
+
})),
|
|
478
|
+
outgoingApprovals: this.outgoingApprovals.map((outgoingApproval) => outgoingApproval.convert(convertFunction)),
|
|
479
|
+
incomingApprovals: this.incomingApprovals.map((incomingApproval) => incomingApproval.convert(convertFunction)),
|
|
480
|
+
userPermissions: this.userPermissions.convert(convertFunction),
|
|
481
|
+
balances: this.balances.map((balance) => balance.convert(convertFunction)),
|
|
482
|
+
}));
|
|
483
|
+
}
|
|
194
484
|
}
|
|
195
|
-
exports.
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
485
|
+
exports.BalanceDocWithDetails = BalanceDocWithDetails;
|
|
486
|
+
class PasswordDoc extends __1.BaseNumberTypeClass {
|
|
487
|
+
_docId;
|
|
488
|
+
_id;
|
|
489
|
+
cid;
|
|
490
|
+
createdBy;
|
|
491
|
+
docClaimedByCollection;
|
|
492
|
+
collectionId;
|
|
493
|
+
claimedUsers;
|
|
494
|
+
challengeDetails;
|
|
495
|
+
constructor(data) {
|
|
496
|
+
super();
|
|
497
|
+
this._docId = data._docId;
|
|
498
|
+
this._id = data._id;
|
|
499
|
+
this.cid = data.cid;
|
|
500
|
+
this.createdBy = data.createdBy;
|
|
501
|
+
this.docClaimedByCollection = data.docClaimedByCollection;
|
|
502
|
+
this.collectionId = data.collectionId;
|
|
503
|
+
this.claimedUsers = data.claimedUsers;
|
|
504
|
+
this.challengeDetails = data.challengeDetails ? new ChallengeDetails(data.challengeDetails) : undefined;
|
|
505
|
+
}
|
|
506
|
+
convert(convertFunction) {
|
|
507
|
+
return new PasswordDoc((0, __1.deepCopy)({
|
|
508
|
+
...this,
|
|
509
|
+
collectionId: convertFunction(this.collectionId),
|
|
510
|
+
challengeDetails: this.challengeDetails ? this.challengeDetails.convert(convertFunction) : undefined,
|
|
511
|
+
claimedUsers: Object.fromEntries(Object.entries(this.claimedUsers).map(([key, value]) => [key, convertFunction(value)])),
|
|
512
|
+
}));
|
|
513
|
+
}
|
|
203
514
|
}
|
|
204
|
-
exports.
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
515
|
+
exports.PasswordDoc = PasswordDoc;
|
|
516
|
+
class ChallengeDetails extends __1.BaseNumberTypeClass {
|
|
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
|
+
}
|
|
211
541
|
}
|
|
212
|
-
exports.
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
542
|
+
exports.ChallengeDetails = ChallengeDetails;
|
|
543
|
+
class ApprovalTrackerDoc extends __1.AmountTrackerIdDetails {
|
|
544
|
+
_docId;
|
|
545
|
+
_id;
|
|
546
|
+
numTransfers;
|
|
547
|
+
amounts;
|
|
548
|
+
constructor(data) {
|
|
549
|
+
super(data);
|
|
550
|
+
this.numTransfers = data.numTransfers;
|
|
551
|
+
this.amounts = data.amounts.map((amount) => new __1.Balance(amount));
|
|
552
|
+
this._docId = data._docId;
|
|
553
|
+
this._id = data._id;
|
|
554
|
+
}
|
|
555
|
+
convert(convertFunction) {
|
|
556
|
+
return new ApprovalTrackerDoc((0, __1.deepCopy)({
|
|
557
|
+
...this,
|
|
558
|
+
...super.convert(convertFunction),
|
|
559
|
+
numTransfers: convertFunction(this.numTransfers),
|
|
560
|
+
amounts: this.amounts.map((amount) => amount.convert(convertFunction)),
|
|
561
|
+
}));
|
|
562
|
+
}
|
|
220
563
|
}
|
|
221
|
-
exports.
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
564
|
+
exports.ApprovalTrackerDoc = ApprovalTrackerDoc;
|
|
565
|
+
class ChallengeTrackerIdDetails extends __1.BaseNumberTypeClass {
|
|
566
|
+
collectionId;
|
|
567
|
+
challengeId;
|
|
568
|
+
challengeLevel;
|
|
569
|
+
approverAddress;
|
|
570
|
+
constructor(data) {
|
|
571
|
+
super();
|
|
572
|
+
this.collectionId = data.collectionId;
|
|
573
|
+
this.challengeId = data.challengeId;
|
|
574
|
+
this.challengeLevel = data.challengeLevel;
|
|
575
|
+
this.approverAddress = data.approverAddress;
|
|
576
|
+
}
|
|
577
|
+
convert(convertFunction) {
|
|
578
|
+
return new ChallengeTrackerIdDetails((0, __1.deepCopy)({
|
|
579
|
+
...this,
|
|
580
|
+
collectionId: convertFunction(this.collectionId),
|
|
581
|
+
}));
|
|
582
|
+
}
|
|
227
583
|
}
|
|
228
|
-
exports.
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
584
|
+
exports.ChallengeTrackerIdDetails = ChallengeTrackerIdDetails;
|
|
585
|
+
class MerkleChallengeDoc extends __1.BaseNumberTypeClass {
|
|
586
|
+
_docId;
|
|
587
|
+
_id;
|
|
588
|
+
collectionId;
|
|
589
|
+
challengeId;
|
|
590
|
+
challengeLevel;
|
|
591
|
+
approverAddress;
|
|
592
|
+
usedLeafIndices;
|
|
593
|
+
constructor(data) {
|
|
594
|
+
super();
|
|
595
|
+
this._docId = data._docId;
|
|
596
|
+
this._id = data._id;
|
|
597
|
+
this.collectionId = data.collectionId;
|
|
598
|
+
this.challengeId = data.challengeId;
|
|
599
|
+
this.challengeLevel = data.challengeLevel;
|
|
600
|
+
this.approverAddress = data.approverAddress;
|
|
601
|
+
this.usedLeafIndices = data.usedLeafIndices;
|
|
602
|
+
}
|
|
603
|
+
convert(convertFunction) {
|
|
604
|
+
return new MerkleChallengeDoc((0, __1.deepCopy)({
|
|
605
|
+
...this,
|
|
606
|
+
collectionId: convertFunction(this.collectionId),
|
|
607
|
+
usedLeafIndices: this.usedLeafIndices.map(convertFunction),
|
|
608
|
+
}));
|
|
609
|
+
}
|
|
235
610
|
}
|
|
236
|
-
exports.
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
611
|
+
exports.MerkleChallengeDoc = MerkleChallengeDoc;
|
|
612
|
+
class MerkleChallengeIdDetails extends __1.BaseNumberTypeClass {
|
|
613
|
+
collectionId;
|
|
614
|
+
challengeId;
|
|
615
|
+
challengeLevel;
|
|
616
|
+
approverAddress;
|
|
617
|
+
usedLeafIndices;
|
|
618
|
+
constructor(data) {
|
|
619
|
+
super();
|
|
620
|
+
this.collectionId = data.collectionId;
|
|
621
|
+
this.challengeId = data.challengeId;
|
|
622
|
+
this.challengeLevel = data.challengeLevel;
|
|
623
|
+
this.approverAddress = data.approverAddress;
|
|
624
|
+
this.usedLeafIndices = data.usedLeafIndices;
|
|
625
|
+
}
|
|
626
|
+
convert(convertFunction) {
|
|
627
|
+
return new MerkleChallengeIdDetails((0, __1.deepCopy)({
|
|
628
|
+
...this,
|
|
629
|
+
collectionId: convertFunction(this.collectionId),
|
|
630
|
+
usedLeafIndices: this.usedLeafIndices.map(convertFunction),
|
|
631
|
+
}));
|
|
632
|
+
}
|
|
242
633
|
}
|
|
243
|
-
exports.
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
634
|
+
exports.MerkleChallengeIdDetails = MerkleChallengeIdDetails;
|
|
635
|
+
class MerkleChallengeWithDetails extends __1.MerkleChallenge {
|
|
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
|
+
}
|
|
251
649
|
}
|
|
252
|
-
exports.
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
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
|
+
}
|
|
258
671
|
}
|
|
259
|
-
exports.
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
672
|
+
exports.ApprovalInfoDetails = ApprovalInfoDetails;
|
|
673
|
+
class FetchDoc extends __1.BaseNumberTypeClass {
|
|
674
|
+
_docId;
|
|
675
|
+
_id;
|
|
676
|
+
content;
|
|
677
|
+
fetchedAt;
|
|
678
|
+
fetchedAtBlock;
|
|
679
|
+
db;
|
|
680
|
+
isPermanent;
|
|
681
|
+
constructor(data) {
|
|
682
|
+
super();
|
|
683
|
+
this.content = data.content;
|
|
684
|
+
this.fetchedAt = data.fetchedAt;
|
|
685
|
+
this.fetchedAtBlock = data.fetchedAtBlock;
|
|
686
|
+
this.db = data.db;
|
|
687
|
+
this.isPermanent = data.isPermanent;
|
|
688
|
+
this._docId = data._docId;
|
|
689
|
+
this._id = data._id;
|
|
690
|
+
}
|
|
691
|
+
convert(convertFunction) {
|
|
692
|
+
return new FetchDoc((0, __1.deepCopy)({
|
|
693
|
+
...this,
|
|
694
|
+
content: this.content ? this.db === 'Metadata' ?
|
|
695
|
+
this.content.convert(convertFunction) : this.db === 'ApprovalInfo' ?
|
|
696
|
+
this.content.convert(convertFunction) : (0, transfers_1.convertOffChainBalancesMap)(this.content, convertFunction) : undefined,
|
|
697
|
+
fetchedAt: convertFunction(this.fetchedAt),
|
|
698
|
+
fetchedAtBlock: convertFunction(this.fetchedAtBlock),
|
|
699
|
+
}));
|
|
700
|
+
}
|
|
267
701
|
}
|
|
268
|
-
exports.
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
702
|
+
exports.FetchDoc = FetchDoc;
|
|
703
|
+
class RefreshDoc extends __1.BaseNumberTypeClass {
|
|
704
|
+
_docId;
|
|
705
|
+
_id;
|
|
706
|
+
collectionId;
|
|
707
|
+
refreshRequestTime;
|
|
708
|
+
constructor(data) {
|
|
709
|
+
super();
|
|
710
|
+
this._docId = data._docId;
|
|
711
|
+
this._id = data._id;
|
|
712
|
+
this.collectionId = data.collectionId;
|
|
713
|
+
this.refreshRequestTime = data.refreshRequestTime;
|
|
714
|
+
}
|
|
715
|
+
convert(convertFunction) {
|
|
716
|
+
return new RefreshDoc((0, __1.deepCopy)({
|
|
717
|
+
...this,
|
|
718
|
+
collectionId: convertFunction(this.collectionId),
|
|
719
|
+
refreshRequestTime: convertFunction(this.refreshRequestTime),
|
|
720
|
+
}));
|
|
721
|
+
}
|
|
275
722
|
}
|
|
276
|
-
exports.
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
723
|
+
exports.RefreshDoc = RefreshDoc;
|
|
724
|
+
class AirdropDoc extends __1.BaseNumberTypeClass {
|
|
725
|
+
_docId;
|
|
726
|
+
_id;
|
|
727
|
+
airdropped;
|
|
728
|
+
timestamp;
|
|
729
|
+
hash;
|
|
730
|
+
constructor(data) {
|
|
731
|
+
super();
|
|
732
|
+
this._docId = data._docId;
|
|
733
|
+
this._id = data._id;
|
|
734
|
+
this.airdropped = data.airdropped;
|
|
735
|
+
this.timestamp = data.timestamp;
|
|
736
|
+
this.hash = data.hash;
|
|
737
|
+
}
|
|
738
|
+
convert(convertFunction) {
|
|
739
|
+
return new AirdropDoc((0, __1.deepCopy)({
|
|
740
|
+
...this,
|
|
741
|
+
timestamp: convertFunction(this.timestamp),
|
|
742
|
+
}));
|
|
743
|
+
}
|
|
282
744
|
}
|
|
283
|
-
exports.
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
745
|
+
exports.AirdropDoc = AirdropDoc;
|
|
746
|
+
class IPFSTotalsDoc extends __1.BaseNumberTypeClass {
|
|
747
|
+
_docId;
|
|
748
|
+
_id;
|
|
749
|
+
bytesUploaded;
|
|
750
|
+
constructor(data) {
|
|
751
|
+
super();
|
|
752
|
+
this.bytesUploaded = data.bytesUploaded;
|
|
753
|
+
this._docId = data._docId;
|
|
754
|
+
this._id = data._id;
|
|
755
|
+
}
|
|
756
|
+
convert(convertFunction) {
|
|
757
|
+
return new IPFSTotalsDoc((0, __1.deepCopy)({
|
|
758
|
+
...this,
|
|
759
|
+
bytesUploaded: convertFunction(this.bytesUploaded),
|
|
760
|
+
}));
|
|
761
|
+
}
|
|
289
762
|
}
|
|
290
|
-
exports.
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
763
|
+
exports.IPFSTotalsDoc = IPFSTotalsDoc;
|
|
764
|
+
class ComplianceDoc extends __1.BaseNumberTypeClass {
|
|
765
|
+
_docId;
|
|
766
|
+
_id;
|
|
767
|
+
badges;
|
|
768
|
+
addressLists;
|
|
769
|
+
accounts;
|
|
770
|
+
constructor(data) {
|
|
771
|
+
super();
|
|
772
|
+
this.badges = data.badges;
|
|
773
|
+
this.addressLists = data.addressLists;
|
|
774
|
+
this.accounts = data.accounts;
|
|
775
|
+
this._docId = data._docId;
|
|
776
|
+
this._id = data._id;
|
|
777
|
+
}
|
|
778
|
+
convert(convertFunction) {
|
|
779
|
+
return new ComplianceDoc((0, __1.deepCopy)({
|
|
780
|
+
...this,
|
|
781
|
+
badges: {
|
|
782
|
+
nsfw: this.badges.nsfw.map(x => { return { ...x, collectionId: convertFunction(x.collectionId), badgeIds: x.badgeIds.map(y => y.convert(convertFunction)) }; }),
|
|
783
|
+
reported: this.badges.reported.map(x => { return { ...x, collectionId: convertFunction(x.collectionId), badgeIds: x.badgeIds.map(y => y.convert(convertFunction)) }; }),
|
|
784
|
+
},
|
|
785
|
+
}));
|
|
786
|
+
}
|
|
299
787
|
}
|
|
300
|
-
exports.
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
788
|
+
exports.ComplianceDoc = ComplianceDoc;
|
|
789
|
+
class BlockinAuthSignatureDoc extends __1.BaseNumberTypeClass {
|
|
790
|
+
_docId;
|
|
791
|
+
_id;
|
|
792
|
+
signature;
|
|
793
|
+
name;
|
|
794
|
+
description;
|
|
795
|
+
image;
|
|
796
|
+
cosmosAddress;
|
|
797
|
+
params;
|
|
798
|
+
createdAt;
|
|
799
|
+
deletedAt;
|
|
800
|
+
constructor(data) {
|
|
801
|
+
super();
|
|
802
|
+
this.signature = data.signature;
|
|
803
|
+
this.name = data.name;
|
|
804
|
+
this.description = data.description;
|
|
805
|
+
this.image = data.image;
|
|
806
|
+
this.cosmosAddress = data.cosmosAddress;
|
|
807
|
+
this.params = data.params;
|
|
808
|
+
this.createdAt = data.createdAt;
|
|
809
|
+
this.deletedAt = data.deletedAt;
|
|
810
|
+
this._docId = data._docId;
|
|
811
|
+
this._id = data._id;
|
|
812
|
+
}
|
|
813
|
+
convert(convertFunction) {
|
|
814
|
+
return new BlockinAuthSignatureDoc((0, __1.deepCopy)({
|
|
815
|
+
...this,
|
|
816
|
+
createdAt: convertFunction(this.createdAt),
|
|
817
|
+
params: (0, blockin_1.convertChallengeParams)(this.params, convertFunction),
|
|
818
|
+
deletedAt: this.deletedAt ? convertFunction(this.deletedAt) : undefined,
|
|
819
|
+
}));
|
|
820
|
+
}
|
|
308
821
|
}
|
|
309
|
-
exports.
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
822
|
+
exports.BlockinAuthSignatureDoc = BlockinAuthSignatureDoc;
|
|
823
|
+
class FollowDetailsDoc extends __1.BaseNumberTypeClass {
|
|
824
|
+
_docId;
|
|
825
|
+
_id;
|
|
826
|
+
cosmosAddress;
|
|
827
|
+
followingCount;
|
|
828
|
+
followersCount;
|
|
829
|
+
followers;
|
|
830
|
+
following;
|
|
831
|
+
followingCollectionId;
|
|
832
|
+
constructor(data) {
|
|
833
|
+
super();
|
|
834
|
+
this.cosmosAddress = data.cosmosAddress;
|
|
835
|
+
this.followingCount = data.followingCount;
|
|
836
|
+
this.followersCount = data.followersCount;
|
|
837
|
+
this.followers = data.followers;
|
|
838
|
+
this.following = data.following;
|
|
839
|
+
this.followingCollectionId = data.followingCollectionId;
|
|
840
|
+
this._docId = data._docId;
|
|
841
|
+
this._id = data._id;
|
|
842
|
+
}
|
|
843
|
+
convert(convertFunction) {
|
|
844
|
+
return new FollowDetailsDoc((0, __1.deepCopy)({
|
|
845
|
+
...this,
|
|
846
|
+
followingCount: convertFunction(this.followingCount),
|
|
847
|
+
followersCount: convertFunction(this.followersCount),
|
|
848
|
+
followingCollectionId: convertFunction(this.followingCollectionId),
|
|
849
|
+
}));
|
|
850
|
+
}
|
|
317
851
|
}
|
|
318
|
-
exports.
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
852
|
+
exports.FollowDetailsDoc = FollowDetailsDoc;
|
|
853
|
+
class ProtocolDoc extends __1.BaseNumberTypeClass {
|
|
854
|
+
_docId;
|
|
855
|
+
_id;
|
|
856
|
+
name;
|
|
857
|
+
uri;
|
|
858
|
+
customData;
|
|
859
|
+
createdBy;
|
|
860
|
+
isFrozen;
|
|
861
|
+
constructor(data) {
|
|
862
|
+
super();
|
|
863
|
+
this._docId = data._docId;
|
|
864
|
+
this._id = data._id;
|
|
865
|
+
this.name = data.name;
|
|
866
|
+
this.uri = data.uri;
|
|
867
|
+
this.customData = data.customData;
|
|
868
|
+
this.createdBy = data.createdBy;
|
|
869
|
+
this.isFrozen = data.isFrozen;
|
|
870
|
+
}
|
|
871
|
+
convert(convertFunction) {
|
|
872
|
+
return new ProtocolDoc((0, __1.deepCopy)({
|
|
873
|
+
...this,
|
|
874
|
+
}));
|
|
875
|
+
}
|
|
323
876
|
}
|
|
324
|
-
exports.
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
877
|
+
exports.ProtocolDoc = ProtocolDoc;
|
|
878
|
+
class UserProtocolCollectionsDoc extends __1.BaseNumberTypeClass {
|
|
879
|
+
_docId;
|
|
880
|
+
_id;
|
|
881
|
+
protocols;
|
|
882
|
+
constructor(data) {
|
|
883
|
+
super();
|
|
884
|
+
this._docId = data._docId;
|
|
885
|
+
this._id = data._id;
|
|
886
|
+
this.protocols = data.protocols;
|
|
887
|
+
}
|
|
888
|
+
convert(convertFunction) {
|
|
889
|
+
return new UserProtocolCollectionsDoc((0, __1.deepCopy)({
|
|
890
|
+
...this,
|
|
891
|
+
protocols: Object.fromEntries(Object.entries(this.protocols).map(([key, value]) => [key, convertFunction(value)])),
|
|
892
|
+
}));
|
|
893
|
+
}
|
|
330
894
|
}
|
|
331
|
-
exports.
|
|
332
|
-
const { Schema } = mongoose_1.default;
|
|
333
|
-
exports.ProtocolSchema = new Schema({
|
|
334
|
-
_docId: String,
|
|
335
|
-
name: String,
|
|
336
|
-
uri: String,
|
|
337
|
-
customData: String,
|
|
338
|
-
createdBy: String,
|
|
339
|
-
isFrozen: Boolean
|
|
340
|
-
});
|
|
341
|
-
exports.UserProtocolCollectionsSchema = new Schema({
|
|
342
|
-
_docId: String,
|
|
343
|
-
protocols: Schema.Types.Mixed,
|
|
344
|
-
});
|
|
345
|
-
exports.CollectionSchema = new Schema({
|
|
346
|
-
_docId: String,
|
|
347
|
-
collectionId: Schema.Types.Mixed,
|
|
348
|
-
collectionMetadataTimeline: [Schema.Types.Mixed],
|
|
349
|
-
badgeMetadataTimeline: [Schema.Types.Mixed],
|
|
350
|
-
balancesType: String,
|
|
351
|
-
offChainBalancesMetadataTimeline: [Schema.Types.Mixed],
|
|
352
|
-
customDataTimeline: [Schema.Types.Mixed],
|
|
353
|
-
managerTimeline: [Schema.Types.Mixed],
|
|
354
|
-
collectionPermissions: Schema.Types.Mixed,
|
|
355
|
-
collectionApprovals: [Schema.Types.Mixed],
|
|
356
|
-
standardsTimeline: [Schema.Types.Mixed],
|
|
357
|
-
isArchivedTimeline: [Schema.Types.Mixed],
|
|
358
|
-
defaultBalances: Schema.Types.Mixed,
|
|
359
|
-
createdBy: String,
|
|
360
|
-
createdBlock: Schema.Types.Mixed,
|
|
361
|
-
createdTimestamp: Schema.Types.Mixed,
|
|
362
|
-
updateHistory: [Schema.Types.Mixed],
|
|
363
|
-
aliasAddress: String,
|
|
364
|
-
});
|
|
365
|
-
exports.AccountSchema = new Schema({
|
|
366
|
-
_docId: String,
|
|
367
|
-
publicKey: String,
|
|
368
|
-
pubKeyType: String,
|
|
369
|
-
cosmosAddress: String,
|
|
370
|
-
ethAddress: String,
|
|
371
|
-
solAddress: String,
|
|
372
|
-
btcAddress: String,
|
|
373
|
-
accountNumber: Schema.Types.Mixed,
|
|
374
|
-
sequence: Schema.Types.Mixed,
|
|
375
|
-
balance: Schema.Types.Mixed,
|
|
376
|
-
});
|
|
377
|
-
exports.ProfileSchema = new Schema({
|
|
378
|
-
_docId: String,
|
|
379
|
-
fetchedProfile: Boolean,
|
|
380
|
-
seenActivity: Schema.Types.Mixed,
|
|
381
|
-
createdAt: Schema.Types.Mixed,
|
|
382
|
-
discord: String,
|
|
383
|
-
twitter: String,
|
|
384
|
-
github: String,
|
|
385
|
-
telegram: String,
|
|
386
|
-
readme: String,
|
|
387
|
-
customLinks: [Schema.Types.Mixed],
|
|
388
|
-
hiddenBadges: [
|
|
389
|
-
{
|
|
390
|
-
collectionId: Schema.Types.Mixed,
|
|
391
|
-
badgeIds: [{}],
|
|
392
|
-
},
|
|
393
|
-
],
|
|
394
|
-
hiddenLists: [String],
|
|
395
|
-
customPages: Schema.Types.Mixed,
|
|
396
|
-
watchlists: Schema.Types.Mixed,
|
|
397
|
-
profilePicUrl: String,
|
|
398
|
-
username: String,
|
|
399
|
-
latestSignedInChain: String,
|
|
400
|
-
solAddress: String,
|
|
401
|
-
notifications: Schema.Types.Mixed,
|
|
402
|
-
});
|
|
403
|
-
exports.QueueSchema = new Schema({
|
|
404
|
-
_docId: String,
|
|
405
|
-
uri: String,
|
|
406
|
-
collectionId: Schema.Types.Mixed,
|
|
407
|
-
loadBalanceId: Schema.Types.Mixed,
|
|
408
|
-
refreshRequestTime: Schema.Types.Mixed,
|
|
409
|
-
numRetries: Schema.Types.Mixed,
|
|
410
|
-
lastFetchedAt: Schema.Types.Mixed,
|
|
411
|
-
error: String,
|
|
412
|
-
deletedAt: Schema.Types.Mixed,
|
|
413
|
-
nextFetchTime: Schema.Types.Mixed,
|
|
414
|
-
emailMessage: String,
|
|
415
|
-
recipientAddress: String,
|
|
416
|
-
activityDocId: String,
|
|
417
|
-
notificationType: String,
|
|
418
|
-
});
|
|
419
|
-
exports.StatusSchema = new Schema({
|
|
420
|
-
_docId: String,
|
|
421
|
-
block: Schema.Types.Mixed,
|
|
422
|
-
nextCollectionId: Schema.Types.Mixed,
|
|
423
|
-
gasPrice: Number,
|
|
424
|
-
lastXGasLimits: [Schema.Types.Mixed],
|
|
425
|
-
lastXGasAmounts: [Schema.Types.Mixed],
|
|
426
|
-
});
|
|
427
|
-
exports.AddressListSchema = new Schema({
|
|
428
|
-
_docId: String,
|
|
429
|
-
listId: String,
|
|
430
|
-
addresses: [String],
|
|
431
|
-
whitelist: Boolean,
|
|
432
|
-
uri: String,
|
|
433
|
-
customData: String,
|
|
434
|
-
createdBy: String,
|
|
435
|
-
aliasAddress: String,
|
|
436
|
-
updateHistory: [Schema.Types.Mixed],
|
|
437
|
-
createdBlock: Schema.Types.Mixed,
|
|
438
|
-
lastUpdated: Schema.Types.Mixed,
|
|
439
|
-
private: Boolean,
|
|
440
|
-
editKeys: [Schema.Types.Mixed],
|
|
441
|
-
nsfw: { reason: String },
|
|
442
|
-
reported: { reason: String },
|
|
443
|
-
});
|
|
444
|
-
exports.BalanceSchema = new Schema({
|
|
445
|
-
_docId: String,
|
|
446
|
-
collectionId: Schema.Types.Mixed,
|
|
447
|
-
cosmosAddress: String,
|
|
448
|
-
balances: [Schema.Types.Mixed],
|
|
449
|
-
incomingApprovals: [Schema.Types.Mixed],
|
|
450
|
-
outgoingApprovals: [Schema.Types.Mixed],
|
|
451
|
-
autoApproveSelfInitiatedIncomingTransfers: Boolean,
|
|
452
|
-
autoApproveSelfInitiatedOutgoingTransfers: Boolean,
|
|
453
|
-
userPermissions: Schema.Types.Mixed,
|
|
454
|
-
onChain: Boolean,
|
|
455
|
-
uri: String,
|
|
456
|
-
fetchedAt: Schema.Types.Mixed,
|
|
457
|
-
fetchedAtBlock: Schema.Types.Mixed,
|
|
458
|
-
contentHash: String,
|
|
459
|
-
isPermanent: Boolean,
|
|
460
|
-
updateHistory: [Schema.Types.Mixed],
|
|
461
|
-
});
|
|
462
|
-
exports.PasswordSchema = new Schema({
|
|
463
|
-
_docId: String,
|
|
464
|
-
cid: String,
|
|
465
|
-
createdBy: String,
|
|
466
|
-
docClaimedByCollection: Boolean,
|
|
467
|
-
collectionId: Schema.Types.Mixed,
|
|
468
|
-
claimedUsers: Schema.Types.Mixed,
|
|
469
|
-
challengeDetails: Schema.Types.Mixed,
|
|
470
|
-
});
|
|
471
|
-
exports.ChallengeSchema = new Schema({
|
|
472
|
-
_docId: String,
|
|
473
|
-
collectionId: Schema.Types.Mixed,
|
|
474
|
-
challengeId: String,
|
|
475
|
-
challengeLevel: String,
|
|
476
|
-
approverAddress: String,
|
|
477
|
-
usedLeafIndices: [Schema.Types.Mixed],
|
|
478
|
-
});
|
|
479
|
-
exports.ApprovalTrackerSchema = new Schema({
|
|
480
|
-
_docId: String,
|
|
481
|
-
collectionId: Schema.Types.Mixed,
|
|
482
|
-
numTransfers: Schema.Types.Mixed,
|
|
483
|
-
amounts: [Schema.Types.Mixed],
|
|
484
|
-
approvalLevel: String,
|
|
485
|
-
approverAddress: String,
|
|
486
|
-
amountTrackerId: String,
|
|
487
|
-
trackerType: String,
|
|
488
|
-
approvedAddress: String,
|
|
489
|
-
});
|
|
490
|
-
exports.FetchSchema = new Schema({
|
|
491
|
-
_docId: String,
|
|
492
|
-
content: Schema.Types.Mixed,
|
|
493
|
-
fetchedAt: Schema.Types.Mixed,
|
|
494
|
-
fetchedAtBlock: Schema.Types.Mixed,
|
|
495
|
-
db: String,
|
|
496
|
-
isPermanent: Boolean,
|
|
497
|
-
});
|
|
498
|
-
exports.RefreshSchema = new Schema({
|
|
499
|
-
_docId: String,
|
|
500
|
-
collectionId: Schema.Types.Mixed,
|
|
501
|
-
refreshRequestTime: Schema.Types.Mixed,
|
|
502
|
-
});
|
|
503
|
-
exports.AirdropSchema = new Schema({
|
|
504
|
-
_docId: String,
|
|
505
|
-
airdropped: Boolean,
|
|
506
|
-
timestamp: Schema.Types.Mixed,
|
|
507
|
-
hash: String,
|
|
508
|
-
});
|
|
509
|
-
exports.IPFSTotalsSchema = new Schema({
|
|
510
|
-
_docId: String,
|
|
511
|
-
bytesUploaded: Schema.Types.Mixed,
|
|
512
|
-
});
|
|
513
|
-
exports.ComplianceSchema = new Schema({
|
|
514
|
-
_docId: String,
|
|
515
|
-
badges: Schema.Types.Mixed,
|
|
516
|
-
addressLists: Schema.Types.Mixed,
|
|
517
|
-
accounts: Schema.Types.Mixed,
|
|
518
|
-
});
|
|
519
|
-
exports.BlockinAuthSignatureSchema = new Schema({
|
|
520
|
-
_docId: String,
|
|
521
|
-
signature: String,
|
|
522
|
-
name: String,
|
|
523
|
-
description: String,
|
|
524
|
-
image: String,
|
|
525
|
-
cosmosAddress: String,
|
|
526
|
-
params: Schema.Types.Mixed,
|
|
527
|
-
createdAt: Schema.Types.Mixed,
|
|
528
|
-
deletedAt: Schema.Types.Mixed,
|
|
529
|
-
});
|
|
530
|
-
exports.FollowDetailsSchema = new Schema({
|
|
531
|
-
_docId: String,
|
|
532
|
-
cosmosAddress: String,
|
|
533
|
-
followingCount: Schema.Types.Mixed,
|
|
534
|
-
followersCount: Schema.Types.Mixed,
|
|
535
|
-
followingCollectionId: Schema.Types.Mixed,
|
|
536
|
-
followers: Schema.Types.Mixed,
|
|
537
|
-
following: Schema.Types.Mixed,
|
|
538
|
-
});
|
|
895
|
+
exports.UserProtocolCollectionsDoc = UserProtocolCollectionsDoc;
|
|
539
896
|
//# sourceMappingURL=db.js.map
|