bitbadges 0.45.1 → 0.45.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/api-indexer/BitBadgesApi.d.ts +1 -7
- package/dist/cjs/api-indexer/BitBadgesApi.d.ts.map +1 -1
- package/dist/cjs/api-indexer/BitBadgesApi.js +6 -356
- package/dist/cjs/api-indexer/BitBadgesApi.js.map +1 -1
- package/dist/cjs/api-indexer/docs-types/docs.d.ts +1 -20
- package/dist/cjs/api-indexer/docs-types/docs.d.ts.map +1 -1
- package/dist/cjs/api-indexer/docs-types/docs.js +1 -23
- package/dist/cjs/api-indexer/docs-types/docs.js.map +1 -1
- package/dist/cjs/api-indexer/docs-types/interfaces.d.ts +0 -16
- package/dist/cjs/api-indexer/docs-types/interfaces.d.ts.map +1 -1
- package/dist/cjs/api-indexer/requests/requests.d.ts +1 -72
- package/dist/cjs/api-indexer/requests/requests.d.ts.map +1 -1
- package/dist/cjs/api-indexer/requests/requests.js +1 -36
- package/dist/cjs/api-indexer/requests/requests.js.map +1 -1
- package/dist/cjs/api-indexer/requests/routes.d.ts +0 -5
- package/dist/cjs/api-indexer/requests/routes.d.ts.map +1 -1
- package/dist/cjs/api-indexer/requests/routes.js +1 -6
- package/dist/cjs/api-indexer/requests/routes.js.map +1 -1
- package/dist/cjs/api-indexer/routes.spec.d.ts +2 -0
- package/dist/cjs/api-indexer/routes.spec.d.ts.map +1 -0
- package/dist/cjs/api-indexer/routes.spec.js +38 -0
- package/dist/cjs/api-indexer/routes.spec.js.map +1 -0
- package/dist/cjs/builder/agent/BitBadgesBuilderAgent.d.ts +0 -1
- package/dist/cjs/builder/agent/BitBadgesBuilderAgent.d.ts.map +1 -1
- package/dist/cjs/builder/agent/BitBadgesBuilderAgent.js +0 -4
- package/dist/cjs/builder/agent/BitBadgesBuilderAgent.js.map +1 -1
- package/dist/cjs/builder/agent/BitBadgesBuilderAgent.spec.js +1 -25
- package/dist/cjs/builder/agent/BitBadgesBuilderAgent.spec.js.map +1 -1
- package/dist/cjs/builder/agent/index.d.ts +1 -2
- package/dist/cjs/builder/agent/index.d.ts.map +1 -1
- package/dist/cjs/builder/agent/index.js +1 -3
- package/dist/cjs/builder/agent/index.js.map +1 -1
- package/dist/cjs/builder/agent/prompt.d.ts +3 -6
- package/dist/cjs/builder/agent/prompt.d.ts.map +1 -1
- package/dist/cjs/builder/agent/prompt.js +6 -31
- package/dist/cjs/builder/agent/prompt.js.map +1 -1
- package/dist/cjs/builder/agent/prompt.spec.js +1 -5
- package/dist/cjs/builder/agent/prompt.spec.js.map +1 -1
- package/dist/cjs/builder/agent/types.d.ts +0 -8
- package/dist/cjs/builder/agent/types.d.ts.map +1 -1
- package/dist/cjs/builder/resources/errorPatterns.js +2 -2
- package/dist/cjs/builder/resources/errorPatterns.js.map +1 -1
- package/dist/cjs/builder/resources/masterPrompt.js +2 -2
- package/dist/cjs/builder/resources/masterPrompt.js.map +1 -1
- package/dist/cjs/builder/resources/workflows.js +9 -9
- package/dist/cjs/builder/resources/workflows.js.map +1 -1
- package/dist/cjs/builder/sdk/apiClient.d.ts +1 -0
- package/dist/cjs/builder/sdk/apiClient.d.ts.map +1 -1
- package/dist/cjs/builder/sdk/apiClient.js +16 -4
- package/dist/cjs/builder/sdk/apiClient.js.map +1 -1
- package/dist/cjs/builder/sdk/apiClient.spec.d.ts +2 -0
- package/dist/cjs/builder/sdk/apiClient.spec.d.ts.map +1 -0
- package/dist/cjs/builder/sdk/apiClient.spec.js +22 -0
- package/dist/cjs/builder/sdk/apiClient.spec.js.map +1 -0
- package/dist/cjs/builder/server.d.ts +1 -0
- package/dist/cjs/builder/server.d.ts.map +1 -1
- package/dist/cjs/builder/server.js +20 -1
- package/dist/cjs/builder/server.js.map +1 -1
- package/dist/cjs/builder/server.spec.js +24 -0
- package/dist/cjs/builder/server.spec.js.map +1 -1
- package/dist/cjs/builder/session/sessionState.creator.spec.d.ts +2 -0
- package/dist/cjs/builder/session/sessionState.creator.spec.d.ts.map +1 -0
- package/dist/cjs/builder/session/sessionState.creator.spec.js +26 -0
- package/dist/cjs/builder/session/sessionState.creator.spec.js.map +1 -0
- package/dist/cjs/builder/session/sessionState.d.ts.map +1 -1
- package/dist/cjs/builder/session/sessionState.js +8 -1
- package/dist/cjs/builder/session/sessionState.js.map +1 -1
- package/dist/cjs/builder/tools/queries/buildDynamicStore.fees.spec.d.ts +2 -0
- package/dist/cjs/builder/tools/queries/buildDynamicStore.fees.spec.d.ts.map +1 -0
- package/dist/cjs/builder/tools/queries/buildDynamicStore.fees.spec.js +13 -0
- package/dist/cjs/builder/tools/queries/buildDynamicStore.fees.spec.js.map +1 -0
- package/dist/cjs/builder/tools/queries/buildDynamicStore.js +5 -5
- package/dist/cjs/builder/tools/queries/buildDynamicStore.js.map +1 -1
- package/dist/cjs/builder/tools/queries/buildTransfer.js +1 -1
- package/dist/cjs/builder/tools/queries/buildTransfer.js.map +1 -1
- package/dist/cjs/builder/tools/queries/simulateTransaction.js +1 -1
- package/dist/cjs/builder/tools/queries/simulateTransaction.js.map +1 -1
- package/dist/cjs/builder/tools/registry.d.ts.map +1 -1
- package/dist/cjs/builder/tools/registry.js +4 -1
- package/dist/cjs/builder/tools/registry.js.map +1 -1
- package/dist/cjs/builder/tools/registry.spec.js +26 -0
- package/dist/cjs/builder/tools/registry.spec.js.map +1 -1
- package/dist/cjs/builder/tools/session/addAliasPath.js +2 -2
- package/dist/cjs/builder/tools/session/addAliasPath.js.map +1 -1
- package/dist/cjs/builder/tools/session/addApproval.js +2 -2
- package/dist/cjs/builder/tools/session/addApproval.js.map +1 -1
- package/dist/cjs/builder/tools/session/addCosmosWrapperPath.js +2 -2
- package/dist/cjs/builder/tools/session/addCosmosWrapperPath.js.map +1 -1
- package/dist/cjs/builder/tools/session/index.d.ts +1 -0
- package/dist/cjs/builder/tools/session/index.d.ts.map +1 -1
- package/dist/cjs/builder/tools/session/index.js +1 -0
- package/dist/cjs/builder/tools/session/index.js.map +1 -1
- package/dist/cjs/builder/tools/session/resetSession.d.ts +27 -0
- package/dist/cjs/builder/tools/session/resetSession.d.ts.map +1 -0
- package/dist/cjs/builder/tools/session/resetSession.js +27 -0
- package/dist/cjs/builder/tools/session/resetSession.js.map +1 -0
- package/dist/cjs/builder/tools/session/setCollectionMetadata.d.ts +1 -0
- package/dist/cjs/builder/tools/session/setCollectionMetadata.d.ts.map +1 -1
- package/dist/cjs/builder/tools/session/setCollectionMetadata.js +2 -2
- package/dist/cjs/builder/tools/session/setCollectionMetadata.js.map +1 -1
- package/dist/cjs/builder/tools/session/setTokenMetadata.d.ts +1 -0
- package/dist/cjs/builder/tools/session/setTokenMetadata.d.ts.map +1 -1
- package/dist/cjs/builder/tools/session/setTokenMetadata.js +2 -2
- package/dist/cjs/builder/tools/session/setTokenMetadata.js.map +1 -1
- package/dist/cjs/cli/commands/api-routes.d.ts.map +1 -1
- package/dist/cjs/cli/commands/api-routes.js +0 -83
- package/dist/cjs/cli/commands/api-routes.js.map +1 -1
- package/dist/cjs/cli/commands/build.d.ts.map +1 -1
- package/dist/cjs/cli/commands/build.js +127 -37
- package/dist/cjs/cli/commands/build.js.map +1 -1
- package/dist/cjs/cli/commands/burner.d.ts.map +1 -1
- package/dist/cjs/cli/commands/burner.js +17 -11
- package/dist/cjs/cli/commands/burner.js.map +1 -1
- package/dist/cjs/cli/commands/check.d.ts.map +1 -1
- package/dist/cjs/cli/commands/check.js +25 -16
- package/dist/cjs/cli/commands/check.js.map +1 -1
- package/dist/cjs/cli/commands/deploy.js +4 -4
- package/dist/cjs/cli/commands/deploy.js.map +1 -1
- package/dist/cjs/cli/commands/preview.d.ts +8 -1
- package/dist/cjs/cli/commands/preview.d.ts.map +1 -1
- package/dist/cjs/cli/commands/preview.js +17 -16
- package/dist/cjs/cli/commands/preview.js.map +1 -1
- package/dist/cjs/cli/commands/preview.spec.js +18 -2
- package/dist/cjs/cli/commands/preview.spec.js.map +1 -1
- package/dist/cjs/cli/commands/simulate.d.ts +8 -1
- package/dist/cjs/cli/commands/simulate.d.ts.map +1 -1
- package/dist/cjs/cli/commands/simulate.js +22 -14
- package/dist/cjs/cli/commands/simulate.js.map +1 -1
- package/dist/cjs/cli/commands/simulate.spec.js +16 -0
- package/dist/cjs/cli/commands/simulate.spec.js.map +1 -1
- package/dist/cjs/cli/commands/tool.d.ts.map +1 -1
- package/dist/cjs/cli/commands/tool.js +10 -4
- package/dist/cjs/cli/commands/tool.js.map +1 -1
- package/dist/cjs/cli/integration/harness/chain.js +1 -1
- package/dist/cjs/cli/integration/harness/chain.js.map +1 -1
- package/dist/cjs/cli/utils/burner.d.ts.map +1 -1
- package/dist/cjs/cli/utils/burner.js +12 -6
- package/dist/cjs/cli/utils/burner.js.map +1 -1
- package/dist/cjs/cli/utils/deploy-options.js +2 -2
- package/dist/cjs/cli/utils/deploy-options.js.map +1 -1
- package/dist/cjs/cli/utils/envelope.d.ts.map +1 -1
- package/dist/cjs/cli/utils/envelope.js +1 -1
- package/dist/cjs/cli/utils/envelope.js.map +1 -1
- package/dist/cjs/cli/utils/envelope.spec.js +11 -0
- package/dist/cjs/cli/utils/envelope.spec.js.map +1 -1
- package/dist/cjs/cli/utils/fees.d.ts +7 -0
- package/dist/cjs/cli/utils/fees.d.ts.map +1 -0
- package/dist/cjs/cli/utils/fees.js +27 -0
- package/dist/cjs/cli/utils/fees.js.map +1 -0
- package/dist/cjs/cli/utils/fees.spec.d.ts +2 -0
- package/dist/cjs/cli/utils/fees.spec.d.ts.map +1 -0
- package/dist/cjs/cli/utils/fees.spec.js +23 -0
- package/dist/cjs/cli/utils/fees.spec.js.map +1 -0
- package/dist/cjs/cli/utils/keyring-command.js +2 -2
- package/dist/cjs/cli/utils/keyring-command.js.map +1 -1
- package/dist/cjs/cli/utils/keyring-command.spec.js +1 -0
- package/dist/cjs/cli/utils/keyring-command.spec.js.map +1 -1
- package/dist/cjs/cli/utils/next-step.d.ts.map +1 -1
- package/dist/cjs/cli/utils/next-step.js +3 -2
- package/dist/cjs/cli/utils/next-step.js.map +1 -1
- package/dist/cjs/cli/utils/txInput.d.ts +3 -0
- package/dist/cjs/cli/utils/txInput.d.ts.map +1 -0
- package/dist/cjs/cli/utils/txInput.js +26 -0
- package/dist/cjs/cli/utils/txInput.js.map +1 -0
- package/dist/cjs/cli/utils/txInput.spec.d.ts +2 -0
- package/dist/cjs/cli/utils/txInput.spec.d.ts.map +1 -0
- package/dist/cjs/cli/utils/txInput.spec.js +42 -0
- package/dist/cjs/cli/utils/txInput.spec.js.map +1 -0
- package/dist/cjs/core/audit.d.ts.map +1 -1
- package/dist/cjs/core/audit.js +4 -6
- package/dist/cjs/core/audit.js.map +1 -1
- package/dist/cjs/core/audit.spec.d.ts +2 -0
- package/dist/cjs/core/audit.spec.d.ts.map +1 -0
- package/dist/cjs/core/audit.spec.js +66 -0
- package/dist/cjs/core/audit.spec.js.map +1 -0
- package/dist/cjs/core/builders/builders.spec.js +228 -79
- package/dist/cjs/core/builders/builders.spec.js.map +1 -1
- package/dist/cjs/core/builders/shared.d.ts +23 -0
- package/dist/cjs/core/builders/shared.d.ts.map +1 -1
- package/dist/cjs/core/builders/shared.js +5 -1
- package/dist/cjs/core/builders/shared.js.map +1 -1
- package/dist/cjs/core/builders/subscription.d.ts +1 -0
- package/dist/cjs/core/builders/subscription.d.ts.map +1 -1
- package/dist/cjs/core/builders/subscription.js +6 -5
- package/dist/cjs/core/builders/subscription.js.map +1 -1
- package/dist/cjs/signing/BitBadgesSigningClient.d.ts.map +1 -1
- package/dist/cjs/signing/BitBadgesSigningClient.gas.spec.js +9 -0
- package/dist/cjs/signing/BitBadgesSigningClient.gas.spec.js.map +1 -1
- package/dist/cjs/signing/BitBadgesSigningClient.js +1 -1
- package/dist/cjs/signing/BitBadgesSigningClient.js.map +1 -1
- package/dist/cjs/tsconfig.build.tsbuildinfo +1 -1
- package/dist/esm/api-indexer/BitBadgesApi.d.ts +1 -7
- package/dist/esm/api-indexer/BitBadgesApi.d.ts.map +1 -1
- package/dist/esm/api-indexer/BitBadgesApi.js +7 -357
- package/dist/esm/api-indexer/BitBadgesApi.js.map +1 -1
- package/dist/esm/api-indexer/docs-types/docs.d.ts +1 -20
- package/dist/esm/api-indexer/docs-types/docs.d.ts.map +1 -1
- package/dist/esm/api-indexer/docs-types/docs.js +0 -37
- package/dist/esm/api-indexer/docs-types/docs.js.map +1 -1
- package/dist/esm/api-indexer/docs-types/interfaces.d.ts +0 -16
- package/dist/esm/api-indexer/docs-types/interfaces.d.ts.map +1 -1
- package/dist/esm/api-indexer/requests/requests.d.ts +1 -72
- package/dist/esm/api-indexer/requests/requests.d.ts.map +1 -1
- package/dist/esm/api-indexer/requests/requests.js +0 -34
- package/dist/esm/api-indexer/requests/requests.js.map +1 -1
- package/dist/esm/api-indexer/requests/routes.d.ts +0 -5
- package/dist/esm/api-indexer/requests/routes.d.ts.map +1 -1
- package/dist/esm/api-indexer/requests/routes.js +1 -6
- package/dist/esm/api-indexer/requests/routes.js.map +1 -1
- package/dist/esm/api-indexer/routes.spec.d.ts +2 -0
- package/dist/esm/api-indexer/routes.spec.d.ts.map +1 -0
- package/dist/esm/api-indexer/routes.spec.js +36 -0
- package/dist/esm/api-indexer/routes.spec.js.map +1 -0
- package/dist/esm/builder/agent/BitBadgesBuilderAgent.d.ts +0 -1
- package/dist/esm/builder/agent/BitBadgesBuilderAgent.d.ts.map +1 -1
- package/dist/esm/builder/agent/BitBadgesBuilderAgent.js +0 -4
- package/dist/esm/builder/agent/BitBadgesBuilderAgent.js.map +1 -1
- package/dist/esm/builder/agent/BitBadgesBuilderAgent.spec.js +1 -25
- package/dist/esm/builder/agent/BitBadgesBuilderAgent.spec.js.map +1 -1
- package/dist/esm/builder/agent/index.d.ts +1 -2
- package/dist/esm/builder/agent/index.d.ts.map +1 -1
- package/dist/esm/builder/agent/index.js +0 -1
- package/dist/esm/builder/agent/index.js.map +1 -1
- package/dist/esm/builder/agent/prompt.d.ts +3 -6
- package/dist/esm/builder/agent/prompt.d.ts.map +1 -1
- package/dist/esm/builder/agent/prompt.js +6 -31
- package/dist/esm/builder/agent/prompt.js.map +1 -1
- package/dist/esm/builder/agent/prompt.spec.js +1 -5
- package/dist/esm/builder/agent/prompt.spec.js.map +1 -1
- package/dist/esm/builder/agent/types.d.ts +0 -8
- package/dist/esm/builder/agent/types.d.ts.map +1 -1
- package/dist/esm/builder/resources/errorPatterns.js +2 -2
- package/dist/esm/builder/resources/errorPatterns.js.map +1 -1
- package/dist/esm/builder/resources/masterPrompt.js +2 -2
- package/dist/esm/builder/resources/masterPrompt.js.map +1 -1
- package/dist/esm/builder/resources/workflows.js +9 -9
- package/dist/esm/builder/resources/workflows.js.map +1 -1
- package/dist/esm/builder/sdk/apiClient.d.ts +1 -0
- package/dist/esm/builder/sdk/apiClient.d.ts.map +1 -1
- package/dist/esm/builder/sdk/apiClient.js +15 -4
- package/dist/esm/builder/sdk/apiClient.js.map +1 -1
- package/dist/esm/builder/sdk/apiClient.spec.d.ts +2 -0
- package/dist/esm/builder/sdk/apiClient.spec.d.ts.map +1 -0
- package/dist/esm/builder/sdk/apiClient.spec.js +20 -0
- package/dist/esm/builder/sdk/apiClient.spec.js.map +1 -0
- package/dist/esm/builder/server.d.ts +1 -0
- package/dist/esm/builder/server.d.ts.map +1 -1
- package/dist/esm/builder/server.js +19 -1
- package/dist/esm/builder/server.js.map +1 -1
- package/dist/esm/builder/server.spec.js +25 -1
- package/dist/esm/builder/server.spec.js.map +1 -1
- package/dist/esm/builder/session/sessionState.creator.spec.d.ts +2 -0
- package/dist/esm/builder/session/sessionState.creator.spec.d.ts.map +1 -0
- package/dist/esm/builder/session/sessionState.creator.spec.js +24 -0
- package/dist/esm/builder/session/sessionState.creator.spec.js.map +1 -0
- package/dist/esm/builder/session/sessionState.d.ts.map +1 -1
- package/dist/esm/builder/session/sessionState.js +8 -1
- package/dist/esm/builder/session/sessionState.js.map +1 -1
- package/dist/esm/builder/tools/queries/buildDynamicStore.fees.spec.d.ts +2 -0
- package/dist/esm/builder/tools/queries/buildDynamicStore.fees.spec.d.ts.map +1 -0
- package/dist/esm/builder/tools/queries/buildDynamicStore.fees.spec.js +11 -0
- package/dist/esm/builder/tools/queries/buildDynamicStore.fees.spec.js.map +1 -0
- package/dist/esm/builder/tools/queries/buildDynamicStore.js +5 -5
- package/dist/esm/builder/tools/queries/buildDynamicStore.js.map +1 -1
- package/dist/esm/builder/tools/queries/buildTransfer.js +1 -1
- package/dist/esm/builder/tools/queries/buildTransfer.js.map +1 -1
- package/dist/esm/builder/tools/queries/simulateTransaction.js +1 -1
- package/dist/esm/builder/tools/queries/simulateTransaction.js.map +1 -1
- package/dist/esm/builder/tools/registry.d.ts.map +1 -1
- package/dist/esm/builder/tools/registry.js +5 -2
- package/dist/esm/builder/tools/registry.js.map +1 -1
- package/dist/esm/builder/tools/registry.spec.js +26 -0
- package/dist/esm/builder/tools/registry.spec.js.map +1 -1
- package/dist/esm/builder/tools/session/addAliasPath.js +2 -2
- package/dist/esm/builder/tools/session/addAliasPath.js.map +1 -1
- package/dist/esm/builder/tools/session/addApproval.js +2 -2
- package/dist/esm/builder/tools/session/addApproval.js.map +1 -1
- package/dist/esm/builder/tools/session/addCosmosWrapperPath.js +2 -2
- package/dist/esm/builder/tools/session/addCosmosWrapperPath.js.map +1 -1
- package/dist/esm/builder/tools/session/index.d.ts +1 -0
- package/dist/esm/builder/tools/session/index.d.ts.map +1 -1
- package/dist/esm/builder/tools/session/index.js +1 -0
- package/dist/esm/builder/tools/session/index.js.map +1 -1
- package/dist/esm/builder/tools/session/resetSession.d.ts +27 -0
- package/dist/esm/builder/tools/session/resetSession.d.ts.map +1 -0
- package/dist/esm/builder/tools/session/resetSession.js +23 -0
- package/dist/esm/builder/tools/session/resetSession.js.map +1 -0
- package/dist/esm/builder/tools/session/setCollectionMetadata.d.ts +1 -0
- package/dist/esm/builder/tools/session/setCollectionMetadata.d.ts.map +1 -1
- package/dist/esm/builder/tools/session/setCollectionMetadata.js +2 -2
- package/dist/esm/builder/tools/session/setCollectionMetadata.js.map +1 -1
- package/dist/esm/builder/tools/session/setTokenMetadata.d.ts +1 -0
- package/dist/esm/builder/tools/session/setTokenMetadata.d.ts.map +1 -1
- package/dist/esm/builder/tools/session/setTokenMetadata.js +2 -2
- package/dist/esm/builder/tools/session/setTokenMetadata.js.map +1 -1
- package/dist/esm/cli/commands/api-routes.d.ts.map +1 -1
- package/dist/esm/cli/commands/api-routes.js +0 -83
- package/dist/esm/cli/commands/api-routes.js.map +1 -1
- package/dist/esm/cli/commands/build.d.ts.map +1 -1
- package/dist/esm/cli/commands/build.js +127 -37
- package/dist/esm/cli/commands/build.js.map +1 -1
- package/dist/esm/cli/commands/burner.d.ts.map +1 -1
- package/dist/esm/cli/commands/burner.js +17 -11
- package/dist/esm/cli/commands/burner.js.map +1 -1
- package/dist/esm/cli/commands/check.d.ts.map +1 -1
- package/dist/esm/cli/commands/check.js +24 -15
- package/dist/esm/cli/commands/check.js.map +1 -1
- package/dist/esm/cli/commands/deploy.js +4 -4
- package/dist/esm/cli/commands/deploy.js.map +1 -1
- package/dist/esm/cli/commands/preview.d.ts +8 -1
- package/dist/esm/cli/commands/preview.d.ts.map +1 -1
- package/dist/esm/cli/commands/preview.js +14 -13
- package/dist/esm/cli/commands/preview.js.map +1 -1
- package/dist/esm/cli/commands/preview.spec.js +19 -3
- package/dist/esm/cli/commands/preview.spec.js.map +1 -1
- package/dist/esm/cli/commands/simulate.d.ts +8 -1
- package/dist/esm/cli/commands/simulate.d.ts.map +1 -1
- package/dist/esm/cli/commands/simulate.js +19 -11
- package/dist/esm/cli/commands/simulate.js.map +1 -1
- package/dist/esm/cli/commands/simulate.spec.js +17 -1
- package/dist/esm/cli/commands/simulate.spec.js.map +1 -1
- package/dist/esm/cli/commands/tool.d.ts.map +1 -1
- package/dist/esm/cli/commands/tool.js +10 -4
- package/dist/esm/cli/commands/tool.js.map +1 -1
- package/dist/esm/cli/integration/harness/chain.js +1 -1
- package/dist/esm/cli/integration/harness/chain.js.map +1 -1
- package/dist/esm/cli/utils/burner.d.ts.map +1 -1
- package/dist/esm/cli/utils/burner.js +12 -6
- package/dist/esm/cli/utils/burner.js.map +1 -1
- package/dist/esm/cli/utils/deploy-options.js +2 -2
- package/dist/esm/cli/utils/deploy-options.js.map +1 -1
- package/dist/esm/cli/utils/envelope.d.ts.map +1 -1
- package/dist/esm/cli/utils/envelope.js +1 -1
- package/dist/esm/cli/utils/envelope.js.map +1 -1
- package/dist/esm/cli/utils/envelope.spec.js +11 -0
- package/dist/esm/cli/utils/envelope.spec.js.map +1 -1
- package/dist/esm/cli/utils/fees.d.ts +7 -0
- package/dist/esm/cli/utils/fees.d.ts.map +1 -0
- package/dist/esm/cli/utils/fees.js +23 -0
- package/dist/esm/cli/utils/fees.js.map +1 -0
- package/dist/esm/cli/utils/fees.spec.d.ts +2 -0
- package/dist/esm/cli/utils/fees.spec.d.ts.map +1 -0
- package/dist/esm/cli/utils/fees.spec.js +21 -0
- package/dist/esm/cli/utils/fees.spec.js.map +1 -0
- package/dist/esm/cli/utils/keyring-command.js +2 -2
- package/dist/esm/cli/utils/keyring-command.js.map +1 -1
- package/dist/esm/cli/utils/keyring-command.spec.js +1 -0
- package/dist/esm/cli/utils/keyring-command.spec.js.map +1 -1
- package/dist/esm/cli/utils/next-step.d.ts.map +1 -1
- package/dist/esm/cli/utils/next-step.js +3 -2
- package/dist/esm/cli/utils/next-step.js.map +1 -1
- package/dist/esm/cli/utils/txInput.d.ts +3 -0
- package/dist/esm/cli/utils/txInput.d.ts.map +1 -0
- package/dist/esm/cli/utils/txInput.js +22 -0
- package/dist/esm/cli/utils/txInput.js.map +1 -0
- package/dist/esm/cli/utils/txInput.spec.d.ts +2 -0
- package/dist/esm/cli/utils/txInput.spec.d.ts.map +1 -0
- package/dist/esm/cli/utils/txInput.spec.js +40 -0
- package/dist/esm/cli/utils/txInput.spec.js.map +1 -0
- package/dist/esm/core/audit.d.ts.map +1 -1
- package/dist/esm/core/audit.js +4 -6
- package/dist/esm/core/audit.js.map +1 -1
- package/dist/esm/core/audit.spec.d.ts +2 -0
- package/dist/esm/core/audit.spec.d.ts.map +1 -0
- package/dist/esm/core/audit.spec.js +64 -0
- package/dist/esm/core/audit.spec.js.map +1 -0
- package/dist/esm/core/builders/builders.spec.js +228 -79
- package/dist/esm/core/builders/builders.spec.js.map +1 -1
- package/dist/esm/core/builders/shared.d.ts +23 -0
- package/dist/esm/core/builders/shared.d.ts.map +1 -1
- package/dist/esm/core/builders/shared.js +4 -1
- package/dist/esm/core/builders/shared.js.map +1 -1
- package/dist/esm/core/builders/subscription.d.ts +1 -0
- package/dist/esm/core/builders/subscription.d.ts.map +1 -1
- package/dist/esm/core/builders/subscription.js +7 -6
- package/dist/esm/core/builders/subscription.js.map +1 -1
- package/dist/esm/signing/BitBadgesSigningClient.d.ts.map +1 -1
- package/dist/esm/signing/BitBadgesSigningClient.gas.spec.js +9 -0
- package/dist/esm/signing/BitBadgesSigningClient.gas.spec.js.map +1 -1
- package/dist/esm/signing/BitBadgesSigningClient.js +1 -1
- package/dist/esm/signing/BitBadgesSigningClient.js.map +1 -1
- package/dist/esm/tsconfig-esm.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/cjs/builder/agent/communitySkills.d.ts +0 -9
- package/dist/cjs/builder/agent/communitySkills.d.ts.map +0 -1
- package/dist/cjs/builder/agent/communitySkills.js +0 -61
- package/dist/cjs/builder/agent/communitySkills.js.map +0 -1
- package/dist/cjs/builder/agent/communitySkills.spec.d.ts +0 -2
- package/dist/cjs/builder/agent/communitySkills.spec.d.ts.map +0 -1
- package/dist/cjs/builder/agent/communitySkills.spec.js +0 -130
- package/dist/cjs/builder/agent/communitySkills.spec.js.map +0 -1
- package/dist/esm/builder/agent/communitySkills.d.ts +0 -9
- package/dist/esm/builder/agent/communitySkills.d.ts.map +0 -1
- package/dist/esm/builder/agent/communitySkills.js +0 -58
- package/dist/esm/builder/agent/communitySkills.js.map +0 -1
- package/dist/esm/builder/agent/communitySkills.spec.d.ts +0 -2
- package/dist/esm/builder/agent/communitySkills.spec.d.ts.map +0 -1
- package/dist/esm/builder/agent/communitySkills.spec.js +0 -128
- package/dist/esm/builder/agent/communitySkills.spec.js.map +0 -1
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const verify_standards_js_1 = require("../../api-indexer/verify-standards.js");
|
|
4
4
|
const vault_js_1 = require("./vault.js");
|
|
5
5
|
const subscription_js_1 = require("./subscription.js");
|
|
6
|
+
const review_js_1 = require("../review.js");
|
|
6
7
|
const bounty_js_1 = require("./bounty.js");
|
|
7
8
|
const payment_request_js_1 = require("./payment-request.js");
|
|
8
9
|
const crowdfund_js_1 = require("./crowdfund.js");
|
|
@@ -33,11 +34,7 @@ function verifyBuilder(msg) {
|
|
|
33
34
|
}
|
|
34
35
|
function trackedIds(msg) {
|
|
35
36
|
const v = msg.value ?? msg;
|
|
36
|
-
const approvals = [
|
|
37
|
-
...(v.collectionApprovals ?? []),
|
|
38
|
-
...(v.incomingApprovals ?? []),
|
|
39
|
-
...(v.outgoingApprovals ?? [])
|
|
40
|
-
];
|
|
37
|
+
const approvals = [...(v.collectionApprovals ?? []), ...(v.incomingApprovals ?? []), ...(v.outgoingApprovals ?? [])];
|
|
41
38
|
const ids = [];
|
|
42
39
|
for (const a of approvals) {
|
|
43
40
|
if (a?.approvalId)
|
|
@@ -208,7 +205,9 @@ describe('vault builder', () => {
|
|
|
208
205
|
describe('smart-token builder', () => {
|
|
209
206
|
const msg = (0, smart_token_js_1.buildSmartToken)({ backingCoin: 'USDC', ...META });
|
|
210
207
|
const r = val(msg);
|
|
211
|
-
test('has Smart Token standard', () => {
|
|
208
|
+
test('has Smart Token standard', () => {
|
|
209
|
+
expect(r.standards).toContain('Smart Token');
|
|
210
|
+
});
|
|
212
211
|
test('has deposit and withdraw approvals', () => {
|
|
213
212
|
const ids = r.collectionApprovals.map((a) => a.approvalId);
|
|
214
213
|
expect(ids).toContain('smart-token-deposit');
|
|
@@ -233,7 +232,42 @@ describe('smart-token builder', () => {
|
|
|
233
232
|
describe('subscription builder', () => {
|
|
234
233
|
const msg = (0, subscription_js_1.buildSubscription)({ interval: 'monthly', price: 10, denom: 'USDC', recipient: 'bb1test', ...META });
|
|
235
234
|
const r = val(msg);
|
|
236
|
-
|
|
235
|
+
describe('passes its own review by default', () => {
|
|
236
|
+
test('locks the Mint-scoped approval permission forever, leaving other approvals editable', () => {
|
|
237
|
+
const perms = r.collectionPermissions.canUpdateCollectionApprovals;
|
|
238
|
+
const mintLock = perms.find((p) => p.fromListId === 'Mint');
|
|
239
|
+
expect(mintLock).toBeDefined();
|
|
240
|
+
expect(mintLock.permanentlyForbiddenTimes).toEqual([{ start: '1', end: '18446744073709551615' }]);
|
|
241
|
+
expect(mintLock.permanentlyPermittedTimes).toEqual([]);
|
|
242
|
+
expect(perms.some((p) => p.fromListId === 'All')).toBe(false);
|
|
243
|
+
});
|
|
244
|
+
test('blocks forceful post-mint transfers at creation', () => {
|
|
245
|
+
expect(r.invariants.noForcefulPostMintTransfers).toBe(true);
|
|
246
|
+
});
|
|
247
|
+
test('review reports zero critical findings', () => {
|
|
248
|
+
const review = (0, review_js_1.reviewCollection)(msg);
|
|
249
|
+
const criticals = review.findings.filter((f) => f.severity === 'critical').map((f) => f.code);
|
|
250
|
+
expect(criticals).toEqual([]);
|
|
251
|
+
});
|
|
252
|
+
});
|
|
253
|
+
describe('updatableMint opt-out', () => {
|
|
254
|
+
const open = val((0, subscription_js_1.buildSubscription)({ interval: 'monthly', price: 10, denom: 'USDC', recipient: 'bb1test', updatableMint: true, ...META }));
|
|
255
|
+
test('leaves mint approvals neutral so the price can change later', () => {
|
|
256
|
+
expect(open.collectionPermissions.canUpdateCollectionApprovals.some((p) => p.fromListId === 'Mint')).toBe(false);
|
|
257
|
+
});
|
|
258
|
+
test('still blocks forceful transfers; that is a separate concern', () => {
|
|
259
|
+
expect(open.invariants.noForcefulPostMintTransfers).toBe(true);
|
|
260
|
+
});
|
|
261
|
+
test('the review surfaces the choice as the critical it is', () => {
|
|
262
|
+
const criticals = (0, review_js_1.reviewCollection)((0, subscription_js_1.buildSubscription)({ interval: 'monthly', price: 10, denom: 'USDC', recipient: 'bb1test', updatableMint: true, ...META }))
|
|
263
|
+
.findings.filter((f) => f.severity === 'critical')
|
|
264
|
+
.map((f) => f.code);
|
|
265
|
+
expect(criticals.some((c) => /mint_approvals/.test(c))).toBe(true);
|
|
266
|
+
});
|
|
267
|
+
});
|
|
268
|
+
test('has Subscriptions standard', () => {
|
|
269
|
+
expect(r.standards).toEqual(['Subscriptions']);
|
|
270
|
+
});
|
|
237
271
|
test('has durationFromTimestamp', () => {
|
|
238
272
|
const ib = r.collectionApprovals[0].approvalCriteria.predeterminedBalances.incrementedBalances;
|
|
239
273
|
expect(ib.durationFromTimestamp).toBe('2592000000');
|
|
@@ -242,7 +276,9 @@ describe('subscription builder', () => {
|
|
|
242
276
|
test('coin transfer to recipient', () => {
|
|
243
277
|
expect(r.collectionApprovals[0].approvalCriteria.coinTransfers[0].to).toBe('bb1test');
|
|
244
278
|
});
|
|
245
|
-
test('noCustomOwnershipTimes is false', () => {
|
|
279
|
+
test('noCustomOwnershipTimes is false', () => {
|
|
280
|
+
expect(r.invariants.noCustomOwnershipTimes).toBe(false);
|
|
281
|
+
});
|
|
246
282
|
test('multi-tier', () => {
|
|
247
283
|
const mt = val((0, subscription_js_1.buildSubscription)({ interval: 'monthly', price: 10, denom: 'USDC', recipient: 'bb1test', tiers: 3, ...META }));
|
|
248
284
|
expect(mt.validTokenIds).toEqual([{ start: '1', end: '3' }]);
|
|
@@ -272,8 +308,7 @@ describe('subscription builder', () => {
|
|
|
272
308
|
})).toThrow(/single denom/);
|
|
273
309
|
});
|
|
274
310
|
test('deterministic — identical params produce byte-identical msg', () => {
|
|
275
|
-
expect((0, subscription_js_1.buildSubscription)({ interval: 'monthly', price: 10, denom: 'USDC', recipient: 'bb1test', ...META }))
|
|
276
|
-
.toEqual((0, subscription_js_1.buildSubscription)({ interval: 'monthly', price: 10, denom: 'USDC', recipient: 'bb1test', ...META }));
|
|
311
|
+
expect((0, subscription_js_1.buildSubscription)({ interval: 'monthly', price: 10, denom: 'USDC', recipient: 'bb1test', ...META })).toEqual((0, subscription_js_1.buildSubscription)({ interval: 'monthly', price: 10, denom: 'USDC', recipient: 'bb1test', ...META }));
|
|
277
312
|
});
|
|
278
313
|
test('passes verification with zero violations (any standard)', () => {
|
|
279
314
|
expectCleanVerification(msg);
|
|
@@ -282,7 +317,9 @@ describe('subscription builder', () => {
|
|
|
282
317
|
describe('bounty builder', () => {
|
|
283
318
|
const msg = (0, bounty_js_1.buildBounty)({ amount: 100, denom: 'USDC', verifier: 'bb1verifier', recipient: 'bb1recipient', submitter: 'bb1submitter', ...META });
|
|
284
319
|
const r = val(msg);
|
|
285
|
-
test('has Bounty standard', () => {
|
|
320
|
+
test('has Bounty standard', () => {
|
|
321
|
+
expect(r.standards).toEqual(['Bounty']);
|
|
322
|
+
});
|
|
286
323
|
test('3 approvals', () => {
|
|
287
324
|
expect(r.collectionApprovals.length).toBe(3);
|
|
288
325
|
const ids = r.collectionApprovals.map((a) => a.approvalId);
|
|
@@ -307,8 +344,7 @@ describe('bounty builder', () => {
|
|
|
307
344
|
expect(pid(a, 'bounty-deny')).toBe(pid(b, 'bounty-deny'));
|
|
308
345
|
expect(pid(a, 'bounty-accept')).not.toBe(pid(a, 'bounty-deny'));
|
|
309
346
|
expect(pid(a, 'bounty-accept').startsWith('bounty-accept-')).toBe(true);
|
|
310
|
-
expect(pid(val((0, bounty_js_1.buildBounty)({ ...p, amount: 101 })).collectionApprovals, 'bounty-accept'))
|
|
311
|
-
.not.toBe(pid(a, 'bounty-accept'));
|
|
347
|
+
expect(pid(val((0, bounty_js_1.buildBounty)({ ...p, amount: 101 })).collectionApprovals, 'bounty-accept')).not.toBe(pid(a, 'bounty-accept'));
|
|
312
348
|
});
|
|
313
349
|
test('deterministic — whole msg byte-identical with the Date.now expiry window normalized out', () => {
|
|
314
350
|
const p = { amount: 100, denom: 'USDC', verifier: 'bb1v', recipient: 'bb1r', submitter: 'bb1s', ...META };
|
|
@@ -334,7 +370,9 @@ describe('payment-request builder', () => {
|
|
|
334
370
|
image: 'ipfs://test-image'
|
|
335
371
|
});
|
|
336
372
|
const r = val(msg);
|
|
337
|
-
test('has PaymentRequest standard', () => {
|
|
373
|
+
test('has PaymentRequest standard', () => {
|
|
374
|
+
expect(r.standards).toEqual(['PaymentRequest']);
|
|
375
|
+
});
|
|
338
376
|
test('2 approvals (pay + deny — no expire branch)', () => {
|
|
339
377
|
expect(r.collectionApprovals.length).toBe(2);
|
|
340
378
|
const ids = r.collectionApprovals.map((a) => a.approvalId);
|
|
@@ -362,7 +400,15 @@ describe('payment-request builder', () => {
|
|
|
362
400
|
}
|
|
363
401
|
});
|
|
364
402
|
test('deterministic approval ids (no random ids; time window aside)', () => {
|
|
365
|
-
const prParams = {
|
|
403
|
+
const prParams = {
|
|
404
|
+
amount: 10,
|
|
405
|
+
denom: 'USDC',
|
|
406
|
+
payer: 'bb1payer',
|
|
407
|
+
recipient: 'bb1recipient',
|
|
408
|
+
context: 'ctx',
|
|
409
|
+
name: 'Test',
|
|
410
|
+
image: 'ipfs://test-image'
|
|
411
|
+
};
|
|
366
412
|
const ids = (m) => m.value.collectionApprovals.map((a) => a.approvalId);
|
|
367
413
|
expect(ids((0, payment_request_js_1.buildPaymentRequest)(prParams))).toEqual(ids((0, payment_request_js_1.buildPaymentRequest)(prParams)));
|
|
368
414
|
});
|
|
@@ -374,9 +420,15 @@ describe('crowdfund builder', () => {
|
|
|
374
420
|
const params = { goal: 1000, denom: 'USDC', crowdfunder: 'bb1fund', ...META };
|
|
375
421
|
const msg = (0, crowdfund_js_1.buildCrowdfund)(params);
|
|
376
422
|
const r = val(msg);
|
|
377
|
-
test('has Crowdfund standard', () => {
|
|
378
|
-
|
|
379
|
-
|
|
423
|
+
test('has Crowdfund standard', () => {
|
|
424
|
+
expect(r.standards).toEqual(['Crowdfund']);
|
|
425
|
+
});
|
|
426
|
+
test('2 token IDs', () => {
|
|
427
|
+
expect(r.validTokenIds).toEqual([{ start: '1', end: '2' }]);
|
|
428
|
+
});
|
|
429
|
+
test('at least 4 approvals', () => {
|
|
430
|
+
expect(r.collectionApprovals.length).toBeGreaterThanOrEqual(4);
|
|
431
|
+
});
|
|
380
432
|
test('crowdfunder address used', () => {
|
|
381
433
|
const progress = r.collectionApprovals.find((a) => a.approvalId === 'deposit-progress');
|
|
382
434
|
expect(progress.toListId).toBe('bb1fund');
|
|
@@ -398,10 +450,8 @@ describe('crowdfund builder', () => {
|
|
|
398
450
|
test('deterministic — stable ids + payout gate across calls', () => {
|
|
399
451
|
const a = val((0, crowdfund_js_1.buildCrowdfund)(params));
|
|
400
452
|
const b = val((0, crowdfund_js_1.buildCrowdfund)(params));
|
|
401
|
-
expect(a.collectionApprovals.map((x) => x.approvalId))
|
|
402
|
-
|
|
403
|
-
expect(a.collectionApprovals.find((x) => x.approvalId === 'refund').approvalCriteria.mustOwnTokens[0].ownershipCheckParty)
|
|
404
|
-
.toBe(b.collectionApprovals.find((x) => x.approvalId === 'refund').approvalCriteria.mustOwnTokens[0].ownershipCheckParty);
|
|
453
|
+
expect(a.collectionApprovals.map((x) => x.approvalId)).toEqual(b.collectionApprovals.map((x) => x.approvalId));
|
|
454
|
+
expect(a.collectionApprovals.find((x) => x.approvalId === 'refund').approvalCriteria.mustOwnTokens[0].ownershipCheckParty).toBe(b.collectionApprovals.find((x) => x.approvalId === 'refund').approvalCriteria.mustOwnTokens[0].ownershipCheckParty);
|
|
405
455
|
});
|
|
406
456
|
test('passes verification with zero violations', () => {
|
|
407
457
|
expectCleanVerification(msg);
|
|
@@ -410,7 +460,9 @@ describe('crowdfund builder', () => {
|
|
|
410
460
|
describe('auction builder', () => {
|
|
411
461
|
const msg = (0, auction_js_1.buildAuction)({ ...META });
|
|
412
462
|
const r = val(msg);
|
|
413
|
-
test('has Auction standard', () => {
|
|
463
|
+
test('has Auction standard', () => {
|
|
464
|
+
expect(r.standards).toEqual(['Auction']);
|
|
465
|
+
});
|
|
414
466
|
test('bounded transfer times', () => {
|
|
415
467
|
const mint = r.collectionApprovals.find((a) => a.fromListId === 'Mint');
|
|
416
468
|
expect(mint.transferTimes[0].start).not.toBe('1');
|
|
@@ -421,9 +473,7 @@ describe('auction builder', () => {
|
|
|
421
473
|
});
|
|
422
474
|
test('deterministic approval ids — no Math.random', () => {
|
|
423
475
|
expect(trackedIds((0, auction_js_1.buildAuction)({ ...META }))).toEqual(trackedIds((0, auction_js_1.buildAuction)({ ...META })));
|
|
424
|
-
expect(r.collectionApprovals.map((a) => a.approvalId)).toEqual([
|
|
425
|
-
'auction-mint-to-winner', 'auction-burn'
|
|
426
|
-
]);
|
|
476
|
+
expect(r.collectionApprovals.map((a) => a.approvalId)).toEqual(['auction-mint-to-winner', 'auction-burn']);
|
|
427
477
|
});
|
|
428
478
|
test('passes verification with zero violations', () => {
|
|
429
479
|
expectCleanVerification(msg);
|
|
@@ -431,14 +481,23 @@ describe('auction builder', () => {
|
|
|
431
481
|
});
|
|
432
482
|
describe('product-catalog builder', () => {
|
|
433
483
|
const msg = (0, product_catalog_js_1.buildProductCatalog)({
|
|
434
|
-
products: [
|
|
484
|
+
products: [
|
|
485
|
+
{ name: 'T-Shirt', price: 25, denom: 'USDC' },
|
|
486
|
+
{ name: 'Mug', price: 15, denom: 'USDC', maxSupply: 50 }
|
|
487
|
+
],
|
|
435
488
|
storeAddress: 'bb1store',
|
|
436
489
|
...META
|
|
437
490
|
});
|
|
438
491
|
const r = val(msg);
|
|
439
|
-
test('has Products standard', () => {
|
|
440
|
-
|
|
441
|
-
|
|
492
|
+
test('has Products standard', () => {
|
|
493
|
+
expect(r.standards).toEqual(['Products']);
|
|
494
|
+
});
|
|
495
|
+
test('correct token IDs', () => {
|
|
496
|
+
expect(r.validTokenIds).toEqual([{ start: '1', end: '2' }]);
|
|
497
|
+
});
|
|
498
|
+
test('purchase + burn approvals', () => {
|
|
499
|
+
expect(r.collectionApprovals.length).toBe(3);
|
|
500
|
+
});
|
|
442
501
|
test('coin transfers to store', () => {
|
|
443
502
|
for (const p of r.collectionApprovals.filter((a) => a.fromListId === 'Mint')) {
|
|
444
503
|
expect(p.approvalCriteria.coinTransfers[0].to).toBe('bb1store');
|
|
@@ -446,16 +505,17 @@ describe('product-catalog builder', () => {
|
|
|
446
505
|
});
|
|
447
506
|
test('deterministic — identical params produce a byte-identical msg', () => {
|
|
448
507
|
const p = {
|
|
449
|
-
products: [
|
|
508
|
+
products: [
|
|
509
|
+
{ name: 'T-Shirt', price: 25, denom: 'USDC' },
|
|
510
|
+
{ name: 'Mug', price: 15, denom: 'USDC', maxSupply: 50 }
|
|
511
|
+
],
|
|
450
512
|
storeAddress: 'bb1store',
|
|
451
513
|
...META
|
|
452
514
|
};
|
|
453
515
|
expect((0, product_catalog_js_1.buildProductCatalog)(p)).toEqual((0, product_catalog_js_1.buildProductCatalog)(p));
|
|
454
516
|
});
|
|
455
517
|
test('purchase ids are 1-based index, burn id is stable', () => {
|
|
456
|
-
expect(r.collectionApprovals.map((a) => a.approvalId)).toEqual([
|
|
457
|
-
'product-purchase-1', 'product-purchase-2', 'product-burn'
|
|
458
|
-
]);
|
|
518
|
+
expect(r.collectionApprovals.map((a) => a.approvalId)).toEqual(['product-purchase-1', 'product-purchase-2', 'product-burn']);
|
|
459
519
|
});
|
|
460
520
|
test('passes verification with zero violations', () => {
|
|
461
521
|
expectCleanVerification(msg);
|
|
@@ -463,31 +523,39 @@ describe('product-catalog builder', () => {
|
|
|
463
523
|
test('maxSupply: present cap emits overallMaxNumTransfers; omitted = unlimited', () => {
|
|
464
524
|
const cap = val((0, product_catalog_js_1.buildProductCatalog)({
|
|
465
525
|
products: [{ name: 'Capped', price: 1, denom: 'USDC', maxSupply: 50 }],
|
|
466
|
-
storeAddress: 'bb1store',
|
|
526
|
+
storeAddress: 'bb1store',
|
|
527
|
+
...META
|
|
467
528
|
})).collectionApprovals.find((a) => a.approvalId === 'product-purchase-1');
|
|
468
529
|
expect(cap.approvalCriteria.maxNumTransfers.overallMaxNumTransfers).toBe('50');
|
|
469
530
|
const unlimited = val((0, product_catalog_js_1.buildProductCatalog)({
|
|
470
531
|
products: [{ name: 'Unl', price: 1, denom: 'USDC' }],
|
|
471
|
-
storeAddress: 'bb1store',
|
|
532
|
+
storeAddress: 'bb1store',
|
|
533
|
+
...META
|
|
472
534
|
})).collectionApprovals.find((a) => a.approvalId === 'product-purchase-1');
|
|
473
535
|
expect(unlimited.approvalCriteria.maxNumTransfers.overallMaxNumTransfers).toBe('0');
|
|
474
536
|
});
|
|
475
537
|
test('maxSupply: rejects negative / non-integer instead of silently going unlimited', () => {
|
|
476
538
|
expect(() => (0, product_catalog_js_1.buildProductCatalog)({
|
|
477
539
|
products: [{ name: 'Bad', price: 1, denom: 'USDC', maxSupply: -1 }],
|
|
478
|
-
storeAddress: 'bb1store',
|
|
540
|
+
storeAddress: 'bb1store',
|
|
541
|
+
...META
|
|
479
542
|
})).toThrow(/maxSupply/i);
|
|
480
543
|
expect(() => (0, product_catalog_js_1.buildProductCatalog)({
|
|
481
544
|
products: [{ name: 'Bad', price: 1, denom: 'USDC', maxSupply: 1.5 }],
|
|
482
|
-
storeAddress: 'bb1store',
|
|
545
|
+
storeAddress: 'bb1store',
|
|
546
|
+
...META
|
|
483
547
|
})).toThrow(/maxSupply/i);
|
|
484
548
|
});
|
|
485
549
|
});
|
|
486
550
|
describe('prediction-market builder', () => {
|
|
487
551
|
const msg = (0, prediction_market_js_1.buildPredictionMarket)({ verifier: 'bb1verifier', ...META });
|
|
488
552
|
const r = val(msg);
|
|
489
|
-
test('has Prediction Market standard', () => {
|
|
490
|
-
|
|
553
|
+
test('has Prediction Market standard', () => {
|
|
554
|
+
expect(r.standards).toEqual(['Prediction Market']);
|
|
555
|
+
});
|
|
556
|
+
test('YES/NO tokens', () => {
|
|
557
|
+
expect(r.validTokenIds).toEqual([{ start: '1', end: '2' }]);
|
|
558
|
+
});
|
|
491
559
|
test('alias paths', () => {
|
|
492
560
|
expect(r.aliasPathsToAdd.length).toBe(2);
|
|
493
561
|
expect(r.aliasPathsToAdd.map((a) => a.denom)).toContain('uyes');
|
|
@@ -524,13 +592,14 @@ describe('prediction-market builder', () => {
|
|
|
524
592
|
describe('credit-token builder', () => {
|
|
525
593
|
const msg = (0, credit_token_js_1.buildCreditToken)({ paymentDenom: 'USDC', recipient: 'bb1recipient', ...META });
|
|
526
594
|
const r = val(msg);
|
|
527
|
-
test('has Credit Token standard', () => {
|
|
595
|
+
test('has Credit Token standard', () => {
|
|
596
|
+
expect(r.standards).toEqual(['Credit Token']);
|
|
597
|
+
});
|
|
528
598
|
test('amount scaling', () => {
|
|
529
599
|
expect(r.collectionApprovals[0].approvalCriteria.predeterminedBalances.incrementedBalances.allowAmountScaling).toBe(true);
|
|
530
600
|
});
|
|
531
601
|
test('deterministic — identical params produce byte-identical msg', () => {
|
|
532
|
-
expect((0, credit_token_js_1.buildCreditToken)({ paymentDenom: 'USDC', recipient: 'bb1recipient', ...META }))
|
|
533
|
-
.toEqual((0, credit_token_js_1.buildCreditToken)({ paymentDenom: 'USDC', recipient: 'bb1recipient', ...META }));
|
|
602
|
+
expect((0, credit_token_js_1.buildCreditToken)({ paymentDenom: 'USDC', recipient: 'bb1recipient', ...META })).toEqual((0, credit_token_js_1.buildCreditToken)({ paymentDenom: 'USDC', recipient: 'bb1recipient', ...META }));
|
|
534
603
|
});
|
|
535
604
|
test('passes verification with zero violations (any standard)', () => {
|
|
536
605
|
expectCleanVerification(msg);
|
|
@@ -540,9 +609,15 @@ describe('custom-2fa builder', () => {
|
|
|
540
609
|
const META2FA = { name: 'My 2FA Token', description: 'A 2FA token for testing.', image: 'ipfs://test-image' };
|
|
541
610
|
const msg = (0, custom_2fa_js_1.buildCustom2FA)({ ...META2FA, creator: 'bb1manager' });
|
|
542
611
|
const r = val(msg);
|
|
543
|
-
test('has Custom-2FA standard', () => {
|
|
544
|
-
|
|
545
|
-
|
|
612
|
+
test('has Custom-2FA standard', () => {
|
|
613
|
+
expect(r.standards).toEqual(['Custom-2FA']);
|
|
614
|
+
});
|
|
615
|
+
test('allowPurgeIfExpired', () => {
|
|
616
|
+
expect(r.collectionApprovals[0].approvalCriteria.autoDeletionOptions.allowPurgeIfExpired).toBe(true);
|
|
617
|
+
});
|
|
618
|
+
test('disablePoolCreation', () => {
|
|
619
|
+
expect(r.invariants.disablePoolCreation).toBe(true);
|
|
620
|
+
});
|
|
546
621
|
test('burnable adds burn approval', () => {
|
|
547
622
|
expect(val((0, custom_2fa_js_1.buildCustom2FA)({ ...META2FA, creator: 'bb1manager', burnable: true })).collectionApprovals.length).toBe(2);
|
|
548
623
|
});
|
|
@@ -603,8 +678,12 @@ describe('mintCustom2FA (mint-side expiry helper, ticket 0407)', () => {
|
|
|
603
678
|
describe('quests builder', () => {
|
|
604
679
|
const msg = (0, quests_js_1.buildQuests)({ reward: 10, denom: 'BADGE', maxClaims: 100, ...META });
|
|
605
680
|
const r = val(msg);
|
|
606
|
-
test('has Quests standard', () => {
|
|
607
|
-
|
|
681
|
+
test('has Quests standard', () => {
|
|
682
|
+
expect(r.standards).toEqual(['Quests']);
|
|
683
|
+
});
|
|
684
|
+
test('correct escrow', () => {
|
|
685
|
+
expect(r.mintEscrowCoinsToTransfer[0].amount).toBe('1000000000000');
|
|
686
|
+
});
|
|
608
687
|
test('quest approval with escrow payout', () => {
|
|
609
688
|
const q = r.collectionApprovals.find((a) => a.approvalId === 'quests-approval');
|
|
610
689
|
expect(q.approvalCriteria.coinTransfers[0].overrideFromWithApproverAddress).toBe(true);
|
|
@@ -636,15 +715,16 @@ describe('quests builder', () => {
|
|
|
636
715
|
describe('address-list builder', () => {
|
|
637
716
|
const msg = (0, address_list_js_1.buildAddressList)({ name: 'My List', description: 'A test list.', image: 'ipfs://test-image' });
|
|
638
717
|
const r = val(msg);
|
|
639
|
-
test('has Address List standard', () => {
|
|
718
|
+
test('has Address List standard', () => {
|
|
719
|
+
expect(r.standards).toEqual(['Address List']);
|
|
720
|
+
});
|
|
640
721
|
test('manager-add and manager-remove', () => {
|
|
641
722
|
const ids = r.collectionApprovals.map((a) => a.approvalId);
|
|
642
723
|
expect(ids).toContain('manager-add');
|
|
643
724
|
expect(ids).toContain('manager-remove');
|
|
644
725
|
});
|
|
645
726
|
test('deterministic — identical params produce byte-identical msg', () => {
|
|
646
|
-
expect((0, address_list_js_1.buildAddressList)({ name: 'My List', description: 'A test list.', image: 'ipfs://test-image' }))
|
|
647
|
-
.toEqual((0, address_list_js_1.buildAddressList)({ name: 'My List', description: 'A test list.', image: 'ipfs://test-image' }));
|
|
727
|
+
expect((0, address_list_js_1.buildAddressList)({ name: 'My List', description: 'A test list.', image: 'ipfs://test-image' })).toEqual((0, address_list_js_1.buildAddressList)({ name: 'My List', description: 'A test list.', image: 'ipfs://test-image' }));
|
|
648
728
|
});
|
|
649
729
|
test('passes verification with zero violations (any standard)', () => {
|
|
650
730
|
expectCleanVerification(msg);
|
|
@@ -692,13 +772,19 @@ describe('intent builder (delegates to canonical)', () => {
|
|
|
692
772
|
expect((0, intent_js_1.buildIntent)(p).value.approval.approvalId).toBe((0, intent_js_1.buildIntent)(p).value.approval.approvalId);
|
|
693
773
|
});
|
|
694
774
|
test('throws on same pay/receive denom', () => {
|
|
695
|
-
expect(() => (0, intent_js_1.buildIntent)({ address: 'bb1a', collectionId: '1', payDenom: 'BADGE', payAmount: 10, receiveDenom: 'BADGE', receiveAmount: 5 }))
|
|
696
|
-
|
|
697
|
-
expect(() => (0, intent_js_1.buildIntent)({ address: 'bb1a', collectionId: '1', payDenom: 'USDC', payAmount: 10, receiveDenom: 'usdc', receiveAmount: 5 }))
|
|
698
|
-
.toThrow(/denoms must differ/);
|
|
775
|
+
expect(() => (0, intent_js_1.buildIntent)({ address: 'bb1a', collectionId: '1', payDenom: 'BADGE', payAmount: 10, receiveDenom: 'BADGE', receiveAmount: 5 })).toThrow(/denoms must differ/);
|
|
776
|
+
expect(() => (0, intent_js_1.buildIntent)({ address: 'bb1a', collectionId: '1', payDenom: 'USDC', payAmount: 10, receiveDenom: 'usdc', receiveAmount: 5 })).toThrow(/denoms must differ/);
|
|
699
777
|
});
|
|
700
778
|
test('accepts ms-since-epoch expiration (parity with bb intents create; durationToTimestamp rejected it)', () => {
|
|
701
|
-
const a = (0, intent_js_1.buildIntent)({
|
|
779
|
+
const a = (0, intent_js_1.buildIntent)({
|
|
780
|
+
address: 'bb1c',
|
|
781
|
+
collectionId: '5',
|
|
782
|
+
payDenom: 'USDC',
|
|
783
|
+
payAmount: 7,
|
|
784
|
+
receiveDenom: 'BADGE',
|
|
785
|
+
receiveAmount: 3,
|
|
786
|
+
expiration: '1798765432000'
|
|
787
|
+
}).value.approval;
|
|
702
788
|
expect(a.transferTimes).toEqual([{ start: 1n, end: 1798765432000n }]);
|
|
703
789
|
});
|
|
704
790
|
});
|
|
@@ -716,8 +802,7 @@ describe('listing builder (delegates to canonical)', () => {
|
|
|
716
802
|
expect(msg.value.approval.approvalCriteria.coinTransfers[0].to).toBe('bb1seller');
|
|
717
803
|
});
|
|
718
804
|
test('rejects a true token range (orderbook listings are single-token)', () => {
|
|
719
|
-
expect(() => (0, listing_js_1.buildListing)({ address: 'bb1s', collectionId: '1', tokenIds: '1-5', price: 1, denom: 'USDC' }))
|
|
720
|
-
.toThrow(/single token id/);
|
|
805
|
+
expect(() => (0, listing_js_1.buildListing)({ address: 'bb1s', collectionId: '1', tokenIds: '1-5', price: 1, denom: 'USDC' })).toThrow(/single token id/);
|
|
721
806
|
});
|
|
722
807
|
test('approval == buildOrderbookListingApproval for equivalent args (delegation parity)', () => {
|
|
723
808
|
const a = msg.value.approval;
|
|
@@ -739,7 +824,8 @@ describe('listing builder (delegates to canonical)', () => {
|
|
|
739
824
|
expect(msg._meta).toBeUndefined();
|
|
740
825
|
});
|
|
741
826
|
test('accepts ms-since-epoch expiration (parity with bb nfts list; durationToTimestamp rejected it)', () => {
|
|
742
|
-
const a = (0, listing_js_1.buildListing)({ address: 'bb1seller', collectionId: '1', tokenIds: '4', price: 50, denom: 'USDC', expiration: '1798765432000' }).value
|
|
827
|
+
const a = (0, listing_js_1.buildListing)({ address: 'bb1seller', collectionId: '1', tokenIds: '4', price: 50, denom: 'USDC', expiration: '1798765432000' }).value
|
|
828
|
+
.approval;
|
|
743
829
|
expect(a.transferTimes).toEqual([{ start: 1n, end: 1798765432000n }]);
|
|
744
830
|
});
|
|
745
831
|
});
|
|
@@ -759,8 +845,7 @@ describe('bid builder (delegates to canonical)', () => {
|
|
|
759
845
|
expect(ct.overrideToWithInitiator).toBe(true);
|
|
760
846
|
});
|
|
761
847
|
test('rejects a true token range', () => {
|
|
762
|
-
expect(() => (0, bid_js_1.buildBid)({ address: 'bb1b', collectionId: '1', tokenIds: '1-5', price: 1, denom: 'BADGE' }))
|
|
763
|
-
.toThrow(/single token id/);
|
|
848
|
+
expect(() => (0, bid_js_1.buildBid)({ address: 'bb1b', collectionId: '1', tokenIds: '1-5', price: 1, denom: 'BADGE' })).toThrow(/single token id/);
|
|
764
849
|
});
|
|
765
850
|
test('deterministic approval id for identical params', () => {
|
|
766
851
|
const p = { address: 'bb1bidder', collectionId: '1', tokenIds: '3', price: 25, denom: 'BADGE' };
|
|
@@ -807,7 +892,8 @@ describe('bid builder (delegates to canonical)', () => {
|
|
|
807
892
|
expect(a.approvalCriteria.predeterminedBalances.incrementedBalances.startBalances[0].amount).toBe(5n);
|
|
808
893
|
});
|
|
809
894
|
test('accepts ms-since-epoch expiration (parity with bb nfts bid; durationToTimestamp rejected it)', () => {
|
|
810
|
-
const a = (0, bid_js_1.buildBid)({ address: 'bb1bidder', collectionId: '1', tokenIds: '3', price: 25, denom: 'BADGE', expiration: '1798765432000' }).value
|
|
895
|
+
const a = (0, bid_js_1.buildBid)({ address: 'bb1bidder', collectionId: '1', tokenIds: '3', price: 25, denom: 'BADGE', expiration: '1798765432000' }).value
|
|
896
|
+
.approval;
|
|
811
897
|
expect(a.transferTimes).toEqual([{ start: 1n, end: 1798765432000n }]);
|
|
812
898
|
});
|
|
813
899
|
test('deterministic — byte-identical msg for identical params (fixed ms expiry)', () => {
|
|
@@ -830,17 +916,23 @@ describe('pm-sell-intent builder (delegates to canonical)', () => {
|
|
|
830
916
|
const no = (0, pm_sell_intent_js_1.buildPmSellIntent)({ address: 'bb1', collectionId: '42', token: 'no', amount: 1, price: 1, denom: 'USDC' });
|
|
831
917
|
expect(no.value.approval.tokenIds).toEqual([{ start: 2n, end: 2n }]);
|
|
832
918
|
});
|
|
833
|
-
test('pays seller', () => {
|
|
919
|
+
test('pays seller', () => {
|
|
920
|
+
expect(msg.value.approval.approvalCriteria.coinTransfers[0].to).toBe('bb1seller');
|
|
921
|
+
});
|
|
834
922
|
test('no _meta — byte-identical to the prediction-markets path', () => {
|
|
835
923
|
expect(msg._meta).toBeUndefined();
|
|
836
924
|
});
|
|
837
925
|
test('approval == buildPredictionMarketSellIntent for equivalent args (delegation parity)', () => {
|
|
838
926
|
const a = msg.value.approval;
|
|
839
927
|
const canonical = (0, prediction_markets_js_1.buildPredictionMarketSellIntent)({
|
|
840
|
-
address: 'bb1seller',
|
|
928
|
+
address: 'bb1seller',
|
|
929
|
+
collectionId: '42',
|
|
930
|
+
tokenId: 1n,
|
|
931
|
+
tokenAmount: 100n,
|
|
841
932
|
paymentDenom: a.approvalCriteria.coinTransfers[0].coins[0].denom,
|
|
842
933
|
paymentAmount: BigInt(a.approvalCriteria.coinTransfers[0].coins[0].amount),
|
|
843
|
-
transferTimes: a.transferTimes,
|
|
934
|
+
transferTimes: a.transferTimes,
|
|
935
|
+
approvalId: a.approvalId
|
|
844
936
|
});
|
|
845
937
|
expect(a).toEqual(canonical);
|
|
846
938
|
});
|
|
@@ -850,7 +942,15 @@ describe('pm-sell-intent builder (delegates to canonical)', () => {
|
|
|
850
942
|
expect(a.value.approval.approvalId).toBe(b.value.approval.approvalId);
|
|
851
943
|
});
|
|
852
944
|
test('accepts ms-since-epoch expiration; defaults to a 24h window (parity with bb prediction-markets sell)', () => {
|
|
853
|
-
const fixed = (0, pm_sell_intent_js_1.buildPmSellIntent)({
|
|
945
|
+
const fixed = (0, pm_sell_intent_js_1.buildPmSellIntent)({
|
|
946
|
+
address: 'bb1s',
|
|
947
|
+
collectionId: '7',
|
|
948
|
+
token: 'yes',
|
|
949
|
+
amount: 3,
|
|
950
|
+
price: 9,
|
|
951
|
+
denom: 'USDC',
|
|
952
|
+
expiration: '1798765432000'
|
|
953
|
+
}).value.approval;
|
|
854
954
|
expect(fixed.transferTimes).toEqual([{ start: 1n, end: 1798765432000n }]);
|
|
855
955
|
const def = (0, pm_sell_intent_js_1.buildPmSellIntent)({ address: 'bb1s', collectionId: '7', token: 'yes', amount: 3, price: 9, denom: 'USDC' }).value.approval;
|
|
856
956
|
const span = Number(def.transferTimes[0].end) - Date.now();
|
|
@@ -877,10 +977,14 @@ describe('pm-buy-intent builder (delegates to canonical)', () => {
|
|
|
877
977
|
test('approval == buildPredictionMarketBuyIntent for equivalent args (delegation parity)', () => {
|
|
878
978
|
const a = msg.value.approval;
|
|
879
979
|
const canonical = (0, prediction_markets_js_1.buildPredictionMarketBuyIntent)({
|
|
880
|
-
address: 'bb1buyer',
|
|
980
|
+
address: 'bb1buyer',
|
|
981
|
+
collectionId: '42',
|
|
982
|
+
tokenId: 2n,
|
|
983
|
+
tokenAmount: 200n,
|
|
881
984
|
paymentDenom: a.approvalCriteria.coinTransfers[0].coins[0].denom,
|
|
882
985
|
paymentAmount: BigInt(a.approvalCriteria.coinTransfers[0].coins[0].amount),
|
|
883
|
-
transferTimes: a.transferTimes,
|
|
986
|
+
transferTimes: a.transferTimes,
|
|
987
|
+
approvalId: a.approvalId
|
|
884
988
|
});
|
|
885
989
|
expect(a).toEqual(canonical);
|
|
886
990
|
});
|
|
@@ -892,7 +996,15 @@ describe('pm-buy-intent builder (delegates to canonical)', () => {
|
|
|
892
996
|
expect((0, pm_buy_intent_js_1.buildPmBuyIntent)({ ...p, price: 31 }).value.approval.approvalId).not.toBe(a.value.approval.approvalId);
|
|
893
997
|
});
|
|
894
998
|
test('accepts ms-since-epoch expiration; defaults to a 24h window (parity with bb prediction-markets buy)', () => {
|
|
895
|
-
const fixed = (0, pm_buy_intent_js_1.buildPmBuyIntent)({
|
|
999
|
+
const fixed = (0, pm_buy_intent_js_1.buildPmBuyIntent)({
|
|
1000
|
+
address: 'bb1buyer',
|
|
1001
|
+
collectionId: '42',
|
|
1002
|
+
token: 'no',
|
|
1003
|
+
amount: 200,
|
|
1004
|
+
price: 30,
|
|
1005
|
+
denom: 'USDC',
|
|
1006
|
+
expiration: '1798765432000'
|
|
1007
|
+
}).value.approval;
|
|
896
1008
|
expect(fixed.transferTimes).toEqual([{ start: 1n, end: 1798765432000n }]);
|
|
897
1009
|
const def = (0, pm_buy_intent_js_1.buildPmBuyIntent)({ address: 'bb1buyer', collectionId: '42', token: 'no', amount: 200, price: 30, denom: 'USDC' }).value.approval;
|
|
898
1010
|
const span = Number(def.transferTimes[0].end) - Date.now();
|
|
@@ -902,8 +1014,11 @@ describe('pm-buy-intent builder (delegates to canonical)', () => {
|
|
|
902
1014
|
});
|
|
903
1015
|
describe('canonical PM intent tokenAmount guard (#0431 — bb prediction-markets buy/sell parity)', () => {
|
|
904
1016
|
const base = {
|
|
905
|
-
address: 'bb1t',
|
|
906
|
-
|
|
1017
|
+
address: 'bb1t',
|
|
1018
|
+
collectionId: '9',
|
|
1019
|
+
tokenId: 1n,
|
|
1020
|
+
paymentDenom: 'uusdc',
|
|
1021
|
+
paymentAmount: 1000n,
|
|
907
1022
|
transferTimes: uintRanges_js_1.UintRangeArray.From([{ start: 1n, end: 9999999999999n }]),
|
|
908
1023
|
approvalId: 'pm-guard'
|
|
909
1024
|
};
|
|
@@ -923,28 +1038,63 @@ describe('canonical PM intent tokenAmount guard (#0431 — bb prediction-markets
|
|
|
923
1038
|
describe('all collection builders pass verifyStandardsCompliance with zero violations', () => {
|
|
924
1039
|
const builders = [
|
|
925
1040
|
['vault', (0, vault_js_1.buildVault)({ backingCoin: 'USDC', ...META })],
|
|
926
|
-
[
|
|
1041
|
+
[
|
|
1042
|
+
'vault (with limits)',
|
|
1043
|
+
(0, vault_js_1.buildVault)({ backingCoin: 'USDC', dailyWithdrawLimit: 100, require2fa: '74', emergencyRecovery: 'bb1recovery', ...META })
|
|
1044
|
+
],
|
|
927
1045
|
['smart-token', (0, smart_token_js_1.buildSmartToken)({ backingCoin: 'USDC', ...META })],
|
|
928
1046
|
['smart-token (tradable)', (0, smart_token_js_1.buildSmartToken)({ backingCoin: 'USDC', tradable: true, ...META })],
|
|
929
1047
|
['smart-token (ai-agent)', (0, smart_token_js_1.buildSmartToken)({ backingCoin: 'BADGE', aiAgentVault: true, ...META })],
|
|
930
1048
|
['subscription (single)', (0, subscription_js_1.buildSubscription)({ interval: 'monthly', price: 10, denom: 'USDC', recipient: 'bb1test', ...META })],
|
|
931
1049
|
['subscription (multi-tier)', (0, subscription_js_1.buildSubscription)({ interval: 'daily', price: 5, denom: 'BADGE', recipient: 'bb1r', tiers: 3, ...META })],
|
|
932
|
-
[
|
|
1050
|
+
[
|
|
1051
|
+
'subscription (multi-payout)',
|
|
1052
|
+
(0, subscription_js_1.buildSubscription)({
|
|
1053
|
+
interval: 'monthly',
|
|
1054
|
+
payouts: [
|
|
1055
|
+
{ recipient: 'bb1a', amount: 5, denom: 'USDC' },
|
|
1056
|
+
{ recipient: 'bb1b', amount: 3, denom: 'USDC' }
|
|
1057
|
+
],
|
|
1058
|
+
...META
|
|
1059
|
+
})
|
|
1060
|
+
],
|
|
933
1061
|
['bounty', (0, bounty_js_1.buildBounty)({ amount: 100, denom: 'USDC', verifier: 'bb1v', recipient: 'bb1r', submitter: 'bb1s', ...META })],
|
|
934
|
-
[
|
|
1062
|
+
[
|
|
1063
|
+
'bounty (BADGE)',
|
|
1064
|
+
(0, bounty_js_1.buildBounty)({ amount: 50, denom: 'BADGE', verifier: 'bb1v', recipient: 'bb1r', submitter: 'bb1s', expiration: '7d', ...META })
|
|
1065
|
+
],
|
|
935
1066
|
['crowdfund', (0, crowdfund_js_1.buildCrowdfund)({ goal: 1000, denom: 'USDC', crowdfunder: 'bb1fund', ...META })],
|
|
936
1067
|
['crowdfund (with crowdfunder)', (0, crowdfund_js_1.buildCrowdfund)({ goal: 500, denom: 'BADGE', crowdfunder: 'bb1fund', deadline: '14d', ...META })],
|
|
937
1068
|
['auction', (0, auction_js_1.buildAuction)({ ...META })],
|
|
938
1069
|
['auction (custom times)', (0, auction_js_1.buildAuction)({ bidDeadline: '3d', acceptWindow: '1d', ...META })],
|
|
939
1070
|
['product-catalog', (0, product_catalog_js_1.buildProductCatalog)({ products: [{ name: 'Item', price: 10, denom: 'USDC' }], storeAddress: 'bb1s', ...META })],
|
|
940
|
-
[
|
|
1071
|
+
[
|
|
1072
|
+
'product-catalog (multi)',
|
|
1073
|
+
(0, product_catalog_js_1.buildProductCatalog)({
|
|
1074
|
+
products: [
|
|
1075
|
+
{ name: 'A', price: 5, denom: 'BADGE' },
|
|
1076
|
+
{ name: 'B', price: 10, denom: 'USDC', maxSupply: 50, burn: true }
|
|
1077
|
+
],
|
|
1078
|
+
storeAddress: 'bb1s',
|
|
1079
|
+
...META
|
|
1080
|
+
})
|
|
1081
|
+
],
|
|
941
1082
|
['prediction-market', (0, prediction_market_js_1.buildPredictionMarket)({ verifier: 'bb1v', ...META })],
|
|
942
1083
|
['credit-token', (0, credit_token_js_1.buildCreditToken)({ paymentDenom: 'USDC', recipient: 'bb1r', ...META })],
|
|
943
1084
|
['credit-token (custom)', (0, credit_token_js_1.buildCreditToken)({ paymentDenom: 'BADGE', recipient: 'bb1r', symbol: 'CRED', tokensPerUnit: 50, ...META })],
|
|
944
1085
|
['custom-2fa', (0, custom_2fa_js_1.buildCustom2FA)({ name: 'My 2FA', description: 'A 2FA token.', image: 'ipfs://test-image', creator: 'bb1manager' })],
|
|
945
|
-
[
|
|
1086
|
+
[
|
|
1087
|
+
'custom-2fa (burnable)',
|
|
1088
|
+
(0, custom_2fa_js_1.buildCustom2FA)({
|
|
1089
|
+
name: 'Burnable 2FA',
|
|
1090
|
+
burnable: true,
|
|
1091
|
+
description: 'A burnable 2FA token.',
|
|
1092
|
+
image: 'ipfs://test-image',
|
|
1093
|
+
creator: 'bb1manager'
|
|
1094
|
+
})
|
|
1095
|
+
],
|
|
946
1096
|
['quests', (0, quests_js_1.buildQuests)({ reward: 10, denom: 'BADGE', maxClaims: 100, ...META })],
|
|
947
|
-
['address-list', (0, address_list_js_1.buildAddressList)({ name: 'My List', description: 'A test list.', image: 'ipfs://test-image' })]
|
|
1097
|
+
['address-list', (0, address_list_js_1.buildAddressList)({ name: 'My List', description: 'A test list.', image: 'ipfs://test-image' })]
|
|
948
1098
|
];
|
|
949
1099
|
for (const [name, msg] of builders) {
|
|
950
1100
|
test(`${name}: zero violations`, () => {
|
|
@@ -1003,8 +1153,7 @@ describe('error handling', () => {
|
|
|
1003
1153
|
expectCleanVerification(msg);
|
|
1004
1154
|
});
|
|
1005
1155
|
test('buildIntent rejects same pay/receive denom (no-op approval)', () => {
|
|
1006
|
-
expect(() => (0, intent_js_1.buildIntent)({ address: 'bb1a', collectionId: '1', payDenom: 'BADGE', payAmount: 10, receiveDenom: 'BADGE', receiveAmount: 5 }))
|
|
1007
|
-
.toThrow(/denoms must differ/);
|
|
1156
|
+
expect(() => (0, intent_js_1.buildIntent)({ address: 'bb1a', collectionId: '1', payDenom: 'BADGE', payAmount: 10, receiveDenom: 'BADGE', receiveAmount: 5 })).toThrow(/denoms must differ/);
|
|
1008
1157
|
});
|
|
1009
1158
|
test('buildListing parses single token ID (canonical shape)', () => {
|
|
1010
1159
|
const msg = (0, listing_js_1.buildListing)({ address: 'bb1a', collectionId: '1', tokenIds: '42', price: 10, denom: 'BADGE' });
|