orbs-network / ton-access

Unthrottled anonymous RPC access to TON blockchain via a robust decentralized network
MIT License
86 stars 4 forks source link

Fixed object name in documentation (CDN part) #13

Open sfedia opened 1 year ago

sfedia commented 1 year ago

The exported object is called TonGateway, not TonAccess

...
var nt = T((C) => {
        Object.defineProperty(C, "__esModule", { value: !0 });
        var j = L();
        // here
        window.TonGateway = { create: () => new j.Gateway(), getHttpEndpoint: j.getHttpEndpoint, getHttpV4Endpoint: j.getHttpV4Endpoint };
    });
    nt();

After loading the script via CDN, TonGateway needs to be referenced, not TonAccess. Otherwise, the call to, e.g., TonAccess.getHttpEndpoint will cause "not defined" error. I propose to fix that in the docs.

TonAccess.getHttpEndpoint() // TonAccess is not defined
TonGateway.getHttpEndpoint() // this works
Aho38wkw commented 3 months ago

Çekim