bitbadgesjs-sdk 0.27.2 → 0.28.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/README.md +0 -5
- package/dist/cjs/address-converter/converter.d.ts +0 -6
- package/dist/cjs/address-converter/converter.d.ts.map +1 -1
- package/dist/cjs/address-converter/converter.js +32 -214
- package/dist/cjs/address-converter/converter.js.map +1 -1
- package/dist/cjs/api-indexer/BitBadgesApi.js +24 -20
- package/dist/cjs/api-indexer/BitBadgesApi.js.map +1 -1
- package/dist/cjs/api-indexer/BitBadgesCollection.d.ts.map +1 -1
- package/dist/cjs/api-indexer/BitBadgesCollection.js.map +1 -1
- package/dist/cjs/api-indexer/BitBadgesUserInfo.d.ts +0 -5
- package/dist/cjs/api-indexer/BitBadgesUserInfo.d.ts.map +1 -1
- package/dist/cjs/api-indexer/BitBadgesUserInfo.js +0 -12
- package/dist/cjs/api-indexer/BitBadgesUserInfo.js.map +1 -1
- package/dist/cjs/api-indexer/docs-types/activity.d.ts.map +1 -1
- package/dist/cjs/api-indexer/docs-types/activity.js.map +1 -1
- package/dist/cjs/api-indexer/docs-types/docs.d.ts +0 -5
- package/dist/cjs/api-indexer/docs-types/docs.d.ts.map +1 -1
- package/dist/cjs/api-indexer/docs-types/docs.js +0 -5
- package/dist/cjs/api-indexer/docs-types/docs.js.map +1 -1
- package/dist/cjs/api-indexer/docs-types/interfaces.d.ts +1 -10
- package/dist/cjs/api-indexer/docs-types/interfaces.d.ts.map +1 -1
- package/dist/cjs/api-indexer/docs-types/interfaces.js.map +1 -1
- package/dist/cjs/api-indexer/requests/blockin.d.ts +1 -1
- package/dist/cjs/api-indexer/requests/blockin.d.ts.map +1 -1
- package/dist/cjs/api-indexer/requests/blockin.js.map +1 -1
- package/dist/cjs/api-indexer/requests/requests.d.ts +1 -1
- package/dist/cjs/api-indexer/requests/requests.d.ts.map +1 -1
- package/dist/cjs/blockin/index.d.ts +52 -0
- package/dist/cjs/blockin/index.d.ts.map +1 -0
- package/dist/cjs/{transactions/eip712/payload/types.js → blockin/index.js} +1 -1
- package/dist/cjs/blockin/index.js.map +1 -0
- package/dist/cjs/common/types.d.ts +1 -5
- package/dist/cjs/common/types.d.ts.map +1 -1
- package/dist/cjs/common/types.js +0 -4
- package/dist/cjs/common/types.js.map +1 -1
- package/dist/cjs/core/addressLists.spec.d.ts.map +1 -1
- package/dist/cjs/core/addressLists.spec.js +7 -4
- package/dist/cjs/core/addressLists.spec.js.map +1 -1
- package/dist/cjs/core/approvals.d.ts +3 -0
- package/dist/cjs/core/approvals.d.ts.map +1 -1
- package/dist/cjs/core/approvals.js +8 -2
- package/dist/cjs/core/approvals.js.map +1 -1
- package/dist/cjs/core/batch-utils.d.ts +2 -2
- package/dist/cjs/core/batch-utils.d.ts.map +1 -1
- package/dist/cjs/core/batch-utils.js +2 -2
- package/dist/cjs/core/batch-utils.js.map +1 -1
- package/dist/cjs/core/blockin.d.ts +1 -1
- package/dist/cjs/core/blockin.d.ts.map +1 -1
- package/dist/cjs/core/cosmos-wrappers.d.ts.map +1 -1
- package/dist/cjs/core/cosmos-wrappers.js +6 -0
- package/dist/cjs/core/cosmos-wrappers.js.map +1 -1
- package/dist/cjs/gamm/indexer.d.ts +20 -1
- package/dist/cjs/gamm/indexer.d.ts.map +1 -1
- package/dist/cjs/gamm/indexer.js.map +1 -1
- package/dist/cjs/interfaces/types/approvals.d.ts +3 -0
- package/dist/cjs/interfaces/types/approvals.d.ts.map +1 -1
- package/dist/cjs/proto/badges/approval_conditions_pb.d.ts +1 -0
- package/dist/cjs/proto/badges/approval_conditions_pb.d.ts.map +1 -1
- package/dist/cjs/proto/badges/approval_conditions_pb.js +2 -0
- package/dist/cjs/proto/badges/approval_conditions_pb.js.map +1 -1
- package/dist/cjs/proto/badges/approval_criteria_pb.d.ts +2 -0
- package/dist/cjs/proto/badges/approval_criteria_pb.d.ts.map +1 -1
- package/dist/cjs/proto/badges/approval_criteria_pb.js +4 -0
- package/dist/cjs/proto/badges/approval_criteria_pb.js.map +1 -1
- package/dist/cjs/proto/google/protobuf/descriptor_pb.js +2 -2
- package/dist/cjs/proto/google/protobuf/descriptor_pb.js.map +1 -1
- package/dist/cjs/proto/index.d.ts +0 -3
- package/dist/cjs/proto/index.d.ts.map +1 -1
- package/dist/cjs/proto/index.js +1 -4
- package/dist/cjs/proto/index.js.map +1 -1
- package/dist/cjs/transactions/messages/base.d.ts +6 -12
- package/dist/cjs/transactions/messages/base.d.ts.map +1 -1
- package/dist/cjs/transactions/messages/base.js +6 -347
- package/dist/cjs/transactions/messages/base.js.map +1 -1
- package/dist/cjs/transactions/messages/common.d.ts +0 -12
- package/dist/cjs/transactions/messages/common.d.ts.map +1 -1
- package/dist/cjs/transactions/messages/transaction.d.ts +3 -3
- package/dist/cjs/transactions/messages/transaction.d.ts.map +1 -1
- package/dist/cjs/transactions/messages/transaction.js +13 -34
- package/dist/cjs/transactions/messages/transaction.js.map +1 -1
- package/dist/cjs/transactions/messages/txRaw.d.ts +1 -7
- package/dist/cjs/transactions/messages/txRaw.d.ts.map +1 -1
- package/dist/cjs/transactions/messages/txRaw.js +3 -10
- package/dist/cjs/transactions/messages/txRaw.js.map +1 -1
- package/dist/cjs/tsconfig.build.tsbuildinfo +1 -1
- package/dist/esm/address-converter/converter.d.ts +0 -6
- package/dist/esm/address-converter/converter.d.ts.map +1 -1
- package/dist/esm/address-converter/converter.js +32 -205
- package/dist/esm/address-converter/converter.js.map +1 -1
- package/dist/esm/api-indexer/BitBadgesApi.js +24 -20
- package/dist/esm/api-indexer/BitBadgesApi.js.map +1 -1
- package/dist/esm/api-indexer/BitBadgesCollection.d.ts.map +1 -1
- package/dist/esm/api-indexer/BitBadgesCollection.js.map +1 -1
- package/dist/esm/api-indexer/BitBadgesUserInfo.d.ts +0 -5
- package/dist/esm/api-indexer/BitBadgesUserInfo.d.ts.map +1 -1
- package/dist/esm/api-indexer/BitBadgesUserInfo.js +0 -16
- package/dist/esm/api-indexer/BitBadgesUserInfo.js.map +1 -1
- package/dist/esm/api-indexer/docs-types/activity.d.ts.map +1 -1
- package/dist/esm/api-indexer/docs-types/activity.js.map +1 -1
- package/dist/esm/api-indexer/docs-types/docs.d.ts +0 -5
- package/dist/esm/api-indexer/docs-types/docs.d.ts.map +1 -1
- package/dist/esm/api-indexer/docs-types/docs.js +0 -10
- package/dist/esm/api-indexer/docs-types/docs.js.map +1 -1
- package/dist/esm/api-indexer/docs-types/interfaces.d.ts +1 -10
- package/dist/esm/api-indexer/docs-types/interfaces.d.ts.map +1 -1
- package/dist/esm/api-indexer/docs-types/interfaces.js.map +1 -1
- package/dist/esm/api-indexer/requests/blockin.d.ts +1 -1
- package/dist/esm/api-indexer/requests/blockin.d.ts.map +1 -1
- package/dist/esm/api-indexer/requests/blockin.js.map +1 -1
- package/dist/esm/api-indexer/requests/requests.d.ts +1 -1
- package/dist/esm/api-indexer/requests/requests.d.ts.map +1 -1
- package/dist/esm/blockin/index.d.ts +52 -0
- package/dist/esm/blockin/index.d.ts.map +1 -0
- package/dist/esm/blockin/index.js +2 -0
- package/dist/esm/blockin/index.js.map +1 -0
- package/dist/esm/common/types.d.ts +1 -5
- package/dist/esm/common/types.d.ts.map +1 -1
- package/dist/esm/common/types.js +0 -4
- package/dist/esm/common/types.js.map +1 -1
- package/dist/esm/core/addressLists.spec.d.ts.map +1 -1
- package/dist/esm/core/addressLists.spec.js +7 -4
- package/dist/esm/core/addressLists.spec.js.map +1 -1
- package/dist/esm/core/approvals.d.ts +3 -0
- package/dist/esm/core/approvals.d.ts.map +1 -1
- package/dist/esm/core/approvals.js +11 -2
- package/dist/esm/core/approvals.js.map +1 -1
- package/dist/esm/core/batch-utils.d.ts +2 -2
- package/dist/esm/core/batch-utils.d.ts.map +1 -1
- package/dist/esm/core/batch-utils.js +2 -2
- package/dist/esm/core/batch-utils.js.map +1 -1
- package/dist/esm/core/blockin.d.ts +1 -1
- package/dist/esm/core/blockin.d.ts.map +1 -1
- package/dist/esm/core/cosmos-wrappers.d.ts.map +1 -1
- package/dist/esm/core/cosmos-wrappers.js +6 -0
- package/dist/esm/core/cosmos-wrappers.js.map +1 -1
- package/dist/esm/gamm/indexer.d.ts +20 -1
- package/dist/esm/gamm/indexer.d.ts.map +1 -1
- package/dist/esm/gamm/indexer.js.map +1 -1
- package/dist/esm/interfaces/types/approvals.d.ts +3 -0
- package/dist/esm/interfaces/types/approvals.d.ts.map +1 -1
- package/dist/esm/proto/badges/approval_conditions_pb.d.ts +1 -0
- package/dist/esm/proto/badges/approval_conditions_pb.d.ts.map +1 -1
- package/dist/esm/proto/badges/approval_conditions_pb.js +2 -0
- package/dist/esm/proto/badges/approval_conditions_pb.js.map +1 -1
- package/dist/esm/proto/badges/approval_criteria_pb.d.ts +2 -0
- package/dist/esm/proto/badges/approval_criteria_pb.d.ts.map +1 -1
- package/dist/esm/proto/badges/approval_criteria_pb.js +4 -0
- package/dist/esm/proto/badges/approval_criteria_pb.js.map +1 -1
- package/dist/esm/proto/google/protobuf/descriptor_pb.js +2 -2
- package/dist/esm/proto/google/protobuf/descriptor_pb.js.map +1 -1
- package/dist/esm/proto/index.d.ts +0 -3
- package/dist/esm/proto/index.d.ts.map +1 -1
- package/dist/esm/proto/index.js +0 -3
- package/dist/esm/proto/index.js.map +1 -1
- package/dist/esm/transactions/messages/base.d.ts +6 -12
- package/dist/esm/transactions/messages/base.d.ts.map +1 -1
- package/dist/esm/transactions/messages/base.js +7 -344
- package/dist/esm/transactions/messages/base.js.map +1 -1
- package/dist/esm/transactions/messages/common.d.ts +0 -12
- package/dist/esm/transactions/messages/common.d.ts.map +1 -1
- package/dist/esm/transactions/messages/transaction.d.ts +3 -3
- package/dist/esm/transactions/messages/transaction.d.ts.map +1 -1
- package/dist/esm/transactions/messages/transaction.js +12 -33
- package/dist/esm/transactions/messages/transaction.js.map +1 -1
- package/dist/esm/transactions/messages/txRaw.d.ts +1 -7
- package/dist/esm/transactions/messages/txRaw.d.ts.map +1 -1
- package/dist/esm/transactions/messages/txRaw.js +1 -7
- package/dist/esm/transactions/messages/txRaw.js.map +1 -1
- package/dist/esm/tsconfig-esm.build.tsbuildinfo +1 -1
- package/package.json +3 -12
- package/dist/cjs/proto/bitcoin/index.d.ts +0 -2
- package/dist/cjs/proto/bitcoin/index.d.ts.map +0 -1
- package/dist/cjs/proto/bitcoin/index.js +0 -18
- package/dist/cjs/proto/bitcoin/index.js.map +0 -1
- package/dist/cjs/proto/ethereum/ethsecp256k1/index.d.ts +0 -2
- package/dist/cjs/proto/ethereum/ethsecp256k1/index.d.ts.map +0 -1
- package/dist/cjs/proto/ethereum/ethsecp256k1/index.js +0 -18
- package/dist/cjs/proto/ethereum/ethsecp256k1/index.js.map +0 -1
- package/dist/cjs/proto/ethereum/index.d.ts +0 -3
- package/dist/cjs/proto/ethereum/index.d.ts.map +0 -1
- package/dist/cjs/proto/ethereum/index.js +0 -19
- package/dist/cjs/proto/ethereum/index.js.map +0 -1
- package/dist/cjs/proto/solana/index.d.ts +0 -2
- package/dist/cjs/proto/solana/index.d.ts.map +0 -1
- package/dist/cjs/proto/solana/index.js +0 -18
- package/dist/cjs/proto/solana/index.js.map +0 -1
- package/dist/cjs/transactions/eip712/payload/createDomain.d.ts +0 -13
- package/dist/cjs/transactions/eip712/payload/createDomain.d.ts.map +0 -1
- package/dist/cjs/transactions/eip712/payload/createDomain.js +0 -16
- package/dist/cjs/transactions/eip712/payload/createDomain.js.map +0 -1
- package/dist/cjs/transactions/eip712/payload/createTypedData.d.ts +0 -15
- package/dist/cjs/transactions/eip712/payload/createTypedData.d.ts.map +0 -1
- package/dist/cjs/transactions/eip712/payload/createTypedData.js +0 -24
- package/dist/cjs/transactions/eip712/payload/createTypedData.js.map +0 -1
- package/dist/cjs/transactions/eip712/payload/createTypes/index.d.ts +0 -2
- package/dist/cjs/transactions/eip712/payload/createTypes/index.d.ts.map +0 -1
- package/dist/cjs/transactions/eip712/payload/createTypes/index.js +0 -9
- package/dist/cjs/transactions/eip712/payload/createTypes/index.js.map +0 -1
- package/dist/cjs/transactions/eip712/payload/createTypes/parseMessage.d.ts +0 -5
- package/dist/cjs/transactions/eip712/payload/createTypes/parseMessage.d.ts.map +0 -1
- package/dist/cjs/transactions/eip712/payload/createTypes/parseMessage.js +0 -152
- package/dist/cjs/transactions/eip712/payload/createTypes/parseMessage.js.map +0 -1
- package/dist/cjs/transactions/eip712/payload/createTypes/parsePayload.d.ts +0 -22
- package/dist/cjs/transactions/eip712/payload/createTypes/parsePayload.d.ts.map +0 -1
- package/dist/cjs/transactions/eip712/payload/createTypes/parsePayload.js +0 -62
- package/dist/cjs/transactions/eip712/payload/createTypes/parsePayload.js.map +0 -1
- package/dist/cjs/transactions/eip712/payload/eip712Types.d.ts +0 -8
- package/dist/cjs/transactions/eip712/payload/eip712Types.d.ts.map +0 -1
- package/dist/cjs/transactions/eip712/payload/eip712Types.js +0 -28
- package/dist/cjs/transactions/eip712/payload/eip712Types.js.map +0 -1
- package/dist/cjs/transactions/eip712/payload/flattenPayload.d.ts +0 -5
- package/dist/cjs/transactions/eip712/payload/flattenPayload.d.ts.map +0 -1
- package/dist/cjs/transactions/eip712/payload/flattenPayload.js +0 -36
- package/dist/cjs/transactions/eip712/payload/flattenPayload.js.map +0 -1
- package/dist/cjs/transactions/eip712/payload/samples/getSampleMsg.d.ts +0 -61
- package/dist/cjs/transactions/eip712/payload/samples/getSampleMsg.d.ts.map +0 -1
- package/dist/cjs/transactions/eip712/payload/samples/getSampleMsg.js +0 -1844
- package/dist/cjs/transactions/eip712/payload/samples/getSampleMsg.js.map +0 -1
- package/dist/cjs/transactions/eip712/payload/types.d.ts +0 -8
- package/dist/cjs/transactions/eip712/payload/types.d.ts.map +0 -1
- package/dist/cjs/transactions/eip712/payload/types.js.map +0 -1
- package/dist/cjs/transactions/messages/web3Extension.d.ts +0 -29
- package/dist/cjs/transactions/messages/web3Extension.d.ts.map +0 -1
- package/dist/cjs/transactions/messages/web3Extension.js +0 -105
- package/dist/cjs/transactions/messages/web3Extension.js.map +0 -1
- package/dist/esm/proto/bitcoin/index.d.ts +0 -2
- package/dist/esm/proto/bitcoin/index.d.ts.map +0 -1
- package/dist/esm/proto/bitcoin/index.js +0 -2
- package/dist/esm/proto/bitcoin/index.js.map +0 -1
- package/dist/esm/proto/ethereum/ethsecp256k1/index.d.ts +0 -2
- package/dist/esm/proto/ethereum/ethsecp256k1/index.d.ts.map +0 -1
- package/dist/esm/proto/ethereum/ethsecp256k1/index.js +0 -2
- package/dist/esm/proto/ethereum/ethsecp256k1/index.js.map +0 -1
- package/dist/esm/proto/ethereum/index.d.ts +0 -3
- package/dist/esm/proto/ethereum/index.d.ts.map +0 -1
- package/dist/esm/proto/ethereum/index.js +0 -3
- package/dist/esm/proto/ethereum/index.js.map +0 -1
- package/dist/esm/proto/solana/index.d.ts +0 -2
- package/dist/esm/proto/solana/index.d.ts.map +0 -1
- package/dist/esm/proto/solana/index.js +0 -2
- package/dist/esm/proto/solana/index.js.map +0 -1
- package/dist/esm/transactions/eip712/payload/createDomain.d.ts +0 -13
- package/dist/esm/transactions/eip712/payload/createDomain.d.ts.map +0 -1
- package/dist/esm/transactions/eip712/payload/createDomain.js +0 -13
- package/dist/esm/transactions/eip712/payload/createDomain.js.map +0 -1
- package/dist/esm/transactions/eip712/payload/createTypedData.d.ts +0 -15
- package/dist/esm/transactions/eip712/payload/createTypedData.d.ts.map +0 -1
- package/dist/esm/transactions/eip712/payload/createTypedData.js +0 -17
- package/dist/esm/transactions/eip712/payload/createTypedData.js.map +0 -1
- package/dist/esm/transactions/eip712/payload/createTypes/index.d.ts +0 -2
- package/dist/esm/transactions/eip712/payload/createTypes/index.d.ts.map +0 -1
- package/dist/esm/transactions/eip712/payload/createTypes/index.js +0 -2
- package/dist/esm/transactions/eip712/payload/createTypes/index.js.map +0 -1
- package/dist/esm/transactions/eip712/payload/createTypes/parseMessage.d.ts +0 -5
- package/dist/esm/transactions/eip712/payload/createTypes/parseMessage.d.ts.map +0 -1
- package/dist/esm/transactions/eip712/payload/createTypes/parseMessage.js +0 -149
- package/dist/esm/transactions/eip712/payload/createTypes/parseMessage.js.map +0 -1
- package/dist/esm/transactions/eip712/payload/createTypes/parsePayload.d.ts +0 -22
- package/dist/esm/transactions/eip712/payload/createTypes/parsePayload.d.ts.map +0 -1
- package/dist/esm/transactions/eip712/payload/createTypes/parsePayload.js +0 -55
- package/dist/esm/transactions/eip712/payload/createTypes/parsePayload.js.map +0 -1
- package/dist/esm/transactions/eip712/payload/eip712Types.d.ts +0 -8
- package/dist/esm/transactions/eip712/payload/eip712Types.d.ts.map +0 -1
- package/dist/esm/transactions/eip712/payload/eip712Types.js +0 -22
- package/dist/esm/transactions/eip712/payload/eip712Types.js.map +0 -1
- package/dist/esm/transactions/eip712/payload/flattenPayload.d.ts +0 -5
- package/dist/esm/transactions/eip712/payload/flattenPayload.d.ts.map +0 -1
- package/dist/esm/transactions/eip712/payload/flattenPayload.js +0 -32
- package/dist/esm/transactions/eip712/payload/flattenPayload.js.map +0 -1
- package/dist/esm/transactions/eip712/payload/samples/getSampleMsg.d.ts +0 -61
- package/dist/esm/transactions/eip712/payload/samples/getSampleMsg.d.ts.map +0 -1
- package/dist/esm/transactions/eip712/payload/samples/getSampleMsg.js +0 -1788
- package/dist/esm/transactions/eip712/payload/samples/getSampleMsg.js.map +0 -1
- package/dist/esm/transactions/eip712/payload/types.d.ts +0 -8
- package/dist/esm/transactions/eip712/payload/types.d.ts.map +0 -1
- package/dist/esm/transactions/eip712/payload/types.js +0 -2
- package/dist/esm/transactions/eip712/payload/types.js.map +0 -1
- package/dist/esm/transactions/messages/web3Extension.d.ts +0 -29
- package/dist/esm/transactions/messages/web3Extension.d.ts.map +0 -1
- package/dist/esm/transactions/messages/web3Extension.js +0 -64
- package/dist/esm/transactions/messages/web3Extension.js.map +0 -1
package/README.md
CHANGED
|
@@ -44,11 +44,6 @@ npm install bitbadgesjs-sdk
|
|
|
44
44
|
|
|
45
45
|
This library provides miscellaneous functionality to help you interact with BitBadges, such as types, API routes, managing metadata requests, logic with ID ranges and balances, etc.
|
|
46
46
|
|
|
47
|
-
```typescript
|
|
48
|
-
const bitbadgesAddress = convertToBitBadgesAddress(address);
|
|
49
|
-
const ethAddress = bitbadgesToEth(bitbadgesAddress);
|
|
50
|
-
```
|
|
51
|
-
|
|
52
47
|
It also exports functions for broadcasting transactions and interacting with the blockchain. See [Broadcasting Txs](../create-and-broadcast-txs/) for how to use.
|
|
53
48
|
|
|
54
49
|
```typescript
|
|
@@ -2,12 +2,6 @@ import { SupportedChain } from '../common/types.js';
|
|
|
2
2
|
export declare function convertToBitBadgesAddress(address: string): string;
|
|
3
3
|
export declare function getConvertFunctionFromPrefix(prefix: string, withAliasSupport?: boolean): (address: string) => string;
|
|
4
4
|
export declare function mustConvertToBitBadgesAddress(address: string): string;
|
|
5
|
-
export declare function mustConvertToEthAddress(address: string): string;
|
|
6
|
-
export declare function mustConvertToBtcAddress(address: string): string;
|
|
7
|
-
export declare function convertToEthAddress(address: string): string;
|
|
8
|
-
export declare function convertToBtcAddress(address: string): string;
|
|
9
|
-
export declare function convertToThorchainAddress(address: string): string;
|
|
10
|
-
export declare function mustConvertToThorchainAddress(address: string): string;
|
|
11
5
|
export declare function getChainForAddress(address: string): SupportedChain;
|
|
12
6
|
export declare function getAbbreviatedAddress(address: string): string;
|
|
13
7
|
export declare function isAddressValid(address: string, chain?: SupportedChain): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"converter.d.ts","sourceRoot":"","sources":["../../../src/address-converter/converter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"converter.d.ts","sourceRoot":"","sources":["../../../src/address-converter/converter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAoCnD,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,MAAM,UAgBxD;AAKD,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,MAAM,EAAE,gBAAgB,UAAO,IAC1E,SAAS,MAAM,YAWxB;AAOD,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,MAAM,UAK5D;AAQD,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,kBAMjD;AAOD,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,UAOpD;AAcD,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,cAAc,WAwBrE"}
|
|
@@ -1,152 +1,59 @@
|
|
|
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
3
|
exports.convertToBitBadgesAddress = convertToBitBadgesAddress;
|
|
7
4
|
exports.getConvertFunctionFromPrefix = getConvertFunctionFromPrefix;
|
|
8
5
|
exports.mustConvertToBitBadgesAddress = mustConvertToBitBadgesAddress;
|
|
9
|
-
exports.mustConvertToEthAddress = mustConvertToEthAddress;
|
|
10
|
-
exports.mustConvertToBtcAddress = mustConvertToBtcAddress;
|
|
11
|
-
exports.convertToEthAddress = convertToEthAddress;
|
|
12
|
-
exports.convertToBtcAddress = convertToBtcAddress;
|
|
13
|
-
exports.convertToThorchainAddress = convertToThorchainAddress;
|
|
14
|
-
exports.mustConvertToThorchainAddress = mustConvertToThorchainAddress;
|
|
15
6
|
exports.getChainForAddress = getChainForAddress;
|
|
16
7
|
exports.getAbbreviatedAddress = getAbbreviatedAddress;
|
|
17
8
|
exports.isAddressValid = isAddressValid;
|
|
18
9
|
const types_js_1 = require("../common/types.js");
|
|
19
|
-
const sha256_1 = require("@noble/hashes/sha256");
|
|
20
10
|
const bech32_1 = require("bech32");
|
|
21
|
-
|
|
22
|
-
const crypto_addr_codec_1 = require("crypto-addr-codec");
|
|
23
|
-
const web3_validator_1 = require("web3-validator");
|
|
24
|
-
const sha256 = (data) => {
|
|
25
|
-
const hash = sha256_1.sha256.create();
|
|
26
|
-
hash.update(data);
|
|
27
|
-
return hash.digest();
|
|
28
|
-
};
|
|
29
|
-
const BITCOIN_WITNESS_VERSION_SEPARATOR_BYTE = 0;
|
|
30
|
-
function makeChecksummedHexDecoder(chainId) {
|
|
11
|
+
function makeBech32Decoder(currentPrefix) {
|
|
31
12
|
return (data) => {
|
|
32
|
-
const
|
|
33
|
-
if (
|
|
34
|
-
throw Error('
|
|
13
|
+
const { prefix, words } = bech32_1.bech32.decode(data);
|
|
14
|
+
if (prefix !== currentPrefix) {
|
|
15
|
+
throw Error('Unrecognised address format');
|
|
35
16
|
}
|
|
36
|
-
return Buffer.from(
|
|
17
|
+
return Buffer.from(bech32_1.bech32.fromWords(words));
|
|
37
18
|
};
|
|
38
19
|
}
|
|
39
|
-
function makeChecksummedHexEncoder(chainId) {
|
|
40
|
-
return (data) => (0, crypto_addr_codec_1.toChecksumAddress)(data.toString('hex'), chainId || null);
|
|
41
|
-
}
|
|
42
|
-
const hexChecksumChain = (name, chainId) => ({
|
|
43
|
-
decoder: makeChecksummedHexDecoder(chainId),
|
|
44
|
-
encoder: makeChecksummedHexEncoder(chainId),
|
|
45
|
-
name
|
|
46
|
-
});
|
|
47
|
-
const ETH = hexChecksumChain('ETH');
|
|
48
20
|
function makeBech32Encoder(prefix) {
|
|
49
21
|
return (data) => {
|
|
50
22
|
const words = bech32_1.bech32.toWords(data);
|
|
51
|
-
const
|
|
52
|
-
const encodedAddress = bech32_1.bech32.encode(prefix, wordsToEncode);
|
|
23
|
+
const encodedAddress = bech32_1.bech32.encode(prefix, words);
|
|
53
24
|
return encodedAddress;
|
|
54
25
|
};
|
|
55
26
|
}
|
|
56
|
-
function makeBech32Decoder(currentPrefix) {
|
|
57
|
-
return (data) => {
|
|
58
|
-
const { prefix, words } = bech32_1.bech32.decode(data);
|
|
59
|
-
if (prefix !== currentPrefix) {
|
|
60
|
-
throw Error('Unrecognised address format');
|
|
61
|
-
}
|
|
62
|
-
if (prefix == 'bc') {
|
|
63
|
-
words.shift();
|
|
64
|
-
}
|
|
65
|
-
return Buffer.from(bech32_1.bech32.fromWords(words));
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
27
|
const bech32Chain = (name, prefix) => ({
|
|
69
28
|
decoder: makeBech32Decoder(prefix),
|
|
70
29
|
encoder: makeBech32Encoder(prefix),
|
|
71
30
|
name
|
|
72
31
|
});
|
|
73
|
-
const THORCHAIN = bech32Chain('THORCHAIN', 'tthor');
|
|
74
32
|
const BITBADGES = bech32Chain('BITBADGES', 'bb');
|
|
75
|
-
const ethToBitBadges = (ethAddress) => {
|
|
76
|
-
const data = ETH.decoder(ethAddress);
|
|
77
|
-
return BITBADGES.encoder(data);
|
|
78
|
-
};
|
|
79
|
-
const bitbadgesToEth = (bitbadgesAddress) => {
|
|
80
|
-
const data = BITBADGES.decoder(bitbadgesAddress);
|
|
81
|
-
return ETH.encoder(data);
|
|
82
|
-
};
|
|
83
|
-
const bitbadgesToThorchain = (bitbadgesAddress) => {
|
|
84
|
-
const data = BITBADGES.decoder(bitbadgesAddress);
|
|
85
|
-
return THORCHAIN.encoder(data);
|
|
86
|
-
};
|
|
87
|
-
const thorchainToBitBadges = (thorchainAddress) => {
|
|
88
|
-
const data = THORCHAIN.decoder(thorchainAddress);
|
|
89
|
-
return BITBADGES.encoder(data);
|
|
90
|
-
};
|
|
91
|
-
const BTC = bech32Chain('BTC', 'bc');
|
|
92
|
-
const btcToBitBadges = (btcAddress) => {
|
|
93
|
-
const data = BTC.decoder(btcAddress);
|
|
94
|
-
return BITBADGES.encoder(data);
|
|
95
|
-
};
|
|
96
|
-
const bitbadgesToBtc = (bitbadgesAddress) => {
|
|
97
|
-
const data = BITBADGES.decoder(bitbadgesAddress);
|
|
98
|
-
return BTC.encoder(data);
|
|
99
|
-
};
|
|
100
|
-
const solanaToBitBadges = (solanaAddress) => {
|
|
101
|
-
const solanaPublicKeyBuffer = bs58_1.default.decode(solanaAddress);
|
|
102
|
-
const hash = sha256(solanaPublicKeyBuffer);
|
|
103
|
-
const truncatedHash = hash.slice(0, 20);
|
|
104
|
-
const bech32Address = bech32_1.bech32.encode('bb', bech32_1.bech32.toWords(truncatedHash));
|
|
105
|
-
return bech32Address;
|
|
106
|
-
};
|
|
107
33
|
function convertToBitBadgesAddress(address) {
|
|
108
|
-
let bech32Address = '';
|
|
109
34
|
if (address.startsWith('bbvaloper')) {
|
|
110
35
|
return address;
|
|
111
36
|
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
catch {
|
|
117
|
-
if ((0, web3_validator_1.isAddress)(address, true)) {
|
|
118
|
-
bech32Address = ethToBitBadges(address);
|
|
119
|
-
}
|
|
120
|
-
else if (address.startsWith('bc')) {
|
|
121
|
-
bech32Address = btcToBitBadges(address);
|
|
122
|
-
}
|
|
123
|
-
else if (address.startsWith('tthor')) {
|
|
124
|
-
bech32Address = thorchainToBitBadges(address);
|
|
37
|
+
if (address.startsWith('bb')) {
|
|
38
|
+
try {
|
|
39
|
+
BITBADGES.decoder(address);
|
|
40
|
+
return address;
|
|
125
41
|
}
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
return solanaToBitBadges(address);
|
|
129
|
-
}
|
|
130
|
-
catch {
|
|
131
|
-
bech32Address = '';
|
|
132
|
-
}
|
|
42
|
+
catch {
|
|
43
|
+
return '';
|
|
133
44
|
}
|
|
134
45
|
}
|
|
135
|
-
return
|
|
46
|
+
return '';
|
|
136
47
|
}
|
|
137
48
|
function getConvertFunctionFromPrefix(prefix, withAliasSupport = true) {
|
|
138
49
|
return (address) => {
|
|
139
50
|
if (withAliasSupport && ['Mint', 'All', 'Total'].includes(address)) {
|
|
140
51
|
return address;
|
|
141
52
|
}
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
return convertToBitBadgesAddress(address);
|
|
145
|
-
case 'tthor':
|
|
146
|
-
return convertToThorchainAddress(address);
|
|
147
|
-
default:
|
|
148
|
-
throw new Error(`Unsupported prefix: ${prefix}`);
|
|
53
|
+
if (prefix === 'bb') {
|
|
54
|
+
return convertToBitBadgesAddress(address);
|
|
149
55
|
}
|
|
56
|
+
throw new Error(`Unsupported prefix: ${prefix}`);
|
|
150
57
|
};
|
|
151
58
|
}
|
|
152
59
|
function mustConvertToBitBadgesAddress(address) {
|
|
@@ -155,65 +62,10 @@ function mustConvertToBitBadgesAddress(address) {
|
|
|
155
62
|
throw new Error('Could not convert. Please make sure inputted address is well-formed');
|
|
156
63
|
return bech32Address;
|
|
157
64
|
}
|
|
158
|
-
function mustConvertToEthAddress(address) {
|
|
159
|
-
const bech32Address = convertToEthAddress(address);
|
|
160
|
-
if (!bech32Address)
|
|
161
|
-
throw new Error('Could not convert. Please make sure inputted address is well-formed');
|
|
162
|
-
return bech32Address;
|
|
163
|
-
}
|
|
164
|
-
function mustConvertToBtcAddress(address) {
|
|
165
|
-
const bech32Address = convertToBtcAddress(address);
|
|
166
|
-
if (!bech32Address)
|
|
167
|
-
throw new Error('Could not convert. Please make sure inputted address is well-formed');
|
|
168
|
-
return bech32Address;
|
|
169
|
-
}
|
|
170
|
-
function convertToEthAddress(address) {
|
|
171
|
-
try {
|
|
172
|
-
return bitbadgesToEth(convertToBitBadgesAddress(address));
|
|
173
|
-
}
|
|
174
|
-
catch {
|
|
175
|
-
return '';
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
function convertToBtcAddress(address) {
|
|
179
|
-
try {
|
|
180
|
-
return bitbadgesToBtc(convertToBitBadgesAddress(address));
|
|
181
|
-
}
|
|
182
|
-
catch {
|
|
183
|
-
return '';
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
function convertToThorchainAddress(address) {
|
|
187
|
-
try {
|
|
188
|
-
return bitbadgesToThorchain(convertToBitBadgesAddress(address));
|
|
189
|
-
}
|
|
190
|
-
catch {
|
|
191
|
-
return '';
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
function mustConvertToThorchainAddress(address) {
|
|
195
|
-
const bech32Address = convertToThorchainAddress(address);
|
|
196
|
-
if (!bech32Address)
|
|
197
|
-
throw new Error('Could not convert. Please make sure inputted address is well-formed');
|
|
198
|
-
return bech32Address;
|
|
199
|
-
}
|
|
200
65
|
function getChainForAddress(address) {
|
|
201
|
-
|
|
202
|
-
if (addr.startsWith('0x')) {
|
|
203
|
-
return types_js_1.SupportedChain.ETH;
|
|
204
|
-
}
|
|
205
|
-
else if (addr.startsWith('bb')) {
|
|
66
|
+
if (address.startsWith('bb')) {
|
|
206
67
|
return types_js_1.SupportedChain.COSMOS;
|
|
207
68
|
}
|
|
208
|
-
else if (address.startsWith('tthor')) {
|
|
209
|
-
return types_js_1.SupportedChain.THORCHAIN;
|
|
210
|
-
}
|
|
211
|
-
else if (address.startsWith('bc')) {
|
|
212
|
-
return types_js_1.SupportedChain.BTC;
|
|
213
|
-
}
|
|
214
|
-
else if (address.length == 44) {
|
|
215
|
-
return types_js_1.SupportedChain.SOLANA;
|
|
216
|
-
}
|
|
217
69
|
return types_js_1.SupportedChain.UNKNOWN;
|
|
218
70
|
}
|
|
219
71
|
function getAbbreviatedAddress(address) {
|
|
@@ -227,58 +79,24 @@ function getAbbreviatedAddress(address) {
|
|
|
227
79
|
return address.substring(0, 10) + '...' + address.substring(address.length - 4, address.length);
|
|
228
80
|
}
|
|
229
81
|
function isAddressValid(address, chain) {
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
chain = getChainForAddress(address);
|
|
82
|
+
if (address === 'Mint') {
|
|
83
|
+
return true;
|
|
233
84
|
}
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
case types_js_1.SupportedChain.UNKNOWN:
|
|
237
|
-
isValidAddress = (0, web3_validator_1.isAddress)(address);
|
|
238
|
-
break;
|
|
239
|
-
case types_js_1.SupportedChain.THORCHAIN:
|
|
240
|
-
try {
|
|
241
|
-
const thorAddress = convertToThorchainAddress(address);
|
|
242
|
-
isValidAddress = thorAddress.length > 0;
|
|
243
|
-
}
|
|
244
|
-
catch {
|
|
245
|
-
isValidAddress = false;
|
|
246
|
-
}
|
|
247
|
-
break;
|
|
248
|
-
case types_js_1.SupportedChain.COSMOS:
|
|
249
|
-
try {
|
|
250
|
-
bitbadgesToEth(address);
|
|
251
|
-
}
|
|
252
|
-
catch {
|
|
253
|
-
isValidAddress = false;
|
|
254
|
-
}
|
|
255
|
-
break;
|
|
256
|
-
case types_js_1.SupportedChain.SOLANA:
|
|
257
|
-
try {
|
|
258
|
-
const decoded = bs58_1.default.decode(address);
|
|
259
|
-
isValidAddress = decoded.length === 32;
|
|
260
|
-
}
|
|
261
|
-
catch (e) {
|
|
262
|
-
isValidAddress = false;
|
|
263
|
-
}
|
|
264
|
-
break;
|
|
265
|
-
case types_js_1.SupportedChain.BTC:
|
|
266
|
-
try {
|
|
267
|
-
bitbadgesToEth(btcToBitBadges(address));
|
|
268
|
-
}
|
|
269
|
-
catch {
|
|
270
|
-
isValidAddress = false;
|
|
271
|
-
}
|
|
272
|
-
break;
|
|
273
|
-
default:
|
|
274
|
-
break;
|
|
85
|
+
if (address.startsWith('bbvaloper')) {
|
|
86
|
+
return true;
|
|
275
87
|
}
|
|
276
|
-
if (
|
|
277
|
-
|
|
88
|
+
if (chain == undefined || chain == types_js_1.SupportedChain.UNKNOWN) {
|
|
89
|
+
chain = getChainForAddress(address);
|
|
278
90
|
}
|
|
279
|
-
|
|
280
|
-
|
|
91
|
+
if (chain === types_js_1.SupportedChain.COSMOS) {
|
|
92
|
+
try {
|
|
93
|
+
BITBADGES.decoder(address);
|
|
94
|
+
return true;
|
|
95
|
+
}
|
|
96
|
+
catch {
|
|
97
|
+
return false;
|
|
98
|
+
}
|
|
281
99
|
}
|
|
282
|
-
return
|
|
100
|
+
return false;
|
|
283
101
|
}
|
|
284
102
|
//# sourceMappingURL=converter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"converter.js","sourceRoot":"","sources":["../../../src/address-converter/converter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"converter.js","sourceRoot":"","sources":["../../../src/address-converter/converter.ts"],"names":[],"mappings":"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"}
|
|
@@ -4555,7 +4555,7 @@ class BitBadgesAPI extends base_js_1.BaseBitBadgesApi {
|
|
|
4555
4555
|
}
|
|
4556
4556
|
async verifyOwnershipRequirements(payload) {
|
|
4557
4557
|
try {
|
|
4558
|
-
const validateRes = (() => { const _io0 = input => "string" === typeof input.address && ("object" === typeof input.assetOwnershipRequirements && null !== input.assetOwnershipRequirements && _iu0(input.assetOwnershipRequirements)); const _io1 = input => Array.isArray(input.$and) && input.$and.every(elem => "object" === typeof elem && null !== elem && _iu0(elem)); const _io2 = input => Array.isArray(input.$or) && input.$or.every(elem => "object" === typeof elem && null !== elem && _iu0(elem)); const _io3 = input => Array.isArray(input.assets) && input.assets.every(elem => "object" === typeof elem && null !== elem && _io4(elem)) && (undefined === input.options || "object" === typeof input.options && null !== input.options && false === Array.isArray(input.options) && _io6(input.options)); const _io4 = input => "string" === typeof input.chain && ("string" === typeof input.collectionId || "number" === typeof input.collectionId || "bigint" === typeof input.collectionId) && (Array.isArray(input.assetIds) && input.assetIds.every(elem => null !== elem && undefined !== elem && ("string" === typeof elem || "object" === typeof elem && null !== elem && _io5(elem)))) && (Array.isArray(input.ownershipTimes) && input.ownershipTimes.every(elem => "object" === typeof elem && null !== elem && _io5(elem))) && ("object" === typeof input.mustOwnAmounts && null !== input.mustOwnAmounts && _io5(input.mustOwnAmounts)) && (undefined === input.additionalCriteria || "string" === typeof input.additionalCriteria); const _io5 = input => ("string" === typeof input.start || "number" === typeof input.start || "bigint" === typeof input.start) && ("string" === typeof input.end || "number" === typeof input.end || "bigint" === typeof input.end); const _io6 = input => undefined === input.numMatchesForVerification || "string" === typeof input.numMatchesForVerification || "number" === typeof input.numMatchesForVerification || "bigint" === typeof input.numMatchesForVerification; const _iu0 = input => (() => {
|
|
4558
|
+
const validateRes = (() => { const _io0 = input => "string" === typeof input.address && ("object" === typeof input.assetOwnershipRequirements && null !== input.assetOwnershipRequirements && _iu0(input.assetOwnershipRequirements)); const _io1 = input => Array.isArray(input.$and) && input.$and.every(elem => "object" === typeof elem && null !== elem && _iu0(elem)); const _io2 = input => Array.isArray(input.$or) && input.$or.every(elem => "object" === typeof elem && null !== elem && _iu0(elem)); const _io3 = input => Array.isArray(input.assets) && input.assets.every(elem => "object" === typeof elem && null !== elem && _io4(elem)) && (undefined === input.options || "object" === typeof input.options && null !== input.options && false === Array.isArray(input.options) && _io6(input.options)); const _io4 = input => "string" === typeof input.chain && ("string" === typeof input.collectionId || "number" === typeof input.collectionId || "bigint" === typeof input.collectionId) && (Array.isArray(input.assetIds) && input.assetIds.every(elem => null !== elem && undefined !== elem && ("string" === typeof elem || "object" === typeof elem && null !== elem && _io5(elem)))) && (Array.isArray(input.ownershipTimes) && input.ownershipTimes.every(elem => "object" === typeof elem && null !== elem && _io5(elem))) && ("object" === typeof input.mustOwnAmounts && null !== input.mustOwnAmounts && _io5(input.mustOwnAmounts)) && (undefined === input.additionalCriteria || "string" === typeof input.additionalCriteria) && (undefined === input.ownershipPartyCheck || "string" === typeof input.ownershipPartyCheck); const _io5 = input => ("string" === typeof input.start || "number" === typeof input.start || "bigint" === typeof input.start) && ("string" === typeof input.end || "number" === typeof input.end || "bigint" === typeof input.end); const _io6 = input => undefined === input.numMatchesForVerification || "string" === typeof input.numMatchesForVerification || "number" === typeof input.numMatchesForVerification || "bigint" === typeof input.numMatchesForVerification; const _iu0 = input => (() => {
|
|
4559
4559
|
if (undefined !== input.$and)
|
|
4560
4560
|
return _io1(input);
|
|
4561
4561
|
else if (undefined !== input.$or)
|
|
@@ -4692,6 +4692,10 @@ class BitBadgesAPI extends base_js_1.BaseBitBadgesApi {
|
|
|
4692
4692
|
path: _path + ".additionalCriteria",
|
|
4693
4693
|
expected: "(string | undefined)",
|
|
4694
4694
|
value: input.additionalCriteria
|
|
4695
|
+
}), undefined === input.ownershipPartyCheck || "string" === typeof input.ownershipPartyCheck || _report(_exceptionable, {
|
|
4696
|
+
path: _path + ".ownershipPartyCheck",
|
|
4697
|
+
expected: "(string | undefined)",
|
|
4698
|
+
value: input.ownershipPartyCheck
|
|
4695
4699
|
})].every(flag => flag); const _vo5 = (input, _path, _exceptionable = true) => ["string" === typeof input.start || "number" === typeof input.start || "bigint" === typeof input.start || _report(_exceptionable, {
|
|
4696
4700
|
path: _path + ".start",
|
|
4697
4701
|
expected: "(bigint | number | string)",
|
|
@@ -6621,8 +6625,8 @@ class BitBadgesAdminAPI extends BitBadgesAPI {
|
|
|
6621
6625
|
if (undefined === value)
|
|
6622
6626
|
return true;
|
|
6623
6627
|
return "string" === typeof value;
|
|
6624
|
-
}); const _io3 = input => "string" === typeof input.type && "string" === typeof input.name && ("string" === typeof input.value || "number" === typeof input.value || "boolean" === typeof input.value); const _io4 = input => "string" === typeof input.name && "string" === typeof input.image && "string" === typeof input.description && (undefined === input.url || "string" === typeof input.url); const _io5 = input => Array.isArray(input.tokenIds) && input.tokenIds.every(elem => "object" === typeof elem && null !== elem && _io6(elem)) && (undefined === input.metadata || "object" === typeof input.metadata && null !== input.metadata && _io1(input.metadata)) && "string" === typeof input.uri && (undefined === input.fetchedUri || "string" === typeof input.fetchedUri) && "string" === typeof input.customData && (undefined === input.toUploadToIpfs || "boolean" === typeof input.toUploadToIpfs); const _io6 = input => ("string" === typeof input.start || "number" === typeof input.start || "bigint" === typeof input.start) && ("string" === typeof input.end || "number" === typeof input.end || "bigint" === typeof input.end); const _io7 = input => (undefined === input.metadata || "object" === typeof input.metadata && null !== input.metadata && _io1(input.metadata)) && "string" === typeof input.uri && (undefined === input.fetchedUri || "string" === typeof input.fetchedUri) && "string" === typeof input.customData && (undefined === input.toUploadToIpfs || "boolean" === typeof input.toUploadToIpfs); const _io8 = input => Array.isArray(input.leaves) && input.leaves.every(elem => "string" === typeof elem) && "boolean" === typeof input.isHashed && (undefined === input.preimages || Array.isArray(input.preimages) && input.preimages.every(elem => "string" === typeof elem)) && (undefined === input.seedCode || "string" === typeof input.seedCode) && (undefined === input.tree || "object" === typeof input.tree && null !== input.tree && false === Array.isArray(input.tree) && _io9(input.tree)) && (undefined === input.treeOptions || "object" === typeof input.treeOptions && null !== input.treeOptions && false === Array.isArray(input.treeOptions) && _io10(input.treeOptions)) && (undefined === input.numLeaves || "string" === typeof input.numLeaves || "number" === typeof input.numLeaves || "bigint" === typeof input.numLeaves) && (undefined === input.currCode || "string" === typeof input.currCode || "number" === typeof input.currCode || "bigint" === typeof input.currCode); const _io9 = input => true; const _io10 = input => (undefined === input.duplicateOdd || "boolean" === typeof input.duplicateOdd) && (undefined === input.hashLeaves || "boolean" === typeof input.hashLeaves) && (undefined === input.isBitcoinTree || "boolean" === typeof input.isBitcoinTree) && (undefined === input.sortLeaves || "boolean" === typeof input.sortLeaves) && (undefined === input.sortPairs || "boolean" === typeof input.sortPairs) && (undefined === input.sort || "boolean" === typeof input.sort) && (null !== input.fillDefaultHash && (undefined === input.fillDefaultHash || "function" === typeof input.fillDefaultHash || "string" === typeof input.fillDefaultHash || "object" === typeof input.fillDefaultHash && null !== input.fillDefaultHash && _io11(input.fillDefaultHash))) && (undefined === input.complete || "boolean" === typeof input.complete) && (undefined === input.concatenator || true); const _io11 = input => "number" === typeof input.BYTES_PER_ELEMENT && (input.buffer instanceof ArrayBuffer || input.buffer instanceof SharedArrayBuffer) && "number" === typeof input.byteLength && "number" === typeof input.byteOffset && "number" === typeof input.length && "Uint8Array" === input["__@toStringTag@
|
|
6625
|
-
if (["BYTES_PER_ELEMENT", "buffer", "byteLength", "byteOffset", "length", "__@toStringTag@
|
|
6628
|
+
}); const _io3 = input => "string" === typeof input.type && "string" === typeof input.name && ("string" === typeof input.value || "number" === typeof input.value || "boolean" === typeof input.value); const _io4 = input => "string" === typeof input.name && "string" === typeof input.image && "string" === typeof input.description && (undefined === input.url || "string" === typeof input.url); const _io5 = input => Array.isArray(input.tokenIds) && input.tokenIds.every(elem => "object" === typeof elem && null !== elem && _io6(elem)) && (undefined === input.metadata || "object" === typeof input.metadata && null !== input.metadata && _io1(input.metadata)) && "string" === typeof input.uri && (undefined === input.fetchedUri || "string" === typeof input.fetchedUri) && "string" === typeof input.customData && (undefined === input.toUploadToIpfs || "boolean" === typeof input.toUploadToIpfs); const _io6 = input => ("string" === typeof input.start || "number" === typeof input.start || "bigint" === typeof input.start) && ("string" === typeof input.end || "number" === typeof input.end || "bigint" === typeof input.end); const _io7 = input => (undefined === input.metadata || "object" === typeof input.metadata && null !== input.metadata && _io1(input.metadata)) && "string" === typeof input.uri && (undefined === input.fetchedUri || "string" === typeof input.fetchedUri) && "string" === typeof input.customData && (undefined === input.toUploadToIpfs || "boolean" === typeof input.toUploadToIpfs); const _io8 = input => Array.isArray(input.leaves) && input.leaves.every(elem => "string" === typeof elem) && "boolean" === typeof input.isHashed && (undefined === input.preimages || Array.isArray(input.preimages) && input.preimages.every(elem => "string" === typeof elem)) && (undefined === input.seedCode || "string" === typeof input.seedCode) && (undefined === input.tree || "object" === typeof input.tree && null !== input.tree && false === Array.isArray(input.tree) && _io9(input.tree)) && (undefined === input.treeOptions || "object" === typeof input.treeOptions && null !== input.treeOptions && false === Array.isArray(input.treeOptions) && _io10(input.treeOptions)) && (undefined === input.numLeaves || "string" === typeof input.numLeaves || "number" === typeof input.numLeaves || "bigint" === typeof input.numLeaves) && (undefined === input.currCode || "string" === typeof input.currCode || "number" === typeof input.currCode || "bigint" === typeof input.currCode); const _io9 = input => true; const _io10 = input => (undefined === input.duplicateOdd || "boolean" === typeof input.duplicateOdd) && (undefined === input.hashLeaves || "boolean" === typeof input.hashLeaves) && (undefined === input.isBitcoinTree || "boolean" === typeof input.isBitcoinTree) && (undefined === input.sortLeaves || "boolean" === typeof input.sortLeaves) && (undefined === input.sortPairs || "boolean" === typeof input.sortPairs) && (undefined === input.sort || "boolean" === typeof input.sort) && (null !== input.fillDefaultHash && (undefined === input.fillDefaultHash || "function" === typeof input.fillDefaultHash || "string" === typeof input.fillDefaultHash || "object" === typeof input.fillDefaultHash && null !== input.fillDefaultHash && _io11(input.fillDefaultHash))) && (undefined === input.complete || "boolean" === typeof input.complete) && (undefined === input.concatenator || true); const _io11 = input => "number" === typeof input.BYTES_PER_ELEMENT && (input.buffer instanceof ArrayBuffer || input.buffer instanceof SharedArrayBuffer) && "number" === typeof input.byteLength && "number" === typeof input.byteOffset && "number" === typeof input.length && "Uint8Array" === input["__@toStringTag@38"] && Object.keys(input).every(key => {
|
|
6629
|
+
if (["BYTES_PER_ELEMENT", "buffer", "byteLength", "byteOffset", "length", "__@toStringTag@38"].some(prop => key === prop))
|
|
6626
6630
|
return true;
|
|
6627
6631
|
const value = input[key];
|
|
6628
6632
|
if (undefined === value)
|
|
@@ -6976,12 +6980,12 @@ class BitBadgesAdminAPI extends BitBadgesAPI {
|
|
|
6976
6980
|
path: _path + ".length",
|
|
6977
6981
|
expected: "number",
|
|
6978
6982
|
value: input.length
|
|
6979
|
-
}), "Uint8Array" === input["__@toStringTag@
|
|
6980
|
-
path: _path + "[\"__@toStringTag@
|
|
6983
|
+
}), "Uint8Array" === input["__@toStringTag@38"] || _report(_exceptionable, {
|
|
6984
|
+
path: _path + "[\"__@toStringTag@38\"]",
|
|
6981
6985
|
expected: "\"Uint8Array\"",
|
|
6982
|
-
value: input["__@toStringTag@
|
|
6986
|
+
value: input["__@toStringTag@38"]
|
|
6983
6987
|
}), false === _exceptionable || Object.keys(input).map(key => {
|
|
6984
|
-
if (["BYTES_PER_ELEMENT", "buffer", "byteLength", "byteOffset", "length", "__@toStringTag@
|
|
6988
|
+
if (["BYTES_PER_ELEMENT", "buffer", "byteLength", "byteOffset", "length", "__@toStringTag@38"].some(prop => key === prop))
|
|
6985
6989
|
return true;
|
|
6986
6990
|
const value = input[key];
|
|
6987
6991
|
if (undefined === value)
|
|
@@ -7043,8 +7047,8 @@ class BitBadgesAdminAPI extends BitBadgesAPI {
|
|
|
7043
7047
|
}
|
|
7044
7048
|
async addApprovalDetailsToOffChainStorage(payload) {
|
|
7045
7049
|
try {
|
|
7046
|
-
const validateRes = (() => { const _io0 = input => Array.isArray(input.approvalDetails) && input.approvalDetails.every(elem => "object" === typeof elem && null !== elem && _io1(elem)); const _io1 = input => "string" === typeof input.name && "string" === typeof input.description && "string" === typeof input.image && (undefined === input.challengeInfoDetails || Array.isArray(input.challengeInfoDetails) && input.challengeInfoDetails.every(elem => "object" === typeof elem && null !== elem && _io2(elem))); const _io2 = input => "object" === typeof input.challengeDetails && null !== input.challengeDetails && _io3(input.challengeDetails) && (undefined === input.claim || "object" === typeof input.claim && null !== input.claim && _io7(input.claim)); const _io3 = input => Array.isArray(input.leaves) && input.leaves.every(elem => "string" === typeof elem) && "boolean" === typeof input.isHashed && (undefined === input.preimages || Array.isArray(input.preimages) && input.preimages.every(elem => "string" === typeof elem)) && (undefined === input.seedCode || "string" === typeof input.seedCode) && (undefined === input.tree || "object" === typeof input.tree && null !== input.tree && false === Array.isArray(input.tree) && _io4(input.tree)) && (undefined === input.treeOptions || "object" === typeof input.treeOptions && null !== input.treeOptions && false === Array.isArray(input.treeOptions) && _io5(input.treeOptions)) && (undefined === input.numLeaves || "string" === typeof input.numLeaves || "number" === typeof input.numLeaves || "bigint" === typeof input.numLeaves) && (undefined === input.currCode || "string" === typeof input.currCode || "number" === typeof input.currCode || "bigint" === typeof input.currCode); const _io4 = input => true; const _io5 = input => (undefined === input.duplicateOdd || "boolean" === typeof input.duplicateOdd) && (undefined === input.hashLeaves || "boolean" === typeof input.hashLeaves) && (undefined === input.isBitcoinTree || "boolean" === typeof input.isBitcoinTree) && (undefined === input.sortLeaves || "boolean" === typeof input.sortLeaves) && (undefined === input.sortPairs || "boolean" === typeof input.sortPairs) && (undefined === input.sort || "boolean" === typeof input.sort) && (null !== input.fillDefaultHash && (undefined === input.fillDefaultHash || "function" === typeof input.fillDefaultHash || "string" === typeof input.fillDefaultHash || "object" === typeof input.fillDefaultHash && null !== input.fillDefaultHash && _io6(input.fillDefaultHash))) && (undefined === input.complete || "boolean" === typeof input.complete) && (undefined === input.concatenator || true); const _io6 = input => "number" === typeof input.BYTES_PER_ELEMENT && (input.buffer instanceof ArrayBuffer || input.buffer instanceof SharedArrayBuffer) && "number" === typeof input.byteLength && "number" === typeof input.byteOffset && "number" === typeof input.length && "Uint8Array" === input["__@toStringTag@
|
|
7047
|
-
if (["BYTES_PER_ELEMENT", "buffer", "byteLength", "byteOffset", "length", "__@toStringTag@
|
|
7050
|
+
const validateRes = (() => { const _io0 = input => Array.isArray(input.approvalDetails) && input.approvalDetails.every(elem => "object" === typeof elem && null !== elem && _io1(elem)); const _io1 = input => "string" === typeof input.name && "string" === typeof input.description && "string" === typeof input.image && (undefined === input.challengeInfoDetails || Array.isArray(input.challengeInfoDetails) && input.challengeInfoDetails.every(elem => "object" === typeof elem && null !== elem && _io2(elem))); const _io2 = input => "object" === typeof input.challengeDetails && null !== input.challengeDetails && _io3(input.challengeDetails) && (undefined === input.claim || "object" === typeof input.claim && null !== input.claim && _io7(input.claim)); const _io3 = input => Array.isArray(input.leaves) && input.leaves.every(elem => "string" === typeof elem) && "boolean" === typeof input.isHashed && (undefined === input.preimages || Array.isArray(input.preimages) && input.preimages.every(elem => "string" === typeof elem)) && (undefined === input.seedCode || "string" === typeof input.seedCode) && (undefined === input.tree || "object" === typeof input.tree && null !== input.tree && false === Array.isArray(input.tree) && _io4(input.tree)) && (undefined === input.treeOptions || "object" === typeof input.treeOptions && null !== input.treeOptions && false === Array.isArray(input.treeOptions) && _io5(input.treeOptions)) && (undefined === input.numLeaves || "string" === typeof input.numLeaves || "number" === typeof input.numLeaves || "bigint" === typeof input.numLeaves) && (undefined === input.currCode || "string" === typeof input.currCode || "number" === typeof input.currCode || "bigint" === typeof input.currCode); const _io4 = input => true; const _io5 = input => (undefined === input.duplicateOdd || "boolean" === typeof input.duplicateOdd) && (undefined === input.hashLeaves || "boolean" === typeof input.hashLeaves) && (undefined === input.isBitcoinTree || "boolean" === typeof input.isBitcoinTree) && (undefined === input.sortLeaves || "boolean" === typeof input.sortLeaves) && (undefined === input.sortPairs || "boolean" === typeof input.sortPairs) && (undefined === input.sort || "boolean" === typeof input.sort) && (null !== input.fillDefaultHash && (undefined === input.fillDefaultHash || "function" === typeof input.fillDefaultHash || "string" === typeof input.fillDefaultHash || "object" === typeof input.fillDefaultHash && null !== input.fillDefaultHash && _io6(input.fillDefaultHash))) && (undefined === input.complete || "boolean" === typeof input.complete) && (undefined === input.concatenator || true); const _io6 = input => "number" === typeof input.BYTES_PER_ELEMENT && (input.buffer instanceof ArrayBuffer || input.buffer instanceof SharedArrayBuffer) && "number" === typeof input.byteLength && "number" === typeof input.byteOffset && "number" === typeof input.length && "Uint8Array" === input["__@toStringTag@38"] && Object.keys(input).every(key => {
|
|
7051
|
+
if (["BYTES_PER_ELEMENT", "buffer", "byteLength", "byteOffset", "length", "__@toStringTag@38"].some(prop => key === prop))
|
|
7048
7052
|
return true;
|
|
7049
7053
|
const value = input[key];
|
|
7050
7054
|
if (undefined === value)
|
|
@@ -7247,12 +7251,12 @@ class BitBadgesAdminAPI extends BitBadgesAPI {
|
|
|
7247
7251
|
path: _path + ".length",
|
|
7248
7252
|
expected: "number",
|
|
7249
7253
|
value: input.length
|
|
7250
|
-
}), "Uint8Array" === input["__@toStringTag@
|
|
7251
|
-
path: _path + "[\"__@toStringTag@
|
|
7254
|
+
}), "Uint8Array" === input["__@toStringTag@38"] || _report(_exceptionable, {
|
|
7255
|
+
path: _path + "[\"__@toStringTag@38\"]",
|
|
7252
7256
|
expected: "\"Uint8Array\"",
|
|
7253
|
-
value: input["__@toStringTag@
|
|
7257
|
+
value: input["__@toStringTag@38"]
|
|
7254
7258
|
}), false === _exceptionable || Object.keys(input).map(key => {
|
|
7255
|
-
if (["BYTES_PER_ELEMENT", "buffer", "byteLength", "byteOffset", "length", "__@toStringTag@
|
|
7259
|
+
if (["BYTES_PER_ELEMENT", "buffer", "byteLength", "byteOffset", "length", "__@toStringTag@38"].some(prop => key === prop))
|
|
7256
7260
|
return true;
|
|
7257
7261
|
const value = input[key];
|
|
7258
7262
|
if (undefined === value)
|
|
@@ -7867,9 +7871,9 @@ class BitBadgesAdminAPI extends BitBadgesAPI {
|
|
|
7867
7871
|
}
|
|
7868
7872
|
async getSignInChallenge(payload) {
|
|
7869
7873
|
try {
|
|
7870
|
-
const validateRes = (() => { const _io0 = input => ("
|
|
7874
|
+
const validateRes = (() => { const _io0 = input => ("Cosmos" === input.chain || "Unknown" === input.chain) && "string" === typeof input.address; const _vo0 = (input, _path, _exceptionable = true) => ["Cosmos" === input.chain || "Unknown" === input.chain || _report(_exceptionable, {
|
|
7871
7875
|
path: _path + ".chain",
|
|
7872
|
-
expected: "(\"
|
|
7876
|
+
expected: "(\"Cosmos\" | \"Unknown\")",
|
|
7873
7877
|
value: input.chain
|
|
7874
7878
|
}), "string" === typeof input.address || _report(_exceptionable, {
|
|
7875
7879
|
path: _path + ".address",
|
|
@@ -8777,7 +8781,7 @@ class BitBadgesAdminAPI extends BitBadgesAPI {
|
|
|
8777
8781
|
}
|
|
8778
8782
|
async verifySIWBBRequest(payload) {
|
|
8779
8783
|
try {
|
|
8780
|
-
const validateRes = (() => { const _io0 = input => (undefined === input.options || "object" === typeof input.options && null !== input.options && false === Array.isArray(input.options) && _io1(input.options)) && "string" === typeof input.message && "string" === typeof input.signature && (undefined === input.publicKey || "string" === typeof input.publicKey); const _io1 = input => (undefined === input.expectedChallengeParams || "object" === typeof input.expectedChallengeParams && null !== input.expectedChallengeParams && false === Array.isArray(input.expectedChallengeParams) && _io2(input.expectedChallengeParams)) && (undefined === input.beforeVerification || true) && (undefined === input.balancesSnapshot || "object" === typeof input.balancesSnapshot && null !== input.balancesSnapshot && false === Array.isArray(input.balancesSnapshot) && _io9(input.balancesSnapshot)) && (undefined === input.
|
|
8784
|
+
const validateRes = (() => { const _io0 = input => (undefined === input.options || "object" === typeof input.options && null !== input.options && false === Array.isArray(input.options) && _io1(input.options)) && "string" === typeof input.message && "string" === typeof input.signature && (undefined === input.publicKey || "string" === typeof input.publicKey); const _io1 = input => (undefined === input.expectedChallengeParams || "object" === typeof input.expectedChallengeParams && null !== input.expectedChallengeParams && false === Array.isArray(input.expectedChallengeParams) && _io2(input.expectedChallengeParams)) && (undefined === input.beforeVerification || true) && (undefined === input.balancesSnapshot || "object" === typeof input.balancesSnapshot && null !== input.balancesSnapshot && false === Array.isArray(input.balancesSnapshot) && _io9(input.balancesSnapshot)) && (undefined === input.skipTimestampVerification || "boolean" === typeof input.skipTimestampVerification) && (undefined === input.skipAssetVerification || "boolean" === typeof input.skipAssetVerification) && (undefined === input.earliestIssuedAt || "string" === typeof input.earliestIssuedAt) && (undefined === input.issuedAtTimeWindowMs || "number" === typeof input.issuedAtTimeWindowMs) && (undefined === input.skipSignatureVerification || "boolean" === typeof input.skipSignatureVerification); const _io2 = input => (undefined === input.domain || "string" === typeof input.domain) && (undefined === input.statement || "string" === typeof input.statement) && (undefined === input.address || "string" === typeof input.address) && (undefined === input.uri || "string" === typeof input.uri) && (undefined === input.nonce || "string" === typeof input.nonce) && (undefined === input.version || "string" === typeof input.version) && (undefined === input.chainId || "string" === typeof input.chainId) && (undefined === input.issuedAt || "string" === typeof input.issuedAt) && (undefined === input.expirationDate || "string" === typeof input.expirationDate) && (undefined === input.notBefore || "string" === typeof input.notBefore) && (undefined === input.resources || Array.isArray(input.resources) && input.resources.every(elem => "string" === typeof elem)) && (undefined === input.assetOwnershipRequirements || "object" === typeof input.assetOwnershipRequirements && null !== input.assetOwnershipRequirements && _iu0(input.assetOwnershipRequirements)); const _io3 = input => Array.isArray(input.$and) && input.$and.every(elem => "object" === typeof elem && null !== elem && _iu0(elem)); const _io4 = input => Array.isArray(input.$or) && input.$or.every(elem => "object" === typeof elem && null !== elem && _iu0(elem)); const _io5 = input => Array.isArray(input.assets) && input.assets.every(elem => "object" === typeof elem && null !== elem && _io6(elem)) && (undefined === input.options || "object" === typeof input.options && null !== input.options && false === Array.isArray(input.options) && _io8(input.options)); const _io6 = input => "string" === typeof input.chain && ("string" === typeof input.collectionId || "number" === typeof input.collectionId || "bigint" === typeof input.collectionId) && (Array.isArray(input.assetIds) && input.assetIds.every(elem => null !== elem && undefined !== elem && ("string" === typeof elem || "object" === typeof elem && null !== elem && _io7(elem)))) && (Array.isArray(input.ownershipTimes) && input.ownershipTimes.every(elem => "object" === typeof elem && null !== elem && _io7(elem))) && ("object" === typeof input.mustOwnAmounts && null !== input.mustOwnAmounts && _io7(input.mustOwnAmounts)) && (undefined === input.additionalCriteria || "string" === typeof input.additionalCriteria) && (undefined === input.ownershipPartyCheck || "string" === typeof input.ownershipPartyCheck); const _io7 = input => ("string" === typeof input.start || "number" === typeof input.start || "bigint" === typeof input.start) && ("string" === typeof input.end || "number" === typeof input.end || "bigint" === typeof input.end); const _io8 = input => undefined === input.numMatchesForVerification || "string" === typeof input.numMatchesForVerification || "number" === typeof input.numMatchesForVerification || "bigint" === typeof input.numMatchesForVerification; const _io9 = input => true; const _iu0 = input => (() => {
|
|
8781
8785
|
if (undefined !== input.$and)
|
|
8782
8786
|
return _io3(input);
|
|
8783
8787
|
else if (undefined !== input.$or)
|
|
@@ -8826,10 +8830,6 @@ class BitBadgesAdminAPI extends BitBadgesAPI {
|
|
|
8826
8830
|
path: _path + ".balancesSnapshot",
|
|
8827
8831
|
expected: "(object | undefined)",
|
|
8828
8832
|
value: input.balancesSnapshot
|
|
8829
|
-
}), undefined === input.verificationTimeOverride || "number" === typeof input.verificationTimeOverride || _report(_exceptionable, {
|
|
8830
|
-
path: _path + ".verificationTimeOverride",
|
|
8831
|
-
expected: "(number | undefined)",
|
|
8832
|
-
value: input.verificationTimeOverride
|
|
8833
8833
|
}), undefined === input.skipTimestampVerification || "boolean" === typeof input.skipTimestampVerification || _report(_exceptionable, {
|
|
8834
8834
|
path: _path + ".skipTimestampVerification",
|
|
8835
8835
|
expected: "(boolean | undefined)",
|
|
@@ -9026,6 +9026,10 @@ class BitBadgesAdminAPI extends BitBadgesAPI {
|
|
|
9026
9026
|
path: _path + ".additionalCriteria",
|
|
9027
9027
|
expected: "(string | undefined)",
|
|
9028
9028
|
value: input.additionalCriteria
|
|
9029
|
+
}), undefined === input.ownershipPartyCheck || "string" === typeof input.ownershipPartyCheck || _report(_exceptionable, {
|
|
9030
|
+
path: _path + ".ownershipPartyCheck",
|
|
9031
|
+
expected: "(string | undefined)",
|
|
9032
|
+
value: input.ownershipPartyCheck
|
|
9029
9033
|
})].every(flag => flag); const _vo7 = (input, _path, _exceptionable = true) => ["string" === typeof input.start || "number" === typeof input.start || "bigint" === typeof input.start || _report(_exceptionable, {
|
|
9030
9034
|
path: _path + ".start",
|
|
9031
9035
|
expected: "(bigint | number | string)",
|