UNPKG

xcm-lib-zkverify

Version:

XCM asset teleportation and remote EVM calls for ZKVerify

16 lines 622 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ApiConnection = void 0; const api_1 = require("@polkadot/api"); class ApiConnection { static async createApi(wsEndpoint) { const provider = new api_1.WsProvider(wsEndpoint); return api_1.ApiPromise.create({ provider }); } static createKeyPair(privateKey, keyringType) { const keyring = new api_1.Keyring({ type: keyringType }); return keyring.addFromSeed(new Uint8Array(Buffer.from(privateKey, 'hex'))); } } exports.ApiConnection = ApiConnection; //# sourceMappingURL=api-connection.js.map