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
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { verifyStandardsCompliance } from '../../api-indexer/verify-standards.js';
|
|
2
2
|
import { buildVault } from './vault.js';
|
|
3
3
|
import { buildSubscription } from './subscription.js';
|
|
4
|
+
import { reviewCollection } from '../review.js';
|
|
4
5
|
import { buildBounty } from './bounty.js';
|
|
5
6
|
import { buildPaymentRequest } from './payment-request.js';
|
|
6
7
|
import { buildCrowdfund } from './crowdfund.js';
|
|
@@ -31,11 +32,7 @@ function verifyBuilder(msg) {
|
|
|
31
32
|
}
|
|
32
33
|
function trackedIds(msg) {
|
|
33
34
|
const v = msg.value ?? msg;
|
|
34
|
-
const approvals = [
|
|
35
|
-
...(v.collectionApprovals ?? []),
|
|
36
|
-
...(v.incomingApprovals ?? []),
|
|
37
|
-
...(v.outgoingApprovals ?? [])
|
|
38
|
-
];
|
|
35
|
+
const approvals = [...(v.collectionApprovals ?? []), ...(v.incomingApprovals ?? []), ...(v.outgoingApprovals ?? [])];
|
|
39
36
|
const ids = [];
|
|
40
37
|
for (const a of approvals) {
|
|
41
38
|
if (a?.approvalId)
|
|
@@ -206,7 +203,9 @@ describe('vault builder', () => {
|
|
|
206
203
|
describe('smart-token builder', () => {
|
|
207
204
|
const msg = buildSmartToken({ backingCoin: 'USDC', ...META });
|
|
208
205
|
const r = val(msg);
|
|
209
|
-
test('has Smart Token standard', () => {
|
|
206
|
+
test('has Smart Token standard', () => {
|
|
207
|
+
expect(r.standards).toContain('Smart Token');
|
|
208
|
+
});
|
|
210
209
|
test('has deposit and withdraw approvals', () => {
|
|
211
210
|
const ids = r.collectionApprovals.map((a) => a.approvalId);
|
|
212
211
|
expect(ids).toContain('smart-token-deposit');
|
|
@@ -231,7 +230,42 @@ describe('smart-token builder', () => {
|
|
|
231
230
|
describe('subscription builder', () => {
|
|
232
231
|
const msg = buildSubscription({ interval: 'monthly', price: 10, denom: 'USDC', recipient: 'bb1test', ...META });
|
|
233
232
|
const r = val(msg);
|
|
234
|
-
|
|
233
|
+
describe('passes its own review by default', () => {
|
|
234
|
+
test('locks the Mint-scoped approval permission forever, leaving other approvals editable', () => {
|
|
235
|
+
const perms = r.collectionPermissions.canUpdateCollectionApprovals;
|
|
236
|
+
const mintLock = perms.find((p) => p.fromListId === 'Mint');
|
|
237
|
+
expect(mintLock).toBeDefined();
|
|
238
|
+
expect(mintLock.permanentlyForbiddenTimes).toEqual([{ start: '1', end: '18446744073709551615' }]);
|
|
239
|
+
expect(mintLock.permanentlyPermittedTimes).toEqual([]);
|
|
240
|
+
expect(perms.some((p) => p.fromListId === 'All')).toBe(false);
|
|
241
|
+
});
|
|
242
|
+
test('blocks forceful post-mint transfers at creation', () => {
|
|
243
|
+
expect(r.invariants.noForcefulPostMintTransfers).toBe(true);
|
|
244
|
+
});
|
|
245
|
+
test('review reports zero critical findings', () => {
|
|
246
|
+
const review = reviewCollection(msg);
|
|
247
|
+
const criticals = review.findings.filter((f) => f.severity === 'critical').map((f) => f.code);
|
|
248
|
+
expect(criticals).toEqual([]);
|
|
249
|
+
});
|
|
250
|
+
});
|
|
251
|
+
describe('updatableMint opt-out', () => {
|
|
252
|
+
const open = val(buildSubscription({ interval: 'monthly', price: 10, denom: 'USDC', recipient: 'bb1test', updatableMint: true, ...META }));
|
|
253
|
+
test('leaves mint approvals neutral so the price can change later', () => {
|
|
254
|
+
expect(open.collectionPermissions.canUpdateCollectionApprovals.some((p) => p.fromListId === 'Mint')).toBe(false);
|
|
255
|
+
});
|
|
256
|
+
test('still blocks forceful transfers; that is a separate concern', () => {
|
|
257
|
+
expect(open.invariants.noForcefulPostMintTransfers).toBe(true);
|
|
258
|
+
});
|
|
259
|
+
test('the review surfaces the choice as the critical it is', () => {
|
|
260
|
+
const criticals = reviewCollection(buildSubscription({ interval: 'monthly', price: 10, denom: 'USDC', recipient: 'bb1test', updatableMint: true, ...META }))
|
|
261
|
+
.findings.filter((f) => f.severity === 'critical')
|
|
262
|
+
.map((f) => f.code);
|
|
263
|
+
expect(criticals.some((c) => /mint_approvals/.test(c))).toBe(true);
|
|
264
|
+
});
|
|
265
|
+
});
|
|
266
|
+
test('has Subscriptions standard', () => {
|
|
267
|
+
expect(r.standards).toEqual(['Subscriptions']);
|
|
268
|
+
});
|
|
235
269
|
test('has durationFromTimestamp', () => {
|
|
236
270
|
const ib = r.collectionApprovals[0].approvalCriteria.predeterminedBalances.incrementedBalances;
|
|
237
271
|
expect(ib.durationFromTimestamp).toBe('2592000000');
|
|
@@ -240,7 +274,9 @@ describe('subscription builder', () => {
|
|
|
240
274
|
test('coin transfer to recipient', () => {
|
|
241
275
|
expect(r.collectionApprovals[0].approvalCriteria.coinTransfers[0].to).toBe('bb1test');
|
|
242
276
|
});
|
|
243
|
-
test('noCustomOwnershipTimes is false', () => {
|
|
277
|
+
test('noCustomOwnershipTimes is false', () => {
|
|
278
|
+
expect(r.invariants.noCustomOwnershipTimes).toBe(false);
|
|
279
|
+
});
|
|
244
280
|
test('multi-tier', () => {
|
|
245
281
|
const mt = val(buildSubscription({ interval: 'monthly', price: 10, denom: 'USDC', recipient: 'bb1test', tiers: 3, ...META }));
|
|
246
282
|
expect(mt.validTokenIds).toEqual([{ start: '1', end: '3' }]);
|
|
@@ -270,8 +306,7 @@ describe('subscription builder', () => {
|
|
|
270
306
|
})).toThrow(/single denom/);
|
|
271
307
|
});
|
|
272
308
|
test('deterministic — identical params produce byte-identical msg', () => {
|
|
273
|
-
expect(buildSubscription({ interval: 'monthly', price: 10, denom: 'USDC', recipient: 'bb1test', ...META }))
|
|
274
|
-
.toEqual(buildSubscription({ interval: 'monthly', price: 10, denom: 'USDC', recipient: 'bb1test', ...META }));
|
|
309
|
+
expect(buildSubscription({ interval: 'monthly', price: 10, denom: 'USDC', recipient: 'bb1test', ...META })).toEqual(buildSubscription({ interval: 'monthly', price: 10, denom: 'USDC', recipient: 'bb1test', ...META }));
|
|
275
310
|
});
|
|
276
311
|
test('passes verification with zero violations (any standard)', () => {
|
|
277
312
|
expectCleanVerification(msg);
|
|
@@ -280,7 +315,9 @@ describe('subscription builder', () => {
|
|
|
280
315
|
describe('bounty builder', () => {
|
|
281
316
|
const msg = buildBounty({ amount: 100, denom: 'USDC', verifier: 'bb1verifier', recipient: 'bb1recipient', submitter: 'bb1submitter', ...META });
|
|
282
317
|
const r = val(msg);
|
|
283
|
-
test('has Bounty standard', () => {
|
|
318
|
+
test('has Bounty standard', () => {
|
|
319
|
+
expect(r.standards).toEqual(['Bounty']);
|
|
320
|
+
});
|
|
284
321
|
test('3 approvals', () => {
|
|
285
322
|
expect(r.collectionApprovals.length).toBe(3);
|
|
286
323
|
const ids = r.collectionApprovals.map((a) => a.approvalId);
|
|
@@ -305,8 +342,7 @@ describe('bounty builder', () => {
|
|
|
305
342
|
expect(pid(a, 'bounty-deny')).toBe(pid(b, 'bounty-deny'));
|
|
306
343
|
expect(pid(a, 'bounty-accept')).not.toBe(pid(a, 'bounty-deny'));
|
|
307
344
|
expect(pid(a, 'bounty-accept').startsWith('bounty-accept-')).toBe(true);
|
|
308
|
-
expect(pid(val(buildBounty({ ...p, amount: 101 })).collectionApprovals, 'bounty-accept'))
|
|
309
|
-
.not.toBe(pid(a, 'bounty-accept'));
|
|
345
|
+
expect(pid(val(buildBounty({ ...p, amount: 101 })).collectionApprovals, 'bounty-accept')).not.toBe(pid(a, 'bounty-accept'));
|
|
310
346
|
});
|
|
311
347
|
test('deterministic — whole msg byte-identical with the Date.now expiry window normalized out', () => {
|
|
312
348
|
const p = { amount: 100, denom: 'USDC', verifier: 'bb1v', recipient: 'bb1r', submitter: 'bb1s', ...META };
|
|
@@ -332,7 +368,9 @@ describe('payment-request builder', () => {
|
|
|
332
368
|
image: 'ipfs://test-image'
|
|
333
369
|
});
|
|
334
370
|
const r = val(msg);
|
|
335
|
-
test('has PaymentRequest standard', () => {
|
|
371
|
+
test('has PaymentRequest standard', () => {
|
|
372
|
+
expect(r.standards).toEqual(['PaymentRequest']);
|
|
373
|
+
});
|
|
336
374
|
test('2 approvals (pay + deny — no expire branch)', () => {
|
|
337
375
|
expect(r.collectionApprovals.length).toBe(2);
|
|
338
376
|
const ids = r.collectionApprovals.map((a) => a.approvalId);
|
|
@@ -360,7 +398,15 @@ describe('payment-request builder', () => {
|
|
|
360
398
|
}
|
|
361
399
|
});
|
|
362
400
|
test('deterministic approval ids (no random ids; time window aside)', () => {
|
|
363
|
-
const prParams = {
|
|
401
|
+
const prParams = {
|
|
402
|
+
amount: 10,
|
|
403
|
+
denom: 'USDC',
|
|
404
|
+
payer: 'bb1payer',
|
|
405
|
+
recipient: 'bb1recipient',
|
|
406
|
+
context: 'ctx',
|
|
407
|
+
name: 'Test',
|
|
408
|
+
image: 'ipfs://test-image'
|
|
409
|
+
};
|
|
364
410
|
const ids = (m) => m.value.collectionApprovals.map((a) => a.approvalId);
|
|
365
411
|
expect(ids(buildPaymentRequest(prParams))).toEqual(ids(buildPaymentRequest(prParams)));
|
|
366
412
|
});
|
|
@@ -372,9 +418,15 @@ describe('crowdfund builder', () => {
|
|
|
372
418
|
const params = { goal: 1000, denom: 'USDC', crowdfunder: 'bb1fund', ...META };
|
|
373
419
|
const msg = buildCrowdfund(params);
|
|
374
420
|
const r = val(msg);
|
|
375
|
-
test('has Crowdfund standard', () => {
|
|
376
|
-
|
|
377
|
-
|
|
421
|
+
test('has Crowdfund standard', () => {
|
|
422
|
+
expect(r.standards).toEqual(['Crowdfund']);
|
|
423
|
+
});
|
|
424
|
+
test('2 token IDs', () => {
|
|
425
|
+
expect(r.validTokenIds).toEqual([{ start: '1', end: '2' }]);
|
|
426
|
+
});
|
|
427
|
+
test('at least 4 approvals', () => {
|
|
428
|
+
expect(r.collectionApprovals.length).toBeGreaterThanOrEqual(4);
|
|
429
|
+
});
|
|
378
430
|
test('crowdfunder address used', () => {
|
|
379
431
|
const progress = r.collectionApprovals.find((a) => a.approvalId === 'deposit-progress');
|
|
380
432
|
expect(progress.toListId).toBe('bb1fund');
|
|
@@ -396,10 +448,8 @@ describe('crowdfund builder', () => {
|
|
|
396
448
|
test('deterministic — stable ids + payout gate across calls', () => {
|
|
397
449
|
const a = val(buildCrowdfund(params));
|
|
398
450
|
const b = val(buildCrowdfund(params));
|
|
399
|
-
expect(a.collectionApprovals.map((x) => x.approvalId))
|
|
400
|
-
|
|
401
|
-
expect(a.collectionApprovals.find((x) => x.approvalId === 'refund').approvalCriteria.mustOwnTokens[0].ownershipCheckParty)
|
|
402
|
-
.toBe(b.collectionApprovals.find((x) => x.approvalId === 'refund').approvalCriteria.mustOwnTokens[0].ownershipCheckParty);
|
|
451
|
+
expect(a.collectionApprovals.map((x) => x.approvalId)).toEqual(b.collectionApprovals.map((x) => x.approvalId));
|
|
452
|
+
expect(a.collectionApprovals.find((x) => x.approvalId === 'refund').approvalCriteria.mustOwnTokens[0].ownershipCheckParty).toBe(b.collectionApprovals.find((x) => x.approvalId === 'refund').approvalCriteria.mustOwnTokens[0].ownershipCheckParty);
|
|
403
453
|
});
|
|
404
454
|
test('passes verification with zero violations', () => {
|
|
405
455
|
expectCleanVerification(msg);
|
|
@@ -408,7 +458,9 @@ describe('crowdfund builder', () => {
|
|
|
408
458
|
describe('auction builder', () => {
|
|
409
459
|
const msg = buildAuction({ ...META });
|
|
410
460
|
const r = val(msg);
|
|
411
|
-
test('has Auction standard', () => {
|
|
461
|
+
test('has Auction standard', () => {
|
|
462
|
+
expect(r.standards).toEqual(['Auction']);
|
|
463
|
+
});
|
|
412
464
|
test('bounded transfer times', () => {
|
|
413
465
|
const mint = r.collectionApprovals.find((a) => a.fromListId === 'Mint');
|
|
414
466
|
expect(mint.transferTimes[0].start).not.toBe('1');
|
|
@@ -419,9 +471,7 @@ describe('auction builder', () => {
|
|
|
419
471
|
});
|
|
420
472
|
test('deterministic approval ids — no Math.random', () => {
|
|
421
473
|
expect(trackedIds(buildAuction({ ...META }))).toEqual(trackedIds(buildAuction({ ...META })));
|
|
422
|
-
expect(r.collectionApprovals.map((a) => a.approvalId)).toEqual([
|
|
423
|
-
'auction-mint-to-winner', 'auction-burn'
|
|
424
|
-
]);
|
|
474
|
+
expect(r.collectionApprovals.map((a) => a.approvalId)).toEqual(['auction-mint-to-winner', 'auction-burn']);
|
|
425
475
|
});
|
|
426
476
|
test('passes verification with zero violations', () => {
|
|
427
477
|
expectCleanVerification(msg);
|
|
@@ -429,14 +479,23 @@ describe('auction builder', () => {
|
|
|
429
479
|
});
|
|
430
480
|
describe('product-catalog builder', () => {
|
|
431
481
|
const msg = buildProductCatalog({
|
|
432
|
-
products: [
|
|
482
|
+
products: [
|
|
483
|
+
{ name: 'T-Shirt', price: 25, denom: 'USDC' },
|
|
484
|
+
{ name: 'Mug', price: 15, denom: 'USDC', maxSupply: 50 }
|
|
485
|
+
],
|
|
433
486
|
storeAddress: 'bb1store',
|
|
434
487
|
...META
|
|
435
488
|
});
|
|
436
489
|
const r = val(msg);
|
|
437
|
-
test('has Products standard', () => {
|
|
438
|
-
|
|
439
|
-
|
|
490
|
+
test('has Products standard', () => {
|
|
491
|
+
expect(r.standards).toEqual(['Products']);
|
|
492
|
+
});
|
|
493
|
+
test('correct token IDs', () => {
|
|
494
|
+
expect(r.validTokenIds).toEqual([{ start: '1', end: '2' }]);
|
|
495
|
+
});
|
|
496
|
+
test('purchase + burn approvals', () => {
|
|
497
|
+
expect(r.collectionApprovals.length).toBe(3);
|
|
498
|
+
});
|
|
440
499
|
test('coin transfers to store', () => {
|
|
441
500
|
for (const p of r.collectionApprovals.filter((a) => a.fromListId === 'Mint')) {
|
|
442
501
|
expect(p.approvalCriteria.coinTransfers[0].to).toBe('bb1store');
|
|
@@ -444,16 +503,17 @@ describe('product-catalog builder', () => {
|
|
|
444
503
|
});
|
|
445
504
|
test('deterministic — identical params produce a byte-identical msg', () => {
|
|
446
505
|
const p = {
|
|
447
|
-
products: [
|
|
506
|
+
products: [
|
|
507
|
+
{ name: 'T-Shirt', price: 25, denom: 'USDC' },
|
|
508
|
+
{ name: 'Mug', price: 15, denom: 'USDC', maxSupply: 50 }
|
|
509
|
+
],
|
|
448
510
|
storeAddress: 'bb1store',
|
|
449
511
|
...META
|
|
450
512
|
};
|
|
451
513
|
expect(buildProductCatalog(p)).toEqual(buildProductCatalog(p));
|
|
452
514
|
});
|
|
453
515
|
test('purchase ids are 1-based index, burn id is stable', () => {
|
|
454
|
-
expect(r.collectionApprovals.map((a) => a.approvalId)).toEqual([
|
|
455
|
-
'product-purchase-1', 'product-purchase-2', 'product-burn'
|
|
456
|
-
]);
|
|
516
|
+
expect(r.collectionApprovals.map((a) => a.approvalId)).toEqual(['product-purchase-1', 'product-purchase-2', 'product-burn']);
|
|
457
517
|
});
|
|
458
518
|
test('passes verification with zero violations', () => {
|
|
459
519
|
expectCleanVerification(msg);
|
|
@@ -461,31 +521,39 @@ describe('product-catalog builder', () => {
|
|
|
461
521
|
test('maxSupply: present cap emits overallMaxNumTransfers; omitted = unlimited', () => {
|
|
462
522
|
const cap = val(buildProductCatalog({
|
|
463
523
|
products: [{ name: 'Capped', price: 1, denom: 'USDC', maxSupply: 50 }],
|
|
464
|
-
storeAddress: 'bb1store',
|
|
524
|
+
storeAddress: 'bb1store',
|
|
525
|
+
...META
|
|
465
526
|
})).collectionApprovals.find((a) => a.approvalId === 'product-purchase-1');
|
|
466
527
|
expect(cap.approvalCriteria.maxNumTransfers.overallMaxNumTransfers).toBe('50');
|
|
467
528
|
const unlimited = val(buildProductCatalog({
|
|
468
529
|
products: [{ name: 'Unl', price: 1, denom: 'USDC' }],
|
|
469
|
-
storeAddress: 'bb1store',
|
|
530
|
+
storeAddress: 'bb1store',
|
|
531
|
+
...META
|
|
470
532
|
})).collectionApprovals.find((a) => a.approvalId === 'product-purchase-1');
|
|
471
533
|
expect(unlimited.approvalCriteria.maxNumTransfers.overallMaxNumTransfers).toBe('0');
|
|
472
534
|
});
|
|
473
535
|
test('maxSupply: rejects negative / non-integer instead of silently going unlimited', () => {
|
|
474
536
|
expect(() => buildProductCatalog({
|
|
475
537
|
products: [{ name: 'Bad', price: 1, denom: 'USDC', maxSupply: -1 }],
|
|
476
|
-
storeAddress: 'bb1store',
|
|
538
|
+
storeAddress: 'bb1store',
|
|
539
|
+
...META
|
|
477
540
|
})).toThrow(/maxSupply/i);
|
|
478
541
|
expect(() => buildProductCatalog({
|
|
479
542
|
products: [{ name: 'Bad', price: 1, denom: 'USDC', maxSupply: 1.5 }],
|
|
480
|
-
storeAddress: 'bb1store',
|
|
543
|
+
storeAddress: 'bb1store',
|
|
544
|
+
...META
|
|
481
545
|
})).toThrow(/maxSupply/i);
|
|
482
546
|
});
|
|
483
547
|
});
|
|
484
548
|
describe('prediction-market builder', () => {
|
|
485
549
|
const msg = buildPredictionMarket({ verifier: 'bb1verifier', ...META });
|
|
486
550
|
const r = val(msg);
|
|
487
|
-
test('has Prediction Market standard', () => {
|
|
488
|
-
|
|
551
|
+
test('has Prediction Market standard', () => {
|
|
552
|
+
expect(r.standards).toEqual(['Prediction Market']);
|
|
553
|
+
});
|
|
554
|
+
test('YES/NO tokens', () => {
|
|
555
|
+
expect(r.validTokenIds).toEqual([{ start: '1', end: '2' }]);
|
|
556
|
+
});
|
|
489
557
|
test('alias paths', () => {
|
|
490
558
|
expect(r.aliasPathsToAdd.length).toBe(2);
|
|
491
559
|
expect(r.aliasPathsToAdd.map((a) => a.denom)).toContain('uyes');
|
|
@@ -522,13 +590,14 @@ describe('prediction-market builder', () => {
|
|
|
522
590
|
describe('credit-token builder', () => {
|
|
523
591
|
const msg = buildCreditToken({ paymentDenom: 'USDC', recipient: 'bb1recipient', ...META });
|
|
524
592
|
const r = val(msg);
|
|
525
|
-
test('has Credit Token standard', () => {
|
|
593
|
+
test('has Credit Token standard', () => {
|
|
594
|
+
expect(r.standards).toEqual(['Credit Token']);
|
|
595
|
+
});
|
|
526
596
|
test('amount scaling', () => {
|
|
527
597
|
expect(r.collectionApprovals[0].approvalCriteria.predeterminedBalances.incrementedBalances.allowAmountScaling).toBe(true);
|
|
528
598
|
});
|
|
529
599
|
test('deterministic — identical params produce byte-identical msg', () => {
|
|
530
|
-
expect(buildCreditToken({ paymentDenom: 'USDC', recipient: 'bb1recipient', ...META }))
|
|
531
|
-
.toEqual(buildCreditToken({ paymentDenom: 'USDC', recipient: 'bb1recipient', ...META }));
|
|
600
|
+
expect(buildCreditToken({ paymentDenom: 'USDC', recipient: 'bb1recipient', ...META })).toEqual(buildCreditToken({ paymentDenom: 'USDC', recipient: 'bb1recipient', ...META }));
|
|
532
601
|
});
|
|
533
602
|
test('passes verification with zero violations (any standard)', () => {
|
|
534
603
|
expectCleanVerification(msg);
|
|
@@ -538,9 +607,15 @@ describe('custom-2fa builder', () => {
|
|
|
538
607
|
const META2FA = { name: 'My 2FA Token', description: 'A 2FA token for testing.', image: 'ipfs://test-image' };
|
|
539
608
|
const msg = buildCustom2FA({ ...META2FA, creator: 'bb1manager' });
|
|
540
609
|
const r = val(msg);
|
|
541
|
-
test('has Custom-2FA standard', () => {
|
|
542
|
-
|
|
543
|
-
|
|
610
|
+
test('has Custom-2FA standard', () => {
|
|
611
|
+
expect(r.standards).toEqual(['Custom-2FA']);
|
|
612
|
+
});
|
|
613
|
+
test('allowPurgeIfExpired', () => {
|
|
614
|
+
expect(r.collectionApprovals[0].approvalCriteria.autoDeletionOptions.allowPurgeIfExpired).toBe(true);
|
|
615
|
+
});
|
|
616
|
+
test('disablePoolCreation', () => {
|
|
617
|
+
expect(r.invariants.disablePoolCreation).toBe(true);
|
|
618
|
+
});
|
|
544
619
|
test('burnable adds burn approval', () => {
|
|
545
620
|
expect(val(buildCustom2FA({ ...META2FA, creator: 'bb1manager', burnable: true })).collectionApprovals.length).toBe(2);
|
|
546
621
|
});
|
|
@@ -601,8 +676,12 @@ describe('mintCustom2FA (mint-side expiry helper, ticket 0407)', () => {
|
|
|
601
676
|
describe('quests builder', () => {
|
|
602
677
|
const msg = buildQuests({ reward: 10, denom: 'BADGE', maxClaims: 100, ...META });
|
|
603
678
|
const r = val(msg);
|
|
604
|
-
test('has Quests standard', () => {
|
|
605
|
-
|
|
679
|
+
test('has Quests standard', () => {
|
|
680
|
+
expect(r.standards).toEqual(['Quests']);
|
|
681
|
+
});
|
|
682
|
+
test('correct escrow', () => {
|
|
683
|
+
expect(r.mintEscrowCoinsToTransfer[0].amount).toBe('1000000000000');
|
|
684
|
+
});
|
|
606
685
|
test('quest approval with escrow payout', () => {
|
|
607
686
|
const q = r.collectionApprovals.find((a) => a.approvalId === 'quests-approval');
|
|
608
687
|
expect(q.approvalCriteria.coinTransfers[0].overrideFromWithApproverAddress).toBe(true);
|
|
@@ -634,15 +713,16 @@ describe('quests builder', () => {
|
|
|
634
713
|
describe('address-list builder', () => {
|
|
635
714
|
const msg = buildAddressList({ name: 'My List', description: 'A test list.', image: 'ipfs://test-image' });
|
|
636
715
|
const r = val(msg);
|
|
637
|
-
test('has Address List standard', () => {
|
|
716
|
+
test('has Address List standard', () => {
|
|
717
|
+
expect(r.standards).toEqual(['Address List']);
|
|
718
|
+
});
|
|
638
719
|
test('manager-add and manager-remove', () => {
|
|
639
720
|
const ids = r.collectionApprovals.map((a) => a.approvalId);
|
|
640
721
|
expect(ids).toContain('manager-add');
|
|
641
722
|
expect(ids).toContain('manager-remove');
|
|
642
723
|
});
|
|
643
724
|
test('deterministic — identical params produce byte-identical msg', () => {
|
|
644
|
-
expect(buildAddressList({ name: 'My List', description: 'A test list.', image: 'ipfs://test-image' }))
|
|
645
|
-
.toEqual(buildAddressList({ name: 'My List', description: 'A test list.', image: 'ipfs://test-image' }));
|
|
725
|
+
expect(buildAddressList({ name: 'My List', description: 'A test list.', image: 'ipfs://test-image' })).toEqual(buildAddressList({ name: 'My List', description: 'A test list.', image: 'ipfs://test-image' }));
|
|
646
726
|
});
|
|
647
727
|
test('passes verification with zero violations (any standard)', () => {
|
|
648
728
|
expectCleanVerification(msg);
|
|
@@ -690,13 +770,19 @@ describe('intent builder (delegates to canonical)', () => {
|
|
|
690
770
|
expect(buildIntent(p).value.approval.approvalId).toBe(buildIntent(p).value.approval.approvalId);
|
|
691
771
|
});
|
|
692
772
|
test('throws on same pay/receive denom', () => {
|
|
693
|
-
expect(() => buildIntent({ address: 'bb1a', collectionId: '1', payDenom: 'BADGE', payAmount: 10, receiveDenom: 'BADGE', receiveAmount: 5 }))
|
|
694
|
-
|
|
695
|
-
expect(() => buildIntent({ address: 'bb1a', collectionId: '1', payDenom: 'USDC', payAmount: 10, receiveDenom: 'usdc', receiveAmount: 5 }))
|
|
696
|
-
.toThrow(/denoms must differ/);
|
|
773
|
+
expect(() => buildIntent({ address: 'bb1a', collectionId: '1', payDenom: 'BADGE', payAmount: 10, receiveDenom: 'BADGE', receiveAmount: 5 })).toThrow(/denoms must differ/);
|
|
774
|
+
expect(() => buildIntent({ address: 'bb1a', collectionId: '1', payDenom: 'USDC', payAmount: 10, receiveDenom: 'usdc', receiveAmount: 5 })).toThrow(/denoms must differ/);
|
|
697
775
|
});
|
|
698
776
|
test('accepts ms-since-epoch expiration (parity with bb intents create; durationToTimestamp rejected it)', () => {
|
|
699
|
-
const a = buildIntent({
|
|
777
|
+
const a = buildIntent({
|
|
778
|
+
address: 'bb1c',
|
|
779
|
+
collectionId: '5',
|
|
780
|
+
payDenom: 'USDC',
|
|
781
|
+
payAmount: 7,
|
|
782
|
+
receiveDenom: 'BADGE',
|
|
783
|
+
receiveAmount: 3,
|
|
784
|
+
expiration: '1798765432000'
|
|
785
|
+
}).value.approval;
|
|
700
786
|
expect(a.transferTimes).toEqual([{ start: 1n, end: 1798765432000n }]);
|
|
701
787
|
});
|
|
702
788
|
});
|
|
@@ -714,8 +800,7 @@ describe('listing builder (delegates to canonical)', () => {
|
|
|
714
800
|
expect(msg.value.approval.approvalCriteria.coinTransfers[0].to).toBe('bb1seller');
|
|
715
801
|
});
|
|
716
802
|
test('rejects a true token range (orderbook listings are single-token)', () => {
|
|
717
|
-
expect(() => buildListing({ address: 'bb1s', collectionId: '1', tokenIds: '1-5', price: 1, denom: 'USDC' }))
|
|
718
|
-
.toThrow(/single token id/);
|
|
803
|
+
expect(() => buildListing({ address: 'bb1s', collectionId: '1', tokenIds: '1-5', price: 1, denom: 'USDC' })).toThrow(/single token id/);
|
|
719
804
|
});
|
|
720
805
|
test('approval == buildOrderbookListingApproval for equivalent args (delegation parity)', () => {
|
|
721
806
|
const a = msg.value.approval;
|
|
@@ -737,7 +822,8 @@ describe('listing builder (delegates to canonical)', () => {
|
|
|
737
822
|
expect(msg._meta).toBeUndefined();
|
|
738
823
|
});
|
|
739
824
|
test('accepts ms-since-epoch expiration (parity with bb nfts list; durationToTimestamp rejected it)', () => {
|
|
740
|
-
const a = buildListing({ address: 'bb1seller', collectionId: '1', tokenIds: '4', price: 50, denom: 'USDC', expiration: '1798765432000' }).value
|
|
825
|
+
const a = buildListing({ address: 'bb1seller', collectionId: '1', tokenIds: '4', price: 50, denom: 'USDC', expiration: '1798765432000' }).value
|
|
826
|
+
.approval;
|
|
741
827
|
expect(a.transferTimes).toEqual([{ start: 1n, end: 1798765432000n }]);
|
|
742
828
|
});
|
|
743
829
|
});
|
|
@@ -757,8 +843,7 @@ describe('bid builder (delegates to canonical)', () => {
|
|
|
757
843
|
expect(ct.overrideToWithInitiator).toBe(true);
|
|
758
844
|
});
|
|
759
845
|
test('rejects a true token range', () => {
|
|
760
|
-
expect(() => buildBid({ address: 'bb1b', collectionId: '1', tokenIds: '1-5', price: 1, denom: 'BADGE' }))
|
|
761
|
-
.toThrow(/single token id/);
|
|
846
|
+
expect(() => buildBid({ address: 'bb1b', collectionId: '1', tokenIds: '1-5', price: 1, denom: 'BADGE' })).toThrow(/single token id/);
|
|
762
847
|
});
|
|
763
848
|
test('deterministic approval id for identical params', () => {
|
|
764
849
|
const p = { address: 'bb1bidder', collectionId: '1', tokenIds: '3', price: 25, denom: 'BADGE' };
|
|
@@ -805,7 +890,8 @@ describe('bid builder (delegates to canonical)', () => {
|
|
|
805
890
|
expect(a.approvalCriteria.predeterminedBalances.incrementedBalances.startBalances[0].amount).toBe(5n);
|
|
806
891
|
});
|
|
807
892
|
test('accepts ms-since-epoch expiration (parity with bb nfts bid; durationToTimestamp rejected it)', () => {
|
|
808
|
-
const a = buildBid({ address: 'bb1bidder', collectionId: '1', tokenIds: '3', price: 25, denom: 'BADGE', expiration: '1798765432000' }).value
|
|
893
|
+
const a = buildBid({ address: 'bb1bidder', collectionId: '1', tokenIds: '3', price: 25, denom: 'BADGE', expiration: '1798765432000' }).value
|
|
894
|
+
.approval;
|
|
809
895
|
expect(a.transferTimes).toEqual([{ start: 1n, end: 1798765432000n }]);
|
|
810
896
|
});
|
|
811
897
|
test('deterministic — byte-identical msg for identical params (fixed ms expiry)', () => {
|
|
@@ -828,17 +914,23 @@ describe('pm-sell-intent builder (delegates to canonical)', () => {
|
|
|
828
914
|
const no = buildPmSellIntent({ address: 'bb1', collectionId: '42', token: 'no', amount: 1, price: 1, denom: 'USDC' });
|
|
829
915
|
expect(no.value.approval.tokenIds).toEqual([{ start: 2n, end: 2n }]);
|
|
830
916
|
});
|
|
831
|
-
test('pays seller', () => {
|
|
917
|
+
test('pays seller', () => {
|
|
918
|
+
expect(msg.value.approval.approvalCriteria.coinTransfers[0].to).toBe('bb1seller');
|
|
919
|
+
});
|
|
832
920
|
test('no _meta — byte-identical to the prediction-markets path', () => {
|
|
833
921
|
expect(msg._meta).toBeUndefined();
|
|
834
922
|
});
|
|
835
923
|
test('approval == buildPredictionMarketSellIntent for equivalent args (delegation parity)', () => {
|
|
836
924
|
const a = msg.value.approval;
|
|
837
925
|
const canonical = buildPredictionMarketSellIntent({
|
|
838
|
-
address: 'bb1seller',
|
|
926
|
+
address: 'bb1seller',
|
|
927
|
+
collectionId: '42',
|
|
928
|
+
tokenId: 1n,
|
|
929
|
+
tokenAmount: 100n,
|
|
839
930
|
paymentDenom: a.approvalCriteria.coinTransfers[0].coins[0].denom,
|
|
840
931
|
paymentAmount: BigInt(a.approvalCriteria.coinTransfers[0].coins[0].amount),
|
|
841
|
-
transferTimes: a.transferTimes,
|
|
932
|
+
transferTimes: a.transferTimes,
|
|
933
|
+
approvalId: a.approvalId
|
|
842
934
|
});
|
|
843
935
|
expect(a).toEqual(canonical);
|
|
844
936
|
});
|
|
@@ -848,7 +940,15 @@ describe('pm-sell-intent builder (delegates to canonical)', () => {
|
|
|
848
940
|
expect(a.value.approval.approvalId).toBe(b.value.approval.approvalId);
|
|
849
941
|
});
|
|
850
942
|
test('accepts ms-since-epoch expiration; defaults to a 24h window (parity with bb prediction-markets sell)', () => {
|
|
851
|
-
const fixed = buildPmSellIntent({
|
|
943
|
+
const fixed = buildPmSellIntent({
|
|
944
|
+
address: 'bb1s',
|
|
945
|
+
collectionId: '7',
|
|
946
|
+
token: 'yes',
|
|
947
|
+
amount: 3,
|
|
948
|
+
price: 9,
|
|
949
|
+
denom: 'USDC',
|
|
950
|
+
expiration: '1798765432000'
|
|
951
|
+
}).value.approval;
|
|
852
952
|
expect(fixed.transferTimes).toEqual([{ start: 1n, end: 1798765432000n }]);
|
|
853
953
|
const def = buildPmSellIntent({ address: 'bb1s', collectionId: '7', token: 'yes', amount: 3, price: 9, denom: 'USDC' }).value.approval;
|
|
854
954
|
const span = Number(def.transferTimes[0].end) - Date.now();
|
|
@@ -875,10 +975,14 @@ describe('pm-buy-intent builder (delegates to canonical)', () => {
|
|
|
875
975
|
test('approval == buildPredictionMarketBuyIntent for equivalent args (delegation parity)', () => {
|
|
876
976
|
const a = msg.value.approval;
|
|
877
977
|
const canonical = buildPredictionMarketBuyIntent({
|
|
878
|
-
address: 'bb1buyer',
|
|
978
|
+
address: 'bb1buyer',
|
|
979
|
+
collectionId: '42',
|
|
980
|
+
tokenId: 2n,
|
|
981
|
+
tokenAmount: 200n,
|
|
879
982
|
paymentDenom: a.approvalCriteria.coinTransfers[0].coins[0].denom,
|
|
880
983
|
paymentAmount: BigInt(a.approvalCriteria.coinTransfers[0].coins[0].amount),
|
|
881
|
-
transferTimes: a.transferTimes,
|
|
984
|
+
transferTimes: a.transferTimes,
|
|
985
|
+
approvalId: a.approvalId
|
|
882
986
|
});
|
|
883
987
|
expect(a).toEqual(canonical);
|
|
884
988
|
});
|
|
@@ -890,7 +994,15 @@ describe('pm-buy-intent builder (delegates to canonical)', () => {
|
|
|
890
994
|
expect(buildPmBuyIntent({ ...p, price: 31 }).value.approval.approvalId).not.toBe(a.value.approval.approvalId);
|
|
891
995
|
});
|
|
892
996
|
test('accepts ms-since-epoch expiration; defaults to a 24h window (parity with bb prediction-markets buy)', () => {
|
|
893
|
-
const fixed = buildPmBuyIntent({
|
|
997
|
+
const fixed = buildPmBuyIntent({
|
|
998
|
+
address: 'bb1buyer',
|
|
999
|
+
collectionId: '42',
|
|
1000
|
+
token: 'no',
|
|
1001
|
+
amount: 200,
|
|
1002
|
+
price: 30,
|
|
1003
|
+
denom: 'USDC',
|
|
1004
|
+
expiration: '1798765432000'
|
|
1005
|
+
}).value.approval;
|
|
894
1006
|
expect(fixed.transferTimes).toEqual([{ start: 1n, end: 1798765432000n }]);
|
|
895
1007
|
const def = buildPmBuyIntent({ address: 'bb1buyer', collectionId: '42', token: 'no', amount: 200, price: 30, denom: 'USDC' }).value.approval;
|
|
896
1008
|
const span = Number(def.transferTimes[0].end) - Date.now();
|
|
@@ -900,8 +1012,11 @@ describe('pm-buy-intent builder (delegates to canonical)', () => {
|
|
|
900
1012
|
});
|
|
901
1013
|
describe('canonical PM intent tokenAmount guard (#0431 — bb prediction-markets buy/sell parity)', () => {
|
|
902
1014
|
const base = {
|
|
903
|
-
address: 'bb1t',
|
|
904
|
-
|
|
1015
|
+
address: 'bb1t',
|
|
1016
|
+
collectionId: '9',
|
|
1017
|
+
tokenId: 1n,
|
|
1018
|
+
paymentDenom: 'uusdc',
|
|
1019
|
+
paymentAmount: 1000n,
|
|
905
1020
|
transferTimes: UintRangeArray.From([{ start: 1n, end: 9999999999999n }]),
|
|
906
1021
|
approvalId: 'pm-guard'
|
|
907
1022
|
};
|
|
@@ -921,28 +1036,63 @@ describe('canonical PM intent tokenAmount guard (#0431 — bb prediction-markets
|
|
|
921
1036
|
describe('all collection builders pass verifyStandardsCompliance with zero violations', () => {
|
|
922
1037
|
const builders = [
|
|
923
1038
|
['vault', buildVault({ backingCoin: 'USDC', ...META })],
|
|
924
|
-
[
|
|
1039
|
+
[
|
|
1040
|
+
'vault (with limits)',
|
|
1041
|
+
buildVault({ backingCoin: 'USDC', dailyWithdrawLimit: 100, require2fa: '74', emergencyRecovery: 'bb1recovery', ...META })
|
|
1042
|
+
],
|
|
925
1043
|
['smart-token', buildSmartToken({ backingCoin: 'USDC', ...META })],
|
|
926
1044
|
['smart-token (tradable)', buildSmartToken({ backingCoin: 'USDC', tradable: true, ...META })],
|
|
927
1045
|
['smart-token (ai-agent)', buildSmartToken({ backingCoin: 'BADGE', aiAgentVault: true, ...META })],
|
|
928
1046
|
['subscription (single)', buildSubscription({ interval: 'monthly', price: 10, denom: 'USDC', recipient: 'bb1test', ...META })],
|
|
929
1047
|
['subscription (multi-tier)', buildSubscription({ interval: 'daily', price: 5, denom: 'BADGE', recipient: 'bb1r', tiers: 3, ...META })],
|
|
930
|
-
[
|
|
1048
|
+
[
|
|
1049
|
+
'subscription (multi-payout)',
|
|
1050
|
+
buildSubscription({
|
|
1051
|
+
interval: 'monthly',
|
|
1052
|
+
payouts: [
|
|
1053
|
+
{ recipient: 'bb1a', amount: 5, denom: 'USDC' },
|
|
1054
|
+
{ recipient: 'bb1b', amount: 3, denom: 'USDC' }
|
|
1055
|
+
],
|
|
1056
|
+
...META
|
|
1057
|
+
})
|
|
1058
|
+
],
|
|
931
1059
|
['bounty', buildBounty({ amount: 100, denom: 'USDC', verifier: 'bb1v', recipient: 'bb1r', submitter: 'bb1s', ...META })],
|
|
932
|
-
[
|
|
1060
|
+
[
|
|
1061
|
+
'bounty (BADGE)',
|
|
1062
|
+
buildBounty({ amount: 50, denom: 'BADGE', verifier: 'bb1v', recipient: 'bb1r', submitter: 'bb1s', expiration: '7d', ...META })
|
|
1063
|
+
],
|
|
933
1064
|
['crowdfund', buildCrowdfund({ goal: 1000, denom: 'USDC', crowdfunder: 'bb1fund', ...META })],
|
|
934
1065
|
['crowdfund (with crowdfunder)', buildCrowdfund({ goal: 500, denom: 'BADGE', crowdfunder: 'bb1fund', deadline: '14d', ...META })],
|
|
935
1066
|
['auction', buildAuction({ ...META })],
|
|
936
1067
|
['auction (custom times)', buildAuction({ bidDeadline: '3d', acceptWindow: '1d', ...META })],
|
|
937
1068
|
['product-catalog', buildProductCatalog({ products: [{ name: 'Item', price: 10, denom: 'USDC' }], storeAddress: 'bb1s', ...META })],
|
|
938
|
-
[
|
|
1069
|
+
[
|
|
1070
|
+
'product-catalog (multi)',
|
|
1071
|
+
buildProductCatalog({
|
|
1072
|
+
products: [
|
|
1073
|
+
{ name: 'A', price: 5, denom: 'BADGE' },
|
|
1074
|
+
{ name: 'B', price: 10, denom: 'USDC', maxSupply: 50, burn: true }
|
|
1075
|
+
],
|
|
1076
|
+
storeAddress: 'bb1s',
|
|
1077
|
+
...META
|
|
1078
|
+
})
|
|
1079
|
+
],
|
|
939
1080
|
['prediction-market', buildPredictionMarket({ verifier: 'bb1v', ...META })],
|
|
940
1081
|
['credit-token', buildCreditToken({ paymentDenom: 'USDC', recipient: 'bb1r', ...META })],
|
|
941
1082
|
['credit-token (custom)', buildCreditToken({ paymentDenom: 'BADGE', recipient: 'bb1r', symbol: 'CRED', tokensPerUnit: 50, ...META })],
|
|
942
1083
|
['custom-2fa', buildCustom2FA({ name: 'My 2FA', description: 'A 2FA token.', image: 'ipfs://test-image', creator: 'bb1manager' })],
|
|
943
|
-
[
|
|
1084
|
+
[
|
|
1085
|
+
'custom-2fa (burnable)',
|
|
1086
|
+
buildCustom2FA({
|
|
1087
|
+
name: 'Burnable 2FA',
|
|
1088
|
+
burnable: true,
|
|
1089
|
+
description: 'A burnable 2FA token.',
|
|
1090
|
+
image: 'ipfs://test-image',
|
|
1091
|
+
creator: 'bb1manager'
|
|
1092
|
+
})
|
|
1093
|
+
],
|
|
944
1094
|
['quests', buildQuests({ reward: 10, denom: 'BADGE', maxClaims: 100, ...META })],
|
|
945
|
-
['address-list', buildAddressList({ name: 'My List', description: 'A test list.', image: 'ipfs://test-image' })]
|
|
1095
|
+
['address-list', buildAddressList({ name: 'My List', description: 'A test list.', image: 'ipfs://test-image' })]
|
|
946
1096
|
];
|
|
947
1097
|
for (const [name, msg] of builders) {
|
|
948
1098
|
test(`${name}: zero violations`, () => {
|
|
@@ -1001,8 +1151,7 @@ describe('error handling', () => {
|
|
|
1001
1151
|
expectCleanVerification(msg);
|
|
1002
1152
|
});
|
|
1003
1153
|
test('buildIntent rejects same pay/receive denom (no-op approval)', () => {
|
|
1004
|
-
expect(() => buildIntent({ address: 'bb1a', collectionId: '1', payDenom: 'BADGE', payAmount: 10, receiveDenom: 'BADGE', receiveAmount: 5 }))
|
|
1005
|
-
.toThrow(/denoms must differ/);
|
|
1154
|
+
expect(() => buildIntent({ address: 'bb1a', collectionId: '1', payDenom: 'BADGE', payAmount: 10, receiveDenom: 'BADGE', receiveAmount: 5 })).toThrow(/denoms must differ/);
|
|
1006
1155
|
});
|
|
1007
1156
|
test('buildListing parses single token ID (canonical shape)', () => {
|
|
1008
1157
|
const msg = buildListing({ address: 'bb1a', collectionId: '1', tokenIds: '42', price: 10, denom: 'BADGE' });
|