API Reference

Complete API reference for OneKey's Aptos provider

Complete reference for OneKey's Aptos provider methods and types.


Methods

Method
Description

connect()

Connect wallet and get account

disconnect()

Disconnect wallet

isConnected()

Check connection status

account()

Get current account info

network()

Get current network name

getNetwork()

Get full network info

getNetworkURL()

Get network RPC URL

signMessage(request)

Sign arbitrary message

signAndSubmitTransaction(payload, options?)

Sign and submit transaction

signTransaction(payload, options?)

Sign transaction without submitting

signTransactionV2(params)

Sign BCS-serialized transaction

signAndSubmitTransactionV2(params)

Sign and submit (Standard V1.1.0)

signIn(payload)

AIP sign-in flow

onAccountChange(callback)

Listen for account changes

onNetworkChange(callback)

Listen for network changes

onDisconnect(callback)

Listen for disconnect


Types

Account Info

Network Info

Sign Message Request

Sign Message Response

Transaction Payload

Sign Transaction V2 Params


Supported Networks

Network
Description

Mainnet

Production network

Testnet

Testing environment

Devnet

Development environment


Events

Event
Callback Parameters
Description

accountChanged

address: string | null

Account changed

accountChangedV2

account: AptosAccountInfo | null

Account changed (full info)

networkChange

network: string | null

Network changed

disconnect

-

Wallet disconnected


Error Codes

Code
Description

4001

User rejected request

4100

Unauthorized

4200

Unsupported method

4201

Unsupported network

-32603

Internal error

Last updated

Was this helpful?