Skip to content

aplane-algo/aplanesdk

Repository files navigation

APlane SDKs

SDKs for integrating applications and agents with apsigner.

This repository contains the public client SDKs only. The main APlane application, signer, shell, LogicSig providers, and operational tooling live in the AGPL-licensed aplane-algo/aplane repository.

Packages

SDK Directory Package
Go go/ github.com/aplane-algo/aplanesdk/go
Python python/ aplanesdk
TypeScript typescript/ aplanesdk

Shared signer API contract fixtures live under contracts/signerapi/ and are used by all SDK test suites.

Development

Go:

cd go
go test ./...

Python:

cd python
pytest -v

TypeScript:

cd typescript
npm install
npm test

Live Signer Integration Tests

The SDK integration tests are external-client tests against a running apsigner. They are skipped during normal unit tests unless APLANE_SDK_INTEGRATION=1 is set.

The canonical entry point is the APlane harness:

cd ~/aplane
APLANE_SDKS_REPO=~/aplanesdk make integration-test

The expected fixture is the one generated by the main APlane repo:

cd ~/aplane
export TEST_FUNDING_MNEMONIC="your twenty five word testnet mnemonic"
./test/setup-test-env.sh
set -a && . ./.env.test && set +a
mkdir -p "$APSIGNER_DATA/run"
chmod 700 "$APSIGNER_DATA/run"
go build -o temp/apsigner-sdk-test ./cmd/apsigner
(cd "$APSIGNER_DATA" && ~/aplane/temp/apsigner-sdk-test)

In another shell, source the same .env.test and run:

cd ~/aplanesdk
set -a && . ~/aplane/.env.test && set +a
make integration-test

The tests discover the signer URL from APSIGNER_DATA/config.yaml and the token from APCLIENT_DATA/aplane.token. You can also pass explicit SDK-facing values:

APLANE_SDK_SIGNER_URL=http://127.0.0.1:11270 \
APLANE_SDK_TOKEN_FILE=/path/to/aplane.token \
make integration-test

Optional variables:

  • APLANE_SDK_TOKEN: inline token, preferred over token files
  • APLANE_SDK_TOKEN_FILE: token file path
  • APLANE_SDK_KEY_TYPE: key type to generate and sign with, defaults to ed25519

Each SDK test mirrors a basic apshell signer-facing workflow: health, signer status, key type discovery, key generation, key inventory refresh, offline signing of a 0-ALGO self-payment, key deletion, and keyset revision checks.

License

MIT. See LICENSE.

About

APlane SDKs for Go, Python, and TypeScript

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors