Skip to content

MystenLabs/pas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚠️ Project is in progress and might have constant breaking changes!

Permissioned Assets 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.

About

Permissioned Assets Standard: An alternative to closed loop token

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors