Wallet Object function

Is there a function that binds an existing address to my object wallet with keys as a parameter?
thanks,

Hi! Thanks for checking out Xpring SDK.

Yes. Wallet contains a constructor that can take a public / private key as a hex encoded string in JavaScript: https://github.com/xpring-eng/xpring-common-js/blob/master/src/wallet.ts#L139. You could construct one as follows:

const wallet = new Wallet("123abc", "456def");

In Java and Swift we haven’t exposed this constructor but it would be relatively easy to do and it’s simply an oversight that we haven’t done this. What language are you working in? I’ll get it done regardless but happy to prioritize getting this fixed if you’re working in Java or Swift.

1 Like

Thank you thank you ,I’m currently using javascript so no need for me.

1 Like

Is there any git sample code which I can use to test for cross boarder payments which integrates with fiat currency?