🔮Medici SDK Quickstart
You are ready to get started! Below is the basic flow for setting up an RWA Client and minting new tokens using Medici.
Install Package
yarn add @bridgesplit/rwa-token-sdkInitialize RWA Client
const connectionUrl = process.env.RPC_URL ?? 'http://localhost:8899';
const connection = new Connection(connectionUrl);
const confirmationOptions: ConfirmOptions = {
skipPreflight: false,
maxRetries: 3,
commitment: 'processed'
}
const config: Config = {
connection: connection,
rpcUrl: connectionUrl,
confirmationOptions: confirmationOptions
}
/* Setup: payerKp, is just the keypair who will pay for the tx. */
const rwaClient = new RwaClient(config, new Wallet(setup.payerKp))Initialize an Asset Controller
Setup Data Registry
Attach a Policy
Setup the First User
Issue Tokens
Transfer Tokens
Revoke Tokens
Last updated