You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Now you can use your custom methods with full type safety
68
+
const result =awaitclient.invokeMethod({
69
+
scope: 'mychain:123', // Your custom chain scope
70
+
request: {
71
+
method: 'customMethod',
72
+
params: { param1: 'hello', param2: 42 }
73
+
}
74
+
});
75
+
```
76
+
77
+
## Creating Custom Transports
78
+
79
+
Transports handle the communication layer between your application and the wallet. You can create custom transports for different environments or communication methods.
80
+
81
+
### Transport Interface
82
+
83
+
A transport must implement the following interface:
The client provides two main error types for handling different failure scenarios:
118
+
119
+
### TransportError
120
+
121
+
`TransportError` is thrown when there are issues with the transport layer communication, such as connection failures or the targeted browser extension not being installed.
`MultichainApiError` is thrown when the wallet returns an error response to API requests. This includes permission denials, invalid parameters, and other wallet-specific errors.
0 commit comments