code wiki / (root) / nx_acme_porkbun.nx

nx_acme_porkbun.nx

buildroot/runtime/nx_acme_porkbun.nx

11271 B250 linesdepth 20pulls 136 transitivereach 13 importersview sourcekind librarytopic acme
docsdependenciesstructsconstsfunctions

about

nx_acme_porkbun.nx -- Porkbun DNS API client for ACME DNS-01. Sets / deletes the _acme-challenge TXT record so Let's Encrypt can validate domain control. Porkbun JSON API v3 (api.porkbun.com): POST /api/json/v3/dns/create/{domain} {"apikey","secretapikey","type":"TXT","name","content","ttl"} POST /api/json/v3/dns/deleteByNameType/{domain}/TXT/{subdomain} {"apikey","secretapikey"} -> {"status":"SUCCESS",...} | {"status":"ERROR","message":...} Composes nx_acme_http (validated TLS POST + JSON reader). Porkbun's cert chains to Amazon Root CA 1 (RSA-2048, in the Mozilla store) so the sovereign TLS client validates it. Creds come from the sovereign vault (caller passes them in; never hardcoded). Requires per-domain API access toggled ON in Porkbun. license_tier: ORIGINAL

dependencies 1 imports · 10 importers

nx_acme_http.nx nx_acme_porkbun.nx nx_acme_dns01_issue.nx nx_acme_dns01_propagation_gate.nx nx_golive_dns_gate.nx nx_porkbun_dns_show.nx nx_porkbun_dnssec_check.nx nx_porkbun_domain.nx nx_porkbun_ping_probe.nx nx_porkbun_publish_a.nx nx_tls12_porkbun_e2e_gate.nx nx_tls12_reconnect_stress_gate.nx

imports: nx_acme_http.nx

imported by: nx_acme_dns01_issue.nxnx_acme_dns01_propagation_gate.nxnx_golive_dns_gate.nxnx_porkbun_dns_show.nxnx_porkbun_dnssec_check.nxnx_porkbun_domain.nxnx_porkbun_ping_probe.nxnx_porkbun_publish_a.nxnx_tls12_porkbun_e2e_gate.nxnx_tls12_reconnect_stress_gate.nx

structs

none

consts

20const NX_MAGIC_1024: i64 = 1024
21const NX_MAGIC_4194304: i64 = 4194304
22const NX_MAGIC_1779284141: i64 = 1779284141
23const NX_MAGIC_16384: i64 = 16384
25const NX_PORKBUN_OK: i64 = 0
26const NX_PORKBUN_HTTP_FAIL: i64 = 1
27const NX_PORKBUN_BAD_STATUS: i64 = 2
28const NX_PORKBUN_API_ERROR: i64 = 3

functions

31func pk_put(out: *u8, off: i64, s: *u8) -> i64
38func pk_put_n(out: *u8, off: i64, src: *u8, n: i64) -> i64
46func pk_creds(body: *u8, off: i64, ak: *u8, akn: i64, sk: *u8, skn: i64) -> i64
57func pk_check(resp: *u8, total: i64) -> i64
74func nx_porkbun_set_txt(ak: *u8, akn: i64, sk: *u8, skn: i64,
100func nx_porkbun_set_a(ak: *u8, akn: i64, sk: *u8, skn: i64,
128func nx_porkbun_retrieve(ak: *u8, akn: i64, sk: *u8, skn: i64,
150func nx_porkbun_get_dnssec(ak: *u8, akn: i64, sk: *u8, skn: i64,
168func nx_porkbun_delete_txt(ak: *u8, akn: i64, sk: *u8, skn: i64,
190func pk_readline_file(path: *u8, out: *u8, cap: i64) -> i64
201func main() -> i64