> ## Documentation Index
> Fetch the complete documentation index at: https://docs.canton.network/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> If you are building a Canton Network application, start from https://docs.canton.network/appdev/quickstart.md. To run only a local network for your own Daml code, without building the QuickStart demo, see https://docs.canton.network/sdks-tools/development-tools/localnet.md.

# GetPackage

Ledger API

›

[gRPC API](https://docs.canton.network/reference/grpc-ledger-api-reference/overview.md)

›

[v2](https://docs.canton.network/reference/grpc-ledger-api-reference/com-daml-ledger-api-v2.md)

›

GetPackage

com.daml.ledger.api.v2

# GetPackage

gRPC

RPC

`/com.daml.ledger.api.v2.PackageService/GetPackage`

## Protocol Details

Protocol
gRPC

Service
PackageService

RPC
GetPackage

Client stream
No

Server stream
No

## Inputs

### GetPackageRequest

Message
com.daml.ledger.api.v2.GetPackageRequest

Client stream
No

`package_id`
string

## Outputs

### GetPackageResponse

Message
com.daml.ledger.api.v2.GetPackageResponse

Server stream
No

`hash_function`
HashFunction

`archive_payload`
bytes

`hash`
string

## Related Schemas

> [accordion] com.daml.ledger.api.v2.GetPackageRequest
>
> `package_id`
> string

> [accordion] com.daml.ledger.api.v2.GetPackageResponse
>
> `hash_function`
> HashFunction
>
> `archive_payload`
> bytes
>
> `hash`
> string

> [accordion] com.daml.ledger.api.v2.HashFunction
>
> <ul>
>   <li>`HASH_FUNCTION_SHA256`</li>
> </ul>

grpcurl

```bash grpcurl theme={"theme":{"light":"github-light","dark":"github-dark"}}
# Add -plaintext if the server is not using TLS.
grpcurl \
  -d @ \
  <HOST:PORT> \
  com.daml.ledger.api.v2.PackageService/GetPackage <<'EOF'
{
  "packageId": "string"
}
EOF
```

OK

application/json

```json OK theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "hashFunction": "HASH_FUNCTION_SHA256",
  "archivePayload": "BASE64_ENCODED_BYTES",
  "hash": "string"
}
```
