Address
The result of each one of the following address
methods return one or an array of Address
objects that include the following methods:
getAsset
: Returns the asset
of the address
assetCode
.
getData
: Returns the address
details.
getWallet
: Returns the wallet
of the address
walletId
if set.
address.create
Creates a new address
.
Example:
Request
await slyk.address.create({
address: '1AyzfnxYZPeqgS3j3L5vfnUTkxVZ3FhGMp',
assetCode: 'btc',
walletId: '9afa8a2d-023a-4040-b591-c03077f43d23'
});
Response
{
"address": "1AyzfnxYZPeqgS3j3L5vfnUTkxVZ3FhGMp",
"assetCode": "btc",
"customData": {},
"createdAt": "2019-03-20T14:30:37.483Z",
"metadata": {},
"updatedAt": "2019-03-20T14:30:37.483Z",
"walletId": "9afa8a2d-023a-4040-b591-c03077f43d23"
}
address.get
Retrieves the address
of the given address
.
Example:
Request
await slyk.address.get('1AyzfnxYZPeqgS3j3L5vfnUTkxVZ3FhGMp');
Response
{
"address": "1AyzfnxYZPeqgS3j3L5vfnUTkxVZ3FhGMp",
"assetCode": "btc",
"customData": {},
"createdAt": "2019-03-20T14:30:37.483Z",
"metadata": {},
"updatedAt": "2019-03-20T14:30:37.483Z",
"walletId": "9afa8a2d-023a-4040-b591-c03077f43d23"
}
address.list
Retrieves a list of addresses
.
Example:
Request
await slyk.address.list({
page: { size: 2 },
sort: [{ name: 'createdAt'}],
filter: { walletId: '9afa8a2d-023a-4040-b591-c03077f43d23' }
});
Response
{
"results": [{
"address": "1AyzfnxYZPeqgS3j3L5vfnUTkxVZ3FhGMp",
"assetCode": "btc",
"customData": {},
"createdAt": "2019-03-20T14:30:37.483Z",
"metadata": {},
"updatedAt": "2019-03-20T14:30:37.483Z",
"walletId": "9afa8a2d-023a-4040-b591-c03077f43d23"
},
{
"address": "D7SrewuwiEFDtD69L336ADGf6EF2owohLg",
"assetCode": "doge",
"customData": {},
"createdAt": "2019-03-20T14:30:37.483Z",
"metadata": {},
"updatedAt": "2019-03-20T14:30:37.483Z",
"walletId": "9afa8a2d-023a-4040-b591-c03077f43d23"
}],
"total": 32
}
Asset
The result of each one of the following asset
methods return one or an array of Asset
objects that include the following methods:
getConnection
: Returns the connection
of the asset
connectionId
if set.
getData
: Returns the asset
details.
patch
: Patches the asset
.
asset.create
Creates a new asset
.
Example:
Request
await slyk.asset.create({
code: 'bar',
name: 'Foobar Coin',
symbol: 'ƒ'
});
Response
{
"code": "bar",
"connectionId": null,
"contract": {},
"createdAt": "2019-03-20T14:30:37.483Z",
"customData": {},
"decimalPlaces": 8,
"enabled": false,
"logoUrl": null,
"metadata": {},
"name": "Foobar coin",
"symbol": "ƒ",
"system": false,
"type": "custom",
"updatedAt": "2019-03-20T14:30:37.483Z"
}
asset.get
Retrieves the asset
of the given code
.
Example:
Request
await slyk.asset.get('bar');
Response
{
"code": "bar",
"connectionId": null,
"contract": {},
"createdAt": "2019-03-20T14:30:37.483Z",
"customData": {},
"decimalPlaces": 8,
"enabled": false,
"logoUrl": null,
"metadata": {},
"name": "Foobar coin",
"symbol": "ƒ",
"system": false,
"type": "custom",
"updatedAt": "2019-03-20T14:30:37.483Z"
}
asset.list
Retrieves a list of assets
.
Example:
Request
await slyk.asset.list({
page: { size: 2 },
sort: [{ direction: 'desc', name: 'code' }],
filter: { name: 'foo' }
});
Response
{
"results": [{
"code": "bar",
"connectionId": null,
"contract": {},
"createdAt": "2019-03-20T14:30:37.483Z",
"customData": {},
"decimalPlaces": 8,
"enabled": false,
"logoUrl": null,
"metadata": {},
"name": "Foobar coin",
"symbol": "ƒ",
"system": false,
"type": "custom",
"updatedAt": "2019-03-20T14:30:37.483Z"
},
{
"code": "biz",
"connectionId": null,
"contract": {},
"createdAt": "2019-03-20T14:30:37.483Z",
"customData": {},
"decimalPlaces": 8,
"enabled": false,
"logoUrl": null,
"metadata": {},
"name": "Foobiz coin",
"symbol": "Ɓ",
"system": false,
"type": "custom",
"updatedAt": "2019-03-20T14:30:37.483Z"
}],
"total": 32
}
asset.patch
Modifies the details the asset
of the given code
.
Example:
Request
await slyk.asset.patch('bar' { customData: { qux: 'quux' } });
Response
{
"code": "bar",
"connectionId": null,
"contract": {},
"createdAt": "2019-03-20T14:30:37.483Z",
"customData": { "qux": "quux" },
"decimalPlaces": 8,
"enabled": false,
"logoUrl": null,
"metadata": {},
"name": "Foobar coin",
"symbol": "ƒ",
"system": false,
"type": "custom",
"updatedAt": "2019-03-20T14:30:37.483Z"
}
Invite
The result of each one of the following invite
methods return one or an array of Invite
objects that include the following methods:
cancel
: Cancels the invite
.
getData
: Returns the invite
details.
getInvitedUser
: Returns the user
of the invite
invitedUserId
if set.
getInviterUser
: Returns the user
of the invite
inviterUserId
if set.
validate
: Validates the invite
.
invite.cancel
Cancels the invite
of the given code
.
Example:
Request
await slyk.invite.cancel('447fcf25-4e70-47a0-a2ad-a8f0aadf5a91');
Response
invite.create
Creates a new invite
.
Example:
Request
await slyk.invite.create({
email: 'foo@bar.com',
inviterUserId: '26b7d8c3-d21c-420b-9820-9e8b822b90d2'
});
Response
{
"code": "447fcf25-4e70-47a0-a2ad-a8f0aadf5a91",
"createdAt": "2019-03-20T14:30:37.483Z",
"expiredAt": "2019-04-20T14:30:37.483Z",
"invitedEmail": "foo@bar.com",
"invitedUserId": null,
"inviterUserId": "26b7d8c3-d21c-420b-9820-9e8b822b90d2",
"status": "pending",
"updatedAt": "2019-03-20T14:30:37.483Z",
}
invite.get
Retrieves the invite
of the given code
.
Example:
Request
await slyk.invite.get('447fcf25-4e70-47a0-a2ad-a8f0aadf5a91');
Response
{
"code": "447fcf25-4e70-47a0-a2ad-a8f0aadf5a91",
"createdAt": "2019-03-20T14:30:37.483Z",
"expiredAt": "2019-04-20T14:30:37.483Z",
"invitedEmail": "foo@bar.com",
"invitedUserId": null,
"inviterUserId": "26b7d8c3-d21c-420b-9820-9e8b822b90d2",
"status": "pending",
"updatedAt": "2019-03-20T14:30:37.483Z",
}
invite.list
Retrieves a list of invites
.
Example:
Request
await slyk.invite.list({
page: { size: 2 },
sort: [{ direction: 'desc', name: 'code' }],
filter: { invitedEmail: 'foo@bar.com' }
});
Response
{
"results": [{
"code": "447fcf25-4e70-47a0-a2ad-a8f0aadf5a91",
"createdAt": "2019-03-20T14:30:37.483Z",
"expiredAt": "2019-04-20T14:30:37.483Z",
"invitedEmail": "foo@bar.com",
"invitedUserId": null,
"inviterUserId": "26b7d8c3-d21c-420b-9820-9e8b822b90d2",
"status": "pending",
"updatedAt": "2019-03-20T14:30:37.483Z",
},
{
"code": "06b989b9-8808-4615-95ed-da6c15b945d2",
"createdAt": "2019-01-20T14:30:37.483Z",
"expiredAt": "2019-02-20T14:30:37.483Z",
"invitedEmail": "foo@bar.com",
"invitedUserId": null,
"inviterUserId": "26b7d8c3-d21c-420b-9820-9e8b822b90d2",
"status": "expired",
"updatedAt": "2019-03-20T14:30:37.483Z",
}],
"total": 32
}
invite.send
Creates and sends a one or multiples invite
.
Example:
Request
await slyk.invite.send({
email: ['foo@bar.com', 'foo@biz.com'],
inviterUserId: '26b7d8c3-d21c-420b-9820-9e8b822b90d2'
});
Response
invite.validate
Validates the invite
with the given code
.
Example:
Request
await slyk.invite.validate('06b989b9-8808-4615-95ed-da6c15b945d2');
Response
{ "referrerName": "corge" }
Movement
The result of each one of the following movement
methods return one or an array of Movement
objects that include the following methods:
getAsset
: Returns the asset
of the movement
assetCode
.
getData
: Returns the movement
details.
getWallet
: Returns the wallet
of the movement
walletId
.
getTransaction
: Returns the transaction
of the movement
transactionId
.
movement.get
Returns the movement
of the given id
.
Example:
Request
await slyk.movement.get('09900e6e-991e-43bd-9b82-0641f648c1d1');
Response
{
"amount": "4.50000000",
"assetCode": "garply",
"code": "deposit",
"createdAt": "2019-03-20T14:30:37.483Z",
"id": "09900e6e-991e-43bd-9b82-0641f648c1d1",
"transactionId": "43563311-ab16-4499-95d2-30d9e06ba159",
"updatedAt": "2019-03-20T14:30:37.483Z",
"walletId": "703d8c69-d8fc-4e02-a7c9-42340ef07727"
}
movement.list
Retrieves a list of movements
.
Example:
Request
await slyk.movement.list({
inlcude: 'transaction',
page: { size: 2 },
filter: { walletId: '703d8c69-d8fc-4e02-a7c9-42340ef07727' }
});
Response
{
"results": [{
"amount": "4.50000000",
"assetCode": "eth",
"code": "deposit",
"createdAt": "2019-03-20T14:30:37.483Z",
"id": "09900e6e-991e-43bd-9b82-0641f648c1d1",
"transactionId": "43563311-ab16-4499-95d2-30d9e06ba159",
"transaction": {
"amount": "4.50000000",
"assetCode": "eth",
"code": "internal",
"createdAt": "2019-03-20T14:30:37.483Z",
"description": null,
"destinationAddress": null,
"destinationWalletId": "703d8c69-d8fc-4e02-a7c9-42340ef07727",
"externalId": null,
"id": "09900e6e-991e-43bd-9b82-0641f648c1d1",
"metadata": {},
"originAddress": null,
"originWalletId": null,
"status": "completed",
"type": "deposit",
"updatedAt": "2019-03-20T14:30:37.483Z"
},
"updatedAt": "2019-03-20T14:30:37.483Z",
"walletId": "703d8c69-d8fc-4e02-a7c9-42340ef07727"
},
{
"amount": "-0.50000000",
"assetCode": "eth",
"code": "withdrawal",
"createdAt": "2019-03-20T14:30:37.483Z",
"id": "b9fe22e5-2985-4814-8cb8-02e1cb581001",
"transactionId": "a3293366-0d4c-4f83-8f71-84fe0b7dda99",
"transaction": {
"amount": "4.50000000",
"assetCode": "eth",
"code": "internal",
"createdAt": "2019-03-20T14:30:37.483Z",
"description": null,
"destinationAddress": null,
"destinationWalletId": null,
"externalId": null,
"id": "b9fe22e5-2985-4814-8cb8-02e1cb581001",
"metadata": {},
"originAddress": null,
"originWalletId": "703d8c69-d8fc-4e02-a7c9-42340ef07727",
"status": "completed",
"type": "withdrawal",
"updatedAt": "2019-03-20T14:30:37.483Z"
},
"updatedAt": "2019-03-20T14:30:37.483Z",
"walletId": "703d8c69-d8fc-4e02-a7c9-42340ef07727"
}],
"total": 4
}
Payment Method
paymentMethod.get
Returns the paymentMethod
of the given slug
.
getData
: Returns the paymentMethod
details.
Example:
Request
await slyk.paymentMethod.get('paypal');
Response
{
"assets": ["eur", "usd"],
"capabilities": ["deposit"],
"createdAt": "2019-03-20T14:30:37.483Z",
"enabled": true,
"features": ["apm"],
"metadata": {
"clientId": "client-id",
"secret": "12345*****"
},
"name": "Paypal",
"slug": "paypal"
}
paymentMethod.list
Retrieves a list of paymentMethod
.
Example:
Request
await slyk.movement.list({ filter: { enabled: true } });
Response
{
"results": [{
"assets": ["eur", "usd"],
"capabilities": ["deposit"],
"createdAt": "2019-03-20T14:30:37.483Z",
"enabled": true,
"features": ["apm"],
"metadata": {
"clientId": "client-id",
"secret": "12345*****"
},
"name": "Paypal",
"slug": "paypal"
},
{
"assets": ["eur", "usd"],
"capabilities": ["deposit"],
"createdAt": "2019-03-20T14:30:37.483Z",
"enabled": true,
"features": ["apm"],
"metadata": {
"apiPublishableKey": "api-publishable-key",
"apiSecretKey": "12345*****"
},
"name": "Stripe",
"slug": "stripe"
}],
"total": 4
}
Rate
The result of each one of the following rate
methods return one or an array of Rate
objects that include the following methods:
getBaseAsset
: Returns the asset
of the rate
baseAssetCode
.
getData
: Returns the rate
details.
getQuoteAsset
: Returns the asset
of the rate
quoteAssetCode
.
rate.create
Creates a new rate
.
Example:
Request
await slyk.rate.create({
baseAssetCode: 'btc',
quoteAssetCode: 'usd',
rate: '6649.88'
});
Response
{
"baseAssetCode": "btc",
"createdAt": "2019-03-20T14:30:37.483Z",
"customData": {},
"metadata": {},
"quoteAssetCode": "usd",
"rate": "6649.88000000",
"updatedAt": "2019-03-20T14:30:37.483Z"
}
rate.delete
Deletes the rate
of the given baseAssetCode
and quoteAssetCode
.
Example:
Request
await slyk.rate.delete('btc', 'usd');
Response
rate.get
Retrieves the rate
of the given baseAssetCode
and quoteAssetCode
.
Example:
Request
await slyk.rate.get('garply', 'eur');
Response
{
"baseAssetCode": "btc",
"createdAt": "2019-03-20T14:30:37.483Z",
"customData": {},
"metadata": {},
"quoteAssetCode": "eur",
"rate": "6079.25000000",
"updatedAt": "2019-03-20T14:30:37.483Z"
}
rate.list
Retrieves a list of rates
.
Example:
Request
await slyk.rate.list({ filter: { assetCode: 'btc' } });
Response
{
"results": [{
"baseAssetCode": "btc",
"createdAt": "2019-03-20T14:30:37.483Z",
"customData": {},
"metadata": {},
"quoteAssetCode": "eur",
"rate": "6079.25000000",
"updatedAt": "2019-03-20T14:30:37.483Z"
},
{
"baseAssetCode": "btc",
"createdAt": "2019-03-20T14:30:37.483Z",
"customData": {},
"metadata": {},
"quoteAssetCode": "usd",
"rate": "6649.88000000",
"updatedAt": "2019-03-20T14:30:37.483Z"
}],
"total": 2
}
rate.patch
Modifies the details the rate
of the given baseAssetCode
and quoteAssetCode
.
Example:
Request
await slyk.rate.patch('eth', 'usd', { rate: '137.18' });
Response
{
"baseAssetCode": "eth",
"createdAt": "2019-03-20T14:30:37.483Z",
"customData": {},
"metadata": {},
"quoteAssetCode": "usd",
"rate": "137.18000000",
"updatedAt": "2019-03-20T14:30:37.483Z"
}
Transaction
The result of each one of the following transaction
methods return one or an array of Transaction
objects that include the following methods:
approve
: Approves the transaction
.
confirm
: Confirms the transaction
.
fail
: Fails the transaction
.
getAsset
: Returns the asset
of the transaction
assetCode
.
getData
: Returns the transaction
details.
getDestinationAddress
: Returns the address
of the transaction
destinationAddress
if set.
getDestinationWallet
: Returns the wallet
of the transaction
destinationWalletId
if set.
getOriginAddress
: Returns the address
of the transaction
originAddress
if set.
getOriginWallet
: Returns the wallet
of the transaction
originWalletId
if set.
getMovements
: Returns the related movements
.
reject
: Rejects the transaction
.
transaction.approve
Approves the transaction
of the given id
.
Example:
Request
await slyk.transaction.approve('43563311-ab16-4499-95d2-30d9e06ba159');
Response
{
"amount": "5.00000000",
"assetCode": "eth",
"code": "internal",
"createdAt": "2019-03-20T14:30:37.483Z",
"customData": {},
"description": null,
"destinationAddress": null,
"destinationWalletId": null,
"externalId": null,
"externalReference": null,
"id": "43563311-ab16-4499-95d2-30d9e06ba159",
"metadata": {},
"originAddress": "0x1B8D75764ee27D06b131728412BfdF36f94dcbc1",
"originWalletId": "1ef0452a-062c-45ce-aaf5-dd19e38c7711",
"processedAt": null,
"reference": null,
"status": "processing",
"type": "withdrawal",
"updatedAt": "2019-03-20T14:30:37.483Z"
}
transaction.confirm
Confirms the transaction
of the given id
.
Example:
Request
await slyk.transaction.confirm('43563311-ab16-4499-95d2-30d9e06ba159');
Response
{
"amount": "5.00000000",
"assetCode": "eth",
"code": "internal",
"createdAt": "2019-03-20T14:30:37.483Z",
"customData": {},
"description": null,
"destinationAddress": null,
"destinationWalletId": null,
"externalId": null,
"externalReference": null,
"id": "43563311-ab16-4499-95d2-30d9e06ba159",
"metadata": {},
"originAddress": "0x1B8D75764ee27D06b131728412BfdF36f94dcbc1",
"originWalletId": "1ef0452a-062c-45ce-aaf5-dd19e38c7711",
"processedAt": null,
"reference": null,
"status": "completed",
"type": "withdrawal",
"updatedAt": "2019-03-20T14:30:37.483Z"
}
transaction.deposit
Creates a new deposit
transaction
.
Example:
Request
await slyk.transaction.deposit({
amount: '25.5',
assetCode: 'bar',
code: 'internal',
destinationWalletId: '1ef0452a-062c-45ce-aaf5-dd19e38c7711'
});
Response
{
"amount": "25.50000000",
"assetCode": "bar",
"code": "internal",
"createdAt": "2019-03-20T14:30:37.483Z",
"customData": {},
"description": null,
"destinationAddress": null,
"destinationWalletId": "1ef0452a-062c-45ce-aaf5-dd19e38c7711",
"externalId": null,
"externalReference": null,
"id": "3110c2e3-28c6-463f-a69b-174527eabd70",
"metadata": {},
"originAddress": null,
"originWalletId": null,
"processedAt": null,
"reference": null,
"status": "pending",
"type": "deposit",
"updatedAt": "2019-03-20T14:30:37.483Z"
}
transaction.fail
Fails the transaction
of the given id
.
Example:
Request
await slyk.transaction.fail('3110c2e3-28c6-463f-a69b-174527eabd70', { reason: 'Wrong amount.' });
Response
{
"amount": "25.50000000",
"assetCode": "bar",
"code": "internal",
"createdAt": "2019-03-20T14:30:37.483Z",
"customData": {},
"description": null,
"destinationAddress": null,
"destinationWalletId": "1ef0452a-062c-45ce-aaf5-dd19e38c7711",
"externalId": null,
"externalReference": null,
"id": "3110c2e3-28c6-463f-a69b-174527eabd70",
"metadata": { "failReason": "Wrong amount." },
"originAddress": null,
"originWalletId": null,
"processedAt": null,
"reference": null,
"status": "failed",
"type": "deposit",
"updatedAt": "2019-03-20T14:30:37.483Z"
}
transaction.get
Returns the transaction
of the given id
.
Example:
Request
await slyk.transaction.get('a33a1c4d-b4a1-4ea3-b57a-25b485b4e5a5');
Response
{
"amount": "0.50000000",
"assetCode": "eth",
"code": "crypto:coinbase",
"createdAt": "2019-03-20T14:30:37.483Z",
"customData": {},
"description": null,
"destinationAddress": "0x1B8D75764ee27D06b131728412BfdF36f94dcbc1",
"destinationWalletId": "1ef0452a-062c-45ce-aaf5-dd19e38c7711",
"externalId": null,
"externalReference": null,
"id": "a33a1c4d-b4a1-4ea3-b57a-25b485b4e5a5",
"metadata": {},
"originAddress": null,
"originWalletId": null,
"processedAt": null,
"reference": null,
"status": "pending",
"type": "deposit",
"updatedAt": "2019-03-20T14:30:37.483Z"
}
transaction.list
Retrieves a list of transactions
.
Example:
Request
await slyk.movement.list({ filter: { walletId: '1ef0452a-062c-45ce-aaf5-dd19e38c7711' } });
Response
{
"results": [{
"amount": "0.50000000",
"assetCode": "eth",
"code": "crypto:coinbase",
"createdAt": "2019-03-20T14:30:37.483Z",
"customData": {},
"description": null,
"destinationAddress": "0x1B8D75764ee27D06b131728412BfdF36f94dcbc1",
"destinationWalletId": "1ef0452a-062c-45ce-aaf5-dd19e38c7711",
"externalId": null,
"externalReference": null,
"id": "a33a1c4d-b4a1-4ea3-b57a-25b485b4e5a5",
"metadata": {},
"originAddress": null,
"originWalletId": null,
"processedAt": null,
"reference": null,
"status": "pending",
"type": "deposit",
"updatedAt": "2019-03-20T14:30:37.483Z"
},
{
"amount": "250.00000000",
"assetCode": "usd",
"code": "bank:wire",
"createdAt": "2019-03-20T14:30:37.483Z",
"customData": {},
"description": null,
"destinationAddress": null,
"destinationWalletId": null,
"externalId": null,
"externalReference": null,
"id": "43563311-ab16-4499-95d2-30d9e06ba159",
"metadata": {},
"originAddress": null,
"originWalletId": "1ef0452a-062c-45ce-aaf5-dd19e38c7711",
"processedAt": null,
"reference": null,
"status": "pending",
"type": "withdrawal",
"updatedAt": "2019-03-20T14:30:37.483Z"
}],
"total": 2
}
transaction.pay
Creates a new pay
transaction
.
Example:
Request
await slyk.transaction.pay({
amount: '0.05',
assetCode: 'eth',
originWalletId: '1ef0452a-062c-45ce-aaf5-dd19e38c7711'
});
Response
{
"amount": "0.05000000",
"assetCode": "eth",
"code": "internal:pay",
"createdAt": "2019-03-20T14:30:37.483Z",
"customData": {},
"description": null,
"destinationAddress": null,
"destinationWalletId": "c4004a9d-6f2a-47b5-8c1e-d6349951ad05",
"externalId": null,
"externalReference": null,
"id": "43563311-ab16-4499-95d2-30d9e06ba159",
"metadata": {},
"originAddress": null,
"originWalletId": "1ef0452a-062c-45ce-aaf5-dd19e38c7711",
"processedAt": null,
"reference": null,
"status": "pending",
"type": "transfer",
"updatedAt": "2019-03-20T14:30:37.483Z"
}
transaction.reject
Rejects the transaction
of the given id
.
Example:
Request
await slyk.transaction.reject('77d3a33c-89ed-4e1b-afd3-f726a0a3430a', { reason: { qux: 'quux' } });
Response
{
"amount": "175.00000000",
"assetCode": "eur",
"code": "bank:wire",
"createdAt": "2019-03-20T14:30:37.483Z",
"customData": {},
"description": null,
"destinationAddress": null,
"destinationWalletId": null,
"externalId": null,
"externalReference": null,
"id": "77d3a33c-89ed-4e1b-afd3-f726a0a3430a",
"metadata": { "rejectReason": { "qux": "quux" } },
"originAddress": null,
"originWalletId": "1ef0452a-062c-45ce-aaf5-dd19e38c7711",
"processedAt": null,
"reference": null,
"status": "rejected",
"type": "withdrawal",
"updatedAt": "2019-03-20T14:30:37.483Z"
}
transaction.transfer
Creates a new transfer
transaction
.
Example:
Request
await slyk.transaction.transfer({
amount: '0.5',
assetCode: 'eth',
code: 'internal',
commit: true,
destinationWalletId: 'ab7970fb-a1a9-456e-a6b2-1fedfba2247b',
originWalletId: '1ef0452a-062c-45ce-aaf5-dd19e38c7711',
});
Response
{
"amount": "0.50000000",
"assetCode": "eth",
"code": "internal",
"createdAt": "2019-03-20T14:30:37.483Z",
"customData": {},
"description": null,
"destinationAddress": null,
"destinationWalletId": "ab7970fb-a1a9-456e-a6b2-1fedfba2247b",
"externalId": null,
"externalReference": null,
"id": "43563311-ab16-4499-95d2-30d9e06ba159",
"metadata": {},
"originAddress": null,
"originWalletId": "1ef0452a-062c-45ce-aaf5-dd19e38c7711",
"processedAt": null,
"reference": null,
"status": "pending",
"type": "transfer",
"updatedAt": "2019-03-20T14:30:37.483Z"
}
transaction.withdrawal
Creates a new withdrawal
transaction
.
Example:
Request
await slyk.transaction.withdrawal({
amount: '200',
assetCode: 'eur',
code: 'bank:wire',
commit: true,
originWalletId: '1ef0452a-062c-45ce-aaf5-dd19e38c7711',
});
Response
{
"amount": "200.00000000",
"assetCode": "eur",
"code": "bank:wire",
"createdAt": "2019-03-20T14:30:37.483Z",
"customData": {},
"description": null,
"destinationAddress": null,
"destinationWalletId": null,
"externalId": null,
"externalReference": null,
"id": "43563311-ab16-4499-95d2-30d9e06ba159",
"metadata": {},
"originAddress": null,
"originWalletId": "1ef0452a-062c-45ce-aaf5-dd19e38c7711",
"processedAt": null,
"reference": null,
"status": "pending",
"type": "withdrawal",
"updatedAt": "2019-03-20T14:30:37.483Z"
}
User
The result of each one of the following user
methods return one or an array of User
objects that include the following methods:
approve
: Approves the user
.
changePassword
: Changes the user
the password.
getData
: Returns the user
details.
getInvites
: Returns the invites
of the user
.
getWallets
: Returns the wallets
of the user
.
getPrimaryWallet
: Returns the wallet
of the user
primaryWalletId
.
getReferralUser
: Returns the user
of the user
referralUserId
if set.
unblock
: Unblocks the user
.
user.approve
Approves the user
of the given id
.
Example:
Request
await slyk.user.approve('5e101529-fa30-4415-9945-6540e70c4483');
Response
{
"approved": true,
"blocked": false,
"createdAt": "2019-03-20T14:30:37.483Z",
"customData": { "qux": "quux" },
"email": "foo@bar.com",
"id": "5e101529-fa30-4415-9945-6540e70c4483",
"locale": "en-us",
"name": "foobar",
"phone": null,
"primaryWalletId": "6c455aa8-c714-4441-97a8-0739fe387a67",
"referralCode": "XYZZY",
"referralUserId": null,
"roles": ["user"],
"updatedAt": "2019-03-20T14:30:37.483Z",
"verified": false
}
user.block
Blocks the user
of the given id
.
Example:
Request
await slyk.user.block('5e101529-fa30-4415-9945-6540e70c4483');
Response
{
"approved": false,
"blocked": true,
"createdAt": "2019-03-20T14:30:37.483Z",
"customData": { "qux": "quux" },
"email": "foo@bar.com",
"id": "5e101529-fa30-4415-9945-6540e70c4483",
"locale": "en-us",
"name": "foobar",
"phone": null,
"primaryWalletId": "6c455aa8-c714-4441-97a8-0739fe387a67",
"referralCode": "XYZZY",
"referralUserId": null,
"roles": ["user"],
"updatedAt": "2019-03-20T14:30:37.483Z",
"verified": false
}
user.changePassword
Changes the user
password.
Example:
Request
await slyk.user.changePassword('5e101529-fa30-4415-9945-6540e70c4483', { password: 'waldo' });
Response
user.create
Creates a new user
.
Example:
Request
await slyk.user.create({ email: 'foo@bar.com', password: 'waldo' });
Response
{
"approved": false,
"blocked": false,
"createdAt": "2019-03-20T14:30:37.483Z",
"customData": {},
"email": "foo@bar.com",
"id": "5e101529-fa30-4415-9945-6540e70c4483",
"locale": "en-us",
"name": "foobar",
"phone": null,
"primaryWalletId": "6c455aa8-c714-4441-97a8-0739fe387a67",
"referralCode": "XYZZY",
"referralUserId": null,
"roles": ["user"],
"updatedAt": "2019-03-20T14:30:37.483Z",
"verified": false
}
user.get
Returns the user
of the given id
.
Example:
Request
await slyk.user.get('5e101529-fa30-4415-9945-6540e70c4483');
Response
{
"approved": false,
"blocked": false,
"createdAt": "2019-03-20T14:30:37.483Z",
"customData": {},
"email": "foo@bar.com",
"id": "5e101529-fa30-4415-9945-6540e70c4483",
"locale": "en-us",
"name": "foobar",
"phone": null,
"primaryWalletId": "6c455aa8-c714-4441-97a8-0739fe387a67",
"referralCode": "XYZZY",
"referralUserId": null,
"roles": ["user"],
"updatedAt": "2019-03-20T14:30:37.483Z",
"verified": false
}
user.list
Retrieves a list of user
.
Example:
Request
await slyk.user.list({ filter: { name: 'foo' } });
Response
{
"results": [{
"approved": false,
"blocked": false,
"createdAt": "2019-03-20T14:30:37.483Z",
"customData": {},
"email": "foo@bar.com",
"id": "5e101529-fa30-4415-9945-6540e70c4483",
"locale": "en-us",
"name": "foobar",
"phone": null,
"primaryWalletId": "6c455aa8-c714-4441-97a8-0739fe387a67",
"referralCode": "XYZZY",
"referralUserId": null,
"roles": ["user"],
"updatedAt": "2019-03-20T14:30:37.483Z",
"verified": false
},
{
"approved": false,
"blocked": false,
"createdAt": "2019-03-20T14:30:37.483Z",
"customData": {},
"email": "foo@biz.com",
"id": "6173fe23-1442-4003-bc4d-d18f5f42c024",
"locale": "en-us",
"name": "foobiz",
"phone": null,
"primaryWalletId": "a12fb051-9e36-441a-82b8-90f7813c5504",
"referralCode": "XYZZY",
"referralUserId": null,
"roles": ["user"],
"updatedAt": "2019-03-20T14:30:37.483Z",
"verified": false
}],
"total": 2
}
user.patch
Patches the details of the user
of the given id
.
Example:
Request
await slyk.user.patch('5e101529-fa30-4415-9945-6540e70c4483', { name: 'corge' });
Response
{
"approved": false,
"blocked": false,
"createdAt": "2019-03-20T14:30:37.483Z",
"customData": {},
"email": "foo@bar.com",
"id": "5e101529-fa30-4415-9945-6540e70c4483",
"locale": "en-us",