@flarenetwork/multichain-wallet-connector 0.0.2-rc.21 → 0.0.2-rc.23
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/core/index.d.mts +1 -1
- package/dist/core/index.mjs +1 -1
- package/dist/{core-1pT9AVKV.mjs → core-CCe3NLRY.mjs} +4 -34
- package/dist/core-CCe3NLRY.mjs.map +1 -0
- package/dist/{index-C6Pp_gsM.d.mts → index-BoPtY6iM.d.mts} +1 -3
- package/dist/{index-C6Pp_gsM.d.mts.map → index-BoPtY6iM.d.mts.map} +1 -1
- package/dist/{index-K6sAU1hV.d.mts → index-lRGfO_xe.d.mts} +2 -2
- package/dist/{index-K6sAU1hV.d.mts.map → index-lRGfO_xe.d.mts.map} +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +2 -2
- package/dist/react/index.d.mts +2 -2
- package/dist/react/index.mjs +2 -2
- package/dist/{react-D-tpV70-.mjs → react-pdn5rIOl.mjs} +2 -2
- package/dist/{react-D-tpV70-.mjs.map → react-pdn5rIOl.mjs.map} +1 -1
- package/package.json +1 -1
- package/dist/core-1pT9AVKV.mjs.map +0 -1
package/dist/core/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as MultiChainEvents, A as ConnectorTypeMap, B as LedgerConnectOptions, C as ConnectorClientMap, D as ConnectorProviderMap, E as ConnectorProvider, F as XrpClient, G as ChainChangedEvent, H as LedgerPaginatedBip44, I as EvmClient, J as DcentWalletOptions, K as ChainOverride, L as ChainClient, M as XamanSendTxOptions, N as LedgerSession, O as ConnectorSendTxOptions, P as DcentConnector, Q as MetaMaskWalletOptions, R as LedgerCaip2, S as ConnectorClient, T as ConnectorConnectOptionsMap, U as Bip44, V as LedgerHDStandard, W as AccountChangedEvent, X as ErrorEvent, Y as DisconnectEvent, Z as LedgerWalletOptions, _ as ConfigResolver, _t as XRPlCaip2, a as shortenAddress, at as XamanWalletOptions, c as WalletConnectError, d as DcentError, dt as BaseChain, et as MultiChainOptions, f as WalletError, ft as Caip2, g as MultiChain, gt as NonEvmChain, h as ChainGuards, ht as EvmChain, i as objectValues, it as WalletOptions, j as ConnectorXrpClientMap, k as ConnectorSendTxOptionsMap, l as MetaMaskError, m as ErrorCodeKey, mt as Eip155Caip2, n as objectFromEntries, nt as WalletConnectWalletOptions, o as WalletErrorHelper, ot as WalletAddressState, p as ErrorCode, pt as Chain, q as ConnectEvent, r as objectKeys, rt as WalletMetadata, s as XamanError, st as WalletState, t as objectEntries, tt as ResolvedWalletConfig, u as LedgerError, ut as WalletType, vt as XrplChain, w as ConnectorConnectOptions, x as Connector, z as LedgerComputedAddress } from "../index-
|
|
1
|
+
import { $ as MultiChainEvents, A as ConnectorTypeMap, B as LedgerConnectOptions, C as ConnectorClientMap, D as ConnectorProviderMap, E as ConnectorProvider, F as XrpClient, G as ChainChangedEvent, H as LedgerPaginatedBip44, I as EvmClient, J as DcentWalletOptions, K as ChainOverride, L as ChainClient, M as XamanSendTxOptions, N as LedgerSession, O as ConnectorSendTxOptions, P as DcentConnector, Q as MetaMaskWalletOptions, R as LedgerCaip2, S as ConnectorClient, T as ConnectorConnectOptionsMap, U as Bip44, V as LedgerHDStandard, W as AccountChangedEvent, X as ErrorEvent, Y as DisconnectEvent, Z as LedgerWalletOptions, _ as ConfigResolver, _t as XRPlCaip2, a as shortenAddress, at as XamanWalletOptions, c as WalletConnectError, d as DcentError, dt as BaseChain, et as MultiChainOptions, f as WalletError, ft as Caip2, g as MultiChain, gt as NonEvmChain, h as ChainGuards, ht as EvmChain, i as objectValues, it as WalletOptions, j as ConnectorXrpClientMap, k as ConnectorSendTxOptionsMap, l as MetaMaskError, m as ErrorCodeKey, mt as Eip155Caip2, n as objectFromEntries, nt as WalletConnectWalletOptions, o as WalletErrorHelper, ot as WalletAddressState, p as ErrorCode, pt as Chain, q as ConnectEvent, r as objectKeys, rt as WalletMetadata, s as XamanError, st as WalletState, t as objectEntries, tt as ResolvedWalletConfig, u as LedgerError, ut as WalletType, vt as XrplChain, w as ConnectorConnectOptions, x as Connector, z as LedgerComputedAddress } from "../index-BoPtY6iM.mjs";
|
|
2
2
|
export { AccountChangedEvent, BaseChain, Bip44, Caip2, Chain, ChainChangedEvent, ChainClient, ChainGuards, ChainOverride, ConfigResolver, ConnectEvent, Connector, ConnectorClient, ConnectorClientMap, ConnectorConnectOptions, ConnectorConnectOptionsMap, ConnectorProvider, ConnectorProviderMap, ConnectorSendTxOptions, ConnectorSendTxOptionsMap, ConnectorTypeMap, ConnectorXrpClientMap, DcentConnector, DcentError, DcentWalletOptions, DisconnectEvent, Eip155Caip2, ErrorCode, ErrorCodeKey, ErrorEvent, EvmChain, EvmClient, LedgerCaip2, LedgerComputedAddress, LedgerConnectOptions, LedgerError, LedgerHDStandard, LedgerPaginatedBip44, LedgerSession, LedgerWalletOptions, MetaMaskError, MetaMaskWalletOptions, MultiChain, MultiChainEvents, MultiChainOptions, NonEvmChain, ResolvedWalletConfig, WalletAddressState, WalletConnectError, WalletConnectWalletOptions, WalletError, WalletErrorHelper, WalletMetadata, WalletOptions, WalletState, WalletType, XRPlCaip2, XamanError, XamanSendTxOptions, XamanWalletOptions, XrpClient, XrplChain, objectEntries, objectFromEntries, objectKeys, objectValues, shortenAddress };
|
package/dist/core/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as objectFromEntries, a as WalletErrorHelper, b as shortenAddress, c as MetaMaskError, d as WalletError, f as ErrorCode, g as objectEntries, h as ChainGuards, i as DcentConnector, l as LedgerError, n as EvmClient, o as XamanError, p as ConfigResolver, r as Bip44, s as WalletConnectError, t as MultiChain, u as DcentError, v as objectKeys, y as objectValues } from "../core-
|
|
1
|
+
import { _ as objectFromEntries, a as WalletErrorHelper, b as shortenAddress, c as MetaMaskError, d as WalletError, f as ErrorCode, g as objectEntries, h as ChainGuards, i as DcentConnector, l as LedgerError, n as EvmClient, o as XamanError, p as ConfigResolver, r as Bip44, s as WalletConnectError, t as MultiChain, u as DcentError, v as objectKeys, y as objectValues } from "../core-CCe3NLRY.mjs";
|
|
2
2
|
export { Bip44, ChainGuards, ConfigResolver, DcentConnector, DcentError, ErrorCode, EvmClient, LedgerError, MetaMaskError, MultiChain, WalletConnectError, WalletError, WalletErrorHelper, XamanError, objectEntries, objectFromEntries, objectKeys, objectValues, shortenAddress };
|
|
@@ -55,13 +55,6 @@ function objectEntries(obj) {
|
|
|
55
55
|
function objectFromEntries(entries) {
|
|
56
56
|
return Object.fromEntries(entries);
|
|
57
57
|
}
|
|
58
|
-
function isEmptyObject(value) {
|
|
59
|
-
return typeof value === "object" && value !== null && !Array.isArray(value) && Object.keys(value).length === 0;
|
|
60
|
-
}
|
|
61
|
-
/** Strips fields with empty object values ({}) from an object. */
|
|
62
|
-
function stripEmptyObjects(obj) {
|
|
63
|
-
return objectFromEntries(objectEntries(obj).filter(([, v]) => !isEmptyObject(v)));
|
|
64
|
-
}
|
|
65
58
|
//#endregion
|
|
66
59
|
//#region src/core/chains/chain.constants.ts
|
|
67
60
|
const CAIP2_NAMESPACES = {
|
|
@@ -2189,40 +2182,17 @@ var WalletConnectXrpClient = class extends XrplClient {
|
|
|
2189
2182
|
try {
|
|
2190
2183
|
const prepared = await this.autofill(tx);
|
|
2191
2184
|
const xrpCaip2 = await this.getCaip2();
|
|
2192
|
-
|
|
2185
|
+
return (await this.provider.request({
|
|
2193
2186
|
method: "xrpl_signTransaction",
|
|
2194
2187
|
params: {
|
|
2195
2188
|
tx_json: prepared,
|
|
2196
|
-
submit:
|
|
2189
|
+
submit: true
|
|
2197
2190
|
}
|
|
2198
|
-
}, xrpCaip2);
|
|
2199
|
-
const signedBlob = encode(this.sanitizeTx(result.tx_json));
|
|
2200
|
-
return (await this.submitAndWait(signedBlob)).result.hash;
|
|
2191
|
+
}, xrpCaip2)).tx_json.hash;
|
|
2201
2192
|
} finally {
|
|
2202
2193
|
await this.disconnect();
|
|
2203
2194
|
}
|
|
2204
2195
|
}
|
|
2205
|
-
sanitizeTx(walletResult) {
|
|
2206
|
-
if (this.isGirin(walletResult)) return stripEmptyObjects({
|
|
2207
|
-
TransactionType: walletResult.TransactionType,
|
|
2208
|
-
Account: walletResult.Account,
|
|
2209
|
-
Fee: walletResult.Fee,
|
|
2210
|
-
Sequence: walletResult.Sequence,
|
|
2211
|
-
SigningPubKey: walletResult.SigningPubKey,
|
|
2212
|
-
TxnSignature: walletResult.TxnSignature,
|
|
2213
|
-
Flags: walletResult.Flags,
|
|
2214
|
-
LastLedgerSequence: walletResult.LastLedgerSequence,
|
|
2215
|
-
Destination: walletResult.Destination,
|
|
2216
|
-
Amount: walletResult.Amount,
|
|
2217
|
-
DestinationTag: walletResult.DestinationTag,
|
|
2218
|
-
Memos: walletResult.Memos,
|
|
2219
|
-
SourceTag: walletResult.SourceTag
|
|
2220
|
-
});
|
|
2221
|
-
return walletResult;
|
|
2222
|
-
}
|
|
2223
|
-
isGirin(_walletResult) {
|
|
2224
|
-
return (this.provider.session?.peer.metadata.name ?? "unknown").toLowerCase().includes("girin");
|
|
2225
|
-
}
|
|
2226
2196
|
};
|
|
2227
2197
|
//#endregion
|
|
2228
2198
|
//#region src/core/connectors/wallet-connect/internal/wallet-connect-client-factory.ts
|
|
@@ -2965,4 +2935,4 @@ var MultiChain = class {
|
|
|
2965
2935
|
//#endregion
|
|
2966
2936
|
export { objectFromEntries as _, WalletErrorHelper as a, shortenAddress as b, MetaMaskError as c, WalletError as d, ErrorCode as f, objectEntries as g, ChainGuards as h, DcentConnector as i, LedgerError as l, evmCaip2s as m, EvmClient as n, XamanError as o, ConfigResolver as p, Bip44 as r, WalletConnectError as s, MultiChain as t, DcentError as u, objectKeys as v, objectValues as y };
|
|
2967
2937
|
|
|
2968
|
-
//# sourceMappingURL=core-
|
|
2938
|
+
//# sourceMappingURL=core-CCe3NLRY.mjs.map
|