Managed Transactions

AWS for public blockchain transactions.

See full API documentation here.

Quickly broadcast transactions on behalf of your users to one of our supported public blockchain networks without having to buy or hold cryptocurrency or tokens.

TypeScript
TypeScript
import { bookieClientFactory, identClientFactory } from 'provide-js';
const appId = '<provide app id>'; // the app id
const appAccessToken = '<signed jwt>'; // application token
// initialize ident instance for the application
const ident = identClientFactory(accessToken);
// create a virtual application user
const virtualUser = await ident.createUser({
application_id: appId,
email: `joe.user.${new Date().getTime()}@example.com`,
first_name: 'Joe',
last_name: 'User',
})
console.log(virtualUser.id); // associate this id with your local user
const userAccessToken = (await ident.createToken({
application_id: appId,
user_id: virtualUser.id,
scope: 'offline_access',
})).accessToken!;
// the refresh token is also returned here and should also be persisted
// and used to create future access tokens...
// initialize bookie (api.providepayments.com) instance for the user
const bookie = bookieClientFactory(userAccessToken);
// create a payment for the user...
const payment = await bookie.createPayment({
data: '0x',
network: 'ropsten',
});