Packages
packages.abi
The full Move interface of a package: modules, functions, structs, enums and events.
Details
- Endpoint
- GET /v1/packages/:id/abi
- Credits
- 2
- Rate class
- Light. Counts against your light requests per second.
Returns every module of one package id with its functions (visibility, entry flag, type parameters with constraints, parameters and returns as readable Move types such as &mut 0x2::coin::Coin<T0>), its structs and enums (abilities, fields with types) and the events the package emits. TxContext parameters are dropped because the chain adds them. Events are the structs the module bytecode passes to event::emit; if the bytecode listing is unavailable they are the event-like structs (copy and drop) and eventsSource says so. A package id is immutable, so the answer never changes; use packages.versions to see other versions.
Parameters
| Name | Type | Description |
|---|---|---|
| idrequired | string | Package id (0x...), one specific version. |
Request
Send your key in the x-api-key header, or leave it out to use the keyless tier.
curl "https://api.tide.ad/v1/packages/0x2c8d603bc51326b8c13cef9dd07031a408a48dddb541963357661df5d3204809/abi" \
-H "x-api-key: YOUR_API_KEY"const res = await fetch("https://api.tide.ad/v1/packages/0x2c8d603bc51326b8c13cef9dd07031a408a48dddb541963357661df5d3204809/abi", {
headers: {
"x-api-key": process.env.TIDE_API_KEY!,
},
});
const data = await res.json();Response
{
"packageId": "0x2c8d603bc51326b8c13cef9dd07031a408a48dddb541963357661df5d3204809",
"originalId": "0x2c8d603bc51326b8c13cef9dd07031a408a48dddb541963357661df5d3204809",
"version": 1,
"modules": [
{
"name": "account",
"functions": [
{
"name": "active_stake",
"visibility": "public",
"isEntry": false,
"callableFromPtb": true,
"typeParams": [],
"params": [
{
"type": "&0x2c8d603bc51326b8c13cef9dd07031a408a48dddb541963357661df5d3204809::account::Account",
"reference": "ref"
}
],
"returns": [
{
"type": "u64",
"reference": "none"
}
],
"signature": "public fun active_stake(&0x2c8d603bc51326b8c13cef9dd07031a408a48dddb541963357661df5d3204809::account::Account): u64"
},
{
"name": "add_order",
"visibility": "friend",
"isEntry": false,
"callableFromPtb": false,
"typeParams": [],
"params": [
{
"type": "&mut 0x2c8d603bc51326b8c13cef9dd07031a408a48dddb541963357661df5d3204809::account::Account",
"reference": "mut"
}
],
"returns": [],
"signature": "public(package) fun add_order(&mut 0x2c8d603bc51326b8c13cef9dd07031a408a48dddb541963357661df5d3204809::account::Account, u128)"
}
],
"structs": [
{
"name": "Account",
"kind": "struct",
"type": "0x2c8d603bc51326b8c13cef9dd07031a408a48dddb541963357661df5d3204809::account::Account",
"abilities": [
"copy"
],
"typeParams": [],
"fields": [
{
"name": "epoch",
"type": "u64"
}
],
"eventLike": true,
"emitted": false,
"emittedIn": []
}
]
},
{
"name": "balance_manager",
"functions": [
{
"name": "balance",
"visibility": "public",
"isEntry": false,
"callableFromPtb": true,
"typeParams": [
{
"name": "T0",
"constraints": []
}
],
"params": [
{
"type": "&0x2c8d603bc51326b8c13cef9dd07031a408a48dddb541963357661df5d3204809::balance_manager::BalanceManager",
"reference": "ref"
}
],
"returns": [
{
"type": "u64",
"reference": "none"
}
],
"signature": "public fun balance<T0>(&0x2c8d603bc51326b8c13cef9dd07031a408a48dddb541963357661df5d3204809::balance_manager::BalanceManager): u64"
},
{
"name": "delete",
"visibility": "friend",
"isEntry": false,
"callableFromPtb": false,
"typeParams": [],
"params": [
{
"type": "0x2c8d603bc51326b8c13cef9dd07031a408a48dddb541963357661df5d3204809::balance_manager::BalanceManager",
"reference": "none"
}
],
"returns": [],
"signature": "public(package) fun delete(0x2c8d603bc51326b8c13cef9dd07031a408a48dddb541963357661df5d3204809::balance_manager::BalanceManager)"
}
],
"structs": [
{
"name": "BalanceEvent",
"kind": "struct",
"type": "0x2c8d603bc51326b8c13cef9dd07031a408a48dddb541963357661df5d3204809::balance_manager::BalanceEvent",
"abilities": [
"copy"
],
"typeParams": [],
"fields": [
{
"name": "balance_manager_id",
"type": "0x2::object::ID"
}
],
"eventLike": true,
"emitted": true,
"emittedIn": [
"emit_balance_event"
]
},
{
"name": "BalanceKey",
"kind": "struct",
"type": "0x2c8d603bc51326b8c13cef9dd07031a408a48dddb541963357661df5d3204809::balance_manager::BalanceKey",
"abilities": [
"copy"
],
"typeParams": [
{
"name": "T0",
"constraints": [],
"phantom": true
}
],
"fields": [
{
"name": "dummy_field",
"type": "bool"
}
],
"eventLike": true,
"emitted": false,
"emittedIn": []
}
]
}
],
"events": [
{
"module": "balance_manager",
"name": "BalanceEvent",
"type": "0x2c8d603bc51326b8c13cef9dd07031a408a48dddb541963357661df5d3204809::balance_manager::BalanceEvent",
"abilities": [
"copy",
"drop"
],
"typeParams": [],
"fields": [
{
"name": "balance_manager_id",
"type": "0x2::object::ID"
},
{
"name": "asset",
"type": "0x1::type_name::TypeName"
}
],
"emittedIn": [
"emit_balance_event"
]
},
{
"module": "deep_price",
"name": "PriceAdded",
"type": "0x2c8d603bc51326b8c13cef9dd07031a408a48dddb541963357661df5d3204809::deep_price::PriceAdded",
"abilities": [
"copy",
"drop"
],
"typeParams": [],
"fields": [
{
"name": "conversion_rate",
"type": "u64"
},
{
"name": "timestamp",
"type": "u64"
}
],
"emittedIn": [
"emit_deep_price_added"
]
}
],
"eventsSource": "Structs the module bytecode passes to event::emit.",
"counts": {
"modules": 20,
"functions": 376,
"structs": 46,
"events": 14
},
"asOf": {
"checkpoint": 341533043,
"timestamp": "2026-11-04T10:49:43.393Z",
"lagMs": 951
}
}Long lists are cut to a few items here.