@orbinum/sdk 0.21.1 → 0.23.0
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/README.md +0 -1
- package/dist/index.d.mts +10 -937
- package/dist/index.d.ts +10 -937
- package/dist/index.js +5 -931
- package/dist/index.mjs +1 -923
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -124,7 +124,7 @@ declare class SubstrateClient {
|
|
|
124
124
|
static connect(wsUrl: string, timeoutMs?: number): Promise<SubstrateClient>;
|
|
125
125
|
/**
|
|
126
126
|
* Performs a raw JSON-RPC request. Use this for custom Orbinum RPCs
|
|
127
|
-
* (shieldedPool_*,
|
|
127
|
+
* (shieldedPool_*, privacy_*, etc.).
|
|
128
128
|
*/
|
|
129
129
|
request<T>(method: string, params?: unknown[]): Promise<T>;
|
|
130
130
|
/**
|
|
@@ -837,253 +837,6 @@ declare class ShieldedPoolModule {
|
|
|
837
837
|
claimShieldedFees(params: ClaimShieldedFeesParams, signer: PolkadotSigner, txOptions?: UnsafeTxOptions): Promise<TxResult>;
|
|
838
838
|
}
|
|
839
839
|
|
|
840
|
-
/**
|
|
841
|
-
* Signature verification scheme for cross-chain links.
|
|
842
|
-
* Mirrors `SignatureScheme` in pallet-account-mapping.
|
|
843
|
-
*/
|
|
844
|
-
declare const SignatureScheme: {
|
|
845
|
-
readonly Eip191: "Eip191";
|
|
846
|
-
readonly Ed25519: "Ed25519";
|
|
847
|
-
};
|
|
848
|
-
type SignatureScheme = (typeof SignatureScheme)[keyof typeof SignatureScheme];
|
|
849
|
-
/** A verified public link to an external chain wallet. */
|
|
850
|
-
type ChainLink = {
|
|
851
|
-
chainId: number;
|
|
852
|
-
address: string;
|
|
853
|
-
};
|
|
854
|
-
/** A private link: only the Poseidon commitment is stored on-chain. */
|
|
855
|
-
type PrivateLink = {
|
|
856
|
-
chainId: number;
|
|
857
|
-
commitment: string;
|
|
858
|
-
};
|
|
859
|
-
/** Public profile metadata set by the account owner. */
|
|
860
|
-
type AccountMetadata = {
|
|
861
|
-
displayName: string | null;
|
|
862
|
-
bio: string | null;
|
|
863
|
-
avatar: string | null;
|
|
864
|
-
};
|
|
865
|
-
/** Identity info by alias: owner, optional EVM address, link count. */
|
|
866
|
-
type AliasInfo = {
|
|
867
|
-
/** 0x-prefixed 32-byte AccountId32 hex. */
|
|
868
|
-
owner: string;
|
|
869
|
-
/** Normalized EVM address (0x + 40 hex chars), or null. */
|
|
870
|
-
evmAddress: string | null;
|
|
871
|
-
chainLinksCount: number;
|
|
872
|
-
};
|
|
873
|
-
/**
|
|
874
|
-
* Full identity for an alias: owner, EVM address, all public chain links, metadata.
|
|
875
|
-
* Returned by `accountMapping_getFullIdentity` (alias-based lookup).
|
|
876
|
-
*/
|
|
877
|
-
type AliasFullIdentity = {
|
|
878
|
-
owner: string;
|
|
879
|
-
evmAddress: string | null;
|
|
880
|
-
chainLinks: ChainLink[];
|
|
881
|
-
metadata: AccountMetadata | null;
|
|
882
|
-
};
|
|
883
|
-
/** Sale listing info for an alias on the marketplace. */
|
|
884
|
-
type ListingInfo = {
|
|
885
|
-
price: bigint;
|
|
886
|
-
/** True if sale is private (whitelist-only). */
|
|
887
|
-
private: boolean;
|
|
888
|
-
whitelistCount: number;
|
|
889
|
-
};
|
|
890
|
-
/** An alias actively listed for sale with its full info. */
|
|
891
|
-
type AccountListing = {
|
|
892
|
-
alias: string;
|
|
893
|
-
listing: ListingInfo;
|
|
894
|
-
};
|
|
895
|
-
/** A supported chain and its signature verification scheme. */
|
|
896
|
-
type SupportedChain = {
|
|
897
|
-
chainId: number;
|
|
898
|
-
scheme: SignatureScheme;
|
|
899
|
-
};
|
|
900
|
-
/** Parameters for adding a verified public chain link. */
|
|
901
|
-
type AddChainLinkParams = {
|
|
902
|
-
/** External chain ID. Use SLIP0044_NAMESPACE | coinType for SLIP-0044 chains. */
|
|
903
|
-
chainId: number;
|
|
904
|
-
/** The external address bytes (e.g. 20 bytes for EVM, 32 for Solana). */
|
|
905
|
-
address: Uint8Array;
|
|
906
|
-
/** Signature over the caller's AccountId32 (64 bytes for Ed25519, 65 for EIP-191). */
|
|
907
|
-
signature: Uint8Array;
|
|
908
|
-
};
|
|
909
|
-
/** Parameters for updating public profile metadata. */
|
|
910
|
-
type SetMetadataParams = {
|
|
911
|
-
displayName?: string | null;
|
|
912
|
-
bio?: string | null;
|
|
913
|
-
avatar?: string | null;
|
|
914
|
-
};
|
|
915
|
-
/** Parameters for listing an alias on the marketplace. */
|
|
916
|
-
type PutOnSaleParams = {
|
|
917
|
-
price: bigint;
|
|
918
|
-
/** If true the sale becomes OTC (whitelist required). */
|
|
919
|
-
isPrivate: boolean;
|
|
920
|
-
};
|
|
921
|
-
/** Parameters for dispatching a call authenticated by a linked external account. */
|
|
922
|
-
type DispatchAsLinkedParams = {
|
|
923
|
-
/** Owner AccountId32 hex (0x-prefixed 64 chars). */
|
|
924
|
-
owner: string;
|
|
925
|
-
chainId: number;
|
|
926
|
-
address: Uint8Array;
|
|
927
|
-
/** Signature over the encoded call payload. */
|
|
928
|
-
signature: Uint8Array;
|
|
929
|
-
/** Encoded call bytes (SCALE). */
|
|
930
|
-
callData: Uint8Array;
|
|
931
|
-
};
|
|
932
|
-
/**
|
|
933
|
-
* Bitmask to convert a SLIP-0044 coin type into an Orbinum ChainId.
|
|
934
|
-
* Example: `SLIP0044_NAMESPACE | 501` = Solana.
|
|
935
|
-
*/
|
|
936
|
-
declare const SLIP0044_NAMESPACE = 2147483648;
|
|
937
|
-
|
|
938
|
-
/**
|
|
939
|
-
* Module for Orbinum pallet-account-mapping:
|
|
940
|
-
* - Query on-chain identity data (aliases, chain links, metadata, marketplace)
|
|
941
|
-
* - Submit identity management extrinsics
|
|
942
|
-
*
|
|
943
|
-
* All query methods return null/false on not-found or network errors.
|
|
944
|
-
*/
|
|
945
|
-
declare class AccountMappingModule {
|
|
946
|
-
private readonly substrate;
|
|
947
|
-
constructor(substrate: SubstrateClient);
|
|
948
|
-
/**
|
|
949
|
-
* Returns the explicitly mapped (or fallback) Substrate AccountId32 hex for
|
|
950
|
-
* an EVM address. `mapped` is set only when `map_account` was called.
|
|
951
|
-
* `fallback` is always the EeSuffix rule: `H160 ++ [0x00; 12]`.
|
|
952
|
-
*/
|
|
953
|
-
getAccountAddresses(accountId: string): Promise<{
|
|
954
|
-
mapped: string | null;
|
|
955
|
-
fallback: string | null;
|
|
956
|
-
}>;
|
|
957
|
-
/**
|
|
958
|
-
* Returns the explicitly mapped Substrate AccountId32 hex for a given EVM
|
|
959
|
-
* address, or null if no explicit mapping exists.
|
|
960
|
-
*/
|
|
961
|
-
getMappedAccount(evmAddress: string): Promise<string | null>;
|
|
962
|
-
/**
|
|
963
|
-
* Resolves "@alias" to basic info (owner, optional EVM address, link count).
|
|
964
|
-
* Accepts the alias with or without the leading "@".
|
|
965
|
-
*/
|
|
966
|
-
resolveAlias(alias: string): Promise<AliasInfo | null>;
|
|
967
|
-
/**
|
|
968
|
-
* Returns the alias registered for the given Substrate AccountId32 hex, or null.
|
|
969
|
-
*/
|
|
970
|
-
getAliasOf(accountId: string): Promise<string | null>;
|
|
971
|
-
/**
|
|
972
|
-
* Resolves "@alias" to its full identity: owner, EVM address, all public
|
|
973
|
-
* chain links, and profile metadata.
|
|
974
|
-
*/
|
|
975
|
-
resolveFullIdentity(alias: string): Promise<AliasFullIdentity | null>;
|
|
976
|
-
/**
|
|
977
|
-
* Returns the profile metadata for a given Substrate AccountId32 hex, or null.
|
|
978
|
-
*/
|
|
979
|
-
getAccountMetadata(accountId: string): Promise<AccountMetadata | null>;
|
|
980
|
-
/**
|
|
981
|
-
* Returns the owner AccountId32 hex of a verified multichain link, or null.
|
|
982
|
-
*/
|
|
983
|
-
getLinkOwner(chainId: number, address: string): Promise<string | null>;
|
|
984
|
-
/**
|
|
985
|
-
* Returns all blockchain networks supported for verified cross-chain links.
|
|
986
|
-
*/
|
|
987
|
-
getSupportedChains(): Promise<SupportedChain[]>;
|
|
988
|
-
/**
|
|
989
|
-
* Returns the private link commitments registered for an alias.
|
|
990
|
-
* Real addresses are never exposed. Returns null if the alias does not exist.
|
|
991
|
-
*/
|
|
992
|
-
getPrivateLinks(alias: string): Promise<PrivateLink[] | null>;
|
|
993
|
-
/**
|
|
994
|
-
* Returns true if the given commitment is registered as a private link for the alias.
|
|
995
|
-
*/
|
|
996
|
-
hasPrivateLink(alias: string, commitment: string): Promise<boolean>;
|
|
997
|
-
/**
|
|
998
|
-
* Returns listing info if the alias is currently for sale, or null.
|
|
999
|
-
*/
|
|
1000
|
-
getListingInfo(alias: string): Promise<ListingInfo | null>;
|
|
1001
|
-
/**
|
|
1002
|
-
* Returns the alias and its listing if the given account currently has an
|
|
1003
|
-
* alias listed for sale. Returns null otherwise.
|
|
1004
|
-
*/
|
|
1005
|
-
getAccountListing(accountId: string): Promise<AccountListing | null>;
|
|
1006
|
-
/**
|
|
1007
|
-
* Returns whether a specific buyer can purchase the given alias right now.
|
|
1008
|
-
*/
|
|
1009
|
-
canBuy(alias: string, buyerAccountId: string): Promise<boolean>;
|
|
1010
|
-
/**
|
|
1011
|
-
* Creates an explicit EVM → Substrate account mapping.
|
|
1012
|
-
* Stores an explicit `MappedAccounts` entry for the caller's H160.
|
|
1013
|
-
* Extrinsic: accountMapping.mapAccount()
|
|
1014
|
-
*/
|
|
1015
|
-
mapAccount(signer: PolkadotSigner): Promise<TxResult>;
|
|
1016
|
-
/**
|
|
1017
|
-
* Removes the EVM → Substrate mapping for the caller.
|
|
1018
|
-
* Extrinsic: accountMapping.unmapAccount()
|
|
1019
|
-
*/
|
|
1020
|
-
unmapAccount(signer: PolkadotSigner): Promise<TxResult>;
|
|
1021
|
-
/**
|
|
1022
|
-
* Registers a unique @alias for the caller.
|
|
1023
|
-
* Requires a deposit. The alias must be 3–32 ASCII lowercase alphanumeric chars + hyphens.
|
|
1024
|
-
* Extrinsic: accountMapping.registerAlias(alias)
|
|
1025
|
-
*/
|
|
1026
|
-
registerAlias(alias: string, signer: PolkadotSigner): Promise<TxResult>;
|
|
1027
|
-
/**
|
|
1028
|
-
* Releases the caller's alias and recovers the deposit.
|
|
1029
|
-
* Extrinsic: accountMapping.releaseAlias()
|
|
1030
|
-
*/
|
|
1031
|
-
releaseAlias(signer: PolkadotSigner): Promise<TxResult>;
|
|
1032
|
-
/**
|
|
1033
|
-
* Transfers the caller's alias to another account.
|
|
1034
|
-
* Extrinsic: accountMapping.transferAlias(newOwner)
|
|
1035
|
-
*/
|
|
1036
|
-
transferAlias(newOwnerHex: string, signer: PolkadotSigner): Promise<TxResult>;
|
|
1037
|
-
/**
|
|
1038
|
-
* Adds a verified public link to an external-chain wallet.
|
|
1039
|
-
*
|
|
1040
|
-
* `params.signature` must be produced by the external wallet over the caller's
|
|
1041
|
-
* AccountId32 bytes:
|
|
1042
|
-
* - EIP-191 (EVM): sign(keccak256("\x19Ethereum Signed Message:\n32" + accountId32))
|
|
1043
|
-
* - Ed25519 (Solana): sign(accountId32 bytes)
|
|
1044
|
-
*
|
|
1045
|
-
* Extrinsic: accountMapping.addChainLink(chainId, address, signature)
|
|
1046
|
-
*/
|
|
1047
|
-
addChainLink(params: AddChainLinkParams, signer: PolkadotSigner): Promise<TxResult>;
|
|
1048
|
-
/**
|
|
1049
|
-
* Removes the external-chain link for the given chain ID.
|
|
1050
|
-
* Extrinsic: accountMapping.removeChainLink(chainId)
|
|
1051
|
-
*/
|
|
1052
|
-
removeChainLink(chainId: number, signer: PolkadotSigner): Promise<TxResult>;
|
|
1053
|
-
/**
|
|
1054
|
-
* Updates the caller's public profile metadata.
|
|
1055
|
-
* Extrinsic: accountMapping.setAccountMetadata(displayName, bio, avatar)
|
|
1056
|
-
*/
|
|
1057
|
-
setAccountMetadata(params: SetMetadataParams, signer: PolkadotSigner): Promise<TxResult>;
|
|
1058
|
-
/**
|
|
1059
|
-
* Lists the caller's alias for sale on the alias marketplace.
|
|
1060
|
-
* Extrinsic: accountMapping.putAliasOnSale(price, isPrivate)
|
|
1061
|
-
*/
|
|
1062
|
-
putAliasOnSale(params: PutOnSaleParams, signer: PolkadotSigner): Promise<TxResult>;
|
|
1063
|
-
/**
|
|
1064
|
-
* Cancels an active alias sale listing.
|
|
1065
|
-
* Extrinsic: accountMapping.cancelSale()
|
|
1066
|
-
*/
|
|
1067
|
-
cancelSale(signer: PolkadotSigner): Promise<TxResult>;
|
|
1068
|
-
/**
|
|
1069
|
-
* Purchases an alias listed for sale.
|
|
1070
|
-
* Extrinsic: accountMapping.buyAlias(alias)
|
|
1071
|
-
*/
|
|
1072
|
-
buyAlias(alias: string, signer: PolkadotSigner): Promise<TxResult>;
|
|
1073
|
-
/**
|
|
1074
|
-
* Dispatches an arbitrary call on behalf of a linked external-chain wallet.
|
|
1075
|
-
*
|
|
1076
|
-
* This is the "Universal Proxy" feature that allows EVM/Solana wallets to
|
|
1077
|
-
* authorize on-chain actions without holding a Substrate private key.
|
|
1078
|
-
*
|
|
1079
|
-
* The relayer (who pays gas) calls this with the external wallet's signature
|
|
1080
|
-
* over the encoded call payload and the owner's AccountId32.
|
|
1081
|
-
*
|
|
1082
|
-
* Extrinsic: accountMapping.dispatchAsLinkedAccount(owner, chainId, address, signature, call)
|
|
1083
|
-
*/
|
|
1084
|
-
dispatchAsLinkedAccount(params: DispatchAsLinkedParams, signer: PolkadotSigner): Promise<TxResult>;
|
|
1085
|
-
}
|
|
1086
|
-
|
|
1087
840
|
/**
|
|
1088
841
|
* Typed client for general chain state queries under the `chain_*` namespace.
|
|
1089
842
|
*/
|
|
@@ -1296,12 +1049,6 @@ type EvmTxRequest = {
|
|
|
1296
1049
|
};
|
|
1297
1050
|
/** Callback that signs and submits an EVM transaction, returning the tx hash. */
|
|
1298
1051
|
type EvmSigner = (tx: EvmTxRequest) => Promise<string>;
|
|
1299
|
-
type ResolvedAlias = {
|
|
1300
|
-
/** AccountId32 hex of the alias owner (as 0x-prefixed 20-byte EVM address). */
|
|
1301
|
-
owner: string;
|
|
1302
|
-
/** EVM address of the owner, or null if unset. */
|
|
1303
|
-
evmAddress: string | null;
|
|
1304
|
-
};
|
|
1305
1052
|
/** Metadata for a known precompile: display name and function selector map. */
|
|
1306
1053
|
interface KnownPrecompileInfo {
|
|
1307
1054
|
/** Human-readable name, e.g. "ShieldedPool". */
|
|
@@ -1433,159 +1180,6 @@ declare class ShieldedPoolPrecompile {
|
|
|
1433
1180
|
estimateClaimShieldedFeesGas(params: ClaimShieldedFeesParams, from: string): Promise<bigint>;
|
|
1434
1181
|
}
|
|
1435
1182
|
|
|
1436
|
-
/**
|
|
1437
|
-
* EVM bindings for `AccountMappingPrecompile` at address `0x...0800`.
|
|
1438
|
-
*
|
|
1439
|
-
* This precompile wraps `pallet-account-mapping` extrinsics and queries,
|
|
1440
|
-
* allowing **EVM wallets** to manage their on-chain identity (aliases, chain
|
|
1441
|
-
* links, metadata, marketplace) without a Substrate signer.
|
|
1442
|
-
*
|
|
1443
|
-
* ### Read-only calls
|
|
1444
|
-
* Use `resolveAlias`, `getAliasOf`, `hasPrivateLink` to query state via
|
|
1445
|
-
* `eth_call` — no signer required.
|
|
1446
|
-
*
|
|
1447
|
-
* ### Write calls
|
|
1448
|
-
* Provide an `EvmSigner` callback. The EVM caller's address is mapped to its
|
|
1449
|
-
* Substrate AccountId32 via `AddressMapping`.
|
|
1450
|
-
*/
|
|
1451
|
-
declare class AccountMappingPrecompile {
|
|
1452
|
-
private readonly evm;
|
|
1453
|
-
private readonly addr;
|
|
1454
|
-
constructor(evm: EvmClient);
|
|
1455
|
-
/**
|
|
1456
|
-
* Resolves `@alias` to its owner EVM address (and optionally a secondary EVM address).
|
|
1457
|
-
*
|
|
1458
|
-
* Returns `(address owner, address evmAddress)` — two 32-byte ABI-encoded slots.
|
|
1459
|
-
* `evmAddress` is zero-address (`0x000...0`) if the owner has no explicit EVM address.
|
|
1460
|
-
*/
|
|
1461
|
-
resolveAlias(alias: string): Promise<ResolvedAlias | null>;
|
|
1462
|
-
/**
|
|
1463
|
-
* Returns the alias registered for the given EVM address, or null.
|
|
1464
|
-
* The precompile ABI encodes the alias as `bytes` (UTF-8).
|
|
1465
|
-
*/
|
|
1466
|
-
getAliasOf(evmAddress: string): Promise<string | null>;
|
|
1467
|
-
/**
|
|
1468
|
-
* Returns true if the given Poseidon commitment is registered as a private
|
|
1469
|
-
* link for the given alias.
|
|
1470
|
-
*/
|
|
1471
|
-
hasPrivateLink(alias: string, commitment: string): Promise<boolean>;
|
|
1472
|
-
/**
|
|
1473
|
-
* Creates an explicit EVM → Substrate account mapping for the signer's address.
|
|
1474
|
-
* Extrinsic: `accountMapping.mapAccount()`
|
|
1475
|
-
*/
|
|
1476
|
-
mapAccount(signer: EvmSigner): Promise<string>;
|
|
1477
|
-
/**
|
|
1478
|
-
* Removes the EVM → Substrate mapping for the signer's address.
|
|
1479
|
-
* Extrinsic: `accountMapping.unmapAccount()`
|
|
1480
|
-
*/
|
|
1481
|
-
unmapAccount(signer: EvmSigner): Promise<string>;
|
|
1482
|
-
/**
|
|
1483
|
-
* Releases the signer's registered alias, recovering the deposit.
|
|
1484
|
-
* Extrinsic: `accountMapping.releaseAlias()`
|
|
1485
|
-
*/
|
|
1486
|
-
releaseAlias(signer: EvmSigner): Promise<string>;
|
|
1487
|
-
/**
|
|
1488
|
-
* Cancels an active alias sale listing.
|
|
1489
|
-
* Extrinsic: `accountMapping.cancelSale()`
|
|
1490
|
-
*/
|
|
1491
|
-
cancelSale(signer: EvmSigner): Promise<string>;
|
|
1492
|
-
/**
|
|
1493
|
-
* Registers a unique @alias for the signer's account.
|
|
1494
|
-
* Requires a deposit. The alias must be 3–32 ASCII lowercase alphanumeric chars + hyphens.
|
|
1495
|
-
* Extrinsic: `accountMapping.registerAlias(alias)`
|
|
1496
|
-
*/
|
|
1497
|
-
registerAlias(alias: string, signer: EvmSigner): Promise<string>;
|
|
1498
|
-
/**
|
|
1499
|
-
* Transfers the signer's alias to a new EVM `owner` address.
|
|
1500
|
-
* Extrinsic: `accountMapping.transferAlias(newOwner)`
|
|
1501
|
-
*/
|
|
1502
|
-
transferAlias(newOwnerEvmAddress: string, signer: EvmSigner): Promise<string>;
|
|
1503
|
-
/**
|
|
1504
|
-
* Purchases an alias currently listed for sale.
|
|
1505
|
-
* Extrinsic: `accountMapping.buyAlias(alias)`
|
|
1506
|
-
*/
|
|
1507
|
-
buyAlias(alias: string, signer: EvmSigner): Promise<string>;
|
|
1508
|
-
/**
|
|
1509
|
-
* Lists the signer's alias for sale on the alias marketplace.
|
|
1510
|
-
*
|
|
1511
|
-
* @param price Asking price in planck (ORB).
|
|
1512
|
-
* @param allowedBuyers Whitelist of EVM addresses allowed to buy.
|
|
1513
|
-
* Pass an empty array for a public (open) listing.
|
|
1514
|
-
* Extrinsic: `accountMapping.putAliasOnSale(price, allowedBuyers)`
|
|
1515
|
-
*/
|
|
1516
|
-
putAliasOnSale(price: bigint, allowedBuyers: string[], signer: EvmSigner): Promise<string>;
|
|
1517
|
-
/**
|
|
1518
|
-
* Removes the external-chain link for the given chain ID.
|
|
1519
|
-
* Extrinsic: `accountMapping.removeChainLink(chainId)`
|
|
1520
|
-
*/
|
|
1521
|
-
removeChainLink(chainId: number, signer: EvmSigner): Promise<string>;
|
|
1522
|
-
/**
|
|
1523
|
-
* Adds a verified public link to an external-chain wallet.
|
|
1524
|
-
*
|
|
1525
|
-
* @param chainId Orbinum chain ID (use `SLIP0044_NAMESPACE | coinType` for SLIP-0044).
|
|
1526
|
-
* @param externalAddr External wallet address bytes (20 bytes for EVM, 32 for Solana).
|
|
1527
|
-
* @param signature Signature over the caller's AccountId32:
|
|
1528
|
-
* - EIP-191 (EVM): 65 bytes over keccak256("\x19Ethereum Signed Message:\n32" + accountId32)
|
|
1529
|
-
* - Ed25519 (Solana): 64 bytes over the raw accountId32 bytes
|
|
1530
|
-
*
|
|
1531
|
-
* Extrinsic: `accountMapping.addChainLink(chainId, address, signature)`
|
|
1532
|
-
*/
|
|
1533
|
-
addChainLink(chainId: number, externalAddr: Uint8Array, signature: Uint8Array, signer: EvmSigner): Promise<string>;
|
|
1534
|
-
/**
|
|
1535
|
-
* Registers a private chain link — only the Poseidon commitment is stored.
|
|
1536
|
-
* The real external address is never revealed on-chain.
|
|
1537
|
-
*
|
|
1538
|
-
* @param chainId External chain ID.
|
|
1539
|
-
* @param commitment 0x-prefixed 32-byte Poseidon commitment hex.
|
|
1540
|
-
*
|
|
1541
|
-
* Extrinsic: `accountMapping.registerPrivateLink(chainId, commitment)`
|
|
1542
|
-
*/
|
|
1543
|
-
registerPrivateLink(chainId: number, commitment: string, signer: EvmSigner): Promise<string>;
|
|
1544
|
-
/**
|
|
1545
|
-
* Removes a private link by its commitment.
|
|
1546
|
-
* Extrinsic: `accountMapping.removePrivateLink(commitment)`
|
|
1547
|
-
*/
|
|
1548
|
-
removePrivateLink(commitment: string, signer: EvmSigner): Promise<string>;
|
|
1549
|
-
/**
|
|
1550
|
-
* Reveals a private link publicly by providing the real address and blinding.
|
|
1551
|
-
* After this call the link becomes a public chain link.
|
|
1552
|
-
*
|
|
1553
|
-
* @param commitment 32-byte commitment hex.
|
|
1554
|
-
* @param address External address bytes (the actual wallet address).
|
|
1555
|
-
* @param blinding 32-byte blinding factor used when computing the commitment.
|
|
1556
|
-
* @param signature Signature over the AccountId32 bytes (same rules as `addChainLink`).
|
|
1557
|
-
*
|
|
1558
|
-
* Extrinsic: `accountMapping.revealPrivateLink(commitment, address, blinding, signature)`
|
|
1559
|
-
*/
|
|
1560
|
-
revealPrivateLink(commitment: string, address: Uint8Array, blinding: string, signature: Uint8Array, signer: EvmSigner): Promise<string>;
|
|
1561
|
-
/**
|
|
1562
|
-
* Updates the signer's public profile metadata.
|
|
1563
|
-
* Pass `null` for any field to leave it unchanged.
|
|
1564
|
-
}
|
|
1565
|
-
displayName: string | null,
|
|
1566
|
-
bio: string | null,
|
|
1567
|
-
avatar: string | null,
|
|
1568
|
-
signer: EvmSigner
|
|
1569
|
-
): Promise<string> {
|
|
1570
|
-
const enc = (v: string | null): Uint8Array =>
|
|
1571
|
-
v != null ? new TextEncoder().encode(v) : new Uint8Array(0);
|
|
1572
|
-
const data = encodeHex(
|
|
1573
|
-
AM_SEL.SET_ACCOUNT_METADATA,
|
|
1574
|
-
{ type: 'bytes', value: enc(displayName) },
|
|
1575
|
-
{ type: 'bytes', value: enc(bio) },
|
|
1576
|
-
{ type: 'bytes', value: enc(avatar) }
|
|
1577
|
-
);
|
|
1578
|
-
return signer({ to: this.addr, data });
|
|
1579
|
-
}
|
|
1580
|
-
|
|
1581
|
-
// ─── Calldata builders (for custom signing / batching) ─────────────────────
|
|
1582
|
-
|
|
1583
|
-
/** Returns the raw ABI-encoded calldata for `registerAlias`. */
|
|
1584
|
-
buildRegisterAliasCalldata(alias: string): string;
|
|
1585
|
-
/** Returns the raw ABI-encoded calldata for `mapAccount`. */
|
|
1586
|
-
buildMapAccountCalldata(): string;
|
|
1587
|
-
}
|
|
1588
|
-
|
|
1589
1183
|
/**
|
|
1590
1184
|
* Low-level bindings for cryptographic EVM precompiles.
|
|
1591
1185
|
*
|
|
@@ -1696,8 +1290,6 @@ declare class OrbinumClient {
|
|
|
1696
1290
|
readonly evmExplorer: EvmExplorer | null;
|
|
1697
1291
|
/** Shielded-pool extrinsics and Merkle tree queries (`shield`, `unshield`, `privateTransfer`, …). */
|
|
1698
1292
|
readonly shieldedPool: ShieldedPoolModule;
|
|
1699
|
-
/** Account-mapping extrinsics: aliases, chain links, metadata, marketplace, and identity. */
|
|
1700
|
-
readonly accountMapping: AccountMappingModule;
|
|
1701
1293
|
/** Typed access to `privacy_*` custom RPC endpoints. */
|
|
1702
1294
|
readonly privacy: PrivacyModule;
|
|
1703
1295
|
/** Typed access to general chain state via `chain_*` custom RPC endpoints. */
|
|
@@ -1718,8 +1310,6 @@ declare class OrbinumClient {
|
|
|
1718
1310
|
readonly precompiles: {
|
|
1719
1311
|
/** `ShieldedPoolPrecompile` at `0x0801`: shield / unshield / transfer via EVM wallet. */
|
|
1720
1312
|
shieldedPool: ShieldedPoolPrecompile;
|
|
1721
|
-
/** `AccountMappingPrecompile` at `0x0800`: identity management via EVM wallet. */
|
|
1722
|
-
accountMapping: AccountMappingPrecompile;
|
|
1723
1313
|
/** Built-in cryptographic precompiles: ECRecover, Keccak-256, Curve25519. */
|
|
1724
1314
|
crypto: CryptoPrecompiles;
|
|
1725
1315
|
} | null;
|
|
@@ -3036,7 +2626,6 @@ declare const PRECOMPILE_ADDR: {
|
|
|
3036
2626
|
readonly EC_RECOVER_PUBKEY: "0x0000000000000000000000000000000000000401";
|
|
3037
2627
|
readonly CURVE25519_ADD: "0x0000000000000000000000000000000000000402";
|
|
3038
2628
|
readonly CURVE25519_SCALAR_MUL: "0x0000000000000000000000000000000000000403";
|
|
3039
|
-
readonly ACCOUNT_MAPPING: "0x0000000000000000000000000000000000000800";
|
|
3040
2629
|
readonly SHIELDED_POOL: "0x0000000000000000000000000000000000000801";
|
|
3041
2630
|
};
|
|
3042
2631
|
/**
|
|
@@ -3216,13 +2805,11 @@ type CircuitId = (typeof CircuitId)[keyof typeof CircuitId];
|
|
|
3216
2805
|
* |--------------|-------|---------------------------------|
|
|
3217
2806
|
* | Transfer | 1 | 2-in-2-out private transfer |
|
|
3218
2807
|
* | Unshield | 2 | Withdrawal from the pool |
|
|
3219
|
-
* | PrivateLink | 5 | Private chain-link proof |
|
|
3220
2808
|
* | ValueProof | 6 | Note value binding (fee-claim) |
|
|
3221
2809
|
*/
|
|
3222
2810
|
declare const CircuitId: {
|
|
3223
2811
|
readonly Transfer: 1;
|
|
3224
2812
|
readonly Unshield: 2;
|
|
3225
|
-
readonly PrivateLink: 5;
|
|
3226
2813
|
readonly ValueProof: 6;
|
|
3227
2814
|
};
|
|
3228
2815
|
/**
|
|
@@ -3279,7 +2866,6 @@ type VerifyProofArgs = {
|
|
|
3279
2866
|
* - Transfer: [merkle_root, nullifier_0, nullifier_1, commitment_0, commitment_1]
|
|
3280
2867
|
* - Unshield: [merkle_root, nullifier, amount_fe, recipient_hash, asset_id_fe]
|
|
3281
2868
|
* - ValueProof: [commitment, value, asset_id, owner_hash]
|
|
3282
|
-
* - PrivateLink: [commitment, call_hash_fe]
|
|
3283
2869
|
*/
|
|
3284
2870
|
publicInputs: number[][];
|
|
3285
2871
|
};
|
|
@@ -3388,466 +2974,6 @@ type ZkVerifierEvent = {
|
|
|
3388
2974
|
data: BatchVerificationKeysRegisteredEvent;
|
|
3389
2975
|
};
|
|
3390
2976
|
|
|
3391
|
-
/**
|
|
3392
|
-
* TypeScript types for pallet-account-mapping extrinsics.
|
|
3393
|
-
*
|
|
3394
|
-
* Conventions:
|
|
3395
|
-
* - Byte arrays → `number[]` (SCALE-compatible)
|
|
3396
|
-
* - Balances → `bigint`
|
|
3397
|
-
* - AccountId → `string` (SS58 or 0x-prefixed 64-char hex)
|
|
3398
|
-
* - ChainId → `number` (u32, typically a SLIP-0044 coin type)
|
|
3399
|
-
* - Optional → `T | null`
|
|
3400
|
-
*/
|
|
3401
|
-
|
|
3402
|
-
/**
|
|
3403
|
-
* Call index 2 — `register_alias` (Signed origin)
|
|
3404
|
-
* Registers a human-readable identity alias for the caller's Substrate account.
|
|
3405
|
-
* Valid characters: alphanumeric, underscore, hyphen.
|
|
3406
|
-
* Length bounded by `T::MaxAliasLength` on-chain (configurable; typically ≤ 32 bytes).
|
|
3407
|
-
*/
|
|
3408
|
-
type RegisterAliasArgs = {
|
|
3409
|
-
alias: string;
|
|
3410
|
-
};
|
|
3411
|
-
/**
|
|
3412
|
-
* Call index 4 — `transfer_alias` (Signed origin)
|
|
3413
|
-
* Transfers the caller's alias to another account.
|
|
3414
|
-
* The current owner loses the alias; the new owner must not already hold one.
|
|
3415
|
-
*/
|
|
3416
|
-
type TransferAliasArgs = {
|
|
3417
|
-
/** AccountId of the new owner. */
|
|
3418
|
-
newOwner: string;
|
|
3419
|
-
};
|
|
3420
|
-
/**
|
|
3421
|
-
* Call index 5 — `put_alias_on_sale` (Signed origin)
|
|
3422
|
-
* Lists the caller's alias for purchase at a given planck price.
|
|
3423
|
-
*/
|
|
3424
|
-
type PutAliasOnSaleArgs = {
|
|
3425
|
-
/** Sale price in planck (native token smallest unit). Cannot be zero. */
|
|
3426
|
-
price: bigint;
|
|
3427
|
-
/**
|
|
3428
|
-
* Optional whitelist of AccountIds allowed to buy.
|
|
3429
|
-
* Null = unrestricted public sale.
|
|
3430
|
-
* Max {@link MAX_WHITELIST_SIZE} entries.
|
|
3431
|
-
*/
|
|
3432
|
-
allowedBuyers: string[] | null;
|
|
3433
|
-
};
|
|
3434
|
-
/**
|
|
3435
|
-
* Call index 7 — `buy_alias` (Signed origin)
|
|
3436
|
-
* Purchases an alias currently listed for sale.
|
|
3437
|
-
* The buyer must not already hold an alias.
|
|
3438
|
-
*/
|
|
3439
|
-
type BuyAliasArgs = {
|
|
3440
|
-
/** The alias to purchase. */
|
|
3441
|
-
alias: string;
|
|
3442
|
-
};
|
|
3443
|
-
/**
|
|
3444
|
-
* Call index 8 — `add_chain_link` (Signed origin)
|
|
3445
|
-
* Links an external-chain address to the caller's Orbinum identity.
|
|
3446
|
-
* The `signature` must be produced over a deterministic challenge message
|
|
3447
|
-
* using the private key corresponding to `address` on the given chain.
|
|
3448
|
-
*/
|
|
3449
|
-
type AddChainLinkArgs = {
|
|
3450
|
-
/** u32 chain identifier (must be in the supported chains registry). */
|
|
3451
|
-
chainId: number;
|
|
3452
|
-
/** Raw external address bytes — 20 bytes for EVM, 32 bytes for Ed25519 chains. */
|
|
3453
|
-
address: number[];
|
|
3454
|
-
/** Ownership proof signature bytes. */
|
|
3455
|
-
signature: number[];
|
|
3456
|
-
};
|
|
3457
|
-
/**
|
|
3458
|
-
* Call index 9 — `remove_chain_link` (Signed origin)
|
|
3459
|
-
* Removes a previously verified external chain link from the caller's identity.
|
|
3460
|
-
*/
|
|
3461
|
-
type RemoveChainLinkArgs = {
|
|
3462
|
-
/** u32 chain identifier of the link to remove. */
|
|
3463
|
-
chainId: number;
|
|
3464
|
-
};
|
|
3465
|
-
/**
|
|
3466
|
-
* Call index 10 — `set_account_metadata` (Signed origin)
|
|
3467
|
-
* Sets or updates the caller's public profile metadata.
|
|
3468
|
-
* Fields set to null are cleared from storage.
|
|
3469
|
-
*/
|
|
3470
|
-
type SetAccountMetadataArgs = {
|
|
3471
|
-
/** Display name — max 64 bytes UTF-8. Null removes the field. */
|
|
3472
|
-
displayName: string | null;
|
|
3473
|
-
/** Short biography — max 512 bytes UTF-8. Null removes the field. */
|
|
3474
|
-
bio: string | null;
|
|
3475
|
-
/** Avatar URL or IPFS CID — max 256 bytes. Null removes the field. */
|
|
3476
|
-
avatar: string | null;
|
|
3477
|
-
};
|
|
3478
|
-
/**
|
|
3479
|
-
* Call index 11 — `add_supported_chain` (Root origin)
|
|
3480
|
-
* Registers a new external chain in the supported chains registry.
|
|
3481
|
-
*/
|
|
3482
|
-
type AddSupportedChainArgs = {
|
|
3483
|
-
/** u32 chain identifier (e.g. SLIP-0044 coin type). */
|
|
3484
|
-
chainId: number;
|
|
3485
|
-
/** Signature scheme used for address-ownership proofs on this chain. */
|
|
3486
|
-
scheme: SignatureScheme;
|
|
3487
|
-
};
|
|
3488
|
-
/**
|
|
3489
|
-
* Call index 12 — `remove_supported_chain` (Root origin)
|
|
3490
|
-
* Removes a chain from the supported chains registry.
|
|
3491
|
-
* Existing links for that chain are unaffected.
|
|
3492
|
-
*/
|
|
3493
|
-
type RemoveSupportedChainArgs = {
|
|
3494
|
-
/** u32 chain identifier to remove. */
|
|
3495
|
-
chainId: number;
|
|
3496
|
-
};
|
|
3497
|
-
/**
|
|
3498
|
-
* Call index 13 — `dispatch_as_linked_account` (Signed origin, relayer)
|
|
3499
|
-
* Dispatches a RuntimeCall on behalf of an account that owns a verified chain link.
|
|
3500
|
-
* The relayer pays fees; authorisation comes from the external chain signature.
|
|
3501
|
-
*/
|
|
3502
|
-
type DispatchAsLinkedAccountArgs = {
|
|
3503
|
-
/** AccountId on whose behalf to dispatch. */
|
|
3504
|
-
owner: string;
|
|
3505
|
-
/** u32 chain identifier of the link used for authorisation. */
|
|
3506
|
-
chainId: number;
|
|
3507
|
-
/** Raw external address bytes of the authorising signer. */
|
|
3508
|
-
address: number[];
|
|
3509
|
-
/** Signature over the SCALE-encoded `call` payload. */
|
|
3510
|
-
signature: number[];
|
|
3511
|
-
/** SCALE-encoded RuntimeCall to dispatch. */
|
|
3512
|
-
call: number[];
|
|
3513
|
-
};
|
|
3514
|
-
/**
|
|
3515
|
-
* Call index 14 — `register_private_link` (Signed origin)
|
|
3516
|
-
* Registers a hidden chain link using a Poseidon commitment: H(address, blinding).
|
|
3517
|
-
* The actual external address is not revealed on-chain.
|
|
3518
|
-
*/
|
|
3519
|
-
type RegisterPrivateLinkArgs = {
|
|
3520
|
-
/** u32 chain identifier. */
|
|
3521
|
-
chainId: number;
|
|
3522
|
-
/** 32-byte Poseidon commitment: H(address || blinding) (LE). */
|
|
3523
|
-
commitment: number[];
|
|
3524
|
-
};
|
|
3525
|
-
/**
|
|
3526
|
-
* Call index 15 — `remove_private_link` (Signed origin)
|
|
3527
|
-
* Removes a private chain link identified by its commitment.
|
|
3528
|
-
*/
|
|
3529
|
-
type RemovePrivateLinkArgs = {
|
|
3530
|
-
/** 32-byte commitment identifying the link to remove (LE). */
|
|
3531
|
-
commitment: number[];
|
|
3532
|
-
};
|
|
3533
|
-
/**
|
|
3534
|
-
* Call index 16 — `reveal_private_link` (Signed origin)
|
|
3535
|
-
* Reveals a previously registered private link by providing the commitment preimage.
|
|
3536
|
-
* After this call the link becomes publicly readable in storage.
|
|
3537
|
-
*/
|
|
3538
|
-
type RevealPrivateLinkArgs = {
|
|
3539
|
-
/** 32-byte commitment: H(address || blinding) (LE). */
|
|
3540
|
-
commitment: number[];
|
|
3541
|
-
/** The actual raw external address bytes being revealed. */
|
|
3542
|
-
address: number[];
|
|
3543
|
-
/** 32-byte blinding factor used when creating the commitment (LE). */
|
|
3544
|
-
blinding: number[];
|
|
3545
|
-
/** Ownership proof signature produced with the external-chain key. */
|
|
3546
|
-
signature: number[];
|
|
3547
|
-
};
|
|
3548
|
-
/**
|
|
3549
|
-
* Call index 17 — `dispatch_as_private_link` (Signed origin, relayer)
|
|
3550
|
-
* Dispatches a RuntimeCall on behalf of an account identified only by a private
|
|
3551
|
-
* link commitment. A Groth16 ZK proof (PRIVATE_LINK circuit) authorises the
|
|
3552
|
-
* dispatch without revealing the external address.
|
|
3553
|
-
*/
|
|
3554
|
-
type DispatchAsPrivateLinkArgs = {
|
|
3555
|
-
/** AccountId on whose behalf to dispatch. */
|
|
3556
|
-
owner: string;
|
|
3557
|
-
/** 32-byte commitment identifying the private link (LE). */
|
|
3558
|
-
commitment: number[];
|
|
3559
|
-
/** Groth16 proof bytes (PRIVATE_LINK circuit). */
|
|
3560
|
-
zkProof: number[];
|
|
3561
|
-
/** SCALE-encoded RuntimeCall to dispatch. */
|
|
3562
|
-
call: number[];
|
|
3563
|
-
};
|
|
3564
|
-
/** All pallet-account-mapping calls as a discriminated union. */
|
|
3565
|
-
type AccountMappingCall = {
|
|
3566
|
-
type: 'mapAccount';
|
|
3567
|
-
} | {
|
|
3568
|
-
type: 'unmapAccount';
|
|
3569
|
-
} | {
|
|
3570
|
-
type: 'registerAlias';
|
|
3571
|
-
args: RegisterAliasArgs;
|
|
3572
|
-
} | {
|
|
3573
|
-
type: 'releaseAlias';
|
|
3574
|
-
} | {
|
|
3575
|
-
type: 'transferAlias';
|
|
3576
|
-
args: TransferAliasArgs;
|
|
3577
|
-
} | {
|
|
3578
|
-
type: 'putAliasOnSale';
|
|
3579
|
-
args: PutAliasOnSaleArgs;
|
|
3580
|
-
} | {
|
|
3581
|
-
type: 'cancelSale';
|
|
3582
|
-
} | {
|
|
3583
|
-
type: 'buyAlias';
|
|
3584
|
-
args: BuyAliasArgs;
|
|
3585
|
-
} | {
|
|
3586
|
-
type: 'addChainLink';
|
|
3587
|
-
args: AddChainLinkArgs;
|
|
3588
|
-
} | {
|
|
3589
|
-
type: 'removeChainLink';
|
|
3590
|
-
args: RemoveChainLinkArgs;
|
|
3591
|
-
} | {
|
|
3592
|
-
type: 'setAccountMetadata';
|
|
3593
|
-
args: SetAccountMetadataArgs;
|
|
3594
|
-
} | {
|
|
3595
|
-
type: 'addSupportedChain';
|
|
3596
|
-
args: AddSupportedChainArgs;
|
|
3597
|
-
} | {
|
|
3598
|
-
type: 'removeSupportedChain';
|
|
3599
|
-
args: RemoveSupportedChainArgs;
|
|
3600
|
-
} | {
|
|
3601
|
-
type: 'dispatchAsLinkedAccount';
|
|
3602
|
-
args: DispatchAsLinkedAccountArgs;
|
|
3603
|
-
} | {
|
|
3604
|
-
type: 'registerPrivateLink';
|
|
3605
|
-
args: RegisterPrivateLinkArgs;
|
|
3606
|
-
} | {
|
|
3607
|
-
type: 'removePrivateLink';
|
|
3608
|
-
args: RemovePrivateLinkArgs;
|
|
3609
|
-
} | {
|
|
3610
|
-
type: 'revealPrivateLink';
|
|
3611
|
-
args: RevealPrivateLinkArgs;
|
|
3612
|
-
} | {
|
|
3613
|
-
type: 'dispatchAsPrivateLink';
|
|
3614
|
-
args: DispatchAsPrivateLinkArgs;
|
|
3615
|
-
};
|
|
3616
|
-
|
|
3617
|
-
/**
|
|
3618
|
-
* TypeScript types for events emitted by pallet-account-mapping.
|
|
3619
|
-
*
|
|
3620
|
-
* Conventions:
|
|
3621
|
-
* - AccountId → `string` (SS58)
|
|
3622
|
-
* - H160 → `string` (0x-prefixed 20-byte Ethereum address)
|
|
3623
|
-
* - AliasOf<T> → `string` (bounded string, max configurable)
|
|
3624
|
-
* - ChainId → `number` (SLIP-0044 coin-type u32)
|
|
3625
|
-
* - ExternalAddr → `string` (chain-specific address string)
|
|
3626
|
-
* - BalanceOf<T> → `bigint`
|
|
3627
|
-
* - [u8; 32] → `string` (0x-prefixed hex, for private commitments)
|
|
3628
|
-
* - SignatureScheme → imported from pallet-extrinsics
|
|
3629
|
-
*/
|
|
3630
|
-
|
|
3631
|
-
/**
|
|
3632
|
-
* Emitted when a Substrate account is mapped to an Ethereum address.
|
|
3633
|
-
* Rust variant: `AccountMapped { account, address }`
|
|
3634
|
-
*/
|
|
3635
|
-
type AccountMappedEvent = {
|
|
3636
|
-
account: string;
|
|
3637
|
-
/** 0x-prefixed 20-byte Ethereum address. */
|
|
3638
|
-
address: string;
|
|
3639
|
-
};
|
|
3640
|
-
/**
|
|
3641
|
-
* Emitted when an existing account mapping is removed.
|
|
3642
|
-
* Rust variant: `AccountUnmapped { account, address }`
|
|
3643
|
-
*/
|
|
3644
|
-
type AccountUnmappedEvent = {
|
|
3645
|
-
account: string;
|
|
3646
|
-
/** 0x-prefixed 20-byte Ethereum address. */
|
|
3647
|
-
address: string;
|
|
3648
|
-
};
|
|
3649
|
-
/**
|
|
3650
|
-
* Emitted by `register_alias()` when a new alias is claimed.
|
|
3651
|
-
* Rust variant: `AliasRegistered { account, alias, evm_address }`
|
|
3652
|
-
*/
|
|
3653
|
-
type AliasRegisteredEvent = {
|
|
3654
|
-
account: string;
|
|
3655
|
-
alias: string;
|
|
3656
|
-
/** Optional EVM address linked at registration time. */
|
|
3657
|
-
evmAddress: string | null;
|
|
3658
|
-
};
|
|
3659
|
-
/**
|
|
3660
|
-
* Emitted when an alias is released (burned / expired).
|
|
3661
|
-
* Rust variant: `AliasReleased { account, alias }`
|
|
3662
|
-
*/
|
|
3663
|
-
type AliasReleasedEvent = {
|
|
3664
|
-
account: string;
|
|
3665
|
-
alias: string;
|
|
3666
|
-
};
|
|
3667
|
-
/**
|
|
3668
|
-
* Emitted by `transfer_alias()` when ownership changes hands.
|
|
3669
|
-
* Rust variant: `AliasTransferred { from, to, alias }`
|
|
3670
|
-
*/
|
|
3671
|
-
type AliasTransferredEvent = {
|
|
3672
|
-
from: string;
|
|
3673
|
-
to: string;
|
|
3674
|
-
alias: string;
|
|
3675
|
-
};
|
|
3676
|
-
/**
|
|
3677
|
-
* Emitted by `put_alias_on_sale()` when an alias is listed on the marketplace.
|
|
3678
|
-
* Rust variant: `AliasListedForSale { seller, alias, price, private }`
|
|
3679
|
-
*/
|
|
3680
|
-
type AliasListedForSaleEvent = {
|
|
3681
|
-
seller: string;
|
|
3682
|
-
alias: string;
|
|
3683
|
-
price: bigint;
|
|
3684
|
-
/** Whether the listing is private (whitelist-only). */
|
|
3685
|
-
private: boolean;
|
|
3686
|
-
};
|
|
3687
|
-
/**
|
|
3688
|
-
* Emitted when an alias listing is cancelled before a sale.
|
|
3689
|
-
* Rust variant: `AliasSaleCancelled { seller, alias }`
|
|
3690
|
-
*/
|
|
3691
|
-
type AliasSaleCancelledEvent = {
|
|
3692
|
-
seller: string;
|
|
3693
|
-
alias: string;
|
|
3694
|
-
};
|
|
3695
|
-
/**
|
|
3696
|
-
* Emitted by `buy_alias()` when an alias is purchased.
|
|
3697
|
-
* Rust variant: `AliasSold { seller, buyer, alias, price }`
|
|
3698
|
-
*/
|
|
3699
|
-
type AliasSoldEvent = {
|
|
3700
|
-
seller: string;
|
|
3701
|
-
buyer: string;
|
|
3702
|
-
alias: string;
|
|
3703
|
-
price: bigint;
|
|
3704
|
-
};
|
|
3705
|
-
/**
|
|
3706
|
-
* Emitted by `add_chain_link()` when an external address is linked.
|
|
3707
|
-
* Rust variant: `ChainLinkAdded { account, chain_id, address }`
|
|
3708
|
-
*/
|
|
3709
|
-
type ChainLinkAddedEvent = {
|
|
3710
|
-
account: string;
|
|
3711
|
-
/** SLIP-0044 coin-type identifying the external chain. */
|
|
3712
|
-
chainId: number;
|
|
3713
|
-
/** Chain-specific address string. */
|
|
3714
|
-
address: string;
|
|
3715
|
-
};
|
|
3716
|
-
/**
|
|
3717
|
-
* Emitted by `remove_chain_link()` when an external address link is removed.
|
|
3718
|
-
* Rust variant: `ChainLinkRemoved { account, chain_id }`
|
|
3719
|
-
*/
|
|
3720
|
-
type ChainLinkRemovedEvent = {
|
|
3721
|
-
account: string;
|
|
3722
|
-
chainId: number;
|
|
3723
|
-
};
|
|
3724
|
-
/**
|
|
3725
|
-
* Emitted by `set_account_metadata()` when an account's metadata is updated.
|
|
3726
|
-
* Rust variant: `MetadataUpdated { account }`
|
|
3727
|
-
*/
|
|
3728
|
-
type MetadataUpdatedEvent = {
|
|
3729
|
-
account: string;
|
|
3730
|
-
};
|
|
3731
|
-
/**
|
|
3732
|
-
* Emitted by `add_supported_chain()` (governance) when a new chain type is whitelisted.
|
|
3733
|
-
* Rust variant: `SupportedChainAdded { chain_id, scheme }`
|
|
3734
|
-
*/
|
|
3735
|
-
type SupportedChainAddedEvent = {
|
|
3736
|
-
chainId: number;
|
|
3737
|
-
scheme: SignatureScheme;
|
|
3738
|
-
};
|
|
3739
|
-
/**
|
|
3740
|
-
* Emitted by `remove_supported_chain()` (governance) when a chain type is removed.
|
|
3741
|
-
* Rust variant: `SupportedChainRemoved { chain_id }`
|
|
3742
|
-
*/
|
|
3743
|
-
type SupportedChainRemovedEvent = {
|
|
3744
|
-
chainId: number;
|
|
3745
|
-
};
|
|
3746
|
-
/**
|
|
3747
|
-
* Emitted after a successful `dispatch_as_linked_account()` call.
|
|
3748
|
-
* Rust variant: `ProxyCallExecuted { owner, chain_id, address }`
|
|
3749
|
-
*/
|
|
3750
|
-
type ProxyCallExecutedEvent = {
|
|
3751
|
-
owner: string;
|
|
3752
|
-
chainId: number;
|
|
3753
|
-
address: string;
|
|
3754
|
-
};
|
|
3755
|
-
/**
|
|
3756
|
-
* Emitted by `register_private_link()` when a private (commitment-based) chain link is added.
|
|
3757
|
-
* Rust variant: `PrivateChainLinkAdded { account, chain_id, commitment }`
|
|
3758
|
-
*/
|
|
3759
|
-
type PrivateChainLinkAddedEvent = {
|
|
3760
|
-
account: string;
|
|
3761
|
-
chainId: number;
|
|
3762
|
-
/** 0x-prefixed 32-byte Poseidon commitment of the private link. */
|
|
3763
|
-
commitment: string;
|
|
3764
|
-
};
|
|
3765
|
-
/**
|
|
3766
|
-
* Emitted by `remove_private_link()` when a private chain link is removed.
|
|
3767
|
-
* Rust variant: `PrivateChainLinkRemoved { account, chain_id, commitment }`
|
|
3768
|
-
*/
|
|
3769
|
-
type PrivateChainLinkRemovedEvent = {
|
|
3770
|
-
account: string;
|
|
3771
|
-
chainId: number;
|
|
3772
|
-
/** 0x-prefixed 32-byte commitment. */
|
|
3773
|
-
commitment: string;
|
|
3774
|
-
};
|
|
3775
|
-
/**
|
|
3776
|
-
* Emitted by `reveal_private_link()` when a private link is publicly revealed.
|
|
3777
|
-
* Rust variant: `PrivateChainLinkRevealed { account, chain_id, address }`
|
|
3778
|
-
*/
|
|
3779
|
-
type PrivateChainLinkRevealedEvent = {
|
|
3780
|
-
account: string;
|
|
3781
|
-
chainId: number;
|
|
3782
|
-
/** The now-revealed external address. */
|
|
3783
|
-
address: string;
|
|
3784
|
-
};
|
|
3785
|
-
/**
|
|
3786
|
-
* Emitted after a successful `dispatch_as_private_link()` call.
|
|
3787
|
-
* Rust variant: `PrivateLinkDispatchExecuted { owner, commitment }`
|
|
3788
|
-
*/
|
|
3789
|
-
type PrivateLinkDispatchExecutedEvent = {
|
|
3790
|
-
owner: string;
|
|
3791
|
-
/** 0x-prefixed 32-byte commitment of the private link used. */
|
|
3792
|
-
commitment: string;
|
|
3793
|
-
};
|
|
3794
|
-
/** All events emitted by pallet-account-mapping as a discriminated union. */
|
|
3795
|
-
type AccountMappingEvent = {
|
|
3796
|
-
type: 'AccountMapped';
|
|
3797
|
-
data: AccountMappedEvent;
|
|
3798
|
-
} | {
|
|
3799
|
-
type: 'AccountUnmapped';
|
|
3800
|
-
data: AccountUnmappedEvent;
|
|
3801
|
-
} | {
|
|
3802
|
-
type: 'AliasRegistered';
|
|
3803
|
-
data: AliasRegisteredEvent;
|
|
3804
|
-
} | {
|
|
3805
|
-
type: 'AliasReleased';
|
|
3806
|
-
data: AliasReleasedEvent;
|
|
3807
|
-
} | {
|
|
3808
|
-
type: 'AliasTransferred';
|
|
3809
|
-
data: AliasTransferredEvent;
|
|
3810
|
-
} | {
|
|
3811
|
-
type: 'AliasListedForSale';
|
|
3812
|
-
data: AliasListedForSaleEvent;
|
|
3813
|
-
} | {
|
|
3814
|
-
type: 'AliasSaleCancelled';
|
|
3815
|
-
data: AliasSaleCancelledEvent;
|
|
3816
|
-
} | {
|
|
3817
|
-
type: 'AliasSold';
|
|
3818
|
-
data: AliasSoldEvent;
|
|
3819
|
-
} | {
|
|
3820
|
-
type: 'ChainLinkAdded';
|
|
3821
|
-
data: ChainLinkAddedEvent;
|
|
3822
|
-
} | {
|
|
3823
|
-
type: 'ChainLinkRemoved';
|
|
3824
|
-
data: ChainLinkRemovedEvent;
|
|
3825
|
-
} | {
|
|
3826
|
-
type: 'MetadataUpdated';
|
|
3827
|
-
data: MetadataUpdatedEvent;
|
|
3828
|
-
} | {
|
|
3829
|
-
type: 'SupportedChainAdded';
|
|
3830
|
-
data: SupportedChainAddedEvent;
|
|
3831
|
-
} | {
|
|
3832
|
-
type: 'SupportedChainRemoved';
|
|
3833
|
-
data: SupportedChainRemovedEvent;
|
|
3834
|
-
} | {
|
|
3835
|
-
type: 'ProxyCallExecuted';
|
|
3836
|
-
data: ProxyCallExecutedEvent;
|
|
3837
|
-
} | {
|
|
3838
|
-
type: 'PrivateChainLinkAdded';
|
|
3839
|
-
data: PrivateChainLinkAddedEvent;
|
|
3840
|
-
} | {
|
|
3841
|
-
type: 'PrivateChainLinkRemoved';
|
|
3842
|
-
data: PrivateChainLinkRemovedEvent;
|
|
3843
|
-
} | {
|
|
3844
|
-
type: 'PrivateChainLinkRevealed';
|
|
3845
|
-
data: PrivateChainLinkRevealedEvent;
|
|
3846
|
-
} | {
|
|
3847
|
-
type: 'PrivateLinkDispatchExecuted';
|
|
3848
|
-
data: PrivateLinkDispatchExecutedEvent;
|
|
3849
|
-
};
|
|
3850
|
-
|
|
3851
2977
|
/**
|
|
3852
2978
|
* TypeScript types for pallet-shielded-pool extrinsics and supporting structures.
|
|
3853
2979
|
*
|
|
@@ -4191,15 +3317,16 @@ declare function evmAddressToAccountId(evmAddr: string): Uint8Array;
|
|
|
4191
3317
|
* Derives the implicit Substrate AccountId32 for an EVM address using the
|
|
4192
3318
|
* EeSuffixAddressMapping rule: AccountId32 = H160 ++ [0x00; 12].
|
|
4193
3319
|
*
|
|
4194
|
-
* This is the
|
|
4195
|
-
*
|
|
3320
|
+
* This is the only mapping the runtime applies — it is structural, not a
|
|
3321
|
+
* lookup, so every EVM address has exactly one Substrate account. Returns
|
|
3322
|
+
* 0x-prefixed 64-char hex.
|
|
4196
3323
|
*
|
|
4197
3324
|
* @param evmAddr 0x-prefixed 20-byte EVM address.
|
|
4198
3325
|
*/
|
|
4199
3326
|
declare function evmToImplicitSubstrate(evmAddr: string): string;
|
|
4200
3327
|
/**
|
|
4201
|
-
* Converts an EVM H160 address to the 32-byte AccountId32 hex
|
|
4202
|
-
*
|
|
3328
|
+
* Converts an EVM H160 address to the 32-byte AccountId32 hex the runtime
|
|
3329
|
+
* derives from it (EeSuffixAddressMapping: H160 ++ [0x00; 12]).
|
|
4203
3330
|
* Returns null for invalid or non-EVM input.
|
|
4204
3331
|
*
|
|
4205
3332
|
* @param address 0x-prefixed EVM H160 address (or bare 40-char hex).
|
|
@@ -4275,9 +3402,9 @@ declare function addressToAccountIdHex(addr: string): string | null;
|
|
|
4275
3402
|
declare function mapExtrinsicArgs(section: string, method: string, args: Record<string, unknown>): Record<string, unknown>;
|
|
4276
3403
|
/**
|
|
4277
3404
|
* Maps raw event data fields (which may use positional keys) to semantic names
|
|
4278
|
-
* for shielded-pool,
|
|
3405
|
+
* for shielded-pool, zk-verifier, evm, ethereum and system events.
|
|
4279
3406
|
*
|
|
4280
|
-
* @param method - Event name (e.g. `'shielded'`, `'
|
|
3407
|
+
* @param method - Event name (e.g. `'shielded'`, `'unshielded'`).
|
|
4281
3408
|
* @param data - Raw event data fields.
|
|
4282
3409
|
* @returns Remapped data with semantic keys, or the original object if unknown.
|
|
4283
3410
|
*/
|
|
@@ -4339,36 +3466,6 @@ interface DecodedSudoArgs {
|
|
|
4339
3466
|
interface DecodedRemarkArgs {
|
|
4340
3467
|
remark: string;
|
|
4341
3468
|
}
|
|
4342
|
-
interface DecodedRegisterAliasArgs {
|
|
4343
|
-
alias: string;
|
|
4344
|
-
}
|
|
4345
|
-
interface DecodedPutAliasForSaleArgs {
|
|
4346
|
-
asking_price: string;
|
|
4347
|
-
sale_type: string;
|
|
4348
|
-
whitelist_count?: number;
|
|
4349
|
-
}
|
|
4350
|
-
interface DecodedSetAccountMetadataArgs {
|
|
4351
|
-
display_name: string;
|
|
4352
|
-
bio: string;
|
|
4353
|
-
avatar: string;
|
|
4354
|
-
}
|
|
4355
|
-
interface DecodedAddChainLinkArgs {
|
|
4356
|
-
chain_id: number | string;
|
|
4357
|
-
target_address: string;
|
|
4358
|
-
signature: string;
|
|
4359
|
-
}
|
|
4360
|
-
interface DecodedRevealPrivateLinkArgs {
|
|
4361
|
-
commitment: string;
|
|
4362
|
-
address: string;
|
|
4363
|
-
blinding: string;
|
|
4364
|
-
signature: string;
|
|
4365
|
-
}
|
|
4366
|
-
interface DecodedDispatchAsPrivateLinkArgs {
|
|
4367
|
-
owner: string;
|
|
4368
|
-
commitment: string;
|
|
4369
|
-
zk_proof: string;
|
|
4370
|
-
inner_call: string;
|
|
4371
|
-
}
|
|
4372
3469
|
interface DecodedEthereumTransactArgs {
|
|
4373
3470
|
tx_type: string;
|
|
4374
3471
|
chain_id?: number;
|
|
@@ -4391,8 +3488,7 @@ interface DecodedEvmCallArgs {
|
|
|
4391
3488
|
*
|
|
4392
3489
|
* These interfaces represent the JSON-decoded form of on-chain events as
|
|
4393
3490
|
* they are received via RPC or indexer. They cover all pallets relevant
|
|
4394
|
-
* to the Orbinum explorer: shielded-pool, balances, system, ethereum
|
|
4395
|
-
* and account-mapping.
|
|
3491
|
+
* to the Orbinum explorer: shielded-pool, balances, system, ethereum and evm.
|
|
4396
3492
|
*
|
|
4397
3493
|
* Note: EventRecord itself is exported from @orbinum/sdk via substrate/types.
|
|
4398
3494
|
*/
|
|
@@ -4434,29 +3530,6 @@ interface ReservedEventData {
|
|
|
4434
3530
|
account: string;
|
|
4435
3531
|
amount: string;
|
|
4436
3532
|
}
|
|
4437
|
-
interface AliasRegisteredData {
|
|
4438
|
-
who: string;
|
|
4439
|
-
alias: string;
|
|
4440
|
-
}
|
|
4441
|
-
interface AliasTransferredData {
|
|
4442
|
-
from: string;
|
|
4443
|
-
to: string;
|
|
4444
|
-
alias: string;
|
|
4445
|
-
}
|
|
4446
|
-
interface AliasOnSaleData {
|
|
4447
|
-
alias: string;
|
|
4448
|
-
price: string;
|
|
4449
|
-
}
|
|
4450
|
-
interface AliasSoldData {
|
|
4451
|
-
from: string;
|
|
4452
|
-
to: string;
|
|
4453
|
-
alias: string;
|
|
4454
|
-
price: string;
|
|
4455
|
-
}
|
|
4456
|
-
interface AccountMappedData {
|
|
4457
|
-
account: string;
|
|
4458
|
-
address: string;
|
|
4459
|
-
}
|
|
4460
3533
|
/** EVM exit reason — either a named variant or a plain string. */
|
|
4461
3534
|
type EvmExitReason = string | Record<string, unknown>;
|
|
4462
3535
|
interface EvmExecutedData {
|
|
@@ -4491,4 +3564,4 @@ interface ExtrinsicFailedData {
|
|
|
4491
3564
|
dispatch_info: DispatchInfo;
|
|
4492
3565
|
}
|
|
4493
3566
|
|
|
4494
|
-
export { type
|
|
3567
|
+
export { type ActiveVersionSetEvent, type AssetRegisteredEvent, type AssetUnverifiedEvent, type AssetVerifiedEvent, BABYJUB_SUBORDER, BN254_R, type BatchRegisterVerificationKeysArgs, type BatchVerificationKeysRegisteredEvent, type BlockInfo, type Bytes32, CURRENT_CIRCUIT_VERSION, type ChainInfo, CircuitId, CircuitId as CircuitIdType, CircuitVersionResolver, type ClaimShieldedFeesParams, type ClientProviderConfig, type CommitmentsInsertedEvent, type CommitmentsInsertedEventData, type ConnectionStatus, CryptoPrecompiles, type DecodedBatchArgs, type DecodedEthereumTransactArgs, type DecodedEvmCallArgs, type DecodedPrecompile, type DecodedPrivateTransferArgs, type DecodedRemarkArgs, type DecodedShieldArgs, type DecodedShieldBatchArgs, type DecodedShieldBatchOperation, type DecodedSudoArgs, type DecodedTransferAllArgs, type DecodedTransferArgs, type DecodedTransferKeepAliveArgs, type DecodedUnshieldArgs, type DecryptedMemo, type DispatchError, type DispatchInfo, type DynamicBuilder, ENCRYPTED_MEMO_SIZE, EncryptedMemo, type EncryptedNoteRecord, type EndowedEventData, type EthereumExecutedData, type EventData, type EventPhase, type EventRecord, type EvmAddressInfo, type EvmBlock, EvmClient, type EvmExecutedData, type EvmExitReason, EvmExplorer, type EvmLog, type EvmSigner, type EvmTransaction, type EvmTxRequest, type EvmTxSummary, type ExtrinsicDecoder, type ExtrinsicFailedData, type ExtrinsicSuccessData, type FeeClaimProofInputs, type FormatOptions, KNOWN_PRECOMPILES, type KnownPrecompileInfo, MIN_SIGNATURE_BYTES, type MerkleRootUpdatedData, type MerkleRootUpdatedEvent, type MerkleTreeInfo, NoteBuilder, type NoteDisclosure, type NoteInput, type NoteStatusUpdate, type NullifiersSpentEvent, type NullifiersSpentEventData, OrbinumClient, type OrbinumClientConfig, OrbinumClientProvider, PRECOMPILE_ADDR, PrivacyKeyManager, type PrivacyMerkleProof, PrivacyModule, type PrivateTransferArgs, type PrivateTransferInput, type PrivateTransferOutput, type PrivateTransferParams, type PrivateTransferProofInputs, type ProofVerificationFailedEvent, type ProofVerifiedEvent, type RawBlock, type RawBlockHeader, type RawTransferInput, type RawTransferOutput, type RegisterAssetArgs, type RegisterVerificationKeyArgs, type RelayerInfo, RelayerStatusModule, type RemoveVerificationKeyArgs, type ReservedEventData, type ResolvedSpendVersion, type RpcV2MerkleProof, type RpcV2NullifierStatus, type RpcV2PoolAssetBalance, type RpcV2PoolStats, SPENDING_KEY_VERIFYING_CONTRACT, SPENDING_KEY_WARNING, type ScanCommitment, type SelfEphWindowEntry, type SetActiveVersionArgs, type ShieldArgs, type ShieldBatchArgs, type ShieldBatchItem, type ShieldBatchParams, type ShieldOperation, type ShieldParams, type ShieldedEvent, type ShieldedEventData, type ShieldedPoolCall, type ShieldedPoolEvent, ShieldedPoolModule, ShieldedPoolPrecompile, type SpendingKeyTypedData, type StatusChangeEvent, type StatusListener, SubstrateClient, type SystemHealth, type TokenInfo, type TokenTransfer, type TransferEventData, type TransferInputNote, type TransferOutputNote, type TryDecryptOptions, type TxResult, type UnsafeTxOptions, type UnshieldArgs, type UnshieldParams, type UnshieldProofInputs, type UnshieldedEvent, type UnshieldedEventData, type UnverifyAssetArgs, VaultLockedError, type VerificationKeyRegisteredEvent, type VerificationKeyRemovedEvent, type VerifyAssetArgs, type VerifyProofArgs, type VkEntry, type ZkNote, type ZkVerifierCall, type ZkVerifierCircuitVersionInfo, type ZkVerifierEvent, type ZkVerifierHistoricalVersion, ZkVerifierModule, type ZkVerifierVersionStats, type ZkVerifierVkHash, accountIdHexToSs58, addressToAccountIdHex, applyNoteStatus, bigintTo32Be, bigintTo32Le, bigintTo32LeArr, blindTag, buildDummyTransferInput, bytesToBigintLE, canonicalAccountId, computeNoteCommitment, computeNullifier, computePathIndices, createNoteDisclosureKey, decodeNoteDisclosureKey, decodePrecompileCalldata, decryptJson, decryptNoteRecord, deriveMasterKeyBytes, deriveOwnerPk, deriveSelfEphSk, deriveSpendingKeyFromSignature, deriveSpendingKeyMessageV2, deriveSpendingKeyTypedData, deriveStealthOwnerPk, deriveStealthSk, deriveVaultBlindKey, deriveVaultKey, deriveViewTag, deriveViewingPublicKey, deriveViewingSecretKey, encryptJson, encryptNote, ensureHexPrefix, evmAddressToAccountId, evmToImplicitSubstrate, evmToMappedAccountHex, evmToSubstrate, formatBalance, formatORB, fromBase64, fromHex, generateFeeClaimProof, generateTransferProof, generateUnshieldProof, getPrecompileLabel, hexToBigint, hexToNumber, implicitSubstrateToEvm, isEvmAddress, isImplicitEvmAccount, isSs58, isSubstrateAddress, isUnifiedAddress, leHexToBigint, mapExtrinsicArgs, mapZkEventData, normalizeEvmAddress, noteBlindTag, randomBlinding, recoverOwnerPkPoint, selectNotes, selfEphWindow, shortHash, substrateSs58ToAccountIdHex, substrateToEvm, toBase64, toHex, toTxResult, treeIdOf, truncateMiddle, tryDecryptNote, tryDecryptNoteVerbose, vaultReplacer, vaultReviver };
|