@metamask-previews/bridge-status-controller 44.0.0-preview-5a701133 → 44.0.0-preview-b896289e
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/CHANGELOG.md +2 -28
- package/dist/bridge-status-controller.cjs +44 -47
- package/dist/bridge-status-controller.cjs.map +1 -1
- package/dist/bridge-status-controller.d.cts +3 -3
- package/dist/bridge-status-controller.d.cts.map +1 -1
- package/dist/bridge-status-controller.d.mts +3 -3
- package/dist/bridge-status-controller.d.mts.map +1 -1
- package/dist/bridge-status-controller.mjs +45 -48
- package/dist/bridge-status-controller.mjs.map +1 -1
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +3 -2
- package/dist/types.d.cts.map +1 -1
- package/dist/types.d.mts +3 -2
- package/dist/types.d.mts.map +1 -1
- package/dist/types.mjs.map +1 -1
- package/dist/utils/transaction.cjs +38 -69
- package/dist/utils/transaction.cjs.map +1 -1
- package/dist/utils/transaction.d.cts +27 -37
- package/dist/utils/transaction.d.cts.map +1 -1
- package/dist/utils/transaction.d.mts +27 -37
- package/dist/utils/transaction.d.mts.map +1 -1
- package/dist/utils/transaction.mjs +37 -68
- package/dist/utils/transaction.mjs.map +1 -1
- package/package.json +2 -2
- package/dist/utils/snaps.cjs +0 -35
- package/dist/utils/snaps.cjs.map +0 -1
- package/dist/utils/snaps.d.cts +0 -29
- package/dist/utils/snaps.d.cts.map +0 -1
- package/dist/utils/snaps.d.mts +0 -29
- package/dist/utils/snaps.d.mts.map +0 -1
- package/dist/utils/snaps.mjs +0 -31
- package/dist/utils/snaps.mjs.map +0 -1
package/dist/utils/snaps.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"snaps.cjs","sourceRoot":"","sources":["../../src/utils/snaps.ts"],"names":[],"mappings":";;;AACA,+BAAkC;AAElC;;;;;;;;;;GAUG;AACI,MAAM,8BAA8B,GAAG,CAC5C,MAAc,EACd,WAAmB,EACnB,KAAkB,EAClB,SAAiB,EACjB,OAAiC,EACjC,EAAE;IACF,OAAO;QACL,MAAM,EAAE,MAAe;QACvB,MAAM,EAAE,UAAU;QAClB,OAAO,EAAE,iBAA0B;QACnC,OAAO,EAAE;YACP,EAAE,EAAE,IAAA,SAAI,GAAE;YACV,OAAO,EAAE,KAAK;YACd,MAAM,EAAE,wBAAwB;YAChC,MAAM,EAAE;gBACN,WAAW;gBACX,KAAK;gBACL,SAAS;gBACT,GAAG,CAAC,OAAO,IAAI,EAAE,OAAO,EAAE,CAAC;aAC5B;SACF;KACF,CAAC;AACJ,CAAC,CAAC;AAvBW,QAAA,8BAA8B,kCAuBzC","sourcesContent":["import type { CaipChainId } from '@metamask/utils';\nimport { v4 as uuid } from 'uuid';\n\n/**\n * Creates a client request object for signing and sending a transaction\n * Works for Solana, BTC, Tron, and other non-EVM networks\n *\n * @param snapId - The snap ID to send the request to\n * @param transaction - The base64 encoded transaction string\n * @param scope - The CAIP-2 chain scope\n * @param accountId - The account ID\n * @param options - Optional network-specific options\n * @returns The snap request object\n */\nexport const createClientTransactionRequest = (\n snapId: string,\n transaction: string,\n scope: CaipChainId,\n accountId: string,\n options?: Record<string, unknown>,\n) => {\n return {\n snapId: snapId as never,\n origin: 'metamask',\n handler: 'onClientRequest' as never,\n request: {\n id: uuid(),\n jsonrpc: '2.0',\n method: 'signAndSendTransaction',\n params: {\n transaction,\n scope,\n accountId,\n ...(options && { options }),\n },\n },\n };\n};\n"]}
|
package/dist/utils/snaps.d.cts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type { CaipChainId } from "@metamask/utils";
|
|
2
|
-
/**
|
|
3
|
-
* Creates a client request object for signing and sending a transaction
|
|
4
|
-
* Works for Solana, BTC, Tron, and other non-EVM networks
|
|
5
|
-
*
|
|
6
|
-
* @param snapId - The snap ID to send the request to
|
|
7
|
-
* @param transaction - The base64 encoded transaction string
|
|
8
|
-
* @param scope - The CAIP-2 chain scope
|
|
9
|
-
* @param accountId - The account ID
|
|
10
|
-
* @param options - Optional network-specific options
|
|
11
|
-
* @returns The snap request object
|
|
12
|
-
*/
|
|
13
|
-
export declare const createClientTransactionRequest: (snapId: string, transaction: string, scope: CaipChainId, accountId: string, options?: Record<string, unknown>) => {
|
|
14
|
-
snapId: never;
|
|
15
|
-
origin: string;
|
|
16
|
-
handler: never;
|
|
17
|
-
request: {
|
|
18
|
-
id: string;
|
|
19
|
-
jsonrpc: string;
|
|
20
|
-
method: string;
|
|
21
|
-
params: {
|
|
22
|
-
options?: Record<string, unknown> | undefined;
|
|
23
|
-
transaction: string;
|
|
24
|
-
scope: `${string}:${string}`;
|
|
25
|
-
accountId: string;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
//# sourceMappingURL=snaps.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"snaps.d.cts","sourceRoot":"","sources":["../../src/utils/snaps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,wBAAwB;AAGnD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,8BAA8B,WACjC,MAAM,eACD,MAAM,SACZ,WAAW,aACP,MAAM,YACP,OAAO,MAAM,EAAE,OAAO,CAAC;;;;;;;;;;;;;;;CAkBlC,CAAC"}
|
package/dist/utils/snaps.d.mts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type { CaipChainId } from "@metamask/utils";
|
|
2
|
-
/**
|
|
3
|
-
* Creates a client request object for signing and sending a transaction
|
|
4
|
-
* Works for Solana, BTC, Tron, and other non-EVM networks
|
|
5
|
-
*
|
|
6
|
-
* @param snapId - The snap ID to send the request to
|
|
7
|
-
* @param transaction - The base64 encoded transaction string
|
|
8
|
-
* @param scope - The CAIP-2 chain scope
|
|
9
|
-
* @param accountId - The account ID
|
|
10
|
-
* @param options - Optional network-specific options
|
|
11
|
-
* @returns The snap request object
|
|
12
|
-
*/
|
|
13
|
-
export declare const createClientTransactionRequest: (snapId: string, transaction: string, scope: CaipChainId, accountId: string, options?: Record<string, unknown>) => {
|
|
14
|
-
snapId: never;
|
|
15
|
-
origin: string;
|
|
16
|
-
handler: never;
|
|
17
|
-
request: {
|
|
18
|
-
id: string;
|
|
19
|
-
jsonrpc: string;
|
|
20
|
-
method: string;
|
|
21
|
-
params: {
|
|
22
|
-
options?: Record<string, unknown> | undefined;
|
|
23
|
-
transaction: string;
|
|
24
|
-
scope: `${string}:${string}`;
|
|
25
|
-
accountId: string;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
//# sourceMappingURL=snaps.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"snaps.d.mts","sourceRoot":"","sources":["../../src/utils/snaps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,wBAAwB;AAGnD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,8BAA8B,WACjC,MAAM,eACD,MAAM,SACZ,WAAW,aACP,MAAM,YACP,OAAO,MAAM,EAAE,OAAO,CAAC;;;;;;;;;;;;;;;CAkBlC,CAAC"}
|
package/dist/utils/snaps.mjs
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { v4 as uuid } from "uuid";
|
|
2
|
-
/**
|
|
3
|
-
* Creates a client request object for signing and sending a transaction
|
|
4
|
-
* Works for Solana, BTC, Tron, and other non-EVM networks
|
|
5
|
-
*
|
|
6
|
-
* @param snapId - The snap ID to send the request to
|
|
7
|
-
* @param transaction - The base64 encoded transaction string
|
|
8
|
-
* @param scope - The CAIP-2 chain scope
|
|
9
|
-
* @param accountId - The account ID
|
|
10
|
-
* @param options - Optional network-specific options
|
|
11
|
-
* @returns The snap request object
|
|
12
|
-
*/
|
|
13
|
-
export const createClientTransactionRequest = (snapId, transaction, scope, accountId, options) => {
|
|
14
|
-
return {
|
|
15
|
-
snapId: snapId,
|
|
16
|
-
origin: 'metamask',
|
|
17
|
-
handler: 'onClientRequest',
|
|
18
|
-
request: {
|
|
19
|
-
id: uuid(),
|
|
20
|
-
jsonrpc: '2.0',
|
|
21
|
-
method: 'signAndSendTransaction',
|
|
22
|
-
params: {
|
|
23
|
-
transaction,
|
|
24
|
-
scope,
|
|
25
|
-
accountId,
|
|
26
|
-
...(options && { options }),
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
//# sourceMappingURL=snaps.mjs.map
|
package/dist/utils/snaps.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"snaps.mjs","sourceRoot":"","sources":["../../src/utils/snaps.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,IAAI,IAAI,EAAE,aAAa;AAElC;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAC5C,MAAc,EACd,WAAmB,EACnB,KAAkB,EAClB,SAAiB,EACjB,OAAiC,EACjC,EAAE;IACF,OAAO;QACL,MAAM,EAAE,MAAe;QACvB,MAAM,EAAE,UAAU;QAClB,OAAO,EAAE,iBAA0B;QACnC,OAAO,EAAE;YACP,EAAE,EAAE,IAAI,EAAE;YACV,OAAO,EAAE,KAAK;YACd,MAAM,EAAE,wBAAwB;YAChC,MAAM,EAAE;gBACN,WAAW;gBACX,KAAK;gBACL,SAAS;gBACT,GAAG,CAAC,OAAO,IAAI,EAAE,OAAO,EAAE,CAAC;aAC5B;SACF;KACF,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import type { CaipChainId } from '@metamask/utils';\nimport { v4 as uuid } from 'uuid';\n\n/**\n * Creates a client request object for signing and sending a transaction\n * Works for Solana, BTC, Tron, and other non-EVM networks\n *\n * @param snapId - The snap ID to send the request to\n * @param transaction - The base64 encoded transaction string\n * @param scope - The CAIP-2 chain scope\n * @param accountId - The account ID\n * @param options - Optional network-specific options\n * @returns The snap request object\n */\nexport const createClientTransactionRequest = (\n snapId: string,\n transaction: string,\n scope: CaipChainId,\n accountId: string,\n options?: Record<string, unknown>,\n) => {\n return {\n snapId: snapId as never,\n origin: 'metamask',\n handler: 'onClientRequest' as never,\n request: {\n id: uuid(),\n jsonrpc: '2.0',\n method: 'signAndSendTransaction',\n params: {\n transaction,\n scope,\n accountId,\n ...(options && { options }),\n },\n },\n };\n};\n"]}
|