@abcwalletio/aptos
v1.0.0
Published
ABC WaaS Aptos adapter — MPC-based AIP-62 Wallet Standard compatible wallet (ed25519)
Readme
@abcwalletio/aptos
ABC WaaS SDK의 Aptos 체인 어댑터입니다. AIP-62 Wallet Standard를
구현하므로 @aptos-labs/wallet-adapter-react가 어댑터를 자동 감지합니다.
Installation
pnpm add @abcwalletio/aptos @abcwalletio/core @aptos-labs/ts-sdk @aptos-labs/wallet-standardPeer Dependencies
@abcwalletio/core@aptos-labs/ts-sdk>=1.0.0@aptos-labs/wallet-standard>=1.0.0@wallet-standard/base/@wallet-standard/wallet>=1.0.0
Quick Start
import { createWaasSDK, LocalStorageAdapter } from '@abcwalletio/core';
import { AbcAptosAdapter } from '@abcwalletio/aptos';
const sdk = await createWaasSDK({
storage: new LocalStorageAdapter(),
auth: { v2: { clientId: '...', clientSecret: '...' } },
});
// Aptos는 ed25519 키 사용
await sdk.mpc.generateKeyShare('ed25519', 'password');
const adapter = new AbcAptosAdapter({
sdk,
requestPassword: async () => prompt('MPC 비밀번호?') ?? '',
});
// AIP-62 Wallet Standard로 전역 등록
// wallet-adapter-react의 AptosWalletAdapterProvider가 자동 감지합니다.
adapter.register();
// 또는 React 사용 시 plugins prop으로 전달:
// <AptosWalletAdapterProvider plugins={[adapter]}>API
new AbcAptosAdapter(config)
interface AbcAptosAdapterConfig {
sdk: WaasSDK;
requestPassword: () => Promise<string>;
keyId?: string; // 생략 시 sdk.mpc.getDefaultKeyId('ed25519') 자동 조회
network?: NetworkInfo; // 기본값: MAINNET
}편의 메서드 (wallet-adapter 없이 직접 사용)
| 메서드 | 설명 |
|--------|------|
| register() | AIP-62 표준으로 글로벌 등록 |
| getAddress() | Aptos 계정 주소 반환 |
| getPublicKey() | Ed25519PublicKey 반환 |
| signRawMessage(msg) | Uint8Array → Ed25519Signature |
| signRawTransaction(signingMsg) | BCS 서명 메시지 → AccountAuthenticatorEd25519 |
AIP-62 Feature 구현
features 속성으로 다음 namespace를 제공합니다:
AptosConnectNamespaceAptosDisconnectNamespaceAptosGetAccountNamespaceAptosGetNetworkNamespaceAptosSignMessageNamespaceAptosSignTransactionNamespaceAptosOnAccountChangeNamespace/AptosOnNetworkChangeNamespace(no-op)
License
MIT — Copyright (c) 2026 Ahnlab Blockchain Company
