@arkiv-network/sdk
Version:
TypeScript client library for Arkiv's blockchains interactions
58 lines (56 loc) • 1.58 kB
JavaScript
//#region src/consts.ts
const ARKIV_ADDRESS = "0x4400000000000000000000000000000000000044";
const BLOCK_TIME = 2;
/**
* The longest an entity may live, in blocks, counted from the block its create or extension lands
* in: 7,884,000 blocks, about 182.5 days at {@link BLOCK_TIME}. The chain reverts anything longer
* with `ExpiryBeyondMaxLifetime`, so the SDK refuses it before sending.
*/
const MAX_LIFETIME = 7884000n;
/** Where to get a free access key for the RPC endpoints Arkiv hosts. */
const ACCESS_KEYS_URL = "https://hub.arkiv.network/access-keys";
/**
* Headroom added to a gas estimate, in percent.
*/
const GAS_HEADROOM_PERCENT = 25n;
/**
* The most gas one transaction may carry: EIP-7825's per-transaction cap, which the node enforces.
*/
const MAX_TRANSACTION_GAS = 2n ** 24n;
//#endregion
Object.defineProperty(exports, 'ACCESS_KEYS_URL', {
enumerable: true,
get: function () {
return ACCESS_KEYS_URL;
}
});
Object.defineProperty(exports, 'ARKIV_ADDRESS', {
enumerable: true,
get: function () {
return ARKIV_ADDRESS;
}
});
Object.defineProperty(exports, 'BLOCK_TIME', {
enumerable: true,
get: function () {
return BLOCK_TIME;
}
});
Object.defineProperty(exports, 'GAS_HEADROOM_PERCENT', {
enumerable: true,
get: function () {
return GAS_HEADROOM_PERCENT;
}
});
Object.defineProperty(exports, 'MAX_LIFETIME', {
enumerable: true,
get: function () {
return MAX_LIFETIME;
}
});
Object.defineProperty(exports, 'MAX_TRANSACTION_GAS', {
enumerable: true,
get: function () {
return MAX_TRANSACTION_GAS;
}
});