Adds approval details to off-chain storage.
Adds a balance map to off-chain storage. Mode can either be 'ipfs" for storing on IPFS or 'centralized' for storing on DigitalOcean.
Adds metadata to IPFS.
Broadcasts a transaction to the blockchain.
POST /api/v0/broadcast
await BitBadgesApi.broadcastTx(payload);
Also, consider checking out Broadcast UI, so you can simply copy and paste your transaction to a UI. All signing, API communication, etc is outsourced to the UI.
Calculates points for a page in an application and caches the result.
Checks if a claim has been successfully completed.
Checks if the user is signed in.
Optional
payload: iCheckSignInStatusPayloadFor password based approvals, we hand out codes behind the scenes whenever a user requests a password. This is to prevent replay attacks on the blockchain. This API call will return a valid code if a valid password is provided.
Each address is limited to one code per password. If the password is provided again, they will receive the same code.
Creates address lists stored by BitBadges centralized servers.
Creates an API key.
Creates an application.
Creates an off-chain attestation signature (typically a credential).
Creates an developer app.
Creates a dynamic data bin.
Creates a payment intent for the user to pay.
Creates a plugin.
Creates a SIWBB request.
Optional
payload: iCreateSIWBBRequestPayloadCreates a utility listing.
Deletes address lists. Must be created off-chain.
Deletes an API key.
Deletes an application.
Deletes an off-chain attestation signature (typically a credential).
Deletes a connected Stripe account.
Deletes an developer app.
Deletes a dynamic data bin.
Deletes a plugin.
Deletes a SIWBB request.
Optional
payload: iDeleteSIWBBRequestPayloadDeletes a utility listing.
Gets and verifies a SIWBB request.
Optional
payload: iExchangeSIWBBAuthorizationCodePayloadFetches arbitrary metadata directly from IPFS. This is useful for fetching metadata that is not stored on-chain.
Filters badges in a collection based on multiple filter values.
Gets the filter suggestions based on attributes in a collection.
Optional
payload: iFilterSuggestionsPayloadGenerates an Apple wallet pass for a code.
Returns application/vnd.apple.pkpass content type.
Generates an Google wallet pass for a code. Returns a saveUrl to be opened.
Gets an account by address or username.
Gets accounts and accompying details.
POST /api/v0/users
await BitBadgesApi.getAccounts(payload);
Gets all active authorizations for a user.
Optional
payload: iGetActiveAuthorizationsPayloadGet an address list by ID.
Optional
payload: iGetAddressListPayloadGets activity for a specific address list.
Gets claims for a specific address list.
Gets listings for a specific address list.
Gets address lists. Can be on-chain or off-chain.
Get address lists for a specific account. Specify the viewType to determine what address lists to retrieve.
Get an application by ID.
Optional
payload: iGetApplicationPayloadGets applications.
Gets the attempt data for a specific claim attempt from the request bin plugin.
Optional
payload: iGetAttemptDataFromRequestBinPayloadGet attestation by ID.
Optional
payload: iGetAttestationPayloadGet an off-chain attestation signature (typically a credential).
Gets attestations by type for a specific user. Specify the viewType to determine what attestations to retrieve.
Gets the activity for a specific badge in a collection
Gets the balance of a specific badge for a specific address
Optional
payload: iGetBadgeBalanceByAddressPayloadGets the badge balance for an address at the current time. This is a streamlined version of getBadgeBalanceByAddress.
Optional
payload: iGetBadgeBalanceByAddressPayloadGets current metadata for a specific badge in a collection.
Gets badges for a specific user. Specify the viewType to determine what badges to retrieve.
Gets details for a browse / explore page.
Get a claim by ID.
Optional
payload: iGetClaimPayloadGets claim activity by type for a specific user. Specify the viewType to determine what claim activity to retrieve.
Gets claim alerts for a specific user. Specify viewType 'received' or 'sent' to determine what claim alerts to retrieve.
Gets claim attempts.
Gets the status of a claim attempt.
Gets the claim by ID.
Gets a specific collection.
Optional
payload: iGetCollectionPayloadGets a specific amount tracker by ID for a collection
Gets amount trackers for a specific collection.
Gets a specific challenge tracker by ID for a collection
Gets challenge trackers for a specific collection.
Gets claims for a specific collection.
Gets listings for a specific collection.
Gets owners for a specific collection.
This function retrieves badge collections and accompanying details. Consider using the getCollectionsAndUpdate
function instead for native support in handling paginations, appending metadata, and more.
POST /api/v0/collections
Gets transfer activity for a specific collection.
Gets all connected Stripe accounts.
Get developer app by ID.
Optional
payload: iGetDeveloperAppPayloadGet all developer apps for a user.
Get dynamic data store activity
Get a dynamic data store by ID.
Optional
payload: iGetDynamicDataStorePayloadGets dynamic data stores.
Get a dynamic data store value by ID.
Optional
payload: iGetDynamicDataStoreValuePayloadGet a dynamic data store values paginated by ID.
Optional
payload: iGetDynamicDataStoreValuesPaginatedPayloadOptional
payload: iGetOrCreateEmbeddedWalletPayloadGet the gated content for a claim.
Optional
payload: iGetGatedContentForClaimPayloadGets lists activity for a specific user.
Get map by ID
Optional
payload: iGetMapPayloadGets the owners for a specific badge in a collection
Get plugin by ID.
Optional
payload: iGetPluginPayloadGet all developer apps for a user.
Gets points activity for an application.
Gets points activity for a specific user.
Gets the refresh status for a collection. Used to track if any errors occur during a refresh, or if it is in the queue or not.
For on-chain claims where codes are "reserved" for a specific address, this function will return all codes reserved.
Search collections, badges, accounts, address lists based on a search value.
Optional
payload: iGetSearchPayload<NumberType>Gets the sign in challenge to be signed for authentication. The returned is the message to be signed by the user.
Gets the SIWBB requests for a specific developer app.
Gets Sign-In with BitBadges (SIWBB) requests (authentication requests) for a user.
Gets the current status details about the blockchain / indexer (gas, block height, etc).
Optional
payload: iGetStatusPayloadGets the tokens from the faucet. This will only work on betanet.
Optional
payload: iGetTokensFromFaucetPayloadGets transfer activity for a specific user.
Get utility listing by ID.
Optional
payload: iGetUtilityListingPayloadGets utility listings.
Performs multiple actions for a dynamicStore in batch.
Triggers a metadata refresh for a specific collection. BitBadges API uses a refresh queue system for fetching anything off-chain. This will refetch any details for the collection (such as metadata, balances, approval details, etc). Note it will reject if recently refreshed. Uses a cooldown of 5 minutes.
Optional
payload: iRefreshMetadataPayloadRevokes an access token for a user.
Rotates an API key.
Rotates a SIWBB request.
Searches for applications.
Searches for claims.
Searches for developer apps.
Searches dynamic data stores.
Searches for plugins.
Searches for utility listings.
Sends claim alert notifications out.
Signs the user out.
Optional
payload: iSignOutPayloadSimulates a claim attempt. A success response means the claim is valid and can be completed.
Simulates a transaction on the blockchain.
POST /api/v0/simulate
await BitBadgesApi.simulateTx(payload);
This means that it will return the gas used and any errors that occur on a dry run. Should be used before broadcasting a transaction. Does not require signatures.
Updates the profile / account information for a user. We will only update the provided fields.
Updates the addresses of an address list.
Updates the core details of an address list.
Updates address lists stored by BitBadges centralized servers.
Warning: This is legacy and an all-inclusive route used by the frontend. Please opt for more fine-grained routes/
Warning: This route requires ALL claims to be provided. If any are not provided, they will not be included moving forward and will be deleted. To update an individual claim, you can use the update claim endpoint.
Updates an application.
Update a attestation.
Update an developer app.
Updates a dynamic data bin.
Updates a plugin.
Updates the user's seen activity.
Updates a utility listing.
Uploads balances for off-chain indexed balances managed by BitBadges.
Verifies an attestation.
A generic route for verifying asset ownership requirements. Asset requirements support AND / OR / NOT logic.
Verifies the user signed challenge and grants them a valid session if everything checks out.
A generic route for verifying SIWBB requests. Used as a helper if implementing on your own.
This is the BitBadgesAPI class which provides all typed API calls to the BitBadges API. See official documentation for more details and examples. Must pass in a valid API key. , iGetDeveloperAppsPayload convertFunction is used to convert any responses returned by the API to your desired NumberType.
By default, we use the official API URL (https://api.bitbadges.io). You can override this by passing in a custom apiUrl.
See
BitBadges API Documentation