Skip to content

Latest commit

 

History

History
49 lines (36 loc) · 1.52 KB

File metadata and controls

49 lines (36 loc) · 1.52 KB

Permissioned Asset Standard

Repository Structure

packages/
  pas/          # Core PAS Move package (accounts, policies, requests)
  ptb/          # PTB helper Move package
  examples/     # Example Move packages (e.g. KYC-gated coin)
scripts/
  example-app/  # TypeScript example app using @mysten/pas

Contents

For a detailed design overview, see ARCHITECTURE.md.

SDK

The TypeScript SDK is published as @mysten/pas and lives in the ts-sdks repository.

npm install @mysten/pas

It plugs into the Sui client via the $extend pattern:

import { SuiGrpcClient } from '@mysten/sui/grpc';
import { Transaction } from '@mysten/sui/transactions';
import { pas } from '@mysten/pas';

const client = new SuiGrpcClient({ network: 'testnet' }).$extend(pas());

// Send a permissioned balance
const tx = new Transaction();
tx.add(client.pas.call.sendBalance({
  from: sender, // the sender's address
  to: "0x2", // the recipient's address (NOT the account)
  amount: 1_000_000,
  assetType: "0xa::permissioned::ASSET",
}));

See scripts/example-app/ for a full working example.