Skip to content
status-imPublic

About

The "backend" library for Status Apps

Topics

Resources

Contributing

Stars

760 stars

Watchers

86 watching

Forks

Latest commit

 

History

6,761 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unit Tests Functional Tests

status-go

status-go is the backbone library of Status App. It acts as a "backend" for both applications and implements most of the Status apps business logic.

A comprehensive list of status-go functionality can be found in Brief overview.

Docs

Nim token-library dependency

Status-go uses the public nim-token-lists Go wrapper and native library pinned to the same revision, in go.mod and status_go.nimble. make build-libtkl builds it from status-go's Nimble resolution. It requires Go, Nimble 0.26 and the platform C toolchain.

An unchanged build reuses the compiled archive. A changed resolution, compiler or build configuration rebuilds it. make test-libtkl checks the dependency and ABI.

For controlled builds with prebuilt artifacts, supply both NIM_TKL_INC_DIR (containing tkl.h) and NIM_TKL_LIB_DIR (containing the isolated libtkl.a). Both must come from the recorded revision and target. Nix and managed builds include libtkl.target beside the archive, recording GOOS/GOARCH (plus /iphoneos or /iphonesimulator for iOS). Prebuilt target metadata must match the requested build. Mobile Make targets discard inherited prebuilt paths and prepare their own target archive. The managed build supports Linux and macOS (amd64/arm64), Windows (amd64 with MinGW), Android (arm64/amd64) and iOS (arm64 device, arm64/amd64 simulator). Archives are kept separately under build/tkl/<target>/<fingerprint>/link; device and simulator archives are never reused for one another.

Use the existing mobile targets, for example:

make statusgo-android-library ARCH=arm64 \
  ANDROID_NDK_ROOT="$ANDROID_NDK_ROOT" HOST_OS=darwin ANDROID_API=28
make statusgo-ios-library ARCH=arm64 \
  IPHONE_SDK=iphonesimulator IOS_TARGET=14.0

Android uses NDK 27.2.12479018 and API 28 or newer; use HOST_OS=linux on Linux. iOS requires Xcode, with minimum iOS 13 for devices and Intel simulators, or 14 for arm64 simulators. The token library uses the same SDK and minimum as the Go consumer. For Linux cross builds, supply the target CC, TKL_LD, TKL_OBJCOPY and TKL_AR; native builds use the host tools. Windows builds run in a MinGW64 shell with CC=gcc.

Token catalogue

The C-backed Nim catalogue is the sole token backend. Normal executable, shared/static library, mobile, test and lint Make targets prepare its native dependency automatically. The tkl build tag is no longer needed. For direct Go commands, use bash scripts/tkl_env.sh go test ... or source that script in the same shell first (it enables strict shell mode).

Wallet consumers and the native facade use status-go's token/list DTOs in pkg/services/wallet/token/tokenlist. Their JSON fields, token-key format and database schema remain unchanged. The offline list analyzer uses the same C facade. No packages under go-wallet-sdk/pkg/tokens are used; unrelated SDK packages remain dependencies.

The tokenListsUseNim and tokenListsShadow configuration fields have been removed. Older JSON containing those names is decoded with them ignored. There is no runtime SDK rollback or shadow comparison. A rollback requires rebuilding an earlier version.

For a shared-library build, run make statusgo-shared-library. The target retains the existing libsds preparation and accepts the NIM_SDS_LIB_DIR and NIM_SDS_INC_DIR overrides for prebuilt inputs. Set NIM to select the compiler. The target prepares the pinned native library and reuses both its archive and libstatus when their inputs match. Native changes invalidate Go's cgo cache; source, build-option or output changes invalidate the backend cache. Shared-library builds keep tkl_* symbols private. On Windows, managed archives also have explicit DLL export directives removed. A supplied Windows prebuilt archive must likewise omit .drectve when hiding exports. Static-library builds bundle libtkl into libstatus.a, so the application does not need a separate token-library linker input. Export hiding and verification still happen at the final application link.

scripts/test_tkl_link.sh verifies a small Go shared-library consumer on Linux, macOS, Android and Windows. The Token library integration workflow checks native consumers and DLL exports. scripts/test_tkl_static.sh links a C application to the bundled Go archive on Linux, macOS, iOS and Windows, checks private exports, and runs it on the native host. make test-libtkl-coexistence checks both Nim runtimes in one process, using the existing SDS directory overrides or building SDS through its normal Make prerequisite. The Unit Tests workflow runs this target in the toolchain image, with the SDS it built. Full application packaging and device runtime checks remain part of release validation.

License

Mozilla Public License 2.0

About

The "backend" library for Status Apps

Topics

Resources

Contributing

Stars

760 stars

Watchers

86 watching

Forks

Releases

Used by

Contributors

Languages