Skip to content
/ atp Public

ATP (Account Transfer Protocol) is a protocol designed for transferring entire accounts across different blockchains or within the same blockchain. Unlike traditional methods that transfer individual assets, ATP treats an account as a unified object that can contain multiple assets (tokens, NFTs, DeFi positions, etc.).

License

Notifications You must be signed in to change notification settings

mycel-labs/atp

Repository files navigation

ATP - Account Transfer Protocol

ATP (Account Transfer Protocol) is a protocol designed for transferring entire accounts across different blockchains or within the same blockchain. Unlike traditional methods that transfer individual assets, ATP treats an account as a unified object that can contain multiple assets (tokens, NFTs, DeFi positions, etc.).

Key Features

  • Entire Account Transfer: Transfer all assets in an account at once rather than individual tokens
  • Cross-Chain Flexibility: Move accounts across different blockchain ecosystems
  • Secure Key Management: Uses Internet Computer's threshold ECDSA and Schnorr signing capabilities
  • State-Based Security Model: Accounts transition through different states (Locked, Unlocked, Active) to ensure secure transfers

Documentation

For detailed documentation, see the following:

Network Configuration

ATP provides pre-built binaries for different environments:

  • Local: ic-atp-local.wasm (uses dfx_test_key)
  • Test: ic-atp-test.wasm (uses test_key_1)
  • Production: ic-atp-production.wasm (uses key_1)

Download the appropriate binaries from the latest GitHub release and update your dfx.json accordingly.

See the Getting Started guide for more details on network configuration.

Quick Start

Using Pre-built Binaries (Recommended)

Create a new project and configure it to use ATP from GitHub releases:

# Initialize dfx project
dfx new my_project
cd my_project

Update dfx.json to use ATP binary

{
  "canisters": {
    "ic-atp": {
      "type": "custom",
      "candid": "https://github.com/mycel-labs/atp/releases/latest/download/ic-atp-local.did",
      "wasm": "https://github.com/mycel-labs/atp/releases/latest/download/ic-atp-local.wasm"
    }
  }
}

Replace atp-local with atp-test or atp-production as needed for your target environment.

State Transitions

Accounts in ATP go through various state transitions:

stateDiagram-v2
    [*] --> Locked: create_account()
    Locked --> Unlocked: transfer_account() by approved address
    Locked --> Unlocked: unlock() by owner
    Unlocked --> Locked: lock() by owner or approved address
    Unlocked --> Active: activate() by owner
    Active --> Active: sign() by owner
    Active --> [*]
Loading

Key Endpoints

  • create_account: Create a new account with specified algorithm and curve
  • transfer_account: Transfer account ownership to another principal
  • activate_account: Activate an unlocked account
  • sign: Sign a message with the account's private key
  • sign_eip1559_transaction: Sign an Ethereum transaction

For more details, see the API Reference.

Reference

About

ATP (Account Transfer Protocol) is a protocol designed for transferring entire accounts across different blockchains or within the same blockchain. Unlike traditional methods that transfer individual assets, ATP treats an account as a unified object that can contain multiple assets (tokens, NFTs, DeFi positions, etc.).

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •