@@ -70,6 +70,14 @@ spooke chain:
7070 const to = { " 0" : " 0x2.icon/" + icon_savings };
7171 let sendCallIx = await xcall_program .methods
7272 .sendCall (Buffer .from (envelope), to)...
73+
74+ function getClaimRewardData (
75+ ): Uint8Array {
76+ let rlpInput: rlp .Input = [
77+ " xclaimrewards" ,
78+ ];
79+ return rlp .encode (rlpInput);
80+ }
7381```
7482### Unlock
7583To unlock the locked bnUSD:
@@ -97,7 +105,15 @@ To unlock the locked bnUSD:
97105 console .log (Buffer .from (envelope));
98106 let sendCallIx = await xcall_program .methods
99107 .sendCall (Buffer .from (envelope), to)...
100-
108+ function getUnlockData (
109+ amount : number ,
110+ ): Uint8Array {
111+ let rlpInput: rlp .Input = [
112+ " xunlock" ,
113+ amount
114+ ];
115+ return rlp .encode (rlpInput);
116+ }
101117```
102118## USDC Staking feature
103119USDC staking is a feature in which USDC can be locked to the savings contract to earn the savings
@@ -106,7 +122,7 @@ to the savings contract. When unlocking it user will get bnUSD as normal bnUSD u
106122savings features enabled even spoke chain USDC can be staked now(example is provided above- any supported
107123token can be staked now from the spoke chain). In ICON chain it can be done by transfering USDC to ` Router `
108124Contract with following data build with java code for example:
109- ``` java
125+ ``` javascript
110126 public static byte[] tokenData (String method , Map < String , Object > params ) {
111127 Map < String , Object > map = new HashMap <> ();
112128 map .put (" method" , method);
0 commit comments