@orbinum/sdk 0.4.0 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +13 -2
- package/dist/index.mjs +16 -3
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -6,7 +6,7 @@ import { getExtrinsicDecoder } from '@polkadot-api/tx-utils';
|
|
|
6
6
|
export { AccountId, Blake2256, Keccak256, Storage, u128, u64 } from '@polkadot-api/substrate-bindings';
|
|
7
7
|
export { base58 } from '@scure/base';
|
|
8
8
|
export { getPolkadotSigner } from 'polkadot-api/signer';
|
|
9
|
-
export { getPolkadotSignerFromPjs } from 'polkadot-api/pjs-signer';
|
|
9
|
+
export { SignPayload, SignRaw, connectInjectedExtension, getInjectedExtensions, getPolkadotSignerFromPjs } from 'polkadot-api/pjs-signer';
|
|
10
10
|
|
|
11
11
|
type ChainInfo = {
|
|
12
12
|
name: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { getExtrinsicDecoder } from '@polkadot-api/tx-utils';
|
|
|
6
6
|
export { AccountId, Blake2256, Keccak256, Storage, u128, u64 } from '@polkadot-api/substrate-bindings';
|
|
7
7
|
export { base58 } from '@scure/base';
|
|
8
8
|
export { getPolkadotSigner } from 'polkadot-api/signer';
|
|
9
|
-
export { getPolkadotSignerFromPjs } from 'polkadot-api/pjs-signer';
|
|
9
|
+
export { SignPayload, SignRaw, connectInjectedExtension, getInjectedExtensions, getPolkadotSignerFromPjs } from 'polkadot-api/pjs-signer';
|
|
10
10
|
|
|
11
11
|
type ChainInfo = {
|
|
12
12
|
name: string;
|
package/dist/index.js
CHANGED
|
@@ -53,6 +53,7 @@ __export(index_exports, {
|
|
|
53
53
|
bigintTo32LeArr: () => bigintTo32LeArr,
|
|
54
54
|
bytesToBigintLE: () => bytesToBigintLE,
|
|
55
55
|
computePathIndices: () => computePathIndices,
|
|
56
|
+
connectInjectedExtension: () => import_pjs_signer.connectInjectedExtension,
|
|
56
57
|
decodePrecompileCalldata: () => decodePrecompileCalldata,
|
|
57
58
|
decryptJson: () => decryptJson,
|
|
58
59
|
deriveOwnerPk: () => deriveOwnerPk,
|
|
@@ -70,6 +71,7 @@ __export(index_exports, {
|
|
|
70
71
|
formatORB: () => formatORB,
|
|
71
72
|
fromBase64: () => fromBase64,
|
|
72
73
|
fromHex: () => fromHex,
|
|
74
|
+
getInjectedExtensions: () => import_pjs_signer.getInjectedExtensions,
|
|
73
75
|
getPolkadotSigner: () => import_signer.getPolkadotSigner,
|
|
74
76
|
getPolkadotSignerFromPjs: () => import_pjs_signer.getPolkadotSignerFromPjs,
|
|
75
77
|
getPrecompileLabel: () => getPrecompileLabel,
|
|
@@ -399,11 +401,18 @@ var SubstrateClient = class _SubstrateClient {
|
|
|
399
401
|
if (v === null || v === void 0) return v;
|
|
400
402
|
if (typeof v === "bigint") return v.toString();
|
|
401
403
|
if (v instanceof Uint8Array)
|
|
402
|
-
return Array.from(v).map((b) => b.toString(16).padStart(2, "0")).join("")
|
|
404
|
+
return `0x${Array.from(v).map((b) => b.toString(16).padStart(2, "0")).join("")}`;
|
|
403
405
|
if (Array.isArray(v)) return v.map(jsonifyValue);
|
|
404
406
|
if (typeof v === "object") {
|
|
407
|
+
const obj = v;
|
|
408
|
+
if (typeof obj["asHex"] === "function") {
|
|
409
|
+
try {
|
|
410
|
+
return obj["asHex"]();
|
|
411
|
+
} catch {
|
|
412
|
+
}
|
|
413
|
+
}
|
|
405
414
|
return Object.fromEntries(
|
|
406
|
-
Object.entries(
|
|
415
|
+
Object.entries(obj).filter(([, val]) => typeof val !== "function").map(([k, val]) => [k, jsonifyValue(val)])
|
|
407
416
|
);
|
|
408
417
|
}
|
|
409
418
|
return v;
|
|
@@ -4213,6 +4222,7 @@ var import_polkadot_api4 = require("polkadot-api");
|
|
|
4213
4222
|
bigintTo32LeArr,
|
|
4214
4223
|
bytesToBigintLE,
|
|
4215
4224
|
computePathIndices,
|
|
4225
|
+
connectInjectedExtension,
|
|
4216
4226
|
decodePrecompileCalldata,
|
|
4217
4227
|
decryptJson,
|
|
4218
4228
|
deriveOwnerPk,
|
|
@@ -4230,6 +4240,7 @@ var import_polkadot_api4 = require("polkadot-api");
|
|
|
4230
4240
|
formatORB,
|
|
4231
4241
|
fromBase64,
|
|
4232
4242
|
fromHex,
|
|
4243
|
+
getInjectedExtensions,
|
|
4233
4244
|
getPolkadotSigner,
|
|
4234
4245
|
getPolkadotSignerFromPjs,
|
|
4235
4246
|
getPrecompileLabel,
|
package/dist/index.mjs
CHANGED
|
@@ -299,11 +299,18 @@ var SubstrateClient = class _SubstrateClient {
|
|
|
299
299
|
if (v === null || v === void 0) return v;
|
|
300
300
|
if (typeof v === "bigint") return v.toString();
|
|
301
301
|
if (v instanceof Uint8Array)
|
|
302
|
-
return Array.from(v).map((b) => b.toString(16).padStart(2, "0")).join("")
|
|
302
|
+
return `0x${Array.from(v).map((b) => b.toString(16).padStart(2, "0")).join("")}`;
|
|
303
303
|
if (Array.isArray(v)) return v.map(jsonifyValue);
|
|
304
304
|
if (typeof v === "object") {
|
|
305
|
+
const obj = v;
|
|
306
|
+
if (typeof obj["asHex"] === "function") {
|
|
307
|
+
try {
|
|
308
|
+
return obj["asHex"]();
|
|
309
|
+
} catch {
|
|
310
|
+
}
|
|
311
|
+
}
|
|
305
312
|
return Object.fromEntries(
|
|
306
|
-
Object.entries(
|
|
313
|
+
Object.entries(obj).filter(([, val]) => typeof val !== "function").map(([k, val]) => [k, jsonifyValue(val)])
|
|
307
314
|
);
|
|
308
315
|
}
|
|
309
316
|
return v;
|
|
@@ -4083,7 +4090,11 @@ import {
|
|
|
4083
4090
|
} from "@polkadot-api/substrate-bindings";
|
|
4084
4091
|
import { base58 } from "@scure/base";
|
|
4085
4092
|
import { getPolkadotSigner } from "polkadot-api/signer";
|
|
4086
|
-
import {
|
|
4093
|
+
import {
|
|
4094
|
+
getPolkadotSignerFromPjs,
|
|
4095
|
+
connectInjectedExtension,
|
|
4096
|
+
getInjectedExtensions
|
|
4097
|
+
} from "polkadot-api/pjs-signer";
|
|
4087
4098
|
import { getSs58AddressInfo } from "polkadot-api";
|
|
4088
4099
|
export {
|
|
4089
4100
|
AccountId2 as AccountId,
|
|
@@ -4119,6 +4130,7 @@ export {
|
|
|
4119
4130
|
bigintTo32LeArr,
|
|
4120
4131
|
bytesToBigintLE,
|
|
4121
4132
|
computePathIndices,
|
|
4133
|
+
connectInjectedExtension,
|
|
4122
4134
|
decodePrecompileCalldata,
|
|
4123
4135
|
decryptJson,
|
|
4124
4136
|
deriveOwnerPk,
|
|
@@ -4136,6 +4148,7 @@ export {
|
|
|
4136
4148
|
formatORB,
|
|
4137
4149
|
fromBase64,
|
|
4138
4150
|
fromHex,
|
|
4151
|
+
getInjectedExtensions,
|
|
4139
4152
|
getPolkadotSigner,
|
|
4140
4153
|
getPolkadotSignerFromPjs,
|
|
4141
4154
|
getPrecompileLabel,
|